summaryrefslogtreecommitdiff
path: root/lib/jobs/findkolabfoldersjob.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/jobs/findkolabfoldersjob.cpp')
-rw-r--r--lib/jobs/findkolabfoldersjob.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/jobs/findkolabfoldersjob.cpp b/lib/jobs/findkolabfoldersjob.cpp
index cda3ca5..fb6b873 100644
--- a/lib/jobs/findkolabfoldersjob.cpp
+++ b/lib/jobs/findkolabfoldersjob.cpp
@@ -82,7 +82,8 @@ void FindKolabFoldersJob::onMailBoxesReceived( const QList< KIMAP::MailBoxDescri
meta->setMailBox( descriptor.name );
if ( m_serverCapabilities.contains( "METADATA" ) ) {
meta->setServerCapability( KIMAP::MetaDataJobBase::Metadata );
- meta->addEntry( KOLAB_FOLDER_TYPE_ANNOTATION );
+ //TODO support shared/private
+ meta->addEntry( "/shared" KOLAB_FOLDER_TYPE_ANNOTATION );
} else if ( m_serverCapabilities.contains( "ANNOTATEMORE" ) ) {
meta->setServerCapability( KIMAP::MetaDataJobBase::Annotatemore );
meta->addEntry( KOLAB_FOLDER_TYPE_ANNOTATION, "value.shared" );
@@ -124,18 +125,16 @@ void FindKolabFoldersJob::onGetMetaDataDone( KJob *job )
QMap<QByteArray, QMap<QByteArray, QByteArray> > rawAnnotations = meta->allMetaData( meta->mailBox() );
QByteArray attribute = "";
+ QByteArray annotation = KOLAB_FOLDER_TYPE_ANNOTATION;
if ( meta->serverCapability()==KIMAP::MetaDataJobBase::Annotatemore ) {
attribute = "value.shared";
}
-
-// QMap<QByteArray, QByteArray> annotations;
-// foreach ( const QByteArray &entry, rawAnnotations.keys() ) {
-// annotations[entry] = rawAnnotations[entry][attribute];
-// Debug() << entry << annotations[entry];
-// }
+ if ( meta->serverCapability()==KIMAP::MetaDataJobBase::Metadata ) {
+ annotation = "/shared" KOLAB_FOLDER_TYPE_ANNOTATION;
+ }
//TODO default flag?
- const QByteArray &kolabType = rawAnnotations[KOLAB_FOLDER_TYPE_ANNOTATION][attribute];
+ const QByteArray &kolabType = rawAnnotations[annotation][attribute];
// Debug() << meta->mailBox() << kolabType;
if (!kolabType.isEmpty()) {
if (kolabType.contains(KOLAB_FOLDER_TYPE_CONTACT)) {