#include <support/INode.h>
Inheritance diagram for INode:
Traversal through the Binder Data Model revolves around the INode interface. Its key method is Walk(), which is used to resolve a path string into an object in a namespace. An INode also provides separate access to meta-data associated with its object.
Clients will usually use the SNode convenience class instead of making direct calls on an INode. Implementations should never directly implement INode, instead deriving from BGenericNode or one of its subclasses.
Public Types | |
enum | { REQUEST_DATA = 0x1000, COLLAPSE_NODE = 0x2000, COLLAPSE_CATALOG = 0x2000, IGNORE_PROJECTION = 0x4000 } |
Flags used in Walk() and other catalog functions as well. More... | |
enum | { CREATE_DATUM = 0x0100, CREATE_NODE = 0x0200, CREATE_CATALOG = 0x0200, CREATE_MASK = 0x0300 } |
Flags for Walk(). More... | |
enum | { CHANGE_DETAILS_SENT = 0x0001 } |
Flags for INode::NodeChanged event. More... | |
Public Member Functions | |
virtual sptr< INode > | Attributes () const =0 |
Retrieve the meta-data catalog associated with this node, or NULL if it doesn't exist. | |
virtual nsecs_t | CreationDate () const =0 |
Retrieve the "creationDate" meta-data entry, or 0 of it doesn't exist. | |
status_t | LinkNode (const sptr< IBinder > &to, const SValue &mappings, uint32_t flags=0) |
virtual SString | MimeType () const =0 |
Retrieve the "mimeType" meta-data entry, or "" if it doesn't exist. | |
virtual nsecs_t | ModifiedDate () const =0 |
Retrieve the "modifiedDate" meta-data entry, or 0 of it doesn't exist. | |
virtual void | SetCreationDate (nsecs_t value)=0 |
Retrieve the "creationDate" meta-data entry, or 0 of it doesn't exist. | |
virtual void | SetMimeType (const SString &value)=0 |
Retrieve the "mimeType" meta-data entry, or "" if it doesn't exist. | |
virtual void | SetModifiedDate (nsecs_t value)=0 |
Retrieve the "modifiedDate" meta-data entry, or 0 of it doesn't exist. | |
status_t | UnlinkNode (const sptr< IBinder > &to, const SValue &mappings, uint32_t flags=0) |
virtual status_t | Walk (SString *path, uint32_t flags, SValue *node)=0 |
Walk through the namespace based on the given path. | |
Protected Member Functions | |
INode () | |
virtual | ~INode () |
|
Flags used in Walk() and other catalog functions as well. There is a copy of these flags in IIterator, if you change these don't forget to change those as well.
|
|
Flags for Walk(). When these flags are passed to Walk(), the walk will create either a datum or a node when it reaches the leaf in the specified path.
|
|
Flags for INode::NodeChanged event.
Reimplemented from SAtom. |
|
|
|
|
|
Retrieve the meta-data catalog associated with this node, or NULL if it doesn't exist. The INode interface also supplies access to meta-data associated with the object. The "attributes" read-only property provides direct access to the meta-data node, which is a pointer to another separate INode holding the meta-data. A node may not support meta-data, in which case the attributes property will return NULL. You will not usually use this property directly, instead using the mimeType, creationDate, and modifiedDate properties to read/write the standard attributes. Also see Walk() for how you can retrieve these and other attributes through the normal path traversal mechanism. Implemented in BGenericNode, BCatalogMirror, and BTokenSource. |
|
Retrieve the "creationDate" meta-data entry, or 0 of it doesn't exist.
Implemented in BGenericNode, BCatalogMirror, and BTokenSource. |
|
|
|
Retrieve the "mimeType" meta-data entry, or "" if it doesn't exist.
Implemented in BGenericNode, BCatalogMirror, and BTokenSource. |
|
Retrieve the "modifiedDate" meta-data entry, or 0 of it doesn't exist.
Implemented in BGenericNode, BCatalogMirror, and BTokenSource. |
|
Retrieve the "creationDate" meta-data entry, or 0 of it doesn't exist.
Implemented in BGenericNode, BCatalogMirror, and BTokenSource. |
|
Retrieve the "mimeType" meta-data entry, or "" if it doesn't exist.
Implemented in BSchemaRowIDJoin, BSchemaTableNode, BGenericNode, BIndexedTableNode, BCatalogMirror, and BTokenSource. |
|
Retrieve the "modifiedDate" meta-data entry, or 0 of it doesn't exist.
Implemented in BGenericNode, BCatalogMirror, and BTokenSource. |
|
|
|
Walk through the namespace based on the given path.
If the node supports attributes then the Walk() method will allow you to traverse directly to them. This is accomplished by reserving path names whose first character is ":" to indicate that the name is part of the attribute namespace. Thus a Walk() of just the path ":" will return the attributes catalog (and continue walking into it if needed); for a name with ':' as a prefix and additional text the node strips off the ':' and then calls Walk() on the attributes catalog with the remaining text. Clients will generally not call Walk() directly, instead relying on SNode::Walk(). The latter hides a lot of the complexity of INode::Walk() that we will discuss later. The flags parameter allows you to control how the namespace walks your supplied path. These allow you to request optimizations to how INode returns its result (REQUEST_DATA, COLLAPSE_NODE), and what it should do if segments of the path don't exist (CREATE_DATUM, CREATE_NODE). The REQUEST_DATA and COLLAPSE_NODE flags are optimization hints that allow you to bypass the "everything is an object" property of the namespace in certain situations. An INode is not required to honor these requests (and indeed may be entirely unable to do so), so when using them it is the client's responsibility to deal with such a failure.
You can combine REQUEST_DATA and COLLAPSE_NODE to ask for the final node to return an SValue mapping, where each value is actually data. If you use COLLAPSE_NODE without REQUEST_DATA, you will receive SValue mappings where the values are IDatum objects.
Implemented in BGenericNode, BCatalogMirror, and BTokenSource. |