Update contrib.
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 : libdl library
17 * Header file for loadeddlls.cpp
25 #ifndef _LOADEDDLLS_H_
26 #define _LOADEDDLLS_H_
29 #include <e32base.h>//class CBase
30 #include <f32image.h>//E32EmulExpSymInfoHdr, E32EpocExpSymInfoHdr
33 #if defined(__WINSCW__) || defined(__WINS__)
34 typedef E32EmulExpSymInfoHdr TE32ExpSymInfoHdr;
36 typedef E32EpocExpSymInfoHdr TE32ExpSymInfoHdr;
39 //-----------------------------------------------------------------------
40 //Class name: TDllEntry
41 //Description: It represents the item of CLoadedDlls, contains the data item
42 // like library object, reference count etc
43 //-----------------------------------------------------------------------
47 static TBool CompareByHandle(const TDllEntry& aEntry1, const TDllEntry& aEntry2);
48 static TBool CompareByPath(const TDllEntry& aEntry1, const TDllEntry& aEntry2);
50 TDllEntry(const TInt aHandle) { iLibrary.SetHandle(aHandle); }
51 TDllEntry(const RLibrary& aLibrary, const TInt aFlag = 0);
54 TE32ExpSymInfoHdr* iSymbolHeader;
59 //-----------------------------------------------------------------------
60 //Class name: CLoadedDlls
61 //Description: It represents the list of the opened dlls. It is the main
62 // class to manipulate the data on the opened dlls.
63 //-----------------------------------------------------------------------
64 NONSHARABLE_CLASS(CLoadedDlls) : public CBase
69 TInt Find(const void* aHandle) const;
70 TInt Find(const RLibrary& aLibrary) const;
71 TInt Add(const TDllEntry& aDllItem);
72 void Remove(const TInt aIndex);
73 TDllEntry& At(const TInt aIndex);
74 inline TInt CreateLock(){ return iLock.CreateLocal(); }
75 inline void Lock() { iLock.Wait(); }
76 inline void UnLock() { iLock.Signal(); }
77 inline TInt Count() const { return iHandleList.Count();}
80 RArray<TDllEntry> iHandleList;
83 #endif //_LOADEDDLLS_H_