diff options
author | Joe Onorato <joeo@google.com> | 2011-10-09 17:38:20 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@google.com> | 2012-02-10 10:51:22 -0800 |
commit | 6c0236c53a30ea9fef28ee7c95a4dce2fa5ce2e1 (patch) | |
tree | ccf1b91be7e25185517321e8ef718a4dfae348ab /tools | |
parent | b71287f42e7cc164d932562d5ff1ee44e1ae4ade (diff) | |
download | frameworks_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-x | tools/aidl/Type.cpp | 10 | ||||
-rwxr-xr-x | tools/aidl/Type.h | 36 |
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: |