Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

panda/src/pstatclient/pStatClientControlMessage.h

Go to the documentation of this file.
00001 // Filename: pStatClientControlMessage.h
00002 // Created by:  drose (09Jul00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) 2001, Disney Enterprises, Inc.  All rights reserved
00008 //
00009 // All use of this software is subject to the terms of the Panda 3d
00010 // Software license.  You should have received a copy of this license
00011 // along with this source code; you will also find a current copy of
00012 // the license at http://www.panda3d.org/license.txt .
00013 //
00014 // To contact the maintainers of this program write to
00015 // panda3d@yahoogroups.com .
00016 //
00017 ////////////////////////////////////////////////////////////////////
00018 
00019 #ifndef PSTATCLIENTCONTROLMESSAGE_H
00020 #define PSTATCLIENTCONTROLMESSAGE_H
00021 
00022 #include <pandabase.h>
00023 
00024 #include "pStatCollectorDef.h"
00025 
00026 #include "pvector.h"
00027 
00028 class Datagram;
00029 class PStatClientVersion;
00030 
00031 ////////////////////////////////////////////////////////////////////
00032 //       Class : PStatClientControlMessage
00033 // Description : This kind of message is sent from the client to the
00034 //               server on the TCP socket to establish critical
00035 //               control information.
00036 ////////////////////////////////////////////////////////////////////
00037 class EXPCL_PANDA PStatClientControlMessage {
00038 public:
00039   PStatClientControlMessage();
00040 
00041   void encode(Datagram &datagram) const;
00042   bool decode(const Datagram &datagram, PStatClientVersion *version);
00043 
00044   enum Type {
00045     T_datagram = 0,
00046     T_hello,
00047     T_define_collectors,
00048     T_define_threads,
00049     T_invalid
00050   };
00051 
00052   Type _type;
00053 
00054   // Used for T_hello
00055   string _client_hostname;
00056   string _client_progname;
00057   int _major_version;
00058   int _minor_version;
00059 
00060   // Used for T_define_collectors
00061   pvector<PStatCollectorDef *> _collectors;
00062 
00063   // Used for T_define_threads
00064   int _first_thread_index;
00065   pvector<string> _names;
00066 };
00067 
00068 
00069 #endif
00070 

Generated on Fri May 2 00:43:27 2003 for Panda by doxygen1.3