epoc32/include/ewsd.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     1 /*
     2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     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".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:
    15 * Name        : ewsd.h
    16 * Part of     : ewsd library
    17 * Contains the declarations of the APIs of the emulator WSD library 
    18 *
    19 */
    20 
    21 
    22  
    23 #ifndef __EWSD_H__
    24 #define __EWSD_H__
    25 
    26 #ifdef __WINSCW__
    27 
    28 #include <e32std.h>
    29 
    30 /** 
    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
    34 */
    35 
    36 /**  
    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					
    42 */
    43 IMPORT_C TAny* CheckPls(const TUid& aLibraryUid);
    44 
    45 /**  
    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
    51 */
    52 IMPORT_C TInt SetPls(TAny* aPls, const TUid& aLibraryUid);
    53 
    54 /**  
    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
    59 */
    60 IMPORT_C TAny* AllocatePls(const TInt& aSize);
    61 
    62 /**  
    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
    66 */
    67 IMPORT_C TInt FreePls(TAny* aPls); 
    68 
    69 /**  
    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*)
    75 */
    76 IMPORT_C TAny* ObtainPlsMutex();
    77 
    78 /**  
    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										
    82 */
    83 IMPORT_C void ReleasePlsMutex(TAny* aMutexHandle);
    84 
    85 #endif // __WINSCW__
    86 
    87 #endif // __EWSD_H__
    88