2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.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.tizenopensource.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.
18 * @file download-provider-network.h
19 * @author Jungki Kwak (jungki.kwak@samsung.com)
20 * @brief Download netowkr manager
23 #ifndef DOWNLOAD_PROVIDER_NETWORK_H
24 #define DOWNLOAD_PROVIDER_NETWORK_H
27 #include "vconf-keys.h"
28 #include "download-provider-event.h"
32 static NetMgr& getInstance(void) {
36 void initNetwork(void);
37 void deinitNetwork(void);
38 void netStatusChanged(void);
39 void netConfigChanged(void);
40 inline void subscribe(Observer *o) { m_subject.attach(o); }
41 inline void deSubscribe(Observer *o) { m_subject.detach(o); }
42 static void netStatusChangedCB(keynode_t *keynode, void *data);
43 static void netConfigChangedCB(keynode_t *keynode, void *data);
47 int getConnectionState(void);
48 int getCellularStatus(void);
49 int getWifiStatus(void);
51 void getIPAddress(void);
52 inline void notify() { m_subject.notify(); }