src/hbservers/hbthemeserveroogmplugin/hbthemeclientoogm.cpp
changeset 2 06ff229162e9
parent 1 f7ac710697a9
child 23 e6ad4ef83b23
equal deleted inserted replaced
1:f7ac710697a9 2:06ff229162e9
    74 /*!
    74 /*!
    75 * Sends FreeRam request to HbThemeserver with the bytes to be freed.
    75 * Sends FreeRam request to HbThemeserver with the bytes to be freed.
    76 * see goomconfig.xml as what is the threshold that triggers a call to this API.
    76 * see goomconfig.xml as what is the threshold that triggers a call to this API.
    77 */
    77 */
    78 
    78 
    79 void HbThemeClientOogm::FreeRam(int bytes)
    79 void HbThemeClientOogm::FreeRam(TInt bytes)
    80 {
    80 {
    81     if (!connected) {
    81     if (!connected) {
    82         ConnectToServer();
    82         ConnectToServer();
    83     }
    83     }
    84         
    84         
   110             RDebug::Print(_L("ThemeServerPlugin: Good Memory notification sent to ThemeServer"));
   110             RDebug::Print(_L("ThemeServerPlugin: Good Memory notification sent to ThemeServer"));
   111         }
   111         }
   112     }
   112     }
   113 }
   113 }
   114 
   114 
       
   115 /*!
       
   116 * Sends FreeRam request to HbThemeserver.
       
   117 * see goomconfig.xml as what is the threshold that triggers a call to this API.
       
   118 */
       
   119 
       
   120 void HbThemeClientOogm::FreeRam(TInt bytes, TBool aUseSwRendering)
       
   121 {
       
   122     if (!connected) {
       
   123         ConnectToServer();
       
   124     }
       
   125         
       
   126     if (connected) {
       
   127         HbFreeRamNotificationData  freeRamData;
       
   128         freeRamData.bytesToFree = bytes;
       
   129         freeRamData.useSwRendering = aUseSwRendering;
       
   130         
       
   131         TPckg<HbFreeRamNotificationData> data(freeRamData);
       
   132         TIpcArgs args(&data, 0);
       
   133 
       
   134         TInt err = SendReceive(EFreeRam, args);
       
   135         if (KErrNone != err) {
       
   136             RDebug::Print(_L("ThemeServerPlugin: Free RAM notification sent to ThemeServer"));
       
   137         }
       
   138     }
       
   139 }
       
   140 
       
   141 /*!
       
   142 * Sends MemoryGood request to HbThemeserver.
       
   143 * see goomconfig.xml as what is the threshold that triggers a call to this API.
       
   144 */
       
   145 
       
   146 void  HbThemeClientOogm::GoodMemory(TBool isUsingSwRendering)
       
   147 {
       
   148     if (!connected) {
       
   149         ConnectToServer();
       
   150     }
       
   151 
       
   152     if (connected) {
       
   153     		TPckg<TBool> usingSwRendering(isUsingSwRendering);
       
   154     		TIpcArgs args(&usingSwRendering, 0);
       
   155         TInt err = SendReceive(EMemoryGood, args);
       
   156         if (KErrNone != err) {
       
   157             RDebug::Print(_L("ThemeServerPlugin: Good Memory notification sent to ThemeServer"));
       
   158         }
       
   159     }
       
   160 }