X-Git-Url: https://git.teslayout.com/public/public/public/?a=blobdiff_plain;f=include%2Fanna%2Fldap%2FResultCode.hpp;h=c1e77ae43e74af285490beda0c445cc12623e036;hb=5a6cba5fde2b2f538a7515f8293cc0a8d9589dfa;hp=db110487e988d1bcf4c6a8be5a87b337568843df;hpb=4e12ac57e93c052f716a6305ad8fc099c45899d1;p=anna.git diff --git a/include/anna/ldap/ResultCode.hpp b/include/anna/ldap/ResultCode.hpp index db11048..c1e77ae 100644 --- a/include/anna/ldap/ResultCode.hpp +++ b/include/anna/ldap/ResultCode.hpp @@ -1,37 +1,9 @@ -// 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 @@ -62,7 +34,7 @@ public: 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 @@ -74,7 +46,7 @@ public: \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. @@ -84,7 +56,7 @@ public: \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. @@ -94,7 +66,7 @@ public: \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. @@ -104,7 +76,7 @@ public: \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. @@ -114,7 +86,7 @@ public: \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. @@ -124,7 +96,7 @@ public: \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. @@ -134,7 +106,7 @@ public: \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. @@ -144,7 +116,7 @@ public: \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, @@ -156,7 +128,7 @@ public: \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. @@ -167,7 +139,7 @@ public: \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. @@ -181,7 +153,7 @@ public: \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. @@ -192,7 +164,7 @@ public: \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. @@ -202,7 +174,7 @@ public: \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. @@ -212,7 +184,7 @@ public: \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. @@ -222,7 +194,7 @@ public: \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. @@ -232,7 +204,7 @@ public: \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. @@ -242,7 +214,7 @@ public: \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. @@ -252,7 +224,7 @@ public: \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. @@ -262,43 +234,43 @@ public: \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; @@ -310,18 +282,18 @@ public: * \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; @@ -329,9 +301,9 @@ private: 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; };