1.1 --- a/epoc32/include/comms-infras/cs_mobility_apiext.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/comms-infras/cs_mobility_apiext.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,110 @@
1.4 -cs_mobility_apiext.h
1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.6 +// All rights reserved.
1.7 +// This component and the accompanying materials are made available
1.8 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.9 +// which accompanies this distribution, and is available
1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +//
1.12 +// Initial Contributors:
1.13 +// Nokia Corporation - initial contribution.
1.14 +//
1.15 +// Contributors:
1.16 +//
1.17 +// Description:
1.18 +//
1.19 +
1.20 +
1.21 +
1.22 +/**
1.23 + @file
1.24 + @publishedAll
1.25 + @released
1.26 +*/
1.27 +
1.28 +#ifndef CS_MOBILITY_APIEXT_H
1.29 +#define CS_MOBILITY_APIEXT_H
1.30 +
1.31 +#include <es_sock.h>
1.32 +#include <comms-infras/cs_api_ext.h> //For RCommsApiExtension
1.33 +#include <comms-infras/api_ext_msg.h> //For CCommsApiExtensionMsg manipulation, used only with RCommsMobilityApiExt
1.34 +
1.35 +class RCommsMobilityApiExt : public RCommsApiExtension<EMobilityApiExt>
1.36 +/**
1.37 +Comms Mobility API extension for client not running an Active Scheduler.
1.38 +
1.39 +This class can actually be used by any client, one running an Active Scheduler
1.40 +and one that is not. However, if the Active Scheduler is present,
1.41 +it is recommended to use CActiveCommsMobilityApiExt which is much simpler.
1.42 +
1.43 +@see CActiveCommsMobilityApiExt
1.44 +
1.45 +@internalTechnology
1.46 +@released
1.47 +*/
1.48 + {
1.49 +public:
1.50 + IMPORT_C explicit RCommsMobilityApiExt();
1.51 + IMPORT_C void Close();
1.52 +
1.53 + IMPORT_C void RegisterForMobilityNotification(TDes8& aResponseEventBuf, TRequestStatus& aStatus);
1.54 + IMPORT_C void CancelMobilityNotification();
1.55 +
1.56 + IMPORT_C void MigrateToPreferredCarrier();
1.57 + IMPORT_C void IgnorePreferredCarrier();
1.58 + IMPORT_C void NewCarrierAccepted();
1.59 + IMPORT_C void NewCarrierRejected();
1.60 + };
1.61 +
1.62 +class MMobilityProtocolResp
1.63 +/**
1.64 +Comms Mobility API extension protocol.
1.65 +Used with CActiveCommsMobilityApiExt to reqister for mobility response messages.
1.66 +
1.67 +@publishedAll
1.68 +@released
1.69 +*/
1.70 + {
1.71 +public:
1.72 + virtual void PreferredCarrierAvailable(TAccessPointInfo aOldAP, TAccessPointInfo aNewAP, TBool aIsUpgrade, TBool aIsSeamless) = 0;
1.73 + virtual void NewCarrierActive(TAccessPointInfo aNewAP, TBool aIsSeamless) = 0;
1.74 + virtual void Error(TInt aError) = 0;
1.75 + };
1.76 +
1.77 +class CActiveCommsMobilityApiExt : public CActive
1.78 +/**
1.79 +Comms Mobility API extension for client running an Active Scheduler.. Whenever an Active
1.80 +Scheduler is present, this API is recommended over RCommsMobilityApiExt because of its simplicity.
1.81 +
1.82 +With few important exceptions, CActiveCommsMobilityApiExt exports very similar APIs to RCommsMobilityApiExt
1.83 +
1.84 +@see RCommsMobilityApiExt
1.85 +
1.86 +@publishedAll
1.87 +@released
1.88 +*/
1.89 + {
1.90 +public:
1.91 + IMPORT_C static CActiveCommsMobilityApiExt* NewL(RCommsSubSession& aExtensionProvider,MMobilityProtocolResp& aProtocol);
1.92 + IMPORT_C ~CActiveCommsMobilityApiExt();
1.93 +
1.94 + IMPORT_C void MigrateToPreferredCarrier();
1.95 + IMPORT_C void IgnorePreferredCarrier();
1.96 + IMPORT_C void NewCarrierAccepted();
1.97 + IMPORT_C void NewCarrierRejected();
1.98 +
1.99 +protected:
1.100 + void ConstructL(RCommsSubSession& aExtensionProvider);
1.101 + explicit CActiveCommsMobilityApiExt(MMobilityProtocolResp& aProtocol);
1.102 +
1.103 +private:
1.104 + void DoCancel();
1.105 + void RunL();
1.106 + TInt RunError(TInt aError);
1.107 +
1.108 +private:
1.109 + MMobilityProtocolResp& iProtocol;
1.110 + RCommsMobilityApiExt iExtApi;
1.111 + RBuf8 iResponseBuf;
1.112 + };
1.113 +
1.114 +#endif // CS_MOBILITY_APIEXT_H