![]() |
![]() |
![]() |
Libral, the Rubrica Library Reference Manual | ![]() |
---|---|---|---|---|
#define R_CARD_TYPE #define R_CARD (obj) #define R_CARD_CLASS (klass) #define IS_R_CARD (obj) #define IS_R_CARD_CLASS (klass) #define R_CARD_GET_CLASS (obj) enum RRate; RCardPrivate; RCard; GType r_card_get_type (void); RCard* r_card_new (void); void r_card_free (RCard *card); RCard* r_card_copy (RCard *card); void r_card_reassign_id (RCard *card, glong id); gboolean r_card_is_personal (RCard *card); gboolean r_card_is_deleted (RCard *card); gboolean r_card_search (RCard *card, const gchar *str); RInfos* r_card_get_infos (RCard *card); void r_card_free_infos (RInfos *infos); void r_card_add_group (RCard *card, RGroup *group); gboolean r_card_delete_group (RCard *card, gchar *name); gboolean r_card_rename_group (RCard *card, gchar *oldname, gchar *newname); gboolean r_card_has_groups (RCard *card); gpointer r_card_find_group (RCard *card, gchar *name); gboolean r_card_belong_to_group (RCard *card, const gchar *group_name); GList* r_card_get_groups_owned_by (RCard *card, const gchar *owner); RGroup* r_card_get_group (RCard *card); RGroup* r_card_get_next_group (RCard *card); RGroup* r_card_get_prev_group (RCard *card); void r_card_reset_group (RCard *card); void r_card_foreach_group (RCard *card, RFunc func, gpointer user_data); void r_card_add_address (RCard *card, RAddress *address); gboolean r_card_delete_address (RCard *card, RAddress *address); gboolean r_card_replace_address (RCard *card, RAddress *old, RAddress *new); gpointer r_card_get_address (RCard *card); gpointer r_card_get_next_address (RCard *card); gpointer r_card_get_prev_address (RCard *card); void r_card_reset_address (RCard *card); gpointer r_card_find_address (RCard *card, RAddressType type); void r_card_foreach_address (RCard *card, RFunc func, gpointer user_data); void r_card_add_net_address (RCard *card, RNetAddress *net); gboolean r_card_delete_net_address (RCard *card, RNetAddress *address); gboolean r_card_replace_net_address (RCard *card, RNetAddress *old, RNetAddress *new); gpointer r_card_get_net_address (RCard *card); gpointer r_card_get_next_net_address (RCard *card); gpointer r_card_get_prev_net_address (RCard *card); void r_card_reset_net_address (RCard *card); gpointer r_card_find_net_address (RCard *card, RNetAddressType type); void r_card_foreach_net_address (RCard *card, RFunc func, gpointer user_data); void r_card_add_telephone (RCard *card, RTelephone *tel); gboolean r_card_delete_telephone (RCard *card, RTelephone *phone); gboolean r_card_replace_telephone (RCard *card, RTelephone *old, RTelephone *new); gpointer r_card_get_telephone (RCard *card); gpointer r_card_get_next_telephone (RCard *card); gpointer r_card_get_prev_telephone (RCard *card); void r_card_reset_telephone (RCard *card); gpointer r_card_find_telephone (RCard *card, RTelephoneType type); void r_card_foreach_telephone (RCard *card, RFunc func, gpointer user_data); void r_card_add_ref (RCard *card, RRef *ref); gboolean r_card_del_ref (RCard *card, RRef *ref); gpointer r_card_get_ref (RCard *card); gpointer r_card_get_next_ref (RCard *card); gpointer r_card_get_prev_ref (RCard *card); void r_card_reset_ref (RCard *card); void r_card_foreach_ref (RCard *card, RFunc func, gpointer user_data); gboolean r_card_has_refs (RCard *card); gchar* r_card_get_group_owner (RCard *card, RGroup *group); gchar* r_card_get_home_page (RCard *card); gchar* r_card_get_email (RCard *card); gchar* r_card_get_irc (RCard *card); void r_card_print (RCard *card);
"card-changed" gint : Read / Write "card-created" gint : Read / Write "card-deleted" gboolean : Read / Write / Construct "card-destroyed" gboolean : Read / Write / Construct "card-id" glong : Read / Write "card-locked" gboolean : Read / Write / Construct "card-marked" gboolean : Read / Write / Construct "card-name" gchararray : Read / Write / Construct "card-rate" gint : Read / Write / Construct "card-type" gchararray : Read / Write / Construct
typedef enum { R_RATE_NONE = 0, /* no importance */ R_RATE_FEW, /* few importance */ R_RATE_NORMAL, /* normal */ R_RATE_HIGH, /* high importance */ R_RATE_VERY_HIGH /* very high importance */ } RRate;
RCard* r_card_copy (RCard *card);
copy the given RCard*
card : |
a RCard |
Returns : | a new allocated copy of the card |
gboolean r_card_search (RCard *card, const gchar *str);
search the given string in the card
RInfos* r_card_get_infos (RCard *card);
get infos about card.
card : |
a RCard |
Returns : | a RInfos. caller must free the RInfos, calling the r_card_free_infos |
void r_card_free_infos (RInfos *infos);
free the RInfos object
infos : |
a RInfos |
void r_card_add_group (RCard *card, RGroup *group);
add a group to card (card belongs to added group)
gboolean r_card_delete_group (RCard *card, gchar *name);
delete a group from card's groups list (i.e. remove a card from a group)
card : |
a RCard |
name : |
group's name |
Returns : | TRUE if group was successfully deleted, FALSE otherwise |
gboolean r_card_rename_group (RCard *card, gchar *oldname, gchar *newname);
rename the old name group with the new name group
card : |
a RCard |
oldname : |
old group's name |
newname : |
new group's name |
Returns : | TRUE if replaced, FALSE otherwise |
gpointer r_card_find_group (RCard *card, gchar *name);
find a card's group by name. User must cast returned value to a RGroup.
card : |
a RCard |
name : |
group's name |
Returns : | a gpointer to the group if group has been found, NULL otherwise. |
gboolean r_card_belong_to_group (RCard *card, const gchar *group_name);
check if the card belongs to the group
GList* r_card_get_groups_owned_by (RCard *card, const gchar *owner);
look for all groups that belongs to owner
RGroup* r_card_get_group (RCard *card);
get the first of card's groups. User must cast returned value to a RGroup.
card : |
a RCard |
Returns : | a gpointer. |
RGroup* r_card_get_next_group (RCard *card);
get the next in card's group. User must cast returned value to a RGroup.
card : |
a RCard |
Returns : | a gpointer |
RGroup* r_card_get_prev_group (RCard *card);
get the previous in card's group. User must cast returned value to a RGroup.
card : |
a RCard |
Returns : | a gpointer |
void r_card_reset_group (RCard *card);
set the private group iterartor to the first one
card : |
a RCard |
void r_card_foreach_group (RCard *card, RFunc func, gpointer user_data);
User's function func, will be called foreach group in card. func must have two parameter: the group (automatically passed) and the user_data
void r_card_add_address (RCard *card, RAddress *address);
add an address to card
gboolean r_card_delete_address (RCard *card, RAddress *address);
delete the address from card
gboolean r_card_replace_address (RCard *card, RAddress *old, RAddress *new);
replace the old address with new one. On success, old address is deleted.
gpointer r_card_get_address (RCard *card);
get the first item of card's addresses list. User must cast to a RAddress.
card : |
a RCard |
Returns : | a gpointer |
gpointer r_card_get_next_address (RCard *card);
get the next item in card's addresses list. User must cast to a RAddress.
card : |
a RCard |
Returns : | a gpointer |
gpointer r_card_get_prev_address (RCard *card);
get the previous item in card's addresses list. User must cast to a RAddress.
card : |
a RCard |
Returns : | a gpointer |
void r_card_reset_address (RCard *card);
set the private address iterartor to the first one
card : |
a RCard |
gpointer r_card_find_address (RCard *card, RAddressType type);
card : |
|
type : |
|
Returns : |
void r_card_foreach_address (RCard *card, RFunc func, gpointer user_data);
User's function func, will be called foreach address in card. func must have two parameter: the address (automatically passed) and the user_data
void r_card_add_net_address (RCard *card, RNetAddress *net);
add a net address to card
card : |
a RCard |
net : |
a RNetAddress |
gboolean r_card_delete_net_address (RCard *card, RNetAddress *address);
delete a net address from card
card : |
a RCard |
address : |
a RNetAddress |
Returns : | TRUE if address has been successfully deleted, FALSE otherwihe.
|
gboolean r_card_replace_net_address (RCard *card, RNetAddress *old, RNetAddress *new);
replace the old net address with new one. On success, old address is deleted.
card : |
a RCard |
old : |
the old RNetAddress |
new : |
the new RNetAddress |
Returns : | TRUE if address has been successfully replaced, FALSE otherwihe.
|
gpointer r_card_get_net_address (RCard *card);
get the first item of card's net addresses list. User must cast to a RNetAddress.
card : |
a RCard |
Returns : | a gpointer |
gpointer r_card_get_next_net_address (RCard *card);
get the next item in card's net addresses list. User must cast to a RNetAddress.
card : |
a RCard |
Returns : | a gpointer |
gpointer r_card_get_prev_net_address (RCard *card);
get the previous item in card's net addresses list. User must cast to a RNetAddress.
card : |
a RCard |
Returns : | a gpointer |
void r_card_reset_net_address (RCard *card);
set the private net addresses iterartor to the first one.
card : |
a RCard |
gpointer r_card_find_net_address (RCard *card, RNetAddressType type);
card : |
|
type : |
|
Returns : |
void r_card_foreach_net_address (RCard *card, RFunc func, gpointer user_data);
User's function func, will be called foreach net address in card. func must have two parameter: the net address (automatically passed) and the user_data
void r_card_add_telephone (RCard *card, RTelephone *tel);
add a telephone number to card
card : |
a RCard |
tel : |
a RTelephone |
gboolean r_card_delete_telephone (RCard *card, RTelephone *phone);
delete a telephone number from card
card : |
a RCard |
phone : |
a RTelephone |
Returns : | TRUE if telephone has been successfully, FALSE otherwise.
|
gboolean r_card_replace_telephone (RCard *card, RTelephone *old, RTelephone *new);
replace the old telephone with new one. On success, old telephone is deleted.
card : |
a RCard |
old : |
a RTelephone |
new : |
a RTelephone |
Returns : | TRUE if telephone has been successfully replaced ,
FALSE otherwihe.
|
gpointer r_card_get_telephone (RCard *card);
get the first item of card's telephones list. User must cast to a RTelephone.
card : |
a RCard |
Returns : | a gpointer |
gpointer r_card_get_next_telephone (RCard *card);
get the next item in card's telephones list. User must cast to a RTelephone.
card : |
a RCard |
Returns : | a gpointer |
gpointer r_card_get_prev_telephone (RCard *card);
get the previous item in card's telephones list. User must cast to a RTelephone.
card : |
a RCard |
Returns : | a gpointer |
void r_card_reset_telephone (RCard *card);
set the private telephones iterartor to the first one
card : |
a RCard |
gpointer r_card_find_telephone (RCard *card, RTelephoneType type);
card : |
|
type : |
|
Returns : |
void r_card_foreach_telephone (RCard *card, RFunc func, gpointer user_data);
User's function func, will be called foreach telephone in card. func must have two parameter: the telephone (automatically passed) and the user_data
gpointer r_card_get_ref (RCard *card);
get the first RRef
card : |
a RCard |
Returns : | a gpointer or NULL if card hasn't refs |
gpointer r_card_get_next_ref (RCard *card);
get the next ref
card : |
a RCard |
Returns : | a gpointer or NULL |
gpointer r_card_get_prev_ref (RCard *card);
get the previous ref
card : |
a RCard |
Returns : | a gpointer or NULL |
void r_card_reset_ref (RCard *card);
reset the private refs's iterator to ref head's list
card : |
a RCard |
void r_card_foreach_ref (RCard *card, RFunc func, gpointer user_data);
User's function func, will be called foreach ref in card. func must have two parameter: the ref (automatically passed) and the user_data
gboolean r_card_has_refs (RCard *card);
Check if card has references to other cards
gchar* r_card_get_group_owner (RCard *card, RGroup *group);
get the owner of the given group. Caller does not free the returned value
gchar* r_card_get_home_page (RCard *card);
get the first web url in net addresses list. Caller does not free the returned value
card : |
a RCard |
Returns : | a gchar* |
gchar* r_card_get_email (RCard *card);
get the first email in net addresses list. Caller does not free the returned value
card : |
a RCard |
Returns : | a gchar* |
gchar* r_card_get_irc (RCard *card);
get the first irc in net addresses list. Caller does not free the returned value
card : |
a RCard |
Returns : | a gchar* |
card-changed
" property"card-changed" gint : Read / Write
last time that card was modified.
Default value: -1
card-created
" property"card-created" gint : Read / Write
the card's creation time.
Default value: -1
card-deleted
" property"card-deleted" gboolean : Read / Write / Construct
is the card deleted.
Default value: FALSE
card-destroyed
" property"card-destroyed" gboolean : Read / Write / Construct
is the card destroyed.
Default value: FALSE
card-locked
" property"card-locked" gboolean : Read / Write / Construct
is the card locked.
Default value: TRUE
card-marked
" property"card-marked" gboolean : Read / Write / Construct
is the card marked.
Default value: FALSE
card-name
" property"card-name" gchararray : Read / Write / Construct
card's name
Default value: NULL
card-rate
" property"card-rate" gint : Read / Write / Construct
the rate user wants for the card.
Allowed values: [0,4]
Default value: 2
card-type
" property"card-type" gchararray : Read / Write / Construct
card's type
Default value: NULL