From 60c3605fe5a405d1a5d955a49cefa49d32dc6fd4 Mon Sep 17 00:00:00 2001 From: Sangyoon Jang Date: Thu, 1 Sep 2022 10:52:19 +0900 Subject: [PATCH] [aitt] Remove ondemand related API Change-Id: If81bc83714d7a95e8cf693a5bb8b9803ae106888 Signed-off-by: Sangyoon Jang --- idlc/gen_aitt_plugin/aitt_plugin_cs_base_gen_cb.h | 9 --------- idlc/gen_aitt_plugin/aitt_plugin_cs_interop_gen_cb.h | 3 --- idlc/gen_cion/cs_cion_stub_gen.cc | 5 +++++ idlc/gen_cion/cs_cion_stub_gen.h | 1 + idlc/gen_cion/cs_cion_stub_gen_cb.h | 14 -------------- idlc/gen_cion/default_cs_transportable.cc | 18 +++++++++++++++++- 6 files changed, 23 insertions(+), 27 deletions(-) diff --git a/idlc/gen_aitt_plugin/aitt_plugin_cs_base_gen_cb.h b/idlc/gen_aitt_plugin/aitt_plugin_cs_base_gen_cb.h index 95ddc9d..74f9093 100644 --- a/idlc/gen_aitt_plugin/aitt_plugin_cs_base_gen_cb.h +++ b/idlc/gen_aitt_plugin/aitt_plugin_cs_base_gen_cb.h @@ -1246,15 +1246,6 @@ R"__cs_cb( return peerInfoList; } - public void SetOndemandLaunchEnabled(bool enable) - { - Interop.AittPlugin.ErrorCode ret = Interop.AittPluginServer.AittPluginServerSetOnDemandLaunchEnabled(_handle, enable); - if (ret != Interop.AittPlugin.ErrorCode.None) - { - throw AittPluginErrorFactory.GetException(ret, "Failed to set ondemand launch enable"); - } - } - protected abstract void OnConnectionResult(PeerInfo peerInfo, ConnectionResult result); protected abstract byte[] OnDataReceived(byte[] data, PeerInfo peerInfo); protected abstract void OnPayloadReceived(Payload data, PeerInfo peerInfo, PayloadTransferStatus status); diff --git a/idlc/gen_aitt_plugin/aitt_plugin_cs_interop_gen_cb.h b/idlc/gen_aitt_plugin/aitt_plugin_cs_interop_gen_cb.h index 6b3bb56..fd2e35b 100644 --- a/idlc/gen_aitt_plugin/aitt_plugin_cs_interop_gen_cb.h +++ b/idlc/gen_aitt_plugin/aitt_plugin_cs_interop_gen_cb.h @@ -363,9 +363,6 @@ R"__cs_cb( [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_remove_disconnected_cb")] internal static extern ErrorCode AittPluginServerRemoveDisconnectedCb(ServerSafeHandle server, AittPluginServerDisconnectedCb cb); - [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_set_on_demand_launch_enabled")] - internal static extern ErrorCode AittPluginServerSetOnDemandLaunchEnabled(ServerSafeHandle server, bool enable); - [DllImport(Libraries.AittPlugin, EntryPoint = "aitt_plugin_server_set_display_name")] internal static extern ErrorCode AittPluginServerSetDisplayName(ServerSafeHandle server, string displayName); } diff --git a/idlc/gen_cion/cs_cion_stub_gen.cc b/idlc/gen_cion/cs_cion_stub_gen.cc index 82f24d4..652defd 100644 --- a/idlc/gen_cion/cs_cion_stub_gen.cc +++ b/idlc/gen_cion/cs_cion_stub_gen.cc @@ -78,6 +78,7 @@ void CsCionStubGen::GenInterface(std::ofstream& stream, const Interface& iface) GenShareFile(stream, iface, false); GenCtor(stream, iface); GenCommonMethods(stream); + GenExtraMethods(stream); }); } @@ -291,4 +292,8 @@ void CsCionStubGen::GenCommonMethods(std::ofstream& stream) { stream << CB_COMMON_METHODS; } +void CsCionStubGen::GenExtraMethods(std::ofstream& stream) { + stream << GetTransportable().Cs().GenServerExtraBody(); +} + } // namespace tidl diff --git a/idlc/gen_cion/cs_cion_stub_gen.h b/idlc/gen_cion/cs_cion_stub_gen.h index 20d3b85..b794d4a 100644 --- a/idlc/gen_cion/cs_cion_stub_gen.h +++ b/idlc/gen_cion/cs_cion_stub_gen.h @@ -45,6 +45,7 @@ class CsCionStubGen : public CsCionGeneratorBase { void GenDisconnectedEvent(std::ofstream& stream); void GenCtor(std::ofstream& stream, const Interface& iface); void GenCommonMethods(std::ofstream& stream); + void GenExtraMethods(std::ofstream& stream); void GenDeclarations(std::ofstream& stream, const Declarations& decls); void GenSyncInvocation(std::ofstream& stream, const Declaration& decl); void GenAsyncInvocation(std::ofstream& stream, const Declaration& decl); diff --git a/idlc/gen_cion/cs_cion_stub_gen_cb.h b/idlc/gen_cion/cs_cion_stub_gen_cb.h index 056c385..b7870bb 100644 --- a/idlc/gen_cion/cs_cion_stub_gen_cb.h +++ b/idlc/gen_cion/cs_cion_stub_gen_cb.h @@ -336,19 +336,6 @@ R"__cs_cb( } /// - /// Sets ondemand launch enabled flag. - /// - /// Whether ondemand launch is enabled or not. - /// - /// Thrown when an application does not have the privilege to access this method. - /// - /// http://tizen.org/privilege/d2d.remotelaunch - public new void SetOndemandLaunchEnabled(bool enable) - { - base.SetOndemandLaunchEnabled(enable); - } - - /// /// Gets service objects which are connected /// /// The enumerable service objects which are connected @@ -358,7 +345,6 @@ R"__cs_cb( } )__cs_cb"; - constexpr const char CB_INVOCATION_RESULT_PRE[] = R"__cs_cb( result.WriteInt((int)MethodId.__Result); diff --git a/idlc/gen_cion/default_cs_transportable.cc b/idlc/gen_cion/default_cs_transportable.cc index 68b26eb..d73e24b 100644 --- a/idlc/gen_cion/default_cs_transportable.cc +++ b/idlc/gen_cion/default_cs_transportable.cc @@ -69,6 +69,22 @@ R"__cs_cb( } )__cs_cb"; +constexpr const char __SERVER_EXTRA_METHOD[] = +R"__cs_cb( + /// + /// Sets ondemand launch enabled flag. + /// + /// Whether ondemand launch is enabled or not. + /// + /// Thrown when an application does not have the privilege to access this method. + /// + /// http://tizen.org/privilege/d2d.remotelaunch + public new void SetOndemandLaunchEnabled(bool enable) + { + base.SetOndemandLaunchEnabled(enable); + } +)__cs_cb"; + constexpr int TAB_SIZE = 2; } // namespace @@ -121,7 +137,7 @@ std::string DefaultCsTransportable::GenServerExtraHeader() const { } std::string DefaultCsTransportable::GenServerExtraBody() const { - return ""; + return __SERVER_EXTRA_METHOD; } std::string DefaultCsTransportable::GenPayloadTypeData() const { -- 2.7.4