Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

clientexception.hpp

00001 /************************************************************************************
00002  *    This file is part of the MynahSA streaming and archiving toolkit              *
00003  *    Copyright (C) 2006 Mynah-Software Ltd. All Rights Reserved.                   *
00004  *                                                                                  *
00005  *    This program is free software; you can redistribute it and/or modify          *
00006  *    it under the terms of the GNU General Public License, version 2               *
00007  *    as published by the Free Software Foundation.                                 *
00008  *                                                                                  *
00009  *    This program is distributed in the hope that it will be useful,               *
00010  *    but WITHOUT ANY WARRANTY; without even the implied warranty of                *
00011  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                 *
00012  *    GNU General Public License for more details.                                  *
00013  *                                                                                  *
00014  *    You should have received a copy of the GNU General Public License along       *
00015  *    with this program; if not, write to the Free Software Foundation, Inc.,       *
00016  *    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                   *
00017  *                                                                                  *
00018  ************************************************************************************/
00019 
00020 #include <mynahsa/exceptionbase.hpp>
00021 
00022 namespace MynahSA { 
00023   class ClientException : public ExceptionBase { 
00024   public:
00025     enum ErrorCode {
00026       CLIENT_ERROR_BIND,
00027       CLIENT_ERROR_CONNECT,
00028       CLIENT_ERROR_CREATE_SOCKET,
00029       CLIENT_ERROR_SOCKET_REUSE,
00030       SSLRPCCLIENT_ERROR_SSL_CONTEXT_CREATION,
00031       SSLRPCCLIENT_ERROR_SSL_NEW,
00032       SSLRPCCLIENT_ERROR_SSL_CONNECT,
00033       CLIENT_ERROR_WRITE,
00034       CLIENT_ERROR_READ,
00035       SSLRPCCLIENT_ERROR_LOAD_CERT,
00036       SSLRPCCLIENT_ERROR_LOAD_PKEY,
00037       SSLRPCCLIENT_PKEY_INVALID,
00038       CLIENT_NO_ADDRESS,
00039       CLIENT_ADDRESS_CONVERSION_ERROR
00040     };
00041     
00047     ClientException(ErrorCode code) throw();
00048   
00049    
00054     ~ClientException() throw();
00055   
00060     const char* what() const throw();
00061     
00062   private:
00063     ErrorCode _ec;
00064   }; // class ClientException
00065 
00066 
00067 
00068 }; // namespace MynahSA