From c0636584277d0a2c7be6f21faef79c9e1ca77bc3 Mon Sep 17 00:00:00 2001 From: Nanang Izzuddin Date: Fri, 19 Apr 2013 06:50:07 +0000 Subject: Re #1655: Initial implementation of pjsua CLI app for Symbian. git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@4477 74dad513-b988-da41-8d7b-12977e46ad98 --- pjsip-apps/src/pjsua/symbian/application.uidesign | 139 ++++++++ pjsip-apps/src/pjsua/symbian/data/pjsua.l01 | 14 + pjsip-apps/src/pjsua/symbian/data/pjsua.loc | 11 + pjsip-apps/src/pjsua/symbian/data/pjsua.rss | 46 +++ .../src/pjsua/symbian/data/pjsuaContainer.l01 | 14 + .../src/pjsua/symbian/data/pjsuaContainer.loc | 11 + .../src/pjsua/symbian/data/pjsuaContainer.rssi | 28 ++ pjsip-apps/src/pjsua/symbian/data/pjsua_reg.loc | 11 + pjsip-apps/src/pjsua/symbian/data/pjsua_reg.rss | 21 ++ pjsip-apps/src/pjsua/symbian/gfx/list_icon.bmp | Bin 0 -> 2356 bytes .../src/pjsua/symbian/gfx/list_icon_mask.bmp | Bin 0 -> 294 bytes pjsip-apps/src/pjsua/symbian/gfx/mark_icon.bmp | Bin 0 -> 2134 bytes .../src/pjsua/symbian/gfx/mark_icon_mask.bmp | Bin 0 -> 166 bytes pjsip-apps/src/pjsua/symbian/gfx/pjsua.bmp | Bin 0 -> 44012 bytes .../src/pjsua/symbian/gfx/qgn_menu_pjsua.svg | 56 +++ pjsip-apps/src/pjsua/symbian/group/ABLD.BAT | 15 + pjsip-apps/src/pjsua/symbian/group/bld.inf | 26 ++ pjsip-apps/src/pjsua/symbian/group/pjsua.mmp | 105 ++++++ pjsip-apps/src/pjsua/symbian/group/pjsua_icons.mk | 75 ++++ .../src/pjsua/symbian/inc/PjsuaContainerView.h | 94 +++++ pjsip-apps/src/pjsua/symbian/inc/pjsua.hrh | 12 + pjsip-apps/src/pjsua/symbian/inc/pjsua.pan | 18 + pjsip-apps/src/pjsua/symbian/inc/pjsuaAppUi.h | 70 ++++ .../src/pjsua/symbian/inc/pjsuaApplication.h | 35 ++ pjsip-apps/src/pjsua/symbian/inc/pjsuaContainer.h | 112 ++++++ pjsip-apps/src/pjsua/symbian/inc/pjsuaDocument.h | 36 ++ .../src/pjsua/symbian/pjsuaContainer.uidesign | 157 +++++++++ .../src/pjsua/symbian/sis/backup_registration.xml | 5 + pjsip-apps/src/pjsua/symbian/sis/pjsua.pkg | 36 ++ .../src/pjsua/symbian/src/PjsuaContainerView.cpp | 261 ++++++++++++++ pjsip-apps/src/pjsua/symbian/src/pjsuaAppUi.cpp | 380 +++++++++++++++++++++ .../src/pjsua/symbian/src/pjsuaApplication.cpp | 78 +++++ .../src/pjsua/symbian/src/pjsuaContainer.cpp | 312 +++++++++++++++++ pjsip-apps/src/pjsua/symbian/src/pjsuaDocument.cpp | 57 ++++ 34 files changed, 2235 insertions(+) create mode 100644 pjsip-apps/src/pjsua/symbian/application.uidesign create mode 100644 pjsip-apps/src/pjsua/symbian/data/pjsua.l01 create mode 100644 pjsip-apps/src/pjsua/symbian/data/pjsua.loc create mode 100644 pjsip-apps/src/pjsua/symbian/data/pjsua.rss create mode 100644 pjsip-apps/src/pjsua/symbian/data/pjsuaContainer.l01 create mode 100644 pjsip-apps/src/pjsua/symbian/data/pjsuaContainer.loc create mode 100644 pjsip-apps/src/pjsua/symbian/data/pjsuaContainer.rssi create mode 100644 pjsip-apps/src/pjsua/symbian/data/pjsua_reg.loc create mode 100644 pjsip-apps/src/pjsua/symbian/data/pjsua_reg.rss create mode 100644 pjsip-apps/src/pjsua/symbian/gfx/list_icon.bmp create mode 100644 pjsip-apps/src/pjsua/symbian/gfx/list_icon_mask.bmp create mode 100644 pjsip-apps/src/pjsua/symbian/gfx/mark_icon.bmp create mode 100644 pjsip-apps/src/pjsua/symbian/gfx/mark_icon_mask.bmp create mode 100644 pjsip-apps/src/pjsua/symbian/gfx/pjsua.bmp create mode 100644 pjsip-apps/src/pjsua/symbian/gfx/qgn_menu_pjsua.svg create mode 100644 pjsip-apps/src/pjsua/symbian/group/ABLD.BAT create mode 100644 pjsip-apps/src/pjsua/symbian/group/bld.inf create mode 100644 pjsip-apps/src/pjsua/symbian/group/pjsua.mmp create mode 100644 pjsip-apps/src/pjsua/symbian/group/pjsua_icons.mk create mode 100644 pjsip-apps/src/pjsua/symbian/inc/PjsuaContainerView.h create mode 100644 pjsip-apps/src/pjsua/symbian/inc/pjsua.hrh create mode 100644 pjsip-apps/src/pjsua/symbian/inc/pjsua.pan create mode 100644 pjsip-apps/src/pjsua/symbian/inc/pjsuaAppUi.h create mode 100644 pjsip-apps/src/pjsua/symbian/inc/pjsuaApplication.h create mode 100644 pjsip-apps/src/pjsua/symbian/inc/pjsuaContainer.h create mode 100644 pjsip-apps/src/pjsua/symbian/inc/pjsuaDocument.h create mode 100644 pjsip-apps/src/pjsua/symbian/pjsuaContainer.uidesign create mode 100644 pjsip-apps/src/pjsua/symbian/sis/backup_registration.xml create mode 100644 pjsip-apps/src/pjsua/symbian/sis/pjsua.pkg create mode 100644 pjsip-apps/src/pjsua/symbian/src/PjsuaContainerView.cpp create mode 100644 pjsip-apps/src/pjsua/symbian/src/pjsuaAppUi.cpp create mode 100644 pjsip-apps/src/pjsua/symbian/src/pjsuaApplication.cpp create mode 100644 pjsip-apps/src/pjsua/symbian/src/pjsuaContainer.cpp create mode 100644 pjsip-apps/src/pjsua/symbian/src/pjsuaDocument.cpp (limited to 'pjsip-apps/src') diff --git a/pjsip-apps/src/pjsua/symbian/application.uidesign b/pjsip-apps/src/pjsua/symbian/application.uidesign new file mode 100644 index 00000000..f2bf30e8 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/application.uidesign @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + data + 3.2.0 + com.nokia.series60 + com.nokia.sdt.component.symbian.Symbian-Provider + inc + pjsuaAppUi + src + pjsua + com.nokia.sdt.sourcegen.Symbian-Provider + group + + CpjsuaApplication + pjsua + pjsuaApplication + 0xE44C2D02 + + CpjsuaDocument + pjsuaDocument + + aknViewReference1 + CpjsuaAppUi + + 51 + 44 + + pjsuaAppUi + + 240 + 320 + + + + 20 + + statusPane + + 204 + 63 + + + STR_pjsuaApplication_5 + + 56 + + STR_pjsuaApplication_4 + caption + + 148 + 43 + + + + + + 288 + + + STR_pjsuaApplication_1 + STR_pjsuaApplication_2 + STR_pjsuaApplication_3 + + EAknSoftkeyBack + R_AVKON_SOFTKEYS_EXIT + + controlPane + + 240 + 32 + + + + pjsuaContainer.uidesign + + pjsuaContainer + aknViewReference1 + + + + + + + + + + pjsua + pjsua + + + + + + r_application_pjsua_app_ui + r_application_status_pane + r_localisable_app_info + r_application_akn_view_reference1 + + + EPjsuaContainerViewId + + + + + src/pjsuaapplication.cpp + src/pjsuacontainerview.cpp + src/pjsuadocument.cpp + inc/pjsuadocument.h + inc/pjsuacontainerview.h + inc/pjsuaappui.h + inc/pjsuaapplication.h + src/pjsuaappui.cpp + data/pjsua.rss + data/pjsuacontainer.rssi + inc/pjsua.hrh + data/pjsua.loc + data/pjsua.l01 + data/pjsuacontainer.loc + data/pjsuacontainer.l01 + + diff --git a/pjsip-apps/src/pjsua/symbian/data/pjsua.l01 b/pjsip-apps/src/pjsua/symbian/data/pjsua.l01 new file mode 100644 index 00000000..a3855bcb --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/data/pjsua.l01 @@ -0,0 +1,14 @@ +/* +======================================================================== + Name : pjsua.l01 + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +// localized strings for language: UK English (01) +#define STR_pjsuaApplication_4 "pjsua" +#define STR_pjsuaApplication_5 "pjsua" +#define STR_pjsuaApplication_1 "" +#define STR_pjsuaApplication_2 "" +#define STR_pjsuaApplication_3 "" diff --git a/pjsip-apps/src/pjsua/symbian/data/pjsua.loc b/pjsip-apps/src/pjsua/symbian/data/pjsua.loc new file mode 100644 index 00000000..c48d6c1a --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/data/pjsua.loc @@ -0,0 +1,11 @@ +/* +======================================================================== + Name : pjsua.loc + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +#ifdef LANGUAGE_01 +#include "pjsua.l01" +#endif diff --git a/pjsip-apps/src/pjsua/symbian/data/pjsua.rss b/pjsip-apps/src/pjsua/symbian/data/pjsua.rss new file mode 100644 index 00000000..40031773 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/data/pjsua.rss @@ -0,0 +1,46 @@ +/* +======================================================================== + Name : pjsua.rss + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +NAME PJSU + +#include +#include +#include +#include +#include "pjsua.hrh" +#include "pjsua.loc" + +RESOURCE RSS_SIGNATURE + { + } +RESOURCE TBUF + { + buf = "pjsua"; + } +RESOURCE EIK_APP_INFO r_application_pjsua_app_ui + { + cba = R_AVKON_SOFTKEYS_EXIT; + status_pane = r_application_status_pane; + } +RESOURCE STATUS_PANE_APP_MODEL r_application_status_pane + { + } +RESOURCE LOCALISABLE_APP_INFO r_localisable_app_info + { + short_caption = STR_pjsuaApplication_5; + caption_and_icon = CAPTION_AND_ICON_INFO + { + caption = STR_pjsuaApplication_4; + number_of_icons = 0; + }; + } +RESOURCE TBUF r_application_akn_view_reference1 + { + } + +#include "pjsuaContainer.rssi" diff --git a/pjsip-apps/src/pjsua/symbian/data/pjsuaContainer.l01 b/pjsip-apps/src/pjsua/symbian/data/pjsuaContainer.l01 new file mode 100644 index 00000000..792282d1 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/data/pjsuaContainer.l01 @@ -0,0 +1,14 @@ +/* +======================================================================== + Name : pjsuaContainer.l01 + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +// localized strings for language: UK English (01) +#define STR_pjsuaContainerView_2 "" +#define STR_pjsuaContainerView_3 "" +#define STR_pjsuaContainerView_4 "pjsuaContainer" +#define STR_pjsuaContainerView_1 "" +#define STR_pjsuaContainerView_5 "Please wait.." diff --git a/pjsip-apps/src/pjsua/symbian/data/pjsuaContainer.loc b/pjsip-apps/src/pjsua/symbian/data/pjsuaContainer.loc new file mode 100644 index 00000000..119c15b0 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/data/pjsuaContainer.loc @@ -0,0 +1,11 @@ +/* +======================================================================== + Name : pjsuaContainer.loc + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +#ifdef LANGUAGE_01 +#include "pjsuaContainer.l01" +#endif diff --git a/pjsip-apps/src/pjsua/symbian/data/pjsuaContainer.rssi b/pjsip-apps/src/pjsua/symbian/data/pjsuaContainer.rssi new file mode 100644 index 00000000..03fc1970 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/data/pjsuaContainer.rssi @@ -0,0 +1,28 @@ +#include "pjsuaContainer.loc" + +RESOURCE AVKON_VIEW r_pjsua_container_pjsua_container_view + { + cba = R_AVKON_SOFTKEYS_EXIT; + toolbar = 0; + } +RESOURCE STATUS_PANE_APP_MODEL r_pjsua_container_status_pane + { + panes = + { + SPANE_PANE + { + id = EEikStatusPaneUidTitle; + type = EAknCtTitlePane; + resource = r_pjsua_container_title_resource; + } + }; + } +RESOURCE TITLE_PANE r_pjsua_container_title_resource + { + txt = STR_pjsuaContainerView_4; + } +RESOURCE LABEL r_pjsua_container_label1 + { + txt = STR_pjsuaContainerView_5; + horiz_align = EEikLabelAlignHCenter; + } diff --git a/pjsip-apps/src/pjsua/symbian/data/pjsua_reg.loc b/pjsip-apps/src/pjsua/symbian/data/pjsua_reg.loc new file mode 100644 index 00000000..0299c096 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/data/pjsua_reg.loc @@ -0,0 +1,11 @@ +// LOCALISATION STRINGS + +// Caption string for app. +#define qtn_caption_string "pjsua" + +// Short caption string for app. +#define qtn_short_caption_string "HW" + +#define qtn_loc_resource_file_1 "\\resource\\apps\\pjsua" + +// End of File diff --git a/pjsip-apps/src/pjsua/symbian/data/pjsua_reg.rss b/pjsip-apps/src/pjsua/symbian/data/pjsua_reg.rss new file mode 100644 index 00000000..e91a00b2 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/data/pjsua_reg.rss @@ -0,0 +1,21 @@ + +#include +#include +#include +#include +#include "pjsua_reg.loc" +#include + +UID2 KUidAppRegistrationResourceFile +UID3 0xE44C2D02 + +RESOURCE APP_REGISTRATION_INFO + { + app_file="pjsua"; + localisable_resource_file = qtn_loc_resource_file_1; + localisable_resource_id = R_LOCALISABLE_APP_INFO; + + embeddability=KAppNotEmbeddable; + newfile=KAppDoesNotSupportNewFile; + } + diff --git a/pjsip-apps/src/pjsua/symbian/gfx/list_icon.bmp b/pjsip-apps/src/pjsua/symbian/gfx/list_icon.bmp new file mode 100644 index 00000000..a874feae Binary files /dev/null and b/pjsip-apps/src/pjsua/symbian/gfx/list_icon.bmp differ diff --git a/pjsip-apps/src/pjsua/symbian/gfx/list_icon_mask.bmp b/pjsip-apps/src/pjsua/symbian/gfx/list_icon_mask.bmp new file mode 100644 index 00000000..e3205279 Binary files /dev/null and b/pjsip-apps/src/pjsua/symbian/gfx/list_icon_mask.bmp differ diff --git a/pjsip-apps/src/pjsua/symbian/gfx/mark_icon.bmp b/pjsip-apps/src/pjsua/symbian/gfx/mark_icon.bmp new file mode 100644 index 00000000..35571e2c Binary files /dev/null and b/pjsip-apps/src/pjsua/symbian/gfx/mark_icon.bmp differ diff --git a/pjsip-apps/src/pjsua/symbian/gfx/mark_icon_mask.bmp b/pjsip-apps/src/pjsua/symbian/gfx/mark_icon_mask.bmp new file mode 100644 index 00000000..dc8744bb Binary files /dev/null and b/pjsip-apps/src/pjsua/symbian/gfx/mark_icon_mask.bmp differ diff --git a/pjsip-apps/src/pjsua/symbian/gfx/pjsua.bmp b/pjsip-apps/src/pjsua/symbian/gfx/pjsua.bmp new file mode 100644 index 00000000..c6c20279 Binary files /dev/null and b/pjsip-apps/src/pjsua/symbian/gfx/pjsua.bmp differ diff --git a/pjsip-apps/src/pjsua/symbian/gfx/qgn_menu_pjsua.svg b/pjsip-apps/src/pjsua/symbian/gfx/qgn_menu_pjsua.svg new file mode 100644 index 00000000..47da6d7f --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/gfx/qgn_menu_pjsua.svg @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pjsip-apps/src/pjsua/symbian/group/ABLD.BAT b/pjsip-apps/src/pjsua/symbian/group/ABLD.BAT new file mode 100644 index 00000000..70c8b685 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/group/ABLD.BAT @@ -0,0 +1,15 @@ +@ECHO OFF + +REM Bldmake-generated batch file - ABLD.BAT +REM ** DO NOT EDIT ** + +perl -S ABLD.PL "\Users\Teluu\pjsip\trunk\pjsip-apps\src\pjsua\symbian\group\\" %1 %2 %3 %4 %5 %6 %7 %8 %9 +if errorlevel==1 goto CheckPerl +goto End + +:CheckPerl +perl -v >NUL +if errorlevel==1 echo Is Perl, version 5.003_07 or later, installed? +goto End + +:End diff --git a/pjsip-apps/src/pjsua/symbian/group/bld.inf b/pjsip-apps/src/pjsua/symbian/group/bld.inf new file mode 100644 index 00000000..ba36d31b --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/group/bld.inf @@ -0,0 +1,26 @@ + +PRJ_PLATFORMS +WINSCW ARMV5 GCCE + + +#ifdef SBSV2 + +PRJ_EXTENSIONS + + START EXTENSION s60/mifconv + OPTION TARGETFILE pjsua_0xE44C2D02.mif + OPTION HEADERFILE pjsua_0xE44C2D02.mbg + OPTION SOURCEDIR ../gfx + OPTION SOURCES -c32 qgn_menu_pjsua + END + +#else + +PRJ_MMPFILES + + gnumakefile pjsua_icons.mk + +#endif + +PRJ_MMPFILES +pjsua.mmp diff --git a/pjsip-apps/src/pjsua/symbian/group/pjsua.mmp b/pjsip-apps/src/pjsua/symbian/group/pjsua.mmp new file mode 100644 index 00000000..88b87df8 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/group/pjsua.mmp @@ -0,0 +1,105 @@ +// These part may be overwritten by automated test +// =BEGIN +#define SND_HAS_APS 0 +#define SND_HAS_VAS 0 +#define SND_HAS_MDA 1 +// =END + +TARGET pjsua.exe +UID 0x100039CE 0xE44C2D02 +VENDORID 0 +TARGETTYPE exe +EPOCSTACKSIZE 0x5000 + +SYSTEMINCLUDE \epoc32\include \epoc32\include\variant \epoc32\include\ecom +USERINCLUDE ..\inc ..\data + +SOURCEPATH ..\data +START RESOURCE pjsua.rss +HEADER +TARGETPATH resource\apps +END //RESOURCE + +START RESOURCE pjsua_reg.rss +TARGETPATH \private\10003a3f\apps +END //RESOURCE + +LIBRARY euser.lib apparc.lib cone.lib eikcore.lib avkon.lib +LIBRARY commonengine.lib efsrv.lib estor.lib eikcoctl.lib eikdlg.lib +LIBRARY eikctl.lib bafl.lib fbscli.lib aknnotify.lib aknicon.lib +LIBRARY etext.lib gdi.lib egul.lib insock.lib +LIBRARY ecom.lib InetProtUtil.lib http.lib esock.lib + +LANG 01 + +START BITMAP pjsua.mbm + HEADER + TARGETPATH \resource\apps + SOURCEPATH ..\gfx + SOURCE c12,1 list_icon.bmp list_icon_mask.bmp + SOURCE c24 pjsua.bmp +END + +SOURCEPATH ..\src + +#ifdef ENABLE_ABIV2_MODE +DEBUGGABLE_UDEBONLY +#endif + +SOURCE pjsuaContainer.cpp PjsuaContainerView.cpp pjsuaApplication.cpp pjsuaDocument.cpp pjsuaAppUi.cpp + + +/* PJSIP library dependencies */ + +MACRO PJ_M_I386=1 +MACRO PJ_SYMBIAN=1 + +SYSTEMINCLUDE ..\..\..\..\..\pjlib\include +SYSTEMINCLUDE ..\..\..\..\..\pjlib-util\include +SYSTEMINCLUDE ..\..\..\..\..\pjnath\include +SYSTEMINCLUDE ..\..\..\..\..\pjmedia\include +SYSTEMINCLUDE ..\..\..\..\..\pjsip\include + +SYSTEMINCLUDE \epoc32\include\libc + +LIBRARY estlib.lib charconv.lib hal.lib + +STATICLIBRARY pjsua_lib.lib +STATICLIBRARY pjsip_ua.lib pjsip_simple.lib pjsip.lib +STATICLIBRARY libgsmcodec.lib libspeexcodec.lib +STATICLIBRARY libg7221codec.lib libpassthroughcodec.lib +STATICLIBRARY pjmedia.lib +STATICLIBRARY pjmedia_audiodev.lib +STATICLIBRARY pjsdp.lib +STATICLIBRARY pjnath.lib +STATICLIBRARY pjlib_util.lib pjlib.lib +STATICLIBRARY libsrtp.lib +STATICLIBRARY libresample.lib + +/* Sound device (APS/VAS/MDA) library & capability settings */ +#if SND_HAS_APS + LIBRARY APSSession2.lib +#endif + +#if SND_HAS_VAS + LIBRARY VoIPAudioIntfc.lib +#endif + +#if SND_HAS_MDA + LIBRARY mediaclientaudiostream.lib + LIBRARY mediaclientaudioinputstream.lib +#endif + +#if SND_HAS_APS || SND_HAS_VAS + CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment MultimediaDD +#else + CAPABILITY NetworkServices LocalServices ReadUserData WriteUserData UserEnvironment +#endif + + +/* PJSUA APP */ + +SOURCEPATH ..\.. + +SOURCE pjsua_cli.c pjsua_legacy.c +SOURCE pjsua_app.c pjsua_common.c pjsua_config.c diff --git a/pjsip-apps/src/pjsua/symbian/group/pjsua_icons.mk b/pjsip-apps/src/pjsua/symbian/group/pjsua_icons.mk new file mode 100644 index 00000000..525ba219 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/group/pjsua_icons.mk @@ -0,0 +1,75 @@ +# ============================================================================ +# Name : Icons_aif_scalable_dc.mk +# Part of : pjsua +# +# Description: +# +# ============================================================================ + + +ifeq (WINS,$(findstring WINS, $(PLATFORM))) +ZDIR=$(EPOCROOT)epoc32\release\$(PLATFORM)\$(CFG)\Z +else +ZDIR=$(EPOCROOT)epoc32\data\z +endif + + +# ---------------------------------------------------------------------------- +# TODO: Configure these +# ---------------------------------------------------------------------------- + +TARGETDIR=$(ZDIR)\resource\apps +ICONTARGETFILENAME=$(TARGETDIR)\pjsua_aif.mif +HEADERDIR=$(EPOCROOT)epoc32\include +HEADERFILENAME=$(HEADERDIR)\pjsua_aif.mbg + +ICONDIR=..\gfx + +do_nothing : + @rem do_nothing + +MAKMAKE : do_nothing + +BLD : do_nothing + +CLEAN : + @echo ...Deleting $(ICONTARGETFILENAME) + del /q /f $(ICONTARGETFILENAME) + +LIB : do_nothing + +CLEANLIB : do_nothing + +# ---------------------------------------------------------------------------- +# TODO: Configure these. +# +# NOTE 1: DO NOT DEFINE MASK FILE NAMES! They are included automatically by +# MifConv if the mask detph is defined. +# +# NOTE 2: Usually, source paths should not be included in the bitmap +# definitions. MifConv searches for the icons in all icon directories in a +# predefined order, which is currently \s60\icons, \s60\bitmaps2. +# The directory \s60\icons is included in the search only if the feature flag +# __SCALABLE_ICONS is defined. +# ---------------------------------------------------------------------------- +# NOTE: if you have JUSTINTIME enabled for your S60 3rd FP1 or newer SDK +# and this command crashes, consider adding "/X" to the command line. +# See +# ---------------------------------------------------------------------------- + +RESOURCE : $(ICONTARGETFILENAME) + +$(ICONTARGETFILENAME) : $(ICONDIR)\qgn_menu_pjsua.svg + mifconv $(ICONTARGETFILENAME) \ + /H$(HEADERFILENAME) \ + /c32,8 $(ICONDIR)\qgn_menu_pjsua.svg + +FREEZE : do_nothing + +SAVESPACE : do_nothing + +RELEASABLES : + @echo $(ICONTARGETFILENAME) + +FINAL : do_nothing + diff --git a/pjsip-apps/src/pjsua/symbian/inc/PjsuaContainerView.h b/pjsip-apps/src/pjsua/symbian/inc/PjsuaContainerView.h new file mode 100644 index 00000000..22b3ed8b --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/inc/PjsuaContainerView.h @@ -0,0 +1,94 @@ +/* +======================================================================== + Name : PjsuaContainerView.h + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +#ifndef PJSUACONTAINERVIEW_H +#define PJSUACONTAINERVIEW_H + +// [[[ begin generated region: do not modify [Generated Includes] +#include +// ]]] end generated region [Generated Includes] + + +// [[[ begin [Event Handler Includes] +// ]]] end [Event Handler Includes] + +// [[[ begin generated region: do not modify [Generated Constants] +// ]]] end generated region [Generated Constants] + +// [[[ begin generated region: do not modify [Generated Forward Declarations] +class CPjsuaContainer; +// ]]] end generated region [Generated Forward Declarations] + +/** + * Avkon view class for pjsuaContainerView. It is register with the view server + * by the AppUi. It owns the container control. + * @class CpjsuaContainerView pjsuaContainerView.h + */ + +class CpjsuaContainerView : public CAknView + { + + + // [[[ begin [Public Section] +public: + // constructors and destructor + CpjsuaContainerView(); + static CpjsuaContainerView* NewL(); + static CpjsuaContainerView* NewLC(); + void ConstructL(); + virtual ~CpjsuaContainerView(); + + // from base class CAknView + TUid Id() const; + void HandleCommandL( TInt aCommand ); + + // [[[ begin generated region: do not modify [Generated Methods] + CPjsuaContainer* CreateContainerL(); + // ]]] end generated region [Generated Methods] + + // ]]] end [Public Section] + + void PutMessage( const char *msg ); + + // [[[ begin [Protected Section] +protected: + // from base class CAknView + void DoActivateL( + const TVwsViewId& aPrevViewId, + TUid aCustomMessageId, + const TDesC8& aCustomMessage ); + void DoDeactivate(); + void HandleStatusPaneSizeChange(); + + // [[[ begin generated region: do not modify [Overridden Methods] + // ]]] end generated region [Overridden Methods] + + + // [[[ begin [User Handlers] + // ]]] end [User Handlers] + + // ]]] end [Protected Section] + + + // [[[ begin [Private Section] +private: + void SetupStatusPaneL(); + void CleanupStatusPane(); + + // [[[ begin generated region: do not modify [Generated Instance Variables] + CPjsuaContainer* iPjsuaContainer; + // ]]] end generated region [Generated Instance Variables] + + // [[[ begin generated region: do not modify [Generated Methods] + // ]]] end generated region [Generated Methods] + + // ]]] end [Private Section] + + }; + +#endif // PJSUACONTAINERVIEW_H diff --git a/pjsip-apps/src/pjsua/symbian/inc/pjsua.hrh b/pjsip-apps/src/pjsua/symbian/inc/pjsua.hrh new file mode 100644 index 00000000..ba27f507 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/inc/pjsua.hrh @@ -0,0 +1,12 @@ +/* +======================================================================== + Name : pjsua.hrh + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +enum TpjsuaViewUids + { + EPjsuaContainerViewId = 1 + }; diff --git a/pjsip-apps/src/pjsua/symbian/inc/pjsua.pan b/pjsip-apps/src/pjsua/symbian/inc/pjsua.pan new file mode 100644 index 00000000..e33dbd56 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/inc/pjsua.pan @@ -0,0 +1,18 @@ + +#ifndef PJSUA_PAN_H +#define PJSUA_PAN_H + +/** pjsua application panic codes */ +enum TpjsuaPanics + { + EpjsuaUi = 1 + // add further panics here + }; + +inline void Panic(TpjsuaPanics aReason) + { + _LIT(applicationName,"pjsua"); + User::Panic(applicationName, aReason); + } + +#endif // PJSUA_PAN_H diff --git a/pjsip-apps/src/pjsua/symbian/inc/pjsuaAppUi.h b/pjsip-apps/src/pjsua/symbian/inc/pjsuaAppUi.h new file mode 100644 index 00000000..8bfd2442 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/inc/pjsuaAppUi.h @@ -0,0 +1,70 @@ +/* +======================================================================== + Name : pjsuaAppUi.h + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +#ifndef PJSUAAPPUI_H +#define PJSUAAPPUI_H + +// [[[ begin generated region: do not modify [Generated Includes] +#include +// ]]] end generated region [Generated Includes] + + +// [[[ begin generated region: do not modify [Generated Forward Declarations] +class CpjsuaContainerView; +// ]]] end generated region [Generated Forward Declarations] + +/** + * @class CpjsuaAppUi pjsuaAppUi.h + * @brief The AppUi class handles application-wide aspects of the user interface, including + * view management and the default menu, control pane, and status pane. + */ +class CpjsuaAppUi : public CAknViewAppUi + { +public: + // constructor and destructor + CpjsuaAppUi(); + virtual ~CpjsuaAppUi(); + void ConstructL(); + +public: + // from CCoeAppUi + TKeyResponse HandleKeyEventL( + const TKeyEvent& aKeyEvent, + TEventCode aType ); + + // from CEikAppUi + void HandleCommandL( TInt aCommand ); + void HandleResourceChangeL( TInt aType ); + + // from CAknAppUi + void HandleViewDeactivation( + const TVwsViewId& aViewIdToBeDeactivated, + const TVwsViewId& aNewlyActivatedViewId ); + +private: + void InitializeContainersL(); + // [[[ begin generated region: do not modify [Generated Methods] +public: + // ]]] end generated region [Generated Methods] + + void PutMsg(const char *msg); + + // [[[ begin generated region: do not modify [Generated Instance Variables] +private: + CpjsuaContainerView* iPjsuaContainerView; + // ]]] end generated region [Generated Instance Variables] + + + // [[[ begin [User Handlers] +protected: + // ]]] end [User Handlers] + void PrepareToExit(); + + }; + +#endif // PJSUAAPPUI_H diff --git a/pjsip-apps/src/pjsua/symbian/inc/pjsuaApplication.h b/pjsip-apps/src/pjsua/symbian/inc/pjsuaApplication.h new file mode 100644 index 00000000..eef6e3fe --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/inc/pjsuaApplication.h @@ -0,0 +1,35 @@ +/* +======================================================================== + Name : pjsuaApplication.h + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +#ifndef PJSUAAPPLICATION_H +#define PJSUAAPPLICATION_H + +// [[[ begin generated region: do not modify [Generated Includes] +#include +// ]]] end generated region [Generated Includes] + +// [[[ begin generated region: do not modify [Generated Constants] +const TUid KUidpjsuaApplication = { 0xE44C2D02 }; +// ]]] end generated region [Generated Constants] + +/** + * + * @class CpjsuaApplication pjsuaApplication.h + * @brief A CAknApplication-derived class is required by the S60 application + * framework. It is subclassed to create the application's document + * object. + */ +class CpjsuaApplication : public CAknApplication + { +private: + TUid AppDllUid() const; + CApaDocument* CreateDocumentL(); + + }; + +#endif // PJSUAAPPLICATION_H diff --git a/pjsip-apps/src/pjsua/symbian/inc/pjsuaContainer.h b/pjsip-apps/src/pjsua/symbian/inc/pjsuaContainer.h new file mode 100644 index 00000000..2ee14758 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/inc/pjsuaContainer.h @@ -0,0 +1,112 @@ +/* +======================================================================== + Name : pjsuaContainer.h + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +#ifndef PJSUACONTAINER_H +#define PJSUACONTAINER_H + +// [[[ begin generated region: do not modify [Generated Includes] +#include +// ]]] end generated region [Generated Includes] + + +// [[[ begin [Event Handler Includes] +// ]]] end [Event Handler Includes] + +// [[[ begin generated region: do not modify [Generated Forward Declarations] +class MEikCommandObserver; +class CEikImage; +class CEikLabel; +// ]]] end generated region [Generated Forward Declarations] + +/** + * Container class for pjsuaContainer + * + * @class CPjsuaContainer pjsuaContainer.h + */ +class CPjsuaContainer : public CCoeControl + { +public: + // constructors and destructor + CPjsuaContainer(); + static CPjsuaContainer* NewL( + const TRect& aRect, + const CCoeControl* aParent, + MEikCommandObserver* aCommandObserver ); + static CPjsuaContainer* NewLC( + const TRect& aRect, + const CCoeControl* aParent, + MEikCommandObserver* aCommandObserver ); + void ConstructL( + const TRect& aRect, + const CCoeControl* aParent, + MEikCommandObserver* aCommandObserver ); + virtual ~CPjsuaContainer(); + +public: + // from base class CCoeControl + TInt CountComponentControls() const; + CCoeControl* ComponentControl( TInt aIndex ) const; + TKeyResponse OfferKeyEventL( + const TKeyEvent& aKeyEvent, + TEventCode aType ); + void HandleResourceChange( TInt aType ); + +protected: + // from base class CCoeControl + void SizeChanged(); + +private: + // from base class CCoeControl + void Draw( const TRect& aRect ) const; + +private: + void InitializeControlsL(); + void LayoutControls(); + CCoeControl* iFocusControl; + MEikCommandObserver* iCommandObserver; + // [[[ begin generated region: do not modify [Generated Methods] +public: + // ]]] end generated region [Generated Methods] + + void PutMessageL( const char* msg ); + // [[[ begin generated region: do not modify [Generated Type Declarations] +public: + // ]]] end generated region [Generated Type Declarations] + + // [[[ begin generated region: do not modify [Generated Instance Variables] +private: + CEikImage* iImage1; + CEikLabel* iLabel1; + // ]]] end generated region [Generated Instance Variables] + + + // [[[ begin [Overridden Methods] +protected: + // ]]] end [Overridden Methods] + + + // [[[ begin [User Handlers] +protected: + // ]]] end [User Handlers] + +public: + enum TControls + { + // [[[ begin generated region: do not modify [Generated Contents] + EImage1, + ELabel1, + + // ]]] end generated region [Generated Contents] + + // add any user-defined entries here... + + ELastControl + }; + }; + +#endif // PJSUACONTAINER_H diff --git a/pjsip-apps/src/pjsua/symbian/inc/pjsuaDocument.h b/pjsip-apps/src/pjsua/symbian/inc/pjsuaDocument.h new file mode 100644 index 00000000..be5deff3 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/inc/pjsuaDocument.h @@ -0,0 +1,36 @@ +/* +======================================================================== + Name : pjsuaDocument.h + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +#ifndef PJSUADOCUMENT_H +#define PJSUADOCUMENT_H + +#include + +class CEikAppUi; + +/** +* @class CpjsuaDocument pjsuaDocument.h +* @brief A CAknDocument-derived class is required by the S60 application +* framework. It is responsible for creating the AppUi object. +*/ +class CpjsuaDocument : public CAknDocument + { +public: + // constructor + static CpjsuaDocument* NewL( CEikApplication& aApp ); + +private: + // constructors + CpjsuaDocument( CEikApplication& aApp ); + void ConstructL(); + +public: + // from base class CEikDocument + CEikAppUi* CreateAppUiL(); + }; +#endif // PJSUADOCUMENT_H diff --git a/pjsip-apps/src/pjsua/symbian/pjsuaContainer.uidesign b/pjsip-apps/src/pjsua/symbian/pjsuaContainer.uidesign new file mode 100644 index 00000000..e50fd6de --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/pjsuaContainer.uidesign @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + data + 3.2.0 + com.nokia.series60 + com.nokia.sdt.component.symbian.Symbian-Provider + inc + src + com.nokia.sdt.sourcegen.Symbian-Provider + group + + CpjsuaContainerView + + 51 + 44 + + pjsuaContainerView + + 240 + 320 + + + + 20 + + statusPane + + 204 + 63 + + + + 56 + + title + STR_pjsuaContainerView_4 + + 148 + 43 + + + + + + + 288 + + + STR_pjsuaContainerView_1 + STR_pjsuaContainerView_2 + STR_pjsuaContainerView_3 + + EAknSoftkeyBack + R_AVKON_SOFTKEYS_EXIT + + controlPane + + 240 + 32 + + + + 0,0,0 + + 66 + + CPjsuaContainer + pjsuaContainer + + 240 + 222 + + + + 0 + 0 + + image1 + + 99 + 111 + + + \resource\apps\pjsua.mbm + EMbmPjsuaPjsua + + + + + 196 + + label1 + STR_pjsuaContainerView_5 + + 241 + 27 + + + + + + + + + + pjsuaContainer + Please wait.. + + + + + + r_pjsua_container_pjsua_container_view + r_pjsua_container_status_pane + r_pjsua_container_label1 + r_pjsua_container_title_resource + + + EEikLabelFontNormal + EPjsuaContainerViewId + EEikLabelAlignHCenter + EEikStatusPaneUidTitle + EAknCtTitlePane + + + + + src/pjsuacontainer.cpp + src/pjsuacontainerview.cpp + inc/pjsuacontainer.h + inc/pjsuacontainerview.h + data/pjsua.rss + data/pjsuacontainer.rssi + inc/pjsua.hrh + data/pjsua.loc + data/pjsua.l01 + data/pjsuacontainer.loc + data/pjsuacontainer.l01 + + diff --git a/pjsip-apps/src/pjsua/symbian/sis/backup_registration.xml b/pjsip-apps/src/pjsua/symbian/sis/backup_registration.xml new file mode 100644 index 00000000..7f7f2d06 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/sis/backup_registration.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/pjsip-apps/src/pjsua/symbian/sis/pjsua.pkg b/pjsip-apps/src/pjsua/symbian/sis/pjsua.pkg new file mode 100644 index 00000000..5b252778 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/sis/pjsua.pkg @@ -0,0 +1,36 @@ +; pjsua.pkg +; This is an auto-generated PKG file by Carbide. +; This file uses variables specific to Carbide builds that will not work +; on command-line builds. If you want to use this generated PKG file from the +; command-line tools you will need to modify the variables with the appropriate +; values: $(EPOCROOT), $(PLATFORM), $(TARGET) +; Also, the resource file entries should be changed to match the language +; used in the build. For example, if building for LANGUAGE_01, change the file +; extensions .rsc to .r01. +; +;Language - standard language definitions +&EN + +; standard SIS file header +#{"pjsua"},(0xE44C2D02),1,0,0 + +;Localised Vendor name +%{"Vendor-EN"} + +;Unique Vendor name +:"Vendor" + +;Supports Series 60 v 3.0 +[0x101F7961], 0, 0, 0, {"Series60ProductID"} + +;Files to install +;You should change the source paths to match that of your environment +; +"$(EPOCROOT)Epoc32\release\$(PLATFORM)\$(TARGET)\pjsua.exe" -"!:\sys\bin\pjsua.exe" +"$(EPOCROOT)Epoc32\data\z\resource\apps\pjsua.r01" -"!:\resource\apps\pjsua.r01" +"$(EPOCROOT)Epoc32\data\z\private\10003a3f\apps\pjsua_reg.r01" -"!:\private\10003a3f\import\apps\pjsua_reg.r01" +"$(EPOCROOT)epoc32\data\z\resource\apps\pjsua_aif.mif" -"!:\resource\apps\pjsua_aif.mif" +"$(EPOCROOT)epoc32\data\z\resource\apps\pjsua.mbm" -"!:\resource\apps\pjsua.mbm" +; Add any installation notes if applicable +;"pjsua.txt" -"!:\private\0xE44C2D02\pjsua.txt" + diff --git a/pjsip-apps/src/pjsua/symbian/src/PjsuaContainerView.cpp b/pjsip-apps/src/pjsua/symbian/src/PjsuaContainerView.cpp new file mode 100644 index 00000000..8595260f --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/src/PjsuaContainerView.cpp @@ -0,0 +1,261 @@ +/* +======================================================================== + Name : PjsuaContainerView.cpp + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +// [[[ begin generated region: do not modify [Generated System Includes] +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// ]]] end generated region [Generated System Includes] + +// [[[ begin generated region: do not modify [Generated User Includes] + +#include "pjsua.hrh" +#include "pjsuaContainerView.h" +#include "pjsuaContainer.h" +// ]]] end generated region [Generated User Includes] + +// [[[ begin generated region: do not modify [Generated Constants] +// ]]] end generated region [Generated Constants] + +/** + * First phase of Symbian two-phase construction. Should not contain any + * code that could leave. + */ +CpjsuaContainerView::CpjsuaContainerView() + { + // [[[ begin generated region: do not modify [Generated Contents] + iPjsuaContainer = NULL; + // ]]] end generated region [Generated Contents] + + } + +/** + * The view's destructor removes the container from the control + * stack and destroys it. + */ +CpjsuaContainerView::~CpjsuaContainerView() + { + // [[[ begin generated region: do not modify [Generated Contents] + delete iPjsuaContainer; + iPjsuaContainer = NULL; + // ]]] end generated region [Generated Contents] + + } + +/** + * Symbian two-phase constructor. + * This creates an instance then calls the second-phase constructor + * without leaving the instance on the cleanup stack. + * @return new instance of CpjsuaContainerView + */ +CpjsuaContainerView* CpjsuaContainerView::NewL() + { + CpjsuaContainerView* self = CpjsuaContainerView::NewLC(); + CleanupStack::Pop( self ); + return self; + } + +/** + * Symbian two-phase constructor. + * This creates an instance, pushes it on the cleanup stack, + * then calls the second-phase constructor. + * @return new instance of CpjsuaContainerView + */ +CpjsuaContainerView* CpjsuaContainerView::NewLC() + { + CpjsuaContainerView* self = new ( ELeave ) CpjsuaContainerView(); + CleanupStack::PushL( self ); + self->ConstructL(); + return self; + } + + +/** + * Second-phase constructor for view. + * Initialize contents from resource. + */ +void CpjsuaContainerView::ConstructL() + { + // [[[ begin generated region: do not modify [Generated Code] + BaseConstructL( R_PJSUA_CONTAINER_PJSUA_CONTAINER_VIEW ); + + // ]]] end generated region [Generated Code] + + // add your own initialization code here + } + +/** + * @return The UID for this view + */ +TUid CpjsuaContainerView::Id() const + { + return TUid::Uid( EPjsuaContainerViewId ); + } + +/** + * Handle a command for this view (override) + * @param aCommand command id to be handled + */ +void CpjsuaContainerView::HandleCommandL( TInt aCommand ) + { + // [[[ begin generated region: do not modify [Generated Code] + TBool commandHandled = EFalse; + switch ( aCommand ) + { // code to dispatch to the AknView's menu and CBA commands is generated here + default: + break; + } + + + if ( !commandHandled ) + { + + if ( aCommand == EAknSoftkeyBack ) + { + AppUi()->HandleCommandL( EEikCmdExit ); + } + + } + // ]]] end generated region [Generated Code] + + } + +/** + * Handles user actions during activation of the view, + * such as initializing the content. + */ +void CpjsuaContainerView::DoActivateL( + const TVwsViewId& /*aPrevViewId*/, + TUid /*aCustomMessageId*/, + const TDesC8& /*aCustomMessage*/ ) + { + // [[[ begin generated region: do not modify [Generated Contents] + SetupStatusPaneL(); + + + + + if ( iPjsuaContainer == NULL ) + { + iPjsuaContainer = CreateContainerL(); + iPjsuaContainer->SetMopParent( this ); + AppUi()->AddToStackL( *this, iPjsuaContainer ); + } + // ]]] end generated region [Generated Contents] + + } + +/** + */ +void CpjsuaContainerView::DoDeactivate() + { + // [[[ begin generated region: do not modify [Generated Contents] + CleanupStatusPane(); + + if ( iPjsuaContainer != NULL ) + { + AppUi()->RemoveFromViewStack( *this, iPjsuaContainer ); + delete iPjsuaContainer; + iPjsuaContainer = NULL; + } + // ]]] end generated region [Generated Contents] + + } + +/** + * Handle status pane size change for this view (override) + */ +void CpjsuaContainerView::HandleStatusPaneSizeChange() + { + CAknView::HandleStatusPaneSizeChange(); + + // this may fail, but we're not able to propagate exceptions here + TVwsViewId view; + AppUi()->GetActiveViewId( view ); + if ( view.iViewUid == Id() ) + { + TInt result; + TRAP( result, SetupStatusPaneL() ); + } + + // Hide menu + Cba()->MakeVisible(EFalse); + + //PutMessage("HandleStatusPaneSizeChange()"); + + // [[[ begin generated region: do not modify [Generated Code] + // ]]] end generated region [Generated Code] + + } + +// [[[ begin generated function: do not modify +void CpjsuaContainerView::SetupStatusPaneL() + { + // reset the context pane + TUid contextPaneUid = TUid::Uid( EEikStatusPaneUidContext ); + CEikStatusPaneBase::TPaneCapabilities subPaneContext = + StatusPane()->PaneCapabilities( contextPaneUid ); + if ( subPaneContext.IsPresent() && subPaneContext.IsAppOwned() ) + { + CAknContextPane* context = static_cast< CAknContextPane* > ( + StatusPane()->ControlL( contextPaneUid ) ); + context->SetPictureToDefaultL(); + } + + // setup the title pane + TUid titlePaneUid = TUid::Uid( EEikStatusPaneUidTitle ); + CEikStatusPaneBase::TPaneCapabilities subPaneTitle = + StatusPane()->PaneCapabilities( titlePaneUid ); + if ( subPaneTitle.IsPresent() && subPaneTitle.IsAppOwned() ) + { + CAknTitlePane* title = static_cast< CAknTitlePane* >( + StatusPane()->ControlL( titlePaneUid ) ); + TResourceReader reader; + iEikonEnv->CreateResourceReaderLC( reader, R_PJSUA_CONTAINER_TITLE_RESOURCE ); + title->SetFromResourceL( reader ); + CleanupStack::PopAndDestroy(); // reader internal state + } + + } + +// ]]] end generated function + +// [[[ begin generated function: do not modify +void CpjsuaContainerView::CleanupStatusPane() + { + } + +// ]]] end generated function + +/** + * Creates the top-level container for the view. You may modify this method's + * contents and the CPjsuaContainer::NewL() signature as needed to initialize the + * container, but the signature for this method is fixed. + * @return new initialized instance of CPjsuaContainer + */ +CPjsuaContainer* CpjsuaContainerView::CreateContainerL() + { + return CPjsuaContainer::NewL( ClientRect(), NULL, this ); + } + +void CpjsuaContainerView::PutMessage( const char *msg ) +{ + if (!iPjsuaContainer) + return; + + TRAPD(result, iPjsuaContainer->PutMessageL(msg)); +} diff --git a/pjsip-apps/src/pjsua/symbian/src/pjsuaAppUi.cpp b/pjsip-apps/src/pjsua/symbian/src/pjsuaAppUi.cpp new file mode 100644 index 00000000..124417c3 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/src/pjsuaAppUi.cpp @@ -0,0 +1,380 @@ +/* +======================================================================== + Name : pjsuaAppUi.cpp + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +// [[[ begin generated region: do not modify [Generated System Includes] +#include +#include +#include +#include +// ]]] end generated region [Generated System Includes] + +// [[[ begin generated region: do not modify [Generated User Includes] +#include "pjsuaAppUi.h" +#include "pjsua.hrh" +#include "pjsuaContainerView.h" +// ]]] end generated region [Generated User Includes] + +// [[[ begin generated region: do not modify [Generated Constants] +// ]]] end generated region [Generated Constants] + +#include "../../pjsua_app.h" + +/* Global vars */ +static CpjsuaAppUi *appui = NULL; +static pj_ioqueue_t *app_ioqueue = NULL; +static int restart_argc = 0; +static char **restart_argv = NULL; + +/* Helper funtions to init/restart/destroy the pjsua */ +static void LibInitL(); +static void LibDestroyL(); +static void LibRestartL(); + +/* pjsua app callbacks */ +static void lib_on_started(pj_status_t status, const char* title); +static pj_bool_t lib_on_stopped(pj_bool_t restart, int argc, char** argv); +static void lib_on_config_init(pjsua_app_config *cfg); + +/* Helper class to schedule function execution */ +class MyTimer : public CActive +{ +public: + typedef void (*timer_func)(); + +public: + static MyTimer* NewL(int ms, timer_func f) { + MyTimer *self = new MyTimer(f); + CleanupStack::PushL(self); + self->ConstructL(ms); + CleanupStack::Pop(self); + return self; + } + + MyTimer(timer_func f) : CActive(EPriorityStandard), func(f) {} + ~MyTimer() { + Cancel(); + rtimer.Close(); + } + + virtual void RunL() { (*func)(); delete this; } + virtual void DoCancel() { rtimer.Cancel(); } + +private: + RTimer rtimer; + timer_func func; + + void ConstructL(int ms) { + rtimer.CreateLocal(); + CActiveScheduler::Add(this); + rtimer.After(iStatus, ms * 1000); + SetActive(); + } +}; + +/** + * Construct the CpjsuaAppUi instance + */ +CpjsuaAppUi::CpjsuaAppUi() + { + // [[[ begin generated region: do not modify [Generated Contents] + // ]]] end generated region [Generated Contents] + + } + +/** + * The appui's destructor removes the container from the control + * stack and destroys it. + */ +CpjsuaAppUi::~CpjsuaAppUi() + { + // [[[ begin generated region: do not modify [Generated Contents] + // ]]] end generated region [Generated Contents] + + } + +// [[[ begin generated function: do not modify +void CpjsuaAppUi::InitializeContainersL() + { + iPjsuaContainerView = CpjsuaContainerView::NewL(); + AddViewL( iPjsuaContainerView ); + SetDefaultViewL( *iPjsuaContainerView ); + } +// ]]] end generated function + +/** + * Handle a command for this appui (override) + * @param aCommand command id to be handled + */ +void CpjsuaAppUi::HandleCommandL( TInt aCommand ) + { + // [[[ begin generated region: do not modify [Generated Code] + TBool commandHandled = EFalse; + switch ( aCommand ) + { // code to dispatch to the AppUi's menu and CBA commands is generated here + default: + break; + } + + + if ( !commandHandled ) + { + if ( aCommand == EAknSoftkeyExit || aCommand == EEikCmdExit ) + { + Exit(); + } + } + // ]]] end generated region [Generated Code] + + } + +/** + * Override of the HandleResourceChangeL virtual function + */ +void CpjsuaAppUi::HandleResourceChangeL( TInt aType ) + { + CAknViewAppUi::HandleResourceChangeL( aType ); + // [[[ begin generated region: do not modify [Generated Code] + // ]]] end generated region [Generated Code] + + } + +/** + * Override of the HandleKeyEventL virtual function + * @return EKeyWasConsumed if event was handled, EKeyWasNotConsumed if not + * @param aKeyEvent + * @param aType + */ +TKeyResponse CpjsuaAppUi::HandleKeyEventL( + const TKeyEvent& aKeyEvent, + TEventCode aType ) + { + // The inherited HandleKeyEventL is private and cannot be called + // [[[ begin generated region: do not modify [Generated Contents] + // ]]] end generated region [Generated Contents] + + // Left or right softkey pressed + if (aType==EEventKeyDown && + (aKeyEvent.iScanCode == EStdKeyDevice0 || + aKeyEvent.iScanCode == EStdKeyDevice1)) + { + Cba()->MakeVisible(ETrue); + } else { + Cba()->MakeVisible(EFalse); + } + + return EKeyWasNotConsumed; + } + +/** + * Override of the HandleViewDeactivation virtual function + * + * @param aViewIdToBeDeactivated + * @param aNewlyActivatedViewId + */ +void CpjsuaAppUi::HandleViewDeactivation( + const TVwsViewId& aViewIdToBeDeactivated, + const TVwsViewId& aNewlyActivatedViewId ) + { + CAknViewAppUi::HandleViewDeactivation( + aViewIdToBeDeactivated, + aNewlyActivatedViewId ); + // [[[ begin generated region: do not modify [Generated Contents] + // ]]] end generated region [Generated Contents] + + } + +/** + * @brief Completes the second phase of Symbian object construction. + * Put initialization code that could leave here. + */ +void CpjsuaAppUi::ConstructL() + { + // [[[ begin generated region: do not modify [Generated Contents] + + BaseConstructL( EAknEnableSkin | + EAknEnableMSK ); + InitializeContainersL(); + // ]]] end generated region [Generated Contents] + + // Save pointer to this AppUi + appui = this; + + // Full screen + StatusPane()->MakeVisible(EFalse); + Cba()->MakeVisible(EFalse); + + // Schedule Lib Init + MyTimer::NewL(100, &LibInitL); + } + +/* Called by Symbian GUI framework when app is about to exit */ +void CpjsuaAppUi::PrepareToExit() +{ + TRAPD(result, LibDestroyL()); + CAknViewAppUi::PrepareToExit(); +} + +/* Print message on screen */ +void CpjsuaAppUi::PutMsg(const char *msg) +{ + iPjsuaContainerView->PutMessage(msg); +} + +#include + +static RSocketServ aSocketServer; +static RConnection aConn; + +/* Called when pjsua is started */ +void lib_on_started(pj_status_t status, const char* title) +{ + appui->PutMsg(title); +} + +/* Called when pjsua is stopped */ +pj_bool_t lib_on_stopped(pj_bool_t restart, int argc, char** argv) +{ + if (restart) { + restart_argc = argc; + restart_argv = argv; + + // Schedule Lib Init + MyTimer::NewL(100, &LibRestartL); + } else { + /* Destroy & quit GUI, e.g: clean up window, resources */ + appui->Exit(); + } + + return PJ_FALSE; +} + +/* Called before pjsua initializing config. + * We need to override some settings here. + */ +void lib_on_config_init(pjsua_app_config *cfg) +{ + /* Disable threading */ + cfg->cfg.thread_cnt = 0; + cfg->cfg.thread_cnt = 0; + cfg->media_cfg.thread_cnt = 0; + cfg->media_cfg.has_ioqueue = PJ_FALSE; + + /* Create ioqueue for telnet CLI */ + if (app_ioqueue == NULL) { + pj_ioqueue_create(cfg->pool, 0, &app_ioqueue); + } + cfg->cli_cfg.telnet_cfg.ioqueue = app_ioqueue; +} + +void LibInitL() +{ + pj_symbianos_params sym_params; + char* argv[] = { + "", + "--use-cli", + "--cli-telnet-port=0", + "--no-cli-console" + }; + app_cfg_t app_cfg; + pj_status_t status; + TInt err; + + // Initialize RSocketServ + if ((err=aSocketServer.Connect(32)) != KErrNone) { + status = PJ_STATUS_FROM_OS(err); + goto on_return; + } + + // Open up a connection + if ((err=aConn.Open(aSocketServer)) != KErrNone) { + aSocketServer.Close(); + status = PJ_STATUS_FROM_OS(err); + goto on_return; + } + if ((err=aConn.Start()) != KErrNone) { + aConn.Close(); + aSocketServer.Close(); + status = PJ_STATUS_FROM_OS(err); + goto on_return; + } + + // Set Symbian OS parameters in pjlib. + // This must be done before pj_init() is called. + pj_bzero(&sym_params, sizeof(sym_params)); + sym_params.rsocketserv = &aSocketServer; + sym_params.rconnection = &aConn; + pj_symbianos_set_params(&sym_params); + + pj_bzero(&app_cfg, sizeof(app_cfg)); + app_cfg.argc = PJ_ARRAY_SIZE(argv); + app_cfg.argv = argv; + app_cfg.on_started = &lib_on_started; + app_cfg.on_stopped = &lib_on_stopped; + app_cfg.on_config_init = &lib_on_config_init; + + appui->PutMsg("Initializing.."); + status = app_init(&app_cfg); + if (status != PJ_SUCCESS) + goto on_return; + + appui->PutMsg("Starting.."); + status = app_run(PJ_FALSE); + if (status != PJ_SUCCESS) + goto on_return; + +on_return: + if (status != PJ_SUCCESS) + appui->PutMsg("Initialization failed"); +} + +void LibDestroyL() +{ + if (app_ioqueue) { + pj_ioqueue_destroy(app_ioqueue); + app_ioqueue = NULL; + } + app_destroy(); + CloseSTDLIB(); +} + +void LibRestartL() +{ + app_cfg_t app_cfg; + pj_status_t status; + + /* Destroy pjsua app first */ + + if (app_ioqueue) { + pj_ioqueue_destroy(app_ioqueue); + app_ioqueue = NULL; + } + app_destroy(); + + /* Reinit pjsua app */ + + pj_bzero(&app_cfg, sizeof(app_cfg)); + app_cfg.argc = restart_argc; + app_cfg.argv = restart_argv; + app_cfg.on_started = &lib_on_started; + app_cfg.on_stopped = &lib_on_stopped; + app_cfg.on_config_init = &lib_on_config_init; + + status = app_init(&app_cfg); + if (status != PJ_SUCCESS) { + appui->PutMsg("app_init() failed"); + return; + } + + /* Run pjsua app */ + + status = app_run(PJ_FALSE); + if (status != PJ_SUCCESS) { + appui->PutMsg("app_run() failed"); + return; + } +} diff --git a/pjsip-apps/src/pjsua/symbian/src/pjsuaApplication.cpp b/pjsip-apps/src/pjsua/symbian/src/pjsuaApplication.cpp new file mode 100644 index 00000000..9196b9f9 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/src/pjsuaApplication.cpp @@ -0,0 +1,78 @@ +/* +======================================================================== + Name : pjsuaApplication.cpp + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +// [[[ begin generated region: do not modify [Generated System Includes] +// ]]] end generated region [Generated System Includes] + +// [[[ begin generated region: do not modify [Generated Includes] +#include "pjsuaApplication.h" +#include "pjsuaDocument.h" +#ifdef EKA2 +#include +#endif +// ]]] end generated region [Generated Includes] + +/** + * @brief Returns the application's UID (override from CApaApplication::AppDllUid()) + * @return UID for this application (KUidpjsuaApplication) + */ +TUid CpjsuaApplication::AppDllUid() const + { + return KUidpjsuaApplication; + } + +/** + * @brief Creates the application's document (override from CApaApplication::CreateDocumentL()) + * @return Pointer to the created document object (CpjsuaDocument) + */ +CApaDocument* CpjsuaApplication::CreateDocumentL() + { + return CpjsuaDocument::NewL( *this ); + } + +#ifdef EKA2 + +/** + * @brief Called by the application framework to construct the application object + * @return The application (CpjsuaApplication) + */ +LOCAL_C CApaApplication* NewApplication() + { + return new CpjsuaApplication; + } + +/** +* @brief This standard export is the entry point for all Series 60 applications +* @return error code + */ +GLDEF_C TInt E32Main() + { + return EikStart::RunApplication( NewApplication ); + } + +#else // Series 60 2.x main DLL program code + +/** +* @brief This standard export constructs the application object. +* @return The application (CpjsuaApplication) +*/ +EXPORT_C CApaApplication* NewApplication() + { + return new CpjsuaApplication; + } + +/** +* @brief This standard export is the entry point for all Series 60 applications +* @return error code +*/ +GLDEF_C TInt E32Dll(TDllReason /*reason*/) + { + return KErrNone; + } + +#endif // EKA2 diff --git a/pjsip-apps/src/pjsua/symbian/src/pjsuaContainer.cpp b/pjsip-apps/src/pjsua/symbian/src/pjsuaContainer.cpp new file mode 100644 index 00000000..5dec51f2 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/src/pjsuaContainer.cpp @@ -0,0 +1,312 @@ +/* +======================================================================== + Name : pjsuaContainer.cpp + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +// [[[ begin generated region: do not modify [Generated System Includes] +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +// ]]] end generated region [Generated System Includes] + +// [[[ begin generated region: do not modify [Generated User Includes] +#include "pjsuaContainer.h" +#include "pjsuaContainerView.h" +#include "pjsua.hrh" +// ]]] end generated region [Generated User Includes] + +#include + +// [[[ begin generated region: do not modify [Generated Constants] +_LIT( KpjsuaFile, "\\resource\\apps\\pjsua.mbm" ); +// ]]] end generated region [Generated Constants] + +/** + * First phase of Symbian two-phase construction. Should not + * contain any code that could leave. + */ +CPjsuaContainer::CPjsuaContainer() + { + // [[[ begin generated region: do not modify [Generated Contents] + iImage1 = NULL; + iLabel1 = NULL; + // ]]] end generated region [Generated Contents] + + } +/** + * Destroy child controls. + */ +CPjsuaContainer::~CPjsuaContainer() + { + // [[[ begin generated region: do not modify [Generated Contents] + delete iImage1; + iImage1 = NULL; + delete iLabel1; + iLabel1 = NULL; + // ]]] end generated region [Generated Contents] + + } + +/** + * Construct the control (first phase). + * Creates an instance and initializes it. + * Instance is not left on cleanup stack. + * @param aRect bounding rectangle + * @param aParent owning parent, or NULL + * @param aCommandObserver command observer + * @return initialized instance of CPjsuaContainer + */ +CPjsuaContainer* CPjsuaContainer::NewL( + const TRect& aRect, + const CCoeControl* aParent, + MEikCommandObserver* aCommandObserver ) + { + CPjsuaContainer* self = CPjsuaContainer::NewLC( + aRect, + aParent, + aCommandObserver ); + CleanupStack::Pop( self ); + return self; + } + +/** + * Construct the control (first phase). + * Creates an instance and initializes it. + * Instance is left on cleanup stack. + * @param aRect The rectangle for this window + * @param aParent owning parent, or NULL + * @param aCommandObserver command observer + * @return new instance of CPjsuaContainer + */ +CPjsuaContainer* CPjsuaContainer::NewLC( + const TRect& aRect, + const CCoeControl* aParent, + MEikCommandObserver* aCommandObserver ) + { + CPjsuaContainer* self = new ( ELeave ) CPjsuaContainer(); + CleanupStack::PushL( self ); + self->ConstructL( aRect, aParent, aCommandObserver ); + return self; + } + +/** + * Construct the control (second phase). + * Creates a window to contain the controls and activates it. + * @param aRect bounding rectangle + * @param aCommandObserver command observer + * @param aParent owning parent, or NULL + */ +void CPjsuaContainer::ConstructL( + const TRect& aRect, + const CCoeControl* aParent, + MEikCommandObserver* aCommandObserver ) + { + if ( aParent == NULL ) + { + CreateWindowL(); + } + else + { + SetContainerWindowL( *aParent ); + } + iFocusControl = NULL; + iCommandObserver = aCommandObserver; + InitializeControlsL(); + SetRect( aRect ); + + // Full screen + SetExtentToWholeScreen(); + + // Set label color + //iLabel1->OverrideColorL( EColorLabelText, KRgbWhite ); + //iLabel1->OverrideColorL(EColorControlBackground, KRgbBlack ) + iLabel1->SetEmphasis( CEikLabel::EFullEmphasis); + iLabel1->OverrideColorL( EColorLabelHighlightFullEmphasis, KRgbBlack ); + iLabel1->OverrideColorL( EColorLabelTextEmphasis, KRgbWhite ); + + // Set label font + CFont* fontUsed; + _LIT(f,"Arial"); + TFontSpec* fontSpec = new TFontSpec(f, 105); + TFontStyle* fontStyle = new TFontStyle(); + fontStyle->SetPosture(EPostureUpright); + fontStyle->SetStrokeWeight(EStrokeWeightNormal); + fontSpec->iFontStyle = *fontStyle; + fontUsed = iCoeEnv->CreateScreenFontL(*fontSpec); + iLabel1->SetFont(fontUsed); + iLabel1->SetAlignment( EHCenterVCenter ); + + ActivateL(); + // [[[ begin generated region: do not modify [Post-ActivateL initializations] + // ]]] end generated region [Post-ActivateL initializations] + + } + +/** +* Return the number of controls in the container (override) +* @return count +*/ +TInt CPjsuaContainer::CountComponentControls() const + { + return ( int ) ELastControl; + } + +/** +* Get the control with the given index (override) +* @param aIndex Control index [0...n) (limited by #CountComponentControls) +* @return Pointer to control +*/ +CCoeControl* CPjsuaContainer::ComponentControl( TInt aIndex ) const + { + // [[[ begin generated region: do not modify [Generated Contents] + switch ( aIndex ) + { + case EImage1: + return iImage1; + case ELabel1: + return iLabel1; + } + // ]]] end generated region [Generated Contents] + + // handle any user controls here... + + return NULL; + } + +/** + * Handle resizing of the container. This implementation will lay out + * full-sized controls like list boxes for any screen size, and will layout + * labels, editors, etc. to the size they were given in the UI designer. + * This code will need to be modified to adjust arbitrary controls to + * any screen size. + */ +void CPjsuaContainer::SizeChanged() + { + CCoeControl::SizeChanged(); + LayoutControls(); + + // Align the image + int x = (Size().iWidth - iImage1->Size().iWidth) / 2; + int y = (Size().iHeight - iImage1->Size().iHeight) / 2; + iImage1->SetPosition(TPoint(x, y)); + + // Align the label + iLabel1->SetExtent(TPoint(0, Size().iHeight - iLabel1->Size().iHeight), + TSize(Size().iWidth, iLabel1->Size().iHeight)); + + // [[[ begin generated region: do not modify [Generated Contents] + + // ]]] end generated region [Generated Contents] + + } + +// [[[ begin generated function: do not modify +/** + * Layout components as specified in the UI Designer + */ +void CPjsuaContainer::LayoutControls() + { + iImage1->SetExtent( TPoint( 0, 0 ), TSize( 99, 111 ) ); + iLabel1->SetExtent( TPoint( 0, 196 ), TSize( 241, 27 ) ); + } +// ]]] end generated function + +/** + * Handle key events. + */ +TKeyResponse CPjsuaContainer::OfferKeyEventL( + const TKeyEvent& aKeyEvent, + TEventCode aType ) + { + // [[[ begin generated region: do not modify [Generated Contents] + + // ]]] end generated region [Generated Contents] + + if ( iFocusControl != NULL + && iFocusControl->OfferKeyEventL( aKeyEvent, aType ) == EKeyWasConsumed ) + { + return EKeyWasConsumed; + } + return CCoeControl::OfferKeyEventL( aKeyEvent, aType ); + } + +// [[[ begin generated function: do not modify +/** + * Initialize each control upon creation. + */ +void CPjsuaContainer::InitializeControlsL() + { + iImage1 = new ( ELeave ) CEikImage; + { + CFbsBitmap *bitmap, *mask; + AknIconUtils::CreateIconL( bitmap, mask, + KpjsuaFile, EMbmPjsuaPjsua, -1 ); + AknIconUtils::SetSize( bitmap, TSize( 99, 111 ), EAspectRatioPreserved ); + iImage1->SetPicture( bitmap ); + } + iImage1->SetAlignment( EHCenterVTop ); + iLabel1 = new ( ELeave ) CEikLabel; + iLabel1->SetContainerWindowL( *this ); + { + TResourceReader reader; + iEikonEnv->CreateResourceReaderLC( reader, R_PJSUA_CONTAINER_LABEL1 ); + iLabel1->ConstructFromResourceL( reader ); + CleanupStack::PopAndDestroy(); // reader internal state + } + + } +// ]]] end generated function + +/** + * Handle global resource changes, such as scalable UI or skin events (override) + */ +void CPjsuaContainer::HandleResourceChange( TInt aType ) + { + CCoeControl::HandleResourceChange( aType ); + SetRect( iAvkonViewAppUi->View( TUid::Uid( EPjsuaContainerViewId ) )->ClientRect() ); + // [[[ begin generated region: do not modify [Generated Contents] + // ]]] end generated region [Generated Contents] + + } + +/** + * Draw container contents. + */ +void CPjsuaContainer::Draw( const TRect& aRect ) const + { + // [[[ begin generated region: do not modify [Generated Contents] + CWindowGc& gc = SystemGc(); + gc.SetPenStyle( CGraphicsContext::ENullPen ); + TRgb backColor( 0,0,0 ); + gc.SetBrushColor( backColor ); + gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); + gc.DrawRect( aRect ); + + // ]]] end generated region [Generated Contents] + + } + +void CPjsuaContainer::PutMessageL( const char * msg ) +{ + if (!iLabel1) + return; + + TPtrC8 ptr(reinterpret_cast(msg)); + HBufC* buffer = HBufC::NewLC(ptr.Length()); + buffer->Des().Copy(ptr); + + iLabel1->SetTextL(*buffer); + iLabel1->DrawNow(); + + CleanupStack::PopAndDestroy(buffer); +} diff --git a/pjsip-apps/src/pjsua/symbian/src/pjsuaDocument.cpp b/pjsip-apps/src/pjsua/symbian/src/pjsuaDocument.cpp new file mode 100644 index 00000000..f349c6e8 --- /dev/null +++ b/pjsip-apps/src/pjsua/symbian/src/pjsuaDocument.cpp @@ -0,0 +1,57 @@ +/* +======================================================================== + Name : pjsuaDocument.cpp + Author : nanang + Copyright : Copyright (C) 2013 Teluu Inc. (http://www.teluu.com) + Description : +======================================================================== +*/ +// [[[ begin generated region: do not modify [Generated User Includes] +#include "pjsuaDocument.h" +#include "pjsuaAppUi.h" +// ]]] end generated region [Generated User Includes] + +/** + * @brief Constructs the document class for the application. + * @param anApplication the application instance + */ +CpjsuaDocument::CpjsuaDocument( CEikApplication& anApplication ) + : CAknDocument( anApplication ) + { + } + +/** + * @brief Completes the second phase of Symbian object construction. + * Put initialization code that could leave here. + */ +void CpjsuaDocument::ConstructL() + { + } + +/** + * Symbian OS two-phase constructor. + * + * Creates an instance of CpjsuaDocument, constructs it, and + * returns it. + * + * @param aApp the application instance + * @return the new CpjsuaDocument + */ +CpjsuaDocument* CpjsuaDocument::NewL( CEikApplication& aApp ) + { + CpjsuaDocument* self = new ( ELeave ) CpjsuaDocument( aApp ); + CleanupStack::PushL( self ); + self->ConstructL(); + CleanupStack::Pop( self ); + return self; + } + +/** + * @brief Creates the application UI object for this document. + * @return the new instance + */ +CEikAppUi* CpjsuaDocument::CreateAppUiL() + { + return new ( ELeave ) CpjsuaAppUi; + } + -- cgit v1.2.3