summaryrefslogtreecommitdiffstats
path: root/tools/aidl
diff options
context:
space:
mode:
authorJoe Onorato <joeo@google.com>2011-10-09 17:38:20 -0700
committerMike Lockwood <lockwood@android.com>2011-10-28 10:14:51 -0400
commit11987cdbb31426cba926ea2dda3c17cc3d53929e (patch)
tree83833462ce48c357ce84ec9ef7414524592159de /tools/aidl
parent9e2df9748834aa40bf3e3ba813fe7f433bd2e7d2 (diff)
downloadframeworks_base-11987cdbb31426cba926ea2dda3c17cc3d53929e.zip
frameworks_base-11987cdbb31426cba926ea2dda3c17cc3d53929e.tar.gz
frameworks_base-11987cdbb31426cba926ea2dda3c17cc3d53929e.tar.bz2
Suport RpcData as a parcelable type.
Change-Id: I5721fe5b33f52edfb06f4c9cd4f8c97d234e9fc7
Diffstat (limited to 'tools/aidl')
-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: