fix 7bit character conversion
[project/uqmi.git] / qmi-errors.h
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * libqmi-glib -- GLib/GIO based library to control QMI devices
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the
17  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301 USA.
19  *
20  * Copyright (C) 2012 Aleksander Morgado <aleksander@lanedo.com>
21  */
22
23 #ifndef _LIBQMI_GLIB_QMI_ERRORS_H_
24 #define _LIBQMI_GLIB_QMI_ERRORS_H_
25
26 /**
27  * SECTION: qmi-errors
28  * @title: Errors
29  *
30  * This section defines common error types used in the interface.
31  */
32
33 /**
34  * QmiCoreError:
35  * @QMI_CORE_ERROR_FAILED: Operation failed.
36  * @QMI_CORE_ERROR_WRONG_STATE: Operation cannot be executed in the current state.
37  * @QMI_CORE_ERROR_TIMEOUT: Operation timed out.
38  * @QMI_CORE_ERROR_INVALID_ARGS: Invalid arguments given.
39  * @QMI_CORE_ERROR_INVALID_MESSAGE: QMI message is invalid.
40  * @QMI_CORE_ERROR_TLV_NOT_FOUND: TLV not found.
41  * @QMI_CORE_ERROR_TLV_TOO_LONG: TLV is too long.
42  * @QMI_CORE_ERROR_UNSUPPORTED: Not supported.
43  *
44  * Common errors that may be reported by libqmi-glib.
45  */
46 typedef enum { /*< underscore_name=qmi_core_error >*/
47     QMI_CORE_ERROR_FAILED           = 0, /*< nick=Failed >*/
48     QMI_CORE_ERROR_WRONG_STATE      = 1, /*< nick=WrongState >*/
49     QMI_CORE_ERROR_TIMEOUT          = 2, /*< nick=Timeout >*/
50     QMI_CORE_ERROR_INVALID_ARGS     = 3, /*< nick=InvalidArgs >*/
51     QMI_CORE_ERROR_INVALID_MESSAGE  = 4, /*< nick=InvalidMessage >*/
52     QMI_CORE_ERROR_TLV_NOT_FOUND    = 5, /*< nick=TlvNotFound >*/
53     QMI_CORE_ERROR_TLV_TOO_LONG     = 6, /*< nick=TlvTooLong >*/
54     QMI_CORE_ERROR_UNSUPPORTED      = 7  /*< nick=Unsupported >*/
55 } QmiCoreError;
56
57 /**
58  * QmiProtocolError:
59   * @QMI_PROTOCOL_ERROR_NONE: No error.
60   * @QMI_PROTOCOL_ERROR_MALFORMED_MESSAGE: Malformed message.
61   * @QMI_PROTOCOL_ERROR_NO_MEMORY: No memory.
62   * @QMI_PROTOCOL_ERROR_INTERNAL: Internal.
63   * @QMI_PROTOCOL_ERROR_ABORTED: Aborted.
64   * @QMI_PROTOCOL_ERROR_CLIENT_IDS_EXHAUSTED: Client IDs exhausted.
65   * @QMI_PROTOCOL_ERROR_UNABORTABLE_TRANSACTION: Unabortable transaction.
66   * @QMI_PROTOCOL_ERROR_INVALID_CLIENT_ID: Invalid client ID.
67   * @QMI_PROTOCOL_ERROR_NO_THRESHOLDS_PROVIDED: No thresholds provided.
68   * @QMI_PROTOCOL_ERROR_INVALID_HANDLE: Invalid handle.
69   * @QMI_PROTOCOL_ERROR_INVALID_PROFILE: Invalid profile.
70   * @QMI_PROTOCOL_ERROR_INVALID_PIN_ID: Invalid PIN ID.
71   * @QMI_PROTOCOL_ERROR_INCORRECT_PIN: Incorrect PIN.
72   * @QMI_PROTOCOL_ERROR_NO_NETWORK_FOUND: No network found.
73   * @QMI_PROTOCOL_ERROR_CALL_FAILED: Call failed.
74   * @QMI_PROTOCOL_ERROR_OUT_OF_CALL: Out of call.
75   * @QMI_PROTOCOL_ERROR_NOT_PROVISIONED: Not provisioned.
76   * @QMI_PROTOCOL_ERROR_MISSING_ARGUMENT: Missing argument.
77   * @QMI_PROTOCOL_ERROR_ARGUMENT_TOO_LONG: Argument too long.
78   * @QMI_PROTOCOL_ERROR_INVALID_TRANSACTION_ID: Invalid transaction ID.
79   * @QMI_PROTOCOL_ERROR_DEVICE_IN_USE: Device in use.
80   * @QMI_PROTOCOL_ERROR_NETWORK_UNSUPPORTED: Network unsupported.
81   * @QMI_PROTOCOL_ERROR_DEVICE_UNSUPPORTED: Device unsupported.
82   * @QMI_PROTOCOL_ERROR_NO_EFFECT: No effect.
83   * @QMI_PROTOCOL_ERROR_NO_FREE_PROFILE: No free profile.
84   * @QMI_PROTOCOL_ERROR_INVALID_PDP_TYPE: Invalid PDP type.
85   * @QMI_PROTOCOL_ERROR_INVALID_TECHNOLOGY_PREFERENCE: Invalid technology preference.
86   * @QMI_PROTOCOL_ERROR_INVALID_PROFILE_TYPE: Invalid profile type.
87   * @QMI_PROTOCOL_ERROR_INVALID_SERVICE_TYPE: Invalid service type.
88   * @QMI_PROTOCOL_ERROR_INVALID_REGISTER_ACTION: Invalid register action.
89   * @QMI_PROTOCOL_ERROR_INVALID_PS_ATTACH_ACTION: Invalid PS attach action.
90   * @QMI_PROTOCOL_ERROR_AUTHENTICATION_FAILED: Authentication failed.
91   * @QMI_PROTOCOL_ERROR_PIN_BLOCKED: PIN blocked.
92   * @QMI_PROTOCOL_ERROR_PIN_ALWAYS_BLOCKED: PIN always blocked.
93   * @QMI_PROTOCOL_ERROR_UIM_UNINITIALIZED: UIM uninitialized.
94   * @QMI_PROTOCOL_ERROR_MAXIMUM_QOS_REQUESTS_IN_USE: Maximum QoS requests in use.
95   * @QMI_PROTOCOL_ERROR_INCORRECT_FLOW_FILTER: Incorrect flow filter.
96   * @QMI_PROTOCOL_ERROR_NETWORK_QOS_UNAWARE: Network QoS unaware.
97   * @QMI_PROTOCOL_ERROR_INVALID_QOS_ID: Invalid QoS ID.
98   * @QMI_PROTOCOL_ERROR_QOS_UNAVAILABLE: QoS unavailable.
99   * @QMI_PROTOCOL_ERROR_FLOW_SUSPENDED: Flow suspended.
100   * @QMI_PROTOCOL_ERROR_GENERAL_ERROR: General error.
101   * @QMI_PROTOCOL_ERROR_UNKNOWN_ERROR: Unknown error.
102   * @QMI_PROTOCOL_ERROR_INVALID_ARGUMENT: Invalid argument.
103   * @QMI_PROTOCOL_ERROR_INVALID_INDEX: Invalid index.
104   * @QMI_PROTOCOL_ERROR_NO_ENTRY: No entry.
105   * @QMI_PROTOCOL_ERROR_DEVICE_STORAGE_FULL: Device storage full.
106   * @QMI_PROTOCOL_ERROR_DEVICE_NOT_READY: Device not ready.
107   * @QMI_PROTOCOL_ERROR_NETWORK_NOT_READY: Network not ready.
108   * @QMI_PROTOCOL_ERROR_WMS_CAUSE_CODE: WMS cause code.
109   * @QMI_PROTOCOL_ERROR_WMS_MESSAGE_NOT_SENT: WMS message not sent.
110   * @QMI_PROTOCOL_ERROR_WMS_MESSAGE_DELIVERY_FAILURE: WMS message delivery failure.
111   * @QMI_PROTOCOL_ERROR_WMS_INVALID_MESSAGE_ID: WMS invalid message ID.
112   * @QMI_PROTOCOL_ERROR_WMS_ENCODING: WMS encoding.
113   * @QMI_PROTOCOL_ERROR_AUTHENTICATION_LOCK: Authentication lock.
114   * @QMI_PROTOCOL_ERROR_INVALID_TRANSITION: Invalid transition.
115   * @QMI_PROTOCOL_ERROR_SESSION_INACTIVE: Session inactive.
116   * @QMI_PROTOCOL_ERROR_SESSION_INVALID: Session invalid.
117   * @QMI_PROTOCOL_ERROR_SESSION_OWNERSHIP: Session ownership.
118   * @QMI_PROTOCOL_ERROR_INSUFFICIENT_RESOURCES: Insufficient resources.
119   * @QMI_PROTOCOL_ERROR_DISABLED: Disabled.
120   * @QMI_PROTOCOL_ERROR_INVALID_OPERATION: Invalid operation.
121   * @QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND: Invalid QMI command.
122   * @QMI_PROTOCOL_ERROR_WMS_T_PDU_TYPE: WMS T-PDU type.
123   * @QMI_PROTOCOL_ERROR_WMS_SMSC_ADDRESS: WMS SMSC address.
124   * @QMI_PROTOCOL_ERROR_INFORMATION_UNAVAILABLE: Information unavailable.
125   * @QMI_PROTOCOL_ERROR_SEGMENT_TOO_LONG: Segment too long.
126   * @QMI_PROTOCOL_ERROR_SEGMENT_ORDER: Segment order.
127   * @QMI_PROTOCOL_ERROR_BUNDLING_NOT_SUPPORTED: Bundling not supported.
128   * @QMI_PROTOCOL_ERROR_SIM_FILE_NOT_FOUND: SIM file not found.
129   * @QMI_PROTOCOL_ERROR_ACCESS_DENIED: Access denied.
130   * @QMI_PROTOCOL_ERROR_HARDWARE_RESTRICTED: Hardware restricted.
131   * @QMI_PROTOCOL_ERROR_CAT_EVENT_REGISTRATION_FAILED: Event registration failed.
132   * @QMI_PROTOCOL_ERROR_CAT_INVALID_TERMINAL_RESPONSE: Invalid terminal response.
133   * @QMI_PROTOCOL_ERROR_CAT_INVALID_ENVELOPE_COMMAND: Invalid envelope command.
134   * @QMI_PROTOCOL_ERROR_CAT_ENVELOPE_COMMAND_BUSY: Envelope command busy.
135   * @QMI_PROTOCOL_ERROR_CAT_ENVELOPE_COMMAND_FAILED: Envelope command failed.
136   *
137   * QMI protocol errors.
138   */
139 typedef enum { /*< underscore_name=qmi_protocol_error >*/
140   QMI_PROTOCOL_ERROR_NONE                             = 0,  /*< nick=None >*/
141   QMI_PROTOCOL_ERROR_MALFORMED_MESSAGE                = 1,  /*< nick=MalformedMessage >*/
142   QMI_PROTOCOL_ERROR_NO_MEMORY                        = 2,  /*< nick=NoMemory >*/
143   QMI_PROTOCOL_ERROR_INTERNAL                         = 3,  /*< nick=Internal >*/
144   QMI_PROTOCOL_ERROR_ABORTED                          = 4,  /*< nick=Aborted >*/
145   QMI_PROTOCOL_ERROR_CLIENT_IDS_EXHAUSTED             = 5,  /*< nick=ClientIdsExhausted >*/
146   QMI_PROTOCOL_ERROR_UNABORTABLE_TRANSACTION          = 6,  /*< nick=UnabortableTransaction >*/
147   QMI_PROTOCOL_ERROR_INVALID_CLIENT_ID                = 7,  /*< nick=InvalidClientId >*/
148   QMI_PROTOCOL_ERROR_NO_THRESHOLDS_PROVIDED           = 8,  /*< nick=NoThresholdsProvided >*/
149   QMI_PROTOCOL_ERROR_INVALID_HANDLE                   = 9,  /*< nick=InvalidHandle >*/
150   QMI_PROTOCOL_ERROR_INVALID_PROFILE                  = 10, /*< nick=InvalidProfile >*/
151   QMI_PROTOCOL_ERROR_INVALID_PIN_ID                   = 11, /*< nick=InvalidPinId >*/
152   QMI_PROTOCOL_ERROR_INCORRECT_PIN                    = 12, /*< nick=IncorrectPin >*/
153   QMI_PROTOCOL_ERROR_NO_NETWORK_FOUND                 = 13, /*< nick=NoNetworkFound >*/
154   QMI_PROTOCOL_ERROR_CALL_FAILED                      = 14, /*< nick=CallFailed >*/
155   QMI_PROTOCOL_ERROR_OUT_OF_CALL                      = 15, /*< nick=OutOfCall >*/
156   QMI_PROTOCOL_ERROR_NOT_PROVISIONED                  = 16, /*< nick=NotProvisioned >*/
157   QMI_PROTOCOL_ERROR_MISSING_ARGUMENT                 = 17, /*< nick=MissingArgument >*/
158   QMI_PROTOCOL_ERROR_ARGUMENT_TOO_LONG                = 19, /*< nick=ArgumentTooLong >*/
159   QMI_PROTOCOL_ERROR_INVALID_TRANSACTION_ID           = 22, /*< nick=InvalidTransactionId >*/
160   QMI_PROTOCOL_ERROR_DEVICE_IN_USE                    = 23, /*< nick=DeviceInUse >*/
161   QMI_PROTOCOL_ERROR_NETWORK_UNSUPPORTED              = 24, /*< nick=NetworkUnsupported >*/
162   QMI_PROTOCOL_ERROR_DEVICE_UNSUPPORTED               = 25, /*< nick=DeviceUnsupported >*/
163   QMI_PROTOCOL_ERROR_NO_EFFECT                        = 26, /*< nick=NoEffect >*/
164   QMI_PROTOCOL_ERROR_NO_FREE_PROFILE                  = 27, /*< nick=NoFreeProfile >*/
165   QMI_PROTOCOL_ERROR_INVALID_PDP_TYPE                 = 28, /*< nick=InvalidPdpType >*/
166   QMI_PROTOCOL_ERROR_INVALID_TECHNOLOGY_PREFERENCE    = 29, /*< nick=InvalidTechnologyPreference >*/
167   QMI_PROTOCOL_ERROR_INVALID_PROFILE_TYPE             = 30, /*< nick=InvalidProfileType >*/
168   QMI_PROTOCOL_ERROR_INVALID_SERVICE_TYPE             = 31, /*< nick=InvalidServiceType >*/
169   QMI_PROTOCOL_ERROR_INVALID_REGISTER_ACTION          = 32, /*< nick=InvalidRegisterAction >*/
170   QMI_PROTOCOL_ERROR_INVALID_PS_ATTACH_ACTION         = 33, /*< nick=InvalidPsAttachAction >*/
171   QMI_PROTOCOL_ERROR_AUTHENTICATION_FAILED            = 34, /*< nick=AuthenticationFailed >*/
172   QMI_PROTOCOL_ERROR_PIN_BLOCKED                      = 35, /*< nick=PinBlocked >*/
173   QMI_PROTOCOL_ERROR_PIN_ALWAYS_BLOCKED               = 36, /*< nick=PinAlwaysBlocked >*/
174   QMI_PROTOCOL_ERROR_UIM_UNINITIALIZED                = 37, /*< nick=UimUninitialized >*/
175   QMI_PROTOCOL_ERROR_MAXIMUM_QOS_REQUESTS_IN_USE      = 38, /*< nick=MaximumQosRequestsInUse >*/
176   QMI_PROTOCOL_ERROR_INCORRECT_FLOW_FILTER            = 39, /*< nick=IncorrectFlowFilter >*/
177   QMI_PROTOCOL_ERROR_NETWORK_QOS_UNAWARE              = 40, /*< nick= NetworkQosUnaware >*/
178   QMI_PROTOCOL_ERROR_INVALID_QOS_ID                   = 41, /*< nick=InvalidQosId >*/
179   QMI_PROTOCOL_ERROR_QOS_UNAVAILABLE                  = 42, /*< nick=QosUnavailable >*/
180   QMI_PROTOCOL_ERROR_FLOW_SUSPENDED                   = 43, /*< nick=FlowSuspended >*/
181   QMI_PROTOCOL_ERROR_GENERAL_ERROR                    = 46, /*< nick=GeneralError >*/
182   QMI_PROTOCOL_ERROR_UNKNOWN_ERROR                    = 47, /*< nick=UnknownError >*/
183   QMI_PROTOCOL_ERROR_INVALID_ARGUMENT                 = 48, /*< nick=InvalidArgument >*/
184   QMI_PROTOCOL_ERROR_INVALID_INDEX                    = 49, /*< nick=InvalidIndex >*/
185   QMI_PROTOCOL_ERROR_NO_ENTRY                         = 50, /*< nick=NoEntry >*/
186   QMI_PROTOCOL_ERROR_DEVICE_STORAGE_FULL              = 51, /*< nick=DeviceStorageFull >*/
187   QMI_PROTOCOL_ERROR_DEVICE_NOT_READY                 = 52, /*< nick=DeviceNotReady >*/
188   QMI_PROTOCOL_ERROR_NETWORK_NOT_READY                = 53, /*< nick=NetworkNotReady >*/
189   QMI_PROTOCOL_ERROR_WMS_CAUSE_CODE                   = 54, /*< nick=Wms.CauseCode >*/
190   QMI_PROTOCOL_ERROR_WMS_MESSAGE_NOT_SENT             = 55, /*< nick=Wms.MessageNotSent >*/
191   QMI_PROTOCOL_ERROR_WMS_MESSAGE_DELIVERY_FAILURE     = 56, /*< nick=Wms.MessageDeliveryFailure >*/
192   QMI_PROTOCOL_ERROR_WMS_INVALID_MESSAGE_ID           = 57, /*< nick=Wms.InvalidMessageId >*/
193   QMI_PROTOCOL_ERROR_WMS_ENCODING                     = 58, /*< nick=Wms.Encoding >*/
194   QMI_PROTOCOL_ERROR_AUTHENTICATION_LOCK              = 59, /*< nick=AuthenticationLock >*/
195   QMI_PROTOCOL_ERROR_INVALID_TRANSITION               = 60, /*< nick=InvalidTransaction >*/
196   QMI_PROTOCOL_ERROR_SESSION_INACTIVE                 = 65, /*< nick=SessionInactive >*/
197   QMI_PROTOCOL_ERROR_SESSION_INVALID                  = 66, /*< nick=SessionInvalid >*/
198   QMI_PROTOCOL_ERROR_SESSION_OWNERSHIP                = 67, /*< nick=SessionOwnership >*/
199   QMI_PROTOCOL_ERROR_INSUFFICIENT_RESOURCES           = 68, /*< nick=InsufficientResources >*/
200   QMI_PROTOCOL_ERROR_DISABLED                         = 69, /*< nick=Disabled >*/
201   QMI_PROTOCOL_ERROR_INVALID_OPERATION                = 70, /*< nick=InvalidOperation >*/
202   QMI_PROTOCOL_ERROR_INVALID_QMI_COMMAND              = 71, /*< nick=InvalidQmiCommand >*/
203   QMI_PROTOCOL_ERROR_WMS_T_PDU_TYPE                   = 72, /*< nick=Wms.TPduType >*/
204   QMI_PROTOCOL_ERROR_WMS_SMSC_ADDRESS                 = 73, /*< nick=Wms.SmscAddress >*/
205   QMI_PROTOCOL_ERROR_INFORMATION_UNAVAILABLE          = 74, /*< nick=InformationUnavailable >*/
206   QMI_PROTOCOL_ERROR_SEGMENT_TOO_LONG                 = 75, /*< nick=SegmentTooLong >*/
207   QMI_PROTOCOL_ERROR_SEGMENT_ORDER                    = 76, /*< nick=SegmentOrder >*/
208   QMI_PROTOCOL_ERROR_BUNDLING_NOT_SUPPORTED           = 77, /*< nick=BundlingNotSupported >*/
209   QMI_PROTOCOL_ERROR_SIM_FILE_NOT_FOUND               = 80, /*< nick=SimFileNotFound >*/
210   QMI_PROTOCOL_ERROR_ACCESS_DENIED                    = 82, /*< nick=AccessDenied >*/
211   QMI_PROTOCOL_ERROR_HARDWARE_RESTRICTED              = 83, /*< nick=HardwareRestricted >*/
212   QMI_PROTOCOL_ERROR_CAT_EVENT_REGISTRATION_FAILED    = 61441, /*< nick=Cat.EventRegistrationFailed >*/
213   QMI_PROTOCOL_ERROR_CAT_INVALID_TERMINAL_RESPONSE    = 61442, /*< nick=Cat.InvalidTerminalResponse >*/
214   QMI_PROTOCOL_ERROR_CAT_INVALID_ENVELOPE_COMMAND     = 61443, /*< nick=Cat.InvalidEnvelopeCommand >*/
215   QMI_PROTOCOL_ERROR_CAT_ENVELOPE_COMMAND_BUSY        = 61444, /*< nick=Cat.EnvelopCommandBusy >*/
216   QMI_PROTOCOL_ERROR_CAT_ENVELOPE_COMMAND_FAILED      = 61445  /*< nick=Cat.EnvelopeCommandFailed >*/
217 } QmiProtocolError;
218
219 #endif /* _LIBQMI_GLIB_QMI_ERRORS_H_ */