os/kernelhwsrv/kernel/eka/include/e32std.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kernel/eka/include/e32std.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,5273 @@
     1.4 +// Copyright (c) 1994-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +// e32\include\e32std.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#ifndef __E32STD_H__
    1.22 +#define __E32STD_H__
    1.23 +
    1.24 +#ifdef __KERNEL_MODE__
    1.25 +#error !! Including e32std.h in kernel code !!
    1.26 +#endif
    1.27 +
    1.28 +#include <e32cmn.h>
    1.29 +
    1.30 +/**
    1.31 +@publishedAll
    1.32 +@released
    1.33 +*/
    1.34 +class TFunctor
    1.35 +	{
    1.36 +public:
    1.37 +	IMPORT_C virtual void operator()() =0;
    1.38 +	};
    1.39 +
    1.40 +/**
    1.41 +@publishedAll
    1.42 +@released
    1.43 +
    1.44 +Encapsulates a general call-back function.
    1.45 +
    1.46 +The class encapsulates:
    1.47 +
    1.48 +1. a pointer to a function which takes an argument of type TAny* and returns 
    1.49 +   a TInt.
    1.50 +
    1.51 +2. a pointer which is passed to the function every time it is called.
    1.52 +   The pointer can point to any object. It can also be NULL.
    1.53 +
    1.54 +The callback function can be a static function of a class,
    1.55 +e.g. TInt X::Foo(TAny *) or it can be a function which is not a member of
    1.56 +any class, e.g. TInt Foo(TAny *).
    1.57 +
    1.58 +When used with the CIdle and the CPeriodic classes, the callback function
    1.59 +is intended to be called repeatedly; the encapsulated pointer is passed on
    1.60 +each call. Typically, the pointer refers to an object which records the state
    1.61 +of the task across each call. When used with CIdle, the callback function
    1.62 +should also return a true (non-zero) value if it is intended to be called
    1.63 +again, otherwise it should return a false (zero) value.
    1.64 +
    1.65 +@see CIdle
    1.66 +@see CPeriodic
    1.67 +*/
    1.68 +class TCallBack
    1.69 +	{
    1.70 +public:
    1.71 +	inline TCallBack();
    1.72 +	inline TCallBack(TInt (*aFunction)(TAny* aPtr));
    1.73 +	inline TCallBack(TInt (*aFunction)(TAny* aPtr),TAny* aPtr);
    1.74 +	inline TInt CallBack() const;
    1.75 +public:
    1.76 +	
    1.77 +	/**
    1.78 +	A pointer to the callback function.
    1.79 +	*/
    1.80 +	TInt (*iFunction)(TAny* aPtr);
    1.81 +	
    1.82 +	
    1.83 +	/**
    1.84 +	A pointer that is passed to the callback function when
    1.85 +	the function is called.
    1.86 +	*/
    1.87 +	TAny* iPtr;
    1.88 +	};
    1.89 +
    1.90 +
    1.91 +
    1.92 +
    1.93 +/**
    1.94 +@publishedAll
    1.95 +@released
    1.96 +
    1.97 +An object embedded within a class T so that objects of type T can form part 
    1.98 +of a singly linked list.
    1.99 +
   1.100 +A link object encapsulates a pointer to the next link object in the list.
   1.101 +
   1.102 +@see TSglQue
   1.103 +*/
   1.104 +class TSglQueLink
   1.105 +	{
   1.106 +#if defined _DEBUG
   1.107 +public:
   1.108 +	inline TSglQueLink() : iNext(NULL)
   1.109 +	/**
   1.110 +	An explicitly coded default constructor that is only defined for DEBUG builds.
   1.111 +	
   1.112 +	It sets the pointer to the next link object to NULL.
   1.113 +	
   1.114 +	@see iNext
   1.115 +	*/
   1.116 +	{}
   1.117 +#endif
   1.118 +private:
   1.119 +	IMPORT_C void Enque(TSglQueLink* aLink);
   1.120 +public:
   1.121 +	/**
   1.122 +	A pointer to the next link object in the list.
   1.123 +	*/
   1.124 +	TSglQueLink* iNext;
   1.125 +	friend class TSglQueBase;
   1.126 +	};
   1.127 +
   1.128 +
   1.129 +
   1.130 +
   1.131 +/**
   1.132 +@publishedAll
   1.133 +@released
   1.134 +
   1.135 +A base class that provides implementation for the link object of a doubly
   1.136 +linked list.
   1.137 +
   1.138 +It also encapsulates pointers both to the next and the previous link 
   1.139 +objects in the doubly linked list.
   1.140 +
   1.141 +The class is abstract and is not intended to be instantiated.
   1.142 +
   1.143 +@see TDblQueLink
   1.144 +*/
   1.145 +class TDblQueLinkBase
   1.146 +	{
   1.147 +public:
   1.148 +	inline TDblQueLinkBase() : iNext(NULL)
   1.149 +	/**
   1.150 +	Default constructor.
   1.151 +	
   1.152 +	It sets the pointer to the next link object to NULL.
   1.153 +	
   1.154 +	@see iNext
   1.155 +	*/
   1.156 +	{}
   1.157 +	IMPORT_C void Enque(TDblQueLinkBase* aLink);
   1.158 +	IMPORT_C void AddBefore(TDblQueLinkBase* aLink);
   1.159 +public:
   1.160 +	/**
   1.161 +	A pointer to the next link object in the list.
   1.162 +	*/
   1.163 +	TDblQueLinkBase* iNext;
   1.164 +	
   1.165 +	/**
   1.166 +	A pointer to the previous link object in the list.
   1.167 +	*/
   1.168 +	TDblQueLinkBase* iPrev;
   1.169 +	};
   1.170 +
   1.171 +
   1.172 +
   1.173 +
   1.174 +/**
   1.175 +@publishedAll
   1.176 +@released
   1.177 +
   1.178 +An object embedded within a class T so that objects of type T can form part 
   1.179 +of a doubly linked list.
   1.180 +*/
   1.181 +class TDblQueLink : public TDblQueLinkBase
   1.182 +	{
   1.183 +public:
   1.184 +	IMPORT_C void Deque();
   1.185 +	};
   1.186 +
   1.187 +
   1.188 +
   1.189 +
   1.190 +/**
   1.191 +@publishedAll
   1.192 +@released
   1.193 +
   1.194 +An object embedded within a class T so that objects of type T can form part
   1.195 +of an ordered doubly linked list.
   1.196 +
   1.197 +Objects are added to the doubly linked list in descending priority order.
   1.198 +*/
   1.199 +class TPriQueLink : public TDblQueLink
   1.200 +	{
   1.201 +public:
   1.202 +	/**
   1.203 +	The priority value.
   1.204 +
   1.205 +    Objects are added to the doubly linked list in descending order of this value.
   1.206 +	*/
   1.207 +	TInt iPriority;
   1.208 +	};
   1.209 +
   1.210 +
   1.211 +
   1.212 +
   1.213 +/**
   1.214 +@publishedAll
   1.215 +@released
   1.216 +
   1.217 +An object embedded within a class T so that objects of type T can form part 
   1.218 +of a delta doubly linked list.
   1.219 +*/
   1.220 +class TDeltaQueLink : public TDblQueLinkBase
   1.221 +	{
   1.222 +public:
   1.223 +	/**
   1.224 +	The delta value.
   1.225 +	*/
   1.226 +	TInt iDelta;
   1.227 +	};
   1.228 +
   1.229 +
   1.230 +
   1.231 +
   1.232 +/**
   1.233 +@publishedAll
   1.234 +@released
   1.235 +
   1.236 +An object embedded within a class T so that objects of type T can form part 
   1.237 +of a doubly linked list sorted by tick count.
   1.238 +*/
   1.239 +class TTickCountQueLink : public TDblQueLink
   1.240 +	{
   1.241 +public:
   1.242 +	/**
   1.243 +	The tick count.
   1.244 +	*/
   1.245 +	TUint iTickCount;
   1.246 +	};
   1.247 +
   1.248 +
   1.249 +
   1.250 +
   1.251 +/**
   1.252 +@publishedAll
   1.253 +@released
   1.254 +
   1.255 +A base class that provides implementation for the singly linked list header. 
   1.256 +
   1.257 +It also encapsulates the offset value of a link object.
   1.258 +
   1.259 +The class is abstract and is not intended to be instantiated.
   1.260 +
   1.261 +@see TSglQue
   1.262 +*/
   1.263 +class TSglQueBase
   1.264 +	{
   1.265 +public:
   1.266 +	IMPORT_C TBool IsEmpty() const;
   1.267 +	IMPORT_C void SetOffset(TInt aOffset);
   1.268 +	IMPORT_C void Reset();
   1.269 +protected:
   1.270 +	IMPORT_C TSglQueBase();
   1.271 +	IMPORT_C TSglQueBase(TInt aOffset);
   1.272 +	IMPORT_C void DoAddFirst(TAny* aPtr);
   1.273 +	IMPORT_C void DoAddLast(TAny* aPtr);
   1.274 +	IMPORT_C void DoRemove(TAny* aPtr);
   1.275 +protected:
   1.276 +	/**
   1.277 +	A pointer to the first element in the list.
   1.278 +	*/
   1.279 +	TSglQueLink* iHead;
   1.280 +	
   1.281 +	/**
   1.282 +	A pointer to the last element in the list.
   1.283 +	*/
   1.284 +	TSglQueLink* iLast;
   1.285 +	
   1.286 +	/**
   1.287 +	The offset of a component link object within elements that form the list.
   1.288 +	*/
   1.289 +	TInt iOffset;
   1.290 +private:
   1.291 +	TSglQueBase(const TSglQueBase& aQue);
   1.292 +	TSglQueBase &operator=(const TSglQueBase& aQue);
   1.293 +	friend class TSglQueIterBase;
   1.294 +	};
   1.295 +
   1.296 +
   1.297 +
   1.298 +
   1.299 +/**
   1.300 +@publishedAll
   1.301 +@released
   1.302 +
   1.303 +A base class that provides implementation for the doubly linked list header. 
   1.304 +
   1.305 +It also encapsulates the offset value of a link object.
   1.306 +
   1.307 +The class is abstract and is not intended to be instantiated.
   1.308 +
   1.309 +@see TDblQue
   1.310 +*/
   1.311 +class TDblQueBase
   1.312 +	{
   1.313 +public:
   1.314 +	IMPORT_C TBool IsEmpty() const;
   1.315 +	IMPORT_C void SetOffset(TInt aOffset);
   1.316 +	IMPORT_C void Reset();
   1.317 +protected:
   1.318 +	IMPORT_C TDblQueBase();
   1.319 +	IMPORT_C TDblQueBase(TInt aOffset);
   1.320 +	IMPORT_C void DoAddFirst(TAny* aPtr);
   1.321 +	IMPORT_C void DoAddLast(TAny* aPtr);
   1.322 +	IMPORT_C void DoAddPriority(TAny* aPtr);
   1.323 +	IMPORT_C void __DbgTestEmpty() const;
   1.324 +protected:
   1.325 +	/**
   1.326 +	The head, or anchor point of the queue.
   1.327 +	*/
   1.328 +	TDblQueLink iHead;
   1.329 +	
   1.330 +	/**
   1.331 +	The offset of a component link object within elements that form the list.
   1.332 +	*/
   1.333 +	TInt iOffset;
   1.334 +private:
   1.335 +	TDblQueBase(const TDblQueBase& aQue);
   1.336 +	TDblQueBase& operator=(const TDblQueBase& aQue);
   1.337 +	friend class TDblQueIterBase;
   1.338 +	};
   1.339 +
   1.340 +
   1.341 +
   1.342 +
   1.343 +/**
   1.344 +@publishedAll
   1.345 +@released
   1.346 +
   1.347 +A base class that provides implementation for the TDeltaQue template class.
   1.348 +
   1.349 +The class is abstract and is not intended to be instantiated.
   1.350 +
   1.351 +@see TDeltaQue
   1.352 +*/
   1.353 +class TDeltaQueBase : public TDblQueBase
   1.354 +	{
   1.355 +public:
   1.356 +	IMPORT_C TBool CountDown();
   1.357 +	IMPORT_C TBool CountDown(TInt aValue);
   1.358 +	IMPORT_C TBool FirstDelta(TInt& aValue);
   1.359 +	IMPORT_C void Reset();
   1.360 +protected:
   1.361 +	IMPORT_C TDeltaQueBase();
   1.362 +	IMPORT_C TDeltaQueBase(TInt aOffset);
   1.363 +	IMPORT_C void DoAddDelta(TAny* aPtr,TInt aDelta);
   1.364 +	IMPORT_C void DoRemove(TAny* aPtr);
   1.365 +	IMPORT_C TAny* DoRemoveFirst();
   1.366 +protected:
   1.367 +	/**
   1.368 +	Pointer to the delta value in the first link element.
   1.369 +	*/
   1.370 +	TInt* iFirstDelta;
   1.371 +	};
   1.372 +
   1.373 +
   1.374 +
   1.375 +
   1.376 +/**
   1.377 +@publishedAll
   1.378 +@released
   1.379 +
   1.380 +A templated class that provides the behaviour for managing a singly linked 
   1.381 +list.
   1.382 +
   1.383 +It also acts as the head of the list, maintaining the pointers into the list.
   1.384 +
   1.385 +The template parameter defines the type of element that forms the singly linked 
   1.386 +list and is the class that acts as host to the link object.
   1.387 +
   1.388 +@see TSglQueLink
   1.389 +*/
   1.390 +template <class T>
   1.391 +class TSglQue : public TSglQueBase
   1.392 +	{
   1.393 +public:
   1.394 +	inline TSglQue();
   1.395 +	inline explicit TSglQue(TInt aOffset);
   1.396 +	inline void AddFirst(T& aRef);
   1.397 +	inline void AddLast(T& aRef);
   1.398 +	inline TBool IsFirst(const T* aPtr) const;
   1.399 +	inline TBool IsLast(const T* aPtr) const;
   1.400 +	inline T* First() const;
   1.401 +	inline T* Last() const;
   1.402 +	inline void Remove(T& aRef);
   1.403 +	};
   1.404 +
   1.405 +
   1.406 +
   1.407 +
   1.408 +/**
   1.409 +@publishedAll
   1.410 +@released
   1.411 +
   1.412 +A templated class that provides the behaviour for managing a doubly linked 
   1.413 +list. 
   1.414 +
   1.415 +It also acts as the head of the list, maintaining the pointers into the list.
   1.416 +
   1.417 +The template parameter defines the type of element that forms the doubly linked 
   1.418 +list and is the class that acts as host to the link object.
   1.419 +
   1.420 +@see TDblQueLink
   1.421 +*/
   1.422 +template <class T>
   1.423 +class TDblQue : public TDblQueBase
   1.424 +	{
   1.425 +public:
   1.426 +	inline TDblQue();
   1.427 +	inline explicit TDblQue(TInt aOffset);
   1.428 +	inline void AddFirst(T& aRef);
   1.429 +	inline void AddLast(T& aRef);
   1.430 +	inline TBool IsHead(const T* aPtr) const;
   1.431 +	inline TBool IsFirst(const T* aPtr) const;
   1.432 +	inline TBool IsLast(const T* aPtr) const;
   1.433 +	inline T* First() const;
   1.434 +	inline T* Last() const;
   1.435 +	};
   1.436 +
   1.437 +
   1.438 +
   1.439 +
   1.440 +/**
   1.441 +@publishedAll
   1.442 +@released
   1.443 +
   1.444 +A templated class that provides the behaviour for managing a doubly linked
   1.445 +list in which the elements are added in descending priority order.
   1.446 +
   1.447 +Priority is defined by the value of the TPriQueLink::iPriority member of
   1.448 +the link element.
   1.449 +
   1.450 +The template parameter defines the type of element that forms the doubly linked
   1.451 +list and is the class that acts as host to the link object.
   1.452 +
   1.453 +@see TPriQueLink
   1.454 +@see TPriQueLink::iPriority
   1.455 +*/
   1.456 +template <class T>
   1.457 +class TPriQue : public TDblQueBase
   1.458 +	{
   1.459 +public:
   1.460 +	inline TPriQue();
   1.461 +	inline explicit TPriQue(TInt aOffset);
   1.462 +	inline void Add(T& aRef);
   1.463 +	inline TBool IsHead(const T* aPtr) const;
   1.464 +	inline TBool IsFirst(const T* aPtr) const;
   1.465 +	inline TBool IsLast(const T* aPtr) const;
   1.466 +	inline T* First() const;
   1.467 +	inline T* Last() const;
   1.468 +	};
   1.469 +
   1.470 +
   1.471 +
   1.472 +
   1.473 +/**
   1.474 +@publishedAll
   1.475 +@released
   1.476 +
   1.477 +A templated class that provides the behaviour for managing a doubly linked 
   1.478 +list in which elements represent values which are increments, or deltas, on 
   1.479 +the value represented by a preceding element.
   1.480 +
   1.481 +The list is ordered so that the head of the queue represents a nominal zero 
   1.482 +point.
   1.483 +
   1.484 +The delta value of a new element represents its 'distance' from the nominal 
   1.485 +zero point. The new element is added into the list, and the delta values of 
   1.486 +adjacent elements (and of the new element, if necessary) are adjusted, so 
   1.487 +that the sum of all deltas, up to and including the new element, is the same 
   1.488 +as the new element's intended 'distance' from the nominal zero point.
   1.489 +
   1.490 +A common use for a list of this type is as a queue of timed events, where 
   1.491 +the delta values represent the intervals between the events.
   1.492 +
   1.493 +The delta value is defined by the value of the TDeltaQueLink::iDelta member 
   1.494 +of the link element.
   1.495 +
   1.496 +The template parameter defines the type of element that forms the doubly linked 
   1.497 +list and is the class that acts as host to the link object.
   1.498 +
   1.499 +@see TDeltaQueLink
   1.500 +@see TDeltaQueLink::iDelta
   1.501 +*/
   1.502 +template <class T>
   1.503 +class TDeltaQue : public TDeltaQueBase
   1.504 +	{
   1.505 +public:
   1.506 +	inline TDeltaQue();
   1.507 +	inline explicit TDeltaQue(TInt aOffset);
   1.508 +	inline void Add(T& aRef,TInt aDelta);
   1.509 +	inline void Remove(T& aRef);
   1.510 +	inline T* RemoveFirst();
   1.511 +	};
   1.512 +
   1.513 +
   1.514 +
   1.515 +
   1.516 +// Forward declaration
   1.517 +class TTickCountQueLink;
   1.518 +
   1.519 +/**
   1.520 +@internalComponent
   1.521 +@released
   1.522 +
   1.523 +A class that provides the behaviour for managing a doubly linked list
   1.524 +in which elements are added in order of the time until their tick count.
   1.525 +
   1.526 +A common use for a list of this type is as a queue of timed events, where 
   1.527 +the tick counts are the expiry times of the events.
   1.528 +
   1.529 +The tick count is defined by the value of the TTickCountQueLink::iTickCount
   1.530 +member of the link element.
   1.531 +
   1.532 +@see TTickCountQueLink
   1.533 +@see TTickCountQueLink::iTickCount
   1.534 +*/
   1.535 +class TTickCountQue : public TDblQueBase
   1.536 +	{
   1.537 +public:
   1.538 +	TTickCountQue();
   1.539 +	void Add(TTickCountQueLink& aRef);
   1.540 +	TTickCountQueLink* First() const;
   1.541 +	TTickCountQueLink* RemoveFirst();
   1.542 +	TTickCountQueLink* RemoveFirst(TUint aTickCount);
   1.543 +	};
   1.544 +
   1.545 +
   1.546 +
   1.547 +
   1.548 +/**
   1.549 +@publishedAll
   1.550 +@released
   1.551 +
   1.552 +A base class that provides implementation for the singly linked list iterator. 
   1.553 +
   1.554 +It also encapsulates a pointer to the current link link list element.
   1.555 +
   1.556 +The class is abstract and is not intended to be instantiated.
   1.557 +*/
   1.558 +class TSglQueIterBase
   1.559 +	{
   1.560 +public:
   1.561 +	IMPORT_C void SetToFirst();
   1.562 +protected:
   1.563 +	IMPORT_C TSglQueIterBase(TSglQueBase& aQue);
   1.564 +	IMPORT_C TAny* DoPostInc();
   1.565 +	IMPORT_C TAny* DoCurrent();
   1.566 +	IMPORT_C void DoSet(TAny* aLink);
   1.567 +protected:
   1.568 +	TInt iOffset;
   1.569 +	TSglQueLink* iHead;
   1.570 +	TSglQueLink* iNext;
   1.571 +	};
   1.572 +
   1.573 +
   1.574 +
   1.575 +
   1.576 +/**
   1.577 +@publishedAll
   1.578 +@released
   1.579 +
   1.580 +A templated class that provides the behaviour for iterating through a set of 
   1.581 +singly linked list elements.
   1.582 +
   1.583 +The template parameter defines the type of element that forms the singly linked 
   1.584 +list. The class defined in the template parameter contains the link object.
   1.585 +*/
   1.586 +template <class T>
   1.587 +class TSglQueIter : public TSglQueIterBase
   1.588 +	{
   1.589 +public:
   1.590 +	inline TSglQueIter(TSglQueBase& aQue);
   1.591 +	inline void Set(T& aLink);
   1.592 +	inline operator T*();
   1.593 +	inline T* operator++(TInt);
   1.594 +	};
   1.595 +
   1.596 +
   1.597 +
   1.598 +
   1.599 +/**
   1.600 +@publishedAll
   1.601 +@released
   1.602 +
   1.603 +A base class that provides implementation for the doubly linked list iterator.
   1.604 +
   1.605 +It also encapsulates a pointer to the current link list element.
   1.606 +
   1.607 +The class is abstract and is not intended to be instantiated.
   1.608 +*/
   1.609 +class TDblQueIterBase
   1.610 +	{
   1.611 +public:
   1.612 +	IMPORT_C void SetToFirst();
   1.613 +	IMPORT_C void SetToLast();
   1.614 +protected:
   1.615 +	IMPORT_C TDblQueIterBase(TDblQueBase& aQue);
   1.616 +	IMPORT_C TAny* DoPostInc();
   1.617 +	IMPORT_C TAny* DoPostDec();
   1.618 +	IMPORT_C TAny* DoCurrent();
   1.619 +	IMPORT_C void DoSet(TAny* aLink);
   1.620 +protected:
   1.621 +	/**
   1.622 +	The offset of a component link object within elements that form the list.
   1.623 +	*/
   1.624 +	TInt iOffset;
   1.625 +	
   1.626 +	/**
   1.627 +	Pointer to the anchor for the list.
   1.628 +	*/
   1.629 +	TDblQueLinkBase* iHead;
   1.630 +	
   1.631 +	/**
   1.632 +	Pointer to the current element.
   1.633 +	*/
   1.634 +	TDblQueLinkBase* iNext;
   1.635 +	};
   1.636 +
   1.637 +
   1.638 +
   1.639 +
   1.640 +/**
   1.641 +@publishedAll
   1.642 +@released
   1.643 +
   1.644 +A templated class that provides the behaviour for iterating through a set of 
   1.645 +doubly linked list elements.
   1.646 +
   1.647 +The template parameter defines the type of element that forms the doubly linked 
   1.648 +list. The class defined in the template parameter contains the link object.
   1.649 +*/
   1.650 +template <class T>
   1.651 +class TDblQueIter : public TDblQueIterBase
   1.652 +	{
   1.653 +public:
   1.654 +	inline TDblQueIter(TDblQueBase& aQue);
   1.655 +	inline void Set(T& aLink);
   1.656 +	inline operator T*();
   1.657 +	inline T* operator++(TInt);
   1.658 +	inline T* operator--(TInt);
   1.659 +	};
   1.660 +
   1.661 +
   1.662 +
   1.663 +
   1.664 +/**
   1.665 +@publishedAll
   1.666 +@released
   1.667 +
   1.668 +Governs the type of comparison to be made between descriptor keys or between 
   1.669 +text keys.
   1.670 +
   1.671 +@see TKeyArrayFix
   1.672 +@see TKeyArrayVar
   1.673 +@see TKeyArrayPak
   1.674 +*/
   1.675 +enum TKeyCmpText
   1.676 +	{
   1.677 +	/**
   1.678 +	For a Unicode build, this is the same as ECmpNormal16.
   1.679 +	For a non-Unicode build, this is the same as ECmpNormal8.
   1.680 +	
   1.681 +	Using the build independent names (i.e. TPtrC, TPtr, TBufC, TBuf or TText) 
   1.682 +	allows the compiler to chose the correct variant according to the build.
   1.683 +	*/
   1.684 +	ECmpNormal,
   1.685 +	
   1.686 +	
   1.687 +	/**
   1.688 +	For descriptor keys, the key is assumed to be the 8 bit variant, derived
   1.689 +	from TDesc8. A simple comparison is done between the content of the
   1.690 +	descriptors; the data is not folded and collation rules are not applied for
   1.691 +	the purpose of the comparison.
   1.692 +	
   1.693 +	For text keys, the key is assumed to be the 8 bit variant, of type TText8. 
   1.694 +	A normal comparison is done between the text data; the data is not folded 
   1.695 +	and collation rules are not applied for the purpose of the comparison.
   1.696 +	*/
   1.697 +	ECmpNormal8,
   1.698 +	
   1.699 +	
   1.700 +	/**
   1.701 +	For descriptor keys, the key is assumed to be the 16 bit variant, derived
   1.702 +	from TDesc16. A simple comparison is done between the content of the
   1.703 +	descriptors; the data is not folded and collation rules are not applied for
   1.704 +	the purpose of the comparison.
   1.705 +	
   1.706 +	For text keys, the key is assumed to be the 16 bit variant, of type
   1.707 +	TText16. A normal comparison is done between the text data; the data is
   1.708 +	not folded 	and collation rules are not applied for the purpose of the
   1.709 +	comparison.
   1.710 +	*/
   1.711 +	ECmpNormal16,
   1.712 +	
   1.713 +	
   1.714 +	/**
   1.715 +	For a Unicode build, this is the same as EcmpFolded16.
   1.716 +    For a non-Unicode build, this is the same as EcmpFolded8.
   1.717 +
   1.718 +    Using the build independent names (i.e. TPtrC, TPtr, TBufC, TBuf or TText)
   1.719 +    allows the compiler to chose the correct variant according to the build. 
   1.720 +	*/
   1.721 +	ECmpFolded,
   1.722 +	
   1.723 +	
   1.724 +	/**
   1.725 +	For descriptor keys, the key is assumed to be the 8 bit variant,
   1.726 +	derived from TDesc8. The descriptor contents are folded for the purpose
   1.727 +	of the comparison.
   1.728 +
   1.729 +    For text keys, the key is assumed to be the 8 bit variant, of type
   1.730 +    TText8. The text data is folded for the purpose of the comparison.
   1.731 +	*/
   1.732 +	ECmpFolded8,
   1.733 +	
   1.734 +	
   1.735 +	/**
   1.736 +	For descriptor keys, the key is assumed to be the 16 bit variant,
   1.737 +	derived from TDesc16. The descriptor contents are folded for the purpose
   1.738 +	of the comparison.
   1.739 +
   1.740 +    For text keys, the key is assumed to be the 16 bit variant, of type
   1.741 +    TText16. The text data is folded for the purpose of the comparison.
   1.742 +	*/
   1.743 +	ECmpFolded16,
   1.744 +	
   1.745 +	
   1.746 +	/**
   1.747 +	For a Unicode build, this is the same as EcmpCollated16.
   1.748 +    For a non-Unicode build, this is the same as EcmpCollated8.
   1.749 +
   1.750 +    Using the build independent names (i.e. TPtrC, TPtr, TBufC, TBuf or TText)
   1.751 +    allows the compiler to chose the correct variant according to the build.
   1.752 +	*/
   1.753 +	ECmpCollated,
   1.754 +	
   1.755 +	
   1.756 +	/**
   1.757 +	For descriptor keys, the key is assumed to be the 8 bit variant,
   1.758 +	derived from TDesc8. Collation rules are applied for the purpose of
   1.759 +	the comparison.
   1.760 +
   1.761 +    For text keys, the key is assumed to be the 8 bit variant, of type 
   1.762 +    TText8. Collation rules are applied for the purpose of the comparison.
   1.763 +	*/
   1.764 +	ECmpCollated8,
   1.765 +	
   1.766 +	
   1.767 +	/**
   1.768 +	For descriptor keys, the key is assumed to be the 16 bit variant,
   1.769 +	derived from TDesc16. Collation rules are applied for the purpose of
   1.770 +	the comparison.
   1.771 +
   1.772 +    For text keys, the key is assumed to be the 16 bit variant,
   1.773 +    of type TText16. Collation rules are applied for the purpose of
   1.774 +    the comparison.
   1.775 +	*/
   1.776 +	ECmpCollated16
   1.777 +	};
   1.778 +
   1.779 +
   1.780 +
   1.781 +
   1.782 +/**
   1.783 +@publishedAll
   1.784 +@released
   1.785 +
   1.786 +Governs the type of comparison to be made between numeric keys.
   1.787 +
   1.788 +@see TKeyArrayFix
   1.789 +@see TKeyArrayVar
   1.790 +@see TKeyArrayPak
   1.791 +*/
   1.792 +enum TKeyCmpNumeric
   1.793 +	{
   1.794 +	/**
   1.795 +	The key is assumed to be of type TInt8.
   1.796 +	*/
   1.797 +	ECmpTInt8=((ECmpCollated16+1)<<1),
   1.798 +	
   1.799 +	
   1.800 +	/**
   1.801 +	The key is assumed to be of type TInt16.
   1.802 +	*/
   1.803 +	ECmpTInt16,
   1.804 +	
   1.805 +	
   1.806 +	/**
   1.807 +	The key is assumed to be of type TInt32.
   1.808 +	*/
   1.809 +	ECmpTInt32,
   1.810 +	
   1.811 +	
   1.812 +	/**
   1.813 +	The key is assumed to be of type TInt.
   1.814 +	*/
   1.815 +	ECmpTInt,
   1.816 +	
   1.817 +	
   1.818 +	/**
   1.819 +	The key is assumed to be of type TUint8.
   1.820 +	*/
   1.821 +	ECmpTUint8,
   1.822 +	
   1.823 +	
   1.824 +	/**
   1.825 +	The key is assumed to be of type TUint16.
   1.826 +	*/
   1.827 +	ECmpTUint16,
   1.828 +	
   1.829 +	
   1.830 +	/**
   1.831 +	The key is assumed to be of type TUint32.
   1.832 +	*/
   1.833 +	ECmpTUint32,
   1.834 +	
   1.835 +	
   1.836 +	/**
   1.837 +	The key is assumed to be of type TUint.
   1.838 +	*/
   1.839 +	ECmpTUint,
   1.840 +	
   1.841 +	
   1.842 +	/**
   1.843 +	The key is assumed to be of type TInt64.
   1.844 +	*/
   1.845 +	ECmpTInt64
   1.846 +	};
   1.847 +
   1.848 +
   1.849 +
   1.850 +
   1.851 +/**
   1.852 +@publishedAll
   1.853 +@released
   1.854 +
   1.855 +Defines the characteristics of a key used to access the elements of an array.
   1.856 +
   1.857 +The class is abstract and cannot be instantiated. A derived class must be 
   1.858 +defined and implemented.
   1.859 +
   1.860 +The classes TKeyArrayFix, TKeyArrayVar and TKeyArrayPak, derived from TKey, 
   1.861 +are already supplied to implement keys for the fixed length element, variable 
   1.862 +length element and packed arrays.
   1.863 +
   1.864 +A derived class would normally be written to define the characteristics of 
   1.865 +a key for a non standard array.
   1.866 +
   1.867 +@see TKeyArrayFix
   1.868 +@see TKeyArrayVar
   1.869 +@see TKeyArrayPak
   1.870 +*/
   1.871 +class TKey
   1.872 +	{
   1.873 +public:
   1.874 +	inline void SetPtr(const TAny* aPtr);
   1.875 +	IMPORT_C virtual TInt Compare(TInt aLeft,TInt aRight) const;
   1.876 +	IMPORT_C virtual TAny* At(TInt anIndex) const;
   1.877 +protected:
   1.878 +	IMPORT_C TKey();
   1.879 +	IMPORT_C TKey(TInt aOffset,TKeyCmpText aType);
   1.880 +	IMPORT_C TKey(TInt aOffset,TKeyCmpText aType,TInt aLength);
   1.881 +	IMPORT_C TKey(TInt aOffset,TKeyCmpNumeric aType);
   1.882 +protected:
   1.883 +	TInt iKeyOffset;
   1.884 +	TInt iKeyLength;
   1.885 +	TInt iCmpType;
   1.886 +	const TAny* iPtr;
   1.887 +	};
   1.888 +
   1.889 +/**
   1.890 +@publishedAll
   1.891 +@released
   1.892 +
   1.893 +Defines the basic behaviour for swapping two elements of an array.
   1.894 +
   1.895 +The class is abstract. A derived class must be defined and implemented to 
   1.896 +use the functionality.
   1.897 +
   1.898 +A derived class can define how to swap two elements of an array. In practice, 
   1.899 +this means providing an implementation for the virtual function Swap().
   1.900 +
   1.901 +To support this, the derived class is also likely to need a pointer to the 
   1.902 +array itself and suitable constructors and/or other member functions to set 
   1.903 +such a pointer.
   1.904 +*/
   1.905 +class TSwap
   1.906 +	{
   1.907 +public:
   1.908 +	IMPORT_C TSwap();
   1.909 +	IMPORT_C virtual void Swap(TInt aLeft,TInt aRight) const;
   1.910 +	};
   1.911 +
   1.912 +
   1.913 +
   1.914 +
   1.915 +/**
   1.916 +@publishedAll
   1.917 +@released
   1.918 +
   1.919 +Folds a specified character and provides functions to fold additional
   1.920 +characters after construction of the object.
   1.921 +
   1.922 +Folding converts the character to a form which can be used in tolerant
   1.923 +comparisons without control over the operations performed. Tolerant comparisons
   1.924 +are those which ignore character differences like case and accents. 
   1.925 +
   1.926 +Note that folding is locale-independent behaviour. It is also important to 
   1.927 +note that there can be no guarantee that folding is in any way culturally 
   1.928 +appropriate, and should not be used for matching characters in
   1.929 +natural language.
   1.930 +
   1.931 +@see User::Fold
   1.932 +*/
   1.933 +class TCharF : public TChar
   1.934 +	{
   1.935 +public:
   1.936 +	inline TCharF(TUint aChar);
   1.937 +	inline TCharF(const TChar& aChar);
   1.938 +	inline TCharF& operator=(TUint aChar);
   1.939 +	inline TCharF& operator=(const TChar& aChar);
   1.940 +	};
   1.941 +
   1.942 +
   1.943 +
   1.944 +
   1.945 +/**
   1.946 +@publishedAll
   1.947 +@released
   1.948 +
   1.949 +Converts a specified character to lower case and provides functions to convert 
   1.950 +additional characters after construction of the object.
   1.951 +*/
   1.952 +class TCharLC : public TChar
   1.953 +	{
   1.954 +public:
   1.955 +	inline TCharLC(TUint aChar);
   1.956 +	inline TCharLC(const TChar& aChar);
   1.957 +	inline TCharLC& operator=(TUint aChar);
   1.958 +	inline TCharLC& operator=(const TChar& aChar);
   1.959 +	};
   1.960 +
   1.961 +
   1.962 +
   1.963 +
   1.964 +/**
   1.965 +@publishedAll
   1.966 +@released
   1.967 +
   1.968 +Converts a specified character to upper case and provides functions to convert 
   1.969 +additional characters after construction of the object.
   1.970 +*/
   1.971 +class TCharUC : public TChar
   1.972 +	{
   1.973 +public:
   1.974 +	inline TCharUC(TUint aChar);
   1.975 +	inline TCharUC(const TChar& aChar);
   1.976 +	inline TCharUC& operator=(TUint aChar);
   1.977 +	inline TCharUC& operator=(const TChar& aChar);
   1.978 +	};
   1.979 +
   1.980 +
   1.981 +
   1.982 +/**
   1.983 +@publishedAll
   1.984 +@released
   1.985 +
   1.986 +Defines the character representation of a real number type such
   1.987 +as a TReal or a TRealX.
   1.988 +
   1.989 +An object of this type is used by functions that convert real values to
   1.990 +character format, for example, the descriptor functions:
   1.991 +Num(), AppendNum() and Format().
   1.992 +
   1.993 +There are three constructors for constructing a suitable object.
   1.994 +The data members of the class, however, are public and can be
   1.995 +explicitly set after construction.
   1.996 +*/
   1.997 +class TRealFormat
   1.998 +	{
   1.999 +public:
  1.1000 +	IMPORT_C TRealFormat();
  1.1001 +	IMPORT_C TRealFormat(TInt aWidth);
  1.1002 +	IMPORT_C TRealFormat(TInt aWidth,TInt aDecimalPlaces);
  1.1003 +public:
  1.1004 +    /**
  1.1005 +    Governs the format of the character representation of the real number.
  1.1006 +
  1.1007 +    This is set to one of the defined format types.
  1.1008 +
  1.1009 +    One or more of the defined format flags can subsequently be ORed into this member.
  1.1010 +    
  1.1011 +    @see KRealFormatFixed
  1.1012 +    @see KRealFormatExponent
  1.1013 +    @see KRealFormatGeneral
  1.1014 +    @see KRealFormatNoExponent
  1.1015 +    @see KRealFormatCalculator
  1.1016 +    @see KExtraSpaceForSign
  1.1017 +    @see KAllowThreeDigitExp
  1.1018 +    @see KDoNotUseTriads
  1.1019 +    @see KGeneralLimit
  1.1020 +    @see KUseSigFigs
  1.1021 +    */
  1.1022 +	TInt iType;
  1.1023 +	
  1.1024 +	
  1.1025 +	/**
  1.1026 +	Defines the maximum number of characters required to represent the number.
  1.1027 +	*/
  1.1028 +	TInt iWidth;
  1.1029 +	
  1.1030 +	
  1.1031 +	/**
  1.1032 +	Defines either the number of characters to be used to represent the decimal
  1.1033 +	portion of the number, or the maximum number of significant digits in
  1.1034 +	the character representation of the number.
  1.1035 +
  1.1036 +    The interpretation depends on the chosen format as defined by iType.
  1.1037 +    
  1.1038 +	@see TRealFormat::iType
  1.1039 +	*/
  1.1040 +	TInt iPlaces;
  1.1041 +	
  1.1042 +	
  1.1043 +	/**
  1.1044 +	Defines the character to be used to separate the integer portion of
  1.1045 +	a number representation from its decimal portion.
  1.1046 +
  1.1047 +    In general, the character used for this purpose is a matter of local
  1.1048 +    convention. The TLocale::DecimalSeparator() function can supply the
  1.1049 +    desired character.
  1.1050 +
  1.1051 +    @see TLocale
  1.1052 +	*/
  1.1053 +	TChar iPoint;
  1.1054 +	
  1.1055 +	
  1.1056 +	/**
  1.1057 +	Defines the character to be used to delimit groups of three digits in
  1.1058 +	the integer part of the number.
  1.1059 +
  1.1060 +    In general, the character used for this purpose is a matter of local
  1.1061 +    convention. The TLocale::ThousandsSeparator() function can supply the
  1.1062 +    desired character.
  1.1063 +
  1.1064 +    @see TLocale
  1.1065 +	*/
  1.1066 +	TChar iTriad;
  1.1067 +	
  1.1068 +	
  1.1069 +	/**
  1.1070 +	Defines the threshold number of digits above which triad separation is to
  1.1071 +	occur. A value of zero disables triad separation and no triad separation
  1.1072 +	character (i.e. the character held in iTriad) is inserted into the
  1.1073 +	resulting character representation regardless of the number of characters.
  1.1074 +
  1.1075 +    For example, a value of 1 causes the number 1000 to be represented by the
  1.1076 +    characters "1,000" whereas a value of 4 causes the same number to be
  1.1077 +    represented by the characters "1000" (This assumes the ‘,’ triad separation
  1.1078 +    character).
  1.1079 +
  1.1080 +    Note that no triad separation occurs if the flag KDoNotUseTriads is set in
  1.1081 +    the iType data member.
  1.1082 +
  1.1083 +	@see TRealFormat::iTriad
  1.1084 +	@see KDoNotUseTriads
  1.1085 +	*/
  1.1086 +	TInt iTriLen;
  1.1087 +	};
  1.1088 +
  1.1089 +
  1.1090 +
  1.1091 +
  1.1092 +/**
  1.1093 +@publishedAll
  1.1094 +@released
  1.1095 +
  1.1096 +Defines the extraction mark used by the TLex8 class to indicate the current 
  1.1097 +lexical element being analysed.
  1.1098 +
  1.1099 +In practice, objects of this type are accessed through the TLexMark typedef.
  1.1100 +
  1.1101 +@see TLexMark
  1.1102 +@see TLex8
  1.1103 +*/
  1.1104 +class TLexMark8
  1.1105 +	{
  1.1106 +public:
  1.1107 +	inline TLexMark8();
  1.1108 +private:
  1.1109 +	inline TLexMark8(const TUint8* aString);
  1.1110 +	const TUint8* iPtr;
  1.1111 +	friend class TLex8;
  1.1112 +	__DECLARE_TEST;
  1.1113 +	};
  1.1114 +
  1.1115 +
  1.1116 +
  1.1117 +
  1.1118 +class TRealX;
  1.1119 +/**
  1.1120 +@publishedAll
  1.1121 +@released
  1.1122 +
  1.1123 +Provides general string-parsing functions suitable for numeric format
  1.1124 +conversions and syntactical-element parsing.
  1.1125 +
  1.1126 +The class is the 8-bit variant for non-Unicode strings and 8-bit wide
  1.1127 +characters.
  1.1128 +
  1.1129 +An instance of this class stores a string, maintaining an extraction mark 
  1.1130 +to indicate the current lexical element being analysed and a pointer to the 
  1.1131 +next character to be examined.
  1.1132 +
  1.1133 +Objects of this type are normally accessed through the build independent type 
  1.1134 +TLex.
  1.1135 +
  1.1136 +@see TLex
  1.1137 +*/
  1.1138 +class TLex8
  1.1139 +	{
  1.1140 +public:
  1.1141 +	IMPORT_C TLex8();
  1.1142 +	inline TLex8(const TUint8* aString);
  1.1143 +	inline TLex8(const TDesC8& aDes);
  1.1144 +	inline TLex8& operator=(const TUint8* aString);
  1.1145 +	inline TLex8& operator=(const TDesC8& aDes);
  1.1146 +	inline TBool Eos() const;
  1.1147 +	inline void Mark(TLexMark8& aMark) const;
  1.1148 +	inline void Mark();
  1.1149 +	IMPORT_C void Inc();
  1.1150 +	IMPORT_C void Inc(TInt aNumber);
  1.1151 +	IMPORT_C TChar Get();
  1.1152 +	IMPORT_C TChar Peek() const;
  1.1153 +	IMPORT_C void UnGet();
  1.1154 +	inline void UnGetToMark();
  1.1155 +	IMPORT_C void UnGetToMark(const TLexMark8 aMark);
  1.1156 +	IMPORT_C void SkipSpace();
  1.1157 +	inline void SkipAndMark(TInt aNumber);
  1.1158 +	IMPORT_C void SkipAndMark(TInt aNumber, TLexMark8& aMark);
  1.1159 +	inline void SkipSpaceAndMark();
  1.1160 +	IMPORT_C void SkipSpaceAndMark(TLexMark8& aMark);
  1.1161 +	IMPORT_C void SkipCharacters();
  1.1162 +	inline TInt TokenLength() const;
  1.1163 +	IMPORT_C TInt TokenLength(const TLexMark8 aMark) const;
  1.1164 +	IMPORT_C TPtrC8 MarkedToken() const;
  1.1165 +	IMPORT_C TPtrC8 MarkedToken(const TLexMark8 aMark) const;
  1.1166 +	IMPORT_C TPtrC8 NextToken();
  1.1167 +	IMPORT_C TPtrC8 Remainder() const;
  1.1168 +	IMPORT_C TPtrC8 RemainderFromMark() const;
  1.1169 +	IMPORT_C TPtrC8 RemainderFromMark(const TLexMark8 aMark) const;
  1.1170 +	IMPORT_C TInt Offset() const;
  1.1171 +	inline TInt MarkedOffset() const;
  1.1172 +	IMPORT_C TInt MarkedOffset(const TLexMark8 aMark) const;
  1.1173 +	IMPORT_C TInt Val(TInt8& aVal);
  1.1174 +	IMPORT_C TInt Val(TInt16& aVal);
  1.1175 +	IMPORT_C TInt Val(TInt32& aVal);
  1.1176 +	IMPORT_C TInt Val(TInt64& aVal);
  1.1177 +	inline TInt Val(TInt& aVal);
  1.1178 +	IMPORT_C TInt Val(TUint8& aVal,TRadix aRadix);
  1.1179 +	IMPORT_C TInt Val(TUint16& aVal,TRadix aRadix);
  1.1180 +	IMPORT_C TInt Val(TUint32& aVal,TRadix aRadix);
  1.1181 +	IMPORT_C TInt Val(TInt64& aVal, TRadix aRadix);
  1.1182 +	inline TInt Val(TUint& aVal,TRadix aRadix=EDecimal);
  1.1183 +	IMPORT_C TInt BoundedVal(TInt32& aVal,TInt aLimit);
  1.1184 +	IMPORT_C TInt BoundedVal(TInt64& aVal, const TInt64& aLimit);
  1.1185 +	IMPORT_C TInt BoundedVal(TUint32& aVal,TRadix aRadix,TUint aLimit);
  1.1186 +	IMPORT_C TInt BoundedVal(TInt64& aVal, TRadix aRadix, const TInt64& aLimit);
  1.1187 +	IMPORT_C TInt Val(TReal32& aVal);
  1.1188 +	IMPORT_C TInt Val(TReal32& aVal,TChar aPoint);
  1.1189 +	IMPORT_C TInt Val(TReal64& aVal);
  1.1190 +	IMPORT_C TInt Val(TReal64& aVal,TChar aPoint);
  1.1191 +	inline void Assign(const TLex8& aLex);
  1.1192 +	IMPORT_C void Assign(const TUint8* aString);
  1.1193 +	IMPORT_C void Assign(const TDesC8& aDes);
  1.1194 +	TInt Val(TRealX& aVal);
  1.1195 +	TInt Val(TRealX& aVal, TChar aPoint);
  1.1196 +
  1.1197 +	/** @deprecated Use BoundedVal(TInt32& aVal,TInt aLimit) */
  1.1198 +	inline TInt Val(TInt32& aVal,TInt aLimit) { return BoundedVal(aVal,aLimit); };
  1.1199 +
  1.1200 +	/** @deprecated Use BoundedVal(TInt64& aVal,const TInt64& aLimit) */
  1.1201 +	inline TInt Val(TInt64& aVal,const TInt64& aLimit) { return BoundedVal(aVal,aLimit); };
  1.1202 +
  1.1203 +	/** @deprecated Use BoundedVal(TUint32& aVal,TRadix aRadix,TUint aLimit) */
  1.1204 +	inline TInt Val(TUint32& aVal,TRadix aRadix,TUint aLimit) { return BoundedVal(aVal,aRadix,aLimit); };
  1.1205 +
  1.1206 +	/** @deprecated Use BoundedVal(TInt64& aVal,TRadix aRadix,const TInt64& aLimit) */
  1.1207 +	inline TInt Val(TInt64& aVal,TRadix aRadix,const TInt64& aLimit) { return BoundedVal(aVal,aRadix,aLimit); };
  1.1208 +private:
  1.1209 +	void Scndig(TInt& aSig, TInt& aExp, TUint64& aDl);
  1.1210 +	void ScndigAfterPoint(TInt& aSig, TUint64& aDl);
  1.1211 +	void ValidateMark(const TLexMark8 aMark) const;
  1.1212 +private:
  1.1213 +	const TUint8* iNext;
  1.1214 +	const TUint8* iBuf;
  1.1215 +	const TUint8* iEnd;
  1.1216 +	TLexMark8 iMark;
  1.1217 +	__DECLARE_TEST;
  1.1218 +	};
  1.1219 +
  1.1220 +
  1.1221 +
  1.1222 +
  1.1223 +/**
  1.1224 +@publishedAll
  1.1225 +@released
  1.1226 +
  1.1227 +Defines the extraction mark used by the TLex16 class to indicate the current 
  1.1228 +lexical element being analysed.
  1.1229 +
  1.1230 +In practice, objects of this type are accessed through the TLexMark typedef.
  1.1231 +
  1.1232 +@see TLexMark
  1.1233 +@see TLex16
  1.1234 +*/
  1.1235 +class TLexMark16
  1.1236 +	{
  1.1237 +public:
  1.1238 +	inline TLexMark16();
  1.1239 +private:
  1.1240 +	inline TLexMark16(const TUint16* aString);
  1.1241 +	const TUint16* iPtr;
  1.1242 +	friend class TLex16;	
  1.1243 +	__DECLARE_TEST;
  1.1244 +	};
  1.1245 +
  1.1246 +
  1.1247 +
  1.1248 +
  1.1249 +/**
  1.1250 +@publishedAll
  1.1251 +@released
  1.1252 +
  1.1253 +Provides general string-parsing functions suitable for numeric format
  1.1254 +conversions and syntactical-element parsing. 
  1.1255 +
  1.1256 +The class is the 16-bit variant for Unicode strings and 16-bit wide
  1.1257 +characters.
  1.1258 +
  1.1259 +An instance of this class stores a string, maintaining an extraction mark 
  1.1260 +to indicate the current lexical element being analysed and a pointer to the 
  1.1261 +next character to be examined.
  1.1262 +
  1.1263 +Objects of this type are normally accessed through the build independent type 
  1.1264 +TLex.
  1.1265 +
  1.1266 +@see TLex
  1.1267 +*/
  1.1268 +class TLex16
  1.1269 +	{
  1.1270 +public:
  1.1271 +	IMPORT_C TLex16();
  1.1272 +	inline TLex16(const TUint16* aString);
  1.1273 +	inline TLex16(const TDesC16& aDes);
  1.1274 +	inline TLex16& operator=(const TUint16* aString);
  1.1275 +	inline TLex16& operator=(const TDesC16& aDes);
  1.1276 +	inline TBool Eos() const;
  1.1277 +	inline void Mark();
  1.1278 +	inline void Mark(TLexMark16& aMark) const;
  1.1279 +	IMPORT_C void Inc();
  1.1280 +	IMPORT_C void Inc(TInt aNumber);
  1.1281 +	IMPORT_C TChar Get();
  1.1282 +	IMPORT_C TChar Peek() const;
  1.1283 +	IMPORT_C void UnGet();
  1.1284 +	inline void UnGetToMark();
  1.1285 +	IMPORT_C void UnGetToMark(const TLexMark16 aMark);
  1.1286 +	IMPORT_C void SkipSpace();
  1.1287 +	inline void SkipAndMark(TInt aNumber);
  1.1288 +	IMPORT_C void SkipAndMark(TInt aNumber, TLexMark16& aMark);
  1.1289 +	IMPORT_C void SkipSpaceAndMark(TLexMark16& aMark);
  1.1290 +	inline void SkipSpaceAndMark();
  1.1291 +	IMPORT_C void SkipCharacters();
  1.1292 +	inline TInt TokenLength() const;
  1.1293 +	IMPORT_C TInt TokenLength(const TLexMark16 aMark) const;
  1.1294 +	IMPORT_C TPtrC16 MarkedToken() const;
  1.1295 +	IMPORT_C TPtrC16 MarkedToken(const TLexMark16 aMark) const;
  1.1296 +	IMPORT_C TPtrC16 NextToken();
  1.1297 +	IMPORT_C TPtrC16 Remainder() const;
  1.1298 +	IMPORT_C TPtrC16 RemainderFromMark() const;
  1.1299 +	IMPORT_C TPtrC16 RemainderFromMark(const TLexMark16 aMark) const;
  1.1300 +	IMPORT_C TInt Offset() const;
  1.1301 +	inline TInt MarkedOffset() const;
  1.1302 +	IMPORT_C TInt MarkedOffset(const TLexMark16 aMark) const;
  1.1303 +	IMPORT_C TInt Val(TInt8& aVal);
  1.1304 +	IMPORT_C TInt Val(TInt16& aVal);
  1.1305 +	IMPORT_C TInt Val(TInt32& aVal);
  1.1306 +	IMPORT_C TInt Val(TInt64& aVal);
  1.1307 +	inline TInt Val(TInt& aVal);
  1.1308 +	IMPORT_C TInt Val(TUint8& aVal,TRadix aRadix);
  1.1309 +	IMPORT_C TInt Val(TUint16& aVal,TRadix aRadix);
  1.1310 +	IMPORT_C TInt Val(TUint32& aVal,TRadix aRadix);
  1.1311 +	IMPORT_C TInt Val(TInt64& aVal, TRadix aRadix);
  1.1312 +//	inline TInt Val(TInt64& aVal, TRadix aRadix) {return Val(aVal,aRadix);}
  1.1313 +	inline TInt Val(TUint& aVal,TRadix aRadix=EDecimal);
  1.1314 +	IMPORT_C TInt BoundedVal(TInt32& aVal,TInt aLimit);
  1.1315 +	IMPORT_C TInt BoundedVal(TInt64& aVal, const TInt64& aLimit);
  1.1316 +	IMPORT_C TInt BoundedVal(TUint32& aVal,TRadix aRadix,TUint aLimit);
  1.1317 +	IMPORT_C TInt BoundedVal(TInt64& aVal, TRadix aRadix, const TInt64& aLimit);
  1.1318 +	IMPORT_C TInt Val(TReal32& aVal);
  1.1319 +	IMPORT_C TInt Val(TReal32& aVal,TChar aPoint);
  1.1320 +	IMPORT_C TInt Val(TReal64& aVal);
  1.1321 +	IMPORT_C TInt Val(TReal64& aVal,TChar aPoint);
  1.1322 +	inline void Assign(const TLex16& aLex);
  1.1323 +	IMPORT_C void Assign(const TUint16* aString);
  1.1324 +	IMPORT_C void Assign(const TDesC16& aDes);		
  1.1325 +	TInt Val(TRealX& aVal);
  1.1326 +	TInt Val(TRealX& aVal, TChar aPoint);
  1.1327 +
  1.1328 +	/** @deprecated Use BoundedVal(TInt32& aVal,TInt aLimit) */
  1.1329 +	inline TInt Val(TInt32& aVal,TInt aLimit) { return BoundedVal(aVal,aLimit); };
  1.1330 +
  1.1331 +	/** @deprecated Use BoundedVal(TInt64& aVal,const TInt64& aLimit) */
  1.1332 +	inline TInt Val(TInt64& aVal,const TInt64& aLimit) { return BoundedVal(aVal,aLimit); };
  1.1333 +
  1.1334 +	/** @deprecated Use BoundedVal(TUint32& aVal,TRadix aRadix,TUint aLimit) */
  1.1335 +	inline TInt Val(TUint32& aVal,TRadix aRadix,TUint aLimit) { return BoundedVal(aVal,aRadix,aLimit); };
  1.1336 +
  1.1337 +	/** @deprecated Use BoundedVal(TInt64& aVal,TRadix aRadix,const TInt64& aLimit) */
  1.1338 +	inline TInt Val(TInt64& aVal,TRadix aRadix,const TInt64& aLimit) { return BoundedVal(aVal,aRadix,aLimit); };
  1.1339 +private:
  1.1340 +	void Scndig(TInt& aSig, TInt& aExp, TUint64& aDl);
  1.1341 +	void ValidateMark(const TLexMark16 aMark) const;
  1.1342 +private:
  1.1343 +	const TUint16* iNext;
  1.1344 +	const TUint16* iBuf;
  1.1345 +	const TUint16* iEnd;
  1.1346 +	TLexMark16 iMark;
  1.1347 +	__DECLARE_TEST;
  1.1348 +	};
  1.1349 +
  1.1350 +
  1.1351 +
  1.1352 +
  1.1353 +#if defined(_UNICODE)
  1.1354 +/**
  1.1355 +@publishedAll
  1.1356 +@released
  1.1357 +
  1.1358 +Provides access to general string-parsing functions suitable for numeric format 
  1.1359 +conversions and syntactical-element parsing.
  1.1360 +
  1.1361 +It maps directly to either a TLex16 for a Unicode build or a TLex8 for a non-Unicode 
  1.1362 +build.
  1.1363 +
  1.1364 +The build independent type should always be used unless an explicit 16 bit 
  1.1365 +or 8 bit build variant is required.
  1.1366 +
  1.1367 +@see TLex16
  1.1368 +@see TLex8
  1.1369 +*/
  1.1370 +typedef TLex16 TLex;
  1.1371 +
  1.1372 +
  1.1373 +
  1.1374 +
  1.1375 +/**
  1.1376 +@publishedAll
  1.1377 +@released
  1.1378 +
  1.1379 +Defines the extraction mark used by the TLex classes to indicate the current 
  1.1380 +lexical element being analysed. 
  1.1381 +
  1.1382 +It maps directly to either a TLexMark16 for a Unicode build or a TLexMark8 
  1.1383 +for a non-Unicode build.
  1.1384 +
  1.1385 +The build independent type should always be used unless an explicit 16 bit 
  1.1386 +or 8 bit build variant is required.
  1.1387 +*/
  1.1388 +typedef TLexMark16 TLexMark;
  1.1389 +
  1.1390 +
  1.1391 +
  1.1392 +
  1.1393 +#else
  1.1394 +
  1.1395 +
  1.1396 +
  1.1397 +/**
  1.1398 +@publishedAll
  1.1399 +@released
  1.1400 +
  1.1401 +Provides access to general string-parsing functions suitable for numeric format 
  1.1402 +conversions and syntactical-element parsing.
  1.1403 +
  1.1404 +It maps directly to either a TLex16 for a Unicode build or a TLex8 for a non-Unicode 
  1.1405 +build.
  1.1406 +
  1.1407 +The build independent type should always be used unless an explicit 16 bit 
  1.1408 +or 8 bit build variant is required.
  1.1409 +
  1.1410 +@see TLex16
  1.1411 +@see TLex8
  1.1412 +*/
  1.1413 +typedef TLex8 TLex;
  1.1414 +
  1.1415 +
  1.1416 +
  1.1417 +
  1.1418 +/**
  1.1419 +@publishedAll
  1.1420 +@released
  1.1421 +
  1.1422 +Defines the extraction mark used by the TLex classes to indicate the current 
  1.1423 +lexical element being analysed. 
  1.1424 +
  1.1425 +It maps directly to either a TLexMark16 for a Unicode build or a TLexMark8 
  1.1426 +for a non-Unicode build.
  1.1427 +
  1.1428 +The build independent type should always be used unless an explicit 16 bit 
  1.1429 +or 8 bit build variant is required.
  1.1430 +*/
  1.1431 +typedef TLexMark8 TLexMark;
  1.1432 +#endif
  1.1433 +
  1.1434 +
  1.1435 +
  1.1436 +
  1.1437 +/**
  1.1438 +@publishedAll
  1.1439 +@released
  1.1440 +
  1.1441 +Packages a Uid type together with a checksum.
  1.1442 +
  1.1443 +@see TUidType
  1.1444 +*/
  1.1445 +class TCheckedUid
  1.1446 +	{
  1.1447 +public:
  1.1448 +	IMPORT_C TCheckedUid();
  1.1449 +	IMPORT_C TCheckedUid(const TUidType& aUidType);
  1.1450 +	IMPORT_C TCheckedUid(const TDesC8& aPtr);
  1.1451 +	IMPORT_C void Set(const TUidType& aUidType);
  1.1452 +	IMPORT_C void Set(const TDesC8& aPtr);
  1.1453 +	IMPORT_C TPtrC8 Des() const;
  1.1454 +	inline const TUidType& UidType() const;
  1.1455 +protected:
  1.1456 +	IMPORT_C TUint Check() const;
  1.1457 +private:
  1.1458 +	TUidType iType;
  1.1459 +	TUint iCheck;
  1.1460 +	};
  1.1461 +
  1.1462 +
  1.1463 +
  1.1464 +
  1.1465 +/**
  1.1466 +@publishedAll
  1.1467 +@released
  1.1468 +
  1.1469 +A date and time object in which the individual components are accessible in
  1.1470 +human-readable form.
  1.1471 +
  1.1472 +The individual components are: year, month, day, hour, minute,
  1.1473 +second and microsecond.
  1.1474 +
  1.1475 +These components are stored as integers and all except the year are checked for
  1.1476 +validity when a TDateTime is constructed or assigned new values.
  1.1477 +
  1.1478 +This class only supports getting and setting the entire date/time or any component 
  1.1479 +of it. It does not support adding or subtracting intervals to or from a time. 
  1.1480 +For functions which manipulate times, use class TTime.
  1.1481 +
  1.1482 +@see TTime
  1.1483 +*/
  1.1484 +class TDateTime
  1.1485 +	{
  1.1486 +public:
  1.1487 +	inline TDateTime();
  1.1488 +	IMPORT_C TDateTime(TInt aYear,TMonth aMonth,TInt aDay,TInt aHour,TInt aMinute, TInt aSecond,TInt aMicroSecond);
  1.1489 +	IMPORT_C TInt Set(TInt aYear,TMonth aMonth,TInt aDay,TInt aHour,TInt aMinute, TInt aSecond,TInt aMicroSecond);
  1.1490 +	IMPORT_C TInt SetYear(TInt aYear);
  1.1491 +	IMPORT_C TInt SetYearLeapCheck(TInt aYear);
  1.1492 +	IMPORT_C TInt SetMonth(TMonth aMonth);
  1.1493 +	IMPORT_C TInt SetDay(TInt aDay);
  1.1494 +	IMPORT_C TInt SetHour(TInt aHour);
  1.1495 +	IMPORT_C TInt SetMinute(TInt aMinute);
  1.1496 +	IMPORT_C TInt SetSecond(TInt aSecond);
  1.1497 +	IMPORT_C TInt SetMicroSecond(TInt aMicroSecond);
  1.1498 +	inline TInt Year() const;
  1.1499 +	inline TMonth Month() const;
  1.1500 +	inline TInt Day() const;
  1.1501 +	inline TInt Hour() const;
  1.1502 +	inline TInt Minute() const;
  1.1503 +	inline TInt Second() const;
  1.1504 +	inline TInt MicroSecond() const;
  1.1505 +private:
  1.1506 +	TInt iYear;
  1.1507 +	TMonth iMonth;
  1.1508 +	TInt iDay;
  1.1509 +	TInt iHour;
  1.1510 +	TInt iMinute;
  1.1511 +	TInt iSecond;
  1.1512 +	TInt iMicroSecond;
  1.1513 +	};
  1.1514 +
  1.1515 +
  1.1516 +
  1.1517 +
  1.1518 +/**
  1.1519 +@publishedAll
  1.1520 +@released
  1.1521 +
  1.1522 +Represents a time interval of a millionth of a second stored as
  1.1523 +a 64-bit integer. 
  1.1524 +
  1.1525 +It supports the initialisation, setting and getting of an interval and provides
  1.1526 +standard comparison operations. Objects of this class can be added to and
  1.1527 +subtracted from TTime objects.
  1.1528 +
  1.1529 +@see TTime
  1.1530 +*/
  1.1531 +class TTimeIntervalMicroSeconds
  1.1532 +	{
  1.1533 +public:
  1.1534 +	inline TTimeIntervalMicroSeconds();
  1.1535 +	inline TTimeIntervalMicroSeconds(const TInt64& aInterval);
  1.1536 +	inline TTimeIntervalMicroSeconds& operator=(const TInt64& aInterval);
  1.1537 +	inline TBool operator==(const TTimeIntervalMicroSeconds& aInterval) const;
  1.1538 +	inline TBool operator!=(const TTimeIntervalMicroSeconds& aInterval) const;
  1.1539 +	inline TBool operator>=(const TTimeIntervalMicroSeconds& aInterval) const;
  1.1540 +	inline TBool operator<=(const TTimeIntervalMicroSeconds& aInterval) const;
  1.1541 +	inline TBool operator>(const TTimeIntervalMicroSeconds& aInterval) const;
  1.1542 +	inline TBool operator<(const TTimeIntervalMicroSeconds& aInterval) const;
  1.1543 +	inline const TInt64& Int64() const;
  1.1544 +private:
  1.1545 +	TInt64 iInterval;
  1.1546 +	};
  1.1547 +
  1.1548 +
  1.1549 +
  1.1550 +
  1.1551 +/**
  1.1552 +@publishedAll
  1.1553 +@released
  1.1554 +
  1.1555 +Provides a base class for all time interval classes using
  1.1556 +a 32-bit representation. 
  1.1557 +
  1.1558 +It supports retrieving the interval and provides various operations for
  1.1559 +comparing intervals. Its concrete derived classes can be added to and
  1.1560 +subtracted from a TTime.
  1.1561 +
  1.1562 +The comparison operators simply compare the integer representations of the 
  1.1563 +two intervals. They do not take account of different time interval units. 
  1.1564 +So, for example, when comparing for equality an interval of three hours with 
  1.1565 +an interval of three days, the result is true.
  1.1566 +
  1.1567 +@see TTime
  1.1568 +*/
  1.1569 +class TTimeIntervalBase
  1.1570 +	{
  1.1571 +public:
  1.1572 +	inline TBool operator==(TTimeIntervalBase aInterval) const;
  1.1573 +	inline TBool operator!=(TTimeIntervalBase aInterval) const;
  1.1574 +	inline TBool operator>=(TTimeIntervalBase aInterval) const;
  1.1575 +	inline TBool operator<=(TTimeIntervalBase aInterval) const;
  1.1576 +	inline TBool operator>(TTimeIntervalBase aInterval) const;
  1.1577 +	inline TBool operator<(TTimeIntervalBase aInterval) const;
  1.1578 +	inline TInt Int() const;
  1.1579 +protected:
  1.1580 +	inline TTimeIntervalBase();
  1.1581 +	inline TTimeIntervalBase(TInt aInterval);
  1.1582 +protected:
  1.1583 +	TInt iInterval;
  1.1584 +	};
  1.1585 +
  1.1586 +
  1.1587 +
  1.1588 +
  1.1589 +/**
  1.1590 +@publishedAll
  1.1591 +@released
  1.1592 +
  1.1593 +Represents a microsecond time interval stored in 32 rather than 64 bits.
  1.1594 +
  1.1595 +Its range is +-2147483647, which is +-35 minutes, 47 seconds. Comparison and 
  1.1596 +interval retrieval functions are provided by the base class TTimeIntervalBase.
  1.1597 +*/
  1.1598 +class TTimeIntervalMicroSeconds32 : public TTimeIntervalBase
  1.1599 +	{
  1.1600 +public:
  1.1601 +	inline TTimeIntervalMicroSeconds32();
  1.1602 +	inline TTimeIntervalMicroSeconds32(TInt aInterval);
  1.1603 +	inline TTimeIntervalMicroSeconds32& operator=(TInt aInterval);
  1.1604 +	};
  1.1605 +
  1.1606 +
  1.1607 +
  1.1608 +
  1.1609 +/**
  1.1610 +@publishedAll
  1.1611 +@released
  1.1612 +
  1.1613 +Represents a time interval in seconds.
  1.1614 +
  1.1615 +Comparison and interval retrieval functions 
  1.1616 +are provided by the base class TTimeIntervalBase.
  1.1617 +
  1.1618 +The range of values which it can represent is +-2147483647, which is equal to
  1.1619 ++-24855 days (approximately 68 years).
  1.1620 +*/
  1.1621 +class TTimeIntervalSeconds : public TTimeIntervalBase
  1.1622 +	{
  1.1623 +public:
  1.1624 +	inline TTimeIntervalSeconds();
  1.1625 +	inline TTimeIntervalSeconds(TInt aInterval);
  1.1626 +	inline TTimeIntervalSeconds& operator=(TInt aInterval);
  1.1627 +	};
  1.1628 +
  1.1629 +
  1.1630 +
  1.1631 +
  1.1632 +/**
  1.1633 +@publishedAll
  1.1634 +@released
  1.1635 +
  1.1636 +Represents a time interval in minutes.
  1.1637 +
  1.1638 +Comparison and interval retrieval functions 
  1.1639 +are provided by the base class TTimeIntervalBase.
  1.1640 +*/
  1.1641 +class TTimeIntervalMinutes : public TTimeIntervalBase
  1.1642 +	{
  1.1643 +public:
  1.1644 +	inline TTimeIntervalMinutes();
  1.1645 +	inline TTimeIntervalMinutes(TInt aInterval);
  1.1646 +	inline TTimeIntervalMinutes& operator=(TInt aInterval);
  1.1647 +	};
  1.1648 +
  1.1649 +
  1.1650 +
  1.1651 +
  1.1652 +/**
  1.1653 +@publishedAll
  1.1654 +@released
  1.1655 +
  1.1656 +Represents a time interval in hours.
  1.1657 +
  1.1658 +Comparison and interval retrieval functions 
  1.1659 +are provided by the base class TTimeIntervalBase.
  1.1660 +*/
  1.1661 +class TTimeIntervalHours : public TTimeIntervalBase
  1.1662 +	{
  1.1663 +public:
  1.1664 +	inline TTimeIntervalHours();
  1.1665 +	inline TTimeIntervalHours(TInt aInterval);
  1.1666 +	inline TTimeIntervalHours& operator=(TInt aInterval);
  1.1667 +	};
  1.1668 +
  1.1669 +
  1.1670 +
  1.1671 +
  1.1672 +/**
  1.1673 +@publishedAll
  1.1674 +@released
  1.1675 +
  1.1676 +Represents a time interval in days.
  1.1677 +
  1.1678 +Comparison and interval retrieval functions 
  1.1679 +are provided by the base class TTimeIntervalBase.
  1.1680 +*/
  1.1681 +class TTimeIntervalDays : public TTimeIntervalBase
  1.1682 +	{
  1.1683 +public:
  1.1684 +	inline TTimeIntervalDays();
  1.1685 +	inline TTimeIntervalDays(TInt aInterval);
  1.1686 +	inline TTimeIntervalDays& operator=(TInt aInterval);
  1.1687 +	};
  1.1688 +
  1.1689 +
  1.1690 +
  1.1691 +
  1.1692 +/**
  1.1693 +@publishedAll
  1.1694 +@released
  1.1695 +
  1.1696 +Represents a time interval in months.
  1.1697 +
  1.1698 +Comparison and interval retrieval functions 
  1.1699 +are provided by the base class TTimeIntervalBase.
  1.1700 +*/
  1.1701 +class TTimeIntervalMonths : public TTimeIntervalBase
  1.1702 +	{
  1.1703 +public:
  1.1704 +	inline TTimeIntervalMonths();
  1.1705 +	inline TTimeIntervalMonths(TInt aInterval);
  1.1706 +	inline TTimeIntervalMonths& operator=(TInt aInterval);
  1.1707 +	};
  1.1708 +
  1.1709 +
  1.1710 +
  1.1711 +
  1.1712 +/**
  1.1713 +@publishedAll
  1.1714 +@released
  1.1715 +
  1.1716 +Represents a time interval in years.
  1.1717 +
  1.1718 +Comparison and interval retrieval functions 
  1.1719 +are provided by the base class TTimeIntervalBase.
  1.1720 +*/
  1.1721 +class TTimeIntervalYears : public TTimeIntervalBase
  1.1722 +	{
  1.1723 +public:
  1.1724 +	inline TTimeIntervalYears();
  1.1725 +	inline TTimeIntervalYears(TInt aInterval);
  1.1726 +	inline TTimeIntervalYears& operator=(TInt aInterval);
  1.1727 +	};
  1.1728 +	
  1.1729 +	
  1.1730 +	
  1.1731 +/**
  1.1732 +@publishedAll
  1.1733 +@released
  1.1734 +
  1.1735 +An enumeration one or both of whose enumerator values may be returned
  1.1736 +by TTime::Parse().
  1.1737 +
  1.1738 +@see TTime::Parse
  1.1739 +*/
  1.1740 +enum {
  1.1741 +     /**
  1.1742 +     Indicates that a time is present.
  1.1743 +     
  1.1744 +     @see TTime::Parse
  1.1745 +     */
  1.1746 +     EParseTimePresent=0x1,
  1.1747 +     /**
  1.1748 +     Indicates that a date is present.
  1.1749 +     
  1.1750 +     @see TTime::Parse
  1.1751 +     */
  1.1752 +     EParseDatePresent=0x2
  1.1753 +     };
  1.1754 +
  1.1755 +
  1.1756 +
  1.1757 +class TLocale;
  1.1758 +/**
  1.1759 +@publishedAll
  1.1760 +@released
  1.1761 +
  1.1762 +Stores and manipulates the date and time. 
  1.1763 +
  1.1764 +It represents a date and time as a number of microseconds since midnight, 
  1.1765 +January 1st, 1 AD nominal Gregorian. BC dates are represented by negative 
  1.1766 +TTime values. A TTime object may be constructed from a TInt64, a TDateTime 
  1.1767 +a string literal, or by default, which initialises the time to an arbitrary 
  1.1768 +value. To access human-readable time information, the TTime may be converted 
  1.1769 +from a TInt64 into a TDateTime, which represents the date and time as seven 
  1.1770 +numeric fields and provides functions to extract these fields. Alternatively, 
  1.1771 +to display the time as text, the time may be formatted and placed into a
  1.1772 +descriptor using a variety of formatting commands and which may or may not
  1.1773 +honour the system's locale settings. The conversion between time and text may
  1.1774 +be performed the other way around, so that a descriptor can be parsed and
  1.1775 +converted into a TTime value.
  1.1776 +
  1.1777 +In addition to setting and getting the date and time and converting between 
  1.1778 +text and time, TTime provides functions to get intervals between times and 
  1.1779 +standard comparison and arithmetic operators which enable time intervals to 
  1.1780 +be added or subtracted to or from the time.
  1.1781 +
  1.1782 +@see TInt64
  1.1783 +@see TDateTime
  1.1784 +*/
  1.1785 +class TTime
  1.1786 +	{
  1.1787 +public:
  1.1788 +	inline TTime();
  1.1789 +	inline TTime(const TInt64& aTime);
  1.1790 +	IMPORT_C TTime(const TDesC& aString);
  1.1791 +	IMPORT_C TTime(const TDateTime& aDateTime);
  1.1792 +	inline TTime& operator=(const TInt64& aTime);
  1.1793 +	IMPORT_C TTime& operator=(const TDateTime& aDateTime);
  1.1794 +	IMPORT_C void HomeTime();
  1.1795 +	IMPORT_C void UniversalTime();
  1.1796 +	IMPORT_C TInt Set(const TDesC& aString);
  1.1797 +	IMPORT_C TInt HomeTimeSecure();
  1.1798 +	IMPORT_C TInt UniversalTimeSecure();
  1.1799 +
  1.1800 +	IMPORT_C TDateTime DateTime() const;
  1.1801 +	IMPORT_C TTimeIntervalMicroSeconds MicroSecondsFrom(TTime aTime) const;
  1.1802 +	IMPORT_C TInt SecondsFrom(TTime aTime,TTimeIntervalSeconds& aInterval) const;
  1.1803 +	IMPORT_C TInt MinutesFrom(TTime aTime,TTimeIntervalMinutes& aInterval) const;
  1.1804 +	IMPORT_C TInt HoursFrom(TTime aTime,TTimeIntervalHours& aInterval) const;
  1.1805 +	IMPORT_C TTimeIntervalDays DaysFrom(TTime aTime) const;
  1.1806 +	IMPORT_C TTimeIntervalMonths MonthsFrom(TTime aTime) const;
  1.1807 +	IMPORT_C TTimeIntervalYears YearsFrom(TTime aTime) const;
  1.1808 +
  1.1809 +	IMPORT_C TInt DaysInMonth() const;
  1.1810 +	IMPORT_C TDay DayNoInWeek() const;
  1.1811 +	IMPORT_C TInt DayNoInMonth() const;
  1.1812 +	IMPORT_C TInt DayNoInYear() const;
  1.1813 +	IMPORT_C TInt DayNoInYear(TTime aStartDate) const;
  1.1814 +	IMPORT_C TInt WeekNoInYear() const;
  1.1815 +	IMPORT_C TInt WeekNoInYear(TTime aStartDate) const;
  1.1816 +	IMPORT_C TInt WeekNoInYear(TFirstWeekRule aRule) const;
  1.1817 +	IMPORT_C TInt WeekNoInYear(TTime aStartDate,TFirstWeekRule aRule) const;
  1.1818 +	IMPORT_C void FormatL(TDes& aDes,const TDesC& aFormat) const;
  1.1819 +	IMPORT_C void FormatL(TDes& aDes,const TDesC& aFormat,const TLocale& aLocale) const;
  1.1820 +	IMPORT_C void RoundUpToNextMinute();
  1.1821 +	IMPORT_C TInt Parse(const TDesC& aDes,TInt aCenturyOffset=0);
  1.1822 +
  1.1823 +	IMPORT_C TTime operator+(TTimeIntervalYears aYear) const;
  1.1824 +	IMPORT_C TTime operator+(TTimeIntervalMonths aMonth) const;
  1.1825 +	IMPORT_C TTime operator+(TTimeIntervalDays aDay) const;
  1.1826 +	IMPORT_C TTime operator+(TTimeIntervalHours aHour) const;
  1.1827 +	IMPORT_C TTime operator+(TTimeIntervalMinutes aMinute) const;
  1.1828 +	IMPORT_C TTime operator+(TTimeIntervalSeconds aSecond) const;  	
  1.1829 +	IMPORT_C TTime operator+(TTimeIntervalMicroSeconds aMicroSecond) const;
  1.1830 +	IMPORT_C TTime operator+(TTimeIntervalMicroSeconds32 aMicroSecond) const;
  1.1831 +	IMPORT_C TTime operator-(TTimeIntervalYears aYear) const;
  1.1832 +	IMPORT_C TTime operator-(TTimeIntervalMonths aMonth) const;
  1.1833 +	IMPORT_C TTime operator-(TTimeIntervalDays aDay) const;
  1.1834 +	IMPORT_C TTime operator-(TTimeIntervalHours aHour) const;
  1.1835 +	IMPORT_C TTime operator-(TTimeIntervalMinutes aMinute) const;
  1.1836 +	IMPORT_C TTime operator-(TTimeIntervalSeconds aSecond) const;  	
  1.1837 +	IMPORT_C TTime operator-(TTimeIntervalMicroSeconds aMicroSecond) const;
  1.1838 +	IMPORT_C TTime operator-(TTimeIntervalMicroSeconds32 aMicroSecond) const;
  1.1839 +	IMPORT_C TTime& operator+=(TTimeIntervalYears aYear);
  1.1840 +	IMPORT_C TTime& operator+=(TTimeIntervalMonths aMonth);
  1.1841 +	IMPORT_C TTime& operator+=(TTimeIntervalDays aDay);
  1.1842 +	IMPORT_C TTime& operator+=(TTimeIntervalHours aHour);
  1.1843 +	IMPORT_C TTime& operator+=(TTimeIntervalMinutes aMinute);
  1.1844 +	IMPORT_C TTime& operator+=(TTimeIntervalSeconds aSecond);	
  1.1845 +	IMPORT_C TTime& operator+=(TTimeIntervalMicroSeconds aMicroSecond);
  1.1846 +	IMPORT_C TTime& operator+=(TTimeIntervalMicroSeconds32 aMicroSecond);
  1.1847 +	IMPORT_C TTime& operator-=(TTimeIntervalYears aYear);
  1.1848 +	IMPORT_C TTime& operator-=(TTimeIntervalMonths aMonth);
  1.1849 +	IMPORT_C TTime& operator-=(TTimeIntervalDays aDay);
  1.1850 +	IMPORT_C TTime& operator-=(TTimeIntervalHours aHour);
  1.1851 +	IMPORT_C TTime& operator-=(TTimeIntervalMinutes aMinute);
  1.1852 +	IMPORT_C TTime& operator-=(TTimeIntervalSeconds aSecond);	
  1.1853 +	IMPORT_C TTime& operator-=(TTimeIntervalMicroSeconds aMicroSecond);
  1.1854 +	IMPORT_C TTime& operator-=(TTimeIntervalMicroSeconds32 aMicroSecond);
  1.1855 +	inline TBool operator==(TTime aTime) const;
  1.1856 +	inline TBool operator!=(TTime aTime) const;
  1.1857 +	inline TBool operator>=(TTime aTime) const;
  1.1858 +	inline TBool operator<=(TTime aTime) const;
  1.1859 +	inline TBool operator>(TTime aTime) const;
  1.1860 +	inline TBool operator<(TTime aTime) const;
  1.1861 +	inline const TInt64& Int64() const;
  1.1862 +private:
  1.1863 +	static TTime Convert(const TDateTime& aDateTime);
  1.1864 +private:
  1.1865 +	TInt64 iTime;
  1.1866 +	__DECLARE_TEST;
  1.1867 +	};
  1.1868 +
  1.1869 +
  1.1870 +
  1.1871 +
  1.1872 +/**
  1.1873 +@publishedAll
  1.1874 +@released
  1.1875 +
  1.1876 +A utility class whose functions may be used by the other date/time related 
  1.1877 +classes.
  1.1878 +*/
  1.1879 +class Time
  1.1880 +	{
  1.1881 +public:
  1.1882 +	IMPORT_C static TTime NullTTime();
  1.1883 +	IMPORT_C static TTime MaxTTime();
  1.1884 +	IMPORT_C static TTime MinTTime();
  1.1885 +	IMPORT_C static TInt DaysInMonth(TInt aYear, TMonth aMonth);
  1.1886 +	IMPORT_C static TBool IsLeapYear(TInt aYear);
  1.1887 +	IMPORT_C static TInt LeapYearsUpTo(TInt aYear);
  1.1888 +	};
  1.1889 +
  1.1890 +
  1.1891 +
  1.1892 +
  1.1893 +/**
  1.1894 +@publishedAll
  1.1895 +@released
  1.1896 +
  1.1897 +Gets a copy of the current locale's full text name for a day of the week.
  1.1898 +
  1.1899 +After construction or after a call to Set(), the copy of the text can be accessed 
  1.1900 +and manipulated using the standard descriptor member functions provided by 
  1.1901 +the base class.
  1.1902 +
  1.1903 +@see KMaxDayName
  1.1904 +*/
  1.1905 +class TDayName : public TBuf<KMaxDayName>
  1.1906 +	{
  1.1907 +public:
  1.1908 +	IMPORT_C TDayName();
  1.1909 +	IMPORT_C TDayName(TDay aDay);
  1.1910 +	IMPORT_C void Set(TDay aDay);
  1.1911 +	};
  1.1912 +
  1.1913 +
  1.1914 +
  1.1915 +
  1.1916 +/**
  1.1917 +@publishedAll
  1.1918 +@released
  1.1919 +
  1.1920 +Gets a copy of the current locale's abbreviated text name for a day of the 
  1.1921 +week.
  1.1922 +
  1.1923 +After construction or after a call to Set(), the copy of the abbreviated text 
  1.1924 +can be accessed and manipulated using the standard descriptor member functions 
  1.1925 +provided by the base class.
  1.1926 +
  1.1927 +The abbreviated day name cannot be assumed to be one character. In English, 
  1.1928 +it is 3 characters (Mon, Tue, Wed etc.), but the length can vary from locale 
  1.1929 +to locale, with a maximum length of KMaxDayNameAbb.
  1.1930 +
  1.1931 +@see KMaxDayNameAbb
  1.1932 +*/
  1.1933 +class TDayNameAbb : public TBuf<KMaxDayNameAbb>
  1.1934 +	{
  1.1935 +public:
  1.1936 +	IMPORT_C TDayNameAbb();
  1.1937 +	IMPORT_C TDayNameAbb(TDay aDay);
  1.1938 +	IMPORT_C void Set(TDay aDay);
  1.1939 +	};
  1.1940 +
  1.1941 +
  1.1942 +
  1.1943 +
  1.1944 +/**
  1.1945 +@publishedAll
  1.1946 +@released
  1.1947 +
  1.1948 +Gets a copy of the current locale's full text name for a month.
  1.1949 +
  1.1950 +After construction or after a call to Set(), the copy of the text can be accessed 
  1.1951 +and manipulated using the standard descriptor member functions provided by 
  1.1952 +the base class.
  1.1953 +
  1.1954 +@see KMaxMonthName
  1.1955 +*/
  1.1956 +class TMonthName : public TBuf<KMaxMonthName>
  1.1957 +	{
  1.1958 +public:
  1.1959 +	IMPORT_C TMonthName();
  1.1960 +	IMPORT_C TMonthName(TMonth aMonth);
  1.1961 +	IMPORT_C void Set(TMonth aMonth);
  1.1962 +	};
  1.1963 +
  1.1964 +
  1.1965 +
  1.1966 +
  1.1967 +/**
  1.1968 +@publishedAll
  1.1969 +@released
  1.1970 +
  1.1971 +Gets a copy of the current locale's abbreviated text name for a month.
  1.1972 +
  1.1973 +After construction or after a call to Set(), the copy of the abbreviated text 
  1.1974 +can be accessed and manipulated using the standard descriptor member functions 
  1.1975 +provided by the base class.
  1.1976 +
  1.1977 +@see KMaxMonthNameAbb
  1.1978 +*/
  1.1979 +class TMonthNameAbb : public TBuf<KMaxMonthNameAbb>
  1.1980 +	{
  1.1981 +public:
  1.1982 +	IMPORT_C TMonthNameAbb();
  1.1983 +	IMPORT_C TMonthNameAbb(TMonth aMonth);
  1.1984 +	IMPORT_C void Set(TMonth aMonth);
  1.1985 +	};
  1.1986 +
  1.1987 +
  1.1988 +
  1.1989 +
  1.1990 +/**
  1.1991 +@publishedAll
  1.1992 +@released
  1.1993 +
  1.1994 +Gets a copy of the current locale's date suffix text for a specific day in 
  1.1995 +the month.
  1.1996 +
  1.1997 +The text is the set of characters which can be appended to dates of the month 
  1.1998 +(e.g. in English, st for 1st, nd for 2nd etc).
  1.1999 +
  1.2000 +After construction or after a call to Set(), the copy of the suffix text can 
  1.2001 +be accessed and manipulated using the standard descriptor member functions 
  1.2002 +provided by the base class.
  1.2003 +*/
  1.2004 +class TDateSuffix : public TBuf<KMaxSuffix>
  1.2005 +	{
  1.2006 +public:
  1.2007 +	IMPORT_C TDateSuffix();
  1.2008 +	IMPORT_C TDateSuffix(TInt aDateSuffix);
  1.2009 +	IMPORT_C void Set(TInt aDateSuffix);
  1.2010 +	};
  1.2011 +
  1.2012 +
  1.2013 +
  1.2014 +
  1.2015 +/**
  1.2016 +@publishedAll
  1.2017 +@released
  1.2018 +
  1.2019 +Current locale's am/pm text
  1.2020 +
  1.2021 +This class retrieves a copy of the current locale's text identifying time 
  1.2022 +before and after noon. In English, this is am and pm.
  1.2023 +
  1.2024 +After construction or after a call to Set(), the copy of the text can be accessed 
  1.2025 +and manipulated using the standard descriptor member functions provided by 
  1.2026 +the base class.
  1.2027 +*/
  1.2028 +class TAmPmName : public TBuf<KMaxAmPmName>
  1.2029 +	{
  1.2030 +public:
  1.2031 +	IMPORT_C TAmPmName();
  1.2032 +	IMPORT_C TAmPmName(TAmPm aSelector);
  1.2033 +	IMPORT_C void Set(TAmPm aSelector);
  1.2034 +	};
  1.2035 +
  1.2036 +
  1.2037 +
  1.2038 +
  1.2039 +/**
  1.2040 +@publishedAll
  1.2041 +@released
  1.2042 +
  1.2043 +Gets a copy of the currency symbol(s) in use by the current locale.
  1.2044 +
  1.2045 +After construction or after a call to TCurrencySymbol::Set(), the copy of 
  1.2046 +the currency symbol(s) can be accessed and manipulated using the standard 
  1.2047 +descriptor member functions provided by the base class.
  1.2048 +*/
  1.2049 +class TCurrencySymbol : public TBuf<KMaxCurrencySymbol>
  1.2050 +	{
  1.2051 +public:
  1.2052 +	IMPORT_C TCurrencySymbol();
  1.2053 +	IMPORT_C void Set();
  1.2054 +	};
  1.2055 +
  1.2056 +
  1.2057 +
  1.2058 +
  1.2059 +/**
  1.2060 +@publishedAll
  1.2061 +@released
  1.2062 +
  1.2063 +Contains a format list that defines the short date format.
  1.2064 +
  1.2065 +An instance of this class should be passed as the second argument
  1.2066 +to TTime::FormatL().
  1.2067 +The string does not include any time components. The content of the long 
  1.2068 +date format specification is taken from the system-wide settings.
  1.2069 +
  1.2070 +For example, in the English locale, the short date format would be something
  1.2071 +like 14/1/2000.
  1.2072 +
  1.2073 +This class is used as follows:
  1.2074 +
  1.2075 +@code
  1.2076 +TTime now;
  1.2077 +now.HomeTime();
  1.2078 +TBuf<KMaxShortDateFormatSpec*2> buffer;
  1.2079 +now.FormatL(buffer,TShortDateFormatSpec());
  1.2080 +@endcode
  1.2081 +
  1.2082 +@see KMaxShortDateFormatSpec
  1.2083 +@see TTime::FormatL
  1.2084 +*/
  1.2085 +class TShortDateFormatSpec : public TBuf<KMaxShortDateFormatSpec> // to be passed into TTime::FormatL
  1.2086 +	{
  1.2087 +public:
  1.2088 +	IMPORT_C TShortDateFormatSpec();
  1.2089 +	IMPORT_C void Set();
  1.2090 +	};
  1.2091 +
  1.2092 +
  1.2093 +
  1.2094 +
  1.2095 +/**
  1.2096 +@publishedAll
  1.2097 +@released
  1.2098 +
  1.2099 +Contains a format list that defines the long date format.
  1.2100 +
  1.2101 +An instance of this class should be passed as the second argument
  1.2102 +to TTime::FormatL(). 
  1.2103 +The string does not include any time components. The content of the long 
  1.2104 +date format specification is taken from the system-wide settings.
  1.2105 +
  1.2106 +For example, in the English locale, the long date format would be
  1.2107 +something like 14th January 2000.
  1.2108 +
  1.2109 +This class is used as follows:
  1.2110 +
  1.2111 +@code
  1.2112 +TTime now;
  1.2113 +now.HomeTime();
  1.2114 +TBuf<KMaxLongDateFormatSpec*2> buffer;
  1.2115 +now.FormatL(buffer,TLongDateFormatSpec());
  1.2116 +@endcode
  1.2117 +
  1.2118 +@see KMaxLongDateFormatSpec
  1.2119 +@see TTime::FormatL
  1.2120 +*/
  1.2121 +class TLongDateFormatSpec : public TBuf<KMaxLongDateFormatSpec> // to be passed into TTime::FormatL
  1.2122 +	{
  1.2123 +public:
  1.2124 +	IMPORT_C TLongDateFormatSpec();
  1.2125 +	IMPORT_C void Set();
  1.2126 +	};
  1.2127 +
  1.2128 +
  1.2129 +
  1.2130 +
  1.2131 +/**
  1.2132 +@publishedAll
  1.2133 +@released
  1.2134 +
  1.2135 +Contains a format list that defines the time string format. 
  1.2136 +
  1.2137 +An instance of this class should be passed as the second argument
  1.2138 +to TTime::FormatL().
  1.2139 +The string does not include any time components. The content of the time format 
  1.2140 +specification is taken from the system-wide settings.
  1.2141 +
  1.2142 +This class is used as follows:
  1.2143 +
  1.2144 +@code
  1.2145 +TTime now;
  1.2146 +now.HomeTime();
  1.2147 +TBuf<KMaxTimeFormatSpec*2> buffer;
  1.2148 +now.FormatL(buffer,TTimeFormatSpec());
  1.2149 +@endcode
  1.2150 +
  1.2151 +@see KMaxTimeFormatSpec
  1.2152 +@see TTime::FormatL
  1.2153 +*/
  1.2154 +class TTimeFormatSpec : public TBuf<KMaxTimeFormatSpec> // to be passed into TTime::FormatL
  1.2155 +	{
  1.2156 +public:
  1.2157 +	IMPORT_C TTimeFormatSpec();
  1.2158 +	IMPORT_C void Set();
  1.2159 +	};
  1.2160 +
  1.2161 +
  1.2162 +
  1.2163 +
  1.2164 +/**
  1.2165 +@publishedAll
  1.2166 +@released
  1.2167 +
  1.2168 +Sets and gets the system's locale settings.
  1.2169 +
  1.2170 +Symbian OS maintains the locale information internally. On
  1.2171 +construction, this object is initialized with the system information
  1.2172 +for all locale items.
  1.2173 +*/
  1.2174 +class TLocale
  1.2175 +	{
  1.2176 +public:
  1.2177 +		
  1.2178 +    /**
  1.2179 +    Indicates how negative currency values are formatted.
  1.2180 +    */
  1.2181 +	enum TNegativeCurrencyFormat
  1.2182 +		{
  1.2183 +	    /**
  1.2184 +	    A minus sign is inserted before the currency symbol and value.
  1.2185 +	    */
  1.2186 +		ELeadingMinusSign,
  1.2187 +
  1.2188 +		/**
  1.2189 +		The currency value and symbol are enclosed in brackets (no minus sign
  1.2190 +		is used).
  1.2191 +		*/
  1.2192 +		EInBrackets, //this one must be non-zero for binary compatibility with the old TBool TLocale::iCurrencyNegativeInBrackets which was exposed in the binary interface because it was accessed via *inline* functions
  1.2193 +			
  1.2194 +	    /**
  1.2195 +	    A minus sign is inserted after the currency symbol and value.
  1.2196 +        */
  1.2197 +		ETrailingMinusSign,
  1.2198 +		
  1.2199 +        /**
  1.2200 +        A minus sign is inserted between the currency symbol and the value.
  1.2201 +        */
  1.2202 +		EInterveningMinusSign
  1.2203 +		};
  1.2204 +		
  1.2205 +	/**
  1.2206 +	Flags for negative currency values formatting
  1.2207 +	*/
  1.2208 +	enum 
  1.2209 +		{
  1.2210 +		/** 
  1.2211 +		If this flag is set and the currency value being formatted is negative,
  1.2212 +		if there is a space between the currency symbol and the value,
  1.2213 +		that space is lost. 
  1.2214 +		*/
  1.2215 +		EFlagNegativeLoseSpace = 0x00000001,
  1.2216 +		
  1.2217 +		/**   
  1.2218 +		If this flag is set and the currency value being formatted is negative,
  1.2219 +		the position of the currency symbol is placed in the opposite direction 
  1.2220 +		from the position set for the positive currency value. 
  1.2221 +		*/
  1.2222 +		EFlagNegativeCurrencySymbolOpposite=0x00000002
  1.2223 +		};
  1.2224 +	/** Indicates how the device universal time is maintained */
  1.2225 +	enum TDeviceTimeState
  1.2226 +		{
  1.2227 +		/** Universal time is maintained by the device RTC and the user selection 
  1.2228 +		of the locale of the device indicating offset from GMT and daylight saving*/
  1.2229 +		EDeviceUserTime,
  1.2230 +
  1.2231 +		/** Universal time and offset from GMT is supplied by the mobile network
  1.2232 +		and maintained by device RTC */
  1.2233 +		ENITZNetworkTimeSync
  1.2234 +		};
  1.2235 +public:
  1.2236 +	IMPORT_C TLocale();
  1.2237 +	inline TLocale(TInt);
  1.2238 +	IMPORT_C void Refresh();
  1.2239 +	IMPORT_C TInt Set() const;
  1.2240 +	IMPORT_C void FormatCurrency(TDes& aText, TInt aAmount);
  1.2241 +	IMPORT_C void FormatCurrency(TDes& aText, TInt64 aAmount);
  1.2242 +	IMPORT_C void FormatCurrency(TDes& aText, TDesOverflow& aOverflowHandler, TInt aAmount); 
  1.2243 +	IMPORT_C void FormatCurrency(TDes& aText, TDesOverflow& aOverflowHandler, TInt64 aAmount); 
  1.2244 +	
  1.2245 +	inline TInt CountryCode() const;
  1.2246 +	inline void SetCountryCode(TInt aCode);
  1.2247 +	inline TTimeIntervalSeconds UniversalTimeOffset() const;
  1.2248 +	inline TDateFormat DateFormat() const;
  1.2249 +	inline void SetDateFormat(TDateFormat aFormat);
  1.2250 +	inline TTimeFormat TimeFormat() const;
  1.2251 +	inline void SetTimeFormat(TTimeFormat aFormat);
  1.2252 +	inline TLocalePos CurrencySymbolPosition() const;
  1.2253 +	inline void SetCurrencySymbolPosition(TLocalePos aPos);
  1.2254 +	inline TBool CurrencySpaceBetween() const;
  1.2255 +	inline void SetCurrencySpaceBetween(TBool aSpace);
  1.2256 +	inline TInt CurrencyDecimalPlaces() const;
  1.2257 +	inline void SetCurrencyDecimalPlaces(TInt aPlaces);
  1.2258 +	inline TBool CurrencyNegativeInBrackets() const;        // These two functions are deprecated
  1.2259 +	inline void SetCurrencyNegativeInBrackets(TBool aBool); // They are here to maintain compatibility. Use the New functions -> NegativeCurrencyFormat setter/getter. 
  1.2260 + 	inline TBool CurrencyTriadsAllowed() const;  
  1.2261 +	inline void SetCurrencyTriadsAllowed(TBool aBool);
  1.2262 +	inline TChar ThousandsSeparator() const;
  1.2263 +	inline void SetThousandsSeparator(const TChar& aChar);
  1.2264 +	inline TChar DecimalSeparator() const;
  1.2265 +	inline void SetDecimalSeparator(const TChar& aChar);
  1.2266 +	inline TChar DateSeparator(TInt aIndex) const;
  1.2267 +	inline void SetDateSeparator(const TChar& aChar,TInt aIndex);
  1.2268 +	inline TChar TimeSeparator(TInt aIndex) const;
  1.2269 +	inline void SetTimeSeparator(const TChar& aChar,TInt aIndex);
  1.2270 +	inline TBool AmPmSpaceBetween() const;
  1.2271 +	inline void SetAmPmSpaceBetween(TBool aSpace);
  1.2272 +	inline TLocalePos AmPmSymbolPosition() const;
  1.2273 +	inline void SetAmPmSymbolPosition(TLocalePos aPos);
  1.2274 +	inline TUint DaylightSaving() const;
  1.2275 +	inline TBool QueryHomeHasDaylightSavingOn() const;
  1.2276 +	inline TDaylightSavingZone HomeDaylightSavingZone() const;
  1.2277 +	inline TUint WorkDays() const;
  1.2278 +	inline void SetWorkDays(TUint aMask);
  1.2279 +	inline TDay StartOfWeek() const;
  1.2280 +	inline void SetStartOfWeek(TDay aDay);
  1.2281 +	inline TClockFormat ClockFormat() const;
  1.2282 +	inline void SetClockFormat(TClockFormat aFormat);
  1.2283 +	inline TUnitsFormat UnitsGeneral() const;
  1.2284 +	inline void SetUnitsGeneral(TUnitsFormat aFormat);
  1.2285 +	inline TUnitsFormat UnitsDistanceShort() const;
  1.2286 +	inline void SetUnitsDistanceShort(TUnitsFormat aFormat);
  1.2287 +	inline TUnitsFormat UnitsDistanceLong() const;
  1.2288 +	inline void SetUnitsDistanceLong(TUnitsFormat aFormat);
  1.2289 +	inline TNegativeCurrencyFormat NegativeCurrencyFormat() const;
  1.2290 +	inline void SetNegativeCurrencyFormat(TNegativeCurrencyFormat aNegativeCurrencyFormat);
  1.2291 +	inline TBool NegativeLoseSpace() const;
  1.2292 +	inline void SetNegativeLoseSpace(TBool aBool);
  1.2293 +	inline TBool NegativeCurrencySymbolOpposite() const;
  1.2294 +	inline void SetNegativeCurrencySymbolOpposite(TBool aBool);
  1.2295 +	inline TLanguage LanguageDowngrade(TInt aIndex) const;	 // 0 <= aIndex < 3
  1.2296 +	inline void SetLanguageDowngrade(TInt aIndex, TLanguage aLanguage);
  1.2297 +	inline TDigitType DigitType() const;
  1.2298 +	inline void SetDigitType(TDigitType aDigitType);
  1.2299 +	inline TDeviceTimeState DeviceTime() const;
  1.2300 + 	inline void SetDeviceTime(TDeviceTimeState aState);
  1.2301 + 	inline TInt RegionCode() const;
  1.2302 +
  1.2303 +	void SetDefaults(); /**< @internalComponent */
  1.2304 +
  1.2305 +private:
  1.2306 +	friend class TExtendedLocale;
  1.2307 +private:
  1.2308 +	TInt iCountryCode;
  1.2309 +	TTimeIntervalSeconds iUniversalTimeOffset;
  1.2310 +	TDateFormat iDateFormat;
  1.2311 +	TTimeFormat iTimeFormat;
  1.2312 +	TLocalePos iCurrencySymbolPosition;
  1.2313 +	TBool iCurrencySpaceBetween;
  1.2314 +	TInt iCurrencyDecimalPlaces;
  1.2315 +	TNegativeCurrencyFormat iNegativeCurrencyFormat; //	replaced TBool iCurrencyNegativeInBrackets
  1.2316 +	TBool iCurrencyTriadsAllowed;
  1.2317 +	TChar iThousandsSeparator;
  1.2318 +	TChar iDecimalSeparator;
  1.2319 +	TChar iDateSeparator[KMaxDateSeparators];
  1.2320 +	TChar iTimeSeparator[KMaxTimeSeparators];
  1.2321 +	TLocalePos iAmPmSymbolPosition;
  1.2322 +	TBool iAmPmSpaceBetween;
  1.2323 +	TUint iDaylightSaving;
  1.2324 +	TDaylightSavingZone iHomeDaylightSavingZone;
  1.2325 +	TUint iWorkDays;
  1.2326 +	TDay iStartOfWeek;
  1.2327 +	TClockFormat iClockFormat;
  1.2328 +	TUnitsFormat iUnitsGeneral;
  1.2329 +	TUnitsFormat iUnitsDistanceShort;
  1.2330 +	TUnitsFormat iUnitsDistanceLong;
  1.2331 +	TUint iExtraNegativeCurrencyFormatFlags;
  1.2332 +	TUint16 iLanguageDowngrade[3];
  1.2333 +	TUint16 iRegionCode;
  1.2334 +	TDigitType iDigitType;
  1.2335 + 	TDeviceTimeState iDeviceTimeState;
  1.2336 + 	TInt iSpare[0x1E];
  1.2337 +	};
  1.2338 +
  1.2339 +/** 
  1.2340 +@publishedAll
  1.2341 +@released
  1.2342 +
  1.2343 +TLocaleAspect
  1.2344 +
  1.2345 +Enumeration used with TExtendedLocale::LoadLocaleAspect to select which
  1.2346 +locale information is to be replaced from the contents of the Locale
  1.2347 +DLL being loaded.
  1.2348 +
  1.2349 +ELocaleLanguageSettings - Replaces everything that should change with
  1.2350 +                          language selection e.g. Month names, Day names,
  1.2351 +                          etc,
  1.2352 +
  1.2353 +ELocaleLocaleSettings - Replaces the currently selected currency symbol,
  1.2354 +                        TLocale settings, and FAT utility functions
  1.2355 +
  1.2356 +ELocaleTimeAndDateSettings - Replaces the current time and date display
  1.2357 +                             format settings.
  1.2358 +
  1.2359 +ELocaleCollateSettings - Replaces the "system" preferred Charset
  1.2360 +                         (because that's where the collation table
  1.2361 +                         is!). The "Default" charset will remain
  1.2362 +                         unchanged until after the next power
  1.2363 +                         off/on cycle
  1.2364 +*/
  1.2365 +enum TLocaleAspect
  1.2366 +	{
  1.2367 +	ELocaleLanguageSettings = 0x01,
  1.2368 +	ELocaleCollateSetting = 0x02,
  1.2369 +	ELocaleLocaleSettings = 0x04,
  1.2370 +	ELocaleTimeDateSettings = 0x08,
  1.2371 +	};
  1.2372 +
  1.2373 +/**
  1.2374 +@internalComponent
  1.2375 +*/
  1.2376 +struct SLocaleLanguage
  1.2377 +	{
  1.2378 +	TLanguage 		iLanguage;
  1.2379 +	const TText*	iDateSuffixTable;
  1.2380 +	const TText*	iDayTable;
  1.2381 +	const TText*	iDayAbbTable;
  1.2382 +	const TText*	iMonthTable;
  1.2383 +	const TText*	iMonthAbbTable;
  1.2384 +	const TText*	iAmPmTable;
  1.2385 +	const TText16* const*	iMsgTable;
  1.2386 +	};
  1.2387 +
  1.2388 +/**
  1.2389 +@internalComponent
  1.2390 +*/
  1.2391 +struct SLocaleLocaleSettings
  1.2392 +	{
  1.2393 +	TText	iCurrencySymbol[KMaxCurrencySymbol+1];
  1.2394 +	TAny*	iLocaleExtraSettingsDllPtr;
  1.2395 +	};
  1.2396 +
  1.2397 +/**
  1.2398 +@internalComponent
  1.2399 +*/
  1.2400 +struct SLocaleTimeDateFormat
  1.2401 +	{
  1.2402 +	TText	iShortDateFormatSpec[KMaxShortDateFormatSpec+1];
  1.2403 +	TText	iLongDateFormatSpec[KMaxLongDateFormatSpec+1];
  1.2404 +	TText	iTimeFormatSpec[KMaxTimeFormatSpec+1];
  1.2405 +	TAny*	iLocaleTimeDateFormatDllPtr;
  1.2406 +	};
  1.2407 +
  1.2408 +struct LCharSet;
  1.2409 +
  1.2410 +/**
  1.2411 +@publishedAll
  1.2412 +@released
  1.2413 +
  1.2414 +Extended locale class
  1.2415 +
  1.2416 +This class holds a collection of locale information. It contains a TLocale internally.
  1.2417 +It has methods to load a locale DLL and to set the system wide locale information.
  1.2418 +
  1.2419 +*/
  1.2420 +class TExtendedLocale
  1.2421 +	{
  1.2422 +public:
  1.2423 +
  1.2424 +	// Default constructor, create an empty instance
  1.2425 +	IMPORT_C TExtendedLocale();
  1.2426 +
  1.2427 +	// Initialise to (or restore from!) current system wide locale
  1.2428 +	// settings
  1.2429 +	IMPORT_C void LoadSystemSettings();
  1.2430 +	
  1.2431 +	// Overwrite current system wide locale settings with the current
  1.2432 +	// contents of this TExtendedLocale
  1.2433 +	IMPORT_C TInt SaveSystemSettings();
  1.2434 +
  1.2435 +	//load a complete locale data from a single locale dll
  1.2436 +	IMPORT_C TInt LoadLocale(const TDesC& aLocaleDllName);
  1.2437 +	
  1.2438 +	//load a complete locale data from three locale dlls, which are language lcoale dll, region locale dll, and collation locale dll.
  1.2439 +	IMPORT_C TInt LoadLocale(const TDesC& aLanguageLocaleDllName, const TDesC& aRegionLocaleDllName, const TDesC& aCollationLocaleDllName);	
  1.2440 +	
  1.2441 +	// Load an additional Locale DLL and over-ride a selected subset
  1.2442 +	// (currently ELocaleLanguageSettings to select an alternative set
  1.2443 +	// of language specific text strings, ELocaleCollateSetting to
  1.2444 +	// select a new system collation table,
  1.2445 +	// ELocaleOverRideMatchCollationTable to locally select an
  1.2446 +	// alternative collation order for matching text strings, or
  1.2447 +	// ELocaleOverRideSortCollationTable for ordering text strings)
  1.2448 +	// of settings with its contents
  1.2449 +	IMPORT_C TInt LoadLocaleAspect(TUint aAspectGroup, const TDesC& aLocaleDllName);
  1.2450 +	
  1.2451 +	//load a locale aspect from a locale dll. 
  1.2452 +	//Such as load language locale aspect from locale language dll; 
  1.2453 +	//load region locale aspect from locale region dll; 
  1.2454 +	//load collation locale aspect from locale collation dll. 
  1.2455 +	//There are in all three aspect, which are langauge, region, and collation.
  1.2456 +	IMPORT_C TInt LoadLocaleAspect(const TDesC& aLocaleDllName);
  1.2457 +
  1.2458 +	// Set the currency Symbol
  1.2459 +	IMPORT_C TInt SetCurrencySymbol(const TDesC &aSymbol);
  1.2460 +
  1.2461 +	// Get the name of the DLL holding the data for a particular set
  1.2462 +	// of Locale properties
  1.2463 +	IMPORT_C TInt GetLocaleDllName(TLocaleAspect aLocaleDataSet, TDes& aDllName);
  1.2464 +
  1.2465 +	// Get the preferred collation method.
  1.2466 +	// Note that some Charsets may contain more than one Collation
  1.2467 +	// method (e.g "dictionary" v "phonebook" ordering) so an optional
  1.2468 +	// index parameter can be used to select between them
  1.2469 +	IMPORT_C TCollationMethod GetPreferredCollationMethod(TInt index = 0) ;
  1.2470 +	
  1.2471 +	//Get the Currency Symbol
  1.2472 +	IMPORT_C TPtrC GetCurrencySymbol();
  1.2473 +	
  1.2474 +	//Get the Long Date Format
  1.2475 +	IMPORT_C TPtrC GetLongDateFormatSpec();
  1.2476 +	
  1.2477 +	//Get the Short Date Format
  1.2478 +	IMPORT_C TPtrC GetShortDateFormatSpec();
  1.2479 +	
  1.2480 +	//Get the Time Format
  1.2481 +	IMPORT_C TPtrC GetTimeFormatSpec();
  1.2482 +
  1.2483 +	// Retrieve a reference to the encapsulated TLocale
  1.2484 +	inline TLocale*	GetLocale();
  1.2485 +
  1.2486 +private:
  1.2487 +
  1.2488 +	TInt DoLoadLocale(const TDesC& aLocaleDllName, TLibraryFunction* aExportList);
  1.2489 +	void DoUpdateLanguageSettings(TLibraryFunction* aExportList);
  1.2490 +	void DoUpdateLocaleSettings(TLibraryFunction* aExportList);
  1.2491 +	void DoUpdateTimeDateFormat(TLibraryFunction* aExportList);
  1.2492 +	
  1.2493 +#ifdef SYMBIAN_DISTINCT_LOCALE_MODEL	
  1.2494 +	void DoUpdateLanguageSettingsV2(TLibraryFunction* aExportList);
  1.2495 +	void DoUpdateLocaleSettingsV2(TLibraryFunction* aExportList);		
  1.2496 +	TInt CheckLocaleDllName(const TDesC& aLocaleDllName, TInt& languageID);
  1.2497 +	void AddExtension(TDes& aFileName, TInt aExtension);	
  1.2498 +#endif
  1.2499 +
  1.2500 +private:
  1.2501 +
  1.2502 +	TLocale					iLocale;
  1.2503 +	SLocaleLanguage			iLanguageSettings;
  1.2504 +	SLocaleLocaleSettings	iLocaleExtraSettings;
  1.2505 +	SLocaleTimeDateFormat	iLocaleTimeDateFormat;
  1.2506 +	const LCharSet*			iDefaultCharSet;
  1.2507 +	const LCharSet*			iPreferredCharSet;
  1.2508 +	};
  1.2509 +
  1.2510 +
  1.2511 +
  1.2512 +
  1.2513 +/**
  1.2514 +@publishedAll
  1.2515 +@released
  1.2516 +
  1.2517 +Geometric rectangle.
  1.2518 +
  1.2519 +The class represents a rectangle whose sides are parallel with the axes of 
  1.2520 +the co-ordinate system. 
  1.2521 +
  1.2522 +The co-ordinates of the top-left and bottom-right corners are used to set 
  1.2523 +the dimensions of the rectangle. The bottom right co-ordinate is outside the 
  1.2524 +rectangle. Thus TRect(TPoint(2,2),TSize(4,4)) is equal
  1.2525 +to TRect(TPoint(2,2),TPoint(6,6)), 
  1.2526 +and in both cases you get a 4x4 pixel rectangle on the screen.
  1.2527 +
  1.2528 +Functions are provided to initialise and manipulate the rectangle and to extract 
  1.2529 +information about it.
  1.2530 +*/
  1.2531 +class TRect
  1.2532 +	{
  1.2533 +public:
  1.2534 +	enum TUninitialized { EUninitialized };
  1.2535 +	/**
  1.2536 +	Constructs a default rectangle.
  1.2537 +	
  1.2538 +	This initialises the co-ordinates of its top 
  1.2539 +	left and bottom right corners to (0,0).
  1.2540 +	*/
  1.2541 +	TRect(TUninitialized) {}
  1.2542 +	IMPORT_C TRect();
  1.2543 +	IMPORT_C TRect(TInt aAx,TInt aAy,TInt aBx,TInt aBy);
  1.2544 +	IMPORT_C TRect(const TPoint& aPointA,const TPoint& aPointB);
  1.2545 +	IMPORT_C TRect(const TPoint& aPoint,const TSize& aSize);
  1.2546 +	IMPORT_C TRect(const TSize& aSize);
  1.2547 +	IMPORT_C TBool operator==(const TRect& aRect) const;
  1.2548 +	IMPORT_C TBool operator!=(const TRect& aRect) const;
  1.2549 +	IMPORT_C void SetRect(TInt aAx,TInt aAy,TInt aBx,TInt aBy);
  1.2550 +	IMPORT_C void SetRect(const TPoint& aPointTL,const TPoint& aPointBR);
  1.2551 +	IMPORT_C void SetRect(const TPoint& aPoint,const TSize& aSize);
  1.2552 +	IMPORT_C void Move(TInt aDx,TInt aDy);
  1.2553 +	IMPORT_C void Move(const TPoint& aOffset);
  1.2554 +	IMPORT_C void Resize(TInt aDx,TInt aDy);
  1.2555 +	IMPORT_C void Resize(const TSize& aSize);
  1.2556 +	IMPORT_C void Shrink(TInt aDx,TInt aDy);
  1.2557 +	IMPORT_C void Shrink(const TSize& aSize);
  1.2558 +	IMPORT_C void Grow(TInt aDx,TInt aDy);
  1.2559 +	IMPORT_C void Grow(const TSize& aSize);
  1.2560 +	IMPORT_C void BoundingRect(const TRect& aRect);
  1.2561 +	IMPORT_C TBool IsEmpty() const;
  1.2562 +	IMPORT_C TBool Intersects(const TRect& aRect) const;
  1.2563 +	IMPORT_C void Intersection(const TRect& aRect);
  1.2564 +	IMPORT_C void Normalize();
  1.2565 +	IMPORT_C TBool Contains(const TPoint& aPoint) const;
  1.2566 +	IMPORT_C TSize Size() const;
  1.2567 +	IMPORT_C TInt Width() const;
  1.2568 +	IMPORT_C TInt Height() const;
  1.2569 +	IMPORT_C TBool IsNormalized() const;
  1.2570 +	IMPORT_C TPoint Center() const;
  1.2571 +	IMPORT_C void SetSize(const TSize& aSize);
  1.2572 +	IMPORT_C void SetWidth(TInt aWidth);
  1.2573 +	IMPORT_C void SetHeight(TInt aHeight);
  1.2574 +private:
  1.2575 +	void Adjust(TInt aDx,TInt aDy);
  1.2576 +public:
  1.2577 +	/**
  1.2578 +	The x and y co-ordinates of the top left hand corner of the rectangle.
  1.2579 +	*/
  1.2580 +	TPoint iTl;
  1.2581 +	
  1.2582 +	/**
  1.2583 +	The x and y co-ordinates of the bottom right hand corner of the rectangle.
  1.2584 +	*/
  1.2585 +	TPoint iBr;
  1.2586 +	};
  1.2587 +
  1.2588 +
  1.2589 +
  1.2590 +
  1.2591 +/**
  1.2592 +@publishedAll
  1.2593 +@released
  1.2594 +
  1.2595 +Clipping region - abstract base class. 
  1.2596 +
  1.2597 +This abstract base class represents a 2-dimensional area which is used by 
  1.2598 +Graphics, the graphics window server, and the text window server to define 
  1.2599 +regions of the display which need to be updated, or regions within which all 
  1.2600 +operations must occur. 
  1.2601 +
  1.2602 +A TRegion is defined in terms of an array of TRects and the more complex the 
  1.2603 +region, the more TRects are required to represent it.
  1.2604 +
  1.2605 +A clipping region initially has space allocated for five rectangles.
  1.2606 +If manipulations result in a region which requires more than this, an attempt
  1.2607 +is made to allocate more rectangles. If this cannot be done, an error flag
  1.2608 +is set, and all subsequent operations involving the region have no effect
  1.2609 +(except possibly to propagate the error flag to other regions).
  1.2610 +The CheckError() member function allows 
  1.2611 +the error flag to be tested; Clear() can be used to clear it.
  1.2612 +
  1.2613 +The redraw logic of application programs may use the TRegion in various ways:
  1.2614 +
  1.2615 +1. minimally, they pass it to the graphics context as the clipping region; when 
  1.2616 +   a graphics context is activated to a window, the clipping region is set up 
  1.2617 +   automatically
  1.2618 +
  1.2619 +2. if they wish to avoid redrawing objects which are outside the general area 
  1.2620 +   of the region, they may use TRegion::BoundingRect() to return the rectangle 
  1.2621 +   which bounds the clipping region, and draw only primitives that lie within 
  1.2622 +   that rectangle
  1.2623 +
  1.2624 +3. if they wish to exercise finer control, they may extract the individual rectangles 
  1.2625 +   that comprise the clipping region using Operator[]().
  1.2626 +
  1.2627 +Application programs may also manipulate clipping regions in order to constrain 
  1.2628 +parts of their redrawing to narrower areas of the screen than the clipping 
  1.2629 +region offered by the window server. To do this, functions that allow clipping 
  1.2630 +region manipulation may be used; for example, adding or removing rectangles 
  1.2631 +or finding the intersection or union of two regions.
  1.2632 +*/
  1.2633 +class TRegion
  1.2634 +	{
  1.2635 +public:
  1.2636 +	inline TInt Count() const;
  1.2637 +	inline const TRect* RectangleList() const;
  1.2638 +	inline TBool CheckError() const;
  1.2639 +	IMPORT_C TBool IsEmpty() const;
  1.2640 +	IMPORT_C TRect BoundingRect() const;
  1.2641 +	IMPORT_C const TRect& operator[](TInt aIndex) const;
  1.2642 +	IMPORT_C void Copy(const TRegion& aRegion);
  1.2643 +	IMPORT_C void AddRect(const TRect& aRect);
  1.2644 +	IMPORT_C void SubRect(const TRect& aRect,TRegion* aSubtractedRegion=NULL);
  1.2645 +	IMPORT_C void Offset(TInt aXoffset,TInt aYoffset);
  1.2646 +	IMPORT_C void Offset(const TPoint& aOffset);
  1.2647 +	IMPORT_C void Union(const TRegion& aRegion);
  1.2648 +	IMPORT_C void Intersection(const TRegion& aRegion,const TRegion& aRegion2);
  1.2649 +	IMPORT_C void Intersect(const TRegion& aRegion);
  1.2650 +	IMPORT_C void SubRegion(const TRegion& aRegion,TRegion* aSubtractedRegion=NULL);
  1.2651 +	IMPORT_C void ClipRect(const TRect& aRect);
  1.2652 +	IMPORT_C void Clear();
  1.2653 +	IMPORT_C void Tidy();
  1.2654 +	IMPORT_C TInt Sort();
  1.2655 +	IMPORT_C TInt Sort(const TPoint& aOffset);
  1.2656 +	IMPORT_C void ForceError();
  1.2657 +	IMPORT_C TBool IsContainedBy(const TRect& aRect) const;
  1.2658 +	IMPORT_C TBool Contains(const TPoint& aPoint) const;
  1.2659 +	IMPORT_C TBool Intersects(const TRect& aRect) const;	
  1.2660 +protected:
  1.2661 +	IMPORT_C TRect* RectangleListW();
  1.2662 +	IMPORT_C TRegion(TInt aAllocedRects);
  1.2663 +	inline TRegion();
  1.2664 +	TBool SetListSize(TInt aCount);
  1.2665 +	void AppendRect(const TRect& aRect);
  1.2666 +	void DeleteRect(TRect* aRect);
  1.2667 +	void AppendRegion(TRegion& aRegion);
  1.2668 +	void MergeRect(const TRect& aRect, TBool aEnclosed);
  1.2669 +	void SubtractRegion(const TRegion &aRegion,TRegion *aSubtractedRegion=NULL);
  1.2670 +	void ShrinkRegion();
  1.2671 +	TRect* ExpandRegion(TInt aCount);
  1.2672 +protected:
  1.2673 +	TInt iCount;
  1.2674 +	TBool iError;
  1.2675 +	TInt iAllocedRects;
  1.2676 +protected:
  1.2677 +	enum {ERRegionBuf=0x40000000};
  1.2678 +	};
  1.2679 +
  1.2680 +
  1.2681 +
  1.2682 +
  1.2683 +/**
  1.2684 +@publishedAll
  1.2685 +@released
  1.2686 +
  1.2687 +Expandable region.
  1.2688 +
  1.2689 +This class provides for the construction and destruction of a TRegion, including 
  1.2690 +a granularity for expanding the region. A region;s granularity represents 
  1.2691 +the number of memory slots allocated when the object is created, and the number 
  1.2692 +of new memory slots allocated each time an RRegion is expanded beyond the 
  1.2693 +number of free slots. The default granularity is five.
  1.2694 +*/
  1.2695 +class RRegion : public TRegion
  1.2696 +	{
  1.2697 +private:
  1.2698 +	enum {EDefaultGranularity=5};
  1.2699 +protected:
  1.2700 +	IMPORT_C RRegion(TInt aBuf,TInt aGran);
  1.2701 +public:
  1.2702 +	IMPORT_C RRegion();
  1.2703 +	IMPORT_C RRegion(TInt aGran);
  1.2704 +	IMPORT_C RRegion(const RRegion& aRegion);
  1.2705 +	IMPORT_C RRegion(const TRect& aRect,TInt aGran=EDefaultGranularity);
  1.2706 +	IMPORT_C RRegion(TInt aCount,TRect* aRectangleList,TInt aGran=EDefaultGranularity);
  1.2707 +	IMPORT_C void Close();
  1.2708 +	IMPORT_C void Destroy();
  1.2709 +	inline TInt CheckSpare() const;
  1.2710 +private:
  1.2711 +	TInt iGranularity;
  1.2712 +	TRect* iRectangleList;
  1.2713 +	friend class TRegion;
  1.2714 +	};
  1.2715 +
  1.2716 +
  1.2717 +
  1.2718 +
  1.2719 +/**
  1.2720 +@publishedAll
  1.2721 +@released
  1.2722 +
  1.2723 +Region with pre-allocated buffer. 
  1.2724 +
  1.2725 +This class provides the functionality of an RRegion, but in addition, for 
  1.2726 +optimisation purposes, uses a buffer containing pre-allocated space for as 
  1.2727 +many rectangles as are specified in the granularity. 
  1.2728 +
  1.2729 +When this buffer is full, cell allocation takes place as for an RRegion, and 
  1.2730 +the RRegionBuf effectively becomes an RRegion. In this case, the region does 
  1.2731 +not revert to using the buffer, even if the region were to shrink so that 
  1.2732 +the buffer could, once again, contain the region. When the region is no longer 
  1.2733 +required, call Close(), defined in the base class RRegion, to free up all 
  1.2734 +memory.
  1.2735 +*/
  1.2736 +template <TInt S>
  1.2737 +class RRegionBuf : public RRegion
  1.2738 +	{
  1.2739 +public:
  1.2740 +	inline RRegionBuf();
  1.2741 +	inline RRegionBuf(const RRegion& aRegion);
  1.2742 +	inline RRegionBuf(const RRegionBuf<S>& aRegion);
  1.2743 +	inline RRegionBuf(const TRect& aRect);
  1.2744 +private:
  1.2745 +	TInt8 iRectangleBuf[S*sizeof(TRect)];
  1.2746 +	};
  1.2747 +
  1.2748 +
  1.2749 +
  1.2750 +
  1.2751 +/**
  1.2752 +@publishedAll
  1.2753 +@released
  1.2754 +
  1.2755 +A fixed size region.
  1.2756 +
  1.2757 +The region consists of a fixed number of rectangles; this number is specified 
  1.2758 +in the templated argument. The region cannot be expanded to contain more than 
  1.2759 +this number of rectangles. If an attempt is made to do so, the region's 
  1.2760 +error flag is set, and the region is cleared.
  1.2761 +
  1.2762 +Note that when adding a rectangle to a region, if that rectangle overlaps 
  1.2763 +an existing rectangle, the operation causes more than one rectangle to be 
  1.2764 +created.
  1.2765 +*/
  1.2766 +template <TInt S>
  1.2767 +class TRegionFix : public TRegion
  1.2768 +	{
  1.2769 +public:
  1.2770 +	inline TRegionFix();
  1.2771 +	inline TRegionFix(const TRect& aRect);
  1.2772 +	inline TRegionFix(const TRegionFix<S>& aRegion);
  1.2773 +private:
  1.2774 +	TInt8 iRectangleBuf[S*sizeof(TRect)];
  1.2775 +	};
  1.2776 +
  1.2777 +
  1.2778 +
  1.2779 +
  1.2780 +/**
  1.2781 +@publishedAll
  1.2782 +@released
  1.2783 +
  1.2784 +Base class for searching for global kernel objects.
  1.2785 +
  1.2786 +This is the base class for a number of classes which are used to find specific 
  1.2787 +types of global kernel object such as semaphores, threads and mutexes;
  1.2788 +TFindSemaphore, TFindThread and TFindMutex are typical examples of such
  1.2789 +derived classes.
  1.2790 +
  1.2791 +The class implements the common behaviour, specifically, the storage of the 
  1.2792 +match pattern which is used to search for object names.
  1.2793 +
  1.2794 +This class is not intended to be explicitly instantiated; it has public
  1.2795 +constructors but they are part of the class implementation and are described
  1.2796 +for information only.
  1.2797 +*/
  1.2798 +class TFindHandleBase : public TFindHandle
  1.2799 +	{
  1.2800 +public:
  1.2801 +	IMPORT_C TFindHandleBase();
  1.2802 +	IMPORT_C TFindHandleBase(const TDesC& aMatch);
  1.2803 +	IMPORT_C void Find(const TDesC& aMatch);
  1.2804 +protected:
  1.2805 +	TInt NextObject(TFullName& aResult,TInt aObjectType);
  1.2806 +private:
  1.2807 +	
  1.2808 +	/**
  1.2809 +	The full name of the last kernel side object found.
  1.2810 +	*/
  1.2811 +	TFullName iMatch;
  1.2812 +	};
  1.2813 +
  1.2814 +
  1.2815 +
  1.2816 +
  1.2817 +/**
  1.2818 +@publishedAll
  1.2819 +@released
  1.2820 +
  1.2821 +Finds all global semaphores whose full names match a specified pattern.
  1.2822 +
  1.2823 +The match pattern can be set into the TFindSemaphore object at construction; 
  1.2824 +it can also be changed at any time after construction by using the Find() 
  1.2825 +member function of the TFindHandleBase base class.
  1.2826 +
  1.2827 +After construction, the Next() member function can be used repeatedly to find 
  1.2828 +successive global semaphores whose full names match the current pattern.
  1.2829 +
  1.2830 +A successful call to Next() means that a matching global semaphore has been 
  1.2831 +found. To open a handle on this semaphore, call the RSemaphore::Open() function 
  1.2832 +and pass a reference to this TFindSemaphore.
  1.2833 +
  1.2834 +Pattern matching is part of descriptor behaviour.
  1.2835 +
  1.2836 +@see TFindHandleBase::Find
  1.2837 +@see TFindSemaphore::Next
  1.2838 +@see RSemaphore::Open
  1.2839 +@see TDesC16::Match
  1.2840 +@see TDesC8::Match
  1.2841 +*/
  1.2842 +class TFindSemaphore : public TFindHandleBase
  1.2843 +	{
  1.2844 +public:
  1.2845 +	inline TFindSemaphore();
  1.2846 +	inline TFindSemaphore(const TDesC& aMatch);
  1.2847 +	IMPORT_C TInt Next(TFullName& aResult);
  1.2848 +	};
  1.2849 +
  1.2850 +
  1.2851 +
  1.2852 +
  1.2853 +/**
  1.2854 +@publishedAll
  1.2855 +@released
  1.2856 +
  1.2857 +Finds all global mutexes whose full names match a specified pattern.
  1.2858 +
  1.2859 +The match pattern can be set into the object at construction; it can also 
  1.2860 +be changed at any time after construction by using the Find() member function 
  1.2861 +of the base class.
  1.2862 +
  1.2863 +After construction, the Next() member function may be used repeatedly to find 
  1.2864 +successive global mutexes whose full names match the current pattern.
  1.2865 +
  1.2866 +A successful call to Next() means that a matching global mutex has been found. 
  1.2867 +To open a handle on this mutex, call the Open() member function of RMutex 
  1.2868 +and pass a reference to this TFindMutex object.
  1.2869 +
  1.2870 +Pattern matching is part of descriptors behaviour.
  1.2871 +
  1.2872 +@see TFindHandleBase::Find
  1.2873 +@see TFindMutex::Next
  1.2874 +@see RMutex::Open
  1.2875 +@see TDesC16::Match
  1.2876 +@see TDesC8::Match
  1.2877 +*/
  1.2878 +class TFindMutex : public TFindHandleBase
  1.2879 +	{
  1.2880 +public:
  1.2881 +	inline TFindMutex();
  1.2882 +	inline TFindMutex(const TDesC& aMatch);
  1.2883 +	IMPORT_C TInt Next(TFullName& aResult);
  1.2884 +	};
  1.2885 +
  1.2886 +
  1.2887 +
  1.2888 +
  1.2889 +/**
  1.2890 +@publishedAll
  1.2891 +@released
  1.2892 +
  1.2893 +Searches for all global chunks by pattern matching against the names of (Kernel 
  1.2894 +side) chunk objects.
  1.2895 +
  1.2896 +The match pattern can be set into this object at construction; it can also 
  1.2897 +be changed at any time after construction by using TFindHandleBase::Find().
  1.2898 +
  1.2899 +After construction, call TFindChunk::Next() repeatedly to find successive 
  1.2900 +chunks whose names match the current pattern. A successful call
  1.2901 +to TFindChunk::Next() means that a matching chunk has been found.
  1.2902 +
  1.2903 +@see TFindHandleBase
  1.2904 +*/
  1.2905 +class TFindChunk : public TFindHandleBase
  1.2906 +	{
  1.2907 +public:
  1.2908 +	inline TFindChunk();
  1.2909 +	inline TFindChunk(const TDesC& aMatch);
  1.2910 +	IMPORT_C TInt Next(TFullName& aResult);
  1.2911 +	};
  1.2912 +
  1.2913 +
  1.2914 +
  1.2915 +
  1.2916 +
  1.2917 +/**
  1.2918 +@publishedAll
  1.2919 +@released
  1.2920 +
  1.2921 +Searches for threads by pattern matching against the names
  1.2922 +of thread objects.
  1.2923 +
  1.2924 +The match pattern can be set into this object at construction; it can also be
  1.2925 +changed at any time after construction by using TFindHandleBase::Find().
  1.2926 +
  1.2927 +After construction, call TFindThread::Next() repeatedly to find successive
  1.2928 +threads whose names match the current pattern.
  1.2929 +A successful call to TFindThread::Next() means that a matching thread has
  1.2930 +been found. To open a handle on this thread, call RThread::Open() and pass
  1.2931 +a reference to this TFindThread.
  1.2932 +
  1.2933 +@see RThread
  1.2934 +*/
  1.2935 +class TFindThread : public TFindHandleBase
  1.2936 +	{
  1.2937 +public:
  1.2938 +	inline TFindThread();
  1.2939 +	inline TFindThread(const TDesC& aMatch);
  1.2940 +	IMPORT_C TInt Next(TFullName& aResult);
  1.2941 +	};
  1.2942 +
  1.2943 +
  1.2944 +
  1.2945 +
  1.2946 +/**
  1.2947 +@publishedAll
  1.2948 +@released
  1.2949 +
  1.2950 +Searches for processes by pattern matching against the names
  1.2951 +of process objects.
  1.2952 +
  1.2953 +The match pattern can be set into this object at construction; it can also be
  1.2954 +changed at any time after construction by using TFindHandleBase::Find().
  1.2955 +
  1.2956 +After construction, call TFindProcess::Next() repeatedly to find successive
  1.2957 +processes whose names match the current pattern.
  1.2958 +A successful call to TFindProcess::Next() means that a matching process has
  1.2959 +been found. To open a handle on this process, call RProcess::Open() and pass
  1.2960 +a reference to this TFindProcess.
  1.2961 +
  1.2962 +@see RProcess
  1.2963 +*/
  1.2964 +class TFindProcess : public TFindHandleBase
  1.2965 +	{
  1.2966 +public:
  1.2967 +	inline TFindProcess();
  1.2968 +	inline TFindProcess(const TDesC& aMatch);
  1.2969 +	IMPORT_C TInt Next(TFullName& aResult);
  1.2970 +	};
  1.2971 +
  1.2972 +
  1.2973 +
  1.2974 +/**
  1.2975 +@publishedAll
  1.2976 +@released
  1.2977 +
  1.2978 +Searches for LDD factory objects by pattern matching against the names of 
  1.2979 + LDD factory objects.
  1.2980 +
  1.2981 +An LDD factory object is an instance of a DLogicalDevice derived class. 
  1.2982 +
  1.2983 +The match pattern can be set into this object at construction; it can also 
  1.2984 +be changed at any time after construction by using TFindHandleBase::Find().
  1.2985 +
  1.2986 +After construction, call TFindLogicalDevice::Next() repeatedly to find successive 
  1.2987 +LDD factory objects whose names match the current pattern. A successful call to 
  1.2988 +TFindLogicalDevice::Next() means that a matching LDD factory object has been found.
  1.2989 +
  1.2990 +The name of an LDD factory object is set by its Install() member function as 
  1.2991 +part of the construction process.
  1.2992 +*/
  1.2993 +class TFindLogicalDevice : public TFindHandleBase
  1.2994 +	{
  1.2995 +public:
  1.2996 +	inline TFindLogicalDevice();
  1.2997 +	inline TFindLogicalDevice(const TDesC& aMatch);
  1.2998 +	IMPORT_C TInt Next(TFullName& aResult);
  1.2999 +	};
  1.3000 +
  1.3001 +/**
  1.3002 +@publishedAll
  1.3003 +@released
  1.3004 +
  1.3005 +Searches for PDD factory objects by pattern matching against the names of
  1.3006 +PDD factory objects.
  1.3007 +
  1.3008 +A PDD factory object is an instance of a DPhysicalDevice derived class. 
  1.3009 +
  1.3010 +The match pattern can be set into this object at construction; it can also be 
  1.3011 +changed at any time after construction by using TFindHandleBase::Find().
  1.3012 +
  1.3013 +After construction, call TFindPhysicalDevice::Next() repeatedly to find successive 
  1.3014 +PDD factory objects whose names match the current pattern. A successful call to 
  1.3015 +TFindPhysicalDevice::Next() means that a matching PDD factory object has been found.
  1.3016 +
  1.3017 +The name of a PDD factory object is set by its Install() member function as part 
  1.3018 +of the construction process.
  1.3019 +*/
  1.3020 +class TFindPhysicalDevice : public TFindHandleBase
  1.3021 +	{
  1.3022 +public:
  1.3023 +	inline TFindPhysicalDevice();
  1.3024 +	inline TFindPhysicalDevice(const TDesC& aMatch);
  1.3025 +	IMPORT_C TInt Next(TFullName& aResult);
  1.3026 +	};
  1.3027 +
  1.3028 +
  1.3029 +
  1.3030 +
  1.3031 +
  1.3032 +/**
  1.3033 +@publishedAll
  1.3034 +@released
  1.3035 +
  1.3036 +Searches for servers by pattern matching against the names of kernel side
  1.3037 +server objects.
  1.3038 +
  1.3039 +The match pattern can be set into this object at construction; it can also
  1.3040 +be changed at any time after construction by using the TFindHandleBase::Find()
  1.3041 +base class.
  1.3042 +
  1.3043 +After construction, call TFindServer::Next() repeatedly to find successive
  1.3044 +servers whose names match the current pattern.
  1.3045 +A successful call to TFindServer::Next() means that a matching server
  1.3046 +has been found.
  1.3047 +*/
  1.3048 +class TFindServer : public TFindHandleBase
  1.3049 +	{
  1.3050 +public:
  1.3051 +	inline TFindServer();
  1.3052 +	inline TFindServer(const TDesC& aMatch);
  1.3053 +	IMPORT_C TInt Next(TFullName& aResult);
  1.3054 +	};
  1.3055 +
  1.3056 +
  1.3057 +
  1.3058 +
  1.3059 +/**
  1.3060 +@publishedAll
  1.3061 +@released
  1.3062 +
  1.3063 +Searches for DLLs whose full names match a specified pattern.
  1.3064 +
  1.3065 +The match pattern is set at construction but can also be changed at any time
  1.3066 +after construction by using TFindHandleBase::Find().
  1.3067 +
  1.3068 +After construction, use TFindLibrary::Next() to repeatedly find successive DLLs
  1.3069 +whose names match the current pattern. A successful call to
  1.3070 +TFindLibrary::Next() means that a matching DLL has been found.
  1.3071 +*/
  1.3072 +class TFindLibrary : public TFindHandleBase
  1.3073 +	{
  1.3074 +public:
  1.3075 +	inline TFindLibrary();
  1.3076 +	inline TFindLibrary(const TDesC& aMatch);
  1.3077 +	IMPORT_C TInt Next(TFullName& aResult);
  1.3078 +	};
  1.3079 +
  1.3080 +
  1.3081 +
  1.3082 +/**
  1.3083 +@publishedAll
  1.3084 +@released
  1.3085 +
  1.3086 +User side handle to an LDD factory object, an instance of a DLogicalDevice 
  1.3087 +derived class.
  1.3088 +
  1.3089 +The LDD factory object is a Kernel side object which is constructed on the 
  1.3090 +Kernel heap when the logical device is opened using User::LoadLogicalDevice(). 
  1.3091 +The handle allows the User side to get information about the logical device.
  1.3092 +
  1.3093 +To use the device, a thread must create and use an instance of an 
  1.3094 +RBusLogicalChannel derived class.
  1.3095 +
  1.3096 +*/
  1.3097 +class RDevice : public RHandleBase
  1.3098 +	{
  1.3099 +public:
  1.3100 +	inline TInt Open(const TFindLogicalDevice& aFind,TOwnerType aType=EOwnerProcess);
  1.3101 +	IMPORT_C TInt Open(const TDesC& aName,TOwnerType aType=EOwnerProcess);
  1.3102 +	IMPORT_C void GetCaps(TDes8& aDes) const;
  1.3103 +	IMPORT_C TBool QueryVersionSupported(const TVersion& aVer) const;
  1.3104 +	IMPORT_C TBool IsAvailable(TInt aUnit, const TDesC* aPhysicalDevice, const TDesC8* anInfo) const;
  1.3105 +	};
  1.3106 +
  1.3107 +/**
  1.3108 +@publishedAll
  1.3109 +@released
  1.3110 +
  1.3111 +Asynchronous timer services. 
  1.3112 +
  1.3113 +Five types of asynchronous request are supported by the class:
  1.3114 +
  1.3115 +1. Requesting an event after a specified interval
  1.3116 +
  1.3117 +2. Requesting an event at a specified system time
  1.3118 +
  1.3119 +3. Requesting a timer event on a specific second fraction
  1.3120 +
  1.3121 +4. Requesting an event if an interval elapses with no user activity.
  1.3122 +
  1.3123 +5. Requesting an event after a specified interval, to a resolution of 1ms.
  1.3124 +   
  1.3125 +Each of these requests can be cancelled.
  1.3126 +
  1.3127 +The timer exists from its creation, following a call to RTimer::CreateLocal(),
  1.3128 +until it is destroyed by a call to the Close() member function of the base
  1.3129 +class RHandleBase.
  1.3130 +
  1.3131 +This class is ultimately implemented in terms of the nanokernel tick, and
  1.3132 +therefore the granularity of the generated events is limited to the period of
  1.3133 +this timer.  This is variant specific, but is usually 1 millisecond.
  1.3134 +
  1.3135 +Note that the CTimer active object uses an RTimer.
  1.3136 +*/
  1.3137 +class RTimer : public RHandleBase
  1.3138 +	{
  1.3139 +public:
  1.3140 +	IMPORT_C TInt CreateLocal();
  1.3141 +	IMPORT_C void Cancel();
  1.3142 +	IMPORT_C void After(TRequestStatus& aStatus,TTimeIntervalMicroSeconds32 anInterval);
  1.3143 +	IMPORT_C void AfterTicks(TRequestStatus &aStatus, TInt aTicks);
  1.3144 +	IMPORT_C void At(TRequestStatus& aStatus,const TTime& aTime);
  1.3145 +	IMPORT_C void AtUTC(TRequestStatus& aStatus,const TTime& aUTCTime);
  1.3146 +	IMPORT_C void Lock(TRequestStatus& aStatus,TTimerLockSpec aLock);
  1.3147 +	IMPORT_C void Inactivity(TRequestStatus& aStatus, TTimeIntervalSeconds aSeconds);
  1.3148 +	IMPORT_C void HighRes(TRequestStatus& aStatus,TTimeIntervalMicroSeconds32 anInterval);
  1.3149 +	};
  1.3150 +
  1.3151 +
  1.3152 +
  1.3153 +
  1.3154 +/**
  1.3155 +@publishedAll
  1.3156 +@released
  1.3157 +
  1.3158 +A handle to a dynamically loadable DLL.
  1.3159 +
  1.3160 +The class is not intended for user derivation.
  1.3161 +*/
  1.3162 +class RLibrary : public RHandleBase
  1.3163 +	{
  1.3164 +public:
  1.3165 +	IMPORT_C void Close();
  1.3166 +	IMPORT_C TInt Load(const TDesC& aFileName, const TUidType& aType);
  1.3167 +	IMPORT_C TInt Load(const TDesC& aFileName, const TDesC& aPath=KNullDesC);
  1.3168 +	IMPORT_C TInt Load(const TDesC& aFileName, const TDesC& aPath, const TUidType& aType);
  1.3169 +	IMPORT_C TInt Load(const TDesC& aFileName, const TDesC& aPath, const TUidType& aType, TUint32 aModuleVersion);
  1.3170 +	IMPORT_C TInt LoadRomLibrary(const TDesC& aFileName, const TDesC& aPath);
  1.3171 +	IMPORT_C TLibraryFunction Lookup(TInt anOrdinal) const;
  1.3172 +	IMPORT_C TUidType Type() const;
  1.3173 +	IMPORT_C TFileName FileName() const;
  1.3174 +	IMPORT_C TInt GetRamSizes(TInt& aCodeSize, TInt& aConstDataSize);
  1.3175 +	IMPORT_C TInt Init(); /**< @internalTechnology */
  1.3176 +public:
  1.3177 +	/**
  1.3178 +	Class representing information about an executable binary, (DLL or EXE).
  1.3179 +	@internalTechnology
  1.3180 +	*/
  1.3181 +	struct TInfo
  1.3182 +		{
  1.3183 +		TUint32 iModuleVersion;			/**< Version number */
  1.3184 +		TUidType iUids;					/**< UIDs */
  1.3185 +		TSecurityInfo iSecurityInfo;	/**< Security Info */
  1.3186 +		};
  1.3187 +
  1.3188 +	/**
  1.3189 +	Class representing information about an executable binary, (DLL or EXE), version 2.
  1.3190 +	@internalTechnology
  1.3191 +	*/
  1.3192 +	struct TInfoV2 : public TInfo
  1.3193 +		{
  1.3194 +		TUint8 iHardwareFloatingPoint;	/**< Which hardware floating point used, from TFloatingPointType */
  1.3195 +		enum TDebugAttributes
  1.3196 +		{
  1.3197 +			EDebugAllowed = 1<<0, ///< Flags set if executable may be debugged.
  1.3198 +			ETraceAllowed = 1<<1 ///< Flags set if executable may be traced.
  1.3199 +		};
  1.3200 +		TUint8 iDebugAttributes; ///< Bitmask of values from enum TDebugAttributes
  1.3201 +		TUint8 iSpare[6];
  1.3202 +		};
  1.3203 +
  1.3204 +	/**
  1.3205 +	Type representing a TInfo struct packaged as a descriptor.
  1.3206 +	@internalTechnology
  1.3207 +	*/
  1.3208 +	typedef TPckgBuf<TInfo> TInfoBuf;
  1.3209 +
  1.3210 +	/**
  1.3211 +	Type representing a TInfo struct packaged as a descriptor, version 2.
  1.3212 +	@internalTechnology
  1.3213 +	*/
  1.3214 +	typedef TPckgBuf<TInfoV2> TInfoBufV2;
  1.3215 +
  1.3216 +	/**
  1.3217 +	@internalTechnology
  1.3218 +	*/
  1.3219 +	enum TRequiredImageHeaderSize
  1.3220 +		{
  1.3221 +#ifdef __WINS__
  1.3222 +		/**
  1.3223 +		Size of header data which should be passed to GetInfoFromHeader()
  1.3224 +		*/
  1.3225 +		KRequiredImageHeaderSize = KMaxTInt
  1.3226 +#else
  1.3227 +		KRequiredImageHeaderSize = 9*1024
  1.3228 +#endif
  1.3229 +		};
  1.3230 +
  1.3231 +	IMPORT_C static TInt GetInfoFromHeader(const TDesC8& aHeader, TDes8& aInfoBuf);
  1.3232 +
  1.3233 +	/**
  1.3234 +	@internalTechnology
  1.3235 +	@deprecated Use TInfo
  1.3236 +	*/
  1.3237 +	struct SInfo
  1.3238 +		{
  1.3239 +		TUint32 iModuleVersion;
  1.3240 +		TUidType iUids;
  1.3241 +		SSecurityInfo iS;
  1.3242 +		};
  1.3243 +
  1.3244 +	/**
  1.3245 +	@internalTechnology
  1.3246 +	@deprecated Use TInfoBuf
  1.3247 +	*/
  1.3248 +	typedef TPckgBuf<SInfo> SInfoBuf;
  1.3249 +
  1.3250 +	/**
  1.3251 +	@internalTechnology
  1.3252 +	*/
  1.3253 +	IMPORT_C static TInt GetInfo(const TDesC& aFileName, TDes8& aInfoBuf);
  1.3254 +private:
  1.3255 +	TInt InitL();
  1.3256 +	};
  1.3257 +
  1.3258 +
  1.3259 +
  1.3260 +
  1.3261 +/**
  1.3262 +@publishedAll
  1.3263 +@released
  1.3264 +
  1.3265 +A handle to a critical section.
  1.3266 +
  1.3267 +A critical section itself is a kernel object, and is implemented using
  1.3268 +a semaphore. The class RCriticalSection inherits privately from RSemaphore
  1.3269 +as a matter of implementation and this is, in effect, equivalent to using
  1.3270 +a semaphore.
  1.3271 +
  1.3272 +The public functions of RSemaphore are not part of the public API of this 
  1.3273 +class.
  1.3274 +
  1.3275 +As with all handles, they should be closed after use. This class provides 
  1.3276 +the necessary Close() function, which should be called when the handle is 
  1.3277 +no longer required.
  1.3278 +
  1.3279 +@see RHandleBase::Close
  1.3280 +*/
  1.3281 +class RCriticalSection : private RSemaphore
  1.3282 +	{
  1.3283 +public:
  1.3284 +	IMPORT_C RCriticalSection();
  1.3285 +	IMPORT_C TInt CreateLocal(TOwnerType aType=EOwnerProcess);
  1.3286 +	IMPORT_C void Close();
  1.3287 +	IMPORT_C void Wait();
  1.3288 +	IMPORT_C void Signal();
  1.3289 +	inline TBool IsBlocked() const;
  1.3290 +private:
  1.3291 +	TInt iBlocked;
  1.3292 +	};
  1.3293 +
  1.3294 +
  1.3295 +
  1.3296 +/**
  1.3297 +@publishedAll
  1.3298 +@released
  1.3299 +
  1.3300 +A handle to a mutex.
  1.3301 +
  1.3302 +The mutex itself is a kernel side object.
  1.3303 +
  1.3304 +Handles should be closed after use. RHandleBase provides the necessary Close() 
  1.3305 +function which should be called when the handle is no longer required.
  1.3306 +
  1.3307 +@see RHandleBase::Close
  1.3308 +*/
  1.3309 +class RMutex : public RHandleBase
  1.3310 +	{
  1.3311 +public:
  1.3312 +	inline TInt Open(const TFindMutex& aFind,TOwnerType aType=EOwnerProcess);
  1.3313 +	IMPORT_C TInt CreateLocal(TOwnerType aType=EOwnerProcess);
  1.3314 +	IMPORT_C TInt CreateGlobal(const TDesC& aName,TOwnerType aType=EOwnerProcess);
  1.3315 +	IMPORT_C TInt OpenGlobal(const TDesC& aName,TOwnerType aType=EOwnerProcess);
  1.3316 +	IMPORT_C TInt Open(RMessagePtr2 aMessage,TInt aParam,TOwnerType aType=EOwnerProcess);
  1.3317 +	IMPORT_C TInt Open(TInt aArgumentIndex, TOwnerType aType=EOwnerProcess);
  1.3318 +	IMPORT_C void Wait();
  1.3319 +	IMPORT_C void Signal();
  1.3320 +	IMPORT_C TBool IsHeld();
  1.3321 +	};
  1.3322 +
  1.3323 +
  1.3324 +
  1.3325 +/**
  1.3326 +@publishedAll
  1.3327 +@released
  1.3328 +
  1.3329 +A handle to a condition variable.
  1.3330 +
  1.3331 +The condition variable itself is a kernel side object.
  1.3332 +
  1.3333 +Handles should be closed after use. RHandleBase provides the necessary Close() 
  1.3334 +function which should be called when the handle is no longer required.
  1.3335 +
  1.3336 +@see RHandleBase::Close
  1.3337 +*/
  1.3338 +class RCondVar : public RHandleBase
  1.3339 +	{
  1.3340 +public:
  1.3341 +	IMPORT_C TInt CreateLocal(TOwnerType aType=EOwnerProcess);
  1.3342 +	IMPORT_C TInt CreateGlobal(const TDesC& aName, TOwnerType aType=EOwnerProcess);
  1.3343 +	IMPORT_C TInt OpenGlobal(const TDesC& aName, TOwnerType aType=EOwnerProcess);
  1.3344 +	IMPORT_C TInt Open(RMessagePtr2 aMessage, TInt aParam, TOwnerType aType=EOwnerProcess);
  1.3345 +	IMPORT_C TInt Open(TInt aArgumentIndex, TOwnerType aType=EOwnerProcess);
  1.3346 +	IMPORT_C TInt Wait(RMutex& aMutex);
  1.3347 +	IMPORT_C TInt TimedWait(RMutex& aMutex, TInt aTimeout);	// timeout in microseconds
  1.3348 +	IMPORT_C void Signal();
  1.3349 +	IMPORT_C void Broadcast();
  1.3350 +	};
  1.3351 +
  1.3352 +
  1.3353 +
  1.3354 +class UserHeap;
  1.3355 +class TChunkCreate;
  1.3356 +struct TChunkCreateInfo;
  1.3357 +/**
  1.3358 +@publishedAll
  1.3359 +@released
  1.3360 +
  1.3361 +A handle to a chunk.
  1.3362 +
  1.3363 +The chunk itself is a kernel side object.
  1.3364 +*/
  1.3365 +class RChunk : public RHandleBase
  1.3366 +	{
  1.3367 +public:
  1.3368 +	/**	
  1.3369 +	Set of flags used by SetRestrictions().
  1.3370 +	
  1.3371 +	@see RChunk::SetRestrictions
  1.3372 +	*/
  1.3373 +	enum TRestrictions
  1.3374 +		{
  1.3375 +		/** Prevent Adjust, Commit, Allocate and Decommit */
  1.3376 +		EPreventAdjust = 0x01,
  1.3377 +		};
  1.3378 +public:
  1.3379 +	inline TInt Open(const TFindChunk& aFind,TOwnerType aType=EOwnerProcess);
  1.3380 +	IMPORT_C TInt CreateLocal(TInt aSize,TInt aMaxSize,TOwnerType aType=EOwnerProcess);
  1.3381 +	IMPORT_C TInt CreateLocalCode(TInt aSize,TInt aMaxSize,TOwnerType aType=EOwnerProcess);
  1.3382 +	IMPORT_C TInt CreateGlobal(const TDesC& aName,TInt aSize,TInt aMaxSize,TOwnerType aType=EOwnerProcess);
  1.3383 +	IMPORT_C TInt CreateDoubleEndedLocal(TInt aInitialBottom, TInt aInitialTop,TInt aMaxSize,TOwnerType aType=EOwnerProcess);
  1.3384 +	IMPORT_C TInt CreateDoubleEndedGlobal(const TDesC& aName,TInt aInitialBottom,TInt aInitialTop,TInt aMaxSize,TOwnerType aType=EOwnerProcess);
  1.3385 +	IMPORT_C TInt CreateDisconnectedLocal(TInt aInitialBottom, TInt aInitialTop,TInt aMaxSize,TOwnerType aType=EOwnerProcess);
  1.3386 +	IMPORT_C TInt CreateDisconnectedGlobal(const TDesC& aName,TInt aInitialBottom,TInt aInitialTop,TInt aMaxSize,TOwnerType aType=EOwnerProcess);
  1.3387 +	IMPORT_C TInt Create(TChunkCreateInfo& aCreateInfo);
  1.3388 +	IMPORT_C TInt SetRestrictions(TUint aFlags);
  1.3389 +	IMPORT_C TInt OpenGlobal(const TDesC& aName,TBool isReadOnly,TOwnerType aType=EOwnerProcess);
  1.3390 +	IMPORT_C TInt Open(RMessagePtr2 aMessage,TInt aParam,TBool isReadOnly,TOwnerType aType=EOwnerProcess);
  1.3391 +	IMPORT_C TInt Open(TInt aArgumentIndex, TOwnerType aType=EOwnerProcess);
  1.3392 +	IMPORT_C TInt Adjust(TInt aNewSize) const;
  1.3393 +	IMPORT_C TInt AdjustDoubleEnded(TInt aBottom, TInt aTop) const;
  1.3394 +	IMPORT_C TInt Commit(TInt anOffset, TInt aSize) const;
  1.3395 +	IMPORT_C TInt Allocate(TInt aSize) const;
  1.3396 +	IMPORT_C TInt Decommit(TInt anOffset, TInt aSize) const;
  1.3397 +	IMPORT_C TInt Unlock(TInt aOffset, TInt aSize);	/**< @internalTechnology */
  1.3398 +	IMPORT_C TInt Lock(TInt aOffset, TInt aSize);	/**< @internalTechnology */
  1.3399 +	IMPORT_C TUint8* Base() const;
  1.3400 +	IMPORT_C TInt Size() const;
  1.3401 +	IMPORT_C TInt Bottom() const;
  1.3402 +	IMPORT_C TInt Top() const;
  1.3403 +	IMPORT_C TInt MaxSize() const;
  1.3404 +	inline TBool IsReadable() const;
  1.3405 +	inline TBool IsWritable() const;
  1.3406 +	IMPORT_C TBool IsPaged() const;
  1.3407 +private:
  1.3408 +	friend class UserHeap;
  1.3409 +	};
  1.3410 +
  1.3411 +
  1.3412 +/**
  1.3413 +This structure specifies the type and properties of the chunk to be created.  It
  1.3414 +is passed as a parameter to the RChunk::Create() method.
  1.3415 +
  1.3416 +@publishedAll
  1.3417 +@released
  1.3418 +*/
  1.3419 +struct TChunkCreateInfo
  1.3420 +	{
  1.3421 +public :
  1.3422 +	/**
  1.3423 +	Currently supported version numbers
  1.3424 +	@internalComponent
  1.3425 +	*/
  1.3426 +	enum TChunkCreateVersions
  1.3427 +		{
  1.3428 +		EVersion0,
  1.3429 +		ESupportedVersions,
  1.3430 +		};
  1.3431 +
  1.3432 +	friend class RChunk;
  1.3433 +
  1.3434 +	/**
  1.3435 +	Attributes that specify whether the chunk to be created	is data paged or not.
  1.3436 +	*/
  1.3437 +	enum TChunkPagingAtt
  1.3438 +		{
  1.3439 +		EUnspecified,	/**< The chunk will use the creating process's paging attributes.*/
  1.3440 +		EPaged,			/**< The chunk will be data paged.*/
  1.3441 +		EUnpaged,		/**< The chunk will not be data paged.*/
  1.3442 +		};
  1.3443 +
  1.3444 +	IMPORT_C TChunkCreateInfo();
  1.3445 +	IMPORT_C void SetNormal(TInt aInitialSize, TInt aMaxSize);
  1.3446 +	IMPORT_C void SetCode(TInt aInitialSize, TInt aMaxSize);
  1.3447 +	IMPORT_C void SetDoubleEnded(TInt aInitialBottom, TInt aInitialTop, TInt aMaxSize);
  1.3448 +	IMPORT_C void SetDisconnected(TInt aInitialBottom, TInt aInitialTop, TInt aMaxSize);
  1.3449 +	IMPORT_C void SetOwner(TOwnerType aType);
  1.3450 +	IMPORT_C void SetGlobal(const TDesC& aName);
  1.3451 +	IMPORT_C void SetClearByte(TUint8 aClearByte);
  1.3452 +	IMPORT_C void SetPaging(const TChunkPagingAtt aPaging);
  1.3453 +	IMPORT_C void SetReadOnly();
  1.3454 +	void SetThreadHeap(TInt aInitialSize, TInt aMaxSize, const TDesC& aName);
  1.3455 +
  1.3456 +	/**
  1.3457 +	For use by file server only.
  1.3458 +	@internalTechnology
  1.3459 +	*/
  1.3460 +	IMPORT_C void SetCache(TInt aMaxSize);
  1.3461 +protected :
  1.3462 +	/** The version number of this TChunkCreateInfo.
  1.3463 +	@internalComponent
  1.3464 +	*/
  1.3465 +	TUint iVersionNumber;
  1.3466 +	/** The type of the chunk to be created.
  1.3467 +	@internalComponent
  1.3468 +	*/
  1.3469 +	TUint iType;
  1.3470 +	/** Specify if chunk is global or not.
  1.3471 +	@internalComponent
  1.3472 +	*/
  1.3473 +	TBool iGlobal;
  1.3474 +	/**	The maximum size in bytes of the chunk to be created.
  1.3475 +	@internalComponent
  1.3476 +	*/
  1.3477 +	TInt iMaxSize;
  1.3478 +	/** An enumeration whose enumerators define the ownership of this chunk 
  1.3479 +		handle. If not explicitly specified, EOwnerProcess is taken as default.
  1.3480 +	@internalComponent
  1.3481 +	*/
  1.3482 +	TOwnerType iOwnerType;
  1.3483 +	/**	A pointer to a descriptor containing the name to be assigned to  
  1.3484 +		global chunks. The length of the descriptor must be no greater than 
  1.3485 +		that allowed for a TKName type.  Must be NULL for local chunks.
  1.3486 +	@internalComponent
  1.3487 +	*/
  1.3488 +	const TDesC* iName;
  1.3489 +	/** The offset of the bottom of the region to commit to the chunk on 
  1.3490 +		creation from the base of the chunk's reserved region.
  1.3491 +		This is only used for double ended and disconnected chunks.
  1.3492 +	@internalComponent
  1.3493 +	*/
  1.3494 +	TInt iInitialBottom;
  1.3495 +	/** The offset of the top of the region to commit to the chunk on 
  1.3496 +		creation from the base of the chunk's reserved region.
  1.3497 +		This is only used for double ended and disconnected chunks.
  1.3498 +	@internalComponent
  1.3499 +	*/
  1.3500 +	TInt iInitialTop;
  1.3501 +	/**	Attributes to the chunk to be created should have.
  1.3502 +		Should be set from one or more the values in TChunkCreate::TChunkCreateAtt.
  1.3503 +	@internalComponent
  1.3504 +	*/
  1.3505 +	TUint iAttributes;
  1.3506 +	/** The byte to clear all the memory committed to the chunk to.
  1.3507 +	@internalComponent
  1.3508 +	*/
  1.3509 +	TUint8 iClearByte; 
  1.3510 +	/** @internalComponent*/
  1.3511 +	TUint8 iSpare1[3];
  1.3512 +	/** @internalComponent*/
  1.3513 +	TUint iSpare2;
  1.3514 +	};
  1.3515 +
  1.3516 +/**
  1.3517 +This structure specifies the type and properties of the user heap to be created.  It
  1.3518 +is passed as a parameter to the UserHeap::Create() method.
  1.3519 +
  1.3520 +@publishedAll
  1.3521 +@released
  1.3522 +*/
  1.3523 +struct TChunkHeapCreateInfo
  1.3524 +	{
  1.3525 +public:
  1.3526 +	/**
  1.3527 +	Currently supported version numbers
  1.3528 +	@internalComponent
  1.3529 +	*/
  1.3530 +	enum TChunkHeapCreateVersions
  1.3531 +		{
  1.3532 +		EVersion0,
  1.3533 +		ESupportedVersions,
  1.3534 +		};
  1.3535 +
  1.3536 +	/**
  1.3537 +	Attributes that specify whether the chunk heap to be created is data paged or not.
  1.3538 +	*/
  1.3539 +	enum TChunkHeapPagingAtt
  1.3540 +		{
  1.3541 +		EUnspecified,	/**< The chunk heap will use the creating process's paging attributes.*/
  1.3542 +		EPaged,			/**< The chunk heap will be data paged.*/
  1.3543 +		EUnpaged,		/**< The chunk heap will not be data paged.*/
  1.3544 +		};
  1.3545 +
  1.3546 +	friend class UserHeap;
  1.3547 +
  1.3548 +	IMPORT_C TChunkHeapCreateInfo(TInt aMinLength, TInt aMaxLength);
  1.3549 +	IMPORT_C void SetCreateChunk(const TDesC* aName);
  1.3550 +	IMPORT_C void SetUseChunk(const RChunk aChunk);
  1.3551 +	inline void SetSingleThread(TBool aSingleThread);
  1.3552 +	inline void SetAlignment(TInt aAlign);
  1.3553 +	inline void SetGrowBy(TInt aGrowBy);
  1.3554 +	inline void SetOffset(TInt aOffset);
  1.3555 +	inline void SetMode(TUint aMode);
  1.3556 +	inline void SetPaging(const TChunkHeapPagingAtt aPaging);
  1.3557 +
  1.3558 +protected:
  1.3559 +	/** The version number of this TChunkHeapCreateInfo.
  1.3560 +	@internalComponent
  1.3561 +	*/
  1.3562 +	TUint iVersionNumber;
  1.3563 +	/** The minimum size for the heap.
  1.3564 +	@internalConponent
  1.3565 +	*/
  1.3566 +	TInt iMinLength;
  1.3567 +	/** The maximum size for the heap.
  1.3568 +	@internalConponent
  1.3569 +	*/
  1.3570 +	TInt iMaxLength;
  1.3571 +	/** The alignment of the heap.
  1.3572 +	@internalComponent
  1.3573 +	*/
  1.3574 +	TInt iAlign;
  1.3575 +	/** The grow by value of the heap.
  1.3576 +	@internalComponent
  1.3577 +	*/
  1.3578 +	TInt iGrowBy;
  1.3579 +	/** The single thread value of the heap.
  1.3580 +	@internalComponent
  1.3581 +	*/
  1.3582 +	TBool iSingleThread;
  1.3583 +	/** The offset from the base of the chunk to the start of the heap.
  1.3584 +	@internalComponent
  1.3585 +	*/
  1.3586 +	TInt iOffset;
  1.3587 +	/** The paging attributes of the chunk.
  1.3588 +	@internalComponent
  1.3589 +	*/
  1.3590 +	TChunkHeapPagingAtt iPaging;
  1.3591 +	/** The mode flags for the heap.
  1.3592 +	@internalComponent
  1.3593 +	*/
  1.3594 +	TUint iMode;
  1.3595 +	/** The name of the chunk to be created for the heap.
  1.3596 +	@internalComponent
  1.3597 +	*/
  1.3598 +	TDesC* iName;
  1.3599 +	/** The chunk to use for the heap.
  1.3600 +	@internalComponent
  1.3601 +	*/
  1.3602 +	RChunk iChunk;
  1.3603 +	/**@internalComponent*/
  1.3604 +	TInt iSpare[5];
  1.3605 +	};
  1.3606 +
  1.3607 +struct SStdEpocThreadCreateInfo;
  1.3608 +/**
  1.3609 +@publishedAll
  1.3610 +@released
  1.3611 +
  1.3612 +A set of static functions for constructing fixed length heaps and local or 
  1.3613 +global heaps.
  1.3614 +
  1.3615 +@see RHeap
  1.3616 +@see RChunk
  1.3617 +*/
  1.3618 +class UserHeap
  1.3619 +	{
  1.3620 +public:
  1.3621 +	/**
  1.3622 +	Flags to control the heap creation.
  1.3623 +	*/
  1.3624 +	enum TChunkHeapCreateMode
  1.3625 +		{
  1.3626 +		/** On successful creation of the heap this switches the calling thread to
  1.3627 +			use the new heap.
  1.3628 +		*/
  1.3629 +		EChunkHeapSwitchTo	= 0x1,
  1.3630 +		/** On successful creation of the heap this causes the handle to the heap
  1.3631 +			to be duplicated.
  1.3632 +		*/ 
  1.3633 +		EChunkHeapDuplicate	= 0x2,
  1.3634 +
  1.3635 +		/** @internalComponent*/
  1.3636 +		EChunkHeapMask = EChunkHeapSwitchTo | EChunkHeapDuplicate,
  1.3637 +		};
  1.3638 +	IMPORT_C static RHeap* FixedHeap(TAny* aBase, TInt aMaxLength, TInt aAlign=0, TBool aSingleThread=ETrue);
  1.3639 +	IMPORT_C static RHeap* ChunkHeap(const TDesC* aName, TInt aMinLength, TInt aMaxLength, TInt aGrowBy=1, TInt aAlign=0, TBool aSingleThread=EFalse);
  1.3640 +	IMPORT_C static RHeap* ChunkHeap(RChunk aChunk, TInt aMinLength, TInt aGrowBy=1, TInt aMaxLength=0, TInt aAlign=0, TBool aSingleThread=EFalse, TUint32 aMode=0);
  1.3641 +	IMPORT_C static RHeap* OffsetChunkHeap(RChunk aChunk, TInt aMinLength, TInt aOffset, TInt aGrowBy=1, TInt aMaxLength=0, TInt aAlign=0, TBool aSingleThread=EFalse, TUint32 aMode=0);
  1.3642 +	IMPORT_C static RHeap* ChunkHeap(const TChunkHeapCreateInfo& aCreateInfo);
  1.3643 +	IMPORT_C static TInt SetupThreadHeap(TBool aNotFirst, SStdEpocThreadCreateInfo& aInfo);
  1.3644 +	IMPORT_C static TInt CreateThreadHeap(SStdEpocThreadCreateInfo& aInfo, RHeap*& aHeap, TInt aAlign=0, TBool aSingleThread=EFalse);
  1.3645 +	};
  1.3646 +
  1.3647 +
  1.3648 +
  1.3649 +
  1.3650 +/**
  1.3651 +@publishedAll
  1.3652 +@released
  1.3653 +
  1.3654 +Encapsulates the Id of a kernel object.
  1.3655 +*/
  1.3656 +class TObjectId
  1.3657 +	{
  1.3658 +public:
  1.3659 +	inline TObjectId();
  1.3660 +	inline TObjectId(TUint64 anId);
  1.3661 +	inline TUint64 Id() const;
  1.3662 +	inline operator TUint() const;
  1.3663 +	inline TBool operator==(TObjectId aId) const;
  1.3664 +	inline TBool operator!=(TObjectId aId) const;
  1.3665 +private:
  1.3666 +	TUint64 iId;
  1.3667 +	};
  1.3668 +
  1.3669 +
  1.3670 +
  1.3671 +
  1.3672 +/**
  1.3673 +@publishedAll
  1.3674 +@released
  1.3675 +
  1.3676 +Encapsulates the Id of a thread.
  1.3677 +
  1.3678 +An object of this type is not explicitly constructed in open code,
  1.3679 +but is returned by the Id() member function of a thread handle,
  1.3680 +an RThread type.
  1.3681 +
  1.3682 +@see RThread
  1.3683 +*/
  1.3684 +class TThreadId : public TObjectId
  1.3685 +	{
  1.3686 +public:
  1.3687 +	inline TThreadId();
  1.3688 +	inline TThreadId(TUint64 anId);
  1.3689 +	};
  1.3690 +
  1.3691 +
  1.3692 +
  1.3693 +
  1.3694 +/**
  1.3695 +This structure specifies the type and properties of the thread to be created.  It
  1.3696 +is passed as a parameter to the RThread::Create() method.
  1.3697 +
  1.3698 +@publishedAll
  1.3699 +@released
  1.3700 +*/
  1.3701 +struct TThreadCreateInfo
  1.3702 +	{
  1.3703 +public :
  1.3704 +	/**
  1.3705 +	Currently supported version numbers
  1.3706 +	@internalComponent
  1.3707 +	*/
  1.3708 +	enum TThreadCreateVersions
  1.3709 +		{
  1.3710 +		EVersion0,
  1.3711 +		ESupportedVersions,
  1.3712 +		};
  1.3713 +
  1.3714 +	/**
  1.3715 +	Attributes that specify whether the stack and heap of the thread to be created
  1.3716 +	are data paged or not.
  1.3717 +	*/
  1.3718 +	enum TThreadPagingAtt
  1.3719 +		{
  1.3720 +		EUnspecified,	/**< The thread will use the creating process's paging attributes.*/
  1.3721 +		EPaged,			/**< The thread will data page its stack and heap.*/
  1.3722 +		EUnpaged,		/**< The thread will not data page its stack and heap.*/
  1.3723 +		};
  1.3724 +
  1.3725 +	friend class RThread;
  1.3726 +
  1.3727 +	IMPORT_C TThreadCreateInfo(	const TDesC &aName, TThreadFunction aFunction, 
  1.3728 +								TInt aStackSize, TAny* aPtr);
  1.3729 +	IMPORT_C void SetCreateHeap(TInt aHeapMinSize, TInt aHeapMaxSize);
  1.3730 +	IMPORT_C void SetUseHeap(const RAllocator* aHeap);
  1.3731 +	IMPORT_C void SetOwner(const TOwnerType aOwner);
  1.3732 +	IMPORT_C void SetPaging(const TThreadPagingAtt aPaging);
  1.3733 +
  1.3734 +protected:
  1.3735 +	/**	The version number of this TChunkCreateInfo.
  1.3736 +		@internalComponent
  1.3737 +	*/
  1.3738 +	TUint iVersionNumber;
  1.3739 +	/**	The Name to be given to the thread to be created
  1.3740 +		@internalComponent
  1.3741 +	*/
  1.3742 +	const TDesC* iName;
  1.3743 +	/**	The function this thread will execute.
  1.3744 +		@internalComponent
  1.3745 +	*/
  1.3746 +	TThreadFunction iFunction;
  1.3747 +	/**	The size of the stack of the thread to be created.
  1.3748 +		@internalComponent
  1.3749 +	*/
  1.3750 +	TInt iStackSize;
  1.3751 +	/** The parameter to be passed to the function of the thread to be created.
  1.3752 +		@internalComponent
  1.3753 +	*/
  1.3754 +	TAny* iParameter;
  1.3755 +	/** The owner of the thread to be created.
  1.3756 +		@internalComponent
  1.3757 +	*/
  1.3758 +	TOwnerType iOwner;
  1.3759 +	/**	The heap for the thread to be created to use.
  1.3760 +		NULL if a new heap is to be created.
  1.3761 +		@internalComponent
  1.3762 +	*/
  1.3763 +	RAllocator* iHeap;
  1.3764 +	/**	Minimum size of any heap to be created for the thread.
  1.3765 +		@internalComponent*/
  1.3766 +	TInt iHeapMinSize;
  1.3767 +	/**	Maximum size of any heap to be created for the thread.
  1.3768 +		@internalComponent
  1.3769 +	*/
  1.3770 +	TInt iHeapMaxSize;
  1.3771 +	/** The attributes of the thread
  1.3772 +		@internalComponent
  1.3773 +	*/
  1.3774 +	TUint iAttributes;
  1.3775 +	/**@internalComponent*/
  1.3776 +	TUint32 iSpare[6];
  1.3777 +	};
  1.3778 +
  1.3779 +class RProcess;
  1.3780 +
  1.3781 +
  1.3782 +/**
  1.3783 +@publishedAll
  1.3784 +@released
  1.3785 +
  1.3786 +A handle to a thread.
  1.3787 +
  1.3788 +The thread itself is a kernel object.
  1.3789 +*/
  1.3790 +class RThread : public RHandleBase
  1.3791 +	{
  1.3792 +public:
  1.3793 +	inline RThread();
  1.3794 +	IMPORT_C TInt Create(const TDesC& aName, TThreadFunction aFunction, TInt aStackSize, TInt aHeapMinSize, TInt aHeapMaxSize, TAny *aPtr, TOwnerType aType=EOwnerProcess);
  1.3795 +	IMPORT_C TInt Create(const TDesC& aName, TThreadFunction aFunction, TInt aStackSize, RAllocator* aHeap, TAny* aPtr, TOwnerType aType=EOwnerProcess);
  1.3796 +	IMPORT_C TInt Create(const TThreadCreateInfo& aCreateInfo);
  1.3797 +	IMPORT_C TInt Open(const TDesC& aFullName, TOwnerType aType=EOwnerProcess);
  1.3798 +	IMPORT_C TInt Open(TThreadId aID, TOwnerType aType=EOwnerProcess);
  1.3799 +	IMPORT_C TThreadId Id() const;
  1.3800 +	IMPORT_C void Resume() const;
  1.3801 +	IMPORT_C void Suspend() const;
  1.3802 +	/**
  1.3803 +	@publishedAll
  1.3804 +	@deprecated Use User::RenameThread() instead
  1.3805 +	*/
  1.3806 +	inline static TInt RenameMe(const TDesC& aName);
  1.3807 +
  1.3808 +	IMPORT_C void Kill(TInt aReason);
  1.3809 +	IMPORT_C void Terminate(TInt aReason);
  1.3810 +	IMPORT_C void Panic(const TDesC& aCategory,TInt aReason);
  1.3811 +	IMPORT_C TInt Process(RProcess& aProcess) const;
  1.3812 +	IMPORT_C TThreadPriority Priority() const;
  1.3813 +	IMPORT_C void SetPriority(TThreadPriority aPriority) const;
  1.3814 +	IMPORT_C TProcessPriority ProcessPriority() const;
  1.3815 +	IMPORT_C void SetProcessPriority(TProcessPriority aPriority) const;
  1.3816 +	IMPORT_C TInt RequestCount() const;
  1.3817 +	IMPORT_C TExitType ExitType() const;
  1.3818 +	IMPORT_C TInt ExitReason() const;
  1.3819 +	IMPORT_C TExitCategoryName ExitCategory() const;
  1.3820 +	IMPORT_C void RequestComplete(TRequestStatus*& aStatus,TInt aReason) const;
  1.3821 +	IMPORT_C void RequestSignal() const;
  1.3822 +	IMPORT_C void Logon(TRequestStatus& aStatus) const;
  1.3823 +	IMPORT_C TInt LogonCancel(TRequestStatus& aStatus) const;
  1.3824 +	IMPORT_C void HandleCount(TInt& aProcessHandleCount, TInt& aThreadHandleCount) const;
  1.3825 +	IMPORT_C void Context(TDes8& aDes) const;
  1.3826 +	IMPORT_C TInt StackInfo(TThreadStackInfo& aInfo) const;
  1.3827 +	IMPORT_C TInt GetCpuTime(TTimeIntervalMicroSeconds& aCpuTime) const;
  1.3828 +	inline TInt Open(const TFindThread& aFind,TOwnerType aType=EOwnerProcess);
  1.3829 +	IMPORT_C void Rendezvous(TRequestStatus& aStatus) const;
  1.3830 +	IMPORT_C TInt RendezvousCancel(TRequestStatus& aStatus) const;
  1.3831 +	IMPORT_C static void Rendezvous(TInt aReason);
  1.3832 +
  1.3833 +	/**
  1.3834 +	Return the Secure ID of the process to which the thread belongs.
  1.3835 +
  1.3836 +	If an intended use of this method is to check that the Secure ID is
  1.3837 +	a given value, then the use of a TSecurityPolicy object should be
  1.3838 +	considered. E.g. Instead of something like:
  1.3839 +
  1.3840 +	@code
  1.3841 +		RThread& thread;
  1.3842 +		TInt error = thread.SecureId()==KRequiredSecureId ? KErrNone : KErrPermissionDenied;
  1.3843 +	@endcode
  1.3844 +
  1.3845 +	this could be used;
  1.3846 +
  1.3847 +	@code
  1.3848 +		RThread& thread;
  1.3849 +		static _LIT_SECURITY_POLICY_S0(mySidPolicy, KRequiredSecureId);
  1.3850 +		TBool pass = mySidPolicy().CheckPolicy(thread);
  1.3851 +	@endcode
  1.3852 +
  1.3853 +	This has the benefit that the TSecurityPolicy::CheckPolicy methods are
  1.3854 +	configured by the system wide Platform Security configuration. I.e. are
  1.3855 +	capable of emitting diagnostic messages when a check fails and/or the
  1.3856 +	check can be forced to always pass.
  1.3857 +
  1.3858 +	@see TSecurityPolicy::CheckPolicy(RThread aThread, const char* aDiagnostic) const
  1.3859 +	@see _LIT_SECURITY_POLICY_S0
  1.3860 +
  1.3861 +	@return The Secure ID.
  1.3862 +	@publishedAll
  1.3863 +	@released
  1.3864 +	*/
  1.3865 +	IMPORT_C TSecureId SecureId() const;
  1.3866 +
  1.3867 +	/**
  1.3868 +	Return the Vendor ID of the process to which the thread belongs.
  1.3869 +
  1.3870 +	If an intended use of this method is to check that the Vendor ID is
  1.3871 +	a given value, then the use of a TSecurityPolicy object should be
  1.3872 +	considered. E.g. Instead of something like:
  1.3873 +
  1.3874 +	@code
  1.3875 +		RThread& thread;
  1.3876 +		TInt error = thread.VendorId()==KRequiredVendorId ? KErrNone : KErrPermissionDenied;
  1.3877 +	@endcode
  1.3878 +
  1.3879 +	this could be used;
  1.3880 +
  1.3881 +	@code
  1.3882 +		RThread& thread;
  1.3883 +		static _LIT_SECURITY_POLICY_V0(myVidPolicy, KRequiredVendorId);
  1.3884 +		TBool pass = myVidPolicy().CheckPolicy(thread);
  1.3885 +	@endcode
  1.3886 +
  1.3887 +	This has the benefit that the TSecurityPolicy::CheckPolicy methods are
  1.3888 +	configured by the system wide Platform Security configuration. I.e. are
  1.3889 +	capable of emitting diagnostic messages when a check fails and/or the
  1.3890 +	check can be forced to always pass.
  1.3891 +
  1.3892 +	@see TSecurityPolicy::CheckPolicy(RThread aThread, const char* aDiagnostic) const
  1.3893 +	@see _LIT_SECURITY_POLICY_V0
  1.3894 +
  1.3895 +	@return The Vendor ID.
  1.3896 +	@publishedAll
  1.3897 +    @released
  1.3898 +	*/
  1.3899 +	IMPORT_C TVendorId VendorId() const;
  1.3900 +
  1.3901 +	/**
  1.3902 +	Check if the process to which the thread belongs has a given capability
  1.3903 +
  1.3904 +	When a check fails the action taken is determined by the system wide Platform Security
  1.3905 +	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  1.3906 +	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  1.3907 +	check failed.
  1.3908 +
  1.3909 +	@param aCapability The capability to test.
  1.3910 +	@param aDiagnostic A string that will be emitted along with any diagnostic message
  1.3911 +								that may be issued if the test finds the capability is not present.
  1.3912 +								This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  1.3913 +								which enables it to be easily removed from the system.
  1.3914 +	@return ETrue if the process to which the thread belongs has the capability, EFalse otherwise.
  1.3915 +	@publishedAll
  1.3916 +    @released
  1.3917 +	*/
  1.3918 +#ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.3919 +	inline TBool HasCapability(TCapability aCapability, const char* aDiagnostic=0) const;
  1.3920 +#else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.3921 +	// Only available to NULL arguments
  1.3922 +	inline TBool HasCapability(TCapability aCapability, OnlyCreateWithNull aDiagnostic=NULL) const;
  1.3923 +#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
  1.3924 +	// For things using KSuppressPlatSecDiagnostic
  1.3925 +	inline TBool HasCapability(TCapability aCapability, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
  1.3926 +#endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
  1.3927 +#endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.3928 +
  1.3929 +	/**
  1.3930 +	Check if the process to which the thread belongs has both of the given capabilities
  1.3931 +
  1.3932 +	When a check fails the action taken is determined by the system wide Platform Security
  1.3933 +	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  1.3934 +	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  1.3935 +	check failed.
  1.3936 +
  1.3937 +	@param aCapability1 The first capability to test.
  1.3938 +	@param aCapability2 The second capability to test.
  1.3939 +	@param aDiagnostic A string that will be emitted along with any diagnostic message
  1.3940 +								that may be issued if the test finds a capability is not present.
  1.3941 +								This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  1.3942 +								which enables it to be easily removed from the system.
  1.3943 +	@return ETrue if the process to which the thread belongs has both the capabilities, EFalse otherwise.
  1.3944 +	@publishedAll
  1.3945 +	@released
  1.3946 +	*/
  1.3947 +#ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.3948 +	inline TBool HasCapability(TCapability aCapability1, TCapability aCapability2, const char* aDiagnostic=0) const;
  1.3949 +#else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.3950 +	// Only available to NULL arguments
  1.3951 +	inline TBool HasCapability(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull aDiagnostic=NULL) const;
  1.3952 +#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
  1.3953 +	// For things using KSuppressPlatSecDiagnostic
  1.3954 +	inline TBool HasCapability(TCapability aCapability, TCapability aCapability2, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
  1.3955 +#endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
  1.3956 +#endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.3957 +
  1.3958 +	/** Function only temporarily supported to aid migration to process emulation...
  1.3959 +
  1.3960 +	@publishedAll
  1.3961 +	@deprecated Use process emulation instead
  1.3962 +	*/
  1.3963 +	inline TInt Create(const TDesC& aName,TThreadFunction aFunction,TInt aStackSize,TAny* aPtr,RLibrary* aLibrary,RHeap* aHeap, TInt aHeapMinSize,TInt aHeapMaxSize,TOwnerType aType);
  1.3964 +
  1.3965 +private:
  1.3966 +	// Implementations of functions with diagnostics
  1.3967 +	IMPORT_C TBool DoHasCapability(TCapability aCapability, const char* aDiagnostic) const;
  1.3968 +	IMPORT_C TBool DoHasCapability(TCapability aCapability) const;
  1.3969 +	IMPORT_C TBool DoHasCapability(TCapability aCapability1, TCapability aCapability2, const char* aDiagnostic) const;
  1.3970 +	IMPORT_C TBool DoHasCapability(TCapability aCapability1, TCapability aCapability2) const;
  1.3971 +	};
  1.3972 +
  1.3973 +/**
  1.3974 +@publishedAll
  1.3975 +@deprecated
  1.3976 +*/
  1.3977 +inline TInt RThread::Create(const TDesC& /*aName*/,TThreadFunction /*aFunction*/,TInt /*aStackSize*/,TAny* /*aPtr*/,RLibrary* /*aLibrary*/,RHeap* /*aHeap*/, TInt /*aHeapMinSize*/,TInt /*aHeapMaxSize*/,TOwnerType /*aType*/)
  1.3978 +	{return KErrNotSupported; }
  1.3979 +
  1.3980 +
  1.3981 +
  1.3982 +/**
  1.3983 +@publishedAll
  1.3984 +@released
  1.3985 +
  1.3986 +Encapsulates the Id of a process.
  1.3987 +
  1.3988 +An object of this type is not explicitly constructed in open code,
  1.3989 +but is returned by the Id() member function of a process handle,
  1.3990 +an RProcess type.
  1.3991 +
  1.3992 +@see RProcess
  1.3993 +*/
  1.3994 +class TProcessId : public TObjectId
  1.3995 +	{
  1.3996 +public:
  1.3997 +	inline TProcessId();
  1.3998 +	inline TProcessId(TUint64 anId);
  1.3999 +	};
  1.4000 +
  1.4001 +
  1.4002 +
  1.4003 +
  1.4004 +class RSubSessionBase;
  1.4005 +
  1.4006 +/** 
  1.4007 +@publishedAll
  1.4008 +@released
  1.4009 +
  1.4010 +A handle to a process.
  1.4011 +
  1.4012 +The process itself is a kernel object.
  1.4013 +*/
  1.4014 +class RProcess : public RHandleBase
  1.4015 +	{
  1.4016 +public:
  1.4017 +	inline RProcess();
  1.4018 +	IMPORT_C TInt Create(const TDesC& aFileName,const TDesC& aCommand,TOwnerType aType=EOwnerProcess);
  1.4019 +	IMPORT_C TInt Create(const TDesC& aFileName,const TDesC& aCommand,const TUidType &aUidType, TOwnerType aType=EOwnerProcess);
  1.4020 +	IMPORT_C TInt Open(const TDesC& aName,TOwnerType aType=EOwnerProcess);
  1.4021 +	IMPORT_C TInt Open(TProcessId aId,TOwnerType aType=EOwnerProcess);
  1.4022 +	IMPORT_C TUidType Type() const;
  1.4023 +	IMPORT_C TProcessId Id() const;
  1.4024 +	/**
  1.4025 +	@publishedAll
  1.4026 +	@deprecated Use User::RenameProcess() instead
  1.4027 +	*/
  1.4028 +	inline static TInt RenameMe(const TDesC& aName);
  1.4029 +
  1.4030 +	IMPORT_C void Kill(TInt aReason);
  1.4031 +	IMPORT_C void Terminate(TInt aReason);
  1.4032 +	IMPORT_C void Panic(const TDesC& aCategory,TInt aReason);
  1.4033 +	IMPORT_C void Resume();
  1.4034 +	IMPORT_C TFileName FileName() const;
  1.4035 +	IMPORT_C TExitType ExitType() const;
  1.4036 +	IMPORT_C TInt ExitReason() const;
  1.4037 +	IMPORT_C TExitCategoryName ExitCategory() const;
  1.4038 +	IMPORT_C TProcessPriority Priority() const;
  1.4039 +	IMPORT_C TInt SetPriority(TProcessPriority aPriority) const;
  1.4040 +    IMPORT_C TBool JustInTime() const;
  1.4041 +    IMPORT_C void SetJustInTime(TBool aBoolean) const; 
  1.4042 +	IMPORT_C void Logon(TRequestStatus& aStatus) const;
  1.4043 +	IMPORT_C TInt LogonCancel(TRequestStatus& aStatus) const;
  1.4044 +	IMPORT_C TInt GetMemoryInfo(TModuleMemoryInfo& aInfo) const;
  1.4045 +	inline TInt Open(const TFindProcess& aFind,TOwnerType aType=EOwnerProcess);
  1.4046 +	IMPORT_C void Rendezvous(TRequestStatus& aStatus) const;
  1.4047 +	IMPORT_C TInt RendezvousCancel(TRequestStatus& aStatus) const;
  1.4048 +	IMPORT_C static void Rendezvous(TInt aReason);
  1.4049 +	IMPORT_C TBool DefaultDataPaged() const;
  1.4050 +
  1.4051 +	/**
  1.4052 +	Return the Secure ID of the process.
  1.4053 +
  1.4054 +	If an intended use of this method is to check that the Secure ID is
  1.4055 +	a given value, then the use of a TSecurityPolicy object should be
  1.4056 +	considered. E.g. Instead of something like:
  1.4057 +
  1.4058 +	@code
  1.4059 +		RProcess& process;
  1.4060 +		TInt error = process.SecureId()==KRequiredSecureId ? KErrNone : KErrPermissionDenied;
  1.4061 +	@endcode
  1.4062 +
  1.4063 +	this could be used;
  1.4064 +
  1.4065 +	@code
  1.4066 +		RProcess& process;
  1.4067 +		static _LIT_SECURITY_POLICY_S0(mySidPolicy, KRequiredSecureId);
  1.4068 +		TBool pass = mySidPolicy().CheckPolicy(process);
  1.4069 +	@endcode
  1.4070 +
  1.4071 +	This has the benefit that the TSecurityPolicy::CheckPolicy methods are
  1.4072 +	configured by the system wide Platform Security configuration. I.e. are
  1.4073 +	capable of emitting diagnostic messages when a check fails and/or the
  1.4074 +	check can be forced to always pass.
  1.4075 +
  1.4076 +	@see TSecurityPolicy::CheckPolicy(RProcess aProcess, const char* aDiagnostic) const
  1.4077 +	@see _LIT_SECURITY_POLICY_S0
  1.4078 +
  1.4079 +	@return The Secure ID.
  1.4080 +	@publishedAll
  1.4081 +	@released
  1.4082 +	*/
  1.4083 +	IMPORT_C TSecureId SecureId() const;
  1.4084 +
  1.4085 +	/**
  1.4086 +	Return the Vendor ID of the process.
  1.4087 +
  1.4088 +	If an intended use of this method is to check that the Vendor ID is
  1.4089 +	a given value, then the use of a TSecurityPolicy object should be
  1.4090 +	considered. E.g. Instead of something like:
  1.4091 +
  1.4092 +	@code
  1.4093 +		RProcess& process;
  1.4094 +		TInt error = process.VendorId()==KRequiredVendorId ? KErrNone : KErrPermissionDenied;
  1.4095 +	@endcode
  1.4096 +
  1.4097 +	this could be used;
  1.4098 +
  1.4099 +	@code
  1.4100 +		RProcess& process;
  1.4101 +		static _LIT_SECURITY_POLICY_V0(myVidPolicy, KRequiredVendorId);
  1.4102 +		TBool pass = myVidPolicy().CheckPolicy(process);
  1.4103 +	@endcode
  1.4104 +
  1.4105 +	This has the benefit that the TSecurityPolicy::CheckPolicy methods are
  1.4106 +	configured by the system wide Platform Security configuration. I.e. are
  1.4107 +	capable of emitting diagnostic messages when a check fails and/or the
  1.4108 +	check can be forced to always pass.
  1.4109 +
  1.4110 +	@see TSecurityPolicy::CheckPolicy(RProcess aProcess, const char* aDiagnostic) const
  1.4111 +	@see _LIT_SECURITY_POLICY_V0
  1.4112 +
  1.4113 +	@return The Vendor ID.
  1.4114 +	@publishedAll
  1.4115 +    @released
  1.4116 +	*/
  1.4117 +	IMPORT_C TVendorId VendorId() const;
  1.4118 +
  1.4119 +	/**
  1.4120 +	Check if the process has a given capability
  1.4121 +
  1.4122 +	When a check fails the action taken is determined by the system wide Platform Security
  1.4123 +	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  1.4124 +	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  1.4125 +	check failed.
  1.4126 +
  1.4127 +	@param aCapability The capability to test.
  1.4128 +	@param aDiagnostic A string that will be emitted along with any diagnostic message
  1.4129 +								that may be issued if the test finds the capability is not present.
  1.4130 +								This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  1.4131 +								which enables it to be easily removed from the system.
  1.4132 +	@return ETrue if the process has the capability, EFalse otherwise.
  1.4133 +	@publishedAll
  1.4134 +	@released
  1.4135 +	*/
  1.4136 +#ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.4137 +	inline TBool HasCapability(TCapability aCapability, const char* aDiagnostic=0) const;
  1.4138 +#else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.4139 +	// Only available to NULL arguments
  1.4140 +	inline TBool HasCapability(TCapability aCapability, OnlyCreateWithNull aDiagnostic=NULL) const;
  1.4141 +#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
  1.4142 +	// For things using KSuppressPlatSecDiagnostic
  1.4143 +	inline TBool HasCapability(TCapability aCapability, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
  1.4144 +#endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
  1.4145 +#endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.4146 +
  1.4147 +	/**
  1.4148 +	Check if the process has both of the given capabilities
  1.4149 +
  1.4150 +	When a check fails the action taken is determined by the system wide Platform Security
  1.4151 +	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  1.4152 +	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  1.4153 +	check failed.
  1.4154 +
  1.4155 +	@param aCapability1 The first capability to test.
  1.4156 +	@param aCapability2 The second capability to test.
  1.4157 +	@param aDiagnostic A string that will be emitted along with any diagnostic message
  1.4158 +								that may be issued if the test finds a capability is not present.
  1.4159 +								This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  1.4160 +								which enables it to be easily removed from the system.
  1.4161 +	@return ETrue if the process has both the capabilities, EFalse otherwise.
  1.4162 +	@publishedAll
  1.4163 +	@released
  1.4164 +	*/
  1.4165 +#ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.4166 +	inline TBool HasCapability(TCapability aCapability1, TCapability aCapability2, const char* aDiagnostic=0) const;
  1.4167 +#else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.4168 +	// Only available to NULL arguments
  1.4169 +	inline TBool HasCapability(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull aDiagnostic=NULL) const;
  1.4170 +#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
  1.4171 +	// For things using KSuppressPlatSecDiagnostic
  1.4172 +	inline TBool HasCapability(TCapability aCapability, TCapability aCapability2, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress) const;
  1.4173 +#endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
  1.4174 +#endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.4175 +
  1.4176 +	IMPORT_C TInt SetParameter(TInt aIndex,  RHandleBase aHandle);
  1.4177 +	IMPORT_C TInt SetParameter(TInt aSlot, const RSubSessionBase& aSession);
  1.4178 +	IMPORT_C TInt SetParameter(TInt aSlot, const TDesC16& aDes);
  1.4179 +	IMPORT_C TInt SetParameter(TInt aSlot, const TDesC8& aDes);
  1.4180 +	IMPORT_C TInt SetParameter(TInt aSlot, TInt aData);
  1.4181 +	inline RProcess(TInt aHandle);
  1.4182 +
  1.4183 +	/**
  1.4184 +	@deprecated Use RProcess::SecureId() instead
  1.4185 +	*/
  1.4186 +	inline TUid Identity() const { return SecureId(); }
  1.4187 +
  1.4188 +	/**
  1.4189 +	Legacy Platform Security development and migration support
  1.4190 +	@internalAll
  1.4191 +	@deprecated No replacement
  1.4192 +	*/
  1.4193 +	enum TSecureApi { ESecureApiOff, ESecureApiOn, ESecureApiQuery }; // __SECURE_API__ remove this
  1.4194 +
  1.4195 +	/**
  1.4196 +	Legacy Platform Security development and migration support
  1.4197 +	@internalAll
  1.4198 +	@deprecated No replacement
  1.4199 +	*/
  1.4200 +	IMPORT_C TInt SecureApi(TInt aState); // __SECURE_API__ remove this
  1.4201 +
  1.4202 +	/**
  1.4203 +	Legacy Platform Security development and migration support
  1.4204 +	@internalAll
  1.4205 +	@deprecated No replacement
  1.4206 +	*/
  1.4207 +	enum TDataCaging { EDataCagingOff, EDataCagingOn, EDataCagingQuery}; // __DATA_CAGING__ __SECURE_API__ remove this
  1.4208 +
  1.4209 +	/**
  1.4210 +	Legacy Platform Security development and migration support
  1.4211 +	@internalAll
  1.4212 +	@deprecated No replacement
  1.4213 +	*/
  1.4214 +	IMPORT_C TInt DataCaging(TInt aState); // __DATA_CAGING__ __SECURE_API__ remove this
  1.4215 +	
  1.4216 +
  1.4217 +	IMPORT_C TInt CreateWithStackOverride(const TDesC& aFileName,const TDesC& aCommand, const TUidType &aUidType, TInt aMinStackSize, TOwnerType aType);
  1.4218 +
  1.4219 +	IMPORT_C static TAny* ExeExportData(void);
  1.4220 +
  1.4221 +private:
  1.4222 +	// Implementations of functions with diagnostics
  1.4223 +	IMPORT_C TBool DoHasCapability(TCapability aCapability, const char* aDiagnostic) const;
  1.4224 +	IMPORT_C TBool DoHasCapability(TCapability aCapability) const;
  1.4225 +	IMPORT_C TBool DoHasCapability(TCapability aCapability1, TCapability aCapability2, const char* aDiagnostic) const;
  1.4226 +	IMPORT_C TBool DoHasCapability(TCapability aCapability1, TCapability aCapability2) const;
  1.4227 +	};
  1.4228 +
  1.4229 +
  1.4230 +
  1.4231 +
  1.4232 +
  1.4233 +
  1.4234 +
  1.4235 +
  1.4236 +
  1.4237 +/**
  1.4238 +@internalTechnology
  1.4239 +*/
  1.4240 +class RServer2 : public RHandleBase
  1.4241 +	{
  1.4242 +public:
  1.4243 +	IMPORT_C TInt CreateGlobal(const TDesC& aName);
  1.4244 +	IMPORT_C TInt CreateGlobal(const TDesC& aName, TInt aMode);
  1.4245 +	IMPORT_C TInt CreateGlobal(const TDesC& aName, TInt aMode, TInt aRole, TInt aOpts);
  1.4246 +	IMPORT_C void Receive(RMessage2& aMessage,TRequestStatus& aStatus);
  1.4247 +	IMPORT_C void Receive(RMessage2& aMessage);
  1.4248 +	IMPORT_C void Cancel();
  1.4249 +	};
  1.4250 +
  1.4251 +
  1.4252 +
  1.4253 +
  1.4254 +/**
  1.4255 +@publishedAll
  1.4256 +@released
  1.4257 +
  1.4258 +Client-side handle to a session with a server.
  1.4259 +
  1.4260 +This is the client-side interface through which communication with the server
  1.4261 +is channelled.
  1.4262 +
  1.4263 +Clients normally define and implement a derived class to provide
  1.4264 +a richer interface.
  1.4265 +*/
  1.4266 +class RSessionBase : public RHandleBase
  1.4267 +	{
  1.4268 +	friend class RSubSessionBase;
  1.4269 +public:
  1.4270 +    /**
  1.4271 +    Indicates whether or not threads in the process are automatically attached
  1.4272 +    to the session when passed as a parameter to the Share() function.
  1.4273 +    */
  1.4274 +	enum TAttachMode {EExplicitAttach,EAutoAttach};
  1.4275 +public:
  1.4276 +	/**
  1.4277 +	Creates a session that can be shared by other threads in the current
  1.4278 +    process.
  1.4279 +    
  1.4280 +    After calling this function the session object may be used by threads other
  1.4281 +    than than the one that created it.
  1.4282 +    
  1.4283 +    Note that this can only be done with servers that mark their sessions
  1.4284 +    as sharable.
  1.4285 +    
  1.4286 +    @return	KErrNone, if the session is successfully shared;
  1.4287 +	        KErrNoMmemory, if the attempt fails for lack of memory.
  1.4288 +
  1.4289 +    @panic	KERN-EXEC 23 The session cannot be shared.
  1.4290 +    
  1.4291 +    @see CServer2
  1.4292 +    @see RSessionBase::ShareProtected()
  1.4293 +    @see CServer2::TServerType
  1.4294 +	*/
  1.4295 +	inline TInt ShareAuto()	{ return DoShare(EAutoAttach); }
  1.4296 +
  1.4297 +
  1.4298 +    /**
  1.4299 +    Creates a session handle that can be be passed via IPC to another process
  1.4300 +    as well as being shared by other threads in the current process.
  1.4301 +    
  1.4302 +    After calling this function the session object may be used by threads other
  1.4303 +    than than the one that created it.
  1.4304 +
  1.4305 +    Note that this can only be done with servers that mark their sessions
  1.4306 +    as globally sharable.
  1.4307 +    
  1.4308 +    @return	KErrNone, if the session is successfully shared;
  1.4309 +	        KErrNoMmemory, if the attempt fails for lack of memory.
  1.4310 +   
  1.4311 +    @panic	KERN-EXEC 23 The session cannot be shared.
  1.4312 +    
  1.4313 +    @see CServer2
  1.4314 +    @see RSessionBase::ShareAuto()
  1.4315 +    @see CServer2::TServerType
  1.4316 +    */
  1.4317 +	inline TInt ShareProtected() { return DoShare(EAutoAttach|KCreateProtectedObject); }
  1.4318 +
  1.4319 +
  1.4320 +	IMPORT_C TInt Open(RMessagePtr2 aMessage,TInt aParam,TOwnerType aType=EOwnerProcess);
  1.4321 +	IMPORT_C TInt Open(RMessagePtr2 aMessage,TInt aParam,const TSecurityPolicy& aServerPolicy,TOwnerType aType=EOwnerProcess);
  1.4322 +	IMPORT_C TInt Open(TInt aArgumentIndex, TOwnerType aType=EOwnerProcess);
  1.4323 +	IMPORT_C TInt Open(TInt aArgumentIndex, const TSecurityPolicy& aServerPolicy, TOwnerType aType=EOwnerProcess);
  1.4324 +	inline TInt SetReturnedHandle(TInt aHandleOrError);
  1.4325 +	IMPORT_C TInt SetReturnedHandle(TInt aHandleOrError,const TSecurityPolicy& aServerPolicy);
  1.4326 +protected:
  1.4327 +	inline TInt CreateSession(const TDesC& aServer,const TVersion& aVersion);
  1.4328 +	IMPORT_C TInt CreateSession(const TDesC& aServer,const TVersion& aVersion,TInt aAsyncMessageSlots);
  1.4329 +	IMPORT_C TInt CreateSession(const TDesC& aServer,const TVersion& aVersion,TInt aAsyncMessageSlots,TIpcSessionType aType,const TSecurityPolicy* aPolicy=0, TRequestStatus* aStatus=0);
  1.4330 +	inline TInt CreateSession(RServer2 aServer,const TVersion& aVersion);
  1.4331 +	IMPORT_C TInt CreateSession(RServer2 aServer,const TVersion& aVersion,TInt aAsyncMessageSlots);
  1.4332 +	IMPORT_C TInt CreateSession(RServer2 aServer,const TVersion& aVersion,TInt aAsyncMessageSlots,TIpcSessionType aType,const TSecurityPolicy* aPolicy=0, TRequestStatus* aStatus=0);
  1.4333 +	inline static TInt SetReturnedHandle(TInt aHandleOrError,RHandleBase& aHandle);
  1.4334 +
  1.4335 +	/**
  1.4336 +	@deprecated Use CreateSession(const TDesC& aServer,const TVersion& aVersion,TInt aAsyncMessageSlots,TIpcSessionType aType,const TSecurityPolicy* aPolicy=0, TRequestStatus* aStatus=0);
  1.4337 +	*/
  1.4338 +	inline TInt CreateSession(const TDesC& aServer,const TVersion& aVersion,TInt aAsyncMessageSlots,TRequestStatus* aStatus)
  1.4339 +		{ return CreateSession(aServer, aVersion, aAsyncMessageSlots, EIpcSession_Unsharable, (TSecurityPolicy*)0, aStatus); }
  1.4340 +	inline TInt Send(TInt aFunction,const TIpcArgs& aArgs) const;
  1.4341 +	inline void SendReceive(TInt aFunction,const TIpcArgs& aArgs,TRequestStatus& aStatus) const;
  1.4342 +	inline TInt SendReceive(TInt aFunction,const TIpcArgs& aArgs) const;
  1.4343 +	inline TInt Send(TInt aFunction) const;
  1.4344 +	inline void SendReceive(TInt aFunction,TRequestStatus& aStatus) const;
  1.4345 +	inline TInt SendReceive(TInt aFunction) const;
  1.4346 +private:
  1.4347 +	IMPORT_C TInt DoSend(TInt aFunction,const TIpcArgs* aArgs) const;
  1.4348 +	IMPORT_C void DoSendReceive(TInt aFunction,const TIpcArgs* aArgs,TRequestStatus& aStatus) const;
  1.4349 +	IMPORT_C TInt DoSendReceive(TInt aFunction,const TIpcArgs* aArgs) const;
  1.4350 +	TInt SendAsync(TInt aFunction,const TIpcArgs* aArgs,TRequestStatus* aStatus) const;
  1.4351 +	TInt SendSync(TInt aFunction,const TIpcArgs* aArgs) const;
  1.4352 +	IMPORT_C TInt DoShare(TInt aAttachMode);
  1.4353 +	TInt DoConnect(const TVersion &aVersion,TRequestStatus* aStatus);
  1.4354 +	};
  1.4355 +
  1.4356 +
  1.4357 +
  1.4358 +
  1.4359 +/**
  1.4360 +@publishedAll
  1.4361 +@released
  1.4362 +
  1.4363 +Client-side handle to a sub-session. 
  1.4364 +
  1.4365 +It represents a client-side sub-session, and has a corresponding sub-session
  1.4366 +object on the server-side.
  1.4367 +
  1.4368 +Clients normally define and implement a derived class to provide a richer
  1.4369 +interface. In particular, a derived class should:
  1.4370 +
  1.4371 +1. provide a function to create a new sub-session with the server;
  1.4372 +   this should call CreateSubSession().
  1.4373 +
  1.4374 +2. provide a function to close the current sub-session;
  1.4375 +   this should call CloseSubSession().
  1.4376 +
  1.4377 +A session must already exist with a server before a client can establish
  1.4378 +any sub-sessions.
  1.4379 +*/
  1.4380 +class RSubSessionBase
  1.4381 +	{
  1.4382 +public:
  1.4383 +	inline TInt SubSessionHandle() const;
  1.4384 +protected:
  1.4385 +	inline RSubSessionBase();
  1.4386 +	IMPORT_C const RSessionBase Session() const;
  1.4387 +	inline TInt CreateSubSession(const RSessionBase& aSession,TInt aFunction,const TIpcArgs& aArgs);
  1.4388 +	inline TInt CreateSubSession(const RSessionBase& aSession,TInt aFunction);
  1.4389 +	IMPORT_C TInt CreateAutoCloseSubSession(RSessionBase& aSession,TInt aFunction,const TIpcArgs& aArgs);
  1.4390 +	IMPORT_C void CloseSubSession(TInt aFunction);
  1.4391 +	inline TInt Send(TInt aFunction,const TIpcArgs& aArgs) const;
  1.4392 +	inline void SendReceive(TInt aFunction,const TIpcArgs& aArgs,TRequestStatus& aStatus) const;
  1.4393 +	inline TInt SendReceive(TInt aFunction,const TIpcArgs& aArgs) const;
  1.4394 +	inline TInt Send(TInt aFunction) const;
  1.4395 +	inline void SendReceive(TInt aFunction,TRequestStatus& aStatus) const;
  1.4396 +	inline TInt SendReceive(TInt aFunction) const;
  1.4397 +private:
  1.4398 +	IMPORT_C TInt DoCreateSubSession(const RSessionBase& aSession,TInt aFunction,const TIpcArgs* aArgs);
  1.4399 +	IMPORT_C TInt DoSend(TInt aFunction,const TIpcArgs* aArgs) const;
  1.4400 +	IMPORT_C void DoSendReceive(TInt aFunction,const TIpcArgs* aArgs,TRequestStatus& aStatus) const;
  1.4401 +	IMPORT_C TInt DoSendReceive(TInt aFunction,const TIpcArgs* aArgs) const;
  1.4402 +	TInt DoCreateSubSession(RSessionBase& aSession,TInt aFunction,const TIpcArgs* aArgs, TBool aAutoClose);
  1.4403 +private:
  1.4404 +	RSessionBase iSession;
  1.4405 +	TInt iSubSessionHandle;
  1.4406 +	};
  1.4407 +
  1.4408 +
  1.4409 +
  1.4410 +
  1.4411 +/**
  1.4412 +@publishedAll
  1.4413 +@released
  1.4414 +
  1.4415 +Base class that provides an implementation for the templated
  1.4416 +RRef class.
  1.4417 +
  1.4418 +@see RRef
  1.4419 +*/
  1.4420 +class RRefBase
  1.4421 +	{
  1.4422 +public:
  1.4423 +	IMPORT_C void Free();
  1.4424 +protected:
  1.4425 +	inline RRefBase();
  1.4426 +	inline RRefBase(const RRefBase& aRef);
  1.4427 +	IMPORT_C void DoAlloc(const TAny* aPtr,TInt aSize);
  1.4428 +	IMPORT_C void DoAllocL(const TAny* aPtr,TInt aSize);
  1.4429 +	IMPORT_C void Copy(const RRefBase& aRef);
  1.4430 +private:
  1.4431 +	IMPORT_C void operator=(const RRefBase& aRef);
  1.4432 +protected:
  1.4433 +	TInt* iPtr;
  1.4434 +	};
  1.4435 +
  1.4436 +
  1.4437 +
  1.4438 +
  1.4439 +/**
  1.4440 +@publishedAll
  1.4441 +@released
  1.4442 +
  1.4443 +Contains, or packages, a copy of an instance of another class.
  1.4444 +
  1.4445 +The template parameter defines the type of the contained object.
  1.4446 +
  1.4447 +The contained object is held in allocated memory, and can be accessed
  1.4448 +through the member selection and dereference operators.
  1.4449 +*/
  1.4450 +template <class T>
  1.4451 +class RRef : public RRefBase
  1.4452 +	{
  1.4453 +public:
  1.4454 +	inline RRef();
  1.4455 +	inline RRef(const RRef<T>& anObject);
  1.4456 +	inline void operator=(const RRef<T>& anObject);
  1.4457 +	inline T* operator->();
  1.4458 +	inline operator T*();
  1.4459 +	inline void Alloc(const T& anObject);
  1.4460 +	inline void Alloc(const T& anObject,TInt aSize);
  1.4461 +	inline void AllocL(const T& anObject);
  1.4462 +	inline void AllocL(const T& anObject,TInt aSize);
  1.4463 +	};
  1.4464 +
  1.4465 +
  1.4466 +
  1.4467 +
  1.4468 +/**
  1.4469 +@publishedAll
  1.4470 +@released
  1.4471 +
  1.4472 +A handle to a change notifier. 
  1.4473 +
  1.4474 +The change notifier itself is a kernel object.
  1.4475 +*/
  1.4476 +class RChangeNotifier : public RHandleBase
  1.4477 +	{
  1.4478 +public:
  1.4479 +	IMPORT_C TInt Create();
  1.4480 +	IMPORT_C TInt Logon(TRequestStatus& aStatus) const;
  1.4481 +	IMPORT_C TInt LogonCancel() const;
  1.4482 +	};
  1.4483 +
  1.4484 +
  1.4485 +
  1.4486 +
  1.4487 +/**
  1.4488 +@publishedAll
  1.4489 +@released
  1.4490 +
  1.4491 +Handle to a thread death notifier. 
  1.4492 +
  1.4493 +The notifier allows threads to be notified of the death of another thread. 
  1.4494 +
  1.4495 +The thread-death notifier itself is a kernel object.
  1.4496 +*/
  1.4497 +class RUndertaker : public RHandleBase
  1.4498 +	{
  1.4499 +public:
  1.4500 +	IMPORT_C TInt Create();
  1.4501 +	IMPORT_C TInt Logon(TRequestStatus& aStatus,TInt& aThreadHandle) const;
  1.4502 +	IMPORT_C TInt LogonCancel() const;
  1.4503 +	};
  1.4504 +
  1.4505 +
  1.4506 +
  1.4507 +
  1.4508 +
  1.4509 +class HBufC16;
  1.4510 +/**
  1.4511 +@publishedAll
  1.4512 +@released
  1.4513 +
  1.4514 +A handle to a session with the extended notifier server that provides support
  1.4515 +for plug-in notifiers.
  1.4516 +
  1.4517 +The interface allows engines or other low level components
  1.4518 +to communicate with the UI.
  1.4519 +*/
  1.4520 +class RNotifier : public RSessionBase
  1.4521 +	{
  1.4522 +public:
  1.4523 +	IMPORT_C RNotifier();
  1.4524 +	IMPORT_C TInt Connect();
  1.4525 +	IMPORT_C void Close();
  1.4526 +	IMPORT_C TInt StartNotifier(TUid aNotifierUid,const TDesC8& aBuffer);
  1.4527 +	IMPORT_C TInt StartNotifier(TUid aNotifierUid,const TDesC8& aBuffer,TDes8& aResponse);
  1.4528 +	IMPORT_C TInt StartNotifier(TUid aNotifierDllUid,TUid aNotifierUid,const TDesC8& aBuffer,TDes8& aResponse);
  1.4529 +	IMPORT_C TInt CancelNotifier(TUid aNotifierUid);
  1.4530 +	IMPORT_C TInt UpdateNotifier(TUid aNotifierUid,const TDesC8& aBuffer,TDes8& aResponse);
  1.4531 +	IMPORT_C void UpdateNotifierAndGetResponse(TRequestStatus& aRs,TUid aNotifierUid,const TDesC8& aBuffer,TDes8& aResponse);
  1.4532 +	IMPORT_C void StartNotifierAndGetResponse(TRequestStatus& aRs,TUid aNotifierUid,const TDesC8& aBuffer,TDes8& aResponse);
  1.4533 +	IMPORT_C void StartNotifierAndGetResponse(TRequestStatus& aRs,TUid aNotifierDllUid,TUid aNotifierUid,const TDesC8& aBuffer,TDes8& aResponse);
  1.4534 +	IMPORT_C TInt UnloadNotifiers(TUid aNotifierUid);
  1.4535 +	IMPORT_C TInt LoadNotifiers(TUid aNotifierUid);
  1.4536 +	IMPORT_C void Notify(const TDesC& aLine1,const TDesC& aLine2,const TDesC& aBut1,const TDesC& aBut2,TInt& aButtonVal,TRequestStatus& aStatus);
  1.4537 +	IMPORT_C void NotifyCancel();
  1.4538 +	IMPORT_C TInt InfoPrint(const TDesC& aDes);
  1.4539 +private:
  1.4540 +	TPtr8 iButtonVal;
  1.4541 +	HBufC16* iCombinedBuffer;
  1.4542 +	};
  1.4543 +
  1.4544 +/**
  1.4545 +@publishedAll
  1.4546 +@released
  1.4547 +
  1.4548 +Abstract class that defines a handler to work with the TRAP mechanism.
  1.4549 +
  1.4550 +Symbian OS provides a trap handler and this class does not normally need to be
  1.4551 +used or accessed directly by applications and third party code.
  1.4552 +*/
  1.4553 +class TTrapHandler
  1.4554 +	{
  1.4555 +public:
  1.4556 +	IMPORT_C TTrapHandler();
  1.4557 +	
  1.4558 +	/**
  1.4559 +	Called when a TRAP is invoked.
  1.4560 +	*/
  1.4561 +	IMPORT_C virtual void Trap()=0;
  1.4562 +	
  1.4563 +	/**
  1.4564 +	Called when a function exits a TRAP without leaving.
  1.4565 +    */
  1.4566 +	IMPORT_C virtual void UnTrap()=0;
  1.4567 +	
  1.4568 +	/**
  1.4569 +	Called when a function within a TRAP leaves.
  1.4570 +
  1.4571 +    @param aValue The leave value.
  1.4572 +	*/
  1.4573 +	IMPORT_C virtual void Leave(TInt aValue)=0;
  1.4574 +	};
  1.4575 +
  1.4576 +
  1.4577 +
  1.4578 +
  1.4579 +struct TCollationMethod; // forward declaration
  1.4580 +
  1.4581 +
  1.4582 +
  1.4583 +
  1.4584 +/**
  1.4585 +@publishedAll
  1.4586 +@released
  1.4587 +
  1.4588 +Contains a set of static functions which perform manipulation of
  1.4589 +data in memory.
  1.4590 +
  1.4591 +The arguments passed to the functions of this class are pointers to memory 
  1.4592 +locations and length values. These functions are, therefore, not normally 
  1.4593 +used in open code but are suitable for implementing data manipulation for 
  1.4594 +other classes. Typically the interface provided by such classes is typesafe 
  1.4595 +and hides this direct memory to memory manipulation.
  1.4596 +*/
  1.4597 +class Mem
  1.4598 +	{
  1.4599 +public:
  1.4600 +	inline static TUint8* Copy(TAny* aTrg, const TAny* aSrc, TInt aLength);
  1.4601 +	inline static TUint8* Move(TAny* aTrg, const TAny* aSrc, TInt aLength);
  1.4602 +	inline static void Fill(TAny* aTrg, TInt aLength, TChar aChar);
  1.4603 +	inline static void FillZ(TAny* aTrg, TInt aLength);
  1.4604 +#ifndef __GCC32__
  1.4605 +	inline static TInt Compare(const TUint8* aLeft, TInt aLeftL, const TUint8* aRight, TInt aRightL);
  1.4606 +#else
  1.4607 +	IMPORT_C static TInt Compare(const TUint8* aLeft, TInt aLeftL, const TUint8* aRight, TInt aRightL);
  1.4608 +#endif
  1.4609 +
  1.4610 +	IMPORT_C static TInt Compare(const TUint16* aLeft, TInt aLeftL, const TUint16* aRight, TInt aRightL);
  1.4611 +	IMPORT_C static TInt CompareF(const TUint8* aLeft, TInt aLeftL, const TUint8* aRight, TInt aRightL);
  1.4612 +	IMPORT_C static TInt CompareF(const TUint16* aLeft, TInt aLeftL, const TUint16* aRight, TInt aRightL);
  1.4613 +	IMPORT_C static TInt CompareC(const TUint8* aLeft, TInt aLeftL, const TUint8* aRight, TInt aRightL);
  1.4614 +	IMPORT_C static TInt CompareC(const TUint16* aLeft, TInt aLeftL, const TUint16* aRight, TInt aRightL);
  1.4615 +	IMPORT_C static TInt CompareC(const TUint16* aLeft, TInt aLeftL, const TUint16* aRight, TInt aRightL,
  1.4616 +								  TInt aMaxLevel, const TCollationMethod* aCollationMethod);
  1.4617 +	IMPORT_C static TInt CollationMethods();
  1.4618 +	IMPORT_C static TUint CollationMethodId(TInt aIndex);
  1.4619 +	IMPORT_C static const TCollationMethod* CollationMethodByIndex(TInt aIndex);
  1.4620 +	IMPORT_C static const TCollationMethod* CollationMethodById(TUint aId);
  1.4621 +	IMPORT_C static const TCollationMethod* GetDefaultMatchingTable();
  1.4622 +	IMPORT_C static void Swap(TAny* aPtr1, TAny* aPtr2, TInt aLength);
  1.4623 +	IMPORT_C static void Crc(TUint16& aCrc, const TAny* aPtr, TInt aLength);
  1.4624 +	IMPORT_C static void Crc32(TUint32& aCrc, const TAny* aPtr, TInt aLength);
  1.4625 +	};
  1.4626 +
  1.4627 +
  1.4628 +
  1.4629 +
  1.4630 +
  1.4631 +/**
  1.4632 +@publishedAll
  1.4633 +@released
  1.4634 +
  1.4635 +Set of static user functions.
  1.4636 +
  1.4637 +These functions are related to a number of System component APIs.
  1.4638 +
  1.4639 +The majority of the functions are related to either the current thread, or 
  1.4640 +its heap. Examples in this category include User::Exit(), which causes the 
  1.4641 +thread to terminate, and User::Alloc(), which allocates memory from the current 
  1.4642 +thread's heap.
  1.4643 +
  1.4644 +Some of these functions are equivalent to functions in the RThread or RHeap 
  1.4645 +classes. In these cases, the User function is a convenient way to access the 
  1.4646 +function without first having to get a handle to the current thread.
  1.4647 +
  1.4648 +Functions are also provided to support debugging of memory leaks. These function 
  1.4649 +calls can be written explicitly or can be generated using a corresponding 
  1.4650 +macro - the advantage of using a macro is that the function call is only 
  1.4651 +generated for debug builds.
  1.4652 +
  1.4653 +A final category of functions, which includes User::BinarySearch() and User::QuickSort(), 
  1.4654 +are just useful functions which have no other natural home.
  1.4655 +
  1.4656 +@see RThread
  1.4657 +@see RHeap
  1.4658 +*/
  1.4659 +class User : public UserHeap
  1.4660 +    {
  1.4661 +public:
  1.4662 +    // Execution control
  1.4663 +	IMPORT_C static void InitProcess();			/**< @internalComponent */
  1.4664 +    IMPORT_C static void Exit(TInt aReason);
  1.4665 +    IMPORT_C static void Panic(const TDesC& aCategory,TInt aReason);
  1.4666 +    IMPORT_C static void HandleException(TAny* aInfo);	/**< @internalComponent */
  1.4667 +    // Cleanup support
  1.4668 +    IMPORT_C static void Leave(TInt aReason);
  1.4669 +    IMPORT_C static void LeaveNoMemory();
  1.4670 +    IMPORT_C static TInt LeaveIfError(TInt aReason);
  1.4671 +    IMPORT_C static TAny* LeaveIfNull(TAny* aPtr);
  1.4672 +    inline static const TAny* LeaveIfNull(const TAny* aPtr);
  1.4673 +    IMPORT_C static TTrapHandler* SetTrapHandler(TTrapHandler* aHandler);
  1.4674 +    IMPORT_C static TTrapHandler* TrapHandler();
  1.4675 +    IMPORT_C static TTrapHandler* MarkCleanupStack();   /**< @internalComponent */
  1.4676 +    IMPORT_C static void UnMarkCleanupStack(TTrapHandler* aHandler);   /**< @internalComponent */
  1.4677 +	IMPORT_C static void LeaveEnd();	/**< @internalComponent */
  1.4678 +    // Infoprint
  1.4679 +    IMPORT_C static TInt InfoPrint(const TDesC& aDes);
  1.4680 +    // Asynchronous service support
  1.4681 +    IMPORT_C static void RequestComplete(TRequestStatus*& aStatus,TInt aReason);
  1.4682 +    IMPORT_C static void WaitForAnyRequest();
  1.4683 +    IMPORT_C static void WaitForRequest(TRequestStatus& aStatus); 
  1.4684 +    IMPORT_C static void WaitForRequest(TRequestStatus& aStatus1,TRequestStatus& aStatus2);
  1.4685 +    IMPORT_C static void WaitForNRequest(TRequestStatus *aStatusArray[], TInt aNum);
  1.4686 +    // User heap management
  1.4687 +    IMPORT_C static TInt AllocLen(const TAny* aCell); 
  1.4688 +    IMPORT_C static TAny* Alloc(TInt aSize);
  1.4689 +    IMPORT_C static TAny* AllocL(TInt aSize); 
  1.4690 +    IMPORT_C static TAny* AllocLC(TInt aSize);
  1.4691 +    IMPORT_C static TAny* AllocZ(TInt aSize);
  1.4692 +    IMPORT_C static TAny* AllocZL(TInt aSize); 
  1.4693 +    IMPORT_C static TInt AllocSize(TInt& aTotalAllocSize); 
  1.4694 +    IMPORT_C static TInt Available(TInt& aBiggestBlock); 
  1.4695 +    IMPORT_C static TInt CountAllocCells();
  1.4696 +    IMPORT_C static TInt CountAllocCells(TInt& aFreeCount); 
  1.4697 +    IMPORT_C static void Free(TAny* aCell);
  1.4698 +    IMPORT_C static void FreeZ(TAny*& aCell); 
  1.4699 +    IMPORT_C static RAllocator& Allocator();
  1.4700 +    inline static RHeap& Heap();
  1.4701 +    IMPORT_C static TAny* ReAlloc(TAny* aCell, TInt aSize, TInt aMode=0);
  1.4702 +    IMPORT_C static TAny* ReAllocL(TAny* aCell, TInt aSize, TInt aMode=0);
  1.4703 +    IMPORT_C static RAllocator* SwitchAllocator(RAllocator* aAllocator);
  1.4704 +	inline static RHeap* SwitchHeap(RAllocator* aHeap);
  1.4705 +	IMPORT_C static TInt CompressAllHeaps();
  1.4706 +    // Synchronous timer services
  1.4707 +    IMPORT_C static void After(TTimeIntervalMicroSeconds32 aInterval);
  1.4708 +    IMPORT_C static TInt At(const TTime& aTime);
  1.4709 +    IMPORT_C static void AfterHighRes(TTimeIntervalMicroSeconds32 aInterval);
  1.4710 +    // Set time and deal with timezones
  1.4711 +    IMPORT_C static TInt SetHomeTime(const TTime& aTime);
  1.4712 +    IMPORT_C static TInt SetHomeTimeSecure(const TTime& aTime);
  1.4713 +	IMPORT_C static TInt SetUTCTime(const TTime& aUTCTime);
  1.4714 +	IMPORT_C static TInt SetUTCTimeSecure(const TTime& aUTCTime);
  1.4715 +	IMPORT_C static TTimeIntervalSeconds UTCOffset();
  1.4716 +	IMPORT_C static void SetUTCOffset(TTimeIntervalSeconds aOffset);
  1.4717 +	IMPORT_C static TInt SetUTCTimeAndOffset(const TTime& aUTCTime, TTimeIntervalSeconds aOffset);
  1.4718 +    // Set locale information
  1.4719 +    IMPORT_C static TInt SetCurrencySymbol(const TDesC& aSymbol);
  1.4720 +	// Set floating point mode
  1.4721 +	IMPORT_C static TInt SetFloatingPointMode(TFloatingPointMode aMode, TFloatingPointRoundingMode aRoundingMode=EFpRoundToNearest);
  1.4722 +	// Timers
  1.4723 +	IMPORT_C static TUint TickCount();
  1.4724 +	IMPORT_C static TUint32 NTickCount();
  1.4725 +	IMPORT_C static TTimerLockSpec LockPeriod();
  1.4726 +	IMPORT_C static TTimeIntervalSeconds InactivityTime();
  1.4727 +	IMPORT_C static void ResetInactivityTime();
  1.4728 +	IMPORT_C static TUint32 FastCounter();
  1.4729 +	// Atomic operations
  1.4730 +	IMPORT_C static TInt LockedInc(TInt& aValue);
  1.4731 +	IMPORT_C static TInt LockedDec(TInt& aValue);
  1.4732 +	IMPORT_C static TInt SafeInc(TInt& aValue);
  1.4733 +	IMPORT_C static TInt SafeDec(TInt& aValue);
  1.4734 +    // Beep
  1.4735 +    IMPORT_C static TInt Beep(TInt aFrequency,TTimeIntervalMicroSeconds32 aDuration); 
  1.4736 +    // Information
  1.4737 +    IMPORT_C static TInt IsRomAddress(TBool& aBool,TAny* aPtr);
  1.4738 +    // Algorithms
  1.4739 +    IMPORT_C static TInt BinarySearch(TInt aCount,const TKey& aKey,TInt& aPos);
  1.4740 +    IMPORT_C static TInt QuickSort(TInt aCount,const TKey& aKey,const TSwap& aSwap);
  1.4741 +    // Language-dependent character functions 
  1.4742 +    IMPORT_C static TLanguage Language();
  1.4743 +    IMPORT_C static TRegionCode RegionCode();
  1.4744 +    IMPORT_C static TUint Collate(TUint aChar); 
  1.4745 +    IMPORT_C static TUint Fold(TUint aChar); 
  1.4746 +    IMPORT_C static TUint LowerCase(TUint aChar); 
  1.4747 +    IMPORT_C static TUint UpperCase(TUint aChar); 
  1.4748 +	IMPORT_C static TUint Fold(TUint aChar,TInt aFlags);
  1.4749 +	IMPORT_C static TUint TitleCase(TUint aChar);
  1.4750 +    // C-style string length
  1.4751 +    IMPORT_C static TInt StringLength(const TUint8* aString); 
  1.4752 +    IMPORT_C static TInt StringLength(const TUint16* aString);
  1.4753 +    // Device management
  1.4754 +    IMPORT_C static TInt FreeLogicalDevice(const TDesC& aDeviceName); 
  1.4755 +	IMPORT_C static TInt FreePhysicalDevice(const TDesC& aDriverName); 
  1.4756 +    IMPORT_C static TInt LoadLogicalDevice(const TDesC& aFileName); 
  1.4757 +    IMPORT_C static TInt LoadPhysicalDevice(const TDesC& aFileName); 
  1.4758 +    // Version information
  1.4759 +    IMPORT_C static TBool QueryVersionSupported(const TVersion& aCurrent,const TVersion& aRequested);
  1.4760 +    IMPORT_C static TVersion Version();
  1.4761 +    // Machine configuration
  1.4762 +    IMPORT_C static TInt SetMachineConfiguration(const TDesC8& aConfig);
  1.4763 +    IMPORT_C static TInt MachineConfiguration(TDes8& aConfig,TInt& aSize);
  1.4764 +    // Debugging support
  1.4765 +    IMPORT_C static void SetDebugMask(TUint32 aVal);
  1.4766 +    IMPORT_C static void SetDebugMask(TUint32 aVal, TUint aIndex);
  1.4767 +    IMPORT_C static void SetJustInTime(const TBool aBoolean); 
  1.4768 +    IMPORT_C static void Check();
  1.4769 +    IMPORT_C static void Invariant();
  1.4770 +    IMPORT_C static TBool JustInTime();
  1.4771 +    IMPORT_C static void __DbgMarkStart(TBool aKernel);
  1.4772 +    IMPORT_C static void __DbgMarkCheck(TBool aKernel, TBool aCountAll, TInt aCount, const TUint8* aFileName, TInt aLineNum);
  1.4773 +    IMPORT_C static TUint32 __DbgMarkEnd(TBool aKernel, TInt aCount);
  1.4774 +    IMPORT_C static void __DbgSetAllocFail(TBool aKernel, RAllocator::TAllocFail aFail, TInt aRate);
  1.4775 +    IMPORT_C static void __DbgSetBurstAllocFail(TBool aKernel, RAllocator::TAllocFail aFail, TUint aRate, TUint aBurst);
  1.4776 +	IMPORT_C static TUint __DbgCheckFailure(TBool aKernel);
  1.4777 +	IMPORT_C static void PanicUnexpectedLeave(); /**< @internalComponent */
  1.4778 +    // Name Validation
  1.4779 +    IMPORT_C static TInt ValidateName(const TDesC& aName);
  1.4780 +	// Instruction Memory Barrier
  1.4781 +	IMPORT_C static void IMB_Range(TAny* aStart, TAny* aEnd);
  1.4782 +	//
  1.4783 +	IMPORT_C static TInt CommandLineLength();
  1.4784 +	IMPORT_C static void CommandLine(TDes &aCommand);
  1.4785 +	IMPORT_C static TExceptionHandler ExceptionHandler();
  1.4786 +	IMPORT_C static TInt SetExceptionHandler(TExceptionHandler aHandler,TUint32 aMask);
  1.4787 +	IMPORT_C static void ModifyExceptionMask(TUint32 aClearMask, TUint32 aSetMask);
  1.4788 +	IMPORT_C static TInt RaiseException(TExcType aType);
  1.4789 +	IMPORT_C static TBool IsExceptionHandled(TExcType aType);
  1.4790 +
  1.4791 +	/**
  1.4792 +	A set of values that defines the effect that terminating a thread 
  1.4793 +	has, either on its owning process or on the whole system.
  1.4794 +	
  1.4795 +	A thread is said to be critical if its owning process or the entire system
  1.4796 +	terminates when the thread itself terminates. 
  1.4797 +	
  1.4798 +	You pass one of these values to the functions:
  1.4799 +	- User::SetCritical()
  1.4800 +	- User::SetProcessCritical()
  1.4801 +	
  1.4802 +	The meaning of a value when passed to one function is different to
  1.4803 +	its meaning when passed the other function. See the description of each
  1.4804 +	individual value.
  1.4805 +			
  1.4806 +	@see User::SetCritical()
  1.4807 +	@see User::SetProcessCritical()
  1.4808 +	*/
  1.4809 +	enum TCritical {
  1.4810 +	
  1.4811 +	
  1.4812 +	               /**
  1.4813 +                   This value can be passed to both:
  1.4814 +                   - User::SetCritical(), which means that the current thread
  1.4815 +                   is no longer critical, i.e. termination of the current
  1.4816 +                   thread will no longer cause termination of the current thread's
  1.4817 +                   owning process (i.e. the current process) or a reboot of the system.
  1.4818 +                   - User::SetProcessCritical(), which means that threads
  1.4819 +                   subsequently created in the current thread's owning
  1.4820 +                   process (i.e. the current process) will no longer cause termination of that
  1.4821 +                   process or a reboot of the system. Note, however, that existing
  1.4822 +                   threads are NOT affected when you call this function.
  1.4823 +                   
  1.4824 +                   @see User::SetCritical()
  1.4825 +                   @see User::SetProcessCritical()
  1.4826 +                   */
  1.4827 +                   ENotCritical, 
  1.4828 +                   
  1.4829 +                                      
  1.4830 +                   /**
  1.4831 +                   This value can only be passed to User::SetCritical() and
  1.4832 +                   affects the current thread only.
  1.4833 +                   
  1.4834 +                   It means that the owning process (i.e.the current process)
  1.4835 +                   terminates if:
  1.4836 +                   - the current thread is terminated.
  1.4837 +                   - the current thread panics.
  1.4838 +                   
  1.4839 +                   @see User::SetCritical()
  1.4840 +                   */	
  1.4841 +	               EProcessCritical,
  1.4842 +
  1.4843 +	               
  1.4844 +	               /**
  1.4845 +                   This value can only be passed to User::SetCritical() and
  1.4846 +                   affects the current thread only.
  1.4847 +                   
  1.4848 +                   It means that the owning process (i.e.the current process)
  1.4849 +                   terminates if the current thread terminates for any reason.
  1.4850 +                   
  1.4851 +                   @see User::SetCritical()
  1.4852 +                   */
  1.4853 +	               EProcessPermanent,
  1.4854 +	               
  1.4855 +	               
  1.4856 +	               /**
  1.4857 +	               This value can only be passed to User::SetProcessCritical() and
  1.4858 +                   affects any new threads created in the current process.
  1.4859 +	               
  1.4860 +	               It means that the current process terminates if:
  1.4861 +	               - any new thread subsequently created in the current process is terminated.
  1.4862 +	               - any new thread subsequently created in the current process panics.
  1.4863 +	               .
  1.4864 +	               Note, however, that existing threads in the current process
  1.4865 +	               are NOT affected when you call User::SetProcessCritical()
  1.4866 +	               with this value.
  1.4867 +	               	               
  1.4868 +	               @see EProcessCritical
  1.4869 +                   @see User::SetProcessCritical()
  1.4870 +	               */
  1.4871 +	               EAllThreadsCritical,
  1.4872 +	                	                
  1.4873 +	                
  1.4874 +	               /**
  1.4875 +	               This value can be passed to both: User::SetCritical() and
  1.4876 +	               User::SetProcessCritical().
  1.4877 +                   
  1.4878 +                   When passed to User::SetCritical(), it means that
  1.4879 +                   the entire system is rebooted if:
  1.4880 +                   - the current thread is terminated.
  1.4881 +                   - the current thread panics.
  1.4882 +                   
  1.4883 +                   When passed to User::SetProcessCritical(), it means that
  1.4884 +                   the entire system is rebooted if:
  1.4885 +                   - any new thread subsequently created in the current process is terminated.
  1.4886 +                   - any new thread subsequently created in the current process panics.
  1.4887 +                   - the process itself is terminated
  1.4888 +                   - the process itself panics
  1.4889 +	               
  1.4890 +	               Note:
  1.4891 +                   -# existing threads in the current process are NOT affected when you
  1.4892 +                   call User::SetProcessCritical() with this value.
  1.4893 +                   -# Only a process with 'Protected Server' capability can set a
  1.4894 +                   thread to system-critical.
  1.4895 +                   
  1.4896 +                   @see User::SetCritical()
  1.4897 +                   @see User::SetProcessCritical()
  1.4898 +	               */
  1.4899 +	               ESystemCritical,
  1.4900 +	               
  1.4901 +	               
  1.4902 +	               /**
  1.4903 +	               This value can be passed to both: User::SetCritical()
  1.4904 +	               and User::SetProcessCritical().
  1.4905 +                   
  1.4906 +                   When passed to User::SetCritical(), it means that
  1.4907 +                   the entire system is rebooted if the current thread
  1.4908 +                   exits for any reason.
  1.4909 +                   
  1.4910 +                   When passed to User::SetProcessCritical(), it means that
  1.4911 +                   the entire system is rebooted if any new thread 
  1.4912 +                   subsequently created in the current process exits
  1.4913 +                   for any reason, or if the process itself exits for any reason.
  1.4914 +	               
  1.4915 +	               Note:
  1.4916 +                   -# existing threads in the current process are NOT affected when you
  1.4917 +                   call User::SetProcessCritical() with this value.
  1.4918 +                   -# Only a process with 'Protected Server' capability can set a
  1.4919 +                   thread to system-permanent.
  1.4920 +                   
  1.4921 +                   @see User::SetCritical()
  1.4922 +                   @see User::SetProcessCritical()
  1.4923 +	               */
  1.4924 +	               ESystemPermanent
  1.4925 +	               };
  1.4926 +	IMPORT_C static TCritical Critical();
  1.4927 +	IMPORT_C static TCritical Critical(RThread aThread);
  1.4928 +	IMPORT_C static TInt SetCritical(TCritical aCritical);
  1.4929 +	IMPORT_C static TCritical ProcessCritical();
  1.4930 +	IMPORT_C static TCritical ProcessCritical(RProcess aProcess);
  1.4931 +	IMPORT_C static TInt SetProcessCritical(TCritical aCritical);
  1.4932 +	IMPORT_C static TBool PriorityControl();
  1.4933 +	IMPORT_C static void SetPriorityControl(TBool aEnable);
  1.4934 +
  1.4935 +	/**
  1.4936 +	A threads realtime state.
  1.4937 +	Some non-realtime behaviour can be detected by the kernel. When it does so,
  1.4938 +	action is taken depending on the thread state:
  1.4939 +	-	ERealtimeStateOff - no action.
  1.4940 +	-	ERealtimeStateOn - the the thread will be panicked with KERN-EXEC 61 (EIllegalFunctionForRealtimeThread).
  1.4941 +	-	ERealtimeStateWarn - no action. However, if the kernel trace flag KREALTIME is enabled
  1.4942 +							 then tracing will be emitted as if the thread state was ERealtimeStateOn.
  1.4943 +	@publishedPartner
  1.4944 +	@released
  1.4945 +	*/
  1.4946 +	enum TRealtimeState
  1.4947 +		{
  1.4948 +		ERealtimeStateOff,	/**< Thread is not realtime */
  1.4949 +		ERealtimeStateOn,	/**< Thread is realtime */
  1.4950 +		ERealtimeStateWarn	/**< Thread is realtime but doesn't want this enforced */
  1.4951 +		};
  1.4952 +
  1.4953 +	/**
  1.4954 +	Set the current threads realtime state.
  1.4955 +	@see TRealtimeState
  1.4956 +	@param aState The state
  1.4957 +	@return KErrNone if successful. KErrArgument if aState is invalid.
  1.4958 +	@publishedPartner
  1.4959 +	@released
  1.4960 +	*/
  1.4961 +	IMPORT_C static TInt SetRealtimeState(TRealtimeState aState);
  1.4962 +
  1.4963 +	/**
  1.4964 +	Return the Secure ID of the process that created the current process.
  1.4965 +	@return The Secure ID.
  1.4966 +	@publishedAll
  1.4967 +	@released
  1.4968 +	*/
  1.4969 +	IMPORT_C static TSecureId CreatorSecureId();
  1.4970 +
  1.4971 +	/**
  1.4972 +	Return the Vendor ID of the process that created the current process.
  1.4973 +	@return The Vendor ID.
  1.4974 +	@publishedAll
  1.4975 +	@released
  1.4976 +	*/
  1.4977 +	IMPORT_C static TVendorId CreatorVendorId();
  1.4978 +
  1.4979 +	/**
  1.4980 +	Check if the process that created the current process has a given capability
  1.4981 +
  1.4982 +	When a check fails the action taken is determined by the system wide Platform Security
  1.4983 +	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  1.4984 +	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  1.4985 +	check failed.
  1.4986 +
  1.4987 +	@param aCapability The capability to test.
  1.4988 +	@param aDiagnostic A string that will be emitted along with any diagnostic message
  1.4989 +								that may be issued if the test finds the capability is not present.
  1.4990 +								This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  1.4991 +								which enables it to be easily removed from the system.
  1.4992 +	@return ETrue if the creator process has the capability, EFalse otherwise.
  1.4993 +	@publishedAll
  1.4994 +	@released
  1.4995 +	*/
  1.4996 +#ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.4997 +	inline static TBool CreatorHasCapability(TCapability aCapability, const char* aDiagnostic=0);
  1.4998 +#else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.4999 +	// Only available to NULL arguments
  1.5000 +	inline static TBool CreatorHasCapability(TCapability aCapability, OnlyCreateWithNull aDiagnostic=NULL);
  1.5001 +#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
  1.5002 +	// For things using KSuppressPlatSecDiagnostic
  1.5003 +	inline static TBool CreatorHasCapability(TCapability aCapability, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress);
  1.5004 +#endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
  1.5005 +#endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.5006 +
  1.5007 +	/**
  1.5008 +	Check if the process that created the current process has both of the given capabilities
  1.5009 +
  1.5010 +	When a check fails the action taken is determined by the system wide Platform Security
  1.5011 +	configuration. If PlatSecDiagnostics is ON, then a diagnostic message is emitted.
  1.5012 +	If PlatSecEnforcement is OFF, then this function will return ETrue even though the
  1.5013 +	check failed.
  1.5014 +
  1.5015 +	@param aCapability1 The first capability to test.
  1.5016 +	@param aCapability2 The second capability to test.
  1.5017 +	@param aDiagnostic A string that will be emitted along with any diagnostic message
  1.5018 +								that may be issued if the test finds a capability is not present.
  1.5019 +								This string must be enclosed in the __PLATSEC_DIAGNOSTIC_STRING macro
  1.5020 +								which enables it to be easily removed from the system.
  1.5021 +	@return ETrue if the creator process has both the capabilities, EFalse otherwise.
  1.5022 +	@publishedAll
  1.5023 +	@released
  1.5024 +	*/
  1.5025 +#ifndef __REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.5026 +	inline static TBool CreatorHasCapability(TCapability aCapability1, TCapability aCapability2, const char* aDiagnostic=0);
  1.5027 +#else //__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.5028 +	// Only available to NULL arguments
  1.5029 +	inline static TBool CreatorHasCapability(TCapability aCapability1, TCapability aCapability2, OnlyCreateWithNull aDiagnostic=NULL);
  1.5030 +#ifndef __REMOVE_PLATSEC_DIAGNOSTICS__
  1.5031 +	// For things using KSuppressPlatSecDiagnostic
  1.5032 +	inline static TBool CreatorHasCapability(TCapability aCapability, TCapability aCapability2, OnlyCreateWithNull aDiagnostic, OnlyCreateWithNull aSuppress);
  1.5033 +#endif // !__REMOVE_PLATSEC_DIAGNOSTICS__
  1.5034 +#endif // !__REMOVE_PLATSEC_DIAGNOSTIC_STRINGS__
  1.5035 +
  1.5036 +	IMPORT_C static TInt ParameterLength(TInt aSlot);
  1.5037 +	IMPORT_C static TInt GetTIntParameter(TInt aSlot, TInt& aData);
  1.5038 +	IMPORT_C static TInt GetDesParameter(TInt aSlot, TDes8& aDes);
  1.5039 +	IMPORT_C static TInt GetDesParameter(TInt aSlot, TDes16& aDes);
  1.5040 +	IMPORT_C static TInt RenameThread(const TDesC &aName);
  1.5041 +	IMPORT_C static TInt RenameProcess(const TDesC &aName);
  1.5042 +	/*
  1.5043 +	User::Identity() has been deprecated and is available for backward
  1.5044 +	compatibility purposes only.
  1.5045 +
  1.5046 +	Use RProcess().SecureId() instead.
  1.5047 +    
  1.5048 +	@deprecated
  1.5049 +	*/
  1.5050 +	inline static TUid Identity() { return RProcess().SecureId(); }
  1.5051 +
  1.5052 +	/*
  1.5053 +	User::CreatorIdentity() has been deprecated and is available for backward
  1.5054 +	compatibility purposes only.
  1.5055 +
  1.5056 +	Use CreatorSecureId() instead.
  1.5057 +	
  1.5058 +	@deprecated
  1.5059 +	*/
  1.5060 +	static inline TUid CreatorIdentity() { return CreatorSecureId(); }
  1.5061 +
  1.5062 +	IMPORT_C static void NotifyOnIdle(TRequestStatus& aStatus);			/**< @internalTechnology */
  1.5063 +	IMPORT_C static void CancelMiscNotifier(TRequestStatus& aStatus);	/**< @internalTechnology */
  1.5064 +private:
  1.5065 +	// Implementations of functions with diagnostics
  1.5066 +	IMPORT_C static TBool DoCreatorHasCapability(TCapability aCapability, const char* aDiagnostic);
  1.5067 +	IMPORT_C static TBool DoCreatorHasCapability(TCapability aCapability);
  1.5068 +	IMPORT_C static TBool DoCreatorHasCapability(TCapability aCapability1, TCapability aCapability2, const char* aDiagnostic);
  1.5069 +	IMPORT_C static TBool DoCreatorHasCapability(TCapability aCapability1, TCapability aCapability2);
  1.5070 +	};
  1.5071 +
  1.5072 +
  1.5073 +
  1.5074 +
  1.5075 +class ExecHandler;
  1.5076 +
  1.5077 +/**
  1.5078 +@internalComponent
  1.5079 +@removed
  1.5080 +*/
  1.5081 +typedef void (*TTlsCleanupHandler)(TAny*);		//don't use
  1.5082 +
  1.5083 +/**
  1.5084 +@publishedAll
  1.5085 +@released
  1.5086 +
  1.5087 +A collection of static functions involved in managing access to
  1.5088 +thread-local storage. 
  1.5089 +
  1.5090 +Thread-local storage is a single machine word of static writable memory.
  1.5091 +The scope of this machine word is the thread, which means that there is one
  1.5092 +word per thread. The word is only accessible to code running in a DLL.
  1.5093 +
  1.5094 +In practice, this word is almost always used to hold a pointer to allocated
  1.5095 +memory; this makes that memory available to all DLL code running on behalf
  1.5096 +of the same thread.
  1.5097 +
  1.5098 +Note that DLL code running on behalf of one thread does not see the same word when
  1.5099 +running on behalf of another thread. 
  1.5100 +
  1.5101 +The class in not intended for user derivation.
  1.5102 +*/
  1.5103 +class Dll
  1.5104 +	{
  1.5105 +public:
  1.5106 +	static TInt SetTls(TAny* aPtr);
  1.5107 +	static TAny* Tls();
  1.5108 +	static void FreeTls();
  1.5109 +	static void FileName(TFileName &aFileName);
  1.5110 +	};
  1.5111 +
  1.5112 +
  1.5113 +
  1.5114 +//SL:
  1.5115 +//#ifndef __TOOLS__
  1.5116 +/**
  1.5117 +@publishedAll
  1.5118 +@released
  1.5119 +
  1.5120 +A thin wrapper class for C++ arrays allowing automatic checking of index values 
  1.5121 +to ensure that all accesses are legal. 
  1.5122 +
  1.5123 +The class also supports the deletion of objects.
  1.5124 +
  1.5125 +The class is templated, based on a class type and an integer value. The class 
  1.5126 +type defines the type of object contained in the array; the integer value 
  1.5127 +defines the size (dimension) of the array.
  1.5128 +
  1.5129 +A wrapper object can be:
  1.5130 +
  1.5131 +1. embedded in objects allocated on the heap.
  1.5132 +
  1.5133 +2. used on the program stack.
  1.5134 +*/
  1.5135 +template <class T,TInt S> 
  1.5136 +class TFixedArray
  1.5137 +	{
  1.5138 +	typedef TFixedArray<T,S> ThisClass;
  1.5139 +public:
  1.5140 +	inline TFixedArray();
  1.5141 +	inline TFixedArray(const T* aList, TInt aLength);
  1.5142 +	//
  1.5143 +	inline void Copy(const T* aList, TInt aLength);
  1.5144 +	inline void Reset();		// zero fill
  1.5145 +	inline void DeleteAll();
  1.5146 +	//
  1.5147 +	inline TInt Count() const;
  1.5148 +	inline TInt Length() const;
  1.5149 +	// Accessors - debug range checking
  1.5150 +	inline T& operator[](TInt aIndex);
  1.5151 +	inline const T& operator[] (TInt aIndex) const;
  1.5152 +	// Accessors - always range checking
  1.5153 +	inline T& At(TInt aIndex);
  1.5154 +	inline const T& At(TInt aIndex) const;
  1.5155 +	// Provides pointers to the beginning and end of the array
  1.5156 +	inline T* Begin();
  1.5157 +	inline T* End();
  1.5158 +	inline const T* Begin() const;
  1.5159 +	inline const T* End() const;
  1.5160 +	//
  1.5161 +	inline TArray<T> Array() const;
  1.5162 +protected:
  1.5163 +	inline static TBool InRange(TInt aIndex);
  1.5164 +	inline static TInt CountFunctionR(const CBase* aThis);
  1.5165 +	inline static const TAny* AtFunctionR(const CBase* aThis,TInt aIndex);
  1.5166 +protected:
  1.5167 +	T iRep[S];
  1.5168 +	};
  1.5169 +
  1.5170 +
  1.5171 +
  1.5172 +
  1.5173 +/**
  1.5174 +@publishedAll
  1.5175 +@released
  1.5176 +*/
  1.5177 +#define DECLARE_ROM_ARRAY( AName, AData, AType ) \
  1.5178 +   	const TFixedArray<AType,(sizeof(AData)/sizeof((AData)[0]))>& \
  1.5179 +            AName = *(reinterpret_cast<const TFixedArray<AType, \
  1.5180 +                           (sizeof(AData)/sizeof((AData)[0]))>* > (AData))
  1.5181 +//#endif
  1.5182 +
  1.5183 +// Global leaving operator new
  1.5184 +/**
  1.5185 +@publishedAll
  1.5186 +@released
  1.5187 +*/
  1.5188 +inline TAny* operator new(TUint aSize, TLeave);
  1.5189 +/**
  1.5190 +@publishedAll
  1.5191 +@released
  1.5192 +*/
  1.5193 +inline TAny* operator new(TUint aSize, TLeave, TUint aExtraSize);
  1.5194 +#if !defined(__VC32__) || defined (__MSVCDOTNET__)
  1.5195 +/**
  1.5196 +@publishedAll
  1.5197 +@released
  1.5198 +*/
  1.5199 +inline TAny* operator new[](TUint aSize, TLeave);
  1.5200 +#endif
  1.5201 +
  1.5202 +
  1.5203 +#ifdef __LEAVE_EQUALS_THROW__
  1.5204 +/** Macro to assert in all builds that code does not leave
  1.5205 +
  1.5206 +@param	_s	C++ statements to be executed which should not leave
  1.5207 +@panic	USER 194 if the code being checked does leave
  1.5208 +
  1.5209 +@publishedAll
  1.5210 +@released
  1.5211 +*/
  1.5212 +#define	__ASSERT_ALWAYS_NO_LEAVE(_s)	\
  1.5213 +	{														\
  1.5214 +	try	{													\
  1.5215 +		TTrapHandler* ____t = User::MarkCleanupStack();		\
  1.5216 +		_s;													\
  1.5217 +		User::UnMarkCleanupStack(____t);					\
  1.5218 +		}													\
  1.5219 +	catch (XLeaveException& /*l*/)							\
  1.5220 +		{													\
  1.5221 +		User::PanicUnexpectedLeave();						\
  1.5222 +		}													\
  1.5223 +	catch (...)												\
  1.5224 +		{													\
  1.5225 +		User::Invariant();									\
  1.5226 +		}													\
  1.5227 +	}
  1.5228 +
  1.5229 +#else
  1.5230 +/** Macro to assert in all builds that code does not leave
  1.5231 +
  1.5232 +@param	_s	C++ statements to be executed which should not leave
  1.5233 +@panic	USER 194 if the code being checked does leave
  1.5234 +
  1.5235 +@publishedAll
  1.5236 +@released
  1.5237 +*/
  1.5238 +#define	__ASSERT_ALWAYS_NO_LEAVE(_s)	\
  1.5239 +	{									\
  1.5240 +	TInt _r;							\
  1.5241 +	TTrap _t;							\
  1.5242 +	if (_t.Trap(_r) == 0)				\
  1.5243 +		{								\
  1.5244 +		_s;								\
  1.5245 +		TTrap::UnTrap();				\
  1.5246 +		}								\
  1.5247 +	else								\
  1.5248 +		User::PanicUnexpectedLeave();	\
  1.5249 +	}
  1.5250 +#endif
  1.5251 +
  1.5252 +/** Macro to assert in debug builds that code does not leave
  1.5253 +
  1.5254 +@param	_s	C++ statements to be executed which should not leave
  1.5255 +@panic	USER 194 if the code being checked does leave
  1.5256 +
  1.5257 +@publishedAll
  1.5258 +@released
  1.5259 +*/
  1.5260 +#ifdef _DEBUG
  1.5261 +#define	__ASSERT_DEBUG_NO_LEAVE(_s)		__ASSERT_ALWAYS_NO_LEAVE(_s)
  1.5262 +#else
  1.5263 +#define	__ASSERT_DEBUG_NO_LEAVE(_s)		{ _s; }
  1.5264 +#endif
  1.5265 +
  1.5266 +
  1.5267 +
  1.5268 +// Inline methods
  1.5269 +#include <e32std.inl>
  1.5270 +
  1.5271 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
  1.5272 +#include <e32std_private.h>
  1.5273 +#endif
  1.5274 +
  1.5275 +#endif
  1.5276 +