server/connectionDescription.h

00001 
00002 /* Copyright (c) 2006-2009, Stefan Eilemann <eile@equalizergraphics.com> 
00003  *
00004  * This library is free software; you can redistribute it and/or modify it under
00005  * the terms of the GNU Lesser General Public License version 2.1 as published
00006  * by the Free Software Foundation.
00007  *  
00008  * This library is distributed in the hope that it will be useful, but WITHOUT
00009  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00010  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00011  * details.
00012  * 
00013  * You should have received a copy of the GNU Lesser General Public License
00014  * along with this library; if not, write to the Free Software Foundation, Inc.,
00015  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00016  */
00017 
00018 #ifndef EQSERVER_CONNECTION_DESCRIPTION_H
00019 #define EQSERVER_CONNECTION_DESCRIPTION_H
00020 
00021 #include <eq/net/connectionDescription.h>
00022 
00023 namespace eq
00024 {
00025 namespace server
00026 {
00027     class ConnectionDescription : public net::ConnectionDescription
00028     {
00029     public:
00030         EQSERVER_EXPORT ConnectionDescription();
00031 
00036         // Note: also update string array init in connectionDescription.cpp
00037         enum SAttribute
00038         {
00039             SATTR_HOSTNAME,
00040             SATTR_PIPE_FILENAME,
00041             SATTR_LAUNCH_COMMAND,
00042             SATTR_FILL1,
00043             SATTR_FILL2,
00044             SATTR_ALL
00045         };
00046 
00047         enum CAttribute
00048         {
00049             CATTR_LAUNCH_COMMAND_QUOTE,
00050             CATTR_FILL1,
00051             CATTR_FILL2,
00052             CATTR_ALL
00053         };
00054 
00055         enum IAttribute
00056         {
00057             IATTR_TYPE,
00058             IATTR_TCPIP_PORT,
00059             IATTR_LAUNCH_TIMEOUT,
00060             IATTR_BANDWIDTH,
00061             IATTR_FILL1,
00062             IATTR_FILL2,
00063             IATTR_ALL
00064         };
00066 
00067         static const std::string&  getSAttributeString( const SAttribute attr )
00068             { return _sAttributeStrings[attr]; }
00069         static const std::string&  getCAttributeString( const CAttribute attr )
00070             { return _cAttributeStrings[attr]; }
00071         static const std::string&  getIAttributeString( const IAttribute attr )
00072             { return _iAttributeStrings[attr]; }
00073 
00074     protected:
00075         virtual ~ConnectionDescription() {}
00076 
00077     private:
00079         static std::string _sAttributeStrings[SATTR_ALL];
00081         static std::string _cAttributeStrings[CATTR_ALL];
00083         static std::string _iAttributeStrings[IATTR_ALL];
00084 
00085         union // placeholder for binary-compatible changes
00086         {
00087             char dummy[64];
00088         };
00089     };
00090 
00091     std::ostream& operator << ( std::ostream&, const ConnectionDescription* );
00092 }
00093 }
00094 #endif // EQNET_CONNECTION_DESCRIPTION_H
Generated on Mon Aug 10 18:58:32 2009 for Equalizer 0.9 by  doxygen 1.5.8