Removed Glib connected functions from API 36/40336/1
authorJan Olszak <j.olszak@samsung.com>
Tue, 2 Jun 2015 12:16:43 +0000 (14:16 +0200)
committerJan Olszak <j.olszak@samsung.com>
Tue, 2 Jun 2015 12:16:43 +0000 (14:16 +0200)
[Feature]       N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, run all tests

Change-Id: I3fe5e789535fcb53ee5d223172cb63bd44fb962c

cli/command-line-interface.cpp
client/vasum-client-impl.cpp
client/vasum-client-impl.hpp
client/vasum-client.cpp
client/vasum-client.h
wrapper/wrapper.cpp

index 2ae3778..2393ce1 100644 (file)
@@ -58,11 +58,6 @@ void one_shot(const function<VsmStatus(VsmClient)>& fun)
     VsmStatus status;
     VsmClient client;
 
-    status = vsm_start_glib_loop();
-    if (VSMCLIENT_SUCCESS != status) {
-        throw runtime_error("Can't start glib loop");
-    }
-
     client = vsm_client_create();
     if (NULL == client) {
         msg = "Can't create client";
@@ -83,7 +78,6 @@ void one_shot(const function<VsmStatus(VsmClient)>& fun)
 
 finish:
     vsm_client_free(client);
-    vsm_stop_glib_loop();
     if (! msg.empty()) {
         throw runtime_error(msg);
     }
index 38e4c5a..f87e9a0 100644 (file)
@@ -127,18 +127,6 @@ bool readFirstLineOfFile(const string& path, string& ret)
 
 } //namespace
 
-VsmStatus Client::vsm_start_glib_loop() noexcept
-{
-    // TPDP: Remove vsm_start_glib_loop from API
-    return VSMCLIENT_SUCCESS;
-}
-
-VsmStatus Client::vsm_stop_glib_loop() noexcept
-{
-    // TPDP: Remove vsm_stop_glib_loop from API
-    return VSMCLIENT_SUCCESS;
-}
-
 Client::Status::Status()
     : mVsmStatus(VSMCLIENT_SUCCESS), mMsg()
 {
index 86f7a5e..5a1d2fd 100644 (file)
@@ -336,15 +336,6 @@ public:
      */
     VsmStatus vsm_del_notification_callback(VsmSubscriptionId subscriptionId) noexcept;
 
-    /**
-     *  @see ::vsm_start_glib_loop
-     */
-    static VsmStatus vsm_start_glib_loop() noexcept;
-
-    /**
-     *  @see ::vsm_stop_glib_loop
-     */
-    static VsmStatus vsm_stop_glib_loop() noexcept;
 private:
     typedef vasum::client::HostIPCConnection HostConnection;
     struct Status {
index b1028e2..1d5664c 100644 (file)
@@ -45,17 +45,6 @@ Client& getClient(VsmClient client)
 
 } // namespace
 
-/* external */
-API VsmStatus vsm_start_glib_loop()
-{
-    return Client::vsm_start_glib_loop();
-}
-
-API VsmStatus vsm_stop_glib_loop()
-{
-    return Client::vsm_stop_glib_loop();
-}
-
 API VsmClient vsm_client_create()
 {
     Client* clientPtr = new(nothrow) Client();
index 6c68fe2..7a98fa7 100644 (file)
@@ -34,12 +34,6 @@ int main(int argc, char** argv)
     VsmArrayString values = NULL;
     int ret = 0;
 
-    status = vsm_start_glib_loop(); // start glib loop (if not started any yet)
-    if (VSMCLIENT_SUCCESS != status) {
-        // error!
-        return 1;
-    }
-
     client = vsm_client_create(); // create client handle
     if (NULL == client) {
         // error!
@@ -69,7 +63,6 @@ int main(int argc, char** argv)
 finish:
     vsm_array_string_free(values); // free memory
     vsm_client_free(client); // destroy client handle
-    vsm_stop_glib_loop(); // stop the glib loop (use only with vsm_start_glib_loop)
     return ret;
 }
  @endcode
@@ -188,24 +181,6 @@ typedef enum {
 } VsmFileType;
 
 #ifndef __VASUM_WRAPPER_SOURCE__
-/**
- * Start glib loop.
- *
- * Do not call this function if an application creates a glib loop itself.
- * Otherwise, call it before any other function from this library.
- *
- * @return status of this function call
- */
-VsmStatus vsm_start_glib_loop();
-
-/**
- * Stop glib loop.
- *
- * Call only if vsm_start_glib_loop() was called.
- *
- * @return status of this function call
- */
-VsmStatus vsm_stop_glib_loop();
 
 /**
  * Create a new vasum-server's client.
index 5623263..8b890cf 100644 (file)
@@ -54,7 +54,6 @@ struct WrappedContext
 static struct
 {
     int done;
-    int glib_stop;
 } wrap;
 
 
@@ -90,8 +89,6 @@ void wrapper_load(void)
 
 void wrapper_unload(void)
 {
-    if (wrap.glib_stop) Client::vsm_stop_glib_loop();
-    wrap.glib_stop = 0;
     LOGI("wrapper_unload");
 }
 
@@ -153,8 +150,6 @@ static int wrap_error(VsmStatus st, const Client *c)
 
 static void init_context_wrap(WrappedContext *w)
 {
-    Client::vsm_start_glib_loop();
-    wrap.glib_stop = 1;
     w->client = new Client();
     VsmStatus st = w->client->createSystem();
     wrap_error(st, w->client);