00001 #ifndef _POSMALLFILEMSG_H_ 00002 #define _POSMALLFILEMSG_H_ 00003 #include<POMessage.h> 00004 #include<POTypes.h> 00005 00006 class POSmallFileMsg : public POMessage 00007 { 00008 public: 00009 POSmallFileMsg( const string& srcname = "", 00010 const string& destfile = ""); 00011 POSmallFileMsg( const POSmallFileMsg& cpy ); 00012 virtual ~POSmallFileMsg(); 00013 00014 string messageType()const { return "POSmallFileMsg"; } 00015 POMessage* clone()const; 00016 00017 int packsize()const; 00018 int pack( char* buffer )const; 00019 int unpack( char* buffer ); 00020 00021 // mutators 00022 bool loadFile( const string& fname ); 00023 00024 // accessors 00025 char* getFileData()const { return m_filedata; } 00026 int getFileSize()const { return m_filesize.val(); } 00027 string getSrcFile()const { return m_filename.val(); } 00028 string getDestFile()const { return m_destfile.val(); } 00029 00030 private: 00031 char* m_filedata; 00032 POInt m_filesize; 00033 POString m_filename; 00034 POString m_destfile; 00035 }; 00036 #endif