2 * Copyright (c) 2014 Samsung Electronics Co., Ltd. All rights reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef MMS_PLUGIN_CONNMAN_H
18 #define MMS_PLUGIN_CONNMAN_H
21 #include "net_connection.h"
28 class MmsPluginCmAgent {
30 static MmsPluginCmAgent *instance();
35 bool getCmStatus() { return isCmOpened; }
37 void connection_profile_open_callback(connection_error_e result, void* user_data);
38 void connection_profile_close_callback(connection_error_e result, void* user_data);
39 void connection_profile_state_changed_cb(connection_profile_state_e state, void* user_data);
40 bool getInterfaceName(const char **deviceName);
41 bool getProxyAddr(const char **proxyAddr);
42 bool getHomeUrl(const char **homeURL);
43 bool getDnsAddrList(const char **dnsAddrList);
49 static MmsPluginCmAgent *pInstance;
51 void lock() { mx.lock(); }
52 void unlock() { mx.unlock(); }
53 void signal() { cv.signal(); }
55 void setCmStatus() { isCmOpened = true; }
56 void resetCmStatus() { isCmOpened = false; }
58 bool isCmOpened; /* connection & profile connect */
63 char *dns_address_list;
68 #endif /* MMS_PLUGIN_CONNMAN_H */