|
1 // Copyright (c) 2005-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 // Reference_subconparams.h |
|
15 // Header file for the Reference (example) SubConnection Parameter Extension Set. |
|
16 // |
|
17 // |
|
18 |
|
19 /** |
|
20 @file |
|
21 @internalComponent |
|
22 */ |
|
23 |
|
24 #ifndef __REFERENCE_SUBCONPARAMS_H__ |
|
25 #define __REFERENCE_SUBCONPARAMS_H__ |
|
26 |
|
27 #include <es_sock.h> |
|
28 |
|
29 //The ECOM plugin identifier for this SubConnection parameter extension. |
|
30 //See the assisting *.rss file. |
|
31 const TInt KSubConReferenceParamsUid = 0x102738C4; |
|
32 //The sub-identifier for CSubConReferenceParamSet extension parameter set. |
|
33 const TInt KSubConReferenceParamsType = 1; |
|
34 |
|
35 |
|
36 |
|
37 class CSubConReferenceParamSet : public CSubConExtensionParameterSet |
|
38 /** |
|
39 An example/reference extension set of SubConnection Parameters. |
|
40 |
|
41 A typical client application wishing to use this extension set would |
|
42 look like this: |
|
43 ==================================================================== |
|
44 void foo() |
|
45 { |
|
46 ... |
|
47 //Instantiate a parameter bundle - a generic container for subconnection |
|
48 //parameter sets. |
|
49 RSubConParameterBundle subconnParamBundle; |
|
50 |
|
51 //Since the bundle is about to hold heap-objects, must push onto |
|
52 //the cleanup stack. |
|
53 CleanupClosePushL(subconnParams); |
|
54 |
|
55 //Instantiate a family - a subcontainer within a bundle. The subcontainer |
|
56 //should hold QoS subconnection parameter sets. |
|
57 CSubConParameterFamily* family = CSubConParameterFamily::NewL(subconnParamBundle, KSubConQoSFamily); |
|
58 |
|
59 //Specific parameter sets can be instantiated in either of the three modes (designating their semantics): |
|
60 // enum TParameterSetType |
|
61 // { |
|
62 // ERequested = 0, //parameters requested by the application |
|
63 // EAcceptable = 1,//parameters the application can accept (minimum) |
|
64 // EGranted = 2 //parameters granted by the network. |
|
65 // }; (see ES_SOCK.H) |
|
66 //Consequently the bundle would usually contain ERequested and EAcceptable (or at least ERequested) |
|
67 //parameter sets. |
|
68 |
|
69 //Instantiating the ERequested Reference Extension: |
|
70 CSubConReferenceParamSet* subConRefRequestedParSet = CSubConReferenceParamSet::NewL(*family, CSubConParameterFamily::ERequested); |
|
71 |
|
72 //Instantiating the EAccepted Reference Extension: |
|
73 CSubConExtensionParameterSet* subConRefAcceptedParSet = CSubConReferenceParamSet::NewL(*family, CSubConParameterFamily::EAccepted); |
|
74 |
|
75 //At this point subconnParamBundle holds 2 instances (ERequested and EAcceptable) of CSubConReferenceParamSet. |
|
76 |
|
77 } |
|
78 ==================================================================== |
|
79 |
|
80 @publishedAll |
|
81 @released since v9.2 |
|
82 */ |
|
83 { |
|
84 public: |
|
85 inline static CSubConReferenceParamSet* NewL(CSubConParameterFamily& aFamily, CSubConParameterFamily::TParameterSetType aType); |
|
86 inline static CSubConReferenceParamSet* NewL(); |
|
87 |
|
88 inline CSubConReferenceParamSet(); |
|
89 |
|
90 inline TInt GetDummyTIntParameter() const; |
|
91 inline const TName& GetDummyTNameParameter() const; |
|
92 inline void SetDummyTIntParameter(TInt aDummyTIntParameter); |
|
93 inline void SetDummyTNameParameter(const TName& iDummyName); |
|
94 |
|
95 protected: |
|
96 |
|
97 DATA_VTABLE |
|
98 |
|
99 protected: |
|
100 TInt iDummyTIntParameter; |
|
101 TName iDummyName; |
|
102 }; |
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 class CReferenceSubConnExtensionParamsFactory : public CBase |
|
109 /** Factory used to create instances of the Reference SubConnection Parameter Extension Sets. |
|
110 |
|
111 @internalComponent |
|
112 @released since v9.2 |
|
113 */ |
|
114 { |
|
115 public: |
|
116 static CSubConExtensionParameterSet* NewL(TAny* aConstructionParameters); |
|
117 }; |
|
118 |
|
119 #include <networking/reference_subconparams.inl> |
|
120 |
|
121 #endif // __REFERENCE_SUBCONPARAMS_H__ |