LinuxSDK  V1.4.0.5
SwiApiGsmPhonebook.c File Reference

Source code for GSM APIs related to Phonebook Maintenance. More...

#include "SwiApiGsmPhonebook.h"
#include "ap/apidefs.h"

Functions

SWI_API SWI_RCODE SwiDeletePhonebookLastNum (const enum SWI_TYPE_Phonebook ePhoneBookType, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetPhonebookEntryExp (struct SWI_STRUCT_PHONEBK_Entry *sPhonebookp, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiAddPhonebookEntryExp (struct SWI_STRUCT_PHONEBK_Entry *sPhonebookp, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiEditPhonebookEntryExp (struct SWI_STRUCT_PHONEBK_Entry *Phonebookp, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetPhonebookAvailable (struct SWI_STRUCT_PHONEBK_Available *Phonebookp, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetPhonebookSize (struct SWI_STRUCT_PHONEBK_Size *Phonebookp, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetEmergencyEntry (struct SWI_STRUCT_Emergency_Number *EmergencyNumberp, swi_bool bFirst, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiDeletePhonebookEntry (struct SWI_STRUCT_PHONEBK_DeleteEntry *Phonebookp, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiGetFdnMode (swi_bool *FdnEnabledp, swi_uint32 timeout)
 
SWI_API SWI_RCODE SwiSetFdnMode (struct SWI_STRUCT_FdnMode *Fdnp, swi_uint32 timeout)
 

Detailed Description

Source code for GSM APIs related to Phonebook Maintenance.

Copyright: © 2011 Sierra Wireless, Inc. all rights reserved

Function Documentation

SWI_API SWI_RCODE SwiAddPhonebookEntryExp ( struct SWI_STRUCT_PHONEBK_Entry sPhonebookp,
swi_uint32  timeout 
)

Use this function to add a phonebook entry.

This function should not be called until the SWI_NOTIFY_PhonebookReady has been received indicating phonebooks are ready.

Parameters
Phonebookp,:[IN/OUT] Phonebook entry to be added. The structure size, phonebook type, name, and number must be supplied by the caller. The phonebook entry ID is returned in the same structure and should be stored to be used to for modify or deleting the entry later.
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid. See Phonebookp->eResultCode for result of the operation.
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_PHONEBK_Entry
SWI_NOTIFY_PhonebookReady
SwiGetPhonebookEntry
SwiEditPhonebookEntry
SwiDeletePhonebookEntry
SwiDeletePhonebookLastNum
SWI_API SWI_RCODE SwiDeletePhonebookEntry ( struct SWI_STRUCT_PHONEBK_DeleteEntry Phonebookp,
swi_uint32  timeout 
)

Use this function to delete a phonebook entry.

This function should not be called until the SWI_NOTIFY_PhonebookReady has been received indicating phonebooks are ready.

Parameters
Phonebookp,:[IN/OUT] Phonebook entry to be deleted. The structure size, phonebook entry, and phonebook type must be supplied by the caller.
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid. See Phonebookp->eResultCode for result of the operation.
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_PHONEBK_DeleteEntry
SWI_NOTIFY_PhonebookReady
SwiGetPhonebookEntry
SwiAddPhonebookEntry
SwiEditPhonebookEntry
SwiDeletePhonebookLastNum
SWI_API SWI_RCODE SwiDeletePhonebookLastNum ( const enum SWI_TYPE_Phonebook  ePhoneBookType,
swi_uint32  timeout 
)

Use this function to clear the entire last numbers dialed, last numbers missed or last numbers received phonebooks.

This function should not be called until the SWI_NOTIFY_PhonebookReady has been received indicating phonebooks are ready.

Parameters
ePhoneBookType,:[IN] Phonebook to be cleared
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See SWI_RCODE for other error return codes.
See Also
SWI_TYPE_Phonebook
SWI_NOTIFY_PhonebookReady
SwiGetPhonebookEntry
SwiAddPhonebookEntry
SwiEditPhonebookEntry
SwiDeletePhonebookEntry
SWI_API SWI_RCODE SwiEditPhonebookEntryExp ( struct SWI_STRUCT_PHONEBK_Entry Phonebookp,
swi_uint32  timeout 
)

This function is used to modify an existing phonebook entry.

This function should not be called until the SWI_NOTIFY_PhonebookReady has been received indicating phonebooks are ready.

The phonebook entry must be known ahead of time (either returned from SwiAddPhonebookEntry or SwiGetPhonebookEntry).

Parameters
Phonebookp,:[IN/OUT] Replacement phonebook entry. The structure size, phonebook entry, phonebook type, name, and number must be supplied by the caller.
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid. See Phonebookp->eResultCode for result of the operation.
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_PHONEBK_Entry
SWI_NOTIFY_PhonebookReady
SwiGetPhonebookEntry
SwiAddPhonebookEntry
SwiDeletePhonebookEntry
SwiDeletePhonebookLastNum
SWI_API SWI_RCODE SwiGetEmergencyEntry ( struct SWI_STRUCT_Emergency_Number EmergencyNumberp,
swi_bool  bFirst,
swi_uint32  timeout 
)

The modem contains a list of emergency numbers. This function is used to fetch the emergency numbers one at a time. Set the first flag when calling this function to retrieve the first entry in the list. To retrieve the entire list call this function repeatedly.

This function sends a request to the modem. The modem's response will contain an emergency number string and indicate if this is the last number in the list.

Parameters
EmergencyNumberp,:[IN/OUT] Phonebook entry
bfirst,:[IN] First emergency number flag (this flag should only be set the first time this function is called)
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request is being processed.
SWI_RCODE_REQUEST_TIMEOUT The request has timed out
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_Emergency_Number
SWI_API SWI_RCODE SwiGetFdnMode ( swi_bool FdnEnabledp,
swi_uint32  timeout 
)

This function is used to request the fixed number dialing (FDN) mode from the modem.

Parameters
pFdnEnabled,:[OUT] True if FDN is enabled, false otherwise.
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See SWI_RCODE for other error return codes.
See Also
SwiSetFdnMode
SWI_API SWI_RCODE SwiGetPhonebookAvailable ( struct SWI_STRUCT_PHONEBK_Available Phonebookp,
swi_uint32  timeout 
)

This function is used to determine what phonebooks are available.

This function should only be called after a SWI_NOTIFY_PhonebookReady notification has been received indicating phonebooks are ready.

Parameters
Phonebookp,:[OUT] Phonebook availability status
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_PHONEBK_Available
SWI_NOTIFY_PhonebookReady
SWI_API SWI_RCODE SwiGetPhonebookEntryExp ( struct SWI_STRUCT_PHONEBK_Entry sPhonebookp,
swi_uint32  timeout 
)

This function is used to retrieve a phonebook entry.

This function should not be called until the SWI_NOTIFY_PhonebookReady has been received indicating phonebooks are ready.

There are several different phonebooks on the modem and SIM. This function can request either the first or next entry be read from a particular phonebook. To get the entire contents of a phonebook call this function requesting the first entry and then repeatedly request the next entry for all subsequent function calls.

Parameters
Phonebookp,:[IN/OUT] Phonebook entry information. The structure size, phonebook type, and bReadFromStart flag must be populated by the caller. The other fields are returned from the modem. Note that you can not read a phonebook entry directly by specifying the entry ID.
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid. See Phonebookp->eResultCode for result of the operation.
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_PHONEBK_Entry
SWI_NOTIFY_PhonebookReady
SwiAddPhonebookEntry
SwiEditPhonebookEntry
SwiDeletePhonebookEntry
SwiDeletePhonebookLastNum
SWI_API SWI_RCODE SwiGetPhonebookSize ( struct SWI_STRUCT_PHONEBK_Size Phonebookp,
swi_uint32  timeout 
)

This function is used to query the number of remaining free entries and the size of all of the phonebooks on the SIM.

This function should not be called until the SWI_NOTIFY_PhonebookReady has been received indicating phonebooks are ready.

Parameters
Phonebookp,:[OUT] Phonebook size
timeout,:[IN] Response timeout value in milliseconds
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See SWI_RCODE for other error return codes.
See Also
SWI_STRUCT_PHONEBK_Size
SWI_NOTIFY_PhonebookReady
SWI_API SWI_RCODE SwiSetFdnMode ( struct SWI_STRUCT_FdnMode Fdnp,
swi_uint32  timeout 
)

This function is used to set the fixed number dialing (FDN) mode from the modem. Before calling this function, CHV2 must be verified. CHV2 is prompted for by calling SwiChv2StatusKick.

Parameters
Fdnp,:[IN/OUT] Set bEnabled to true to enable FDN, false otherwise. eResultCode contains the result of the request.
timeout,:[IN] Response timeout value in milliseconds.
Returns
SWI_RCODE_OK: The request has been processed and values returned are valid.
See SWI_RCODE for other error return codes.
See Also
SwiSetFdnMode

Linux SDK V1.4.0.5
Copyright (c) 2011 Sierra Wireless, Inc. All rights reserved