diff options
author | Kim Kibum <kb0929.kim@samsung.com> | 2012-06-08 14:53:59 +0900 |
---|---|---|
committer | Kim Kibum <kb0929.kim@samsung.com> | 2012-06-08 14:53:59 +0900 |
commit | bed963b6c4431be5d3ce04131683172cc43675ea (patch) | |
tree | 9c7c66c8eebfe59978e8295758a1cf38ecf659d1 /src/include/download-provider-network.h | |
parent | 6d4c001b680c399f750cd71eabc18d5bd39ae1ee (diff) | |
download | download-provider-bed963b6c4431be5d3ce04131683172cc43675ea.tar.gz download-provider-bed963b6c4431be5d3ce04131683172cc43675ea.tar.bz2 download-provider-bed963b6c4431be5d3ce04131683172cc43675ea.zip |
apply FSL(Flora Software License)
Diffstat (limited to 'src/include/download-provider-network.h')
-rw-r--r-- | src/include/download-provider-network.h | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/src/include/download-provider-network.h b/src/include/download-provider-network.h new file mode 100644 index 0000000..2d0f5eb --- /dev/null +++ b/src/include/download-provider-network.h @@ -0,0 +1,57 @@ +/* + * Copyright 2012 Samsung Electronics Co., Ltd + * + * Licensed under the Flora License, Version 1.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.tizenopensource.org/license + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file download-provider-network.h + * @author Jungki Kwak (jungki.kwak@samsung.com) + * @brief Download netowkr manager + */ + +#ifndef DOWNLOAD_PROVIDER_NETWORK_H +#define DOWNLOAD_PROVIDER_NETWORK_H + +#include "vconf.h" +#include "vconf-keys.h" +#include "download-provider-event.h" + +class NetMgr { +public: + static NetMgr& getInstance(void) { + static NetMgr inst; + return inst; + } + void initNetwork(void); + void deinitNetwork(void); + void netStatusChanged(void); + void netConfigChanged(void); + inline void subscribe(Observer *o) { m_subject.attach(o); } + inline void deSubscribe(Observer *o) { m_subject.detach(o); } + static void netStatusChangedCB(keynode_t *keynode, void *data); + static void netConfigChangedCB(keynode_t *keynode, void *data); +private: + NetMgr(void); + ~NetMgr(void); + int getConnectionState(void); + int getCellularStatus(void); + int getWifiStatus(void); + void getProxy(void); + void getIPAddress(void); + inline void notify() { m_subject.notify(); } + int m_netStatus; + Subject m_subject; +}; + +#endif |