[aitt] Remove ondemand related API 71/280571/3
authorSangyoon Jang <jeremy.jang@samsung.com>
Thu, 1 Sep 2022 01:52:19 +0000 (10:52 +0900)
committerSangyoon Jang <jeremy.jang@samsung.com>
Thu, 1 Sep 2022 02:09:47 +0000 (11:09 +0900)
Change-Id: If81bc83714d7a95e8cf693a5bb8b9803ae106888
Signed-off-by: Sangyoon Jang <jeremy.jang@samsung.com>
idlc/gen_aitt_plugin/aitt_plugin_cs_base_gen_cb.h
idlc/gen_aitt_plugin/aitt_plugin_cs_interop_gen_cb.h
idlc/gen_cion/cs_cion_stub_gen.cc
idlc/gen_cion/cs_cion_stub_gen.h
idlc/gen_cion/cs_cion_stub_gen_cb.h
idlc/gen_cion/default_cs_transportable.cc

index 95ddc9d..74f9093 100644 (file)
@@ -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);
index 6b3bb56..fd2e35b 100644 (file)
@@ -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);
     }
index 82f24d4..652defd 100644 (file)
@@ -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
index 20d3b85..b794d4a 100644 (file)
@@ -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);
index 056c385..b7870bb 100644 (file)
@@ -336,19 +336,6 @@ R"__cs_cb(
             }
 
             /// <summary>
-            /// Sets ondemand launch enabled flag.
-            /// </summary>
-            /// <param name="enable">Whether ondemand launch is enabled or not.</param>
-            /// <exception cref="UnauthorizedAccessException">
-            /// Thrown when an application does not have the privilege to access this method.
-            /// </exception>
-            /// <privilege>http://tizen.org/privilege/d2d.remotelaunch</privilege>
-            public new void SetOndemandLaunchEnabled(bool enable)
-            {
-                base.SetOndemandLaunchEnabled(enable);
-            }
-
-            /// <summary>
             /// Gets service objects which are connected
             /// </summary>
             /// <returns>The enumerable service objects which are connected</returns>
@@ -358,7 +345,6 @@ R"__cs_cb(
             }
 )__cs_cb";
 
-
 constexpr const char CB_INVOCATION_RESULT_PRE[] =
 R"__cs_cb(
 result.WriteInt((int)MethodId.__Result);
index 68b26eb..d73e24b 100644 (file)
@@ -69,6 +69,22 @@ R"__cs_cb(
             }
 )__cs_cb";
 
+constexpr const char __SERVER_EXTRA_METHOD[] =
+R"__cs_cb(
+            /// <summary>
+            /// Sets ondemand launch enabled flag.
+            /// </summary>
+            /// <param name="enable">Whether ondemand launch is enabled or not.</param>
+            /// <exception cref="UnauthorizedAccessException">
+            /// Thrown when an application does not have the privilege to access this method.
+            /// </exception>
+            /// <privilege>http://tizen.org/privilege/d2d.remotelaunch</privilege>
+            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 {