summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2011-10-09 17:38:20 -0700
committerMike Lockwood <lockwood@google.com>2012-02-10 10:51:22 -0800
commit6c0236c53a30ea9fef28ee7c95a4dce2fa5ce2e1 (patch)
treeccf1b91be7e25185517321e8ef718a4dfae348ab /tools
parentb71287f42e7cc164d932562d5ff1ee44e1ae4ade (diff)
downloadframeworks_base-6c0236c53a30ea9fef28ee7c95a4dce2fa5ce2e1.zip
frameworks_base-6c0236c53a30ea9fef28ee7c95a4dce2fa5ce2e1.tar.gz
frameworks_base-6c0236c53a30ea9fef28ee7c95a4dce2fa5ce2e1.tar.bz2
Suport RpcData as a parcelable type.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/aidl/Type.cpp10
-rwxr-xr-xtools/aidl/Type.h36
2 files changed, 28 insertions, 18 deletions
diff --git a/tools/aidl/Type.cpp b/tools/aidl/Type.cpp
index 9415bc8..8161ef3 100755
--- a/tools/aidl/Type.cpp
+++ b/tools/aidl/Type.cpp
@@ -903,6 +903,14 @@ ParcelableType::ParcelableType(const string& package, const string& name,
{
}
+ParcelableType::ParcelableType(const string& package, const string& name,
+ bool builtIn, bool canWriteToRpcData,
+ const string& declFile, int declLine)
+ :Type(package, name, builtIn ? BUILT_IN : PARCELABLE, true, canWriteToRpcData, true,
+ declFile, declLine)
+{
+}
+
string
ParcelableType::CreatorName() const
{
@@ -1258,7 +1266,7 @@ GenericListType::CreateFromRpcData(StatementBlock* addTo, Expression* k, Variabl
// ================================================================
RpcDataType::RpcDataType()
- :Type("com.android.athome.rpc", "RpcData", Type::BUILT_IN, false, true, true)
+ :ParcelableType("com.android.athome.rpc", "RpcData", true, true)
{
}
diff --git a/tools/aidl/Type.h b/tools/aidl/Type.h
index 536dc17..a144448 100755
--- a/tools/aidl/Type.h
+++ b/tools/aidl/Type.h
@@ -355,6 +355,9 @@ class ParcelableType : public Type
public:
ParcelableType(const string& package, const string& name,
bool builtIn, const string& declFile, int declLine);
+ ParcelableType(const string& package, const string& name,
+ bool builtIn, bool canWriteToRpcData,
+ const string& declFile = "", int declLine = -1);
virtual string CreatorName() const;
@@ -434,6 +437,22 @@ private:
vector<Type*> m_args;
};
+class RpcDataType : public ParcelableType
+{
+public:
+ RpcDataType();
+
+ virtual void WriteToRpcData(StatementBlock* addTo, Expression* k, Variable* v,
+ Variable* data, int flags);
+ virtual void CreateFromRpcData(StatementBlock* addTo, Expression* k, Variable* v,
+ Variable* data, Variable** cl);
+};
+
+class ClassLoaderType : public Type
+{
+public:
+ ClassLoaderType();
+};
class GenericListType : public GenericType
{
@@ -460,23 +479,6 @@ private:
string m_creator;
};
-class RpcDataType : public Type
-{
-public:
- RpcDataType();
-
- virtual void WriteToRpcData(StatementBlock* addTo, Expression* k, Variable* v,
- Variable* data, int flags);
- virtual void CreateFromRpcData(StatementBlock* addTo, Expression* k, Variable* v,
- Variable* data, Variable** cl);
-};
-
-class ClassLoaderType : public Type
-{
-public:
- ClassLoaderType();
-};
-
class Namespace
{
public: