cmd_msg.hh
1 /******************************************************************** 2 * Description: cmd_msg.hh 3 * 4 * Derived from a work by Fred Proctor & Will Shackleford 5 * 6 * Author: 7 * License: LGPL Version 2 8 * System: Linux 9 * 10 * Copyright (c) 2004 All rights reserved. 11 * 12 * Last change: 13 ********************************************************************/ 14 #ifndef RCS_CMD_HH 15 #define RCS_CMD_HH 16 17 #include "nml.hh" 18 #include "nmlmsg.hh" 19 20 class RCS_CMD_MSG:public NMLmsg { 21 public: 22 RCS_CMD_MSG(NMLTYPE t, long sz); 23 int serial_number; 24 }; 25 26 extern int RCS_CMD_MSG_format(NMLTYPE, void *, CMS *); 27 28 class RCS_CMD_CHANNEL:public NML { 29 public: 30 RCS_CMD_CHANNEL(NML_FORMAT_PTR, const char *, const char *, const char *, 31 int set_to_server = 0); 32 ~RCS_CMD_CHANNEL(); 33 RCS_CMD_MSG *get_address() { 34 return ((RCS_CMD_MSG *) NML::get_address()); 35 }; 36 37 int write(RCS_CMD_MSG * cmd_msg); 38 }; 39 40 enum RCS_GENERIC_CMD_ID { 41 GENERIC_INIT, 42 GENERIC_HALT 43 }; 44 45 #define RCS_GENERIC_CMD_TYPE ((NMLTYPE) 1000000) 46 47 class RCS_GENERIC_CMD:public RCS_CMD_MSG { 48 public: 49 RCS_GENERIC_CMD(); 50 void update(CMS *); 51 int gen_id; 52 }; 53 54 #endif