MXIMPProtocolPlugin Class Reference

class MXIMPProtocolPlugin : public MXIMPBase

Interface for presence protocol plug-in object. Interface must be implemented by a concrete XIMP Framework protocol plug-ins.

This interface models presence protocol plug-in. XIMP Framework loads a MXIMPProtocolPlugin instance for needed protocol, by instantiating protocol specific CXimpFwProtocolPluginBase object through ECom architecture.

XIMP Framework calls methods defined in this interface to manage protocol connections based on clients requests.

Since
S60 v3.2

Inherits from

Constructor & Destructor Documentation

~MXIMPProtocolPlugin()

~MXIMPProtocolPlugin ( ) [protected, inline, virtual]

Protected destructor. MXIMPProtocolPlugin objects can't be deleted through this interface.

Member Functions Documentation

AcquireConnectionL(const MXIMPServiceInfo &, const MXIMPContextClientInfo &)

MXIMPProtocolConnection & AcquireConnectionL ( const MXIMPServiceInfo & aService,
const MXIMPContextClientInfo & aContextClient
) [pure virtual]

Acquires a presence protocol connection.

XIMP Framework calls this to acquire a presence protocol connection object for identified remote service and client. Protocol plug-in implementation can either:
  1. Always instantiate a new MXIMPProtocolConnection object to manage each client session as separated entity.

  1. Try to locate suitable existing connection from list of currently existing remote connections, and thus allow two or more client applications to share the remote presence connection. Protocol plug-in implementation can itself select in which circumstance to share the connection. Usually sharing should happen, when two remote connections are targeted to same remote service and to same user account.

Presence Protocol plug-in must maintain internally list of existing presence service connection objects. Direct ownership of acquired presence service connection objects remain in the presence protocol plug-in. When XIMP Framework doesn't anymore need the certain acquired presence service connection, XIMP Framework disposes MXIMPProtocolConnection instance with MXIMPProtocolPlugin::ReleaseConnection() . If the same MXIMPProtocolConnection instance was returned multiple times from MXIMPProtocolPlugin::AcquireConnectionL() , it is still disposed only once with ReleaseConnection() , after closing the last utilizing client session.

Parameters

const MXIMPServiceInfo & aService Target address, credentials etc. info for remote presence connection.
const MXIMPContextClientInfo & aContextClient Object describing the client requesting the remote presence connection.

PrimeHost(MXIMPProtocolPluginHost &)

void PrimeHost ( MXIMPProtocolPluginHost & aHost ) [pure virtual]

Primes presence protocol plug-in with its callback interface.

Primes the presence protocol plug-in instance with its XIMP Framework side callback interface. Here given MXIMPProtocolPluginHost interface is implemented and owned by the XIMP Framework, and presence protocol plug-in must use it to communicate back to XIMP Framework direction.

Call and interface lifetime convention:
  • This method is called by XIMP Framework before requesting any other requests from presence protocol plug-in instance.

  • Presence protocol plug-in instance must use here given specific host interface instance to communicate back to XIMP Framework direction from asynchronous requests.

  • The presence protocol plug-in implementation must store the here given host reference internally, so protocol plug-in implementation can access the host when needed.

Parameters

MXIMPProtocolPluginHost & aHost Reference to host interface, what this MXIMPProtocolPlugin instance must use when communicating back to XIMP Framework direction. Object ownership is not trasfered.

ReleaseConnection(MXIMPProtocolConnection &)

void ReleaseConnection ( MXIMPProtocolConnection & aConnection ) [pure virtual]

Releases presence service connection.

XIMP Framework calls this to releases previously acquired MXIMPProtocolConnection instance. XIMP Framework calls this method just once for each MXIMPProtocolConnection instance, event same MXIMPProtocolConnection instance were returned in several AcquireConnectionL() calls.

Parameters

MXIMPProtocolConnection & aConnection Connection object to release.