Add RpcData as a built-in marshallable type.
diff --git a/tools/aidl/Type.cpp b/tools/aidl/Type.cpp
index 4ae4d8b..9a58af0 100755
--- a/tools/aidl/Type.cpp
+++ b/tools/aidl/Type.cpp
@@ -130,8 +130,7 @@
Type::BUILT_IN, false, false);
NAMES.Add(RPC_SERVICE_BASE_TYPE);
- RPC_DATA_TYPE = new Type("com.android.athome.rpc", "RpcData",
- Type::BUILT_IN, false, false);
+ RPC_DATA_TYPE = new RpcDataType();
NAMES.Add(RPC_DATA_TYPE);
RPC_BROKER_TYPE = new Type("com.android.athome.utils", "AndroidAtHomeBroker",
@@ -1207,6 +1206,29 @@
new LiteralExpression(classArg))));
}
+
+// ================================================================
+
+RpcDataType::RpcDataType()
+ :Type("com.android.athome.rpc", "RpcData", Type::BUILT_IN, false, false)
+{
+}
+
+void
+RpcDataType::WriteToRpcData(StatementBlock* addTo, Expression* k, Variable* v,
+ Variable* data, int flags)
+{
+ addTo->Add(new MethodCall(data, "putRpcData", 2, k, v));
+}
+
+void
+RpcDataType::CreateFromRpcData(StatementBlock* addTo, Expression* k, Variable* v, Variable* data,
+ Variable** cl)
+{
+ addTo->Add(new Assignment(v, new MethodCall(data, "getRpcData", 1, k)));
+}
+
+
// ================================================================
ClassLoaderType::ClassLoaderType()