Equalizer 1.0

fabric/configPackets.h

00001 
00002 /* Copyright (c) 2005-2011, Stefan Eilemann <eile@equalizergraphics.com>
00003  *                    2010, Cedric Stalder  <cedric.stalder@gmail.com>
00004  *
00005  * This library is free software; you can redistribute it and/or modify it under
00006  * the terms of the GNU Lesser General Public License version 2.1 as published
00007  * by the Free Software Foundation.
00008  *  
00009  * This library is distributed in the hope that it will be useful, but WITHOUT
00010  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
00011  * FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
00012  * details.
00013  * 
00014  * You should have received a copy of the GNU Lesser General Public License
00015  * along with this library; if not, write to the Free Software Foundation, Inc.,
00016  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
00017  */
00018 
00019 #ifndef EQFABRIC_CONFIGPACKETS_H
00020 #define EQFABRIC_CONFIGPACKETS_H
00021 
00022 #include <eq/fabric/packets.h> // base structs
00023 #include <eq/fabric/serverPackets.h> // used inline
00024 
00026 namespace eq
00027 {
00028 namespace fabric
00029 {
00030     struct ConfigCreateReplyPacket : public ConfigPacket
00031     {
00032         ConfigCreateReplyPacket(const ServerCreateConfigPacket* request)
00033         {
00034             command   = CMD_CONFIG_CREATE_REPLY;
00035             size      = sizeof( ConfigCreateReplyPacket );
00036             objectID  = request->configVersion.identifier;
00037             requestID = request->requestID;
00038         }
00039 
00040         uint32_t requestID;
00041     };
00042 
00043     struct ConfigNewLayoutPacket : public ConfigPacket
00044     {
00045         ConfigNewLayoutPacket()
00046             {
00047                 command = CMD_CONFIG_NEW_LAYOUT;
00048                 size    = sizeof( ConfigNewLayoutPacket );
00049             }
00050 
00051         uint32_t requestID;
00052     };
00053 
00054     struct ConfigNewCanvasPacket : public ConfigPacket
00055     {
00056         ConfigNewCanvasPacket()
00057             {
00058                 command = CMD_CONFIG_NEW_CANVAS;
00059                 size    = sizeof( ConfigNewCanvasPacket );
00060             }
00061 
00062         uint32_t requestID;
00063     };
00064 
00065     struct ConfigNewObserverPacket : public ConfigPacket
00066     {
00067         ConfigNewObserverPacket()
00068             {
00069                 command = CMD_CONFIG_NEW_OBSERVER;
00070                 size    = sizeof( ConfigNewObserverPacket );
00071             }
00072 
00073         uint32_t requestID;
00074     };
00075 
00076     struct ConfigNewEntityReplyPacket : public ConfigPacket
00077     {
00078         ConfigNewEntityReplyPacket( const ConfigNewLayoutPacket* request )
00079                 : requestID( request->requestID ) { init(); }
00080         ConfigNewEntityReplyPacket( const ConfigNewCanvasPacket* request )
00081                 : requestID( request->requestID ) { init(); }
00082         ConfigNewEntityReplyPacket( const ConfigNewObserverPacket* request )
00083                 : requestID( request->requestID ) { init(); }
00084         void init()
00085             {
00086                 command = CMD_CONFIG_NEW_ENTITY_REPLY;
00087                 size    = sizeof( ConfigNewEntityReplyPacket );
00088             }
00089 
00090         const uint32_t requestID;
00091         co::base::UUID     entityID;
00092     };
00093 }
00094 }
00096 #endif //EQFABRIC_CONFIGPACKETS_H
Generated on Sun May 8 2011 19:11:05 for Equalizer 1.0 by  doxygen 1.7.3