summaryrefslogtreecommitdiff
path: root/mqueue.h
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2005-07-12 04:23:32 +0000
committerweidai <weidai11@users.noreply.github.com>2005-07-12 04:23:32 +0000
commit1db8ea50840eb47f0f7d8f3c30d8e0916932ce90 (patch)
tree4b03760892a97a9bc452ebe8b7793bbebd402ad4 /mqueue.h
parent31068bd68590654dc218bbb183a2ca71bb4af08b (diff)
downloadcryptopp-git-1db8ea50840eb47f0f7d8f3c30d8e0916932ce90.tar.gz
port to MSVC .NET 2005 beta 2
Diffstat (limited to 'mqueue.h')
-rw-r--r--mqueue.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/mqueue.h b/mqueue.h
index 1bf88926..390b44cc 100644
--- a/mqueue.h
+++ b/mqueue.h
@@ -15,7 +15,7 @@ public:
void IsolatedInitialize(const NameValuePairs &parameters)
{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: