diff options
Diffstat (limited to 'protocols/Xfire/src/variablevalue.h')
-rw-r--r-- | protocols/Xfire/src/variablevalue.h | 66 |
1 files changed, 32 insertions, 34 deletions
diff --git a/protocols/Xfire/src/variablevalue.h b/protocols/Xfire/src/variablevalue.h index 8282f47cbf..29e12743cb 100644 --- a/protocols/Xfire/src/variablevalue.h +++ b/protocols/Xfire/src/variablevalue.h @@ -20,45 +20,43 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include <string> - #ifndef __VARIABVLEVALUE_H #define __VARIABVLEVALUE_H namespace xfirelib { -class VariableValue { - public: - VariableValue(); - ~VariableValue(); - - void setName(std::string name); - void setValueLength(int valueLength); - void setValue( char * value ); - void setValue( std::string value ); - void setValue( const char *value, int valueLength ); - void setValueFromLong( long value, int bytes ); - std::string getName(); - int getValueLength(); - char* getValue(); - - int readName(char *packet, int index); - int readValue(char *packet, int index, int length = -1, int ignoreZeroAfterLength = 0); - int readVariableValue(char *packet, int index, int packetLength); - /*TODO: disabled because of a bug in this method*/ - //int VariableValue::readFixValue(char *packet, int index, int packetLength, int valueLength); - - int writeName(char *buf, int index); - int writeValue(char *buf, int index); - - long getValueAsLong(); - private: - long myPow(int x, int y); - - std::string name; - char *value; - int valueLength; -}; + class VariableValue { + public: + VariableValue(); + ~VariableValue(); + + void setName(std::string name); + void setValueLength(int valueLength); + void setValue( char * value ); + void setValue( std::string value ); + void setValue( const char *value, int valueLength ); + void setValueFromLong( long value, int bytes ); + std::string getName(); + int getValueLength(); + char* getValue(); + + int readName(char *packet, int index); + int readValue(char *packet, int index, int length = -1, int ignoreZeroAfterLength = 0); + int readVariableValue(char *packet, int index, int packetLength); + /*TODO: disabled because of a bug in this method*/ + //int VariableValue::readFixValue(char *packet, int index, int packetLength, int valueLength); + + int writeName(char *buf, int index); + int writeValue(char *buf, int index); + + long getValueAsLong(); + private: + long myPow(int x, int y); + + std::string name; + char *value; + int valueLength; + }; }; |