diff options
author | Jason Simmons <jsimmons@google.com> | 2011-12-16 16:14:17 -0800 |
---|---|---|
committer | Mike Lockwood <lockwood@google.com> | 2012-02-10 14:44:07 -0800 |
commit | 7dc2973951e9d25e26cdc5a90297ac6c69e43083 (patch) | |
tree | e1319b1ee07b4844d97f1a2307c36af3f92a88b9 /tools | |
parent | 5c55a051ad7d86a464fb91426f1ea3c0250e38b3 (diff) | |
download | frameworks_base-7dc2973951e9d25e26cdc5a90297ac6c69e43083.zip frameworks_base-7dc2973951e9d25e26cdc5a90297ac6c69e43083.tar.gz frameworks_base-7dc2973951e9d25e26cdc5a90297ac6c69e43083.tar.bz2 |
Add a getEndpointInfo accessor to AIDL-generated RPC proxy classes
Diffstat (limited to 'tools')
-rw-r--r-- | tools/aidl/generate_java_rpc.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/aidl/generate_java_rpc.cpp b/tools/aidl/generate_java_rpc.cpp index dee6a11..60517e8 100644 --- a/tools/aidl/generate_java_rpc.cpp +++ b/tools/aidl/generate_java_rpc.cpp @@ -293,6 +293,7 @@ public: private: void generate_ctor(); + void generate_get_endpoint_info(); }; RpcProxyClass::RpcProxyClass(const interface_type* iface, InterfaceType* interfaceType) @@ -312,6 +313,7 @@ RpcProxyClass::RpcProxyClass(const interface_type* iface, InterfaceType* interfa // methods generate_ctor(); + generate_get_endpoint_info(); } RpcProxyClass::~RpcProxyClass() @@ -335,6 +337,19 @@ RpcProxyClass::generate_ctor() ctor->statements->Add(new Assignment(this->endpoint, endpoint)); } +void +RpcProxyClass::generate_get_endpoint_info() +{ + Method* get = new Method; + get->modifiers = PUBLIC; + get->returnType = RPC_ENDPOINT_INFO_TYPE; + get->name = "getEndpointInfo"; + get->statements = new StatementBlock; + this->elements.push_back(get); + + get->statements->Add(new ReturnStatement(this->endpoint)); +} + // ================================================= class EventListenerClass : public DispatcherClass { |