00001 /****************************************************************************** 00002 * Copyright (c) 1999-2008 ACCESS CO., LTD. All rights reserved. 00003 * Copyright (c) 2006 PalmSource, Inc (an ACCESS company). All rights reserved. 00004 *****************************************************************************/ 00012 #ifndef ALP_MOBILE_NETWORK_H_ 00013 #define ALP_MOBILE_NETWORK_H_ 00014 00015 00023 /****************************************************************************** 00024 * Includes 00025 *****************************************************************************/ 00026 00027 #include <alp/mobile_context.h> 00028 #include <alp/mobile_operator.h> 00029 #include <alp/mobile_services.h> 00030 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif // __cplusplus 00035 00036 00037 /****************************************************************************** 00038 * Defines 00039 *****************************************************************************/ 00040 00041 #define ALP_MBL_NETWORK_NOTIFICATION_STATUS_CHANGE ((AlpMblNotificationId) 1) 00042 #define ALP_MBL_NETWORK_NOTIFICATION_SIGNAL_LEVEL_CHANGE ((AlpMblNotificationId) 2) 00043 #define ALP_MBL_NETWORK_NOTIFICATION_OPERATOR_CHANGE ((AlpMblNotificationId) 3) 00044 #define ALP_MBL_NETWORK_NOTIFICATION_AVAILABLE_OPERATORS_CHANGE ((AlpMblNotificationId) 4) 00045 #define ALP_MBL_NETWORK_NOTIFICATION_PREFERRED_OPERATORS_CHANGE ((AlpMblNotificationId) 5) 00046 #define ALP_MBL_NETWORK_NOTIFICATION_NETWORK_TIME_AVAILABLE ((AlpMblNotificationId) 6) 00047 00048 #define ALP_MBL_NETWORK_STATUS_UNREGISTERED ((AlpMblNetworkStatus) 0) 00049 #define ALP_MBL_NETWORK_STATUS_REGISTERED ((AlpMblNetworkStatus) 1) 00050 #define ALP_MBL_NETWORK_STATUS_SEARCHING ((AlpMblNetworkStatus) 2) 00051 #define ALP_MBL_NETWORK_STATUS_DENIED ((AlpMblNetworkStatus) 3) 00052 #define ALP_MBL_NETWORK_STATUS_UNKNOW ((AlpMblNetworkStatus) 4) 00053 #define ALP_MBL_NETWORK_STATUS_ROAMING ((AlpMblNetworkStatus) 5) 00054 00055 #define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_UNKNOW ALP_MBL_ACCESS_TECHNOLOGY_UNKNOW // For compatibility, to remove asap 00056 #define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_GSM ALP_MBL_ACCESS_TECHNOLOGY_GSM // For compatibility, to remove asap 00057 #define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_GPRS ALP_MBL_ACCESS_TECHNOLOGY_GPRS // For compatibility, to remove asap 00058 #define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_UMTS ALP_MBL_ACCESS_TECHNOLOGY_UMTS // For compatibility, to remove asap 00059 #define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_EDGE ALP_MBL_ACCESS_TECHNOLOGY_EDGE // For compatibility, to remove asap 00060 00061 #define ALP_MBL_NETWORK_SIGNAL_LEVEL_INVALID ((AlpMblNetworkSignalLevel) -1) 00062 #define ALP_MBL_NETWORK_SIGNAL_LEVEL_0 ((AlpMblNetworkSignalLevel) 0) 00063 #define ALP_MBL_NETWORK_SIGNAL_LEVEL_1 ((AlpMblNetworkSignalLevel) 1) 00064 #define ALP_MBL_NETWORK_SIGNAL_LEVEL_2 ((AlpMblNetworkSignalLevel) 2) 00065 #define ALP_MBL_NETWORK_SIGNAL_LEVEL_3 ((AlpMblNetworkSignalLevel) 3) 00066 #define ALP_MBL_NETWORK_SIGNAL_LEVEL_4 ((AlpMblNetworkSignalLevel) 4) 00067 00068 #define ALP_MBL_NETWORK_DENIED_NO_SIM ((AlpMblNetworkDeniedInformation) 1) 00069 #define ALP_MBL_NETWORK_DENIED_SIM_LOCK ((AlpMblNetworkDeniedInformation) 2) 00070 #define ALP_MBL_NETWORK_DENIED_SIM_DEACTIVATED ((AlpMblNetworkDeniedInformation) 3) 00071 #define ALP_MBL_NETWORK_DENIED_NOT_ALLOWED ((AlpMblNetworkDeniedInformation) 4) 00072 #define ALP_MBL_NETWORK_DENIED_NO_NETWORK ((AlpMblNetworkDeniedInformation) 5) 00073 #define ALP_MBL_NETWORK_DENIED_AUTHENTICATION_CANCEL ((AlpMblNetworkDeniedInformation) 6) 00074 00075 #define ALP_MBL_NETWORK_REGISTRATION_MODE_AUTOMATIC ((uint8_t) 0) 00076 #define ALP_MBL_NETWORK_REGISTRATION_MODE_MANUAL ((uint8_t) 1) 00077 00078 00079 /****************************************************************************** 00080 * Typedef 00081 *****************************************************************************/ 00082 00083 typedef unsigned char AlpMblNetworkStatus; 00084 typedef AlpMblAccessTechnology AlpMblNetworkAccessTechnology; // For compatibility, to remove asap 00085 typedef char AlpMblNetworkSignalLevel; 00086 typedef unsigned char AlpMblNetworkDeniedInformation; 00087 00089 typedef struct _AlpMblNetworkTime AlpMblNetworkTime; 00090 struct _AlpMblNetworkTime 00091 { 00092 uint8_t year; 00093 uint8_t month; 00094 uint8_t day; 00095 uint8_t hour; 00096 uint8_t minute; 00097 uint8_t second; 00098 char timeZone; 00099 }; 00100 00109 typedef void (*AlpMblNetworkStatusChangeCallbackPtr) (void* iUserDataP, AlpMblNetworkId iNetworkId, AlpMblNetworkStatus iPrevious, AlpMblNetworkStatus iCurrent, AlpMblNetworkAccessTechnology iAccessTechnology, AlpMblNetworkDeniedInformation iDeniedInformation); 00110 00117 typedef void (*AlpMblNetworkSignalLevelChangeCallbackPtr) (void* iUserDataP, AlpMblNetworkId iNetworkId, AlpMblNetworkSignalLevel iPrevious, AlpMblNetworkSignalLevel iCurrent); 00118 00125 typedef void (*AlpMblNetworkOperatorChangeCallbackPtr) (void* iUserDataP, AlpMblNetworkId iNetworkId, AlpMblOperatorId iPrevious, AlpMblOperatorId iCurrent); 00126 00132 typedef void (*AlpMblNetworkAvailableOperatorsChangeCallbackPtr) (void* iUserDataP, AlpMblNetworkId iNetworkId, AlpMblOperatorList iAvailableOperators); 00133 00139 typedef void (*AlpMblNetworkPreferredOperatorsChangeCallbackPtr) (void* iUserDataP, AlpMblNetworkId iNetworkId, AlpMblOperatorList iPreferredOperators); 00140 00146 typedef void (*AlpMblNetworkTimeAvailableCallbackPtr) (void* iUserDataP, AlpMblNetworkId iNetworkId, AlpMblNetworkTime iNetworkTime); 00147 00148 00149 /****************************************************************************** 00150 * Prototype 00151 *****************************************************************************/ 00152 00223 alp_status_t alp_mbl_network_get_status(AlpMblNetworkId iNetworkId, AlpMblNetworkStatus* oNetworkStatusP, AlpMblNetworkAccessTechnology* oNetworkAccessTechnologyP); 00224 00241 alp_status_t alp_mbl_network_get_signal_level(AlpMblNetworkId iNetworkId, AlpMblNetworkSignalLevel* oNetworkSignalLevelP); 00242 00259 alp_status_t alp_mbl_network_get_network_time(AlpMblNetworkId iNetworkId, AlpMblNetworkTime* oNetworkTimeP); 00260 00275 alp_status_t alp_mbl_network_get_operator(AlpMblNetworkId iNetworkId, AlpMblOperatorId* oOperatorIdP); 00276 00291 alp_status_t alp_mbl_network_get_available_operators(AlpMblNetworkId iNetworkId, AlpMblOperatorList* oOperatorListP); 00292 00307 alp_status_t alp_mbl_network_get_preferred_operators(AlpMblNetworkId iNetworkId, AlpMblOperatorList* oOperatorListP); 00308 00322 alp_status_t alp_mbl_network_set_operator(AlpMblNetworkId iNetworkId, AlpMblOperatorId iOperatorId); 00323 00340 alp_status_t alp_mbl_network_get_mobile_context(AlpMblNetworkId iNetworkId, AlpMblContextId* oContextIdP); 00341 00355 alp_status_t alp_mbl_network_get_denied_information(AlpMblNetworkId iNetworkId, AlpMblNetworkDeniedInformation* oInformationP); 00356 00370 alp_status_t alp_mbl_network_get_registration_mode(AlpMblNetworkId iNetworkId, uint8_t* oRegistrationModeP); 00371 00385 alp_status_t alp_mbl_network_set_registration_mode(AlpMblNetworkId iNetworkId, uint8_t iRegistrationMode); 00386 00389 #ifdef __cplusplus 00390 } 00391 #endif // __cplusplus 00392 00393 00394 #endif // ALP_MOBILE_NETWORK_H_
Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.