Add LCOV remarkers to increase line coverage rate
[platform/core/api/maps-service.git] / src / plugin / discovery.h
1 /*
2  * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __MAPS_SERVICE_PLUGIN_DISCOVERY_H__
18 #define __MAPS_SERVICE_PLUGIN_DISCOVERY_H__
19
20 #include "maps_util.h"
21
22 //LCOV_EXCL_START
23 namespace plugin
24 {
25
26         class provider_info
27         {
28         public:
29                 string provider;
30                 string file;
31         public:
32                 static provider_info empty_instance;
33         public:
34                 provider_info();
35                 provider_info(const string &provider, const string &file);
36                 provider_info(const provider_info &src);
37                 virtual ~provider_info()
38                 {
39                 };
40         public:
41                  provider_info & operator=(const provider_info &src);
42                 /* operator maps_provider_info_h() const; */
43         public:
44                 void construct(const string &provider, const string &file);
45                 bool empty() const;
46         };
47
48         class discovery
49         {
50         public:
51                 discovery();
52                 virtual ~discovery();
53         public:
54                 vector<provider_info> get_available_list() const;
55         private:
56                  vector<string> get_module_file_list() const;
57         };
58
59         provider_info find_by_names(const string &provider);
60         void split_provider_name(const char *original, char **provider, char **module);
61
62         void user_consent_cb(bool consented, const char *provider, void *user_data);
63         int request_user_consent(const char *maps_provider, void* callback, void *user_data);
64 }
65 //LCOV_EXCL_STOP
66
67 #endif                          /* __MAPS_SERVICE_PLUGIN_DISCOVERY_H__ */