-// ANNA - Anna is Not 'N' Anymore
-//
-// (c) Copyright 2005-2014 Eduardo Ramos Testillano & Francisco Ruiz Rayo
-//
-// https://bitbucket.org/testillano/anna
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions
-// are met:
-//
-// * Redistributions of source code must retain the above copyright
-// notice, this list of conditions and the following disclaimer.
-// * Redistributions in binary form must reproduce the above
-// copyright notice, this list of conditions and the following disclaimer
-// in the documentation and/or other materials provided with the
-// distribution.
-// * Neither the name of Google Inc. nor the names of its
-// contributors may be used to endorse or promote products derived from
-// this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Authors: eduardo.ramos.testillano@gmail.com
-// cisco.tierra@gmail.com
+// ANNA - Anna is Not Nothingness Anymore //
+// //
+// (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
+// //
+// See project site at http://redmine.teslayout.com/projects/anna-suite //
+// See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
#ifndef anna_ldap_ResultCode_hpp
Devuelve \em true si la respuesta recibida es correcta o \em false en otro caso.
\return \em true si la respuesta recibida es correcta o \em false en otro caso.
*/
- bool isOk() const throw() { return a_value == 0; }
+ bool isOk() const { return a_value == 0; }
/**
Devuelve \em true si la respuesta recibida es un error debido a que las credenciales del usuario
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isInvalidCredential() const throw();
+ bool isInvalidCredential() const ;
/**
Devuelve \em true si la resulta recibida es LDAP_OPERATIONS_ERROR o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isOperationsError() const throw();
+ bool isOperationsError() const ;
/**
Devuelve \em true si la resulta recibida es LDAP_PROTOCOL_ERROR o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isProtocolError() const throw();
+ bool isProtocolError() const ;
/**
Devuelve \em true si la resulta recibida es LDAP_TIMELIMIT_EXCEEDED o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isTimeLimitExceeded() const throw();
+ bool isTimeLimitExceeded() const ;
/**
Devuelve \em true si la resulta recibida es LDAP_SIZELIMIT_EXCEEDED o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isSizeLimitExceeded() const throw();
+ bool isSizeLimitExceeded() const ;
/**
Devuelve \em true si la resulta recibida es LDAP_AUTH_METHOD_NOT_SUPPORTED o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isAuthMethodNotSupported() const throw();
+ bool isAuthMethodNotSupported() const ;
/**
Devuelve \em true si la resulta recibida es LDAP_STRONG_AUTH_REQUIRED o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isStrongAuthRequired() const throw();
+ bool isStrongAuthRequired() const ;
/**
Devuelve \em true si la resulta recibida es LDAP_SASL_BIND_IN_PROGRESS o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isSASLBindInProgress() const throw();
+ bool isSASLBindInProgress() const ;
/**
Devuelve \em true si la resulta recibida es un error de tipo LDAP_ATTR_ERROR o \em false en otro caso,
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isAttrError() const throw();
+ bool isAttrError() const ;
/**
Devuelve \em true si la resulta recibida es un error de tipo LDAP_NAME_ERROR o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isNameError() const throw();
+ bool isNameError() const ;
/**
Devuelve \em true si la resulta recibida es un error de tipo LDAP_SECURITY_ERROR o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isSecurityError() const throw();
+ bool isSecurityError() const ;
/**
Devuelve \em true si la resulta recibida es un error de tipo LDAP_SERVICE_ERROR o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isServiceError() const throw();
+ bool isServiceError() const ;
/**
Devuelve \em true si la resulta recibida es un error de tipo LDAP_TIMEOUT o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isTimeout() const throw();
+ bool isTimeout() const ;
/**
Devuelve \em true si la resulta recibida es un error de tipo LDAP_UNAVAILABLE o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isUnavailable() const throw();
+ bool isUnavailable() const ;
/**
Devuelve \em true si la resulta recibida es un error de tipo LDAP_SERVER_DOWN o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isServerDown() const throw();
+ bool isServerDown() const ;
/**
Devuelve \em true si la resulta recibida es un error de tipo LDAP_LOCAL_ERROR o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isLocalError() const throw();
+ bool isLocalError() const ;
/**
Devuelve \em true si la resulta recibida es un error de tipo LDAP_DECODING_ERROR o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isDecodingError() const throw();
+ bool isDecodingError() const ;
/**
Devuelve \em true si la resulta recibida es un error de tipo LDAP_FILTER_ERROR o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isFilterError() const throw();
+ bool isFilterError() const ;
/**
Devuelve \em true si la resulta recibida es un error de tipo LDAP_CONNECT_ERROR o \em false en otro caso.
\warning El valor retornado por este método sólo tendrá validez en caso de que el método #isOk
haya retornado \em false.
*/
- bool isConnectError() const throw();
+ bool isConnectError() const ;
/**
Devuelve el codigo de error asociado a esta instancia.
\return El codigo de error asociado a esta instancia.
*/
- int getValue() const throw() { return a_value; }
+ int getValue() const { return a_value; }
/**
Devuelve el texto explicativo del error asociado a esta instancia.
\return El texto explicativo del error asociado a esta instancia.
*/
- const std::string& getText() const throw() { return a_text; }
+ const std::string& getText() const { return a_text; }
/**
Establece el codigo de error asociado a esta instancia.
\param value Codigo de error
*/
-// void setValue (const int value) throw () { a_value = value; }
+// void setValue (const int value) { a_value = value; }
/**
Establece el texto explicativo del error asociado a esta instancia.
\param text Texto explicativo del error
*/
-// void setText (const std::string& text) throw () { a_text = text; }
+// void setText (const std::string& text) { a_text = text; }
/**
Inicializa el codigo de error y el texto de esta instancia.
*/
- void clear() throw() { a_value = 0; a_text.clear(); }
+ void clear() { a_value = 0; a_text.clear(); }
/**
Operador copia.
\param other Instancia de la que copiar.
\return La instancia de el mismo despues de copiar los valores.
*/
- ResultCode& operator= (const ResultCode& other) throw() {
+ ResultCode& operator= (const ResultCode& other) {
a_value = other.a_value;
a_text = other.a_text;
return *this;
* \warning Si el valor de \em ldap_result no fue obtenido como resultado de ejecutar alguna operacion LDAP
* el resultado de este método no está definido.
*/
- ResultCode& operator= (const int ldap_result) throw();
+ ResultCode& operator= (const int ldap_result) ;
- bool operator == (const int n) const throw() { return a_value == n; }
- bool operator != (const int n) const throw() { return a_value != n; }
- bool operator < (const int n) const throw() { return a_value < n; }
- bool operator <= (const int n) const throw() { return a_value <= n; }
+ bool operator == (const int n) const { return a_value == n; }
+ bool operator != (const int n) const { return a_value != n; }
+ bool operator < (const int n) const { return a_value < n; }
+ bool operator <= (const int n) const { return a_value <= n; }
/**
Devuelve una cadena con la informacion relevante sobre esta instancia.
\return Una cadena con la informacion relevante sobre esta instancia.
*/
- const std::string asString() const throw();
+ const std::string asString() const ;
private:
int a_value;
ResultCode(const int ldap_method_result);
- void setValue(const int ldap_method_result, const int ldap_method_error) throw();
+ void setValue(const int ldap_method_result, const int ldap_method_error) ;
- bool extractResultCode(const Session*) throw();
+ bool extractResultCode(const Session*) ;
friend class Session;
};