Symbian-Developers

The Official Developers Section => Symbian Software Development Discussions => The Developers Section => Symbian Java/C++ Application Development => Topic started by: huellif on November 03, 2013, 10:20:14 pm

Title: Reboot/Shutdown the device (nice for copy protection)
Post by: huellif on November 03, 2013, 10:20:14 pm
Symbian provides an easy class to shutdown or reboot the device, you can implement this e.g. into a copy protection :P

1. link against StarterClient.lib in your .mmp and add PowerMgmt cap:
Code: [Select]
LIBRARY StarterClient.lib
CAPABILITY PowerMgmt

for Qt users add
Code: [Select]
LIBS += -lStarterClient
TARGET.CAPABILITY += PowerMgmt
into your .pro

2. in your class include the related header:
Code: [Select]
#include <starterclient.h>
3.
a) the method to reboot:
   
Code: [Select]
    RStarterSession starter;
    User::LeaveIfError(starter.Connect());
    starter.Reset(starter.ELanguageSwitchReset);
    starter.Close();

b) the method to shutdown:
Code: [Select]
    RStarterSession starter;
    User::LeaveIfError(starter.Connect());
    starter.Shutdown();
    starter.Close();

really simple.
It looks wrong because there's no CleanupStack but for me it doesn't work with CleanupStack.

Thanks CODeRUS for hinting me the class name :)
Source: http://www.symlab.org/main/documentation/reference/s3/pdk/GUID-A8449386-F424-3357-940C-149250890AD8.html
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: symster on November 04, 2013, 09:24:52 pm
What you mean by "copy protection"?
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: huellif on November 04, 2013, 10:03:33 pm
protecting from warez
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: symster on November 05, 2013, 09:56:43 am
How can  i use it for protection?.I don't get it.This just shutdown or reboot so how can it protect from warez.
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: huellif on November 05, 2013, 09:18:53 pm
you can include a reboot in your copy protection system to annoy crackers/retailers
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: symster on November 05, 2013, 09:51:16 pm
??????Don't get you.It doesn't check if the copy is legal or pirated and even if I use it,it will also affect legal copy.Symbian currently don't have any method to check if the copy is legal or not.
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: Allstar12345 on November 05, 2013, 11:40:16 pm
It has plenty of methods to check.
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: huellif on November 07, 2013, 12:54:15 am
??????Don't get you.It doesn't check if the copy is legal or pirated and even if I use it,it will also affect legal copy.Symbian currently don't have any method to check if the copy is legal or not.

did I write you can use this as an copy protection ???
You can inlude this code into your own protection to annoy retailers/crackers, nothing else.
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: Allstar12345 on November 07, 2013, 12:57:27 am
I'll probably use this if anyone can tell me the header and lib for CAppUi.

Any ideas which it could be Fabian?
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: symster on November 08, 2013, 06:39:00 pm
CAppUi for what?Why you don't write it yourself.
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: Allstar12345 on November 08, 2013, 07:27:47 pm
CAppUi for what?Why you don't write it yourself.


It's a Symbian c++ class
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: symster on November 08, 2013, 10:22:46 pm
CAknAppUi i see before.Are you sure you are not confused CAknAppUi with CAppUi.Never see such header file before.Like I say you could write your own if know symbia c++ well.
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: Allstar12345 on November 08, 2013, 10:32:28 pm
Nope, I'm sure, but I don't know c++ very well
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: huellif on November 09, 2013, 01:12:24 pm
read here: http://www.symlab.org/main/documentation/reference/s3/pdk/GUID-77329067-34D9-3698-B764-294535E660EB.html

I would include:
avkon.h
avkon.hrh
aknappui.h
eikenv.h
eikappui.h
aknenv.h

and link against lavkon leikcore lcone
Title: Re: Reboot/Shutdown the device (nice for copy protection)
Post by: symster on November 09, 2013, 06:31:58 pm
Nope, I'm sure, but I don't know c++ very well

Why you want the header files.What function does the header provide that you need it specifically