|
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 // @file sblpextn.h |
|
15 // Header file for Service Based Local Policy support (SBLP) for QoS API |
|
16 // @internalTechnology |
|
17 // @prototype |
|
18 // |
|
19 |
|
20 |
|
21 #ifndef __SBLPEXTN_H__ |
|
22 #define __SBLPEXTN_H__ |
|
23 |
|
24 #include <e32std.h> |
|
25 #include <in_sock.h> |
|
26 #include <es_mbuf.h> |
|
27 #include <networking/qos_extension.h> |
|
28 |
|
29 |
|
30 const TUint KAuthorizationTokenSize = 255; |
|
31 |
|
32 typedef TBuf8<KAuthorizationTokenSize> TAuthorizationToken; |
|
33 class CSblpParameters : public CBase |
|
34 { |
|
35 public: |
|
36 struct TFlowIdentifier |
|
37 { |
|
38 TUint16 iMediaComponentNumber; |
|
39 TUint16 iIPFlowNumber; |
|
40 }; |
|
41 |
|
42 IMPORT_C CSblpParameters(); |
|
43 IMPORT_C virtual ~CSblpParameters(); |
|
44 IMPORT_C TInt GetMAT (TAuthorizationToken & aAuthToken) const; |
|
45 IMPORT_C void SetMAT (const TAuthorizationToken & aAuthToken); |
|
46 IMPORT_C TFlowIdentifier& GetFlowId(TInt aIndex); |
|
47 IMPORT_C TInt GetFlowIds(RArray<TFlowIdentifier>& aFlowIds); |
|
48 IMPORT_C void SetFlowIds(const RArray<TFlowIdentifier> &aFlowIds); |
|
49 IMPORT_C TInt NrOfFlowIds(); |
|
50 IMPORT_C CSblpParameters& operator= (const CSblpParameters& f); |
|
51 |
|
52 protected: |
|
53 TAuthorizationToken iAuthorizationToken; |
|
54 RArray<TFlowIdentifier> iFlowIds; |
|
55 }; |
|
56 |
|
57 class CSblpPolicy : public CExtensionBase |
|
58 { |
|
59 |
|
60 public: |
|
61 IMPORT_C static CSblpPolicy* NewL(); |
|
62 IMPORT_C virtual ~CSblpPolicy(); |
|
63 IMPORT_C TDesC8& Data(); |
|
64 IMPORT_C TInt ParseMessage(const TDesC8& aData); |
|
65 IMPORT_C CExtensionBase* CreateL(); |
|
66 IMPORT_C TInt Copy(const CExtensionBase& aExtension); |
|
67 IMPORT_C void SetSblpParameters(const CSblpParameters& aSblp); |
|
68 IMPORT_C void GetSblpParameters(CSblpParameters& aSblp) const; |
|
69 |
|
70 protected: |
|
71 CSblpPolicy(); |
|
72 void ConstructL(); |
|
73 |
|
74 private: |
|
75 CSblpParameters* iSblp; // SBLP QoS parameter set |
|
76 }; |
|
77 |
|
78 #endif // __SBLPEXTN_H__ |