Commit 82603dd7 authored by anotherguest's avatar anotherguest

Integration/Platform file for Symbian SDL version

parent 5fdc5aef
#include <eikenv.h>
#include <eikapp.h>
#include <eikappui.h>
#include <stdio.h>
#include <eikapp.h>
#include <e32base.h>
#include <sdlapp.h>
#include <BAUTILS.H>
char KOpenJazzPath[256];
class COpenJazzApp: public CSDLApp {
public:
COpenJazzApp();
~COpenJazzApp();
#ifdef UIQ3
/**
* Returns the resource id to be used to declare the views supported by this UIQ3 app
* @return TInt, resource id
*/
TInt ViewResourceId();
#endif
/**
* This has a default empty implementation.
* Is called just before SDL_Main is called to allow init of system vars
*/
virtual void PreInitializeAppL();
TUid AppDllUid() const;
};
CApaApplication* NewApplication() {
// Return pointer to newly created CQMApp
return new COpenJazzApp;
}
#include <eikstart.h>
// E32Main() contains the program's start up code, the entry point for an EXE.
GLDEF_C TInt E32Main() {
return EikStart::RunApplication(NewApplication);
}
COpenJazzApp::COpenJazzApp() {
}
COpenJazzApp::~COpenJazzApp() {
}
#ifdef UIQ3
#include <OpenJazz.rsg>
/**
* Returns the resource id to be used to declare the views supported by this UIQ3 app
* @return TInt, resource id
*/
TInt COpenJazzApp::ViewResourceId() {
return R_SDL_VIEW_UI_CONFIGURATIONS;
}
#endif
FILE* mystdout = NULL;
FILE *mystderr = NULL;
/**
* This has a default empty implementation.
* Is called just before SDL_Main is called to allow init of system vars
*/
void COpenJazzApp::PreInitializeAppL()
{
TFileName filename;
TPtr8 ptr((unsigned char*) KOpenJazzPath, 0, 255);
#ifdef UIQ3
mystdout = fopen("c:\\shared\\openjazz\\stdout.txt","w+");
mystderr = fopen("c:\\shared\\openjazz\\stderr.txt","w+");
#else
mystdout = fopen("c:\\data\\openjazz\\stdout.txt","w+");
mystderr = fopen("c:\\data\\openjazz\\stderr.txt","w+");
#endif
*stderr = *mystdout;
*stdout = *mystderr;
filename = _L("C:\\openjazz\\");
for(TInt i = 'D';i<'Z';i++)
{
filename[0] = i;
if(BaflUtils::PathExists(CEikonEnv::Static()->FsSession(), filename))
{
ptr.Copy(filename);
ptr.ZeroTerminate();
return;
}
}
#ifdef UIQ3
ptr.Copy(_L8("c:\\shared\\openjazz\\"));
#else
ptr.Copy(_L8("c:\\data\\openjazz\\"));
#endif
ptr.ZeroTerminate();
}
/**
* Responsible for returning the unique UID of this application
* @return unique UID for this application in a TUid
**/
TUid COpenJazzApp::AppDllUid() const {
return TUid::Uid(0xA000A005);
}
/////////////////////////////////////////////////////////////////////////////////////////////////
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment