Sorry, no detailed answer.
In short: any approach you choose you will definitely need to get notifications from the Windowing Server ("redraw", "keypress occured", etc.). You also want to observe incoming calls. Every callback-like functionality originating from some server (like Windowing or Telephony Servers) requires you to have an active scheduler. And when you Start() CActiveScheduler, it will actually start to wait. In practice a CActiveScheduler::Start() is the main loop of every "interactive" (GUI or server) Symbian application. Start() is inherently invoked in case of GUI apps just after instantiating the AppUi class, and you can also call it from your executable:
Code:
GLDEF_C TInt E32Main()
{
CTrapCleanup* cleanup=CTrapCleanup::New();
TRAPD(error,MainL());
delete cleanup;
return 0;
}
LOCAL_C void MainL(void)
{
CActiveScheduler *scheduler=new(ELeave)CActiveScheduler;
CleanupStack::PushL(scheduler);
CActiveScheduler::Install(scheduler);
<You can create your active objects here and make them to wait for something>
CActiveSheduler::Start();
CActiveScheduler::Install(NULL);
CleanupStack::PopAndDestroy(); // scheduler
}
CActiveScheduler::Start() will not return until you invoke CActiveScheduler::Stop() somewhere. Thus it is important to wait for something before invoking Start().