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

List:       kde-commits
Subject:    KDE/kdepimlibs/kldap
From:       Tobias Koenig <tokoe () kde ! org>
Date:       2009-12-09 18:08:22
Message-ID: 1260382102.343998.1905.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1060704 by tokoe:

Add apidocs


 M  +205 -30   ldapserver.h  
 M  +91 -39    ldapurl.h  


--- trunk/KDE/kdepimlibs/kldap/ldapserver.h #1060703:1060704
@@ -29,25 +29,63 @@
 
 namespace KLDAP {
 
-/** This class holds various parameters about an LDAP server,
- * and the LDAP query parameters.
+/**
+ * @short A class that contains LDAP server connection settings.
+ *
+ * This class holds various parameters that are needed to connect
+ * to an LDAP server.
  */
 class KLDAP_EXPORT LdapServer
 {
   public:
+    /**
+     * Creates an empty LDAP server object.
+     */
     LdapServer();
+
+    /**
+     * Creates a new LDAP server object.
+     *
+     * @param url The LDAP url of the server.
+     */
     LdapServer( const LdapUrl &url );
 
-    LdapServer( const LdapServer &that );
-    LdapServer &operator= ( const LdapServer &that );
+    /**
+     * Creates a new LDAP server object from an @p other object.
+     */
+    LdapServer( const LdapServer &other );
 
+    /**
+     * Overwrites the values of the LDAP server object with
+     * the values from an @p other object.
+     */
+    LdapServer &operator=( const LdapServer &other );
+
+    /**
+     * Destroys the LDAP server object.
+     */
     virtual ~LdapServer();
 
-    typedef enum {
-      None, TLS, SSL
+    /**
+     * Describes the encryption settings that can be used
+     * for the LDAP connection.
+     */
+    typedef enum
+    {
+      None, ///< Do not use any encryption.
+      TLS,  ///< Use TLS encryption.
+      SSL   ///< Use SSL encryption.
     } Security;
-    typedef enum {
-      Anonymous, Simple, SASL
+
+    /**
+     * Describes the authentication method that can be used
+     * for the LDAP connection.
+     */
+    typedef enum
+    {
+      Anonymous,  ///< Do no authentication.
+      Simple,     ///< Authenticate via login and password.
+      SASL        ///< Azthenticate with the SASL framework.
     } Auth;
 
     /**
@@ -55,45 +93,186 @@
      */
     void clear();
 
+    /**
+     * Sets the host of the LDAP connection.
+     */
+    void setHost( const QString &host );
+
+    /**
+     * Returns the host of the LDAP connection.
+     */
     QString host() const;
+
+    /**
+     * Sets the port of the LDAP connection.
+     * If not port is set, 389 is used as default.
+     */
+    void setPort( int port );
+
+    /**
+     * Returns the port of the LDAP connection.
+     */
     int port() const;
+
+    /**
+     * Sets the @p baseDn of the LDAP connection.
+     */
+    void setBaseDn( const LdapDN &baseDn );
+
+    /**
+     * Returns the baseDn of the LDAP connection.
+     */
     LdapDN baseDn() const;
+
+    /**
+     * Sets the @p user of the LDAP connection.
+     */
+    void setUser( const QString &user );
+
+    /**
+     * Returns the user of the LDAP connection.
+     */
     QString user() const;
+
+    /**
+     * Sets the @p bindDn of the LDAP connection.
+     */
+    void setBindDn( const QString &bindDn );
+
+    /**
+     * Returns the bindDn of the LDAP connection.
+     */
     QString bindDn() const;
+
+    /**
+     * Sets the @p realm of the LDAP connection.
+     */
+    void setRealm( const QString &realm );
+
+    /**
+     * Returns the realm of the LDAP connection.
+     */
     QString realm() const;
+
+    /**
+     * Sets the @p password of the LDAP connection.
+     */
+    void setPassword( const QString &password );
+
+    /**
+     * Returns the password of the LDAP connection.
+     */
     QString password() const;
+
+    /**
+     * Sets the protocol @p version of the LDAP connection.
+     * If no version is set, 3 is used as default.
+     */
+    void setVersion( int version );
+
+    /**
+     * Returns the protocol version of the LDAP connection.
+     */
     int version() const;
+
+    /**
+     * Sets the security @p mode of the LDAP connection.
+     * If no security is set, None is used as default.
+     */
+    void setSecurity( Security mode );
+
+    /**
+     * Returns the security mode of the LDAP connection.
+     */
     Security security() const;
+
+    /**
+     * Sets the @p authentication method of the LDAP connection.
+     * If no authentication method is set, Anonymous is used as default.
+     */
+    void setAuth( Auth authentication );
+
+    /**
+     * Returns the authentication method of the LDAP connection.
+     */
     Auth auth() const;
+
+    /**
+     * Sets the @p mech of the LDAP connection.
+     */
+    void setMech( const QString &mech );
+
+    /**
+     * Returns the mech of the LDAP connection.
+     */
     QString mech() const;
+
+    /**
+     * Sets the @p timeout of the LDAP connection.
+     */
+    void setTimeout( int timeout );
+
+    /**
+     * Returns the timeout of the LDAP connection.
+     */
     int timeout() const;
 
+    /**
+     * Sets the search @p scope of the LDAP connection.
+     */
+    void setScope( LdapUrl::Scope scope );
+
+    /**
+     * Returns the search scope of the LDAP connection.
+     */
     LdapUrl::Scope scope() const;
+
+    /**
+     * Sets the time @p limit of the LDAP connection.
+     */
+    void setTimeLimit( int limit );
+
+    /**
+     * Returns the time limit of the LDAP connection.
+     */
     int timeLimit() const;
+
+    /**
+     * Sets the size @p limit of the LDAP connection.
+     */
+    void setSizeLimit( int sizelimit );
+
+    /**
+     * Returns the size limit of the LDAP connection.
+     */
     int sizeLimit() const;
+
+    /**
+     * Sets the page @p size of the LDAP connection.
+     */
+    void setPageSize( int size );
+
+    /**
+     * Returns the page size of the LDAP connection.
+     */
     int pageSize() const;
-    QString filter() const;
 
-    void setHost( const QString &host );
-    void setPort( int port );
-    void setBaseDn( const LdapDN &baseDn );
-    void setUser( const QString &user );
-    void setBindDn( const QString &bindDn );
-    void setRealm( const QString &realm );
-    void setPassword( const QString &password );
-    void setVersion( int version );
-    void setSecurity( Security security );
-    void setAuth( Auth auth );
-    void setMech( const QString &mech );
-    void setTimeout( int timeout );
-
-    void setScope( LdapUrl::Scope scope );
-    void setTimeLimit( int timelimit );
-    void setSizeLimit( int sizelimit );
-    void setPageSize( int pagesize );
+    /**
+     * Sets the @p filter string of the LDAP connection.
+     */
     void setFilter( const QString &filter );
 
     /**
+     * Returns the filter string of the LDAP connection.
+     */
+    QString filter() const;
+
+    /**
+     * Sets the server parameters from an RFC2255 compliant LDAP @p url.
+     */
+    void setUrl( const LdapUrl &url );
+
+    /**
      * Returns the server parameters as an RFC2255 compliant LDAP Url.
      * The URL extensions which are supported:
      * Standard: bindname
@@ -101,10 +280,6 @@
      * x-sizelimit, x-timelimit, x-pagesize, x-timeout
      */
     LdapUrl url() const;
-    /**
-     * Sets the server parameters from an RFC2255 compliant LDAP Url.
-     */
-    void setUrl( const LdapUrl &url );
 
   private:
     class LdapServerPrivate;
--- trunk/KDE/kdepimlibs/kldap/ldapurl.h #1060703:1060704
@@ -32,94 +32,146 @@
 namespace KLDAP {
 
 /**
- * LdapUrl
-
+ * @short A special url class for LDAP.
+ *
  * LdapUrl implements an RFC 2255 compliant LDAP Url parser, with minimal
  * differences. LDAP Urls implemented by this class has the following format:
  * ldap[s]://[user[:password]@]hostname[:port]["/" [dn ["?" [attributes]
  * ["?" [scope] ["?" [filter] ["?" extensions]]]]]]
  */
-
 class KLDAP_EXPORT LdapUrl : public KUrl
 {
   public:
 
+    /**
+     * A class holding the extension name and state whether
+     * the extension is critical.
+     */
     typedef struct {
       QString value;
       bool critical;
     } Extension;
 
+    /**
+     * Describes the scope of the LDAP url.
+     */
     typedef enum {
-      Base, One, Sub
+      Base,  ///< Only the same level as the url.
+      One,   ///< The level of the url and the one below.
+      Sub    ///< All levels below the url's level.
     } Scope;
 
-    /** Constructs an empty KLdapUrl. */
+    /**
+     * Constructs an empty LDAP url.
+     */
     LdapUrl();
 
-    /** Constructs a KLdapUrl from a KUrl. */
+    /**
+     * Constructs a LDAP url from a KUrl @p url.
+     */
     explicit LdapUrl( const KUrl &url );
 
-    /** Constructs a KLdapUrl from a LdapUrl. */
-    LdapUrl( const LdapUrl &that );
+    /**
+     * Constructs a LDAP url from an other url.
+     */
+    LdapUrl( const LdapUrl &other );
 
-    LdapUrl &operator=( const LdapUrl &that );
+    /**
+     * Overwrites the values of the LDAP url with values
+     * from an @p other url.
+     */
+    LdapUrl &operator=( const LdapUrl &other );
 
+    /**
+     * Destroys the LDAP url.
+     */
     virtual ~LdapUrl();
 
     /**
-     * Returns the dn part of the LDAP Url (same as path(), but slash removed
-     * from the beginning).
+     * Sets the @p dn part of the LDAP url.
      */
+    void setDn( const LdapDN &dn );
+
+    /**
+     * Returns the dn part of the LDAP url.
+     * This is equal to path() with the slash removed from the beginning.
+     */
     LdapDN dn() const;
 
-    /** Sets the dn part of the LDAP Url. */
-    void setDn( const LdapDN &dn );
+    /**
+     * Sets the @p attributes part of the LDAP url.
+     */
+    void setAttributes( const QStringList &attributes );
 
-    /** Returns the attributes part of the LDAP Url */
+    /**
+     * Returns the attributes part of the LDAP url.
+     */
     QStringList attributes() const;
 
-    /** Sets the attributes part of the LDAP Url */
-    void setAttributes( const QStringList &attributes );
+    /**
+     * Sets the scope part of the LDAP url.
+     */
+    void setScope( Scope scope );
 
-    /** Returns the scope part of the LDAP Url */
+    /**
+     * Returns the scope part of the LDAP url.
+     */
     Scope scope() const;
 
-    /** Sets the scope part of the LDAP Url */
-    void setScope( Scope scope );
+    /**
+     * Sets the filter part of the LDAP url.
+     */
+    void setFilter( const QString &filter );
 
-    /** Returns the filter part of the LDAP Url */
+    /**
+     * Returns the filter part of the LDAP url.
+     */
     QString filter() const;
 
-    /** Sets the filter part of the LDAP Url */
-    void setFilter( const QString &filter );
+    /**
+     * Returns whether the specified @p extension exists in the LDAP url.
+     */
+    bool hasExtension( const QString &extension ) const;
 
-    /** Returns if the specified extension exists in the LDAP Url */
-    bool hasExtension( const QString &key ) const;
+    /**
+     * Returns the specified @p extension.
+     */
+    Extension extension( const QString &extension ) const;
 
-    /** Returns the specified extension */
-    Extension extension( const QString &key ) const;
+    /**
+     * Returns the specified @p extension.
+     */
+    QString extension( const QString &extension, bool &critical ) const;
 
-    /** Returns the specified extension */
-    QString extension( const QString &key, bool &critical ) const;
+    /**
+     * Sets the specified extension @p key with the value and criticality in @p extension.
+     */
+    void setExtension( const QString &key, const Extension &extension );
 
-    /** Sets the specified extension key with the value and criticality in ext */
-    void setExtension( const QString &key, const Extension &ext );
-
-    /** Sets the specified extension key with the value and criticality specified */
+    /**
+     * Sets the specified extension @p key with the @p value and criticality specified.
+     */
     void setExtension( const QString &key, const QString &value, bool critical = false );
 
-    /** Sets the specified extension key with the value and criticality specified */
+    /**
+     * Sets the specified extension @p key with the @p value and criticality specified.
+     */
     void setExtension( const QString &key, int value, bool critical = false );
 
-    /** Removes the specified extension */
-    void removeExtension( const QString &key );
+    /**
+     * Removes the specified @p extension.
+     */
+    void removeExtension( const QString &extension );
 
-    /** Updates the query component from the attributes, scope, filter and extensions */
+    /**
+     * Updates the query component from the attributes, scope, filter and extensions.
+     */
     void updateQuery();
 
-    /** Parses the query argument of the URL and makes it available via the
-      * attributes(), extension(), filter() and scope() methods
-      */
+    /**
+     * Parses the query argument of the URL and makes it available via the
+     * attributes(), extension(), filter() and scope() methods
+     */
     void parseQuery();
 
   private:
[prev in list] [next in list] [prev in thread] [next in thread] 

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