1 /*
2 *  RAL -- Rubrica Addressbook Library
3 *  file: personal.h
4 *
5 *  Copyright (C) Nicola Fragale <nicolafragale@libero.it>
6 *
7 *  This program is free software; you can redistribute it and/or modify
8 *  it under the terms of the GNU General Public License as published by
9 *  the Free Software Foundation; either version 3 of the License
10 *
11 *  This program is distributed in the hope that it will be useful,
12 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 *  GNU General Public License for more details.
15 *
16 *  You should have received a copy of the GNU General Public License
17 *  along with this program; if not, write to the Free Software
18 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20 
21 #ifndef _R_PERSONAL_CARD_H
22 #define _R_PERSONAL_CARD_H
23 
24 #include <glib.h>
25 #include <glib-object.h>
26 
27 #include "card.h"
28 #include "contact.h"
29 #include "work.h"
30 #include "notes.h"
31 
32 
33 #define R_PERSONAL_CARD_TYPE           (r_personal_card_get_type())
34 
35 #define R_PERSONAL_CARD(obj)           (G_TYPE_CHECK_INSTANCE_CAST((obj),  \
36                                         R_PERSONAL_CARD_TYPE,              \
37                                         RPersonalCard))
38 
39 #define R_PERSONAL_CARD_CLASS(klass)   (G_TYPE_CHECK_CLASS_CAST((klass),   \
40                                         R_PERSONAL_CARD_TYPE,              \
41                                         RPersonalCardClass))
42 
43 #define IS_R_PERSONAL_CARD(obj)        (G_TYPE_CHECK_INSTANCE_TYPE((obj),  \
44                                         R_PERSONAL_CARD_TYPE))
45 
46 #define IS_R_PERSONAL_CARD_CLASS(kls)  (G_TYPE_CHECK_CLASS_TYPE((kls),     \
47                                         R_PERSONAL_CARD_TYPE))
48 
49 #define R_PERSONAL_CARD_GET_CLASS(kls) (G_TYPE_INSTANCE_GET_CLASS((kls),   \
50                                         R_PERSONAL_CARD_TYPE,              \
51                                         RPersonalCardClass))
52 
53 
54 
55 typedef struct _RPersonalCard        RPersonalCard;
56 typedef struct _RPersonalCardClass   RPersonalCardClass;
57 typedef struct _RPersonalCardPrivate RPersonalCardPrivate;
58 
59 
60 
61 struct _RPersonalCard
62 {
63   RCard parent;
64 
65   RPersonalCardPrivate* priv;
66 };
67 
68 
69 
70 struct _RPersonalCardClass
71 {
72   RCardClass parent;
73 };
74 
75 
76 
77 GType          r_personal_card_get_type (void);
78 
79 RPersonalCard* r_personal_card_new  (void);
80 
81 
82 RContact* r_personal_card_get_contact (RPersonalCard* card);
83 RWork*    r_personal_card_get_work    (RPersonalCard* card);
84 RNotes*   r_personal_card_get_notes   (RPersonalCard* card);
85 
86 
87 void      r_personal_card_set_contact (RPersonalCard* card, RContact* contact);
88 void      r_personal_card_set_work    (RPersonalCard* card, RWork* work);
89 void      r_personal_card_set_notes   (RPersonalCard* card, RNotes* notes);
90 
91 gboolean  r_personal_card_belongs_to_genre (RPersonalCard* card,
92 					    const gchar* genre);
93 
94 #endif
95