2 * Copyright 2012-2013 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.1 (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://floralicense.org/license/
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
20 #include <network-cm-intf.h>
21 #include <network-pm-intf.h>
24 class MmsPluginCmAgent
27 static MmsPluginCmAgent *instance();
29 /* open and close are occasionally called when transaction begins and ends */
33 bool getCmStatus() { return isCmOpened; }
35 void processCBdatas(net_event_info_t *event_cb, void *user_data);
37 bool getDeviceName(char *deviceName);
38 bool getHomeURL(char *homeURL);
39 bool getProxyAddr(char *proxyAddr);
46 static MmsPluginCmAgent *pInstance;
48 /* register/deregister is called once at initialization/finalization of MMS plugin */
50 void deregistration();
53 void lock() { mx.lock(); }
54 void unlock() { mx.unlock(); }
55 void signal() { cv.signal(); }
56 void setCmStatus() { isCmOpened = true; }
57 void resetCmStatus() { isCmOpened = false; }
59 // shared variable between CmAgent and Dnet callback
64 net_profile_info_t mmsProfile;
67 #endif //MMS_PLUGIN_CONNMAN_H