![]() |
![]() |
![]() |
[Insert name here] Reference Manual | ![]() |
---|---|---|---|---|
#define R_ABOOK_TYPE #define R_ABOOK (obj) #define R_ABOOK_CLASS (klass) #define IS_R_ABOOK (obj) #define IS_R_ABOOK_CLASS (klass) #define R_ABOOK_GET_CLASS (klass) RAbookPrivate; RAbook; GType r_abook_get_type (void); RAbook* r_abook_new (void); void r_abook_free (RAbook *abook); gboolean r_abook_open_file (RAbook *abook, gchar *fname); gboolean r_abook_save_file (RAbook *abook, gchar *fname); gboolean r_abook_overwrite_file (RAbook *abook); RAbook* r_abook_copy (RAbook *abook); gboolean r_abook_load_plugin (RAbook *abook, const gchar *name); gpointer r_abook_get_plugin (RAbook *abook); gint r_abook_get_items (RAbook *abook); void r_abook_add_card (RAbook *abook, RCard *card); void r_abook_replace_card (RAbook *abook, RCard *old, RCard *new); gpointer r_abook_get_card_by_id (RAbook *abook, glong id); gpointer r_abook_get_selected_card (RAbook *abook); void r_abook_foreach_card (RAbook *abook, RFunc func, gpointer data); gpointer r_abook_get_card (RAbook *abook); gpointer r_abook_get_next_card (RAbook *abook); gpointer r_abook_get_prev_card (RAbook *abook); void r_abook_reset_book (RAbook *abook); GList* r_abook_find_cards_in_group (RAbook *abook, gchar *group_name);
"addressbook-name" gchararray : Read / Write / Construct "addressbook-path" gchararray : Read / Write / Construct "deleted-cards" gint : Read "selected-id" glong : Read / Write / Construct
"addressbook-changed" void user_function (RAbook *rabook, gpointer user_data) : Run last "addressbook-closed" void user_function (RAbook *rabook, gpointer user_data) : Run last "addressbook-read" void user_function (RAbook *abook, gpointer user_data) : Run last "addressbook-saved" void user_function (RAbook *rabook, gpointer user_data) : Run last "card-added" void user_function (RAbook *abook, gpointer data, gpointer user_data) : Run last "card-destroyed" void user_function (RAbook *abook, gpointer user_data) : Run last "card-read" void user_function (RAbook *abook, gpointer data, gpointer user_data) : Run last "card-recovered" void user_function (RAbook *rabook, gpointer arg1, gpointer user_data) : Run last "card-removed" void user_function (RAbook *abook, gpointer arg1, gpointer user_data) : Run last "card-replaced" void user_function (RAbook *abook, gpointer data, gpointer user_data) : Run last "open-fail" void user_function (RAbook *abook, gint err, gpointer user_data) : Run last "save-fail" void user_function (RAbook *abook, gint err, gpointer user_data) : Run last
void r_abook_free (RAbook *abook);
free the RAbook The "addressbook_closed" signal is emitted
abook : |
a RAbook |
gboolean r_abook_open_file (RAbook *abook, gchar *fname);
open the addressbook with given name
gboolean r_abook_save_file (RAbook *abook, gchar *fname);
save the addressbook with given filename
gboolean r_abook_overwrite_file (RAbook *abook);
overwrite an existing addressbook with a new one. The old addressbook is backuped
gboolean r_abook_load_plugin (RAbook *abook, const gchar *name);
Load the "plugin_name" plugin.
gint r_abook_get_items (RAbook *abook);
get the number of cards into addressbok
abook : |
a RAbook |
Returns : | an integer |
void r_abook_add_card (RAbook *abook, RCard *card);
append the given card into the addressbook The "card_added" and "addressbook_changed" signals are emitted
void r_abook_replace_card (RAbook *abook, RCard *old, RCard *new);
replace the old card with the new one The "card_replaced" and "addressbook_changed" signals are emitted
gpointer r_abook_get_card_by_id (RAbook *abook, glong id);
get the card with "id" id
abook : |
a RAbook |
id : |
the card id |
Returns : | a pointer to the card or NULL if addressbook doesn't own that card |
gpointer r_abook_get_selected_card (RAbook *abook);
Get the selected card in the addressbook
abook : |
a RAbook |
Returns : |
void r_abook_foreach_card (RAbook *abook, RFunc func, gpointer data);
Call the function func()
for each card in the RAbook.
gpointer r_abook_get_card (RAbook *abook);
Get the first card in addressbook.
abook : |
a RAbook |
Returns : | a pointer to the card or NULL if addressbook is empty |
gpointer r_abook_get_next_card (RAbook *abook);
get the next card in addressbook
abook : |
a RAbook |
Returns : | a pointer to the card or NULL if the cards's end list is reached. |
gpointer r_abook_get_prev_card (RAbook *abook);
get the previous card in addressbook
abook : |
a RAbook |
Returns : | a pointer to the card or NULL if the cards's head list is reached. |
void r_abook_reset_book (RAbook *abook);
reset the private addressbook iterator. The iterator will point the head of cards's list.
abook : |
a RAbook |
addressbook-name
" property"addressbook-name" gchararray : Read / Write / Construct
the name (filename) of the addressbook.
Default value: "no name"
addressbook-path
" property"addressbook-path" gchararray : Read / Write / Construct
the path of the addressbook.
Default value: NULL
deleted-cards
" property"deleted-cards" gint : Read
number of cards marked as deleted in the addressbook.
Default value: 0
selected-id
" property"selected-id" glong : Read / Write / Construct
load/save the id of the selected card.
Default value: 0
void user_function (RAbook *rabook, gpointer user_data) : Run last
rabook : |
the object which received the signal. |
user_data : |
user data set when the signal handler was connected. |
void user_function (RAbook *rabook, gpointer user_data) : Run last
rabook : |
the object which received the signal. |
user_data : |
user data set when the signal handler was connected. |
void user_function (RAbook *abook, gpointer user_data) : Run last
The "addressbook-read" signal is emitted when the addressbook is read
abook : |
the RAbook object that receives the signal |
user_data : |
user data set when the signal handler was connected. |
void user_function (RAbook *rabook, gpointer user_data) : Run last
rabook : |
the object which received the signal. |
user_data : |
user data set when the signal handler was connected. |
void user_function (RAbook *abook, gpointer data, gpointer user_data) : Run last
The "card-added" signal is emitted after a card is added to addressbook. A pointer to the card is passed to the callback function
abook : |
the RAbook object that receives the signal |
data : |
a pointer to the readed card |
user_data : |
user data set when the signal handler was connected. |
void user_function (RAbook *abook, gpointer user_data) : Run last
The "card-destroyed" signal is emitted when a card is deleted from addressbook. Destroyed cards are unrecoverable.
abook : |
the RAbook object that receives the signal |
user_data : |
user data set when the signal handler was connected. |
void user_function (RAbook *abook, gpointer data, gpointer user_data) : Run last
The "card-read" signal is emitted after the addressbook has been readed
abook : |
the RAbook object that receives the signal |
data : |
a pointer to the readed card |
user_data : |
user data set when the signal handler was connected. |
void user_function (RAbook *rabook, gpointer arg1, gpointer user_data) : Run last
rabook : |
the object which received the signal. |
arg1 : |
|
user_data : |
user data set when the signal handler was connected. |
void user_function (RAbook *abook, gpointer arg1, gpointer user_data) : Run last
The "card-removed" signal is emitted when a card is (deleted) removed from addressbook. The removed cards are marked as deleted, to really delete (remove) the card you must destroy it. You can recover (deleted) removed cards. Destroyed cards are unrecoverable
abook : |
the RAbook object that receives the signal |
user_data : |
user data set when the signal handler was connected. |
void user_function (RAbook *abook, gpointer data, gpointer user_data) : Run last
The "card-replaced" signal is emitted a card replacement. A pointer to the new card is passed to the callback function
abook : |
the RAbook object that receives the signal |
data : |
a pointer to the readed card |
user_data : |
user data set when the signal handler was connected. |
void user_function (RAbook *abook, gint err, gpointer user_data) : Run last
the "open-fail" signal is emitted if the given file can't be read