MXIMPProtocolConnection Class Reference

class MXIMPProtocolConnection : public MXIMPBase

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

This interface models a connection from XIMP Framework to single remote presence service, over certain presence protocol implementation. XIMP Framework calls methods on this interface based on XIMP Framework client requests.

XIMP Framework retrieves MXIMPProtocolConnection instances through MXIMPProtocolPlugin::AcquireConnectionL(). Same MXIMPProtocolConnection instance may be returned by multiple MXIMPProtocolPlugin::AcquireConnectionL() calls. In this case XIMP Framework shares MXIMPProtocolConnection instance by multiple clients, and MXIMPProtocolConnection lifetime is extended over utilizing client sessions. When last utilizing client session is succesfully closed with MXIMPProtocolConnection::CloseSession(), XIMP Framework disposes the MXIMPProtocolConnection instance with MXIMPProtocolPlugin::ReleaseConnection().

MXIMPProtocolConnection implementation must provide access following feature specific sub-interfaces:
  • MProtocolPresenceWatching

  • MProtocolPresencePublishing

  • MProtocolPresentityGroups

  • MProtocolPresenceAuthorization

Each provided sub-interface defines a set of its own presence managements requests, relating to presence watching and subscribing, presence publication, presentity groups and presentity group member management and to presence authorizations. XIMP Framework calls these sub-interfaces to request on spesific presence requests from protocol connection.

Inherits from

Constructor & Destructor Documentation

~MXIMPProtocolConnection()

~MXIMPProtocolConnection()[protected, inline, virtual]

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

XIMP Framework disposes MXIMPProtocolConnection instances through MXIMPProtocolPlugin::ReleaseConnection().

Member Functions Documentation

CloseSession(const MXIMPContextClientInfo &, TXIMPRequestId)

voidCloseSession(const MXIMPContextClientInfo &aContextClient,
TXIMPRequestIdaReqId
)[pure virtual]

Closes the identified client session from the presence connection.

XIMP Framework calls this method to close the remote presence service session, for here specified client. When last using client session is closed, XIMP Framework consideres the remote presence connection as disconnect, and disposes MXIMPProtocolConnection instance with MXIMPProtocolPlugin::ReleaseConnection().

Parameters

const MXIMPContextClientInfo & aContextClientClient which session to close.
TXIMPRequestId aReqIdRequest ID identifying the request. Presence protocol connection implementation must cache here given ID and use it when completing the request later through the MXIMPProtocolConnectionHost::HandleRequestCompleted().

GetProtocolInterface(TInt)

TAny *GetProtocolInterface(TIntaInterfaceId)[pure virtual]

Gets reference to protocol specific interface.

XIMP Framework calls this method to retrieve a reference to protocol interface implementation.

Call and interface lifetime convention:
  • Returned interface instance must remain valid (usable) untill last client session, using originating presence protocol connection is successfully closed with MXIMPProtocolConnection::CloseSession().

Parameters

TInt aInterfaceId

GetSupportedFeaturesL(CDesC8Array &)

voidGetSupportedFeaturesL(CDesC8Array &aFeatures)const [pure virtual]

Gets features that presence protocol connection supports.

Presence protocol connection should negotiate available features during the connection establish and this method should return the supported features from presence protocol connection internal cache.

Parameters

CDesC8Array & aFeaturesReturn parameter where to append supported presence protocol connection features. Feature IDs are defined in NXIMPFeature namespace.

OpenSessionL(const MXIMPContextClientInfo &, TXIMPRequestId)

voidOpenSessionL(const MXIMPContextClientInfo &aContextClient,
TXIMPRequestIdaReqId
)[pure virtual]

Opens a session for the identified client through the presence protocol connection.

XIMP Framework calls this method to open a session to remote presence service, for here specified client. Remote presence service was identified when the MXIMPProtocolConnection instance was retrieved through MXIMPProtocolPlugin::AcquireConnectionL().

Parameters

const MXIMPContextClientInfo & aContextClientObject describing the presence connection client.
TXIMPRequestId aReqIdRequest ID identifying the request. Presence protocol connection implementation must cache here given ID and use it when completing the request later through the MXIMPProtocolConnectionHost::HandleRequestCompleted().

OpenSessionL(const TInt &, TXIMPRequestId)

voidOpenSessionL(const TInt &aSettingsId,
TXIMPRequestIdaReqId
)[pure virtual]

Opens a session for the identified client through the presence protocol connection.

XIMP Framework calls this method to open a session to remote presence service, for here specified client. Remote presence service was identified when the MXIMPProtocolConnection instance was retrieved through MXIMPProtocolPlugin::AcquireConnectionL().

Parameters

const TInt & aSettingsIdSettingsId for the presence connection client.
TXIMPRequestId aReqIdRequest ID identifying the request. Presence protocol connection implementation must cache here given ID and use it when completing the request later through the MXIMPProtocolConnectionHost::HandleRequestCompleted().

PrimeHost(MXIMPProtocolConnectionHost &)

voidPrimeHost(MXIMPProtocolConnectionHost &aHost)[pure virtual]

Primes protocol connection with its callback interface.

Primes the presence protocol connection instance with its XIMP Framework side callback interface. Here given MXIMPProtocolConnectionHost interface is implemented and owned by the XIMP Framework, and presence protocol connection 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 protocol connection instance.

  • Each presence protocol connection instance must use here given specific host interface instance to communicate back to XIMP Framework direction

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

Parameters

MXIMPProtocolConnectionHost & aHostReference to host interface, what this MXIMPProtocolConnection instance must use to communicate back to XIMP Framework direction. Object ownership is not trasfered.

ProtocolPresenceFeatures()

MProtocolPresenceFeatures &ProtocolPresenceFeatures()[pure virtual]

Gets reference to presence watching interface.

XIMP Framework calls this method to retrieve a reference to protocols MProtocolPresenceWatching interface implementation.

Call and interface lifetime convention:
  • Returned interface instance must remain valid (usable) untill last client session, using originating presence protocol connection is successfully closed with MXIMPProtocolConnection::CloseSession().