desc: send a notification when modem is powered on
authorCaiwen Zhang <caiwen.zhang@intel.com>
Fri, 15 Mar 2013 00:23:10 +0000 (08:23 +0800)
committerwootak.jung <wootak.jung@samsung.com>
Sun, 24 Mar 2013 07:46:41 +0000 (16:46 +0900)
Change-Id: I1801de5a0a1060f8e6f53da9f16a661d831f6438

src/desc.c

index 52181b1..aacc67d 100644 (file)
@@ -28,6 +28,7 @@
 #include <core_object.h>
 #include <hal.h>
 #include <at.h>
+#include <server.h>
 
 #include "s_network.h"
 #include "s_modem.h"
@@ -41,6 +42,7 @@
 #include "s_phonebook.h"
 #include "s_gps.h"
 
+
 static gboolean on_load()
 {
        dbg("i'm load!");
@@ -225,6 +227,7 @@ struct object_deinitializer deinit_table = {
 
 static gboolean on_init(TcorePlugin *p)
 {
+       CoreObject *co_modem;
        if (!p)
                return FALSE;
 
@@ -235,7 +238,8 @@ static gboolean on_init(TcorePlugin *p)
        }
 
        dbg("i'm init!");
-
+       co_modem = tcore_plugin_ref_core_object(p, CORE_OBJECT_TYPE_MODEM);
+       tcore_server_send_notification(tcore_plugin_ref_server(p), co_modem, TNOTI_MODEM_ADDED, 0, NULL);
        modem_subscribe_events(p);
 
        return TRUE;