Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
1 // Copyright (c) 1999-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 #define KUidCustomCrossCheckValue 0x80282748
29 const TUid KUidCustomCrossCheck={KUidCustomCrossCheckValue};
32 /** Identifies an application view using two unique identifiers (UIDs): a view
33 UID and an application UID.
35 The application UID is required so that the application associated with the view
36 can be started if it is not already running.
43 inline TVwsViewId(const TVwsViewId& aUid);
44 inline TVwsViewId(TUid aAppUid,TUid aViewUid);
45 inline TBool operator==(const TVwsViewId& aUid) const;
46 inline TBool operator!=(const TVwsViewId& aUid) const;
48 /** A unique application ID (or application UID).
50 Uniquely identifies the application associated with the view. */
52 /** A unique view ID (or view UID).
54 Uniquely identifies the view. */
58 /** @internalTechnology */
59 #define KNullViewId TVwsViewId(KNullUid,KNullUid)
61 /** @internalTechnology */
62 const TInt KErrViewWrongMode=1; // !!! Wrong error code - should be -ve & unique
65 class TVwsViewIdAndMessage
67 The TVwsViewIdAndMessage class identifies a view and encapsulates a message to
68 be read by the view when it is activated.
75 inline TVwsViewIdAndMessage();
76 inline TVwsViewIdAndMessage(const TVwsViewId& aId);
77 inline TVwsViewIdAndMessage(const TVwsViewId& aId,TUid aCustomMessageId,const TDesC8& aCustomMessage);
78 inline TVwsViewIdAndMessage& operator=(const TVwsViewIdAndMessage& aVwsViewIdAndMessage);
81 TUid iCustomMessageId;
82 TInt iCustomMessageLength;
83 TPtrC8 iCustomMessage;
90 The TVwsViewEvent class encapsulates the attributes of a view server event.
93 - The view ids of the two views associated with the event
94 - The attributes of any message which can go with the event.
101 enum TVwsViewEventType
105 EVwsScreenDeviceChanged,
106 EVwsDeactivationNotification,
107 EVwsActivationNotification,
108 EVwsDeactivateViewDifferentInstance
111 inline TVwsViewEvent();
112 inline TVwsViewEvent(TVwsViewEventType aEventType);
113 inline TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId);
114 inline TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId,const TVwsViewId& aViewTwoId);
115 inline TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId,const TVwsViewId& aViewTwoId,TUid aCustomMessageId,TInt aCustomMessageLength);
120 TVwsViewEventType iEventType;
122 The first view id associated with the event. This has a different meaning for each of the event types:
123 - For ActivateView events, it is the view to activate
124 - For DeactivateView events, it is the view to deactivate
125 - For ScreenDeviceChange events, it is the id of the currently active view
126 - For ActivationNotification events, it is the id of the activated view
127 - For DeactivationNotification events, it is the id of the deactivated view
129 TVwsViewId iViewOneId;
131 The second view id associated with the event. This has a different meaning for each of the event types:
132 - For ActivateView events, it is the view that will be deactivated
133 - For DeactivateView events, it is the view that has been activated
134 - For ScreenDeviceChange events, it is unused
135 - For ActivationNotification events, it is the view that will be deactivated
136 - For DeactivationNotification events, it is the id of the view that has been activated
138 TVwsViewId iViewTwoId;
140 The type of message being passed in the custom message buffer
142 TUid iCustomMessageId;
144 The length of the custom message being held by the server.
145 To retrieve the message itself from the server, a buffer of this length must be allocated
147 TInt iCustomMessageLength;
154 /** @internalComponent */
155 typedef TPckgBuf<TVwsViewIdAndMessage> TVwsViewIdAndMessageBuf;
157 /** @internalComponent */
158 typedef TPckgBuf<TVwsViewEvent> TVwsViewEventBuf;
165 inline TVwsViewId::TVwsViewId()
166 /** Constructs a TVwsViewId object, and initialises both the application UID and
167 the view UID to NULL. */
168 : iAppUid(KNullUid), iViewUid(KNullUid) {}
170 inline TVwsViewId::TVwsViewId(const TVwsViewId& aUid)
171 /** Constructs a new TVwsViewId object from an existing one. This simply performs
172 a member-wise copy, each member variable of the passed in object is individually
173 copied to the corresponding member variable of the new object.
175 @param aUid A reference to the TVwsViewId object to be copied. */
176 : iAppUid(aUid.iAppUid), iViewUid(aUid.iViewUid) {}
178 inline TVwsViewId::TVwsViewId(TUid aAppUid,TUid aViewUid)
179 /** Constructs a TVwsViewId object with the specified application UID and view UID.
181 @param aAppUid The application UID.
182 @param aViewUid The view UID. */
183 : iAppUid(aAppUid), iViewUid(aViewUid) {}
185 inline TBool TVwsViewId::operator==(const TVwsViewId& aUid) const
186 /** Checks whether the TVwsViewId object being operated upon and the TVwsViewId
187 object specified are the same.
189 Returns true if both application UIDs and both view UIDs are the same, otherwise
192 @param aUid A reference to a TVwsViewId object.
193 @return ETrue if objects are the same, EFalse otherwise. */
195 return (aUid.iAppUid==iAppUid && aUid.iViewUid==iViewUid);
198 inline TBool TVwsViewId::operator!=(const TVwsViewId& aUid) const
199 /** Checks whether the TVwsViewId object being operated upon and the TVwsViewId
200 object specified are different.
202 Returns true if either the application UIDs or view UIDs are different, otherwise
205 @param aUid A reference to a TVwsViewId object.
206 @return ETrue if objects are different, EFalse otherwise. */
208 return (aUid.iAppUid!=iAppUid || aUid.iViewUid!=iViewUid);
212 /** Constructs a TVwsViewIdAndMessage object, and initialises it to contain a
213 NULL view UID and an empty message */
214 inline TVwsViewIdAndMessage::TVwsViewIdAndMessage()
215 : iViewId(TVwsViewId()), iCustomMessageLength(0)
217 iCustomMessageId.iUid=0;
218 iCustomMessage.Set(KNullDesC8);
221 /** Constructs a TVwsViewIdAndMessage object, and initialises it to contain the
222 specified view UID and an empty message
224 @param aId A reference to the TVwsViewId to be used
226 inline TVwsViewIdAndMessage::TVwsViewIdAndMessage(const TVwsViewId& aId)
227 : iViewId(aId), iCustomMessageLength(0)
229 iCustomMessageId.iUid=0;
230 iCustomMessage.Set(KNullDesC8);
233 /** Constructs a TVwsViewIdAndMessage object, and initialises it to contain the
234 specified view UID and the specified message
236 @param aId A reference to the TVwsViewId to be used
237 @param aCustomMessageId The message Id to use
238 @param aCustomMessage A narrow descriptor containing the message
240 inline TVwsViewIdAndMessage::TVwsViewIdAndMessage(const TVwsViewId& aId,TUid aCustomMessageId,const TDesC8& aCustomMessage)
241 : iViewId(aId), iCustomMessageId(aCustomMessageId)
243 iCustomMessageLength=aCustomMessage.Length();
244 iCustomMessage.Set(aCustomMessage);
247 /** Copies the contents of another TVwsViewIdAndMessage into this one
249 @param aVwsViewIdAndMessage A reference to the TVwsViewIdAndMessage to be copied
251 @return A reference to the object being copied into
253 inline TVwsViewIdAndMessage& TVwsViewIdAndMessage::operator=(const TVwsViewIdAndMessage& aVwsViewIdAndMessage)
255 iViewId=aVwsViewIdAndMessage.iViewId;
256 iCustomMessageId=aVwsViewIdAndMessage.iCustomMessageId;
257 iCustomMessageLength=aVwsViewIdAndMessage.iCustomMessage.Length();
258 iCustomMessage.Set(aVwsViewIdAndMessage.iCustomMessage);
262 inline TVwsViewEvent::TVwsViewEvent() {}
264 inline TVwsViewEvent::TVwsViewEvent(TVwsViewEventType aEventType)
265 : iEventType(aEventType),iViewOneId(),iViewTwoId(),iCustomMessageId(KNullUid),iCustomMessageLength(0) {}
267 inline TVwsViewEvent::TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId)
268 : iEventType(aEventType),iViewOneId(aViewOneId),iViewTwoId(),iCustomMessageId(KNullUid),iCustomMessageLength(0) {}
270 inline TVwsViewEvent::TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId,const TVwsViewId& aViewTwoId)
271 : iEventType(aEventType),iViewOneId(aViewOneId),iViewTwoId(aViewTwoId),iCustomMessageId(KNullUid),iCustomMessageLength(0) {}
273 inline TVwsViewEvent::TVwsViewEvent(TVwsViewEventType aEventType,const TVwsViewId& aViewOneId,const TVwsViewId& aViewTwoId,TUid aCustomMessageId,TInt aCustomMessageLength)
274 : iEventType(aEventType),iViewOneId(aViewOneId),iViewTwoId(aViewTwoId),iCustomMessageId(aCustomMessageId),iCustomMessageLength(aCustomMessageLength) {}