![]() |
![]() |
![]() |
libRAL Reference Manual | ![]() |
---|
RubricaAbookRubricaAbook — |
#define RUBRICA_ABOOK_TYPE #define RUBRICA_ABOOK (obj) #define RUBRICA_ABOOK_CLASS (klass) #define IS_RUBRICA_ABOOK (obj) #define IS_RUBRICA_ABOOK_CLASS (klass) #define RUBRICA_ABOOK_GET_CLASS (klass) RubricaAbookPrivate; GType rubrica_abook_get_type (void); RubricaAbook* rubrica_abook_new (void); void rubrica_abook_free (RubricaAbook *abook); gboolean rubrica_abook_open_file (RubricaAbook *abook, gchar *fname); gboolean rubrica_abook_save_file (RubricaAbook *abook, gchar *fname); RubricaAbook* rubrica_abook_copy (RubricaAbook *abook); void rubrica_abook_set_name (RubricaAbook *abook, gchar *name); void rubrica_abook_set_path (RubricaAbook *abook, gchar *path); gchar* rubrica_abook_get_name (RubricaAbook *abook); gchar* rubrica_abook_get_path (RubricaAbook *abook); gint rubrica_abook_get_items (RubricaAbook *abook); void rubrica_abook_add_card (RubricaAbook *abook, gpointer card); void rubrica_abook_remove_card (RubricaAbook *abook, gpointer card); void rubrica_abook_replace_card (RubricaAbook *abook, gpointer old, gpointer new); gpointer rubrica_abook_get_card_by_id (RubricaAbook *abook, gchar *id); gpointer rubrica_abook_get_selected_card (RubricaAbook *abook); gpointer rubrica_abook_get_card (RubricaAbook *abook); gpointer rubrica_abook_get_next_card (RubricaAbook *abook); gpointer rubrica_abook_get_prev_card (RubricaAbook *abook); void rubrica_abook_reset_book (RubricaAbook *abook); GList* rubrica_abook_find_cards_in_group (RubricaAbook *abook, gchar *group_name); void rubrica_abook_set_selected_card_id (RubricaAbook *abook, gchar *id); gchar* rubrica_abook_get_selected_card_id (RubricaAbook *abook);
RubricaAbook* rubrica_abook_new (void);
create a RubricaAbook
Returns : | a new RubricaAbook |
void rubrica_abook_free (RubricaAbook *abook);
free the RubricaAbook
abook : |
a RubricaAbook |
gboolean rubrica_abook_open_file (RubricaAbook *abook, gchar *fname);
open the addressbook with given name
abook : |
a RubricaAbook |
fname : |
the name of the addressbook |
Returns : | TRUE if file is opened successfully, FALSE otherwise
|
gboolean rubrica_abook_save_file (RubricaAbook *abook, gchar *fname);
save the addressbook with given filename
abook : |
a RubricaAbook |
fname : |
the name of file |
Returns : | TRUE if file is saved successfully, FALSE otherwise
|
RubricaAbook* rubrica_abook_copy (RubricaAbook *abook);
copy the addressbook pointed by abook
abook : |
a RubricaAbook |
Returns : | a new RubricaAbook |
void rubrica_abook_set_name (RubricaAbook *abook, gchar *name);
set the name of addressbook
abook : |
a RubricaAbook |
name : |
the name of the addressbook |
void rubrica_abook_set_path (RubricaAbook *abook, gchar *path);
set the path of addressbook
abook : |
a RubricaAbook |
path : |
the addressbook's path |
gchar* rubrica_abook_get_name (RubricaAbook *abook);
get the address book's name. Caller must free the returned value
abook : |
a RubricaAbook |
Returns : | a gchar* |
gchar* rubrica_abook_get_path (RubricaAbook *abook);
get the path of addressbok. Caller must free the returned value
abook : |
a RubricaAbook |
Returns : | a gchar* |
gint rubrica_abook_get_items (RubricaAbook *abook);
get the number of cards into addressbok
abook : |
a RubricaAbook |
Returns : | integer |
void rubrica_abook_add_card (RubricaAbook *abook, gpointer card);
append the given card into the addressbook
abook : |
a RubricaAbook |
card : |
a RubricaPersonalCard or RubricaCompanyCard object |
void rubrica_abook_remove_card (RubricaAbook *abook, gpointer card);
remove the given card from addressbook
abook : |
a RubricaAbook |
card : |
a RubricaPersonalCard or RubricaCompanyCard object |
void rubrica_abook_replace_card (RubricaAbook *abook, gpointer old, gpointer new);
replace the old card with the new one
abook : |
a RubricaAbook |
old : |
a RubricaPersonalCard or RubricaCompanyCard object |
new : |
a RubricaPersonalCard or RubricaCompanyCard object |
gpointer rubrica_abook_get_card_by_id (RubricaAbook *abook, gchar *id);
get the card with "id" id
abook : |
a RubricaAbook |
id : |
the card id |
Returns : | a pointer to the card or NULL if addressbook doesn't own that card |
gpointer rubrica_abook_get_selected_card (RubricaAbook *abook);
abook : |
|
Returns : |
gpointer rubrica_abook_get_card (RubricaAbook *abook);
Get the first card in addressbook.
abook : |
a RubricaAbook |
Returns : | a pointer to the card or NULL if addressbook is empty |
gpointer rubrica_abook_get_next_card (RubricaAbook *abook);
get the next card in addressbook
abook : |
a RubricaAbook |
Returns : | a pointer to the card or NULL if the cards's end list is reached. |
gpointer rubrica_abook_get_prev_card (RubricaAbook *abook);
get the previous card in addressbook
abook : |
a RubricaAbook |
Returns : | a pointer to the card or NULL if the cards's head list is reached. |
void rubrica_abook_reset_book (RubricaAbook *abook);
reset the private addressbook iterator. The iterator will point the head of cards's list.
abook : |
a RubricaAbook |
GList* rubrica_abook_find_cards_in_group (RubricaAbook *abook, gchar *group_name);
Find all cards that belongs to the given group. Found cards's ID has inserted in a GList. Caller must free returned GList
abook : |
a RubricaAbook |
group_name : |
the name of the group |
Returns : | a GList* |
void rubrica_abook_set_selected_card_id (RubricaAbook *abook, gchar *id);
store the id of currently active card
abook : |
a RubricaAbook |
id : |
the card's id |
gchar* rubrica_abook_get_selected_card_id (RubricaAbook *abook);
get the id of the active card. Caller must free the returned value (DEPRECATED)
abook : |
a RubricaAbook |
Returns : | a gchar* |
<< RubricaCsv | RubricaVCard >> |