|
1 // Copyright (c) 2007-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 // UPS Server Access Point Config Extension. |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalTechnology |
|
21 */ |
|
22 |
|
23 #ifndef SYMBIAN_UPSACCESSPOINTCONFIGEXT_H |
|
24 #define SYMBIAN_UPSACCESSPOINTCONFIGEXT_H |
|
25 |
|
26 #define SYMBIAN_NETWORKING_UPS |
|
27 |
|
28 #ifdef SYMBIAN_NETWORKING_UPS |
|
29 |
|
30 #include <es_sock.h> |
|
31 |
|
32 typedef TBuf8<KMaxSockAddrSize> TUpsDestinationAddr; |
|
33 |
|
34 enum TUpsDestinationAddrType |
|
35 /** |
|
36 Type of information contained in TUpsDestinationAddr |
|
37 */ |
|
38 { |
|
39 ETNone, |
|
40 ETSockAddress |
|
41 }; |
|
42 |
|
43 class CUPSAccessPointConfigExt : public CBase, public Meta::SMetaData |
|
44 /** |
|
45 Provisioning information for UPS |
|
46 */ |
|
47 { |
|
48 public: |
|
49 enum |
|
50 { |
|
51 EUPSAccessPointConfigUid = 0x10285837, // UID of cs dll |
|
52 ETypeId = 1 |
|
53 }; |
|
54 public: |
|
55 |
|
56 inline static CUPSAccessPointConfigExt* NewL(TUpsDestinationAddrType aDestinationAddrType); |
|
57 |
|
58 inline void SetProcessId(const TProcessId& aProcessId); |
|
59 inline const TProcessId& GetProcessId() const; |
|
60 |
|
61 inline void SetThreadId(const TThreadId& aThreadId); |
|
62 inline const TThreadId& GetThreadId() const; |
|
63 |
|
64 inline void SetPolicyCheckResult(TInt aPolicyCheckResult); |
|
65 inline TInt GetPolicyCheckResult() const; |
|
66 |
|
67 inline const TUpsDestinationAddr& GetDestinationAddr() const; |
|
68 inline void SetDestinationAddr(const TUpsDestinationAddr& aDestinationAddr); |
|
69 inline void ResetDestinationAddr(); |
|
70 |
|
71 inline TUpsDestinationAddrType GetDestinationAddrType() const; |
|
72 inline void SetDestinationAddrType(TUpsDestinationAddrType aDestinationAddrType); |
|
73 |
|
74 inline void SetServiceId(TInt aServiceId); |
|
75 inline TUid GetServiceId() const; |
|
76 inline virtual ~CUPSAccessPointConfigExt(); |
|
77 |
|
78 protected: |
|
79 inline CUPSAccessPointConfigExt(TUpsDestinationAddrType aDestinationAddrType); |
|
80 |
|
81 private: |
|
82 TProcessId iProcessId; |
|
83 TThreadId iThreadId; |
|
84 TInt iPolicyCheckResult; // result of platsec check |
|
85 TUpsDestinationAddrType iDestinationAddrType; // format of destination address |
|
86 TUpsDestinationAddr iDestinationAddr; // destination address |
|
87 TUid iServiceId; // Implementation Id of Tier Manager |
|
88 |
|
89 public: |
|
90 EXPORT_DATA_VTABLE_AND_FN |
|
91 }; |
|
92 |
|
93 // |
|
94 |
|
95 CUPSAccessPointConfigExt::CUPSAccessPointConfigExt(TUpsDestinationAddrType aDestinationAddrType) |
|
96 : iDestinationAddrType(aDestinationAddrType) |
|
97 { } |
|
98 |
|
99 CUPSAccessPointConfigExt::~CUPSAccessPointConfigExt() |
|
100 { } |
|
101 |
|
102 CUPSAccessPointConfigExt* CUPSAccessPointConfigExt::NewL(TUpsDestinationAddrType aDestinationAddrType) |
|
103 { return new (ELeave) CUPSAccessPointConfigExt(aDestinationAddrType); } |
|
104 |
|
105 void CUPSAccessPointConfigExt::SetProcessId(const TProcessId& aProcessId) |
|
106 { iProcessId = aProcessId; } |
|
107 |
|
108 const TProcessId& CUPSAccessPointConfigExt::GetProcessId() const |
|
109 { return iProcessId; } |
|
110 |
|
111 void CUPSAccessPointConfigExt::SetThreadId(const TThreadId& aThreadId) |
|
112 { iThreadId = aThreadId; } |
|
113 |
|
114 const TThreadId& CUPSAccessPointConfigExt::GetThreadId() const |
|
115 { return iThreadId; } |
|
116 |
|
117 void CUPSAccessPointConfigExt::SetPolicyCheckResult(TInt aPolicyCheckResult) |
|
118 { iPolicyCheckResult = aPolicyCheckResult; } |
|
119 |
|
120 TInt CUPSAccessPointConfigExt::GetPolicyCheckResult() const |
|
121 { return iPolicyCheckResult; } |
|
122 |
|
123 const TUpsDestinationAddr& CUPSAccessPointConfigExt::GetDestinationAddr() const |
|
124 { return iDestinationAddr; } |
|
125 |
|
126 void CUPSAccessPointConfigExt::SetDestinationAddr(const TUpsDestinationAddr& aDestinationAddr) |
|
127 { iDestinationAddr = aDestinationAddr; } |
|
128 |
|
129 TUpsDestinationAddrType CUPSAccessPointConfigExt::GetDestinationAddrType() const |
|
130 { return iDestinationAddrType; } |
|
131 |
|
132 void CUPSAccessPointConfigExt::SetDestinationAddrType(TUpsDestinationAddrType aDestinationAddrType) |
|
133 { iDestinationAddrType = aDestinationAddrType; } |
|
134 |
|
135 void CUPSAccessPointConfigExt::ResetDestinationAddr() |
|
136 { iDestinationAddr.SetLength(0); } |
|
137 |
|
138 void CUPSAccessPointConfigExt::SetServiceId(TInt aServiceId) |
|
139 { iServiceId.iUid = aServiceId; } |
|
140 |
|
141 TUid CUPSAccessPointConfigExt::GetServiceId() const |
|
142 { return iServiceId; } |
|
143 #endif // SYMBIAN_NETWORKING_UPS |
|
144 |
|
145 #endif // SYMBIAN_UPSACCESSPOINTCONFIGEXT_H |
|
146 |