RubricaCard

RubricaCard —

Synopsis




#define     RUBRICA_CARD_TYPE
#define     RUBRICA_CARD                    (obj)
#define     RUBRICA_CARD_CLASS              (klass)
#define     IS_RUBRICA_CARD                 (obj)
#define     IS_RUBRICA_CARD_CLASS           (klass)
#define     RUBRICA_CARD_GET_CLASS          (obj)
enum        RubricaRank;
            RubricaCardPrivate;
GType       rubrica_card_get_type           (void);
RubricaCard* rubrica_card_new               (void);
void        rubrica_card_free               (RubricaCard *card);
RubricaCard* rubrica_card_copy              (RubricaCard *card);
void        rubrica_card_id_align           (RubricaCard *card,
                                             gchar *id,
                                             gchar *card_type);
void        rubrica_card_set_id             (RubricaCard *card,
                                             gchar *id);
void        rubrica_card_set_creation_time  (RubricaCard *card,
                                             time_t time);
void        rubrica_card_set_modification_time
                                            (RubricaCard *card,
                                             time_t time);
gchar*      rubrica_card_get_id             (RubricaCard *card);
time_t      rubrica_card_get_creation_time  (RubricaCard *card);
time_t      rubrica_card_get_modification_time
                                            (RubricaCard *card);
void        rubrica_card_add_group          (RubricaCard *card,
                                             RubricaGroup *group);
void        rubrica_card_add_address        (RubricaCard *card,
                                             RubricaAddress *address);
void        rubrica_card_add_net_address    (RubricaCard *card,
                                             RubricaNetAddress *net);
void        rubrica_card_add_telephone      (RubricaCard *card,
                                             RubricaTelephone *tel);
gpointer    rubrica_card_find_group         (RubricaCard *card,
                                             gchar *name);
gboolean    rubrica_card_belong_to_group    (RubricaCard *card,
                                             gchar *group_name);
gboolean    rubrica_card_delete_group       (RubricaCard *card,
                                             gchar *name);
gboolean    rubrica_card_rename_group       (RubricaCard *card,
                                             gchar *oldname,
                                             gchar *newname);
gboolean    rubrica_card_delete_address     (RubricaCard *card,
                                             RubricaAddress *address);
gboolean    rubrica_card_replace_address    (RubricaCard *card,
                                             RubricaAddress *old,
                                             RubricaAddress *new);
RubricaGroup* rubrica_card_get_group        (RubricaCard *card);
RubricaGroup* rubrica_card_get_next_group   (RubricaCard *card);
RubricaGroup* rubrica_card_get_prev_group   (RubricaCard *card);
void        rubrica_card_reset_group        (RubricaCard *card);
gpointer    rubrica_card_get_address        (RubricaCard *card);
gpointer    rubrica_card_get_next_address   (RubricaCard *card);
gpointer    rubrica_card_get_prev_address   (RubricaCard *card);
void        rubrica_card_reset_address      (RubricaCard *card);
gpointer    rubrica_card_get_net_address    (RubricaCard *card);
gpointer    rubrica_card_get_next_net_address
                                            (RubricaCard *card);
gpointer    rubrica_card_get_prev_net_address
                                            (RubricaCard *card);
void        rubrica_card_reset_net_address  (RubricaCard *card);
gpointer    rubrica_card_get_telephone      (RubricaCard *card);
gpointer    rubrica_card_get_next_telephone (RubricaCard *card);
gpointer    rubrica_card_get_prev_telephone (RubricaCard *card);
void        rubrica_card_reset_telephone    (RubricaCard *card);
gchar*      rubrica_card_get_home_page      (RubricaCard *card);
gchar*      rubrica_card_get_email          (RubricaCard *card);
gchar*      rubrica_card_get_irc            (RubricaCard *card);
gchar*      rubrica_card_get_group_owner    (RubricaCard *card,
                                             RubricaGroup *group);
void        rubrica_card_print              (RubricaCard *card);

Description

Details

RUBRICA_CARD_TYPE

#define RUBRICA_CARD_TYPE            (rubrica_card_get_type())


RUBRICA_CARD()

#define     RUBRICA_CARD(obj)

obj :

RUBRICA_CARD_CLASS()

#define     RUBRICA_CARD_CLASS(klass)

klass :

IS_RUBRICA_CARD()

#define     IS_RUBRICA_CARD(obj)

obj :

IS_RUBRICA_CARD_CLASS()

#define     IS_RUBRICA_CARD_CLASS(klass)

klass :

RUBRICA_CARD_GET_CLASS()

#define     RUBRICA_CARD_GET_CLASS(obj)

obj :

enum RubricaRank

typedef enum {
  RUBRICA_RANK_NONE = 0,         /* no importance  */
  RUBRICA_RANK_FEW,              /* few importance  */
  RUBRICA_RANK_NORMAL,           /* normal  */
  RUBRICA_RANK_HIGHT,            /* hight importance  */
  RUBRICA_RANK_VERY_HIGHT        /* very hight importance  */
} RubricaRank;


RubricaCardPrivate

typedef struct _RubricaCardPrivate RubricaCardPrivate;


rubrica_card_get_type ()

GType       rubrica_card_get_type           (void);

Returns :

rubrica_card_new ()

RubricaCard* rubrica_card_new               (void);

create a new RubricaCard

Returns : a new allocated RubricaCard*

rubrica_card_free ()

void        rubrica_card_free               (RubricaCard *card);

free the RubricaCard*

card : a RubricaCard

rubrica_card_copy ()

RubricaCard* rubrica_card_copy              (RubricaCard *card);

copy the given RubricaCard*

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

rubrica_card_id_align ()

void        rubrica_card_id_align           (RubricaCard *card,
                                             gchar *id,
                                             gchar *card_type);

align the card's id. User shouldn't use this function.

card :
id :
card_type :

rubrica_card_set_id ()

void        rubrica_card_set_id             (RubricaCard *card,
                                             gchar *id);

set the card's id.

card : a RubricaCard
id : an unique id

rubrica_card_set_creation_time ()

void        rubrica_card_set_creation_time  (RubricaCard *card,
                                             time_t time);

set the card's creation time.

card : a RubricaCard
time : a time_t value

rubrica_card_set_modification_time ()

void        rubrica_card_set_modification_time
                                            (RubricaCard *card,
                                             time_t time);

set card's last modification time.

card : a RubricaCard
time : a time_t value

rubrica_card_get_id ()

gchar*      rubrica_card_get_id             (RubricaCard *card);

get the card's id. Caller must free the returned value

card : a RubricaCard
Returns : a gchar*

rubrica_card_get_creation_time ()

time_t      rubrica_card_get_creation_time  (RubricaCard *card);

get the card's creation time

card : a RubricaCard
Returns : a time_t

rubrica_card_get_modification_time ()

time_t      rubrica_card_get_modification_time
                                            (RubricaCard *card);

get the last time that card was modified

card : a RubricaCard
Returns : a time_t

rubrica_card_add_group ()

void        rubrica_card_add_group          (RubricaCard *card,
                                             RubricaGroup *group);

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

card : a RubricaCard
group : a RubricaGroup

rubrica_card_add_address ()

void        rubrica_card_add_address        (RubricaCard *card,
                                             RubricaAddress *address);

add an address to card

card : a RubricaCard
address : a RubricaAddress

rubrica_card_add_net_address ()

void        rubrica_card_add_net_address    (RubricaCard *card,
                                             RubricaNetAddress *net);

add a net address to card

card : a RubricaCard
net : a RubricaNetAddress

rubrica_card_add_telephone ()

void        rubrica_card_add_telephone      (RubricaCard *card,
                                             RubricaTelephone *tel);

add a telephone number to card

card : a RubricaCard
tel : a RubricaTelephone

rubrica_card_find_group ()

gpointer    rubrica_card_find_group         (RubricaCard *card,
                                             gchar *name);

find a card's group by name. User must cast returned value to a RubricaGroup.

card : a RubricaCard
name : group's name
Returns : a gpointer to the group if group has been found, NULL otherwise.

rubrica_card_belong_to_group ()

gboolean    rubrica_card_belong_to_group    (RubricaCard *card,
                                             gchar *group_name);

verify if card belongs to the group

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

rubrica_card_delete_group ()

gboolean    rubrica_card_delete_group       (RubricaCard *card,
                                             gchar *name);

delete a group from card's groups list (i.e. remove a card from a group)

card : a RubricaCard
name : group's name
Returns : TRUE if group was successfully deleted, FALSE otherwise

rubrica_card_rename_group ()

gboolean    rubrica_card_rename_group       (RubricaCard *card,
                                             gchar *oldname,
                                             gchar *newname);

rename the old name group with the new name group

card : a RubricaCard
oldname : old group's name
newname : new group's name
Returns : TRUE if replaced, FALSE otherwise

rubrica_card_delete_address ()

gboolean    rubrica_card_delete_address     (RubricaCard *card,
                                             RubricaAddress *address);

delete the address from card

card : a RubricaCard
address : a RubricaAddress
Returns : TRUE if address has been successfully deleted, FALSE otherwihe.

rubrica_card_replace_address ()

gboolean    rubrica_card_replace_address    (RubricaCard *card,
                                             RubricaAddress *old,
                                             RubricaAddress *new);

replace the old address with new one

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

rubrica_card_get_group ()

RubricaGroup* rubrica_card_get_group        (RubricaCard *card);

get the first of card's groups. User must cast returned value to a RubricaGroup.

card : a RubricaCard
Returns : a gpointer.

rubrica_card_get_next_group ()

RubricaGroup* rubrica_card_get_next_group   (RubricaCard *card);

get the next in card's group. User must cast returned value to a RubricaGroup.

card : a RubricaCard
Returns : a gpointer

rubrica_card_get_prev_group ()

RubricaGroup* rubrica_card_get_prev_group   (RubricaCard *card);

get the previous in card's group. User must cast returned value to a RubricaGroup.

card : a RubricaCard
Returns : a gpointer

rubrica_card_reset_group ()

void        rubrica_card_reset_group        (RubricaCard *card);

set the private group iterartor to the first one

card : a RubricaCard

rubrica_card_get_address ()

gpointer    rubrica_card_get_address        (RubricaCard *card);

get the first item of card's addresses list. User must cast to a RubricaAddress.

card : a RubricaCard
Returns : a gpointer

rubrica_card_get_next_address ()

gpointer    rubrica_card_get_next_address   (RubricaCard *card);

get the next item in card's addresses list. User must cast to a RubricaAddress.

card : a RubricaCard
Returns : a gpointer

rubrica_card_get_prev_address ()

gpointer    rubrica_card_get_prev_address   (RubricaCard *card);

get the previous item in card's addresses list. User must cast to a RubricaAddress.

card : a RubricaCard
Returns : a gpointer

rubrica_card_reset_address ()

void        rubrica_card_reset_address      (RubricaCard *card);

set the private address iterartor to the first one

card : a RubricaCard

rubrica_card_get_net_address ()

gpointer    rubrica_card_get_net_address    (RubricaCard *card);

get the first item of card's net addresses list. User must cast to a RubricaNetAddress.

card : a RubricaCard
Returns : a gpointer

rubrica_card_get_next_net_address ()

gpointer    rubrica_card_get_next_net_address
                                            (RubricaCard *card);

get the next item in card's net addresses list. User must cast to a RubricaNetAddress.

card : a RubricaCard
Returns : a gpointer

rubrica_card_get_prev_net_address ()

gpointer    rubrica_card_get_prev_net_address
                                            (RubricaCard *card);

get the previous item in card's net addresses list. User must cast to a RubricaNetAddress.

card : a RubricaCard
Returns : a gpointer

rubrica_card_reset_net_address ()

void        rubrica_card_reset_net_address  (RubricaCard *card);

set the private net addresses iterartor to the first one.

card : a RubricaCard

rubrica_card_get_telephone ()

gpointer    rubrica_card_get_telephone      (RubricaCard *card);

get the first item of card's telephones list. User must cast to a RubricaTelephone.

card : a RubricaCard
Returns : a gpointer

rubrica_card_get_next_telephone ()

gpointer    rubrica_card_get_next_telephone (RubricaCard *card);

get the next item in card's telephones list. User must cast to a RubricaTelephone.

card : a RubricaCard
Returns : a gpointer

rubrica_card_get_prev_telephone ()

gpointer    rubrica_card_get_prev_telephone (RubricaCard *card);

get the previous item in card's telephones list. User must cast to a RubricaTelephone.

card : a RubricaCard
Returns : a gpointer

rubrica_card_reset_telephone ()

void        rubrica_card_reset_telephone    (RubricaCard *card);

set the private telephones iterartor to the first one

card : a RubricaCard

rubrica_card_get_home_page ()

gchar*      rubrica_card_get_home_page      (RubricaCard *card);

get the first web url in net addresses list. Caller does not free the returned value

card : a RubricaCard
Returns : a gchar*

rubrica_card_get_email ()

gchar*      rubrica_card_get_email          (RubricaCard *card);

get the first email in net addresses list. Caller does not free the returned value

card : a RubricaCard
Returns : a gchar*

rubrica_card_get_irc ()

gchar*      rubrica_card_get_irc            (RubricaCard *card);

get the first irc in net addresses list. Caller does not free the returned value

card : a RubricaCard
Returns : a gchar*

rubrica_card_get_group_owner ()

gchar*      rubrica_card_get_group_owner    (RubricaCard *card,
                                             RubricaGroup *group);

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

card : a RubricaCard
group : a RubricaGroup
Returns : a gchar*, "rubrica" if given group if a default group, "user" if given group was build by user

rubrica_card_print ()

void        rubrica_card_print              (RubricaCard *card);

card :

<ARG> <NAME>RubricaCard::card-name</NAME> <TYPE>gchararray</TYPE> <RANGE></RANGE> <FLAGS>rw</FLAGS> <NICK>card's name</NICK> <BLURB>the name of the card.</BLURB> <DEFAULT>NULL</DEFAULT> </ARG> <ARG> <NAME>RubricaCard::card-type</NAME> <TYPE>gchararray</TYPE> <RANGE></RANGE> <FLAGS>r</FLAGS> <NICK>card's type</NICK> <BLURB>card's type, must be "personal"or "company".</BLURB> <DEFAULT>NULL</DEFAULT> </ARG> <ARG> <NAME>RubricaCard::deletable</NAME> <TYPE>gboolean</TYPE> <RANGE></RANGE> <FLAGS>rw</FLAGS> <NICK>deletable</NICK> <BLURB>is the card deletable.</BLURB> <DEFAULT>TRUE</DEFAULT> </ARG> <ARG> <NAME>RubricaCard::deleted</NAME> <TYPE>gboolean</TYPE> <RANGE></RANGE> <FLAGS>rw</FLAGS> <NICK>deleted</NICK> <BLURB>is the card deleted.</BLURB> <DEFAULT>FALSE</DEFAULT> </ARG> <ARG> <NAME>RubricaCard::marked</NAME> <TYPE>gboolean</TYPE> <RANGE></RANGE> <FLAGS>rw</FLAGS> <NICK>marked</NICK> <BLURB>is the card marked.</BLURB> <DEFAULT>FALSE</DEFAULT> </ARG> <ARG> <NAME>RubricaCard::rank</NAME> <TYPE>gint</TYPE> <RANGE>[0,4]</RANGE> <FLAGS>rw</FLAGS> <NICK>card's rank</NICK> <BLURB>the rank user wants for the card.</BLURB> <DEFAULT>2</DEFAULT> </ARG>