From RAD Studio API Documentation
Jump to: navigation, search



TLocalResource = class(TCustomLocalItem)


class PASCALIMPLEMENTATION DECLSPEC_DRTTI TLocalResource : public TCustomLocalItem


Type Visibility Source Unit Parent
class public
System.Tether.AppProfile System.Tether.AppProfile


Represents a shared resource from the point of view of the profile that is sharing that resource. See also TRemoteResource.

TLocalResource is a subclass of TCustomLocalItem that wraps an instance of TResourceValue. Use the Value property to set this wrapped resource. ResType specifies whether the resource value is a standard data type or a stream.

Local resources are collection resources. When you create a local resource, you must specify a parent TCollection that takes ownership of the local resource.

A local resource provides a Name that uniquely identifies the resource within the Profile that shares the resource, and a Hint that describes the resource.

Call Broadcast on a local resource to announce changes to the resource to remote profiles at any time. You can also make NotifyUpdates True to enable automatic notifications when the value of the resource changes.

IsPublic determines whether or not the local resource must be shared with remote profiles. By default, local resources are public (IsPublic is True). Application profiles use protected (IsPublic is False) local resources for one-time exchanges of data, such as receiving strings or receiving streams.

Kind determines whether the value of the local resource is defined locally (default), or is mirrored from a remote resource. When the value of a local resource is mirrored (Kind is TTetheringRemoteKind.Mirror), the value is obtained from another resource shared by a remote profile. The Kind of the remote resource must be TTetheringRemoteKind.Shared.

See Also