Modified to get current time to match stc
[platform/core/connectivity/net-config.git] / include / neterror.h
1 /*
2  * Network Configuration Module
3  *
4  * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  */
19
20 #ifndef __NETCONFIG_ERROR_H__
21 #define __NETCONFIG_ERROR_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #include "glib.h"
28 #include <gio/gio.h>
29 #include <glib-object.h>
30
31 #ifndef EXPORT_SYM
32 #define EXPORT_SYM __attribute__((__visibility__("default")))
33 #endif
34
35 #define NETCONFIG_ERROR_QUARK (netconfig_error_quark())
36 #define NETCONFIG_CONNMAN_AGENT_ERROR_QUARK (netconfig_connman_agent_error_quark())
37
38 typedef enum {
39         NETCONFIG_NO_ERROR                              = 0x00,
40         NETCONFIG_ERROR_INTERNAL                = 0x01,
41         NETCONFIG_ERROR_NO_SERVICE              = 0x02,
42         NETCONFIG_ERROR_TRASPORT                = 0x03,
43         NETCONFIG_ERROR_NO_PROFILE              = 0x04,
44         NETCONFIG_ERROR_WRONG_PROFILE   = 0x05,
45         NETCONFIG_ERROR_INPROGRESS              = 0x06,
46         NETCONFIG_ERROR_ALREADYEXISTS   = 0x07,
47         NETCONFIG_ERROR_INVALID_PARAMETER               = 0x08,
48         NETCONFIG_ERROR_PERMISSION_DENIED               = 0x09,
49         NETCONFIG_ERROR_WIFI_DRIVER_FAILURE             = 0x0A,
50         NETCONFIG_ERROR_FAILED_GET_IMSI                 = 0x0B,
51         NETCONFIG_ERROR_FAILED_REQ_SIM_AUTH             = 0x0C,
52         NETCONFIG_ERROR_FAILED_REQ_SIM_AUTH_WRONG_PARAM         = 0x0D,
53         NETCONFIG_ERROR_FAILED_GET_SIM_AUTH_WRONG_DATA          = 0x0E,
54         NETCONFIG_ERROR_FAILED_GET_SIM_AUTH_DELAY                       = 0x0F,
55         NETCONFIG_ERROR_FAILED_REQ_AKA_AUTH                                     = 0x10,
56         NETCONFIG_ERROR_MAX                                                                     = 0x11,
57 } netconfig_error_e;
58
59 void netconfig_error_no_profile(GDBusMethodInvocation *context);
60 void netconfig_error_inprogress(GDBusMethodInvocation *context);
61 void netconfig_error_already_exists(GDBusMethodInvocation *context);
62 void netconfig_error_invalid_parameter(GDBusMethodInvocation *context);
63 void netconfig_error_permission_denied(GDBusMethodInvocation *context);
64 void netconfig_error_wifi_driver_failed(GDBusMethodInvocation *context);
65 void netconfig_error_wifi_direct_failed(GDBusMethodInvocation *context);
66 void netconfig_error_fail_get_imsi(GDBusMethodInvocation *context);
67 void netconfig_error_fail_req_sim_auth(GDBusMethodInvocation *context);
68 void netconfig_error_fail_req_sim_auth_wrong_param(GDBusMethodInvocation *context);
69 void netconfig_error_fail_get_sim_auth_wrong_data(GDBusMethodInvocation *context);
70 void netconfig_error_fail_get_sim_auth_delay(GDBusMethodInvocation *context);
71 void netconfig_error_fail_save_congifuration(GDBusMethodInvocation *context);
72 void netconfig_error_fail_ethernet_cable_state(GDBusMethodInvocation *context);
73 void netconfig_error_fail_preferred_ipv6_address(GDBusMethodInvocation *context);
74 void netconfig_error_dbus_method_return(GDBusMethodInvocation *context, netconfig_error_e error, const gchar *message);
75
76 void netconfig_error_init(void);
77
78 #ifdef __cplusplus
79 }
80 #endif
81
82 #endif /* __NETCONFIG_ERROR_H__ */