[Fix] Use localtime_r() instead of localtime()
[platform/core/connectivity/stc-manager.git] / unittest / stcmgr.h
1 /*
2  * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16 #ifndef __STC_MGR_H__
17 #define __STC_MGR_H__
18
19 #include <glib.h>
20
21 #define APP_ID_LEN 128
22 #define IFNAME_LEN 16
23 #define SUBSCRIBER_ID_LEN 128
24
25 #ifdef USE_DLOG
26 #include <dlog.h>
27 #undef LOG_TAG
28 #define LOG_TAG "STC_GTEST"
29 #define GLOGD(format, args...)  LOGD(format, ##args)
30 #else
31 #define GLOGD(format, args...)
32 #endif
33
34 typedef enum {
35         ERROR_NONE = 0,
36         ERROR_NOT_PERMITTED = -1,
37         ERROR_OUT_OF_MEMORY = -2,
38         ERROR_PERMISSION_DENIED = -3,
39         ERROR_RESOURCE_BUSY = -4,
40         ERROR_INVALID_OPERATION = -5,
41         ERROR_INVALID_PARAMETER = -6,
42         ERROR_NOT_SUPPORTED = -7,
43         ERROR_OPERATION_FAILED = -8,
44         ERROR_NOT_INITIALIZED = -9,
45         ERROR_ALREADY_INITIALIZED = -10,
46         ERROR_IN_PROGRESS = -11,
47 } error_e;
48
49 typedef enum {
50         IFACE_UNKNOWN,
51         IFACE_DATACALL,
52         IFACE_WIFI,
53         IFACE_WIRED,
54         IFACE_BLUETOOTH,
55         IFACE_ALL,
56 } iface_type_e;
57
58 typedef enum {
59         ROAMING_UNKNOWN,
60         ROAMING_ENABLED,
61         ROAMING_DISABLED,
62 } roaming_type_e;
63
64 typedef enum {
65         TIME_PERIOD_UNKNOWN = 0,
66         TIME_PERIOD_HOUR = 3600,
67         TIME_PERIOD_DAY = 86400,
68         TIME_PERIOD_WEEK = 604800,
69         TIME_PERIOD_MONTH = 2419200,
70 } time_period_e;
71
72 #endif /* __STC_MGR_H__ */