[prev in list] [next in list] [prev in thread] [next in thread]
List: kopete-devel
Subject: Re: [Kopete-devel] [Long] next release
From: Martijn Klingens <klingens () kde ! org>
Date: 2002-04-29 13:24:16
[Download RAW message or body]
On Monday 29 April 2002 15:01, Duncan Mac-Vicar Prett wrote:
> That would mean adding userID to KopeteContact, and was you who told me to
> remove it, and I agree userID should not be there, but you need it anyway
> to serialize it ( unless you do like contact->serialize( "someid@lal.org");
> )
Huh????
No...
The contact saving code does the following:
void saveContact( KopeteContact *c )
{
...
KConfig *conf;
conf->writeStringEntry( "Nickname", c->nickname() );
conf->writeStringEntry( "Groups", c->groups() );
conf->writeStringEntry( "PluginData", c->serialize() );
...
}
and the restore code does the reverse of that.
(Note that serialize is a void function, it just serializes the WHOLE object,
not single fields! If you know Delphi, it's modeled a bit after the
ultra-powerful TPersistent streaming methods, though with a simpler API,
because we don't need that much functionality. )
Very elegant solution if you ask me :-)
Martijn
_______________________________________________
Kopete-devel mailing list
Kopete-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kopete-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic