2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
18 * @file FNet_NetUtility.h
19 * @brief This is the header file for the %_NetUtility class.
21 * This header file contains the declarations of the %_NetUtility class.
24 #ifndef _FNET_INTERNAL_NET_UTILITY_H_
25 #define _FNET_INTERNAL_NET_UTILITY_H_
27 #include <net_connection.h>
28 #include <tethering.h>
29 #include <unique_ptr.h>
30 #include <FBaseDataType.h>
32 namespace Tizen { namespace Base { namespace Runtime
35 } } } // Tizen::Base::Runtime
37 namespace Tizen { namespace Net
42 void operator()(char* pChar)
48 struct _ConnectionDeleter
50 void operator()(void* pConnection)
52 connection_destroy(pConnection);
56 struct _ProfileDeleter
58 void operator()(void* pProfile)
60 connection_profile_destroy(pProfile);
64 struct _TetheringDeleter
66 void operator()(void* pTethering)
68 tethering_destroy(pTethering);
73 struct _ProfileIteratorDeleter
75 void operator()(void* pIterator)
77 connection_destroy_profile_iterator(pIterator);
81 struct _CollectionDeleter
83 template<typename Collection>
84 void operator()(Collection* pCollection)
86 pCollection->RemoveAll(true);
94 static Tizen::Base::Runtime::Mutex* GetLock(void);
98 * This is the default constructor for this class.
103 * This is the destructor for this class.
105 virtual ~_NetUtility(void);
107 _NetUtility(const _NetUtility& rhs);
108 _NetUtility& operator =(const _NetUtility& rhs);
110 static void InitLock(void);
113 static Tizen::Base::Runtime::Mutex* __pLock;
118 #endif // _FNET_INTERNAL_NET_UTILITY_H_