Added StorageFormat so that the ical resource doesn't read xml, and the

kolab resource doesn't try to parse ical.
But I can't fix the ical resource since this is still in proko2 branch...

svn path=/branches/proko2/kdepim/; revision=338591
wilder-work
David Faure 22 years ago
parent 53ea0f569f
commit 14e8fc07e9
  1. 11
      kmailicalIface.h
  2. 5
      kmailicalifaceimpl.cpp
  3. 9
      kmailicalifaceimpl.h

@ -105,11 +105,20 @@ k_dcop:
*/
virtual QValueList<KMailICalIface::SubResource> subresourcesKolab( const QString& contentsType ) = 0;
/// The format of the mails containing other contents than actual mail
/// (like contacts, calendar etc.)
/// This is currently either ical/vcard, or XML.
/// The imap resource uses this folder if ical/vcard storage,
/// the kolab resource uses this folder if xml storage.
/// For actual mail folders this simply to know which resource handles it
/// This enum matches the one defined in kmail.kcfg
enum StorageFormat { StorageIcalVcard, StorageXML };
k_dcop_signals:
void incidenceAdded( const QString& type, const QString& folder,
const QString& entry );
void incidenceAdded( const QString& type, const QString& folder,
Q_UINT32 sernum, const QString& entry );
Q_UINT32 sernum, int format, const QString& entry );
void incidenceDeleted( const QString& type, const QString& folder,
const QString& uid );
void signalRefresh( const QString& type, const QString& folder );

@ -942,7 +942,8 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder,
QString s;
bool ok = false;
KMMessage* msg = folder->getMsg( i );
switch( storageFormat( folder ) ) {
StorageFormat format = storageFormat( folder );
switch( format ) {
case StorageIcalVcard:
// Read the iCal or vCard
ok = KMGroupware::vPartFoundAndDecoded( msg, s );
@ -956,7 +957,7 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder,
kdDebug(5006) << "Emitting DCOP signal incidenceAdded( " << type
<< ", " << folder->location() << ", " << s << " )" << endl;
incidenceAdded( type, folder->location(), s );
incidenceAdded( type, folder->location(), sernum, s );
incidenceAdded( type, folder->location(), sernum, format, s );
}
if( unget ) folder->unGetMsg(i);
} else

@ -153,15 +153,6 @@ public:
/** Called when a folders contents have changed */
void folderContentsTypeChanged( KMFolder*, KMail::FolderContentsType );
/// The format of the mails containing other contents than actual mail
/// (like contacts, calendar etc.)
/// This is currently either ical/vcard, or XML.
/// The imap resource uses this folder if ical/vcard storage,
/// the kolab resource uses this folder if xml storage.
/// For actual mail folders this simply to know which resource handles it
/// This enum matches the one defined in kmail.kcfg
enum StorageFormat { StorageIcalVcard, StorageXML };
/// @return the storage format of a given folder
StorageFormat storageFormat( KMFolder* folder ) const;
/// Set the storage format of a given folder. Called when seeing the kolab annotation.

Loading…
Cancel
Save