32 #ifndef KMAILICALIFACE_H
33 #define KMAILICALIFACE_H
35 #include <dcopobject.h>
36 #include <tqstringlist.h>
43 #include <kmail/kmailicalIface.h>
45 class KMailICalIface : virtual public DCOPObject
54 SubResource( const TQString& loc, const TQString& lab, bool rw, bool ar )
55 : location( loc ), label( lab ), writable( rw ), alarmRelevant( ar ) {}
67 enum StorageFormat { StorageIcalVcard, StorageXML };
70 enum FolderChanges { NoChange = 0, Contents = 1, ACL = 2 };
72 virtual bool isWritableFolder( const TQString& type,
73 const TQString& resource ) = 0;
75 virtual KMailICalIface::StorageFormat storageFormat( const TQString& resource ) = 0;
77 virtual KURL getAttachment( const TQString& resource,
79 const TQString& filename ) = 0;
80 virtual TQString attachmentMimetype( const TQString &resource,
82 const TQString &filename ) = 0;
84 virtual TQStringList listAttachments( const TQString &resource, TQ_UINT32 sernum ) = 0;
88 virtual TQ_UINT32 update( const TQString& resource,
90 const TQString& subject,
91 const TQString& plainTextBody,
92 const TQMap<TQCString, TQString>& customHeaders,
93 const TQStringList& attachmentURLs,
94 const TQStringList& attachmentMimetypes,
95 const TQStringList& attachmentNames,
96 const TQStringList& deletedAttachments ) = 0;
98 virtual bool deleteIncidenceKolab( const TQString& resource,
99 TQ_UINT32 sernum ) = 0;
103 virtual int incidencesKolabCount( const TQString& mimetype ,
104 const TQString& resource ) = 0;
106 virtual TQMap<TQ_UINT32, TQString> incidencesKolab( const TQString& mimetype,
107 const TQString& resource,
109 int nbMessages ) = 0;
114 virtual TQValueList<KMailICalIface::SubResource> subresourcesKolab( const TQString& contentsType ) = 0;
121 virtual bool addSubresource( const TQString& resource,
122 const TQString& parent,
123 const TQString& contentsType ) = 0;
128 virtual bool removeSubresource( const TQString& resource ) = 0;
133 virtual int dimapAccounts() = 0;
138 virtual bool triggerSync( const TQString & ) = 0;
139 virtual void changeResourceUIName( const TQString &folderPath, const TQString &newName ) = 0;
142 void incidenceAdded( const TQString& type, const TQString& folder,
143 TQ_UINT32 sernum, int format, const TQString& entry );
144 void asyncLoadResult( const TQMap<TQ_UINT32, TQString>, const TQString& type,
145 const TQString& folder );
146 void incidenceDeleted( const TQString& type, const TQString& folder,
147 const TQString& uid );
148 void signalRefresh( const TQString& type, const TQString& folder );
149 void subresourceAdded( const TQString& type, const TQString& resource,
150 const TQString& label, bool writable, bool alarmRelevant );
151 void subresourceDeleted( const TQString& type, const TQString& resource );
154 inline TQDataStream& operator<<( TQDataStream& str, const KMailICalIface::SubResource& subResource )
156 str << subResource.location << subResource.label << subResource.writable << subResource.alarmRelevant;
159 inline TQDataStream& operator>>( TQDataStream& str, KMailICalIface::SubResource& subResource )
161 str >> subResource.location >> subResource.label >> subResource.writable >> subResource.alarmRelevant;
165 inline TQDataStream& operator<<( TQDataStream& str, const KMailICalIface::StorageFormat& format )
167 TQ_UINT32 foo = format;
172 inline TQDataStream& operator>>( TQDataStream& str, KMailICalIface::StorageFormat& format )
176 format = ( KMailICalIface::StorageFormat )foo;
|