#include <glib.h>
#include <tcore.h>
-#include <hal.h>
-#include <core_object.h>
+#include <server.h>
#include <plugin.h>
-#include <queue.h>
+#include <core_object.h>
#include <co_network.h>
-#include <server.h>
-
-#include "at.h"
-#include "user_request.h"
#include "at_network.h"
.get_mode = NULL,
};
-gboolean at_network_init(TcorePlugin *plugin)
+gboolean at_network_init(TcorePlugin *cp)
{
CoreObject *co;
+ Server *server;
- co = tcore_network_new(plugin, "umts_network", &network_ops, NULL);
- if (NULL == co)
+ co = tcore_network_new(cp, &network_ops, NULL);
+ if (co == NULL)
return FALSE;
+ server = tcore_plugin_ref_server(cp);
+ tcore_server_add_template_object(server, co);
+
return TRUE;
}
-void at_network_exit(TcorePlugin *plugin)
+void at_network_exit(TcorePlugin *cp)
{
CoreObject *co;
- if (NULL == plugin)
+ if (cp == NULL)
return;
- co = tcore_plugin_ref_core_object(plugin, "umts_network");
- if (NULL == co)
+ co = tcore_plugin_ref_core_object(cp, CORE_OBJECT_TYPE_NETWORK);
+ if (co == NULL)
return;
- tcore_network_free(co);
+ tcore_object_free(co);
}