| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef SkStream_DEFINED | 8 #ifndef SkStream_DEFINED |
| 9 #define SkStream_DEFINED | 9 #define SkStream_DEFINED |
| 10 | 10 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 //SkStreamSeekable | 95 //SkStreamSeekable |
| 96 /** Returns true if this stream can report it's current position. */ | 96 /** Returns true if this stream can report it's current position. */ |
| 97 virtual bool hasPosition() const { return false; } | 97 virtual bool hasPosition() const { return false; } |
| 98 /** Returns the current position in the stream. If this cannot be done, retu
rns 0. */ | 98 /** Returns the current position in the stream. If this cannot be done, retu
rns 0. */ |
| 99 virtual size_t getPosition() const { return 0; } | 99 virtual size_t getPosition() const { return 0; } |
| 100 | 100 |
| 101 /** Seeks to an absolute position in the stream. If this cannot be done, ret
urns false. | 101 /** Seeks to an absolute position in the stream. If this cannot be done, ret
urns false. |
| 102 * If an attempt is made to seek past the end of the stream, the position w
ill be set | 102 * If an attempt is made to seek past the end of the stream, the position w
ill be set |
| 103 * to the end of the stream. | 103 * to the end of the stream. |
| 104 */ | 104 */ |
| 105 virtual bool seek(size_t position) { return false; } | 105 virtual bool seek(size_t /*position*/) { return false; } |
| 106 | 106 |
| 107 /** Seeks to an relative offset in the stream. If this cannot be done, retur
ns false. | 107 /** Seeks to an relative offset in the stream. If this cannot be done, retur
ns false. |
| 108 * If an attempt is made to move to a position outside the stream, the posi
tion will be set | 108 * If an attempt is made to move to a position outside the stream, the posi
tion will be set |
| 109 * to the closest point within the stream (beginning or end). | 109 * to the closest point within the stream (beginning or end). |
| 110 */ | 110 */ |
| 111 virtual bool move(long offset) { return false; } | 111 virtual bool move(long /*offset*/) { return false; } |
| 112 | 112 |
| 113 /** Duplicates this stream. If this cannot be done, returns NULL. | 113 /** Duplicates this stream. If this cannot be done, returns NULL. |
| 114 * The returned stream will be positioned the same as this stream. | 114 * The returned stream will be positioned the same as this stream. |
| 115 */ | 115 */ |
| 116 virtual SkStreamSeekable* fork() const { return NULL; } | 116 virtual SkStreamSeekable* fork() const { return NULL; } |
| 117 | 117 |
| 118 //SkStreamAsset | 118 //SkStreamAsset |
| 119 /** Returns true if this stream can report it's total length. */ | 119 /** Returns true if this stream can report it's total length. */ |
| 120 virtual bool hasLength() const { return false; } | 120 virtual bool hasLength() const { return false; } |
| 121 /** Returns the total length of the stream. If this cannot be done, returns
0. */ | 121 /** Returns the total length of the stream. If this cannot be done, returns
0. */ |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 | 440 |
| 441 private: | 441 private: |
| 442 size_t fBytesWritten; | 442 size_t fBytesWritten; |
| 443 typedef SkWStream INHERITED; | 443 typedef SkWStream INHERITED; |
| 444 }; | 444 }; |
| 445 | 445 |
| 446 // for now | 446 // for now |
| 447 typedef SkFILEStream SkURLStream; | 447 typedef SkFILEStream SkURLStream; |
| 448 | 448 |
| 449 #endif | 449 #endif |
| OLD | NEW |