Home · All Classes · Annotated · Functions

IValueSpaceLayer Class Reference

The IValueSpaceLayer class provides support for adding new logical data layers to the Qtopia Value Space. More...

#include <IValueSpaceLayer>

Inherits QObject.

Public Types

Public Functions

Signals

Additional Inherited Members


Detailed Description

The IValueSpaceLayer class provides support for adding new logical data layers to the Qtopia Value Space.


Member Type Documentation

typedef IValueSpaceLayer::HANDLE

The HANDLE type is an opaque, pointer sized contextual handle used to represent paths within value space layers. HANDLES are only ever created by IValueSpaceLayer::item() and are always released by calls to IValueSpaceLayer::remHandle(). The special, InvalidHandle is reserved to represent an invalid handle.

enum IValueSpaceLayer::Properties

To allow for efficient layer implementations, expensive handle operations, currently only monitoring for changes, are enabled and disabled as needed on a per-handle basis. The Properties enumeration is a bitmask representing the different properties that can exist on a handle.

ConstantValueDescription
IValueSpaceLayer::Publish0x00000001Enable change notification for the handle. When set, the layer should emit IValueSpaceLayer::handleChanged() signals when appropriate for the handle.

enum IValueSpaceLayer::Type

Value Space layers are initialized in either a "Server" or a "Client" context. There is only a single server in the value space architecture, and its layers are always initialized before any clients. This distinction allows layers to implement Client/Server architecture if required. If not, layers are free to treat Server and Client contexts identically.

ConstantValueDescription
IValueSpaceLayer::Server0The layer is being initialized in the "server" context.
IValueSpaceLayer::Client1The layer is being initialized in the "client" context.


Member Function Documentation

QSet<QByteArray> IValueSpaceLayer::children ( HANDLE handle )   [pure virtual]

Returns the set of children of handle. For example, in a layer providing the following items:

    /Device/Configuration/Applications/FocusedApplication
    /Device/Configuration/Buttons/PrimaryInput
    /Device/Configuration/Name

a request for children of "/Device/Configuration" will return { "Applications", "Buttons", "Name" }.

void IValueSpaceLayer::handleChanged ( unsigned int handle )   [signal]

Emitted whenever the handle's value, or any sub value, changes.

QUuid IValueSpaceLayer::id ()   [pure virtual]

Return a globally unique id for the layer. This id is used to break ordering ties.

HANDLE IValueSpaceLayer::item ( HANDLE parent, const QByteArray & subPath )   [pure virtual]

Returns a new opaque handle for the requested subPath of parent. If parent is an InvalidHandle, subPath is an absolute path.

QString IValueSpaceLayer::name ()   [pure virtual]

Returns the name of the Value Space layer. This name is only used for diagnostics purposes.

unsigned int IValueSpaceLayer::order ()   [pure virtual]

Return the position in the Value Space layer stack that this layer should reside. Higher numbers mean the layer has a higher precedence and its values will "shadow" those below it. If two layers specify the same ordering, the IValueSpaceLayer::id() value is used to break the tie.

void IValueSpaceLayer::remHandle ( HANDLE handle )   [pure virtual]

Releases a handle previously returned from IValueSpaceLayer::item().

void IValueSpaceLayer::setProperty ( HANDLE handle, Properties property )   [pure virtual]

Apply the specified property mask to handle.

void IValueSpaceLayer::shutdown ()   [pure virtual]

Called by the Value Space system to uninitialize each layer. The shutdown call can be used to release any resources in use by the layer.

bool IValueSpaceLayer::startup ( Type type )   [pure virtual]

Called by the Value Space system to initialize each layer. The type parameter will be set accordingly, and layer implementors can use this to implement a client/server architecture if desired.

bool IValueSpaceLayer::value ( HANDLE handle, QVariant * data )   [pure virtual]

Returns the value for a particular handle. If a value is available, the layer will set data and return true. If no value is available, false is returned.

bool IValueSpaceLayer::value ( HANDLE handle, const QByteArray & subPath, QVariant * data )   [pure virtual]

This is an overloaded member function, provided for convenience.

Returns the value for a particular subPath of handle. If a value is available, the layer will set data and return true. If no value is available, false is returned.


Copyright © 2006 Trolltech Trademarks
Qtopia 4.1.7