[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdepim/akonadiserver/src
From:       Till Adam <adam () kde ! org>
Date:       2006-05-26 16:31:30
Message-ID: 1148661090.427757.5138.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 545030 by tilladam:

More fields are needed for locations.


 M  +10 -9     handler/select.cpp  
 M  +13 -0     storage/entity.h  


--- trunk/KDE/kdepim/akonadiserver/src/handler/select.cpp #545029:545030
@@ -60,24 +60,25 @@
     //         << " in resource: " << mailbox.mid( 1, secondSlash - 2 );
     Resource resource = db->getResourceByName( mailbox.mid( 1, secondSlash - 2 ) );
     Location l = db->getLocationByName( resource, mailbox.mid( secondSlash -1 , \
mailbox.size() - (secondSlash-1) ) ); +    if ( !l.isValid() ) {
+        response.setFailure();
+        response.setString( "Cannot list this folder");
+        emit responseAvailable( response );
+    }
 
-    int exists = 5;
-    response.setString( QString::number(exists) + " EXISTS" );
+    response.setString( QString::number(l.getExists()) + " EXISTS" );
     emit responseAvailable( response );
 
-    int recent = 5;
-    response.setString( QString::number(recent) + " RECENT" );
+    response.setString( QString::number(l.getRecent()) + " RECENT" );
     emit responseAvailable( response );
 
-
-    int unseen = 1;
     int firstUnseen = 4;
 
-    response.setString( "OK [UNSEEN " + QString::number(unseen) + "] Message " + \
QString::number(firstUnseen) + " is first unseen" ); +    response.setString( "OK \
[UNSEEN " + QString::number(l.getUnseen()) + "] Message " +            + \
QString::number(l.getFirstUnseen() ) + " is first unseen" );  emit responseAvailable( \
response );  
-    unsigned int uidValidity = 3857529045;
-    response.setString( "OK [UIDVALIDITY " + QString::number(uidValidity) + "] UIDs \
valid" ); +    response.setString( "OK [UIDVALIDITY " + QString::number( \
l.getUidValidity() ) + "] UIDs valid" );  emit responseAvailable( response );
 
     response.setSuccess();
--- trunk/KDE/kdepim/akonadiserver/src/storage/entity.h #545029:545030
@@ -114,6 +114,13 @@
     int getResourceId() const { return m_resource_id; };
     const QString & getLocation() const { return m_location; };
 
+    QString getFlags() const { return m_flags; }
+    int getExists() const { return m_exists; }
+    int getRecent() const { return m_recent; }
+    int getUnseen() const { return m_unseen; }
+    int getFirstUnseen() const { return m_unseen; }
+    long getUidValidity() const { return m_uidValidity; }
+
 protected:
     Location & setPolicyId( int policy_id )
         { m_policy_id = policy_id; return *this; };
@@ -128,6 +135,12 @@
     int m_policy_id;
     int m_resource_id;
     QString m_location;
+    int m_exists;
+    int m_recent;
+    int m_unseen;
+    int m_firstUnseen;
+    long m_uidValidity;
+    QString m_flags;
 
     friend class DataStore;
 };


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic