|
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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef SS_NODEINTERFACES_H |
|
23 #define SS_NODEINTERFACES_H |
|
24 |
|
25 #include <elements/nm_interfaces.h> |
|
26 |
|
27 namespace ESock |
|
28 { |
|
29 |
|
30 class TCFClientType : public Messages::TClientType |
|
31 { |
|
32 public: |
|
33 enum TType |
|
34 { |
|
35 //-============================================= |
|
36 // |
|
37 // 1. Types 32bits (a client can only have one type) |
|
38 // |
|
39 // TClientType = BIT0..BIT7 |
|
40 //-============================================= |
|
41 |
|
42 EData = 0x00000100, // data client (node to left, 0..*) |
|
43 ECtrl = 0x00000200, // control client (node above, 0..*) |
|
44 EServProvider = 0x00000400, // service provider (node below, 0..*) |
|
45 ECtrlProvider = 0x00000800, // control provider (node to right, 0..1) |
|
46 EAux = 0x00001000, // auxiliary client. The framework will consider the presence of |
|
47 // these when determining the holder's state: auxialiary clients |
|
48 // render the holder not idle. It is ok for auxiliary clients |
|
49 // to be TNodeId::NullCommsId(). |
|
50 EFactoryContainer = 0x00002000, // a factory container as a client of central object broker |
|
51 }; |
|
52 |
|
53 enum TFlags |
|
54 { |
|
55 //-============================================= |
|
56 // |
|
57 // 2. Flags 32bits (a client can have many flags) |
|
58 // (two sub-sections) |
|
59 // |
|
60 // TClientType = BIT0..BIT7 |
|
61 //-============================================= |
|
62 |
|
63 //------------------- |
|
64 // 2.1. Type extensions (subtypes) |
|
65 //------------------- |
|
66 /** |
|
67 @publishedPartner |
|
68 @released since 9.5 |
|
69 */ |
|
70 EMonitor = 0x80000000, |
|
71 EDefault = 0x40000000,//for default sub-connection |
|
72 EAttach = 0x20000000,// used by NetUPS to check if a JoinRequest comes from an RConnection::Attach |
|
73 |
|
74 /** |
|
75 This flag is internal and not to be used by partner. |
|
76 Indicates that a client is a configuration access point |
|
77 i.e. it should be started after other access points on the layer |
|
78 and should be stopped before other access points on the layer |
|
79 |
|
80 @internalComponent |
|
81 */ |
|
82 EConfigAccessPoint = 0x10000000, |
|
83 |
|
84 //------------------- |
|
85 // 2.2. State Information |
|
86 //------------------- |
|
87 /** |
|
88 @publishedPartner |
|
89 @released since 9.5 |
|
90 */ |
|
91 EJoining = 0x00000100,//The client has been prepared to be added and awaiting TApply to be formally joined. |
|
92 EActivating = 0x00000200,//Given away at least one handle to this client and awaiting response(s). |
|
93 EActive = 0x00000400,//Given away handle to this client and got a response, i.e.: assuming somebody bound to the client until |
|
94 //the client reports idle. (cleared by TDataClientIdle). |
|
95 EStarting = 0x00000800,// |
|
96 EStarted = 0x00001000,//The client has sent TStarted (cleared by TStopped). |
|
97 |
|
98 /** |
|
99 Internal, not to be used by partners |
|
100 |
|
101 @internalComponent |
|
102 */ |
|
103 EAvailabilityProvider = 0x00004000, |
|
104 }; |
|
105 |
|
106 public: |
|
107 TCFClientType() |
|
108 : Messages::TClientType(EUnknown) |
|
109 { |
|
110 } |
|
111 |
|
112 TCFClientType(TUint32 aClientType, TUint32 aClientFlags = 0) |
|
113 : Messages::TClientType(aClientType, aClientFlags) |
|
114 { |
|
115 } |
|
116 |
|
117 TUint IsMonitor() const |
|
118 { |
|
119 return iClientFlags & EMonitor; |
|
120 } |
|
121 }; |
|
122 |
|
123 |
|
124 // |
|
125 //RNodeInterface |
|
126 class RCFNodePriorityInterface : public Messages::RNodeInterface |
|
127 { |
|
128 public: |
|
129 RCFNodePriorityInterface(TUint aPriority) |
|
130 : iPriority(aPriority) |
|
131 { |
|
132 } |
|
133 |
|
134 void SetPriority(TUint aPriority) |
|
135 { |
|
136 iPriority = aPriority; |
|
137 } |
|
138 |
|
139 TUint Priority() const |
|
140 { |
|
141 return iPriority; |
|
142 } |
|
143 protected: |
|
144 TUint iPriority; |
|
145 }; |
|
146 |
|
147 } //namespace ESock |
|
148 |
|
149 #endif |
|
150 // SS_NODEINTERFACES_H |
|
151 |
|
152 |