RAnim Class Reference

#include <w32std.h>

Link against: ws32.lib

class RAnim
Public Member Functions
virtual ~RAnim()
virtual IMPORT_C voidClose()
IMPORT_C voidDestroy()
Protected Member Functions
RAnim()
RAnim(RAnimDll &)
IMPORT_C voidAsyncCommandReply(TRequestStatus &, TInt, const TIpcArgs &)
IMPORT_C voidCommand(TInt, const TPtrC8 &)
IMPORT_C voidCommand(TInt)
IMPORT_C TIntCommandReply(TInt)
IMPORT_C TIntCommandReply(TInt, const TPtrC8 &)
IMPORT_C TIntCommandReply(TInt, const TDesC8 &, const TIpcArgs &)
IMPORT_C TIntConstruct(const RWindowBase &, TInt, const TDesC8 &)
IMPORT_C TIntConstruct(const RWindowBase &, TInt, const TDesC8 &, const TIpcArgs &)
IMPORT_C TIntConstruct(const RWsSprite &, TInt, const TDesC8 &)
IMPORT_C TIntConstruct(const RWsSprite &, TInt, const TDesC8 &, const TIpcArgs &)

Detailed Description

Client-side handle to a server-side animation class.

This class should be sub-classed to provide a client side interface to the server side animation DLL. The server side animation DLL is derived from CAnim.

Constructor & Destructor Documentation

RAnim ( )

IMPORT_CRAnim()[protected]

Default constructor. Developers should use the other constructor overload.

RAnim ( RAnimDll & )

IMPORT_CRAnim(RAnimDll &aDll)[protected]

Protected C++ constructor.

This constructor should be used to construct an animation object from a given animation DLL. The DLL must be loaded first, see the discussion of RAnimDll.

Parameters
aDllThe animation DLL.

~RAnim ( )

IMPORT_C~RAnim()[virtual]

Empty virtual destructor.

Member Function Documentation

AsyncCommandReply ( TRequestStatus &, TInt, const TIpcArgs & )

IMPORT_C voidAsyncCommandReply(TRequestStatus &aRequestStatus,
TIntaOpcode,
const TIpcArgs &aIpcArgs
)[protected]

Sends a command and its arguments to the server-side CAnim instance asynchronously.

The IPC (inter-process communication) arguments are passed to the CAnim-derived class' CommandReplyL function, where the behaviour should be implemented. The request is not buffered - rather the function executes asynchronously. The first and second slots of the TIpcArgs parameter are reserved for internal use.

If the code calling this function is itself an API that is asynchronous (i.e. if the TRequestStatus passed into this function is simply a parameter to a higher-level API), then that higher-level API should typically provide a corresponding "Cancel" function that its own clients can use to cancel their asynchronous request - this would typically be implemented by the higher-level API by using RAnim::CommandReply.

See also: CommandReply() Command() CAnim::CommandReplyL()

Parameters
aRequestStatusSet initially by the function to KRequestPending. Then when this asynchronous function at some potentially later point in time "completes", aRequestStatus is set to the completion code which is a value defined by the animation writer (i.e. the value that the server-side CAnim-derived class' CommandReplyL returns or leaves with). The value may, in some cases, be defined to be an error code.
aOpcodeAn opcode meaningful to the server-side CAnim-derived class.
aIpcArgsInter-process communication arguments which will be passed to the server side object. Panics if either the first or second "slot" is set to anything other than TIpcArgs::ENothing.

Close ( )

IMPORT_C voidClose()[virtual]

Sends the close command.

This frees resources belonging to an animation object. It would be called to release resources when the RAnim is owned in-line by another object (so that destruction is automatic).

This function always causes a flush of the window server buffer.

Command ( TInt, const TPtrC8 & )

IMPORT_C voidCommand(TIntaOpcode,
const TPtrC8 &aArgs
)[protected]

Sends a command and its arguments to the server-side CAnim instance, and returns immediately.

Commands issued by this function may be buffered before being passed to the server.

Server-side errors cannot be detected, so Command() should not be used for operations which could fail or which may leave. Use CommandReply() for those. Although the window server will not fail due to errors not being returned to the client side, client side behaviour will almost certainly not be correct if errors have been generated but not received.

Use of this function results in a server-side call to the equivalent CAnim::Command().

See also: CommandReply() AsyncCommandReply() CAnim::Command()

Parameters
aOpcodeAn operation meaningful to the server-side CAnim object.
aArgsPackaged arguments which will be passed to the server side object.

Command ( TInt )

IMPORT_C voidCommand(TIntaOpcode)[protected]

Sends a command to the server-side CAnim instance, and returns immediately.

Commands issued by this function may be buffered before being passed to the server.

Server-side errors cannot be detected, so Command() should not be used for operations which could fail or which may leave. Use CommandReply() for those. Although the window server will not fail due to errors not being returned to the client side, client side behaviour will almost certainly not be correct if errors have been generated but not received.

Use of this function results in a server-side call to the equivalent CAnim::Command().

See also: CommandReply() AsyncCommandReply() CAnim::Command()

Parameters
aOpcodeAn operation meaningful to the server-side CAnim object.

CommandReply ( TInt )

IMPORT_C TIntCommandReply(TIntaOpcode)[protected]

Sends a command to the server-side CAnim instance, and waits for a response.

This function executes synchronously and returns the code returned by the server-side method CAnim::CommandReplyL(). The request is not buffered.

This function always causes a flush of the window server buffer.

See also: Command() AsyncCommandReply() CAnim::CommandReplyL()

Parameters
aOpcodeAn opcode meaningful to the server-side CAnim-derived class.
Return Value
A value defined by the animation writer. The value may, in some cases, be defined to be an error code.

CommandReply ( TInt, const TPtrC8 & )

IMPORT_C TIntCommandReply(TIntaOpcode,
const TPtrC8 &aArgs
)[protected]

Sends a command and its arguments to the server-side CAnim instance, and waits for a response.

The packaged command arguments are passed to the matching server side function, where the behaviour should be implemented. The request is not buffered. The function executes synchronously and returns the code returned by the server-side method CAnim::CommandReplyL().

This function always causes a flush of the window server buffer.

See also: Command() AsyncCommandReply() CAnim::CommandReplyL()

Parameters
aOpcodeAn opcode meaningful to the server-side CAnim-derived class.
aArgsPackaged arguments which will be passed to the server side object.
Return Value
A value defined by the animation writer. The value may, in some cases, be defined to be an error code.

CommandReply ( TInt, const TDesC8 &, const TIpcArgs & )

IMPORT_C TIntCommandReply(TIntaOpcode,
const TDesC8 &aArgs,
const TIpcArgs &aIpcArgs
)[protected]

Sends a command and its arguments to the server-side CAnim instance, and waits for a response.

The IPC (inter-process communication) arguments are passed to the matching server side function, where the behaviour should be implemented. The request is not buffered. The function executes synchronously and returns the code returned by the server-side method CAnim::CommandReplyL(). The first slot of the TIpcArgs parameter is reserved for internal use. The second slot is used to receive an additional reply from the server-side CAnim.

This function always causes a flush of the window server buffer.

See also: Command() AsyncCommandReply() CAnim::CommandReplyL()

Parameters
aOpcodeAn opcode meaningful to the server-side CAnim-derived class.
aArgsPackaged arguments which will be passed to the server side object.
aIpcArgsInter-process communication arguments which will be passed to the server side object. Panics if the first "slot" is set to anything other than TIpcArgs::ENothing.
Return Value
A value defined by the animation writer. The value may, in some cases, be defined to be an error code.

Construct ( const RWindowBase &, TInt, const TDesC8 & )

IMPORT_C TIntConstruct(const RWindowBase &aDevice,
TIntaType,
const TDesC8 &aParams
)[protected]

Completes construction of the object based on a window device, and creates the server-side animation system.

Construction information is passed to the server side via aType and aParams. The server then passes the information to the function CreateInstanceL() inside the Anim DLL.

This function always causes a flush of the window server buffer.

See also: CAnim::ConstructL() CAnimDll::CreateInstanceL()

Parameters
aDeviceA window device.
aTypeThe type of this animation object, as understood by CAnimDll::CreateInstanceL().
aParamsPackaged arguments which will be passed to the server side object to tell it how to construct itself or initialise itself.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.

Construct ( const RWindowBase &, TInt, const TDesC8 &, const TIpcArgs & )

IMPORT_C TIntConstruct(const RWindowBase &aDevice,
TIntaType,
const TDesC8 &aParams,
const TIpcArgs &aIpcArgs
)[protected]

Completes construction of the object based on a window device, and creates the server-side animation system.

Construction information is passed to the server side via aType and aParams. The server then passes the information to the function CreateInstanceL() inside the Anim DLL.

This function always causes a flush of the window server buffer.

See also: CAnim::ConstructL() CAnimDll::CreateInstanceL()

Parameters
aDeviceA window device.
aTypeThe type of this animation object, as understood by CAnimDll::CreateInstanceL().
aParamsPackaged arguments which will be passed to the server side object to tell it how to construct itself or initialise itself.
aIpcArgsInter-process communication arguments which will be passed to the server side object. Panics if the first "slot" is set to anything other than TIpcArgs::ENothing.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.

Construct ( const RWsSprite &, TInt, const TDesC8 & )

IMPORT_C TIntConstruct(const RWsSprite &aDevice,
TIntaType,
const TDesC8 &aParams
)[protected]

Completes construction of the Anim DLL based on a sprite.

Construction information is passed to the server side via aType and aParams. The server then passes the information to the function CreateInstanceL() inside the Anim DLL.

This function always causes a flush of the window server buffer.

See also: CAnim::ConstructL() CAnimDll::CreateInstanceL()

Parameters
aDeviceA sprite.
aTypeThe type of this animation object, as understood by CAnimDll::CreateInstanceL().
aParamsPackaged arguments which will be passed to the server side object to tell it how to construct itself or initialise itself.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.

Construct ( const RWsSprite &, TInt, const TDesC8 &, const TIpcArgs & )

IMPORT_C TIntConstruct(const RWsSprite &aDevice,
TIntaType,
const TDesC8 &aParams,
const TIpcArgs &aIpcArgs
)[protected]

Completes construction of the Anim DLL based on a sprite.

Construction information is passed to the server side via aType and aParams. The server then passes the information to the function CreateInstanceL() inside the Anim DLL.

This function always causes a flush of the window server buffer.

See also: CAnim::ConstructL() CAnimDll::CreateInstanceL()

Parameters
aDeviceA sprite.
aTypeThe type of this animation object, as understood by CAnimDll::CreateInstanceL().
aParamsPackaged arguments which will be passed to the server side object to tell it how to construct itself or initialise itself.
aIpcArgsInter-process communication arguments which will be passed to the server side object. Panics if the first "slot" is set to anything other than TIpcArgs::ENothing.
Return Value
KErrNone if successful, otherwise one of the system-wide error codes.

Destroy ( )

IMPORT_C voidDestroy()

Closes and deletes the server-side animation object.

This should be called on heap allocated objects.

This function always causes a flush of the window server buffer.