IStorage Class Reference
[Data Model]

#include <support/IStorage.h>

Inheritance diagram for IStorage:

IInterface SAtom BnInterface< IStorage > BpInterface< IStorage > BnStorage BFile BMemoryStore BStreamDatum::Stream BVFSFile BDatabaseStore BMallocStore BValueStorage BStringIO List of all members.

Detailed Description

Random-access interface to a block of raw data.


Public Member Functions

ssize_t ReadAt (off_t position, void *buffer, size_t size)
 Convenience for reading a vector of one buffer.
virtual ssize_t ReadAtV (off_t position, const struct iovec *vector, ssize_t count)=0
 Read the bytes described by iovec from location position in the storage.
virtual status_t SetSize (off_t size)=0
 Set the total number of bytes in the store.
virtual off_t Size () const =0
 Return the total number of bytes in the store.
virtual status_t Sync ()=0
 Make sure all data in the storage is written to its physical device.
ssize_t WriteAt (off_t position, const void *buffer, size_t size)
 Convenience for reading a vector of one buffer.
virtual ssize_t WriteAtV (off_t position, const struct iovec *vector, ssize_t count)=0
 Write the bytes described by iovec at location position in the storage.


Member Function Documentation

ssize_t ReadAt off_t  position,
void *  buffer,
size_t  size
[inline]
 

Convenience for reading a vector of one buffer.

virtual ssize_t ReadAtV off_t  position,
const struct iovec *  vector,
ssize_t  count
[pure virtual]
 

Read the bytes described by iovec from location position in the storage.

Returns the number of bytes actually read, or a negative error code.

Implemented in BFile, BStreamDatum::Stream, BVFSFile, BMemoryStore, and BValueStorage.

virtual status_t SetSize off_t  size  )  [pure virtual]
 

Set the total number of bytes in the store.

Implemented in BFile, BStreamDatum::Stream, BVFSFile, BMemoryStore, and BValueStorage.

virtual off_t Size  )  const [pure virtual]
 

Return the total number of bytes in the store.

Implemented in BFile, BStreamDatum::Stream, BVFSFile, and BMemoryStore.

virtual status_t Sync  )  [pure virtual]
 

Make sure all data in the storage is written to its physical device.

Returns B_OK if the data is safely stored away, else an error code.

Implemented in BFile, BStreamDatum::Stream, BVFSFile, BMemoryStore, and BValueStorage.

ssize_t WriteAt off_t  position,
const void *  buffer,
size_t  size
[inline]
 

Convenience for reading a vector of one buffer.

virtual ssize_t WriteAtV off_t  position,
const struct iovec *  vector,
ssize_t  count
[pure virtual]
 

Write the bytes described by iovec at location position in the storage.

Returns the number of bytes actually written, or a negative error code.

Implemented in BFile, BStreamDatum::Stream, BVFSFile, BMemoryStore, and BValueStorage.


The documentation for this class was generated from the following file: