sl@0: /* sl@0: * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: Declaration of CMmapControllerNode sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #ifndef MMAP_CONTROLLER_NODE_H sl@0: #define MMAP_CONTROLLER_NODE_H sl@0: sl@0: // INCLUDES sl@0: #include sl@0: #include sl@0: #include "mmapmemorynode.h" sl@0: #include "base.h" sl@0: sl@0: // CONSTANTS sl@0: sl@0: // MACROS sl@0: sl@0: // FORWARD DECLARATIONS sl@0: class CMmapMemoryNode; sl@0: sl@0: // DATA TYPES sl@0: sl@0: // FUNCTION PROTOTYPES sl@0: sl@0: // CLASS DECLARATION sl@0: sl@0: /* sl@0: * This class is responsible to managing the memory mapped nodes. sl@0: * This will maintain the mapped memory in a list format. sl@0: * @since MRT 2.0 sl@0: */ sl@0: NONSHARABLE_CLASS ( CMmapControllerNode ): public BBase sl@0: { sl@0: public: sl@0: /* sl@0: * 1st phase constructor. sl@0: */ sl@0: static CMmapControllerNode * NewL(); sl@0: sl@0: /* sl@0: * Default destructor. sl@0: */ sl@0: ~CMmapControllerNode(); sl@0: sl@0: /* sl@0: * To create a mapped memory and add in mmap node list sl@0: */ sl@0: sl@0: static TAny* AddMmapNodeL(struct _reent *r, size_t len, int flag, \ sl@0: int shmflg, int fildes, off_t offset, size_t maplen); sl@0: sl@0: /* sl@0: * To unmap a mapped memory and delete from mmap node list sl@0: */ sl@0: sl@0: int DeleteMmapNode(TAny* aAddr, int& anerror); sl@0: sl@0: /* sl@0: * To sync a mapped memory into the file below sl@0: */ sl@0: sl@0: int SyncMmapNode(TAny* aAddr, size_t len, int flags, int& anerror); sl@0: sl@0: /* sl@0: * To modify protection mode of a mapped memory. sl@0: */ sl@0: sl@0: int ChprotMmapNode(const TAny* addr, size_t len, int prot, int& anerrno); sl@0: sl@0: /* sl@0: * To delete a mapped memory from node list. sl@0: */ sl@0: sl@0: static void RemoveControllerL(void *p); sl@0: sl@0: private: sl@0: /* sl@0: * Default constructor. sl@0: */ sl@0: CMmapControllerNode(); sl@0: sl@0: /* sl@0: * 2nd phase constructor. sl@0: */ sl@0: void ConstructL(); sl@0: sl@0: private: // data sl@0: TSglQue iMmapQueue; sl@0: TSglQueIter iMmapQueueIter; sl@0: }; sl@0: sl@0: #endif // MMAP_CONTROLLER_NODE_H sl@0: sl@0: // End of File