Fixed inclusion order

This commit is contained in:
Pierre Pronchery 2011-02-02 22:41:02 +00:00
parent 887421ecc5
commit 091d90abdb
2 changed files with 52 additions and 50 deletions

View File

@ -18,10 +18,59 @@
#ifndef PHONE_COMMAND_H
# define PHONE_COMMAND_H
# include "gsm.h"
/* GSMCommand */
/* private */
/* types */
typedef struct _GSMCommand GSMCommand;
typedef struct _GSM GSM;
typedef void (*GSMCommandCallback)(GSM * gsm);
typedef enum _GSMError
{
GSM_ERROR_UNKNOWN = 0,
GSM_ERROR_ANSWER_FAILED,
GSM_ERROR_BATTERY_CHARGE_FAILED,
GSM_ERROR_BUSY,
GSM_ERROR_CALL_FAILED,
GSM_ERROR_CALL_WAITING_FAILED,
GSM_ERROR_CONTACT_DELETE_FAILED,
GSM_ERROR_CONTACT_EDIT_FAILED,
GSM_ERROR_CONTACT_FETCH_FAILED,
GSM_ERROR_CONTACT_LIST_FAILED,
GSM_ERROR_CONTACT_NEW_FAILED,
GSM_ERROR_FUNCTIONAL_FAILED,
GSM_ERROR_HANGUP_FAILED,
GSM_ERROR_MESSAGE_DELETE_FAILED,
GSM_ERROR_MESSAGE_FETCH_FAILED,
GSM_ERROR_MESSAGE_INDICATIONS_FAILED,
GSM_ERROR_MESSAGE_LIST_FAILED,
GSM_ERROR_MESSAGE_SEND_FAILED,
GSM_ERROR_MUTE_FAILED,
GSM_ERROR_NO_ANSWER,
GSM_ERROR_NO_CARRIER,
GSM_ERROR_NO_DIALTONE,
GSM_ERROR_OPERATOR_MODE_FAILED,
GSM_ERROR_REJECT_FAILED,
GSM_ERROR_RESET_FAILED,
GSM_ERROR_SIGNAL_LEVEL_FAILED,
GSM_ERROR_SIM_PIN_REQUIRED,
GSM_ERROR_SIM_PIN_WRONG
} GSMError;
typedef enum _GSMMode
{
GSM_MODE_INIT = 0, GSM_MODE_COMMAND, GSM_MODE_DATA, GSM_MODE_PDU
} GSMMode;
typedef enum _GSMPriority
{
GSM_PRIORITY_LOW = 0, GSM_PRIORITY_NORMAL, GSM_PRIORITY_HIGH,
GSM_PRIORITY_HIGHEST
} GSMPriority;
/* public */
/* functions */
/* commands */

View File

@ -18,13 +18,12 @@
#ifndef PHONE_GSM_H
# define PHONE_GSM_H
# include "command.h"
# include <glib.h>
/* GSM */
/* types */
typedef struct _GSM GSM;
typedef enum _GSMBatteryStatus
{
GSM_BATTERY_STATUS_POWERED = 0,
@ -40,47 +39,12 @@ typedef enum _GSMCallType
GSM_CALL_TYPE_VOICE
} GSMCallType;
typedef struct _GSMCommand GSMCommand;
typedef void (*GSMCommandCallback)(GSM * gsm);
typedef enum _GSMEncoding
{
GSM_ENCODING_UTF8 = 0,
GSM_ENCODING_RAW_DATA
} GSMEncoding;
typedef enum _GSMError
{
GSM_ERROR_UNKNOWN = 0,
GSM_ERROR_ANSWER_FAILED,
GSM_ERROR_BATTERY_CHARGE_FAILED,
GSM_ERROR_BUSY,
GSM_ERROR_CALL_FAILED,
GSM_ERROR_CALL_WAITING_FAILED,
GSM_ERROR_CONTACT_DELETE_FAILED,
GSM_ERROR_CONTACT_EDIT_FAILED,
GSM_ERROR_CONTACT_FETCH_FAILED,
GSM_ERROR_CONTACT_LIST_FAILED,
GSM_ERROR_CONTACT_NEW_FAILED,
GSM_ERROR_FUNCTIONAL_FAILED,
GSM_ERROR_HANGUP_FAILED,
GSM_ERROR_MESSAGE_DELETE_FAILED,
GSM_ERROR_MESSAGE_FETCH_FAILED,
GSM_ERROR_MESSAGE_INDICATIONS_FAILED,
GSM_ERROR_MESSAGE_LIST_FAILED,
GSM_ERROR_MESSAGE_SEND_FAILED,
GSM_ERROR_MUTE_FAILED,
GSM_ERROR_NO_ANSWER,
GSM_ERROR_NO_CARRIER,
GSM_ERROR_NO_DIALTONE,
GSM_ERROR_OPERATOR_MODE_FAILED,
GSM_ERROR_REJECT_FAILED,
GSM_ERROR_RESET_FAILED,
GSM_ERROR_SIGNAL_LEVEL_FAILED,
GSM_ERROR_SIM_PIN_REQUIRED,
GSM_ERROR_SIM_PIN_WRONG
} GSMError;
typedef enum _GSMEventType
{
GSM_EVENT_TYPE_ERROR = 0,
@ -135,11 +99,6 @@ typedef enum _GSMMessageMode
GSM_MESSAGE_MODE_FORWARD = 3
} GSMMessageMode;
typedef enum _GSMMode
{
GSM_MODE_INIT = 0, GSM_MODE_COMMAND, GSM_MODE_DATA, GSM_MODE_PDU
} GSMMode;
typedef enum _GSMOperatorFormat
{
GSM_OPERATOR_FORMAT_LONG = 0,
@ -164,12 +123,6 @@ typedef enum _GSMPhoneActivity
GSM_PHONE_ACTIVITY_CALL = 4
} GSMPhoneActivity;
typedef enum _GSMPriority
{
GSM_PRIORITY_LOW = 0, GSM_PRIORITY_NORMAL, GSM_PRIORITY_HIGH,
GSM_PRIORITY_HIGHEST
} GSMPriority;
typedef enum _GSMRegistrationReport
{
GSM_REGISTRATION_REPORT_DISABLE = 0,