class CLbsSuplPushImpl : public CActive |
The class provides an internal implementation of the functionality exposed by the CLbsSuplPush interface.
Public Member Functions | |
---|---|
~CLbsSuplPushImpl() | |
CLbsSuplPushImpl * | NewL(TLbsSuplPushChannel, MLbsSuplPushObserver &) |
TInt | OnTimerError(TInt, TInt) |
void | OnTimerEventL(TInt) |
TInt | SuplInit(TLbsSuplPushRequestId &, const TDesC8 &, TInt) |
Protected Member Functions | |
---|---|
void | DoCancel() |
void | RunL() |
Private Member Functions | |
---|---|
CLbsSuplPushImpl(TLbsSuplPushChannel, MLbsSuplPushObserver &) | |
void | ConstructL(TLbsSuplPushChannel) |
TInt | GetBusyData(TBool &, TInt &) |
TInt | ReleaseBusyProp() |
TInt | SendMessage(TBool) |
TInt | SetBusyData(TBool, TInt) |
void | SuplInitL(TLbsSuplPushRequestId &, const TDesC8 &) |
Public Member Enumerations | |
---|---|
enum | TState { ECreated = 1, EInitialized = 2, EWaitingAck = 4, EWaitingBusy = 8 } |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Inherited Attributes | |
---|---|
CActive::iStatus |
CLbsSuplPushImpl | ( | TLbsSuplPushChannel | aChannel, |
MLbsSuplPushObserver & | aObserver | ||
) | [private] |
Constructor.
TLbsSuplPushChannel aChannel | [In] The id of the channel to be opened. |
MLbsSuplPushObserver & aObserver | [In] A reference to an observer waiting for request completion call-backs. |
~CLbsSuplPushImpl | ( | ) | [virtual] |
Closes the interface and disposes all open or used resources.
void | ConstructL | ( | TLbsSuplPushChannel | aChannel | ) | [private] |
2nd phase constructor. Creates and assigns all the required internal resources.
TLbsSuplPushChannel aChannel | [In] An id of the channel to be opened. |
void | DoCancel | ( | ) | [protected, virtual] |
Called when CActive::Cancel method is called. It cancels both the ACK and BUSY subscriptions. Only one of the two subscriptions can be actually active at every moment. But it is harmless to cancel inactive subscription.
CActive::DoCancel CLbsSuplPushImpl::~CLbsSuplPushImpl CLbsSuplPushImpl::SendMessage CLbsSuplPushImpl::OnTimerEventL
TInt | GetBusyData | ( | TBool & | aBusy, |
TInt & | aNextReqId | |||
) | const [private] |
Reads the busy flag and the next free request id from the BUSY property.
CLbsSuplPushImpl::SuplInitL CLbsSuplPushImpl::SendMessage CLbsSuplPushImpl::ReleaseBusyProp
CLbsSuplPushImpl * | NewL | ( | TLbsSuplPushChannel | aChannel, |
MLbsSuplPushObserver & | aObserver | |||
) | [static] |
Creates an instance of the CLbsSuplPushImpl class.
TLbsSuplPushChannel aChannel | [In] The id of the channel to be opened. |
MLbsSuplPushObserver & aObserver | [In] A reference to an observer waiting for request completion call-backs. |
TInt | OnTimerError | ( | TInt | aTimerId, |
TInt | aError | |||
) | [virtual] |
From MLbsCallbackTimerObserver. Normally it is called when OnTimerEventL leaves. Our implementation of OnTimerEventL does not leave, so this function must not be called.
void | OnTimerEventL | ( | TInt | aTimerId | ) | [virtual] |
From MLbsCallbackTimerObserver. Called when a message timeout error happens. It removes the outdated message from the queue, notifies the observer that that message fails. Then it tries to deliver the next message if there is any. If there is no messages to deliver and the object is in the EWaitingBusy state, it unsubscribes from the BUSY property.
TInt aTimerId |
TInt | ReleaseBusyProp | ( | ) | [private] |
Tries to release the BUSY property. Switches to the EInitialized state in any case even though a error happens.
CLbsSuplPushImpl::~CLbsSuplPushImpl CLbsSuplPushImpl::OnTimerEventL CLbsSuplPushImpl::RunL
void | RunL | ( | ) | [protected, virtual] |
Called either when in the EWaitingAck state and the ACK property is changed or when in the EWaitingBusy state and the BUSY property is changed.
In the EWaitingAck state it checks that it is really the notification on the message delivering now. If it is, it notifies the observer about the successful delivery. If not, it resubscribes, returns immediately and the object continues to wait for the correct notification asynchronously.
In the EWaitingBusy state it checks if the channel is free. If it is not, it resubscribes, returns immideatelly, and the object continues to wait when the channel is free asynchronously.
In both states if the object is in the EInitialized state and ready to deliver the next message, the function tries to deliver the message if there is any.
TInt | SendMessage | ( | TBool | aNotifyObserver | ) | [private] |
Tries to send the next message in the queue. If the channel is busy, it subscribes for the BUSY property and wait asynchronously when the property is free.
CLbsSuplPushImpl::SuplInitL CLbsSuplPushImpl::OnTimerEventL CLbsSuplPushImpl::RunL
TBool aNotifyObserver | [In] If the function must notify the observer when a error happens and the message fails. |
TInt | SetBusyData | ( | TBool | aBusy, |
TInt | aNextReqId | |||
) | const [private] |
Writes the busy flag and the next free request id from the BUSY property.
CLbsSuplPushImpl::SuplInitL CLbsSuplPushImpl::SendMessage CLbsSuplPushImpl::ReleaseBusyProp
TInt | SuplInit | ( | TLbsSuplPushRequestId & | aReqId, |
const TDesC8 & | aMsg, | |||
TInt | aReserved | |||
) |
Provides an internal implementation of CLbsSuplPush::SuplInit
MLbsSuplPushObserver::OnSuplInitComplete CLbsSuplPush::SuplInit
TLbsSuplPushRequestId & aReqId | [Out] A reference on the TLbsSuplPushRequestId variable where the assigned request id is written. |
const TDesC8 & aMsg | [In] The message buffer. |
TInt aReserved | [In] Reserved for future use. |
void | SuplInitL | ( | TLbsSuplPushRequestId & | aReqId, |
const TDesC8 & | aMsg | |||
) | [private] |
A leaving implementation of the CLbsSuplPushImpl::SuplInit.
TLbsSuplPushRequestId & aReqId | [Out] A reference on the TLbsSuplPushRequestId variable where the assigned request id is written. |
const TDesC8 & aMsg | [In] The message buffer. |
The set of the states the class can be
CLbsSuplPushImpl::CheckStateL
ECreated = 1 |
The initial state the object gets to after creation |
EInitialized = 2 |
The state after the object got the P&S category UID and attached to the BUSY and ACK props In that state there may be from zero to several messages in the queue. The INIT property has never been set for any of the messages in the queue. The BUSY property has not been set to ETrue by this object as well. |
EWaitingAck = 4 |
The state after the object has tried to deliver a message, has set successfully the INIT property, subscribed for the ACK property and is waiting for the ACK property to be set. |
EWaitingBusy = 8 |
The state after the object checked that the BUSY property is set to ETrue by another plug-in, subscribed for the BUSY property and is waiting for the BUSY property to be set to EFalse. |
RPointerArray< CLbsSuplPushMsgInfo > | iMsgQueue | [private] |
The message queue
MLbsSuplPushObserver & | iObserver | [private] |
A reference to a user of the CLbsSuplPushImpl interface waiting for request completion call-backs.
TUid | iPropOwnerSecureId | [private] |
The security id of the process that defines the P&S props used
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.