On Wednesday 13 April 2005 00:57, Jon Keating wrote:
> On 4/13/05, Kevin Krammer <[EMAIL PROTECTED]> wrote:
> > The ID mapping file has changed a bit.
> > I now use one config group per protocol, i.e.
> > [ICQProtocol]
> > UIC=KABC
> >
> > To add more protocols it should only be necessary to add additional
> > Name->PPID mappings at the beginning of licqkimiface.cpp
>
> Can we change the name "ICQProtocol" to "Licq"  There is currently a
> dummy plugin loaded for the ICQ Protocol. It is called "Licq". In the
> future if we make the ICQ Protocol a plugin (so Licq can be used only
> for MSN for example), this would cause a problem.

It hasn't have to be hardcoded they way it is now.

I could delay loadMapping(), e.g. call it explicitly from mainwin.cpp and have 
a method to add protocol name -> PPID mappings at runtime.

The string ICQProtocol was chosen because it is the one to return on 
KIMIface::protocols(), at least for the interface's incarnation in KDE3 (the 
KIMIface maintainer thinks about a more generic way to address protocols, the 
main implementor, Kopete, is a multiprotocol client as well)

How about this (pseudo code)

LicqKIMIface* kimiface = new LicqKIMIface()

ProtocolList list = getProtocolsFromPlugins();
for (element in list)
    kimiface->addMappingsForProtocol(element.name(), element.ppid())

Where addMappingsForProtocol would append "Protocol" to the given name and 
load the respective data from the mapping file.

Something like that would allow plugins to be loaded later on as well.

Cheers,
Kevin

Attachment: pgpb1dARCNElt.pgp
Description: PGP signature

Reply via email to