2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
16 * Part of : ewsd library
17 * Contains the declarations of the APIs of the emulator WSD library
31 * The following functions should not be used directly.
32 * Libraries that require to use the emulator WSD library
33 * should use the Pls() API defined in pls.h
37 Finds and returns the PLS (Process Local Storage) object of the specified
38 library for the current process, if the object exists.
39 Takes as a parameter the TUid of the library DLL whose PLS object is to
40 be returned for the current process.
41 Returns a pointer to the PLS object if it exists, otherwise NULL
43 IMPORT_C TAny* CheckPls(const TUid& aLibraryUid);
46 Sets the PLS object of the specified library, for the current process.
47 Takes as parameters the PLS object to be set, and the TUid of the library
48 DLL whose PLS object it is.
49 Returns KErrNone on success, and KErrNoMemory if the PLS object could not
50 be stored because a size limit of the WSD array has been reached
52 IMPORT_C TInt SetPls(TAny* aPls, const TUid& aLibraryUid);
55 Allocates the specified number of bytes of memory from the emulator's
56 Virtual Address Space.
57 Takes as a parameter the number of bytes of memory to allocate.
58 Returns a pointer to the allocated memory on success, otherwise NULL
60 IMPORT_C TAny* AllocatePls(const TInt& aSize);
63 Frees the specified memory in the emulator's Virtual Address Space.
64 Takes as a parameter the PLS object location to be freed.
65 Returns KErrNone on success, otherwise KErrAccessDenied
67 IMPORT_C TInt FreePls(TAny* aPls);
70 Gets a handle to the mutex, waits until it obtains ownership of it
71 and then returns the handle.
72 Returns a handle to the mutex, of which the caller now has ownership.
73 Note that the handle is returned as a TAny* (the Windows HANDLE type
74 is typedefed to void*)
76 IMPORT_C TAny* ObtainPlsMutex();
79 Releases ownership of the mutex, which allows another thread
80 to acquire ownership of it.
81 Takes as a parameter a handle to the mutex
83 IMPORT_C void ReleasePlsMutex(TAny* aMutexHandle);