diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-03-09 12:24:01 +0000 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2008-03-09 12:24:01 +0000 |
| commit | 032c7c28083e17bdcfd763b3cf81447b06a07978 (patch) | |
| tree | e5cc5ceb050773165df41eb7f0aed3f2a48205a0 /src/BtRequestMessage.h | |
| parent | ca3f6e57f35c67f67c3b4f64cedded8ca23237e8 (diff) | |
2008-03-09 Tatsuhiro Tsujikawa <tujikawa at rednoah dot com>
type cleanup for allmost all remaining files.
Diffstat (limited to 'src/BtRequestMessage.h')
| -rw-r--r-- | src/BtRequestMessage.h | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/src/BtRequestMessage.h b/src/BtRequestMessage.h index 595a0d1f..80c20489 100644 --- a/src/BtRequestMessage.h +++ b/src/BtRequestMessage.h @@ -46,13 +46,13 @@ typedef SharedHandle<BtRequestMessage> BtRequestMessageHandle; class BtRequestMessage : public SimpleBtMessage { private: - int32_t index; - int32_t begin; - int32_t length; - int32_t blockIndex; + size_t index; + uint32_t begin; + uint32_t length; + size_t blockIndex; unsigned char* msg; - static int32_t MESSAGE_LENGTH; + static size_t MESSAGE_LENGTH; class BtAbortOutstandingRequestEventListener : public AbstractBtEventListener { private: @@ -67,10 +67,10 @@ private: typedef SharedHandle<BtAbortOutstandingRequestEventListener> BtAbortOutstandingRequestEventListenerHandle; public: - BtRequestMessage(int32_t index = 0, - int32_t begin = 0, - int32_t length = 0, - int32_t blockIndex = 0) + BtRequestMessage(size_t index = 0, + uint32_t begin = 0, + uint32_t length = 0, + size_t blockIndex = 0) :index(index), begin(begin), length(length), @@ -84,29 +84,29 @@ public: delete [] msg; } - static const int8_t ID = 6; + static const uint8_t ID = 6; - int32_t getIndex() const { return index; } - void setIndex(int32_t index) { this->index = index; } + size_t getIndex() const { return index; } + void setIndex(size_t index) { this->index = index; } - int32_t getBegin() const { return begin; } - void setBegin(int32_t begin) { this->begin = begin; } + uint32_t getBegin() const { return begin; } + void setBegin(uint32_t begin) { this->begin = begin; } - int32_t getLength() const { return length; } - void setLength(int32_t length) { this->length = length; } + uint32_t getLength() const { return length; } + void setLength(uint32_t length) { this->length = length; } - int32_t getBlockIndex() const { return blockIndex; } - void setBlockIndex(int32_t blockIndex) { this->blockIndex = blockIndex; } + size_t getBlockIndex() const { return blockIndex; } + void setBlockIndex(size_t blockIndex) { this->blockIndex = blockIndex; } - static BtRequestMessageHandle create(const unsigned char* data, int32_t dataLength); + static BtRequestMessageHandle create(const unsigned char* data, size_t dataLength); - virtual int8_t getId() { return ID; } + virtual uint8_t getId() { return ID; } virtual void doReceivedAction(); virtual const unsigned char* getMessage(); - virtual int32_t getMessageLength(); + virtual size_t getMessageLength(); virtual std::string toString() const; |
