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-manager-network.h
19 * @author Jungki Kwak (jungki.kwak@samsung.com)
20 * @brief Download netowkr manager
23 #ifndef DOWNLOAD_MANAGER_NETWORK_H
24 #define DOWNLOAD_MANAGER_NETWORK_H
26 #include "net_connection.h"
27 #include "download-manager-event.h"
31 static NetMgr& getInstance(void) {
35 void initNetwork(void);
36 void deinitNetwork(void);
37 inline void subscribe(Observer *o) { m_subject.attach(o); }
38 inline void deSubscribe(Observer *o) { m_subject.detach(o); }
39 static void netTypeChangedCB(connection_type_e type, void *data);
40 static void netConfigChangedCB(const char *ip,
41 const char *ipv6, void *data);
45 void netTypeChanged(void);
46 void netConfigChanged(string ip);
47 int getConnectionState(void);
48 int getCellularStatus(void);
49 int getWifiStatus(void);
51 void getIPAddress(void);
52 inline void notify(void) { m_subject.notify(); }
55 connection_h m_handle;