BMetaDataCatalog Class Reference
[Data Model]

#include <support/Catalog.h>

Inheritance diagram for BMetaDataCatalog:

BIndexedCatalog BnCatalog BMetaDataNode BIndexedIterable ICatalog BBinder BGenericNode BGenericIterable IInterface IBinder BnNode BnIterable SSQLBuilder SAtom SAtom INode BBinder IIterable BBinder IInterface IBinder IInterface IBinder SAtom SAtom SAtom SAtom BCatalog BPackageManager List of all members.

Public Member Functions

 BMetaDataCatalog (const SContext &context)
virtual size_t CountMetaEntriesLocked () const
 Return the number of meta-data entries in the node.
virtual status_t CreateMetaEntry (const SString &name, const SValue &initialValue, sptr< IDatum > *outDatum=NULL)
 Create a new piece of meta-data in the node.
virtual status_t LookupMetaEntry (const SString &entry, uint32_t flags, SValue *node)
 Used by Walk() and others to find a meta-data entry in the node.
virtual status_t MetaEntryAtLocked (ssize_t index, uint32_t flags, SValue *key, SValue *entry)
 Return a meta-data entry at a particular offset in the node.
virtual status_t RemoveMetaEntry (const SString &name)
 Remove a piece of meta-data from the node.
virtual status_t RenameMetaEntry (const SString &old_name, const SString &new_name)
 Change the name of a piece of meta-data in the node.

Protected Member Functions

virtual ~BMetaDataCatalog ()

Constructor & Destructor Documentation

BMetaDataCatalog const SContext context  ) 
 

~BMetaDataCatalog  )  [protected, virtual]
 


Member Function Documentation

size_t CountMetaEntriesLocked  )  const [virtual]
 

Return the number of meta-data entries in the node.

Note:
This count is only of user meta-data. The standard BGenericNode meta-data is not included in the count. The default implementation returns 0.

Reimplemented from BGenericNode.

status_t CreateMetaEntry const SString name,
const SValue initialValue,
sptr< IDatum > *  outDatum = NULL
[virtual]
 

Create a new piece of meta-data in the node.

The default implementation returns B_UNSUPPORTED to indicate that it can not create any new meta-data. Extend this to implement nodes that can contain additional meta-data.

Reimplemented from BGenericNode.

status_t LookupMetaEntry const SString entry,
uint32_t  flags,
SValue node
[virtual]
 

Used by Walk() and others to find a meta-data entry in the node.

At this point you MUST deal correctly with the REQUEST_DATA flag, by either returning an actual value or an object.

Reimplemented from BGenericNode.

status_t MetaEntryAtLocked ssize_t  index,
uint32_t  flags,
SValue key,
SValue entry
[virtual]
 

Return a meta-data entry at a particular offset in the node.

Like LookupMetaEntry(), you must correctly respect the REQUEST_DATA flag.

Note:
The index is signed, so that 0 is the start of user meta data. The standard node meta-data is retrieved through negative numbers: -1 = mimeType, -2 = creationDate, -3 = modifiedDate; you should normally pass these through as-is to the base class.

Reimplemented from BGenericNode.

status_t RemoveMetaEntry const SString name  )  [virtual]
 

Remove a piece of meta-data from the node.

The default implementation returns B_UNSUPPORTED to indicate that it can not remove meta-data.

Reimplemented from BGenericNode.

status_t RenameMetaEntry const SString old_name,
const SString new_name
[virtual]
 

Change the name of a piece of meta-data in the node.

The default implementation returns B_UNSUPPORTED to indicate that it can not rename meta-data.

Reimplemented from BGenericNode.


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