×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Two E32Main methods - one for app and one for background server!

    Hi,

    I am trying to implement a background server which keeps listening for incoming calls and once there is one incoming call, it should launch the application. Also the server has to be autorun on phone reboot and running all the time.

    Now for this, i have the following code snippet

    Code:
    GLDEF_C TInt E32Main() 
        {
    	__UHEAP_MARK;
    	CTrapCleanup* cleanup = CTrapCleanup::New(); 
    	TRAPD(error,StartL()); 
    	delete cleanup; 
    	__UHEAP_MARKEND;
    	return 0;
        }
    The ui application also has the same prototype of the E32Main method, GLDEF_C TInt E32Main()

    And i have a .rss file by the name of UID3 of the app like EFC3B7DB0.rss and has following code in it

    Code:
    RESOURCE STARTUP_ITEM_INFO test
    	{
    	executable_name = "c:\\sys\\bin\\Aserver.exe";
    	recovery = EStartupItemExPolicyNone;
    	}
    Issue:

    Since there are two E32Mains now, i am getting multiple definition of E32Main error. How do i get rid of this?

    Can anybody suggest something?

    Thanks
    Raj

  2. #2
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,091

    Re: Two E32Main methods - one for app and one for background server!

    While compiling which project you get this error, server app or UI app?

  3. #3
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: Two E32Main methods - one for app and one for background server!

    I have both of them in the same project. server app is in engine directory of the app and ui is in ui. Do i have to do that in separate apps? Do they need to have different UIDs? Is that compulsory?

  4. #4
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: Two E32Main methods - one for app and one for background server!

    Yes they have to have different UID3s. The server exe has to run all the time in background and auto start on reboot. Do we need a protected range UID for this? Is that a must for app to work on those capabilities??

  5. #5
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,091

    Re: Two E32Main methods - one for app and one for background server!

    Yes no matter how many exe's are there in the application, each one has to have a protected range of UID if they are intended for commercial selling purpose, other you won't be able to sign the app.

    You can separate the two exe's(server & UI) & set the server app to auto-start mode.

  6. #6
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: Two E32Main methods - one for app and one for background server!

    Can't we test the auto start and background running behavior with unprotected range UID because the app is still under development?

  7. #7
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,091

    Re: Two E32Main methods - one for app and one for background server!

    Quote Originally Posted by raj8nokiaforum View Post
    Can't we test the auto start and background running behavior with unprotected range UID because the app is still under development?
    Ahh my mistake, i misunderstood the question. yes you can test the auto-start feature with unprotected range UID's as well but the app should not be self signed(should be signed with dev-cert/key)

  8. #8
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: Two E32Main methods - one for app and one for background server!

    k thanks. i will try and get back in here.

  9. #9
    Registered User
    Join Date
    Sep 2008
    Location
    Vancouver, Canada
    Posts
    588

    Re: Two E32Main methods - one for app and one for background server!

    k the background exe works now.

    now i want this exe to listen to voip incoming calls. does the CTelephony class listens to such events?

    if not, any other suggestion to achieve this?

  10. #10
    Nokia Developer Champion
    Join Date
    Jun 2008
    Location
    Noida,India
    Posts
    4,091

    Re: Two E32Main methods - one for app and one for background server!

    I don't think CTelephony does that(it can only listen for normal voice calls).You must be having some method in the voip implementation which does that(?).

Similar Threads

  1. Undefined symbol: 'int E32Main(void) (?E32Main@@YAHXZ)'
    By neomaniac2 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2011-07-05, 12:42
  2. Background server application
    By max.mozok in forum Open C/C++
    Replies: 4
    Last Post: 2010-03-06, 16:14
  3. QA testing methods - questions about sideloading/installation methods, environments,
    By rilano in forum [Closed] Publishing to Nokia Store
    Replies: 9
    Last Post: 2009-06-09, 09:47
  4. Background Server with Key Events
    By stavrospapa in forum Symbian
    Replies: 4
    Last Post: 2008-09-01, 20:09
  5. Creating a background server without GUI
    By rambler82 in forum Symbian
    Replies: 9
    Last Post: 2007-05-03, 14:58

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×