uiacceltk/hitchcock/goommonitor/inc/goommemorymonitor.h
branchRCL_3
changeset 5 433cbbb6a04b
parent 3 d8a3531bc6b8
child 15 cd0ae4656946
equal deleted inserted replaced
3:d8a3531bc6b8 5:433cbbb6a04b
    49     static CMemoryMonitor* NewL();
    49     static CMemoryMonitor* NewL();
    50     ~CMemoryMonitor();
    50     ~CMemoryMonitor();
    51     
    51     
    52     enum TGOomTrigger   //How free memory operation was triggered
    52     enum TGOomTrigger   //How free memory operation was triggered
    53             {
    53             {
    54             EGOomFocusChanged = 0,
    54             EGOomTriggerNone = 0,
    55             EGOomRequestMemory,
    55             EGOomTriggerFocusChanged,
    56             EGOomThresholdCrossed
    56             EGOomTriggerRequestMemory,
       
    57             EGOomTriggerThresholdCrossed
    57             };
    58             };
    58 
    59 
    59 public: // event handlers
    60 public: // event handlers
    60     void FreeMemThresholdCrossedL(TInt aAction = 0, TInt aThreshold = 0);
    61     void FreeMemThresholdCrossedL(TInt aAction = 0, TInt aThreshold = 0);
    61     void AppNotExiting(TInt aWgId);
    62     void AppNotExiting(TInt aWgId);
    62     void StartFreeSomeRamL(TInt aTargetFree, TGOomTrigger aTrigger);
    63     void StartFreeSomeRamL(TInt aTargetFree, TGOomTrigger aTrigger);
    63     void FreeOptionalRamL(TInt aTargetFree, TInt aPluginId, TBool aUseAbsolute = EFalse); // The ID of the plugin that will clear up the allocation, used to determine the priority of the allocation
    64     void FreeOptionalRamL(TInt aTargetFree, TInt aPluginId, TBool aUseAbsolute = ETrue); // The ID of the plugin that will clear up the allocation, used to determine the priority of the allocation
    64     void RequestFreeMemoryL(TInt aTargetFree, TBool aUseAbsolute = EFalse);
    65     void RequestFreeMemoryL(TInt aTargetFree, TBool aUseAbsolute = ETrue);
    65     void HandleFocusedWgChangeL(TInt aForegroundAppUid = KErrNotFound);
    66     void HandleFocusedWgChangeL(TInt aForegroundAppUid = KErrNotFound);
    66     static const CGOomGlobalConfig& GlobalConfig();
    67     static const CGOomGlobalConfig& GlobalConfig();
    67     void SetPriorityBusy(TInt aWgId);
    68     void SetPriorityBusy(TInt aWgId);
    68     void SetPriorityNormal(TInt aWgId);
    69     void SetPriorityNormal(TInt aWgId);
    69     void SetPriorityHigh(TInt aWgId);
    70     void SetPriorityHigh(TInt aWgId);
    70     void ResetTargets(TInt aTarget = 0);
       
    71     TInt GetFreeMemory();
    71     TInt GetFreeMemory();
    72     void RunCloseAppActions(TInt aMaxPriority);
    72     void RunCloseAppActions(TInt aMaxPriority);
    73     CGOomWindowGroupList * GetWindowGroupList() const;
    73     CGOomWindowGroupList * GetWindowGroupList() const;
    74     TBool IsSafeToProcessNewRequest(TUint aClientId);
    74     TBool IsSafeToProcessNewRequest(TUint aClientId);
    75         
    75         
   139     TBool FreeGraphicsMemoryAboveThresholdL(TInt& aCurrentFreeMemory);
   139     TBool FreeGraphicsMemoryAboveThresholdL(TInt& aCurrentFreeMemory);
   140     void CloseNextApp();
   140     void CloseNextApp();
   141     void RefreshThresholds(TInt aForegroundAppUid = KErrNotFound);
   141     void RefreshThresholds(TInt aForegroundAppUid = KErrNotFound);
   142     void StartFreeSomeRamL(TInt aTargetFree, TInt aMaxPriority, TGOomTrigger aTrigger);
   142     void StartFreeSomeRamL(TInt aTargetFree, TInt aMaxPriority, TGOomTrigger aTrigger);
   143     void AppClosePriorityChanged(TInt aWgId, TInt aPriority);
   143     void AppClosePriorityChanged(TInt aWgId, TInt aPriority);
   144     
   144     void ResetTargets(TInt aTarget = 0);
   145     
   145     
   146 public:
   146 public:
   147     // All members are owned
   147     // All members are owned
   148     // generally useful sessions
   148     // generally useful sessions
   149     RFs iFs;
   149     RFs iFs;