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                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);

Object Hierarchy


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

Properties


  "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

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 RRate

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;


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_reassign_id ()

void                r_card_reassign_id                  (RCard *card,
                                                         glong id);

card :

id :


r_card_is_personal ()

gboolean            r_card_is_personal                  (RCard *card);

card :

Returns :


r_card_is_deleted ()

gboolean            r_card_is_deleted                   (RCard *card);

card :

Returns :


r_card_search ()

gboolean            r_card_search                       (RCard *card,
                                                         const gchar *str);

search the given string in the card

card :

a RCard

str :

the string that user is looking for

Returns :

TRUE if string has been found, FALSE otherwise. If str is NULL, FALSE is returned

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_has_groups ()

gboolean            r_card_has_groups                   (RCard *card);

card :

Returns :


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,
                                                         const 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_groups_owned_by ()

GList*              r_card_get_groups_owned_by          (RCard *card,
                                                         const gchar *owner);

look for all groups that belongs to owner

card :

a RCard

owner :

the owner of the groups

Returns :

A list of RGroup, or NULL

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_find_address ()

gpointer            r_card_find_address                 (RCard *card,
                                                         RAddressType type);

card :

type :

Returns :


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_find_net_address ()

gpointer            r_card_find_net_address             (RCard *card,
                                                         RNetAddressType type);

card :

type :

Returns :


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_find_telephone ()

gpointer            r_card_find_telephone               (RCard *card,
                                                         RTelephoneType type);

card :

type :

Returns :


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_has_refs ()

gboolean            r_card_has_refs                     (RCard *card);

Check if card has references to other cards

card :

a RCard

Returns :

TRUE if has references, FALSE otherwise

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-deleted" property

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

is the card deleted.

Default value: FALSE


The "card-destroyed" property

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

is the card destroyed.

Default value: FALSE


The "card-id" property

  "card-id"                  glong                 : Read / Write

card's id

Default value: 0


The "card-locked" property

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

is the card locked.

Default value: TRUE


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-rate" property

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

the rate 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