RCard

RCard —

Synopsis




#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        RRank;
            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);
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);
gpointer    r_card_find_group               (RCard *card,
                                             gchar *name);
gboolean    r_card_belong_to_group          (RCard *card,
                                             gchar *group_name);
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);
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);
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);
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);
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);

Object Hierarchy


  GObject
   +----RCard
         +----RCompanyCard
         +----RPersonalCard

Properties


  "card-changed"         gint                  : Read / Write
  "card-created"         gint                  : Read / Write
  "card-deletable"       gboolean              : Read / Write / Construct
  "card-deleted"         gboolean              : Read / Write / Construct
  "card-id"              glong                 : Read / Write
  "card-marked"          gboolean              : Read / Write / Construct
  "card-name"            gchararray            : Read / Write / Construct
  "card-rank"            gint                  : Read / Write / Construct
  "card-type"            gchararray            : Read / Write / Construct

Description

Details

R_CARD_TYPE

#define R_CARD_TYPE            (r_card_get_type())


R_CARD()

#define     R_CARD(obj)

obj :

R_CARD_CLASS()

#define     R_CARD_CLASS(klass)

klass :

IS_R_CARD()

#define     IS_R_CARD(obj)

obj :

IS_R_CARD_CLASS()

#define     IS_R_CARD_CLASS(klass)

klass :

R_CARD_GET_CLASS()

#define     R_CARD_GET_CLASS(obj)

obj :

enum RRank

typedef enum {
  R_RANK_NONE = 0,         /* no importance         */
  R_RANK_FEW,              /* few importance        */
  R_RANK_NORMAL,           /* normal                */
  R_RANK_HIGHT,            /* hight importance      */
  R_RANK_VERY_HIGHT        /* very hight importance */
} RRank;


RCardPrivate

typedef struct _RCardPrivate RCardPrivate;


RCard

typedef struct _RCard RCard;


r_card_get_type ()

GType       r_card_get_type                 (void);

Returns :

r_card_new ()

RCard*      r_card_new                      (void);

create a new RCard

Returns : a new allocated RCard*

r_card_free ()

void        r_card_free                     (RCard *card);

free the RCard*

card : a RCard

r_card_copy ()

RCard*      r_card_copy                     (RCard *card);

copy the given RCard*

card : a RCard
Returns : a new allocated copy of the card

r_card_get_infos ()

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

r_card_free_infos ()

void        r_card_free_infos               (RInfos *infos);

free the RInfos object

infos : a RInfos

r_card_add_group ()

void        r_card_add_group                (RCard *card,
                                             RGroup *group);

add a group to card (card belongs to added group)

card : a RCard
group : a RGroup

r_card_delete_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

r_card_rename_group ()

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

r_card_find_group ()

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.

r_card_belong_to_group ()

gboolean    r_card_belong_to_group          (RCard *card,
                                             gchar *group_name);

check if the card belongs to the group

card : a RCard
group_name : group's name
Returns : TRUE if card belongs to the given group, FALSE otherwise

r_card_get_group ()

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.

r_card_get_next_group ()

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

r_card_get_prev_group ()

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

r_card_reset_group ()

void        r_card_reset_group              (RCard *card);

set the private group iterartor to the first one

card : a RCard

r_card_foreach_group ()

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

card : a RCard
func : the RFunc that will be called on each group in the card
user_data : user's data to pass to func

r_card_add_address ()

void        r_card_add_address              (RCard *card,
                                             RAddress *address);

add an address to card

card : a RCard
address : a RAddress

r_card_delete_address ()

gboolean    r_card_delete_address           (RCard *card,
                                             RAddress *address);

delete the address from card

card : a RCard
address : a RAddress
Returns : TRUE if address has been successfully deleted, FALSE otherwihe.

r_card_replace_address ()

gboolean    r_card_replace_address          (RCard *card,
                                             RAddress *old,
                                             RAddress *new);

replace the old address with new one. On success, old address is deleted.

card : a RCard
old : a RAddress
new : a RAddress
Returns : TRUE if address has been successfully replaced, FALSE otherwihe.

r_card_get_address ()

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

r_card_get_next_address ()

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

r_card_get_prev_address ()

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

r_card_reset_address ()

void        r_card_reset_address            (RCard *card);

set the private address iterartor to the first one

card : a RCard

r_card_foreach_address ()

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

card : a RCard
func : the RFunc that will be called on each group in the card
user_data : user's data to pass to func

r_card_add_net_address ()

void        r_card_add_net_address          (RCard *card,
                                             RNetAddress *net);

add a net address to card

card : a RCard
net : a RNetAddress

r_card_delete_net_address ()

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.

r_card_replace_net_address ()

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.

r_card_get_net_address ()

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

r_card_get_next_net_address ()

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

r_card_get_prev_net_address ()

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

r_card_reset_net_address ()

void        r_card_reset_net_address        (RCard *card);

set the private net addresses iterartor to the first one.

card : a RCard

r_card_foreach_net_address ()

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

card : a RCard
func : the RFunc that will be called on each group in the card
user_data : user's data to pass to func

r_card_add_telephone ()

void        r_card_add_telephone            (RCard *card,
                                             RTelephone *tel);

add a telephone number to card

card : a RCard
tel : a RTelephone

r_card_delete_telephone ()

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.

r_card_replace_telephone ()

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.

r_card_get_telephone ()

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

r_card_get_next_telephone ()

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

r_card_get_prev_telephone ()

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

r_card_reset_telephone ()

void        r_card_reset_telephone          (RCard *card);

set the private telephones iterartor to the first one

card : a RCard

r_card_foreach_telephone ()

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

card : a RCard
func : the RFunc that will be called on each group in the card
user_data : user's data to pass to func

r_card_add_ref ()

void        r_card_add_ref                  (RCard *card,
                                             RRef *ref);

add a RRef to the given RCard card

card : a RCard
ref : a RRef

r_card_del_ref ()

gboolean    r_card_del_ref                  (RCard *card,
                                             RRef *ref);

remove a RRef from card

card : a RCard
ref : a RRef
Returns : TRUE if reference is successfully deleted, FALSE otherwise

r_card_get_ref ()

gpointer    r_card_get_ref                  (RCard *card);

get the first RRef

card : a RCard
Returns : a gpointer or NULL if card hasn't refs

r_card_get_next_ref ()

gpointer    r_card_get_next_ref             (RCard *card);

get the next ref

card : a RCard
Returns : a gpointer or NULL

r_card_get_prev_ref ()

gpointer    r_card_get_prev_ref             (RCard *card);

get the previous ref

card : a RCard
Returns : a gpointer or NULL

r_card_reset_ref ()

void        r_card_reset_ref                (RCard *card);

reset the private refs's iterator to ref head's list

card : a RCard

r_card_foreach_ref ()

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

card : a RCard
func : the RFunc that will be called on each group in the card
user_data : user's data to pass to func

r_card_get_group_owner ()

gchar*      r_card_get_group_owner          (RCard *card,
                                             RGroup *group);

get the owner of the given group. Caller does not free the returned value

card : a RCard
group : a RGroup
Returns : a gchar*, "r" if given group if a default group, "user" if given group was build by user

r_card_get_home_page ()

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*

r_card_get_email ()

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*

r_card_get_irc ()

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*

r_card_print ()

void        r_card_print                    (RCard *card);

card :

Property Details

The "card-changed" property

  "card-changed"         gint                  : Read / Write

last time that card was modified.

Default value: -1


The "card-created" property

  "card-created"         gint                  : Read / Write

the card's creation time.

Default value: -1


The "card-deletable" property

  "card-deletable"       gboolean              : Read / Write / Construct

is the card deletable.

Default value: TRUE


The "card-deleted" property

  "card-deleted"         gboolean              : Read / Write / Construct

is the card deleted.

Default value: FALSE


The "card-id" property

  "card-id"              glong                 : Read / Write

card's id

Default value: 0


The "card-marked" property

  "card-marked"          gboolean              : Read / Write / Construct

is the card marked.

Default value: FALSE


The "card-name" property

  "card-name"            gchararray            : Read / Write / Construct

card's name

Default value: NULL


The "card-rank" property

  "card-rank"            gint                  : Read / Write / Construct

the rank user wants for the card.

Allowed values: [0,4]

Default value: 2


The "card-type" property

  "card-type"            gchararray            : Read / Write / Construct

card's type

Default value: NULL