Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <W32STD.H>

Class RSoundPlugIn

class RSoundPlugIn : public MWsClientClass;

Description

Client interface to the key or pointer click plug-in DLL.

The plug-in DLL implements the CClickMaker class.

Derivation

Members

Defined in RSoundPlugIn:

Inherited from MWsClientClass:

See also:


Construction and destruction


RSoundPlugIn()

IMPORT_C RSoundPlugIn();

Description

Default constructor.


RSoundPlugIn(RWsSession &)

IMPORT_C RSoundPlugIn(RWsSession &aWs);

Description

C++ constructor.

After calling this function, RSoundPlugIn::Construct(TUid) must be called to complete construction.

Parameters

RWsSession &aWs

Connected session with the window server.

[Top]


Member functions


Construct(TUid)

IMPORT_C TInt Construct(TUid aUid=TUid::Null());

Description

Second phase constructor.

Creates the server side resource and initialises the client's handle to it.

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

Parameters

TUid aUid

Optional UID. This can be ignored unless you intend to use the RSoundPlugIn::CommandReply(TInt,const TPtrC8 &) function. If you do intend to use RSoundPlugIn::CommandReply(TInt,const TPtrC8 &), this should be the plug-in DLL's third UID. RSoundPlugIn::CommandReply(TInt,const TPtrC8 &) will return the value ESoundWrongPlugIn if the plug-in DLL identified by this UID is not loaded.

Return value

TInt

KErrNone if the function was successful, otherwise one of the system wide error codes.


Close()

IMPORT_C void Close();

Description

Sets the handle to zero and frees the resource owned by the server.


Destroy()

IMPORT_C void Destroy();

Description

Closes (by calling RSoundPlugIn::Close()) and deletes the object.


IsLoaded(TBool &)

IMPORT_C TBool IsLoaded(TBool &aIsChangeable);

Description

Tests whether a key or pointer click plug-in DLL is currently loaded.

If one is currently loaded, aIsChangeAble returns whether or not it can be unloaded.

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

Parameters

TBool &aIsChangeable

If a plug-in is currently loaded, this returns ETrue if it can be unloaded and EFalse if it cannot. This depends on whether the KEYCLICKPLUGINFIXED keyword is specified in wsini.ini for the plug-in.

Return value

TBool

ETrue if a plug-in is currently loaded, EFalse if not.


Unload()

Capability: WriteDeviceData

IMPORT_C TInt Unload();

Description

Unloads the plug-in if one is currently loaded and if it can be unloaded.

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

Return value

TInt

KErrNone if the function was successful, KErrNotSupported if it could not be unloaded.


Load(const TDesC &)

Capability: WriteDeviceData

IMPORT_C TInt Load(const TDesC &aFileName);

Description

Loads a new plug-in, replacing the existing one, if any.

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

Parameters

const TDesC16 &aFileName

The filename of the plug-in DLL to load.

Return value

TInt

KErrNone if the function was successful. KErrNotSupported if the currently loaded plug-in could not be unloaded.


KeyClickEnabled()

IMPORT_C TBool KeyClickEnabled();

Description

Tests whether key clicks are enabled, as set by RSoundPlugIn::SetKeyClick(TBool).

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

Return value

TBool

ETrue if key clicks are enabled, EFalse if they are disabled.


PenClickEnabled()

IMPORT_C TBool PenClickEnabled();

Description

Tests whether pointer clicks are enabled, as set by RSoundPlugIn::SetPenClick(TBool).

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

Return value

TBool

ETrue if pointer clicks are enabled, EFalse if they are disabled.


CommandReply(TInt,const TPtrC8 &)

IMPORT_C TInt CommandReply(TInt aOpcode, const TPtrC8 &aArgs);

Description

Sends a command to the plug-in DLL and may receive a response.

If the correct plug-in is loaded, its implementation of CommandReplyL() is called and its return code is returned by this function.

Specify an opcode of zero if you just want the identity of the plug-in DLL being used.

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

Parameters

TInt aOpcode

Opcode understood by both the window server client and the plug-in DLL. If an opcode of zero is specified, this is intercepted by the window server, and the third UID of the plug-in is returned. This allows the caller to identify the plug-in DLL being used.

const TPtrC8 &aArgs

Packaged arguments which are passed to the plug-in via the window server.

Return value

TInt

KErrNone or another of the system error codes, as returned by the plug-in's CommandReplyL() implementation. ESoundWrongPlugIn is returned if no plug-in is loaded, or if the plug-in identified by the aUid parameter in RSoundPlugIn::Construct(TUid) is not loaded.

[Top]


Member enumerations


Enum anonymous

n/a

Description

A possible return value for RSoundPlugIn::CommandReply(TInt,const TPtrC8 &).

ESoundWrongPlugIn

The value returned by RSoundPlugIn::CommandReply(TInt,const TPtrC8 &) if no plug-in is loaded, or if the plug-in identified by the aUid parameter in RSoundPlugIn::Construct(TUid) is not loaded. Its value is set to KMinTInt so that it should not clash with any other expected return value from this function.