1.1 --- a/epoc32/include/ewsd.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/ewsd.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,106 @@
1.4 -ewsd.h
1.5 +/*
1.6 +* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description:
1.19 +* Name : ewsd.h
1.20 +* Part of : ewsd library
1.21 +* Contains the declarations of the APIs of the emulator WSD library
1.22 +* Redistribution and use in source and binary forms, with or without
1.23 +* modification, are permitted provided that the following conditions are met:
1.24 +* Redistributions of source code must retain the above copyright notice, this
1.25 +* list of conditions and the following disclaimer.
1.26 +* Redistributions in binary form must reproduce the above copyright notice,
1.27 +* this list of conditions and the following disclaimer in the documentation
1.28 +* and/or other materials provided with the distribution.
1.29 +* Neither the name of the <ORGANIZATION> nor the names of its contributors
1.30 +* may be used to endorse or promote products derived from this software
1.31 +* without specific prior written permission.
1.32 +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
1.33 +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1.34 +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
1.35 +* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
1.36 +* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
1.37 +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
1.38 +* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
1.39 +* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
1.40 +* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1.41 +* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1.42 +*
1.43 +*/
1.44 +
1.45 +
1.46 +
1.47 +#ifndef __EWSD_H__
1.48 +#define __EWSD_H__
1.49 +
1.50 +#ifdef __WINSCW__
1.51 +
1.52 +/**
1.53 +* The following functions should not be used directly.
1.54 +* Libraries that require to use the emulator WSD library
1.55 +* should use the Pls() API defined in pls.h
1.56 +*/
1.57 +
1.58 +/**
1.59 +Finds and returns the PLS (Process Local Storage) object of the specified
1.60 +library for the current process, if the object exists.
1.61 +Takes as a parameter the TUid of the library DLL whose PLS object is to
1.62 +be returned for the current process.
1.63 +Returns a pointer to the PLS object if it exists, otherwise NULL
1.64 +*/
1.65 +IMPORT_C TAny* CheckPls(const TUid& aLibraryUid);
1.66 +
1.67 +/**
1.68 +Sets the PLS object of the specified library, for the current process.
1.69 +Takes as parameters the PLS object to be set, and the TUid of the library
1.70 +DLL whose PLS object it is.
1.71 +Returns KErrNone on success, and KErrNoMemory if the PLS object could not
1.72 +be stored because a size limit of the WSD array has been reached
1.73 +*/
1.74 +IMPORT_C TInt SetPls(TAny* aPls, const TUid& aLibraryUid);
1.75 +
1.76 +/**
1.77 +Allocates the specified number of bytes of memory from the emulator's
1.78 +Virtual Address Space.
1.79 +Takes as a parameter the number of bytes of memory to allocate.
1.80 +Returns a pointer to the allocated memory on success, otherwise NULL
1.81 +*/
1.82 +IMPORT_C TAny* AllocatePls(const TInt& aSize);
1.83 +
1.84 +/**
1.85 +Frees the specified memory in the emulator's Virtual Address Space.
1.86 +Takes as a parameter the PLS object location to be freed.
1.87 +Returns KErrNone on success, otherwise KErrAccessDenied
1.88 +*/
1.89 +IMPORT_C TInt FreePls(TAny* aPls);
1.90 +
1.91 +/**
1.92 +Gets a handle to the mutex, waits until it obtains ownership of it
1.93 +and then returns the handle.
1.94 +Returns a handle to the mutex, of which the caller now has ownership.
1.95 +Note that the handle is returned as a TAny* (the Windows HANDLE type
1.96 +is typedefed to void*)
1.97 +*/
1.98 +IMPORT_C TAny* ObtainPlsMutex();
1.99 +
1.100 +/**
1.101 +Releases ownership of the mutex, which allows another thread
1.102 +to acquire ownership of it.
1.103 +Takes as a parameter a handle to the mutex
1.104 +*/
1.105 +IMPORT_C void ReleasePlsMutex(TAny* aMutexHandle);
1.106 +
1.107 +#endif // __WINSCW__
1.108 +
1.109 +#endif // __EWSD_H__
1.110 +