#include <storage/DatumGeneratorInt.h>
Inheritance diagram for SDatumGeneratorInt::IndexedDatum:
BStreamDatum Implementation | |
Redirect high-level datum operations back up to BIndexedDatumGenerator. | |
virtual void | FinishReadingLocked (const sptr< Stream > &stream, const void *data) const |
The default implementation does nothing. | |
virtual void | FinishWritingLocked (const sptr< Stream > &stream, void *data) |
The default implementation does nothing. | |
virtual void | ReportChangeLocked (const sptr< IBinder > &editor, uint32_t changes, off_t start=-1, off_t length=-1) |
Called when any part of the datum (data, type, size) changes. | |
virtual off_t | SizeLocked () const |
Derived classes must implement to return the total amount of data available. | |
virtual const void * | StartReadingLocked (const sptr< Stream > &stream, off_t position, ssize_t *inoutSize, uint32_t flags) const |
The default implementation returns NULL. | |
virtual void * | StartWritingLocked (const sptr< Stream > &stream, off_t position, ssize_t *inoutSize, uint32_t flags) |
The default implementation returns NULL. | |
virtual status_t | StoreSizeLocked (off_t size) |
Derived classes must implement to set the total amount of data. | |
virtual status_t | StoreValueLocked (const SValue &value) |
The default implementation changes the contents of the datum to the value. | |
virtual status_t | StoreValueTypeLocked (uint32_t type) |
The default implementation does nothing, returning B_UNSUPPORTED. | |
virtual SValue | ValueLocked () const |
The default implementation generates a new SValue from the datum. | |
virtual uint32_t | ValueTypeLocked () const |
The default implementation returns B_RAW_TYPE. | |
ssize_t | m_index |
const sptr< SDatumGeneratorInt > | m_owner |
Bookkeeping | |
Creation, destruction, locking, etc. | |
IndexedDatum (const SContext &context, const sptr< SDatumGeneratorInt > &owner, size_t index, uint32_t mode) | |
virtual lock_status_t | Lock () const |
Reimplemented to use the BIndexedDatumGenerator lock. | |
virtual void | Unlock () const |
Reimplemented to use the BIndexedDatumGenerator lock. | |
virtual status_t | FinishAtom (const void *id) |
The destructor must call Lock(), so return FINISH_ATOM_ASYNC to avoid deadlocks. | |
virtual bool | HoldRefForLink (const SValue &binding, uint32_t flags) |
Make this object stay around while there are links on it. | |
virtual | ~IndexedDatum () |
|
|
|
|
|
The destructor must call Lock(), so return FINISH_ATOM_ASYNC to avoid deadlocks.
Reimplemented from SAtom. |
|
The default implementation does nothing.
Reimplemented from BStreamDatum. |
|
The default implementation does nothing.
Reimplemented from BStreamDatum. |
|
Make this object stay around while there are links on it.
Reimplemented from BBinder. |
|
Reimplemented to use the BIndexedDatumGenerator lock.
Reimplemented from BStreamDatum. |
|
Called when any part of the datum (data, type, size) changes. The default implementation pushes the appropriate properties and events based on the changes flags, which may be any of TYPE_CHANGED, SIZE_CHANGED, or DATA_CHANGED. The value property is always pushed. For DATA_CHANGED, start and length must be supplied with the range of data that changed; for all other changes, ValueLocked(), ValueTypeLocked(), and SizeLocked() are called as needed to retrieve the current values. You can override this method in your own subclass to easily discover when changes happen. If you do so, be sure to also call through to this implementation. Reimplemented from BStreamDatum. |
|
Derived classes must implement to return the total amount of data available.
Implements BStreamDatum. |
|
The default implementation returns NULL.
Reimplemented from BStreamDatum. |
|
The default implementation returns NULL.
Reimplemented from BStreamDatum. |
|
Derived classes must implement to set the total amount of data.
Implements BStreamDatum. |
|
The default implementation changes the contents of the datum to the value. The datum is changed by calling StoreValueTypeLocked(), StoreSizeLocked(), and StoreLocked(). This is fairly inefficient, so you will want to provide your own implementation if possible. Reimplemented from BStreamDatum. |
|
The default implementation does nothing, returning B_UNSUPPORTED.
Reimplemented from BStreamDatum. |
|
Reimplemented to use the BIndexedDatumGenerator lock.
Reimplemented from BStreamDatum. |
|
The default implementation generates a new SValue from the datum. The SValue is created by calling ValueTypeLocked(), SizeLocked(), and ReadLocked(). This is fairly inefficient, so you will want to provide your own implementation if possible. It will not attempt to return the datum as an SValue if the datum is larger than a reasonable size (a couple kilobytes). Reimplemented from BStreamDatum. |
|
The default implementation returns B_RAW_TYPE.
Reimplemented from BStreamDatum. |
|
|
|
|