Re: [GnomeMeeting-devel-list] Refactoring the addressbook code



Le lundi 27 mars 2006 à 15:30 +0200, Jan Schampera a écrit :
> On Sun, 26 Mar 2006 21:47:10 +0200
> Jan Schampera <jan schampera web de> wrote:
> 
> > It was a basic test for me, if I am able at all to do this.
> 
> In case anybody is interested, I tried to code a composite widget.
> It's relatively easy. Okay, now we should talk about the API, what we
> can use from the struct GMContact as information and how to process
> everything.
> 
> I thought about the following API (not implemented, draft!, partly
> pseudocode, symbolnames should explain themselves):
> 
> 
> GMRoster* gmroster_new (void);
> 
> void gmroster_add_entry (GMRoster*, GMContact*);
> void gmroster_del_entry (GMRoster*, GMContact*);
> void gmroster_modify_entry (GMRoster*, GMContact*);
> 
> void gmroster_set_icon (GMRoster*, enum state_type, GdkPixbuf*);
> 
> void gmroster_set_show_offlines (GMRoster*, gboolean);
> gboolean gmroster_get_show_offlines (GMRoster*);
> 
> void gmroster_set_show_in_multiple_groups (GMRoster*, gboolean);
> gboolean gmroster_get_show_in_multiple_groups (GMRoster*);
> 
> void gmroster_set_unknown_group_name (GMRoster*, gchar*);
> void gmroster_set_show_groupless_contacts (GMRoster*, gboolean);
> gboolean gmroster_get_show_groupless_contacts (GMRoster*);
> 
> Remarks/Discussion:
> - a contact is identified by its uid AND its name field
> - the widget holds a private copy of each contact
> - the widget self-organizes which groups to show/not show by
>   scanning the proper the GMContact member
> - the GMContact "state" member is used to determinate offline, online
>   and away status
> - gmroster_modify_entry() only scans the "state" member of the
>   contact (to update the presence)
> - the *_show_in_multiple_groups() will control, if a contact that
>   belongs to more then one group is shown in its first group found or
>   in all groups found (discussion?)
> - the *_show_groupless_contacts() control weather a contact without a
>   group entry is shown in a group named by
>   gmroster_set_unknown_group_name(), or not shown at all
> 

Seems ok for a start, even if you could refine it later.

> Questions so far:
> - what makes sense to hold a private copy of?
> 

I don't understand :)

> RFC
> 
> Jan
> 
-- 
 _      Damien Sandras
(o-     
//\     Ekiga Softphone: http://www.ekiga.org/
v_/_    FOSDEM 2006    : http://www.fosdem.org/
        SIP Phone      : sip:dsandras ekiga net
                         sip:600000 ekiga net




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]