|
1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalAll |
|
19 */ |
|
20 |
|
21 #ifndef __GPRSQOS_H |
|
22 #define __GPRSQOS_H |
|
23 |
|
24 #include <etelqos.h> |
|
25 #include "Gprscontext.h" |
|
26 |
|
27 class CATGprsSetQoSProfile; |
|
28 class CATGprsGetQoSProfile; |
|
29 class CATIO; |
|
30 class CATInit; |
|
31 class CPhoneGlobals; |
|
32 |
|
33 |
|
34 class CATGprsSetProfile; |
|
35 class CATGprsGetProfile; |
|
36 class CATGprsGetCapsProflie; |
|
37 class CGprsQoS :public CSubSessionExtBase |
|
38 /** |
|
39 This class implements the RPacketQoS API. |
|
40 CGprsQoS inherits from CSubSessionExtBase. |
|
41 @internalComponent |
|
42 */ |
|
43 { |
|
44 public: |
|
45 static CGprsQoS* NewL(CGprsContext* aParent, TInt iCid, CATIO* aIo, CATInit* aInit, CPhoneGlobals* aPhoneGlobals, TDes& aName); |
|
46 |
|
47 virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage& aPackage); |
|
48 virtual TReqMode ReqModeL(const TInt aIpc); |
|
49 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
50 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
51 virtual TInt CancelService(const TInt aIpc, const TTsyReqHandle aTsyReqHandle); |
|
52 virtual void Init(); |
|
53 virtual TInt RegisterNotification(const TInt aIpc); |
|
54 virtual TInt DeregisterNotification(const TInt aIpc); |
|
55 virtual TInt NumberOfSlotsL(const TInt aIpc); |
|
56 |
|
57 RPacketQoS::TQoSGPRSRequested* GetReqQoSProfile(); |
|
58 void SetReqQoSProfile(const RPacketQoS::TQoSGPRSRequested* aQoSRequested); |
|
59 void SetNegQoSProfile(const RPacketQoS::TQoSGPRSNegotiated* aQoSNegotiated); |
|
60 |
|
61 inline CGprsContext* Parent(){return iParent;}; |
|
62 TDes* GetProfileName(); |
|
63 |
|
64 protected: |
|
65 void ConstructL(TDes& aName); |
|
66 CGprsQoS(CGprsContext* aParent, TInt iCid, CATIO* iIo, CATInit* iInit, CPhoneGlobals* iPhoneGlobals); |
|
67 virtual ~CGprsQoS(); |
|
68 |
|
69 private: |
|
70 TInt SetProfile(const TTsyReqHandle aTsyReqHandle,const TDesC8* aReqProfile); |
|
71 TInt SetProfileCancel(const TTsyReqHandle aTsyReqHandle); |
|
72 TInt GetProfile(const TTsyReqHandle aTsyReqHandle,TDes8* aNegProfile); |
|
73 TInt GetProfileCancel(const TTsyReqHandle aTsyReqHandle); |
|
74 TInt NotifyProfileChanged(const TTsyReqHandle aTsyReqHandle, TDes8* aNegProfile); |
|
75 TInt NotifyProfileChangedCancel(const TTsyReqHandle aTsyReqHandle); |
|
76 TInt GetProfileCaps(const TTsyReqHandle aTsyReqHandle, TDes8* aCapsProfile); |
|
77 TInt GetProfileCapsCancel(const TTsyReqHandle aTsyReqHandle); |
|
78 private: |
|
79 TBool ShouldNotProcessIpcCall(TInt aIpc); |
|
80 TBool ShouldNotProcessIpcCallWhenComportIsLoaned(TInt aIpc); |
|
81 private: |
|
82 TName iQoSName; |
|
83 TInt iCid; // context id relating the QoS profile to the context id. |
|
84 CATGprsSetProfile* iATGprsSetProfile; //< Pointer to context activation AT command object. |
|
85 CATGprsGetProfile* iATGprsGetProfile; //< Pointer to context deactivation AT command object. |
|
86 CATGprsGetCapsProflie* iATGprsGetCapsProfile; //< Pointer to context configuration AT command object. |
|
87 CGprsContext* iParent; //< Pointer to parent. |
|
88 CATIO* iIo; //< Pointer to lowever layer (C32) communication object. |
|
89 CATInit* iInit; //< Pointer to AT phone init. |
|
90 CPhoneGlobals* iPhoneGlobals; //< Pointer to global wide phone states. |
|
91 RPacketQoS::TQoSGPRSRequested iQoSRequested; |
|
92 RPacketQoS::TQoSGPRSNegotiated iQoSNegotiated; |
|
93 }; |
|
94 |
|
95 #endif |