diff options
author | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 18:09:04 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2011-01-20 18:09:04 +0000 |
commit | 393f1b414746a7f1977971dd7659dd2b47092b11 (patch) | |
tree | 81d0ca1ee70ab86a7d79c1991abe5c387b655fb2 /src/client.h | |
parent | c259f95bd0e58b247940a339bb9b4b401b4e9438 (diff) | |
parent | 7e25a863325dc3e9762397e700030969e093b087 (diff) | |
download | libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.gz libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.bz2 libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.xz libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.zip |
Wow! Merged the branch, streams are updated, and there's no more FString, run
the fixstrings.sh script in the support directory to (hopefully) automatically
update your projects.
Diffstat (limited to 'src/client.h')
-rw-r--r-- | src/client.h | 52 |
1 files changed, 28 insertions, 24 deletions
diff --git a/src/client.h b/src/client.h index 096df2f..119c2c1 100644 --- a/src/client.h +++ b/src/client.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2007-2010 Xagasoft, All rights reserved. | 2 | * Copyright (C) 2007-2011 Xagasoft, All rights reserved. |
3 | * | 3 | * |
4 | * This file is part of the libbu++ library and is released under the | 4 | * This file is part of the libbu++ library and is released under the |
5 | * terms of the license contained in the file LICENSE. | 5 | * terms of the license contained in the file LICENSE. |
@@ -10,7 +10,8 @@ | |||
10 | 10 | ||
11 | #include <stdint.h> | 11 | #include <stdint.h> |
12 | 12 | ||
13 | #include "bu/fstring.h" | 13 | #include "bu/config.h" |
14 | #include "bu/string.h" | ||
14 | #include "bu/queuebuf.h" | 15 | #include "bu/queuebuf.h" |
15 | 16 | ||
16 | namespace Bu | 17 | namespace Bu |
@@ -32,23 +33,23 @@ namespace Bu | |||
32 | void processInput(); | 33 | void processInput(); |
33 | void processOutput(); | 34 | void processOutput(); |
34 | 35 | ||
35 | //Bu::FString &getInput(); | 36 | //Bu::String &getInput(); |
36 | //Bu::FString &getOutput(); | 37 | //Bu::String &getOutput(); |
37 | size_t write( const Bu::FString &sData ); | 38 | Bu::size write( const Bu::String &sData ); |
38 | size_t write( const void *pData, size_t nBytes ); | 39 | Bu::size write( const void *pData, Bu::size nBytes ); |
39 | size_t write( int8_t nData ); | 40 | Bu::size write( int8_t nData ); |
40 | size_t write( int16_t nData ); | 41 | Bu::size write( int16_t nData ); |
41 | size_t write( int32_t nData ); | 42 | Bu::size write( int32_t nData ); |
42 | size_t write( int64_t nData ); | 43 | Bu::size write( int64_t nData ); |
43 | size_t write( uint8_t nData ); | 44 | Bu::size write( uint8_t nData ); |
44 | size_t write( uint16_t nData ); | 45 | Bu::size write( uint16_t nData ); |
45 | size_t write( uint32_t nData ); | 46 | Bu::size write( uint32_t nData ); |
46 | size_t write( uint64_t nData ); | 47 | Bu::size write( uint64_t nData ); |
47 | size_t read( void *pData, size_t nBytes ); | 48 | Bu::size read( void *pData, Bu::size nBytes ); |
48 | size_t peek( void *pData, int nBytes, int nOffset=0 ); | 49 | Bu::size peek( void *pData, int nBytes, int nOffset=0 ); |
49 | // void seek( int nBytes ); | 50 | // void seek( int nBytes ); |
50 | long getInputSize(); | 51 | Bu::size getInputSize(); |
51 | long getOutputSize(); | 52 | Bu::size getOutputSize(); |
52 | 53 | ||
53 | void setProtocol( Protocol *pProto ); | 54 | void setProtocol( Protocol *pProto ); |
54 | Bu::Protocol *getProtocol(); | 55 | Bu::Protocol *getProtocol(); |
@@ -65,7 +66,7 @@ namespace Bu | |||
65 | 66 | ||
66 | class ClientLink *getLink(); | 67 | class ClientLink *getLink(); |
67 | 68 | ||
68 | void onMessage( const Bu::FString &sMsg ); | 69 | void onMessage( const Bu::String &sMsg ); |
69 | 70 | ||
70 | bool hasOutput() { return qbWrite.getSize() > 0; } | 71 | bool hasOutput() { return qbWrite.getSize() > 0; } |
71 | bool hasInput() { return qbRead.getSize() > 0; } | 72 | bool hasInput() { return qbRead.getSize() > 0; } |
@@ -98,10 +99,10 @@ namespace Bu | |||
98 | * These are required to qualify as a stream, I dunno how many will | 99 | * These are required to qualify as a stream, I dunno how many will |
99 | * be implemented. | 100 | * be implemented. |
100 | */ | 101 | */ |
101 | virtual long tell(); | 102 | virtual Bu::size tell(); |
102 | virtual void seek( long offset ); | 103 | virtual void seek( Bu::size offset ); |
103 | virtual void setPos( long pos ); | 104 | virtual void setPos( Bu::size pos ); |
104 | virtual void setPosEnd( long pos ); | 105 | virtual void setPosEnd( Bu::size pos ); |
105 | virtual bool isEos(); | 106 | virtual bool isEos(); |
106 | virtual void flush(); | 107 | virtual void flush(); |
107 | virtual bool canRead(); | 108 | virtual bool canRead(); |
@@ -111,7 +112,10 @@ namespace Bu | |||
111 | virtual bool isSeekable(); | 112 | virtual bool isSeekable(); |
112 | virtual bool isBlocking(); | 113 | virtual bool isBlocking(); |
113 | virtual void setBlocking( bool bBlocking=true ); | 114 | virtual void setBlocking( bool bBlocking=true ); |
114 | virtual void setSize( long iSize ); | 115 | virtual void setSize( Bu::size iSize ); |
116 | virtual size getSize() const; | ||
117 | virtual size getBlockSize() const; | ||
118 | virtual Bu::String getLocation() const; | ||
115 | 119 | ||
116 | private: | 120 | private: |
117 | typedef Bu::List<Bu::Stream *> FilterList; | 121 | typedef Bu::List<Bu::Stream *> FilterList; |