Network Service
[Mobile Services]


Detailed Description

This service groups the Network functions.


Data Structures

struct  _AlpMblNetworkTime

Defines

#define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_EDGE   ALP_MBL_ACCESS_TECHNOLOGY_EDGE
#define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_GPRS   ALP_MBL_ACCESS_TECHNOLOGY_GPRS
#define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_GSM   ALP_MBL_ACCESS_TECHNOLOGY_GSM
#define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_UMTS   ALP_MBL_ACCESS_TECHNOLOGY_UMTS
#define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_UNKNOW   ALP_MBL_ACCESS_TECHNOLOGY_UNKNOW
#define ALP_MBL_NETWORK_DENIED_AUTHENTICATION_CANCEL   ((AlpMblNetworkDeniedInformation) 6)
 Network is denied due to authentication needed, and the user has cancel it.
#define ALP_MBL_NETWORK_DENIED_NO_NETWORK   ((AlpMblNetworkDeniedInformation) 5)
 Network is denied due to no network available.
#define ALP_MBL_NETWORK_DENIED_NO_SIM   ((AlpMblNetworkDeniedInformation) 1)
 Network is denied due to no sim card present.
#define ALP_MBL_NETWORK_DENIED_NOT_ALLOWED   ((AlpMblNetworkDeniedInformation) 4)
 Network is denied due to registration not allowed.
#define ALP_MBL_NETWORK_DENIED_SIM_DEACTIVATED   ((AlpMblNetworkDeniedInformation) 3)
 Network is denied due to the sim card deactivated.
#define ALP_MBL_NETWORK_DENIED_SIM_LOCK   ((AlpMblNetworkDeniedInformation) 2)
 Network is denied due to the sim card locked, and we are waiting for user authentication.
#define ALP_MBL_NETWORK_NOTIFICATION_AVAILABLE_OPERATORS_CHANGE   ((AlpMblNotificationId) 4)
 The available operators of a network have changed.
#define ALP_MBL_NETWORK_NOTIFICATION_NETWORK_TIME_AVAILABLE   ((AlpMblNotificationId) 6)
 The time of a network has changed.
#define ALP_MBL_NETWORK_NOTIFICATION_OPERATOR_CHANGE   ((AlpMblNotificationId) 3)
 The operator associated to a network has changed.
#define ALP_MBL_NETWORK_NOTIFICATION_PREFERRED_OPERATORS_CHANGE   ((AlpMblNotificationId) 5)
 The preferred operators of a network have changed.
#define ALP_MBL_NETWORK_NOTIFICATION_SIGNAL_LEVEL_CHANGE   ((AlpMblNotificationId) 2)
 The signal level of a network has changed.
#define ALP_MBL_NETWORK_NOTIFICATION_STATUS_CHANGE   ((AlpMblNotificationId) 1)
 The status of a network has changed.
#define ALP_MBL_NETWORK_REGISTRATION_MODE_AUTOMATIC   ((uint8_t) 0)
 Automatic registration mode. The network registration is up to the Phone Module.
#define ALP_MBL_NETWORK_REGISTRATION_MODE_MANUAL   ((uint8_t) 1)
 Manual registration mode. If the home operator is not available nor the previous operator, it will be up to the user to select an operator.
#define ALP_MBL_NETWORK_SIGNAL_LEVEL_0   ((AlpMblNetworkSignalLevel) 0)
 The signal level is 0 bar on 4.
#define ALP_MBL_NETWORK_SIGNAL_LEVEL_1   ((AlpMblNetworkSignalLevel) 1)
 The signal level is 1 bar on 4.
#define ALP_MBL_NETWORK_SIGNAL_LEVEL_2   ((AlpMblNetworkSignalLevel) 2)
 The signal level is 2 bar on 4.
#define ALP_MBL_NETWORK_SIGNAL_LEVEL_3   ((AlpMblNetworkSignalLevel) 3)
 The signal level is 3 bar on 4.
#define ALP_MBL_NETWORK_SIGNAL_LEVEL_4   ((AlpMblNetworkSignalLevel) 4)
 The signal level is 4 bar on 4.
#define ALP_MBL_NETWORK_SIGNAL_LEVEL_INVALID   ((AlpMblNetworkSignalLevel) -1)
 The signal level is not detectable.
#define ALP_MBL_NETWORK_STATUS_DENIED   ((AlpMblNetworkStatus) 3)
 The network is available for emergency calls only.
#define ALP_MBL_NETWORK_STATUS_REGISTERED   ((AlpMblNetworkStatus) 1)
 The network is registered to an operator.
#define ALP_MBL_NETWORK_STATUS_ROAMING   ((AlpMblNetworkStatus) 5)
 The network is registered to an operator in roaming mode.
#define ALP_MBL_NETWORK_STATUS_SEARCHING   ((AlpMblNetworkStatus) 2)
 The network is searching for an operator.
#define ALP_MBL_NETWORK_STATUS_UNKNOW   ((AlpMblNetworkStatus) 4)
 Initial status.
#define ALP_MBL_NETWORK_STATUS_UNREGISTERED   ((AlpMblNetworkStatus) 0)
 The network is not registered.

Typedefs

typedef AlpMblAccessTechnology AlpMblNetworkAccessTechnology
typedef void(* AlpMblNetworkAvailableOperatorsChangeCallbackPtr )(void *iUserDataP, AlpMblNetworkId iNetworkId, AlpMblOperatorList iAvailableOperators)
typedef unsigned char AlpMblNetworkDeniedInformation
typedef unsigned char AlpMblNetworkId
typedef void(* AlpMblNetworkOperatorChangeCallbackPtr )(void *iUserDataP, AlpMblNetworkId iNetworkId, AlpMblOperatorId iPrevious, AlpMblOperatorId iCurrent)
typedef void(* AlpMblNetworkPreferredOperatorsChangeCallbackPtr )(void *iUserDataP, AlpMblNetworkId iNetworkId, AlpMblOperatorList iPreferredOperators)
typedef char AlpMblNetworkSignalLevel
typedef void(* AlpMblNetworkSignalLevelChangeCallbackPtr )(void *iUserDataP, AlpMblNetworkId iNetworkId, AlpMblNetworkSignalLevel iPrevious, AlpMblNetworkSignalLevel iCurrent)
typedef unsigned char AlpMblNetworkStatus
typedef void(* AlpMblNetworkStatusChangeCallbackPtr )(void *iUserDataP, AlpMblNetworkId iNetworkId, AlpMblNetworkStatus iPrevious, AlpMblNetworkStatus iCurrent, AlpMblNetworkAccessTechnology iAccessTechnology, AlpMblNetworkDeniedInformation iDeniedInformation)
typedef _AlpMblNetworkTime AlpMblNetworkTime
 Network Time.
typedef void(* AlpMblNetworkTimeAvailableCallbackPtr )(void *iUserDataP, AlpMblNetworkId iNetworkId, AlpMblNetworkTime iNetworkTime)

Functions

alp_status_t alp_mbl_network_get_available_operators (AlpMblNetworkId iNetworkId, AlpMblOperatorList *oOperatorListP)
alp_status_t alp_mbl_network_get_denied_information (AlpMblNetworkId iNetworkId, AlpMblNetworkDeniedInformation *oInformationP)
alp_status_t alp_mbl_network_get_mobile_context (AlpMblNetworkId iNetworkId, AlpMblContextId *oContextIdP)
alp_status_t alp_mbl_network_get_network_time (AlpMblNetworkId iNetworkId, AlpMblNetworkTime *oNetworkTimeP)
alp_status_t alp_mbl_network_get_operator (AlpMblNetworkId iNetworkId, AlpMblOperatorId *oOperatorIdP)
alp_status_t alp_mbl_network_get_preferred_operators (AlpMblNetworkId iNetworkId, AlpMblOperatorList *oOperatorListP)
alp_status_t alp_mbl_network_get_registration_mode (AlpMblNetworkId iNetworkId, uint8_t *oRegistrationModeP)
alp_status_t alp_mbl_network_get_signal_level (AlpMblNetworkId iNetworkId, AlpMblNetworkSignalLevel *oNetworkSignalLevelP)
alp_status_t alp_mbl_network_get_status (AlpMblNetworkId iNetworkId, AlpMblNetworkStatus *oNetworkStatusP, AlpMblNetworkAccessTechnology *oNetworkAccessTechnologyP)
alp_status_t alp_mbl_network_set_operator (AlpMblNetworkId iNetworkId, AlpMblOperatorId iOperatorId)
alp_status_t alp_mbl_network_set_registration_mode (AlpMblNetworkId iNetworkId, uint8_t iRegistrationMode)


Define Documentation

#define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_EDGE   ALP_MBL_ACCESS_TECHNOLOGY_EDGE
 

#define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_GPRS   ALP_MBL_ACCESS_TECHNOLOGY_GPRS
 

#define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_GSM   ALP_MBL_ACCESS_TECHNOLOGY_GSM
 

#define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_UMTS   ALP_MBL_ACCESS_TECHNOLOGY_UMTS
 

#define ALP_MBL_NETWORK_ACCESS_TECHNOLOGY_UNKNOW   ALP_MBL_ACCESS_TECHNOLOGY_UNKNOW
 

#define ALP_MBL_NETWORK_DENIED_AUTHENTICATION_CANCEL   ((AlpMblNetworkDeniedInformation) 6)
 

Network is denied due to authentication needed, and the user has cancel it.

#define ALP_MBL_NETWORK_DENIED_NO_NETWORK   ((AlpMblNetworkDeniedInformation) 5)
 

Network is denied due to no network available.

#define ALP_MBL_NETWORK_DENIED_NO_SIM   ((AlpMblNetworkDeniedInformation) 1)
 

Network is denied due to no sim card present.

#define ALP_MBL_NETWORK_DENIED_NOT_ALLOWED   ((AlpMblNetworkDeniedInformation) 4)
 

Network is denied due to registration not allowed.

#define ALP_MBL_NETWORK_DENIED_SIM_DEACTIVATED   ((AlpMblNetworkDeniedInformation) 3)
 

Network is denied due to the sim card deactivated.

#define ALP_MBL_NETWORK_DENIED_SIM_LOCK   ((AlpMblNetworkDeniedInformation) 2)
 

Network is denied due to the sim card locked, and we are waiting for user authentication.

#define ALP_MBL_NETWORK_NOTIFICATION_AVAILABLE_OPERATORS_CHANGE   ((AlpMblNotificationId) 4)
 

The available operators of a network have changed.

#define ALP_MBL_NETWORK_NOTIFICATION_NETWORK_TIME_AVAILABLE   ((AlpMblNotificationId) 6)
 

The time of a network has changed.

#define ALP_MBL_NETWORK_NOTIFICATION_OPERATOR_CHANGE   ((AlpMblNotificationId) 3)
 

The operator associated to a network has changed.

#define ALP_MBL_NETWORK_NOTIFICATION_PREFERRED_OPERATORS_CHANGE   ((AlpMblNotificationId) 5)
 

The preferred operators of a network have changed.

#define ALP_MBL_NETWORK_NOTIFICATION_SIGNAL_LEVEL_CHANGE   ((AlpMblNotificationId) 2)
 

The signal level of a network has changed.

#define ALP_MBL_NETWORK_NOTIFICATION_STATUS_CHANGE   ((AlpMblNotificationId) 1)
 

The status of a network has changed.

#define ALP_MBL_NETWORK_REGISTRATION_MODE_AUTOMATIC   ((uint8_t) 0)
 

Automatic registration mode. The network registration is up to the Phone Module.

#define ALP_MBL_NETWORK_REGISTRATION_MODE_MANUAL   ((uint8_t) 1)
 

Manual registration mode. If the home operator is not available nor the previous operator, it will be up to the user to select an operator.

#define ALP_MBL_NETWORK_SIGNAL_LEVEL_0   ((AlpMblNetworkSignalLevel) 0)
 

The signal level is 0 bar on 4.

#define ALP_MBL_NETWORK_SIGNAL_LEVEL_1   ((AlpMblNetworkSignalLevel) 1)
 

The signal level is 1 bar on 4.

#define ALP_MBL_NETWORK_SIGNAL_LEVEL_2   ((AlpMblNetworkSignalLevel) 2)
 

The signal level is 2 bar on 4.

#define ALP_MBL_NETWORK_SIGNAL_LEVEL_3   ((AlpMblNetworkSignalLevel) 3)
 

The signal level is 3 bar on 4.

#define ALP_MBL_NETWORK_SIGNAL_LEVEL_4   ((AlpMblNetworkSignalLevel) 4)
 

The signal level is 4 bar on 4.

#define ALP_MBL_NETWORK_SIGNAL_LEVEL_INVALID   ((AlpMblNetworkSignalLevel) -1)
 

The signal level is not detectable.

#define ALP_MBL_NETWORK_STATUS_DENIED   ((AlpMblNetworkStatus) 3)
 

The network is available for emergency calls only.

#define ALP_MBL_NETWORK_STATUS_REGISTERED   ((AlpMblNetworkStatus) 1)
 

The network is registered to an operator.

#define ALP_MBL_NETWORK_STATUS_ROAMING   ((AlpMblNetworkStatus) 5)
 

The network is registered to an operator in roaming mode.

#define ALP_MBL_NETWORK_STATUS_SEARCHING   ((AlpMblNetworkStatus) 2)
 

The network is searching for an operator.

#define ALP_MBL_NETWORK_STATUS_UNKNOW   ((AlpMblNetworkStatus) 4)
 

Initial status.

#define ALP_MBL_NETWORK_STATUS_UNREGISTERED   ((AlpMblNetworkStatus) 0)
 

The network is not registered.


Typedef Documentation

typedef AlpMblAccessTechnology AlpMblNetworkAccessTechnology
 

typedef void(* AlpMblNetworkAvailableOperatorsChangeCallbackPtr)(void *iUserDataP, AlpMblNetworkId iNetworkId, AlpMblOperatorList iAvailableOperators)
 

Callback prototype for ALP_MBL_NETWORK_NOTIFICATION_AVAILABLE_OPERATORS_CHANGE notification.

Parameters:
[in] iUserDataP - A pointer to user data info, given with the alp_mbl_add_observers() function call.
[in] iNetworkId - Id of the network that its available operators have changed.
[in] iAvailableOperators - The new list of available operators.

typedef unsigned char AlpMblNetworkDeniedInformation
 

typedef unsigned char AlpMblNetworkId
 

typedef void(* AlpMblNetworkOperatorChangeCallbackPtr)(void *iUserDataP, AlpMblNetworkId iNetworkId, AlpMblOperatorId iPrevious, AlpMblOperatorId iCurrent)
 

Callback prototype for ALP_MBL_NETWORK_NOTIFICATION_OPERATOR_CHANGE notification.

Parameters:
[in] iUserDataP - A pointer to user data info, given with the alp_mbl_add_observers() function call.
[in] iNetworkId - Id of the network that the operator has changed.
[in] iPrevious - Previous operator id.
[in] iCurrent - New operator id.

typedef void(* AlpMblNetworkPreferredOperatorsChangeCallbackPtr)(void *iUserDataP, AlpMblNetworkId iNetworkId, AlpMblOperatorList iPreferredOperators)
 

Callback prototype for ALP_MBL_NETWORK_NOTIFICATION_PREFERRED_OPERATORS_CHANGE notification.

Parameters:
[in] iUserDataP - A pointer to user data info, given with the alp_mbl_add_observers() function call.
[in] iNetworkId - Id of the network that its preferred operators have changed.
[in] iPreferredOperators - The new list of preferred operators.

typedef char AlpMblNetworkSignalLevel
 

typedef void(* AlpMblNetworkSignalLevelChangeCallbackPtr)(void *iUserDataP, AlpMblNetworkId iNetworkId, AlpMblNetworkSignalLevel iPrevious, AlpMblNetworkSignalLevel iCurrent)
 

Callback prototype for ALP_MBL_NETWORK_NOTIFICATION_SIGNAL_LEVEL_CHANGE notification.

Parameters:
[in] iUserDataP - A pointer to user data info, given with the alp_mbl_add_observers() function call.
[in] iNetworkId - Id of the network that the signal level has changed.
[in] iPrevious - Previous signal level. See ALP_MBL_NETWORK_SIGNAL_LEVEL_XXX defines.
[in] iCurrent - New signal level. See ALP_MBL_NETWORK_SIGNAL_LEVEL_XXX defines.

typedef unsigned char AlpMblNetworkStatus
 

typedef void(* AlpMblNetworkStatusChangeCallbackPtr)(void *iUserDataP, AlpMblNetworkId iNetworkId, AlpMblNetworkStatus iPrevious, AlpMblNetworkStatus iCurrent, AlpMblNetworkAccessTechnology iAccessTechnology, AlpMblNetworkDeniedInformation iDeniedInformation)
 

Callback prototype for ALP_MBL_NETWORK_NOTIFICATION_STATUS_CHANGE notification.

Parameters:
[in] iUserDataP - A pointer to user data info, given with the alp_mbl_add_observers() function call.
[in] iNetworkId - Id of the network that the status has changed.
[in] iPrevious - Previous status of the network. See ALP_MBL_NETWORK_STATUS_XXX defines.
[in] iCurrent - New status of the network. See ALP_MBL_NETWORK_STATUS_XXX defines.
[in] iAccessTechnology - The access technology of the network.
[in] iDeniedInformation - Extra information if the new network status is ALP_MBL_NETWORK_STATUS_DENIED. Otherwise, 0. See ALP_MBL_NETWORK_DENIED_XXX defines.

typedef struct _AlpMblNetworkTime AlpMblNetworkTime
 

Network Time.

typedef void(* AlpMblNetworkTimeAvailableCallbackPtr)(void *iUserDataP, AlpMblNetworkId iNetworkId, AlpMblNetworkTime iNetworkTime)
 

Callback prototype for ALP_MBL_NETWORK_NOTIFICATION_NETWORK_TIME_AVAILABLE notification.

Parameters:
[in] iUserDataP - A pointer to user data info, given with the alp_mbl_add_observers() function call.
[in] iNetworkId - Id of the network that its network time is available.
[in] iNetworkTime - The new network time.


Function Documentation

alp_status_t alp_mbl_network_get_available_operators AlpMblNetworkId  iNetworkId,
AlpMblOperatorList oOperatorListP
 

Return the available operators for a network.

Parameters:
[in] iNetworkId - Id of the network to get the available operators.
[out] oOperatorListP - Pointer to an AlpMblOperatorList, to store the list of available operators upon return.
Returns:
ALP_STATUS_OK - The available operators has been retrieved successfully.

ALP_STATUS_MBL_IPC_ERROR - Communication problem between library and server.

ALP_STATUS_MBL_MEMORY_ERROR - System is out of enough memory.

ALP_STATUS_MBL_INVALID_OBJECT - iNetworkId is invalid, there is no network with this id.

ALP_STATUS_MBL_INVALID_PARAMETER - oOperatorListP is NULL, and it's not valid.

ALP_STATUS_MBL_VALUE_NOT_AVAILABLE - The available operator list is not yet available. Check for the notification ALP_MBL_NETWORK_NOTIFICATION_AVAILABLE_OPERATORS_CHANGE.

Since:
ALP iSDK 1.0

alp_status_t alp_mbl_network_get_denied_information AlpMblNetworkId  iNetworkId,
AlpMblNetworkDeniedInformation oInformationP
 

Return more info when the network is denied. This information depends on the type of network.

Parameters:
[in] iNetworkId - Id of the network to get the mobile context id.
[out] oInformationP - Pointer to an AlpMblNetworkDeniedInformation, to store the information. See defines ALP_MBL_NETWORK_XXX_DENIED_XXX
Returns:
ALP_STATUS_OK - The mobile context id has been retrieved successfully.

ALP_STATUS_MBL_IPC_ERROR - Communication problem between library and server.

ALP_STATUS_MBL_MEMORY_ERROR - System is out of enough memory.

ALP_STATUS_MBL_INVALID_OBJECT - iNetworkId is invalid, there is no network with this id, or the network status is not ALP_MBL_NETWORK_STATUS_DENIED.

ALP_STATUS_MBL_INVALID_PARAMETER - oInformationP is NULL, and it's not valid.

Since:
ALP iSDK 1.0

alp_status_t alp_mbl_network_get_mobile_context AlpMblNetworkId  iNetworkId,
AlpMblContextId oContextIdP
 

Return the mobile context id attached to a network.

Parameters:
[in] iNetworkId - Id of the network to get the mobile context id.
[out] oContextIdP - Pointer to an AlpMblContextId, to store the mobile context id upon return.
Returns:
ALP_STATUS_OK - The mobile context id has been retrieved successfully.

ALP_STATUS_MBL_IPC_ERROR - Communication problem between library and server.

ALP_STATUS_MBL_MEMORY_ERROR - System is out of enough memory.

ALP_STATUS_MBL_INVALID_OBJECT - iNetworkId is invalid, there is no network with this id.

ALP_STATUS_MBL_INVALID_PARAMETER - oContextIdP is NULL, and it's not valid.

Example:
The way to get the mobile conext id associated to a network is the same as the one to get the network status, so you can may a look at the sample code of the API alp_mbl_network_get_status().
Since:
ALP iSDK 1.0

alp_status_t alp_mbl_network_get_network_time AlpMblNetworkId  iNetworkId,
AlpMblNetworkTime oNetworkTimeP
 

Return the time of a network.

Parameters:
[in] iNetworkId - Id of the network to get the time.
[out] oNetworkTimeP - Pointer to an AlpMblNetworkTime, to store the network time upon return.
Returns:
ALP_STATUS_OK - The network time has been retrieved successfully.

ALP_STATUS_MBL_IPC_ERROR - Communication problem between library and server.

ALP_STATUS_MBL_MEMORY_ERROR - System is out of enough memory.

ALP_STATUS_MBL_INVALID_OBJECT - iNetworkId is invalid, there is no network with this id.

ALP_STATUS_MBL_INVALID_PARAMETER - oNetworkTimeP is NULL, and it's not valid.

Example:
The way to get the network time is the same as the one to get the network status, so you can may a look at the sample code of the API alp_mbl_network_get_status().
Since:
ALP iSDK 1.0

alp_status_t alp_mbl_network_get_operator AlpMblNetworkId  iNetworkId,
AlpMblOperatorId oOperatorIdP
 

Return the operator id attached to a network.

Parameters:
[in] iNetworkId - Id of the network to get the operator id.
[out] oOperatorIdP - Pointer to an AlpMblOperatorId, to store the operator id upon return.
Returns:
ALP_STATUS_OK - The operator id has been retrieved successfully.

ALP_STATUS_MBL_IPC_ERROR - Communication problem between library and server.

ALP_STATUS_MBL_MEMORY_ERROR - System is out of enough memory.

ALP_STATUS_MBL_INVALID_OBJECT - iNetworkId is invalid, there is no network with this id.

ALP_STATUS_MBL_INVALID_PARAMETER - oOperatorIdP is NULL, and it's not valid.

ALP_STATUS_MBL_VALUE_NOT_AVAILABLE - The operator id is not yet available, the network is in search mode. Check for the notification ALP_MBL_NETWORK_NOTIFICATION_OPERATOR_CHANGE.

Since:
ALP iSDK 1.0

alp_status_t alp_mbl_network_get_preferred_operators AlpMblNetworkId  iNetworkId,
AlpMblOperatorList oOperatorListP
 

Return the preferred operators for a network.

Parameters:
[in] iNetworkId - Id of the network to get the preferred operators.
[out] oOperatorListP - Pointer to an AlpMblOperatorList, to store the list of preferred operators upon return.
Returns:
ALP_STATUS_OK - The preferred operators has been retrieved successfully.

ALP_STATUS_MBL_IPC_ERROR - Communication problem between library and server.

ALP_STATUS_MBL_MEMORY_ERROR - System is out of enough memory.

ALP_STATUS_MBL_INVALID_OBJECT - iNetworkId is invalid, there is no network with this id.

ALP_STATUS_MBL_INVALID_PARAMETER - oOperatorListP is NULL, and it's not valid.

ALP_STATUS_MBL_VALUE_NOT_AVAILABLE - The preferred operator list is not yet available. Check for the notification ALP_MBL_NETWORK_NOTIFICATION_AVAILABLE_OPERATORS_CHANGE.

Since:
ALP iSDK 1.0

alp_status_t alp_mbl_network_get_registration_mode AlpMblNetworkId  iNetworkId,
uint8_t *  oRegistrationModeP
 

Get the operator registration mode of the network. It will be used during the phone on phase, to register to the network.

Parameters:
[in] iNetworkId - Id of the network to get the mobile context id.
[out] oRegistrationModeP - Pointer to an uint8_t, to store the registration mode: ALP_MBL_NETWORK_REGISTRATION_MODE_AUTOMATIC or ALP_MBL_NETWORK_REGISTRATION_MODE_MANUAL.
Returns:
ALP_STATUS_OK - The mobile context id has been retrieved successfully.

ALP_STATUS_MBL_IPC_ERROR - Communication problem between library and server.

ALP_STATUS_MBL_MEMORY_ERROR - System is out of enough memory.

ALP_STATUS_MBL_INVALID_OBJECT - iNetworkId is invalid, there is no network with this id, or the network status is not ALP_MBL_NETWORK_STATUS_DENIED.

ALP_STATUS_MBL_INVALID_PARAMETER - oRegistrationModeP is NULL, and it's not valid.

Since:
ALP iSDK 1.1

alp_status_t alp_mbl_network_get_signal_level AlpMblNetworkId  iNetworkId,
AlpMblNetworkSignalLevel oNetworkSignalLevelP
 

Return the signel level of a network.

Parameters:
[in] iNetworkId - Id of the network to get the signal level.
[out] oNetworkSignalLevelP - Pointer to an AlpMblNetworkSignalLevel, to store the signal level upon return.
Returns:
ALP_STATUS_OK - The signal level has been retrieved successfully.

ALP_STATUS_MBL_IPC_ERROR - Communication problem between library and server.

ALP_STATUS_MBL_MEMORY_ERROR - System is out of enough memory.

ALP_STATUS_MBL_INVALID_OBJECT - iNetworkId is invalid, there is no network with this id.

ALP_STATUS_MBL_INVALID_PARAMETER - oNetworkSignalLevelP is NULL, and it's not valid.

Example:
The way to get the network signal level is the same as the one to get the network status, so you can may a look at the sample code of the API alp_mbl_network_get_status().
Since:
ALP iSDK 1.0

alp_status_t alp_mbl_network_get_status AlpMblNetworkId  iNetworkId,
AlpMblNetworkStatus oNetworkStatusP,
AlpMblNetworkAccessTechnology oNetworkAccessTechnologyP
 

Return the status of a network and its access technology.

Parameters:
[in] iNetworkId - Id of the network to get the status.
[out] oNetworkStatusP - Pointer to an AlpMblNetworkStatus, to store the status upon return. Could be NULL to get only the access technology.
[out] oNetworkAccessTechnologyP - Pointer to an AlpMblNetworkAccessTechnology, to store the access technology upon return. Could be NULL to get only the status.
Returns:
ALP_STATUS_OK - The status has been retrieved successfully.

ALP_STATUS_MBL_IPC_ERROR - Communication problem between library and server.

ALP_STATUS_MBL_MEMORY_ERROR - System is out of enough memory.

ALP_STATUS_MBL_INVALID_OBJECT - iNetworkId is invalid, there is no network with this id.

ALP_STATUS_MBL_INVALID_PARAMETER - Both oNetworkStatusP and oNetworkAccessTechnologyP are NULL, and it's not valid.

Example:
An example of getting the status of a network. To see the code of the function prv_get_network_id, you have to look at the sample code of the function alp_mbl_context_get_network_id().
#include <stdio.h>
#include <alp/mobile.h>
#include <alp/mobile_network.h>
#include <alp/errormgr.h>

alp_status_t prv_get_network_status(AlpMblNetworkStatus* oNetworkStatusP)
{
        AlpMblNetworkId networkId;
        alp_status_t    err;

        if ((err = prv_get_network_id(&networkId)) != ALP_STATUS_OK)
        {
                printf("prv_get_network_id failed with error: %s.\n", alp_err_get_string(err, true));
                return err;
        }

        printf("The id of the network associated with the default context is %d.\n", networkId);

        if ((err = alp_mbl_network_get_status(networkId, oNetworkStatusP, NULL)) != ALP_STATUS_OK)
        {
                printf("alp_mbl_network_get_status failed with error: %s.\n", alp_err_get_string(err, true));
                return err;
        }

        switch (*oNetworkStatusP)
        {
        case ALP_MBL_NETWORK_STATUS_UNREGISTERED:
                printf("The network is not registered.\n");
                break;
        case ALP_MBL_NETWORK_STATUS_REGISTERED:
                printf("The network is registered to an operator.\n");
                break;
        case ALP_MBL_NETWORK_STATUS_SEARCHING:
                printf("The network is searching for an operator.\n");
                break;
        case ALP_MBL_NETWORK_STATUS_DENIED:
                printf("The network is available for emergency calls only.\n");
                break;
        case ALP_MBL_NETWORK_STATUS_UNKNOW:
                printf("The status of the network is unknown.\n");
                break;
        case ALP_MBL_NETWORK_STATUS_ROAMING:
                printf("The network is registered to an operator in roaming mode.\n");
                break;
        default:
                printf("The status of the network is unknow: %d.\n", *oNetworkStatusP);
                break;
        }

        return ALP_STATUS_OK;
}
Since:
ALP iSDK 1.0

alp_status_t alp_mbl_network_set_operator AlpMblNetworkId  iNetworkId,
AlpMblOperatorId  iOperatorId
 

Set the operator for a network. If the operator to set is 0, the Mobille Service will search the available networks, and will display a dialog through Mobile UI to ask for the user selection. Calling this API automaticaly set the registration mode to ALP_MBL_NETWORK_REGISTRATION_MODE_MANUAL.

Parameters:
[in] iNetworkId - Id of the network to set its operator.
[in] iOperatorId - Id of the operator to set. 0 to display the list of available networks.
Returns:
ALP_STATUS_OK - The operator has been set successfully.

ALP_STATUS_MBL_IPC_ERROR - Communication problem between library and server.

ALP_STATUS_MBL_MEMORY_ERROR - System is out of enough memory.

ALP_STATUS_MBL_INVALID_OBJECT - iNetworkId is invalid, there is no network with this id.

ALP_STATUS_MBL_INVALID_PARAMETER - iOperatorId is invalid, there is no operator with this id.

Since:
ALP iSDK 1.0

alp_status_t alp_mbl_network_set_registration_mode AlpMblNetworkId  iNetworkId,
uint8_t  iRegistrationMode
 

Set the operator registration mode of the network. It will be used during the phone on phase, to register to the network.

Parameters:
[in] iNetworkId - Id of the network to get the mobile context id.
[in] iRegistrationMode - An uint8_t, that is the registration mode to set: ALP_MBL_NETWORK_REGISTRATION_MODE_AUTOMATIC or ALP_MBL_NETWORK_REGISTRATION_MODE_MANUAL.
Returns:
ALP_STATUS_OK - The mobile context id has been retrieved successfully.

ALP_STATUS_MBL_IPC_ERROR - Communication problem between library and server.

ALP_STATUS_MBL_MEMORY_ERROR - System is out of enough memory.

ALP_STATUS_MBL_INVALID_OBJECT - iNetworkId is invalid, there is no network with this id, or the network status is not ALP_MBL_NETWORK_STATUS_DENIED.

ALP_STATUS_MBL_INVALID_PARAMETER - iRegistrationMode must be ALP_MBL_NETWORK_REGISTRATION_MODE_AUTOMATIC or ALP_MBL_NETWORK_REGISTRATION_MODE_MANUAL, and everything else will cause an error ALP_STATUS_MBL_INVALID_PARAMETER.

Since:
ALP iSDK 1.1


Generated on Wed Jul 30 07:06:43 2008 by Doxygen 1.4.6 for ALP SDK + Hiker Documentation

Copyright © 1999-2008 ACCESS CO., LTD. All rights reserved.