/ src / libnml / cms / cms_xup.hh
cms_xup.hh
 1  /********************************************************************
 2  * Description: cms_xup.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  
15  #ifndef CMS_XUP_HH
16  #define CMS_XUP_HH
17  
18  extern "C" {
19  #include <rpc/rpc.h>		/* struct XDR */
20  
21  }
22  #include "cms_up.hh"		/* class CMS_UPDATER */
23  class CMS_XDR_UPDATER:public CMS_UPDATER {
24    public:
25      CMS_STATUS update(bool &x);
26      CMS_STATUS update(char &x);
27      CMS_STATUS update(unsigned char &x);
28      CMS_STATUS update(short int &x);
29      CMS_STATUS update(unsigned short int &x);
30      CMS_STATUS update(int &x);
31      CMS_STATUS update(unsigned int &x);
32      CMS_STATUS update(long int &x);
33      CMS_STATUS update(unsigned long int &x);
34      CMS_STATUS update(float &x);
35      CMS_STATUS update(double &x);
36      CMS_STATUS update(long double &x);
37      CMS_STATUS update(char *x, unsigned int len);
38      CMS_STATUS update(unsigned char *x, unsigned int len);
39      CMS_STATUS update(short *x, unsigned int len);
40      CMS_STATUS update(unsigned short *x, unsigned int len);
41      CMS_STATUS update(int *x, unsigned int len);
42      CMS_STATUS update(unsigned int *x, unsigned int len);
43      CMS_STATUS update(long *x, unsigned int len);
44      CMS_STATUS update(unsigned long *x, unsigned int len);
45      CMS_STATUS update(float *x, unsigned int len);
46      CMS_STATUS update(double *x, unsigned int len);
47      CMS_STATUS update(long double *x, unsigned int len);
48      int set_mode(CMS_UPDATER_MODE);
49      void rewind();
50      int get_encoded_msg_size();
51      void set_encoded_data(void *, long _encoded_data_size);
52    protected:
53      int check_pointer(char *, long);
54        CMS_XDR_UPDATER(CMS *);
55        virtual ~ CMS_XDR_UPDATER();
56      friend class CMS;
57      XDR *encode_data_stream;	/* XDR streams for data */
58      XDR *decode_data_stream;
59      XDR *encode_header_stream;	/* XDR streams for header */
60      XDR *decode_header_stream;
61      XDR *encode_queuing_header_stream;	/* XDR streams for header */
62      XDR *decode_queuing_header_stream;
63      XDR *current_stream;
64  };
65  
66  #endif
67  // !defined(CMS_XUP_HH)