diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-11 13:33:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-11 13:33:42 +0000 |
commit | 85bd008c039eb1d93894e94fba9d158a42a71a12 (patch) | |
tree | 2d72d10759f6928e9e4b960175d2de01b5cf7e12 /protocols/Xfire/src/variablevalue.h | |
parent | 222802c2986dcaf029fdfb828b7679bdabfa7bb2 (diff) |
massive code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14910 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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; + }; }; |