Release Tizen2.0 beta
[framework/location/libslp-location.git] / location / module / module-internal.h
1 /*
2  * libslp-location
3  *
4  * Copyright (c) 2010-2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Youngae Kang <youngae.kang@samsung.com>, Yunhan Kim <yhan.kim@samsung.com>,
7  *          Genie Kim <daejins.kim@samsung.com>, Minjune Kim <sena06.kim@samsung.com>
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  * http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  */
21
22 #ifndef __MODULE_INTERNAL_H__
23 #define __MODULE_INTERNAL_H__
24
25 #include <gmodule.h>
26 #include "location-module.h"
27
28 /**
29  * @file module-internal.h
30  * @brief This file contains the internal definitions and structures related to module.
31  */
32
33 typedef struct{
34         GModule* module;
35         char* name;
36         char* path;
37 } GMod;
38
39 typedef struct{
40         GMod* gmod;
41         gpointer handler;
42         gpointer (*init)(LocModServiceOps* ops);
43         void (*shutdown)(gpointer handle);
44         LocModServiceOps ops;
45 } LocationServiceMod;
46
47 typedef struct{
48         GMod* gmod;     
49         gpointer handler;
50         gpointer (*init)(LocModGpsOps* ops);
51         void (*shutdown)(gpointer handle);
52         LocModGpsOps ops;
53 } LocationGpsMod;
54
55 typedef struct{
56         GMod* gmod;     
57         gpointer handler;
58         gpointer (*init)(LocModWpsOps* ops);
59         void (*shutdown)(gpointer handle);
60         LocModWpsOps ops;
61 } LocationWpsMod;
62
63 typedef struct{
64         GMod* gmod;     
65         gpointer handler;
66         gpointer (*init)(LocModCpsOps* ops);
67         void (*shutdown)(gpointer handle);
68         LocModCpsOps ops;
69 } LocationCpsMod;
70
71 G_BEGIN_DECLS
72
73 gboolean module_init(void);
74 gpointer module_new(const char* module_name);
75 void module_free(gpointer mod, const char* module_name);
76 gboolean module_is_supported(const char *module_name);
77 gchar *mod_get_realpath(const gchar *module_name);
78         
79 G_END_DECLS
80
81 #endif