Osso Addressbook Reference Manual | ||||
---|---|---|---|---|
#define OSSO_ABOOK_SETTINGS_KEY_CONTACT_ORDER #define OSSO_ABOOK_SETTINGS_KEY_HOME_APPLETS #define OSSO_ABOOK_SETTINGS_KEY_LAST_IMSI #define OSSO_ABOOK_SETTINGS_KEY_NAME_ORDER #define OSSO_ABOOK_SETTINGS_KEY_SELF_CARD #define OSSO_ABOOK_SETTINGS_KEY_SELF_AVATAR_IMPORTED #define OSSO_ABOOK_SETTINGS_KEY_VOICEMAIL_VCARD #define OSSO_ABOOK_SETTINGS_KEY_VOICEMAIL_NUMBERS #define OSSO_ABOOK_SETTINGS_KEY_MAP_HELPER #define OSSO_ABOOK_SETTINGS_KEY_VIDEO_BUTTON #define OSSO_ABOOK_SETTINGS_KEY_SMS_BUTTON #define OSSO_ABOOK_SETTINGS_KEY_SPEED_DIAL_DIR #define OSSO_ABOOK_SETTINGS_KEY_VOICEMAIL_INDEX enum OssoABookContactOrder; enum OssoABookNameOrder; OssoABookVoicemailNumber; OssoABookVoicemailNumber* osso_abook_voicemail_number_new (const char *phone_number, const char *operator_id, const char *operator_name); void osso_abook_voicemail_number_free (OssoABookVoicemailNumber *number); void osso_abook_voicemail_number_list_free (GSList *list); GConfClient* osso_abook_get_gconf_client (void); OssoABookContactOrder osso_abook_settings_get_contact_order (void); GSList* osso_abook_settings_get_home_applets (void); OssoABookNameOrder osso_abook_settings_get_name_order (void); const char* osso_abook_settings_get_picture_folder (void); GSList* osso_abook_settings_get_voicemail_numbers (void); char* osso_abook_settings_get_map_helper (void); gboolean osso_abook_settings_get_video_button (void); gboolean osso_abook_settings_get_sms_button (void); gboolean osso_abook_settings_set_contact_order (OssoABookContactOrder order); gboolean osso_abook_settings_set_home_applets (GSList *list); gboolean osso_abook_settings_set_name_order (OssoABookNameOrder order); gboolean osso_abook_settings_set_voicemail_numbers (GSList *numbers); gboolean osso_abook_settings_set_map_helper (const char *helper); gboolean osso_abook_settings_set_video_button (gboolean enabled); gboolean osso_abook_settings_set_sms_button (gboolean enabled); gboolean osso_abook_settings_get_self_avatar_imported (void); gboolean osso_abook_settings_set_self_avatar_imported (gboolean imported);
This module provides functions that allow you to access and modify the settings of the addressbook
typedef enum { OSSO_ABOOK_CONTACT_ORDER_NONE = -1, OSSO_ABOOK_CONTACT_ORDER_NAME, /* Sort by name */ OSSO_ABOOK_CONTACT_ORDER_PRESENCE, /* Sort by presence, then name */ OSSO_ABOOK_CONTACT_ORDER_CUSTOM, } OssoABookContactOrder;
The sorting modes of a OssoABookListStore.
OSSO_ABOOK_CONTACT_ORDER_NONE
|
Don't sort at all. |
OSSO_ABOOK_CONTACT_ORDER_NAME
|
Sort by (display) name. |
OSSO_ABOOK_CONTACT_ORDER_PRESENCE
|
Sort by presence, then name. |
OSSO_ABOOK_CONTACT_ORDER_CUSTOM
|
Use custom OssoABookListStoreCompareFunc for sorting. |
typedef enum { OSSO_ABOOK_NAME_ORDER_FIRST, OSSO_ABOOK_NAME_ORDER_LAST, OSSO_ABOOK_NAME_ORDER_LAST_SPACE, OSSO_ABOOK_NAME_ORDER_NICK, } OssoABookNameOrder;
Preferred order for name components for sorting and display.
typedef struct { char *phone_number; char *operator_id; char *operator_name; } OssoABookVoicemailNumber;
Description of a voicemail box number. The operator_id
consists of the
operator's mobile country code (MCC) and the mobile network code (MNC).
It is equal to the first five numbers of the IMSI numbers issued by the
operator.
char *phone_number ; |
the phone number, e.g. "+491725500" |
char *operator_id ; |
the operator ID, e.g. "26202" |
char *operator_name ; |
the operator name, e.g. "Vodafone.de" |
OssoABookVoicemailNumber* osso_abook_voicemail_number_new (const char *phone_number, const char *operator_id, const char *operator_name);
Creates a new OssoABookVoicemailNumber object. If only operator_id
is
passed, but operator_name
is NULL
attempts are made to lookup the operator
name from GSM network.
phone_number : |
the phone number |
operator_id : |
the numeric operator ID consisting of MCC and MNC, or NULL
|
operator_name : |
the operator name, or NULL
|
Returns : | A new OssoABookVoicemailNumber. Free with
osso_abook_voicemail_number_free() when done.
|
void osso_abook_voicemail_number_free (OssoABookVoicemailNumber *number);
Releases a OssoABookVoicemailNumber object.
number : |
the OssoABookVoicemailNumber, or NULL
|
void osso_abook_voicemail_number_list_free (GSList *list);
Releases a list of OssoABookVoicemailNumber instances.
number : |
the voicemail number list |
GConfClient* osso_abook_get_gconf_client (void);
Retrieves the GConf client used by the library.
OssoABookContactOrder osso_abook_settings_get_contact_order (void);
Retrieves the stored sort key for OssoABookListStore.
GSList* osso_abook_settings_get_home_applets (void);
Gets the list of contacts to be displayed as shortcuts on the desktop.
Third-party applications should not generally need to use this function. Use
osso_abook_contact_shortcut_exists()
to check whether a particular contact
already is in the list.
Returns : | An allocated list of strings representing contacts that are displayed on the desktop. The list and its contents should be freed when no longer needed. |
OssoABookNameOrder osso_abook_settings_get_name_order (void);
Retrieves the stored display name format for contacts in the addressbook
const char* osso_abook_settings_get_picture_folder (void);
Find the prefered picture folder. First checks the Camera application's settings and resorts to the safe image folder if the camera folder is not available.
Returns : | The path of the prefered image folder when available, and
NULL otherwise. This string is owned by the library and must not be
freed.
|
GSList* osso_abook_settings_get_voicemail_numbers (void);
Gets the list of recently used voicemail numbers as OssoABookVoicemailNumber list.
Returns : | An allocated list of OssoABookVoicemailNumber elements.
The list and its contents should be freed when no longer needed
by calling osso_abook_voicemail_number_list_free() .
|
char* osso_abook_settings_get_map_helper (void);
Find the prefered map helper program.
Map helpers are little programs
installed in /usr/lib/osso-addressbook/map-helpers
.
When starting a OSSO_ABOOK_CONTACT_ACTION_MAP action libosso-abook passes
the requested location within some environment variables:
VCARD_ADR_POBOX |
P/O box of the address |
VCARD_ADR_EXT |
Address extension, e.g. c/o or appartement number |
VCARD_ADR_STREET |
street name of the address including house number |
VCARD_ADR_CITY |
city name of the address |
VCARD_ADR_REGION |
region name of the address |
VCARD_ADR_ZIP |
postal code of the address |
VCARD_ADR_COUNTRY |
country name of the address |
VCARD_ADR_FULL |
comma separated list of all non-empty address components |
Returns : | The name of the prefered map helper program. This string is is allocated and must be freed when no longer needed. |
gboolean osso_abook_settings_get_video_button (void);
Returns : | TRUE if video button must be shown in the contact starter, FALSE
otherwise.
|
gboolean osso_abook_settings_get_sms_button (void);
Returns : | TRUE if SMS button must be shown only for mobiles in the contact
starter, FALSE otherwise.
|
gboolean osso_abook_settings_set_contact_order (OssoABookContactOrder order);
Sets up the sort key for OssoABookListStore.
mode : |
OssoABookContactOrder |
Returns : | TRUE if the operation was successful, FALSE otherwise.
|
gboolean osso_abook_settings_set_home_applets (GSList *list);
Sets the list of contacts to displayed as shortcuts on the desktop.
Third-party applications should not need to use this function, use
osso_abook_contact_shortcut_create()
instead.
list : |
the new list of home applet ids |
Returns : | TRUE if successful, else FALSE
|
gboolean osso_abook_settings_set_name_order (OssoABookNameOrder order);
Sets up the display name format for contacts in the addressbook
order : |
OssoABookNameOrder |
Returns : | TRUE if the operation was successful, FALSE otherwise.
|
gboolean osso_abook_settings_set_voicemail_numbers (GSList *numbers);
Updates the list of recently used voicemail numbers. The numbers are passed as OssoABookVoicemailNumber list.
list : |
the new list of voicemail numbers |
Returns : | TRUE if successful, else FALSE
|
gboolean osso_abook_settings_set_map_helper (const char *helper);
Sets up the program used for showing maps.
See osso_abook_settings_get_map_helper()
for details about map helpers.
helper : |
name of the map-helper program |
Returns : | TRUE if the operation was successful, FALSE otherwise.
|
gboolean osso_abook_settings_set_video_button (gboolean enabled);
If enabled
is TRUE
, video button will be shown in contact starter.
enabled : |
new value |
Returns : | TRUE if the operation was successful, FALSE otherwise.
|
gboolean osso_abook_settings_set_sms_button (gboolean enabled);
If enabled
is TRUE
, SMS button will be shown only for mobiles in
contact starter.
enabled : |
new value |
Returns : | TRUE if the operation was successful, FALSE otherwise.
|
gboolean osso_abook_settings_get_self_avatar_imported (void);
osso_abook_settings_get_self_avatar_imported
is deprecated and should not be used in newly-written code.