[Kde-pim] PIM Libraries Shuffle (Was: License changes)

Ingo Klöcker kloecker at kde.org
Mon Jun 25 20:27:42 BST 2007


On Monday 25 June 2007 01:36, Allen Winter wrote:
> On Sunday 24 June 2007 4:58:03 pm Ingo Klöcker wrote:
> > On Sunday 24 June 2007 22:16, Allen Winter wrote:
> > > Unfortunately, due to the library dependencies, relicensing and
> > > moving libkpimidentities to the kdepimlibs won't be possible
> > > since that library depends on libkleo.
> >
> > It should be pretty easy to remove this dependency. It's really
> > only Kleo::CryptoMessageFormat. I propose to make KPIM::Identity
> > extensible with custom properties (QVariantMap). Then the preferred
> > crypto message format could simply become a custom property that is
> > known to Identity as a simple QString or QByteArray. The conversion
> > from
> > QString/QByteArray is then simply done with
> > Kleo::stringToCryptoMessageFormat() where the value is actually
> > needed.
> >
> > In fact, we could convert a lot of the more esoteric properties to
> > custom properties, e.g. m*Key, mFcc, mDrafts, mTemplates,
> > mTransport, mDictionary, mXFace, mXFaceEnabled, mBcc. This would
> > make the interface much nicer and more generic.
> >
> > Sounds like a nice little junior project.
>
> Yes, I like the re-architecture.
>
> But doesn't this still give us LGPL code (libkpimidentities) which
> depends upon GPL code (libkleo)?

No. libkpimidenties will no longer depend on libkleo if the 
Kleo::CryptoMessageFormat member variable (and the other variables I 
mentioned) is replaced by a simple QVariantMap. Only code (e.g. KMail) 
that wants to store/fetch the crypto message format in/from a 
KPIM::Identity would have to link to libkleo in order to be able to 
convert the crypto message format that is stored as QString or 
QByteArray in the QVariantMap to the actual value of type 
Kleo::CryptoMessageFormat.

KPIM::Identity gets two new methods

  QVariant property( const QString & key ) const;
  void setProperty( const QString & key, const QVariant & value );

(yes, this looks a lot like QObject's property() and setProperty(); 
maybe we should even use exactly the same interface as QObject, i.e. 
const char * instead of const QString & and bool instead of void, to 
avoid confusion) and in order to set or get the preferred crypto 
message format one would call

  ident.setProperty( "PreferredCryptoMessageFormat",
    Kleo::cryptoMessageFormatToString( preferredCryptoMessageFormat ) );

resp.

  preferredCryptoMessageFormat =
    Kleo::stringToCryptoMessageFormat(
      ident.property( "PreferredCryptoMessageFormat" ).toString() );


Obviously, the key "PreferredCryptoMessageFormat" (and all other keys) 
should be stored as static const somewhere (shared by all interested 
apps) to avoid typos..

Regards,
Ingo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20070625/c86af93a/attachment.sig>
-------------- next part --------------
_______________________________________________
kde-pim mailing list
kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/


More information about the kde-pim mailing list