diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2005-07-12 04:23:32 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2005-07-12 04:23:32 +0000 |
commit | d5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47 (patch) | |
tree | 4b03760892a97a9bc452ebe8b7793bbebd402ad4 /mqueue.h | |
parent | fa39f51809b4da54a5c2adb3e183b1a625cefb92 (diff) | |
download | cryptopp-d5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47.tar.gz |
port to MSVC .NET 2005 beta 2
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@198 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'mqueue.h')
-rw-r--r-- | mqueue.h | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -15,7 +15,7 @@ public: void IsolatedInitialize(const NameValuePairs ¶meters) {m_queue.IsolatedInitialize(parameters); m_lengths.assign(1, 0U); m_messageCounts.assign(1, 0U);} - unsigned int Put2(const byte *begin, unsigned int length, int messageEnd, bool blocking) + size_t Put2(const byte *begin, size_t length, int messageEnd, bool blocking) { m_queue.Put(begin, length); m_lengths.back() += length; @@ -30,34 +30,35 @@ public: bool IsolatedMessageSeriesEnd(bool blocking) {m_messageCounts.push_back(0); return false;} - unsigned long MaxRetrievable() const + lword MaxRetrievable() const {return m_lengths.front();} bool AnyRetrievable() const {return m_lengths.front() > 0;} - unsigned int TransferTo2(BufferedTransformation &target, unsigned long &transferBytes, const std::string &channel=NULL_CHANNEL, bool blocking=true); - unsigned int CopyRangeTo2(BufferedTransformation &target, unsigned long &begin, unsigned long end=ULONG_MAX, const std::string &channel=NULL_CHANNEL, bool blocking=true) const; + size_t TransferTo2(BufferedTransformation &target, lword &transferBytes, const std::string &channel=NULL_CHANNEL, bool blocking=true); + size_t CopyRangeTo2(BufferedTransformation &target, lword &begin, lword end=LWORD_MAX, const std::string &channel=NULL_CHANNEL, bool blocking=true) const; - unsigned long TotalBytesRetrievable() const + lword TotalBytesRetrievable() const {return m_queue.MaxRetrievable();} unsigned int NumberOfMessages() const - {return m_lengths.size()-1;} + {return (unsigned int)m_lengths.size()-1;} bool GetNextMessage(); unsigned int NumberOfMessagesInThisSeries() const {return m_messageCounts[0];} unsigned int NumberOfMessageSeries() const - {return m_messageCounts.size()-1;} + {return (unsigned int)m_messageCounts.size()-1;} unsigned int CopyMessagesTo(BufferedTransformation &target, unsigned int count=UINT_MAX, const std::string &channel=NULL_CHANNEL) const; - const byte * Spy(unsigned int &contiguousSize) const; + const byte * Spy(size_t &contiguousSize) const; void swap(MessageQueue &rhs); private: ByteQueue m_queue; - std::deque<unsigned long> m_lengths, m_messageCounts; + std::deque<lword> m_lengths; + std::deque<unsigned int> m_messageCounts; }; @@ -73,7 +74,7 @@ public: , m_firstChannel(firstChannel), m_secondChannel(secondChannel) {Detach(attachment);} - unsigned int ChannelPut2(const std::string &channel, const byte *begin, unsigned int length, int messageEnd, bool blocking); + size_t ChannelPut2(const std::string &channel, const byte *begin, size_t length, int messageEnd, bool blocking); bool ChannelMessageSeriesEnd(const std::string &channel, int propagation=-1, bool blocking=true); private: |