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
31 static MmsPluginCmAgent *instance();
36 bool getCmStatus() { return isCmOpened; }
38 void connection_profile_open_callback(connection_error_e result, void* user_data);
39 void connection_profile_close_callback(connection_error_e result, void* user_data);
40 void connection_profile_state_changed_cb(connection_profile_state_e state, void* user_data);
41 bool getInterfaceName(const char **deviceName);
42 bool getProxyAddr(const char **proxyAddr);
43 bool getHomeUrl(const char **homeURL);
48 static MmsPluginCmAgent *pInstance;
50 void lock() { mx.lock(); }
51 void unlock() { mx.unlock(); }
52 void signal() { cv.signal(); }
54 void setCmStatus() { isCmOpened = true; }
55 void resetCmStatus() { isCmOpened = false; }
57 bool isCmOpened; //connection & profile connect
67 #endif //MMS_PLUGIN_CONNMAN_H