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