Git init
[framework/location/libslp-location.git] / location / location-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 __LOCATION_MODULE_INTERNAL_H__
23 #define __LOCATION_MODULE_INTERNAL_H__
24
25 #include <gmodule.h>
26 #include "location/location-module.h"
27
28 /**
29  * @file location-module-internal.h
30  * @brief This file contains the internal definitions and structures related to module.
31  * @addtogroup LocationInternal
32  * @{
33  * @}
34  */
35
36 typedef struct{
37         GModule* module;
38         char* name;
39         char* path;     
40 } GMod;
41
42 typedef struct{
43         GMod* gmod;
44         gpointer handler;
45         gpointer (*init)(LocModGeoOps* ops);
46         void (*shutdown)(gpointer handle);
47         LocModGeoOps ops;
48 } LocationGeoMod;
49
50 typedef struct{
51         GMod* gmod;
52         gpointer handler;
53         gpointer (*init)(LocModPoiOps* ops);
54         void (*shutdown)(gpointer handle);
55         LocModPoiOps ops;
56 } LocationPoiMod;
57
58 typedef struct{
59         GMod* gmod;     
60         gpointer handler;
61         gpointer (*init)(LocModGpsOps* ops);
62         void (*shutdown)(gpointer handle);
63         LocModGpsOps ops;
64 } LocationGpsMod;
65
66 typedef struct{
67         GMod* gmod;     
68         gpointer handler;
69         gpointer (*init)(LocModWpsOps* ops);
70         void (*shutdown)(gpointer handle);
71         LocModWpsOps ops;
72 } LocationWpsMod;
73
74 typedef struct{
75         GMod* gmod;     
76         gpointer handler;
77         gpointer (*init)(LocModCpsOps* ops);
78         void (*shutdown)(gpointer handle);
79         LocModCpsOps ops;
80 } LocationCpsMod;
81
82 typedef struct{
83         GMod* gmod;
84         gpointer handler;
85         gpointer (*init)(LocModIpsOps* ops);
86         void (*shutdown)(gpointer handle);
87         LocModIpsOps ops;
88 } LocationIpsMod;
89
90 typedef struct{
91         GMod* gmod;
92         gpointer handler;
93         gpointer (*init)(LocModSpsOps* ops);
94         void (*shutdown)(gpointer handle);
95         LocModSpsOps ops;
96 } LocationSpsMod;
97
98 G_BEGIN_DECLS
99
100 gboolean module_init(void);
101 gpointer module_new(const char* module_name);
102 void module_free(gpointer mod, const char* module_name);
103         
104 G_END_DECLS
105
106 #endif