Symbian-Developers

The Official Developers Section => Symbian Software Development Discussions => The Developers Section => Symbian Java/C++ Application Development => Topic started by: Allstar12345 on November 30, 2013, 01:31:38 am

Title: Changing Symbian Process priority
Post by: Allstar12345 on November 30, 2013, 01:31:38 am
Here is how to change the process priority of your Symbian Application.

Libs required (for Qt usage):
Code: [Select]
-lavkon -leikcore- lcone
Includes:
Code: [Select]
#include <eikenv.h>
#include <eikappui.h>
#include <aknenv.h>
#include <aknappui.h>

Now the rest:
Code: [Select]
CEikonEnv::Static()->WsSession().ComputeMode(RWsSession::EPriorityControlDisabled);
    RProcess pMyApp;
    pMyApp.SetPriority(EPriorityHigh);

Obviously if you change the RProcess name from pMyApp remember to change it on the next line.

Title: Re: Changing Symbian Process priority
Post by: huellif on November 30, 2013, 10:51:57 am
looks intresting :)
Will try it later, but I think not need all the headers and libaries are needed.
Title: Re: Changing Symbian Process priority
Post by: Allstar12345 on November 30, 2013, 01:28:29 pm
Probably won't need appui headers, they are for CaKnppUi.
Title: Re: Changing Symbian Process priority
Post by: huellif on November 30, 2013, 08:21:25 pm
exactly :P
and if you include a Avkon class (like aknappui.h) you don't have to include the related cone or uikon classes, because avkon itself already includes uikon and cone classes.
Title: Re: Changing Symbian Process priority
Post by: Allstar12345 on November 30, 2013, 08:42:05 pm
I know, I was using those headers on something seperate  :P
Title: Re: Changing Symbian Process priority
Post by: Allstar12345 on November 30, 2013, 08:42:27 pm
I know, I was using those headers on something seperate  :P
Title: Re: Changing Symbian Process priority
Post by: yeatse on December 31, 2013, 06:43:01 am
A easier way is to add this line in .pro file:

symbian:MMP_RULES += "EPOCPROCESSPRIORITY windowserver"

then you needn't add any code in .pro\.cpp

"windowserver" can be changed to background, foreground, high, windowserver, fileserver, realtimeserver or supervisor.
Title: Re: Changing Symbian Process priority
Post by: symster on January 06, 2014, 09:25:22 pm
A easier way is to add this line in .pro file:

symbian:MMP_RULES += "EPOCPROCESSPRIORITY windowserver"

then you needn't add any code in .pro\.cpp

"windowserver" can be changed to background, foreground, high, windowserver, fileserver, realtimeserver or supervisor.
Is there any documentation about this so i can understand it more?
Title: Re: Changing Symbian Process priority
Post by: Allstar12345 on January 06, 2014, 10:10:23 pm
A easier way is to add this line in .pro file:

symbian:MMP_RULES += "EPOCPROCESSPRIORITY windowserver"

then you needn't add any code in .pro\.cpp

"windowserver" can be changed to background, foreground, high, windowserver, fileserver, realtimeserver or supervisor.

Ah, good one.
Title: Re: Changing Symbian Process priority
Post by: huellif on January 07, 2014, 01:18:21 am
Is there any documentation about this so i can understand it more?

Google -> http://docs.huihoo.com/symbian/s60-5th-edition-cpp-developers-library-v2.1/GUID-35228542-8C95-4849-A73F-2B4F082F0C44/sdk/doc_source/ToolsAndUtilities94/Build-ref/Mmp-ref/epocprocesspriority.html

and its mentioned in most Symbian C++ books
Title: Re: Changing Symbian Process priority
Post by: symster on January 07, 2014, 03:40:47 pm
Google -> http://docs.huihoo.com/symbian/s60-5th-edition-cpp-developers-library-v2.1/GUID-35228542-8C95-4849-A73F-2B4F082F0C44/sdk/doc_source/ToolsAndUtilities94/Build-ref/Mmp-ref/epocprocesspriority.html

and its mentioned in most Symbian C++ books

Thanks for the link.