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

List:       kde-commits
Subject:    [kdelibs/ksecretsservice] /: Added some source documentation on
From:       Valentin Rusu <kde () rusu ! info>
Date:       2011-09-04 15:26:47
Message-ID: 20110904152647.7FE0BA60D9 () git ! kde ! org
[Download RAW message or body]

Git commit 6aab8dbc2cfb2179cd24fd97e215c9fc727807fa by Valentin Rusu.
Committed on 18/10/2010 at 23:41.
Pushed by vrusu into branch 'ksecretsservice'.

Added some source documentation on latest added files

svn path=/trunk/playground/base/ksecretservice/; revision=1187300

M  +2    -2    peer.h
M  +64   -17   jobinfostructs.h

http://commits.kde.org/kdelibs/6aab8dbc2cfb2179cd24fd97e215c9fc727807fa

diff --git a/jobinfostructs.h b/jobinfostructs.h
index 1803908..267d668 100644
--- a/jobinfostructs.h
+++ b/jobinfostructs.h
@@ -52,12 +52,14 @@
 struct JobBaseInfo
 {
    /**
-     * The peer that requested the delete operation
+     * The peer that requested the delete operation.
      * Beware when storing the pointer to the peer outside
      * this class as it's deleting it when destructed
      */
    const Peer* m_peer;
-   JobBaseInfo( const Peer* peer ) : m_peer( peer ) {}
+   JobBaseInfo( const Peer* peer ) : m_peer( peer ) 
+   { /* nothing */ }
+   
    virtual ~JobBaseInfo()
    {
       if (m_peer != 0)
@@ -67,48 +69,77 @@ struct JobBaseInfo
 
 class BackendCollection;
 
+/**
+ * This job value object holds information needed when creating
+ * a new collection.auto.
+ */
 struct CollectionCreateInfo : public JobBaseInfo
 {
-   const QString &m_label;
-   bool  m_locked;
+   const QString &m_label; /*!< new collection label */
+   bool  m_locked; /*!< if true, the collection will be locked after creation */
    
+   /**
+    * Collection creation job value object constructor
+    *
+    * @param label New collection's label
+    * @param peer Information about the d-bus peer which requests collection creation
+    */
    CollectionCreateInfo( const QString& label, const Peer* peer ) : 
       JobBaseInfo(peer), m_label( label ), m_locked(false)
-   {}
+   { /* nothing */ }
 };
 
+/**
+ * This job value object holds information needed during collection deletion
+ */
 struct CollectionDeleteInfo : public JobBaseInfo
 {
-   mutable BackendCollection *m_collection;
+   mutable BackendCollection *m_collection; /*!< the collection to be deleted */
+   /**
+    * Collection delete job value object constructor
+    *
+    * @param peer Information about the d-bus peer which requests collection delete
+    * @param collection The collection to be deleted. If NULL, it must be specified later
+    */
    CollectionDeleteInfo( const Peer* peer, BackendCollection *collection =0) : JobBaseInfo( peer ),
       m_collection(collection)
-   {}
+   { /* nothing */ }
 };
 
+/**
+ * This job value object holds information neede during collection unlocking
+ */
 struct CollectionUnlockInfo : public JobBaseInfo
 {
    mutable BackendCollection *m_collection; // collection may be changed on the job path
+   /**
+    * Collection unlock job value object constructor
+    *
+    * @param peer Information about the d-bus peer which requests collection unlocking
+    * @param collection The collection to be unkocked. If NULL, it must be specified later.
+    */
    CollectionUnlockInfo( const Peer* peer, BackendCollection *collection =0) : JobBaseInfo( peer ),
       m_collection(collection)
-   {}
+   { /* nothing */ }
 };
 
 class BackendItem;
 
 struct ItemCreateInfo : public JobBaseInfo
 {
-   const QString &m_label;
-   const QMap<QString, QString> &m_attributes;
-   const QCA::SecureArray &m_secret;
-   bool m_replace;
-   bool m_locked;
+   const QString &m_label; /*!< Item label */
+   const QMap<QString, QString> &m_attributes; /*!< Collection of attributes to set for the new item */
+   const QCA::SecureArray &m_secret; /*!< The secret to store */
+   bool m_replace; /*!< If true, replace an item with the same attributes if it already exists */
+   bool m_locked; /*!< true if the item should be locked after creation, false else */
+   
    /**
     * @param label human-readable label for the new item
     * @param attributes attributes to set for the new item
     * @param secret the secret to store
     * @param locked true if the item should be locked after creation, false else
     * @param replace if true, replace an item with the same attributes if it already exists
-    * @param peer the d-bus peer that initiated this operation
+    * @param peer the d-bus peer that initiated the item creation operation
     */
    ItemCreateInfo( const QString &label, 
                    const QMap<QString, QString> &attributes,
@@ -119,21 +150,37 @@ struct ItemCreateInfo : public JobBaseInfo
       JobBaseInfo( peer ),
       m_label(label), m_attributes(attributes), m_secret(secret), 
       m_replace(replace), m_locked(locked)
-   {}
+   { /* nothing */ }
 };
 
+/**
+ * Item delete job value object 
+ */
 struct ItemDeleteInfo : public JobBaseInfo
 {
    mutable BackendItem* m_item; // item information may be added on the job path so let it be mutable
+   /**
+    * Item delete job value object constructor
+    * @param peer the d-bus peer that initiated the item delete operation
+    * @param item the item to be deleted. If NULL, it must be specified later.
+    */
    ItemDeleteInfo( const Peer* peer, BackendItem *item =0) : JobBaseInfo( peer ), m_item( item )
-   {}
+   { /* nothing */ }
 };
 
+/**
+ * Value object used by item unlocking jobs
+ */
 struct ItemUnlockInfo : public JobBaseInfo
 {
    mutable BackendItem *m_item; // item information may be added on the job path so let it be mutable
+   /** 
+    * Item unlock value object constructor
+    * @param peer the d-bus peer that initiated the item delete operation
+    * @param item the item to be deleted. If NULL, it must be specified later.
+    */
    ItemUnlockInfo( const Peer *peer, BackendItem *item =0) : JobBaseInfo( peer ), m_item( item ) 
-   {}
+   { /* nothing */ }
 };
 
 #endif // JOBINFOSTRUCTS_H
diff --git a/peer.h b/peer.h
index 8b33049..2e3a6e7 100644
--- a/peer.h
+++ b/peer.h
@@ -24,9 +24,9 @@
 #include <QtGlobal>
 
 /**
- * Representation of a daemon peer, wich is typically a client application
+ * Representation of a daemon peer, wich is typically a client application.
  * Note that the client application firstly connect to the dbus deamon wich
- * forwards messages to ksecretservice daemon using another connection
+ * forwards messages to ksecretservice daemon using another connection.
  */
 class Peer
 {


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

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