And revert stuff that was not supposed to go in yet

svn path=/trunk/kdepim/; revision=303957
wilder-work
Bo Thorsen 22 years ago
parent ad5a51b9ca
commit b8802fc6a8
  1. 23
      kmailicalIface.h
  2. 31
      kmailicalifaceimpl.cpp
  3. 13
      kmailicalifaceimpl.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

@ -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

@ -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* );

Loading…
Cancel
Save