diff --git a/kmailicalIface.h b/kmailicalIface.h index d8fdb0bd0..ba51df108 100644 --- a/kmailicalIface.h +++ b/kmailicalIface.h @@ -39,28 +39,23 @@ class KMailICalIface : virtual public DCOPObject { K_DCOP k_dcop: - virtual bool addIncidence( const QString& type, const QString& uid, - const QString& ical, - const QString& subresource ) = 0; - virtual bool deleteIncidence( const QString& type, const QString& uid, - const QString& resource ) = 0; - virtual QStringList incidences( const QString& type, - const QString& resource ) = 0; + virtual bool addIncidence( const QString& folder, const QString& uid, + const QString& ical ) = 0; + virtual bool deleteIncidence( const QString& folder, const QString& uid ) = 0; + virtual QStringList incidences( const QString& folder ) = 0; // This saves the iCals/vCards in the entries in the folder. // The format in the string list is uid, entry, uid, entry... - virtual bool update( const QString& folder, const QStringList& entries, - const QString& resource ) = 0; + virtual bool update( const QString& folder, + const QStringList& entries ) = 0; // Update a single entry in the storage layer virtual bool update( const QString& folder, const QString& uid, - const QString& entry, const QString& resource ) = 0; + const QString& entry ) = 0; k_dcop_signals: - void incidenceAdded( const QString& folder, const QString& ical, - const QString& resource ); - void incidenceDeleted( const QString& folder, const QString& uid, - const QString& resource ); + void incidenceAdded( const QString& folder, const QString& ical ); + void incidenceDeleted( const QString& folder, const QString& uid ); }; #endif diff --git a/kmailicalifaceimpl.cpp b/kmailicalifaceimpl.cpp index dfb993e8d..303c2c569 100644 --- a/kmailicalifaceimpl.cpp +++ b/kmailicalifaceimpl.cpp @@ -82,8 +82,7 @@ KMailICalIfaceImpl::KMailICalIfaceImpl() // Receive an iCal or vCard from the resource bool KMailICalIfaceImpl::addIncidence( const QString& type, const QString& uid, - const QString& ical, - const QString& /*resource*/ ) + const QString& ical ) { kdDebug(5006) << "KMailICalIfaceImpl::addIncidence( " << type << ", " << uid << ", " << ical << " )" << endl; @@ -128,8 +127,7 @@ bool KMailICalIfaceImpl::addIncidence( const QString& type, // The resource orders a deletion bool KMailICalIfaceImpl::deleteIncidence( const QString& type, - const QString& uid, - const QString& /*resource*/ ) + const QString& uid ) { if( !mUseResourceIMAP ) return false; @@ -159,8 +157,7 @@ bool KMailICalIfaceImpl::deleteIncidence( const QString& type, } // The resource asks for a full list of incidences -QStringList KMailICalIfaceImpl::incidences( const QString& type, - const QString& /*resource*/ ) +QStringList KMailICalIfaceImpl::incidences( const QString& type ) { if( !mUseResourceIMAP ) return QStringList(); @@ -188,8 +185,7 @@ QStringList KMailICalIfaceImpl::incidences( const QString& type, } bool KMailICalIfaceImpl::update( const QString& type, - const QStringList& entries, - const QString& /*resource*/ ) + const QStringList& entries ) { if( !mUseResourceIMAP ) return false; @@ -220,8 +216,7 @@ bool KMailICalIfaceImpl::update( const QString& type, } bool KMailICalIfaceImpl::update( const QString& type, const QString& uid, - const QString& entry, - const QString& /*resource*/ ) + const QString& entry ) { if( !mUseResourceIMAP ) return false; @@ -237,12 +232,12 @@ bool KMailICalIfaceImpl::update( const QString& type, const QString& uid, if( msg ) { // Message found - update it deleteMsg( msg ); - addIncidence( type, uid, entry, "" ); + addIncidence( type, uid, entry ); rc = true; } else { kdDebug(5006) << type << " not found, cannot update uid " << uid << endl; // Since it doesn't seem to be there, save it instead - addIncidence( type, uid, entry, "" ); + addIncidence( type, uid, entry ); } } else { kdError() << "Not an IMAP resource folder" << endl; @@ -274,10 +269,10 @@ void KMailICalIfaceImpl::slotIncidenceAdded( KMFolder* folder, if( KMGroupware::vPartFoundAndDecoded( folder->getMsg( i ), s ) ) { QByteArray data; QDataStream arg(data, IO_WriteOnly ); - arg << type << s << ""; + arg << type << s; kdDebug(5006) << "Emitting DCOP signal incidenceAdded( " << type - << ", " << s << ", \"\" )" << endl; - emitDCOPSignal( "incidenceAdded(QString,QString,QString)", data ); + << ", " << s << " )" << endl; + emitDCOPSignal( "incidenceAdded(QString,QString)", data ); } if( unget ) folder->unGetMsg(i); } else @@ -307,10 +302,10 @@ void KMailICalIfaceImpl::slotIncidenceDeleted( KMFolder* folder, vPartMicroParser( s, uid ); QByteArray data; QDataStream arg(data, IO_WriteOnly ); - arg << type << uid << ""; + arg << type << uid; kdDebug(5006) << "Emitting DCOP signal incidenceDeleted( " - << type << ", " << uid << ", \"\" )" << endl; - emitDCOPSignal( "incidenceDeleted(QString,QString,QString)", data ); + << type << ", " << uid << " )" << endl; + emitDCOPSignal( "incidenceDeleted(QString,QString)", data ); } if( unget ) folder->unGetMsg(i); } else diff --git a/kmailicalifaceimpl.h b/kmailicalifaceimpl.h index 4d264c8ca..28ffb231a 100644 --- a/kmailicalifaceimpl.h +++ b/kmailicalifaceimpl.h @@ -52,20 +52,17 @@ public: KMailICalIfaceImpl(); virtual bool addIncidence( const QString& folder, const QString& uid, - const QString& ical, const QString& resource ); - virtual bool deleteIncidence( const QString& folder, const QString& uid, - const QString& resource ); - virtual QStringList incidences( const QString& folder, - const QString& resource ); + const QString& ical ); + virtual bool deleteIncidence( const QString& folder, const QString& uid ); + virtual QStringList incidences( const QString& folder ); // This saves the iCals/vCards in the entries in the folder. // The format in the string list is uid, entry, uid, entry... - virtual bool update( const QString& folder, const QStringList& entries, - const QString& resource ); + virtual bool update( const QString& folder, const QStringList& entries ); // Update a single entry in the storage layer virtual bool update( const QString& folder, const QString& uid, - const QString& entry, const QString& resource ); + const QString& entry ); // tell KOrganizer about messages to be deleted void msgRemoved( KMFolder*, KMMessage* );