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



Le Mercredi 7 Juin 2006 14:23, Julien PUYDT a écrit :
> Yes, going back to the blackboard isn't the best way to achieve 6...

You don't go black to the blackboard with no experience ;-).

In pecular, I have been proposing a framework for address book "drivers" like:

class EkigaAddressBook
{
        public:
                virtual gchar *name() const = 0;
                virtual const EkigaContact *firstContact() = 0;
                virtual const EkigaContact *nextContact() = 0;
};

class EkigaContact
{
        public:
                virtual boolean hasName() const = 0;
                virtual gchar *name() const = 0;

                virtual boolean hasTelephone() const = 0;
                virtual gchar *telephone() const = 0;

                etc...
};

class EkigaEvolutionAddressBook : public EkigaAddressBook
{
        public:
                virtual gchar *name() const;
                virtual const EkigaContact *firstContact();
                virtual const EkigaContact *nextContact();
};

class EkigaEvolutionContact : public EkigaContact
{
        public:
                virtual boolean hasName() const;
                virtual gchar *name() const;

                virtual boolean hasTelephone() const;
                virtual gchar *telephone() const;

                etc...
};


Comments and flames welcome.

-- 
Éric



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