--- a/cbs/CbsServer/ServerSrc/CCbsReceiverHelper.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cbs/CbsServer/ServerSrc/CCbsReceiverHelper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -49,7 +49,9 @@
#include <AknSoftNotifier.h> // Soft Notification API
#include <e32property.h>
#include <coreapplicationuisdomainpskeys.h>
-#include <NcnListDomainPSKeys.h>
+// <-- QT PHONE START -->
+//#include <NcnListDomainPSKeys.h>
+// <-- QT PHONE END -->
#include <data_caging_path_literals.hrh>
#include "CbsLogger.h"
@@ -66,9 +68,9 @@
const TInt KCbsImmediateMessageIdInt = 313;
const TUid KCbsImmediateMessageId = { KCbsImmediateMessageIdInt };
-
-const TInt KCbsMessageTone = 2; // See SharedDataKeysVariant.h or NcnListInternalPSKeys.h
-
+// <-- QT PHONE START -->
+//const TInt KCbsMessageTone = 2; // See SharedDataKeysVariant.h or NcnListInternalPSKeys.h
+// <-- QT PHONE END -->
// DATA TYPES
// CbsUi application view ID's
enum TCbsUiViewIds
@@ -888,9 +890,13 @@
//
void CCbsReceiverHelper::PlayCbsTone()
{
+ // <-- QT PHONE START -->
+ /*
RProperty::Define( KPSUidNcnList, KNcnPlayAlertTone, RProperty::EInt,
ECapability_None , ECapabilityWriteDeviceData );
RProperty::Set( KPSUidNcnList, KNcnPlayAlertTone, KCbsMessageTone );
+ */
+ // <-- QT PHONE END-->
}
// ================= OTHER EXPORTED FUNCTIONS ==============
--- a/cbs/cbsui/AIF/CbsUiAppAif.rss Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains all the resources for the module.
-*
-*
-*/
-
-
-// INCLUDES
-
-#include <aiftool.rh>
-#include "CbsUiId.h"
-
-
-
-// RESOURCE DEFINITIONS
-
-/*
------------------------------------------------------------------------------
-
- AIF_DATA
-
- Standard Symbian OS application information structure.
-
------------------------------------------------------------------------------
-*/
-RESOURCE AIF_DATA
- {
- // App UID
- app_uid=KUidCbsUiappDef;
-
- // Number of icons
- num_icons=2;
-
- // Application capabilities
- embeddability=KAppNotEmbeddable;
-
- hidden = KAppIsHidden;
- }
-
-// End of File
--- a/cbs/cbsui/Group/CbsUiApp_caption.rss Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This file contains all the resources for the CbsUiApp.app
-*
-*
-*/
-
-
-// RESOURCE IDENTIFIER
-NAME CBSC // from CBS Caption
-
-// INCLUDES
-
-#include <apcaptionfile.rh>
-#include <cbsuiapp.loc>
-
-
-// RESOURCE DEFINITIONS
-
-
-RESOURCE CAPTION_DATA
- {
- caption = qtn_cb_title_cbs;
- shortcaption = qtn_cb_title_grid;
- }
-
-
-// End of File
--- a/cbs/cbsui/Group/CbsUiApp_reg.rss Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource file for cbs ui application.
-*
-*/
-
-
-#include <appinfo.rh>
-#include <cbsuiApp.rsg>
-#include <data_caging_paths_strings.hrh>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x101F4CD3
-
-RESOURCE APP_REGISTRATION_INFO
- {
- app_file = "Cbsuiapp";
- localisable_resource_file = APP_RESOURCE_DIR"\\CBSUIAPP";
- localisable_resource_id = R_CBSUIAPP_LOCALISABLE_APP_INFO;
- hidden = KAppIsHidden;
- embeddability=KAppNotEmbeddable;
- }
-
-// End of File
--- a/cbs/cbsui/Group/Cbsuiapp.hrh Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Enumerations for commands, control and view id's.
-*
-*
-*/
-
-
-
-
-#ifndef CBSUIAPP_HRH
-#define CBSUIAPP_HRH
-
-// CONSTANTS
-//
-enum TCbsUiCommands
- {
- ECbsUiappCmdSwitchOpen = 1,
- ECbsUiappCmdSwitchSubscribe,
- ECbsUiappCmdSwitchUnsubscribe,
- ECbsUiappCmdSwitchHotmark,
- ECbsUiappCmdSwitchUnhotmark,
- ECbsUiappCmdSwitchSettings,
- ECbsUiappCmdSwitchTopic,
- ECbsUiappCmdSwitchAddManually,
- ECbsUiappCmdSwitchAddFromIndex,
- ECbsUiappCmdSwitchEdit,
- ECbsUiappCmdSwitchDelete,
- ECbsUiappCmdSwitchDeleteAll,
- ECbsUiCmdCopyToClipboard,
- ECbsUiappCmdOkKey,
- ECbsUiappCmdTopicMenuRead,
- ECbsUiappCmdTopicMenuKeep,
- ECbsUiappCmdMessageDelete,
- ECbsUiappCmdMsgMenuKeep,
- ECbsUiappTopicViewReadMessage,
- ECbsUiappTopicViewKeepMessage,
- ECbsUiappTopicViewCmdGoToPrevTopic,
- ECbsUiappTopicViewCmdGoToNextTopic,
- ECbsUiappCmdMsgMenuDelete,
- ECbsUiappSettingsViewCmdChange,
- ECbsUiCmdFindItem,
- ECbsUiappCmdTopicMSKRead,
- ECbsUiappNullCmd
- };
-
-// CbsUi Control id's
-enum TCbsUiControlIds
- {
- ECbsUiAddFromIndexDlgLine = 1,
- ECbsUiLanguageDlg,
- ECbsMemoryFullNote,
- ECbsCannotSubscribeErrorNote,
- ECbsMessageKeptNote,
- ECbsMessageCopiedNote,
- ECbsChangeNumberErrorNote,
- ECbsLowMemoryErrorNote,
- ENewTopicAddedDlg
- };
-
-// CbsUi application view ID's
-enum TCbsUiViewIds
- {
- /// Names list view
- ECbsUiTopicViewId = 1,
- ECbsUiTopicListViewId,
- ECbsUiListAppColumnViewId,
- ECbsUiMsgViewId,
- ECbsUiAddFromIndexViewId,
- ECbsUiSettingsViewId
- };
-
-enum { EMaxTopicNumberLength = 3};
-
-#endif
-
-// End of File
--- a/cbs/cbsui/Group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* The build information file of Cell Broadcast Service
-*
-*
-*/
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-// Help exports
-#include "../help/group/bld.inf"
-
-PRJ_EXPORTS
-./cbsuiapp_stub.SIS /epoc32/data/z/system/install/cbsuiapp_stub.sis
-
-../rom/CbsUiApp.iby CORE_MW_LAYER_IBY_EXPORT_PATH(CbsUiApp.iby)
-
-../rom/CbsUiResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(CbsUiResources.iby)
-
-../loc/cbsuiapp.loc MW_LAYER_LOC_EXPORT_PATH(cbsuiapp.loc)
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
- OPTION TARGETFILE cbsuiapp.mif
- OPTION HEADERFILE cbsuiapp.mbg
- OPTION SOURCEFILE iconlist.txt
-END
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
- OPTION TARGETFILE cbsuiapp_aif.mif
- OPTION SOURCES -c8,8 qgn_menu_cb
-END
-
-PRJ_MMPFILES
-//gnumakefile cbsui_icons_scalable_dc.mk
-//gnumakefile cbsui_icons_aif_scalable_dc.mk
-../Group/cbsuiApp.mmp
-
-
-PRJ_TESTMMPFILES
-//../tsrc/CbsUiCVTTest.mmp
-
-
-// End of File
--- a/cbs/cbsui/Group/cbsuiApp.mmp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This is project specification file for the cbsuiapp.app
-*
-*
-*/
-
-#include <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-
-TARGET cbsuiApp.exe
-EPOCSTACKSIZE 0x5000
-TARGETTYPE exe
-
-UID 0x100039CE 0x101F4CD3
-
-VENDORID VID_DEFAULT
-CAPABILITY CAP_APPLICATION NetworkControl
-
-
-SOURCEPATH ../UiSrc
-
-SOURCE CCbsUiappAppUi.cpp
-SOURCE CCbsUiappApplication.cpp
-SOURCE CCbsUiappDocument.cpp
-SOURCE CCbsUiTopicListView.cpp
-SOURCE CCbsUiTopicListViewContainer.cpp
-SOURCE CCbsUiTopicView.cpp
-SOURCE CCbsUiTopicViewContainer.cpp
-SOURCE ccbsuisettingsviewcontainer.cpp
-SOURCE CCbsUiMsgView.cpp
-SOURCE CCbsUiMsgViewContainer.cpp
-SOURCE CCbsUiAddFromIndexDialog.cpp
-SOURCE CCbsUiSettingsMonitor.cpp
-SOURCE CCbsUiTopicListMonitor.cpp
-SOURCE CCbsUiSettingsView.cpp
-SOURCE CCbsUiListQueryDialog.cpp
-SOURCE CCbsUiLanguageSettingPage.cpp
-SOURCE CCbsUiEditTopicDlg.cpp
-SOURCE CbsUiUtility.cpp
-SOURCE CbsUiPanic.cpp
-SOURCE ccbsuiviewfactory.cpp
-SOURCE RCbsUi.cpp
-
-
-START RESOURCE ../Group/cbsuiApp.rss
-TARGETPATH APP_RESOURCE_DIR
-HEADER
-LANGUAGE_IDS
-END // RESOURCE
-
-START RESOURCE ../Group/CbsUiApp_reg.rss
-DEPENDS cbsuiapp.rsg
-TARGETPATH /private/10003a3f/apps
-END // RESOURCE
-
-USERINCLUDE . ../UiInc ../AIF
-SYSTEMINCLUDE ../../../inc
-USERINCLUDE ../loc
-
-// app layer used due to xSymbian header relocation
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY bafl.lib
-LIBRARY euser.lib
-LIBRARY apparc.lib
-LIBRARY cone.lib
-LIBRARY eikcore.lib
-LIBRARY eikcoctl.lib
-LIBRARY eikctl.lib
-LIBRARY avkon.lib
-LIBRARY cbsclient.lib
-LIBRARY eikdlg.lib
-LIBRARY etext.lib
-LIBRARY commonui.lib
-LIBRARY commonengine.lib
-LIBRARY EGUL.LIB
-LIBRARY FORM.LIB
-LIBRARY hlplch.lib // Help application
-LIBRARY FeatMgr.lib
-LIBRARY aknnotify.lib // Soft notifications
-LIBRARY sysutil.lib // FFS critical level check
-LIBRARY AknSkins.lib // Skins support
-library efsrv.lib // TParse
-LIBRARY centralrepository.lib
-LIBRARY cdlengine.lib
-LIBRARY AknLayout2Scalable.lib
-LIBRARY gdi.lib
-
-
-
-// End of File
--- a/cbs/cbsui/Group/cbsuiApp.rss Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1481 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource file for cbs ui application.
-*
-*
-*/
-
-
-// RESOURCE IDENTIFIER
-NAME LIST
-
-
-// INCLUDES
-#include <bldvariant.hrh>
-#include <eikon.rh>
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <avkon.hrh>
-#include <avkon.mbg>
-#include <avkon.loc>
-#include <cbsuiapp.mbg>
-#include <AvkonIcons.hrh> // AVKON_ICON_FILE( Path to avkon.mbm file )
-#include <appinfo.rh>
-#include "Cbsuiapp.hrh"
-#include <cbsuiapp.loc>
-
-
-#define cbs_image_library "Z:\\resource\\apps\\cbsuiapp.mbm"
-
-
-
-// ---------------------------------------------------------
-//
-// Standard resource file signature
-//
-// ---------------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE { }
-
-// ---------------------------------------------------------
-//
-// App caption and default filename
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF
- {
- buf = "Cbsuiapp";
- }
-
-// ---------------------------------------------------------
-//
-// App information
-//
-// ---------------------------------------------------------
-//
-RESOURCE EIK_APP_INFO
- {
- }
-
-
-//----------------------------------------------------
-//
-// r_cbsuiapp_localisable_app_info
-// Localisable app info
-//
-//----------------------------------------------------
-//
-RESOURCE LOCALISABLE_APP_INFO r_cbsuiapp_localisable_app_info
- {
- short_caption = qtn_cb_title_grid;
- caption_and_icon =
- CAPTION_AND_ICON_INFO
- {
- caption = qtn_cb_title_cbs;
-#ifdef __SCALABLE_ICONS
- number_of_icons = 1;
- icon_file = "Z:\\resource\\apps\\CBSUIAPP_aif.mif";
-#else // !__SCALABLE_ICONS
- number_of_icons = 2;
- icon_file = "Z:\\resource\\apps\\CBSUIAPP_aif.mbm";
-#endif // __SCALABLE_ICONS
- };
- }
-
-
-
-
-// RESOURCE DEFINITIONS
-// ---------------------------------------------------------
-//
-// r_cbsui_msgview
-// Message view.
-//
-// ---------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_cbsui_msgview
- {
- menubar = r_cbsui_msgview_menubar;
- cba = r_cbs_softkeys_options_back__contextoptions;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_msgview_menubar
-// Message view menu bar definition.
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_BAR r_cbsui_msgview_menubar
- {
- titles =
- {
- MENU_TITLE
- {
- menu_pane = r_cbsui_msgview_menu;
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_msgview_menu
-// Message view menu.
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_PANE r_cbsui_msgview_menu
- {
- items =
- {
- MENU_ITEM
- {
- command = ECbsUiappCmdMsgMenuKeep;
- txt = qtn_cb_cmd_keep_topic;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdMsgMenuDelete;
- txt = qtn_cb_cmd_del_msg;
- },
- MENU_ITEM
- {
- command = ECbsUiCmdCopyToClipboard;
- txt = qtn_cb_cmd_copy_clip;
- },
- MENU_ITEM
- {
- command = EAknCmdHelp;
- txt = qtn_options_help;
- },
- MENU_ITEM
- {
- command = EAknCmdExit;
- txt = qtn_cb_cmd_exit;
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_topicview
-// Topic view.
-//
-// ---------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_cbsui_topicview
- {
- menubar = r_cbsui_topicview_menubar;
- cba = r_cbs_softkeys_options_back__open;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_topicview_menubar
-// Topic view menu bar.
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_BAR r_cbsui_topicview_menubar
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane = r_cbsui_topicview_menu;
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_topicview_menu
-// Topic view menu.
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_PANE r_cbsui_topicview_menu
- {
- items=
- {
- MENU_ITEM
- {
- command = ECbsUiappCmdTopicMenuRead;
- txt=qtn_cb_cmd_msg_open;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdTopicMenuKeep;
- txt=qtn_cb_cmd_keep_topic;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdMessageDelete;
- txt=qtn_cb_cmd_del_msg;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = EAknCmdHelp;
- txt = qtn_options_help;
- },
- MENU_ITEM
- {
- command = EAknCmdExit;
- txt=qtn_cb_cmd_exit;
- }
- };
- }
-
-// ---------------------------------------------------------
-//
-// r_cbs_softkeys_options_exit__open
-// Topic list view softkeys.
-//
-// ---------------------------------------------------------
-//
-
-RESOURCE CBA r_cbs_softkeys_options_exit__open
- {
- flags = 0;
- buttons =
- {
- CBA_BUTTON {id=EAknSoftkeyOptions; txt=text_softkey_option;},
- CBA_BUTTON {id=EAknSoftkeyExit; txt= text_softkey_exit;},
- CBA_BUTTON {id=ECbsUiappCmdSwitchOpen; txt=qtn_msk_open;}
- };
- }
-
-// ---------------------------------------------------------
-//
-// r_cbs_softkeys_options_back__open
-// Topic view softkeys.
-//
-// ---------------------------------------------------------
-//
-
-RESOURCE CBA r_cbs_softkeys_options_back__open
- {
- flags = 0;
- buttons =
- {
- CBA_BUTTON {id=EAknSoftkeyOptions; txt=text_softkey_option;},
- CBA_BUTTON {id=EAknSoftkeyBack; txt= text_softkey_back;},
- CBA_BUTTON {id=ECbsUiappCmdTopicMSKRead; txt=qtn_msk_open;}
- };
- }
-
-// ---------------------------------------------------------
-//
-// r_cbs_softkeys_options_back__contextoptions
-// Message view context sensitive softkeys.
-//
-// ---------------------------------------------------------
-//
-
-RESOURCE CBA r_cbs_softkeys_options_back__contextoptions
- {
- flags = 0;
- buttons =
- {
- CBA_BUTTON {id=EAknSoftkeyOptions; txt=text_softkey_option;},
- CBA_BUTTON {id=EAknSoftkeyBack; txt= text_softkey_back;},
- CBA_BUTTON {id=EAknSoftkeyContextOptions; txt=text_softkey_option;}
- };
- }
-
-// ---------------------------------------------------------
-//
-// r_cbs_softkeys_options_back__change
-// Settings view softkeys.
-//
-// ---------------------------------------------------------
-//
-
-RESOURCE CBA r_cbs_softkeys_options_back__change
- {
- flags = 0;
- buttons =
- {
- CBA_BUTTON {id=EAknSoftkeyOptions; txt=text_softkey_option;},
- CBA_BUTTON {id=EAknSoftkeyBack; txt= text_softkey_back;},
- CBA_BUTTON {id=EAknSoftkeyChange; txt=qtn_msk_change;}
- };
- }
-
-// ---------------------------------------------------------
-//
-// r_cbsui_topiclistview
-// Topic list view.
-//
-// ---------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_cbsui_topiclistview
- {
- menubar = r_cbsui_topiclistview_menubar;
- cba = r_cbs_softkeys_options_exit__open;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_topiclistview_menubar
-// Topic list view menu bar.
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_BAR r_cbsui_topiclistview_menubar
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane = r_cbsui_topiclistview_menu;
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_topiclistview_menu
-// Topic list view menu.
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_PANE r_cbsui_topiclistview_menu
- {
- items=
- {
- MENU_ITEM
- {
- command = ECbsUiappCmdSwitchOpen;
- txt=qtn_cb_cmd_open;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdSwitchSubscribe;
- txt=qtn_cb_cmd_subscribe;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdSwitchUnsubscribe;
- txt=qtn_cb_cmd_unsubscribe;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdSwitchHotmark;
- txt=qtn_cb_cmd_hotmark;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdSwitchUnhotmark;
- txt=qtn_cb_cmd_unhotmark;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdSwitchTopic;
- cascade = r_cbsui_topic_menu;
- txt = qtn_cb_cmd_topic;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdSwitchSettings;
- txt=qtn_cb_cmd_settings;
- },
- MENU_ITEM
- {
- command = EAknCmdHelp;
- txt = qtn_options_help;
- },
- MENU_ITEM
- {
- command = EAknCmdExit;
- txt = qtn_cb_cmd_exit;
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_topic_menu
-// Topic sub menu.
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_PANE r_cbsui_topic_menu
- {
- items=
- {
- MENU_ITEM
- {
- command = ECbsUiappCmdSwitchAddManually;
- txt = qtn_cb_topic_add_man;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdSwitchAddFromIndex;
- txt = qtn_cb_topic_add_f_index;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdSwitchEdit;
- txt = qtn_cb_topic_edit;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdSwitchDelete;
- txt = qtn_cb_topic_delete;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdSwitchDeleteAll;
- txt = qtn_cb_topic_delete_all;
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_delete_topic_confirmation_query
-// Query for topic deletion.
-//
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_delete_topic_confirmation_query
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_YES_NO;
-
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- label = qtn_cb_query_delete_topic;
- };
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_delete_msg_confirmation_query
-// Query for message deletion.
-//
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_delete_msg_confirmation_query
- {
- flags = EGeneralQueryFlags;
-
- buttons = R_AVKON_SOFTKEYS_YES_NO;
-
- items=
- {
- DLG_LINE
- {
- type=EAknCtQuery;
- id=EGeneralQuery;
- control= AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationQueryLayout;
- label = qtn_cb_note_delete_msg;
- };
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_delete_all_topics_confirmation_query
-// Query for all topics deletion.
-//
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_delete_all_topics_confirmation_query
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_YES_NO;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- label = qtn_cb_query_delete_all_topic;
- };
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbs_add_from_index_dialog
-// Add from index dialog.
-//
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_cbs_add_from_index_dialog
- {
- flags = EEikDialogFlagNoDrag | EEikDialogFlagNoTitleBar |
- EEikDialogFlagFillAppClientRect |
- EEikDialogFlagCbaButtons | EEikDialogFlagWait;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL__MARK;
- items =
- {
- DLG_LINE
- {
- id = ECbsUiAddFromIndexDlgLine;
- type = EAknCtSingleGraphicListBox;
- itemflags = EEikDlgItemTakesEnterKey | EEikDlgItemOfferAllHotKeys;
- control = LISTBOX
- {
- flags = EAknListBoxMultiselectionList;
- height = 5;
- };
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_qtn_cb_title_cbs
-// Text for cbs title pane.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TITLE_PANE r_qtn_cb_title_cbs
- {
- txt = qtn_cb_title_cbs;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_qtn_cb_title_add_topics
-// Title pane for add from index dialog.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TITLE_PANE r_qtn_cb_title_add_topics
- {
- txt = qtn_cb_title_addtopics;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_qtn_cb_ad_sel_top
-// In add from index dialog. (Select topics...)
-//
-// ---------------------------------------------------------
-//
-RESOURCE NAVI_DECORATOR r_qtn_cb_ad_sel_top
- {
- type = ENaviDecoratorLabel;
- control = NAVI_LABEL
- {
- txt = qtn_cb_ad_sel_top;
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cb_tl_no_new_messages
-// Text No new messages.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_cb_tl_no_new_messages
- {
- buf = qtn_cb_tl_no_new_messages;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cb_tl_one_new_message
-// Text One new message.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_cb_tl_one_new_message
- {
- buf = qtn_cb_tl_one_new_message;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cb_tl_new_messages
-// Text ´%N new messages.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_cb_tl_new_messages
- {
- buf = qtn_cb_tl_new_messages;
- }
-
-/******* NOTES ******/
-
-
-// ---------------------------------------------------------
-//
-// r_text_note_msg_to_clip
-// Note text.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_note_msg_to_clip
- {
- buf = qtn_cb_note_msg_to_clip;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_note_number_error
-// Note text.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_note_number_error
- {
- buf = qtn_cb_note_change_number;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_note_memory_full_error
-// Note text.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_note_memory_full_error
- {
- buf = qtn_cb_note_mem_full_del_msg;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_note_cannot_subscribe_error
-// Note text.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_note_cannot_subscribe_error
- {
- buf = qtn_cb_note_can_not_subs;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_note_msg_kept
-// Note text.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_note_msg_kept
- {
- buf = qtn_logs_info_msg_kept;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_note_new_topic_added
-// Note text.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_note_new_topic_added
- {
- buf = qtn_cb_note_new_to_added;
- }
-
-/******* NOTES END ******/
-
-
-
-// ---------------------------------------------------------
-//
-// r_edit_topic_query
-// Dialog for editing topic.
-//
-// ---------------------------------------------------------
-//
-RESOURCE DIALOG r_edit_topic_query
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtMultilineQuery;
- id = EMultilineFirstLine;
- control = AVKON_DATA_QUERY
- {
- layout = EMultiDataFirstEdwinAllowEmpty;
- label = qtn_cb_litext_name;
- control = EDWIN
- {
- flags = 0;
- width = 5;
- lines = 1;
- maxlength = 20;
- };
- };
- },
- DLG_LINE
- {
- type = EAknCtMultilineQuery;
- id = EMultilineSecondLine;
- control = AVKON_DATA_QUERY
- {
- layout = EMultiDataSecondEdwin;
- label = qtn_cb_litext_number;
- control = EDWIN
- {
- flags = 0;
- avkon_flags = EAknEditorFlagSupressShiftMenu;
- width = 5;
- lines = 1;
- maxlength = EMaxTopicNumberLength;
- allowed_input_modes = EAknEditorNumericInputMode;
- default_input_mode = EAknEditorNumericInputMode;
- numeric_keymap = EAknEditorPlainNumberModeKeymap;
- };
- };
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_msg_reader
-// Resource definition for message reading component.
-//
-// ---------------------------------------------------------
-//
-RESOURCE RTXTED r_msg_reader
- {
- width = 176;
- height = 142; // 144 for whole window
- numlines = 7;
-
- flags = EEikEdwinNoHorizScrolling | EEikEdwinNoAutoSelection |
- EEikEdwinWidthInPixels | EEikEdwinInclusiveSizeFixed;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_plural_topic_added
-// Topic count information
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_plural_topic_added
- {
- buf = qtn_cb_note_new_tos_added;
- }
-
-
-
-// ---------------------------------------------------------
-//
-// r_checkbox_icons
-// Array for check box icons
-//
-// ---------------------------------------------------------
-//
-RESOURCE AKN_ICON_ARRAY r_checkbox_icons
- {
- bmpfile = AVKON_ICON_FILE;
- icons =
- {
- AKN_ICON
- {
- iconId = EMbmAvkonQgn_indi_checkbox_on;
- maskId = EMbmAvkonQgn_indi_checkbox_on_mask;
- },
- AKN_ICON
- {
- iconId = EMbmAvkonQgn_indi_checkbox_off;
- maskId = EMbmAvkonQgn_indi_checkbox_off_mask;
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbs_image_library
-// Locations to the cbs image library.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_cbs_image_library
- {
- buf = cbs_image_library;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_msg_keep_and_delete_context_menubar
-// Context menu bar for delete and keep.
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_BAR r_cbsui_msg_keep_and_delete_context_menubar
- {
- titles=
- {
- MENU_TITLE
- {
- menu_pane = r_cbsui_msg_keep_and_delete_context_menu;
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_msg_keep_and_delete_context_menu
-// Context menu for keep and delete.
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_PANE r_cbsui_msg_keep_and_delete_context_menu
- {
- items=
- {
- MENU_ITEM
- {
- command = ECbsUiappCmdMsgMenuKeep;
- txt = qtn_cb_cmd_keep_topic;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = ECbsUiappCmdMsgMenuDelete;
- txt = qtn_cb_cmd_del_msg;
- flags = EEikMenuItemSpecific;
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_msg_delete_context_menubar
-// Context menu bar for delete.
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_BAR r_cbsui_msg_delete_context_menubar
- {
- titles =
- {
- MENU_TITLE
- {
- menu_pane = r_cbsui_msg_delete_context_menu;
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_msg_delete_context_menu
-// Context menu pane for delete.
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_PANE r_cbsui_msg_delete_context_menu
- {
- items=
- {
- MENU_ITEM
- {
- command = ECbsUiappCmdMsgMenuDelete;
- txt = qtn_cb_cmd_del_msg;
- flags = EEikMenuItemSpecific;
- }
- };
- }
-
-
-/**
-* Settings view.
-*/
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_settingsview
-// Settings view.
-//
-// ---------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_cbsui_settingsview
- {
- menubar = r_cbsui_settingsview_menubar;
- cba = r_cbs_softkeys_options_back__change;
- }
-
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_settingsview_menubar
-// Settings view.
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_BAR r_cbsui_settingsview_menubar
- {
- titles =
- {
- MENU_TITLE
- {
- menu_pane = r_cbsui_settingsview_file_menu;
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbsui_settingsview_file_menu
-// Settings view.
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_PANE r_cbsui_settingsview_file_menu
- {
- items=
- {
- MENU_ITEM
- {
- command = ECbsUiappSettingsViewCmdChange;
- txt = qtn_mce_settings_change;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- {
- command = EAknCmdHelp;
- txt = qtn_options_help;
- },
- MENU_ITEM
- {
- command = EAknCmdExit;
- txt = qtn_mce_settings_exit;
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// cbs_long_array
-// Array for LONG items.
-//
-// ---------------------------------------------------------
-//
-
-STRUCT CBS_LONG_ARRAY
- {
- LONG elements[];
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbs_date_format_array
-// Array for date and time formats, which are added
-// to the end of each CBS message and in this order.
-// ---------------------------------------------------------
-//
-RESOURCE CBS_LONG_ARRAY r_cbs_date_format_array
- {
- elements =
- {
- R_QTN_DATE_USUAL,
- R_QTN_TIME_USUAL
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_reception
-// Text reception on.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_reception
- {
- buf = qtn_mce_settings_cb_reception;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_topic_detection
-// Text Topic detection.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_topic_detection
- {
- buf = qtn_mce_settings_cb_topic;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_reception_on
-// Text reception on.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_reception_on
- {
- buf = " \t"qtn_mce_settings_cb_reception"\t\t"qtn_mce_settings_cb_re_on;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_reception_off
-// Text reception off.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_reception_off
- {
- buf = " \t"qtn_mce_settings_cb_reception"\t\t"qtn_mce_settings_cb_re_off;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_detection_on
-// Text detection on.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_detection_on
- {
- buf = " \t"qtn_mce_settings_cb_topic"\t\t"qtn_mce_settings_cb_topic_detection_on;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_detection_off
-// Text detection off.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_detection_off
- {
- buf = " \t"qtn_mce_settings_cb_topic"\t\t"qtn_mce_settings_cb_topic_detection_off;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_language
-// Text language.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_language
- {
- buf = " \t"qtn_mce_settings_cb_language"\t\t";
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_language_all
-// Text Language all.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_language_all
- {
- buf = " \t"qtn_mce_settings_cb_language"\t\t"qtn_mce_settings_cb_all;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_language_selected
-// Text language selected.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_language_selected
- {
- buf = " \t"qtn_mce_settings_cb_language"\t\t"qtn_mce_settings_cb_selected;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_text_language_other
-// Text Language Other.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_language_other
- {
- buf = " \t"qtn_mce_settings_cb_language"\t\t"qtn_mce_settings_cb_other;
- }
-
-
-
-
-// ---------------------------------------------------------
-//
-// r_listbox_language
-// List box for languages.
-//
-// ---------------------------------------------------------
-//
-RESOURCE LISTBOX r_listbox_language
- {
- flags = EEikListBoxMultipleSelection;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_language_setting_page
-// Dialog for the All and Selected values.
-//
-// ---------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_language_setting_page
- {
- label = qtn_mce_settings_cb_language;
- softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL;
- type = EAknSetListBox;
- editor_resource_id = r_listbox_language;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_on_off_setting_page
-// Dialog for the All, Selected and Other.
-//
-// ---------------------------------------------------------
-//
-RESOURCE AVKON_SETTING_PAGE r_on_off_setting_page
- {
- label = qtn_mce_settings_cb_reception;
- softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL;
- type = EAknSetListBox;
- editor_resource_id = r_listbox_language;
- }
-
-
-
-// ---------------------------------------------------------
-//
-// r_language_multiselection_list_query
-// Resource structure for CCbsUiListQueryDialog.
-//
-// ---------------------------------------------------------
-//
-RESOURCE AVKON_MULTISELECTION_LIST_QUERY r_language_multiselection_list_query
- {
- softkeys = R_AVKON_SOFTKEYS_OK_CANCEL__MARK;
-
- items =
- {
- AVKON_MULTISELECTION_LIST_QUERY_DLG_LINE
- {
- control = AVKON_LIST_QUERY_CONTROL
- {
- listtype = EAknCtSingleGraphicPopupMenuListBox;
- listbox = AVKON_MULTISELECTION_LIST_QUERY_LIST
- {
- flags = EAknListBoxMultiselectionList | EAknListBoxPointerMultiselectionList;
- array_id = r_cbs_languages_array;
- };
- heading = qtn_mce_settings_cb_quest_langu;
- };
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbs_languages_array
-// Array for languages.
-//
-// ---------------------------------------------------------
-//
-RESOURCE ARRAY r_cbs_languages_array
- {
- items =
- {
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_german;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_english;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_italian;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_french;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_spanish;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_dutch;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_swedish;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_danish;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_portuguese;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_finnish;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_norwegian;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_greek;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_turkish;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_hungarian;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_polish;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_czech;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_hebrew;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_arabic;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_russian;
- },
- LBUF
- {
- txt = "1\t" qtn_mce_settings_cb_icelandic;
- }
- };
- }
-
-
-
-// ---------------------------------------------------------
-//
-// r_cbs_language_setting_page_array
-// Array for languages.
-//
-// ---------------------------------------------------------
-//
-RESOURCE ARRAY r_cbs_language_setting_page_array
- {
- items =
- {
- LBUF
- {
- txt = qtn_mce_settings_cb_all;
- },
- LBUF
- {
- txt = qtn_mce_settings_cb_selected;
- },
- LBUF
- {
- txt = qtn_mce_settings_cb_other;
- }
- };
- }
-
-
-// ---------------------------------------------------------
-//
-// r_cbs_on_off_array
-// Array for on and off values.
-//
-// ---------------------------------------------------------
-//
-RESOURCE ARRAY r_cbs_on_off_array
- {
- items =
- {
- LBUF
- {
- txt = qtn_mce_settings_cb_re_on;
- },
- LBUF
- {
- txt = qtn_mce_settings_cb_re_off;
- }
- };
- }
-
-
-
-// ---------------------------------------------------------
-//
-// r_cbs_topic_detection_on_off_array
-// Array for topic detection on and off values.
-//
-// ---------------------------------------------------------
-//
-RESOURCE ARRAY r_cbs_topic_detection_on_off_array
- {
- items =
- {
- LBUF
- {
- txt = qtn_mce_settings_cb_topic_detection_on;
- },
- LBUF
- {
- txt = qtn_mce_settings_cb_topic_detection_off;
- }
- };
- }
-
-
-
-// ---------------------------------------------------------
-//
-// r_message_location_in_topic
-// Text in navi pane in message view.
-//
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_message_location_in_topic
- {
- buf = qtn_cb_msg_message;
- }
-
-
-
-// ---------------------------------------------------------
-//
-// r_qtn_offline_not_possible
-// Error note text when offline mode is on and user try
-// to set reception on.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_offline_not_possible
- {
- buf = qtn_offline_not_possible;
- }
-
-
-// ---------------------------------------------------------
-//
-// r_qtn_offline_not_possible_sap
-// The note that is shown when the user attempts to connect
-// the network when in SIM Access Profile mode.
-//
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_offline_not_possible_sap
- {
- buf = qtn_offline_not_possible_sap;
- }
-
-
-// End of File
--- a/cbs/cbsui/Group/cbsui_icons_aif_bitmaps.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-#
-# Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-
-TARGETDIR=$(ZDIR)\system\apps\cbsuiapp
-ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp_aif.mbm
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_cb_cxt.bmp \
- /c8,8 qgn_menu_cb_lst.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/cbs/cbsui/Group/cbsui_icons_aif_bitmaps_dc.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-#
-# Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp_aif.mbm
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# 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.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_cb_cxt.bmp \
- /c8,8 qgn_menu_cb_lst.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
-
\ No newline at end of file
--- a/cbs/cbsui/Group/cbsui_icons_aif_scalable.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-#
-# Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-
-TARGETDIR=$(ZDIR)\system\apps\cbsuiapp
-ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp_aif.mif
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_cb.svg
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/cbs/cbsui/Group/cbsui_icons_aif_scalable_dc.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-#
-# Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp_aif.mif
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# 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.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_cb.svg
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
-
\ No newline at end of file
--- a/cbs/cbsui/Group/cbsui_icons_bitmaps.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-#
-# Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: Icon makefile for CBSUi application#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
- ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
- ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\system\data
-HEADERDIR=\epoc32\include
-ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp.mif
-HEADERFILENAME=$(HEADERDIR)\cbsuiapp.mbg
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# CBSUi icons
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
- /c8,1 qgn_indi_cb_hot_add.bmp \
- /c8,1 qgn_indi_cb_kept_add.bmp \
- /c8,8 qgn_menu_cb_2_cxt.bmp \
- /c8,8 qgn_menu_cb_cxt.bmp \
- /c8,1 qgn_prop_cb_msg.bmp \
- /c8,1 qgn_prop_cb_msg_unread.bmp \
- /c8,1 qgn_prop_cb_subs.bmp \
- /c8,1 qgn_prop_cb_subs_unread.bmp \
- /c8,1 qgn_prop_cb_unsubs.bmp \
- /c8,1 qgn_prop_cb_unsubs_unread.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(HEADERFILENAME)&& \
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/cbs/cbsui/Group/cbsui_icons_bitmaps_dc.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-#
-# Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp.mif
-
-HEADERDIR=\epoc32\include
-HEADERFILENAME=$(HEADERDIR)\cbsuiapp.mbg
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# 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, \s60\bitmaps.
-# The directory \s60\icons is included in the search only if the feature flag
-# __SCALABLE_ICONS is defined.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
- /c8,1 qgn_indi_cb_hot_add.bmp \
- /c8,1 qgn_indi_cb_kept_add.bmp \
- /c8,8 qgn_menu_cb_2_cxt.bmp \
- /c8,8 qgn_menu_cb_cxt.bmp \
- /c8,1 qgn_prop_cb_msg.bmp \
- /c8,1 qgn_prop_cb_msg_unread.bmp \
- /c8,1 qgn_prop_cb_subs.bmp \
- /c8,1 qgn_prop_cb_subs_unread.bmp \
- /c8,1 qgn_prop_cb_unsubs.bmp \
- /c8,1 qgn_prop_cb_unsubs_unread.bmp
-
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(HEADERFILENAME)&& \
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
-
\ No newline at end of file
--- a/cbs/cbsui/Group/cbsui_icons_scalable.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-#
-# Copyright (c) 2003-2008 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: Icon makefile for CBSUi application#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
- ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
- ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\system\data
-HEADERDIR=\epoc32\include
-ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp.mif
-HEADERFILENAME=$(HEADERDIR)\cbsuiapp.mbg
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# CBSUi icons
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
- /c8,1 qgn_indi_cb_hot_add.bmp \
- /c8,1 qgn_indi_cb_kept_add.bmp \
- /c8,8 qgn_menu_cb_2.svg \
- /c8,8 qgn_menu_cb.svg \
- /c8,1 qgn_prop_cb_msg.bmp \
- /c8,1 qgn_prop_cb_msg_unread.bmp \
- /c8,1 qgn_prop_cb_subs.bmp \
- /c8,1 qgn_prop_cb_subs_unread.bmp \
- /c8,1 qgn_prop_cb_unsubs.bmp \
- /c8,1 qgn_prop_cb_unsubs_unread.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(HEADERFILENAME)&& \
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/cbs/cbsui/Group/cbsui_icons_scalable_dc.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +0,0 @@
-#
-# Copyright (c) 2004-2008 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description:
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\z
-else
-ZDIR=\epoc32\data\z
-endif
-
-# ----------------------------------------------------------------------------
-# Configure these
-# ----------------------------------------------------------------------------
-
-TARGETDIR=$(ZDIR)\resource\apps
-ICONTARGETFILENAME=$(TARGETDIR)\cbsuiapp.mif
-
-HEADERDIR=\epoc32\include
-HEADERFILENAME=$(HEADERDIR)\cbsuiapp.mbg
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# 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, \s60\bitmaps.
-# The directory \s60\icons is included in the search only if the feature flag
-# __SCALABLE_ICONS is defined.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
- /c8,1 qgn_indi_cb_hot_add.bmp \
- /c8,1 qgn_indi_cb_kept_add.bmp \
- /c8,8 qgn_menu_cb_2.svg \
- /c8,8 qgn_menu_cb.svg \
- /c8,1 qgn_prop_cb_msg.bmp \
- /c8,1 qgn_prop_cb_msg_unread.bmp \
- /c8,1 qgn_prop_cb_subs.bmp \
- /c8,1 qgn_prop_cb_subs_unread.bmp \
- /c8,1 qgn_prop_cb_unsubs.bmp \
- /c8,1 qgn_prop_cb_unsubs_unread.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(HEADERFILENAME)&& \
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
-
\ No newline at end of file
--- a/cbs/cbsui/Group/cbsuiapp.pkg Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-; Languages
-&EN
-
-; Header
-#{"CbsUI patch"},(0x101F4CD3),10,1,0,TYPE=PU
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-;Files
-"\epoc32\release\armv5\urel\cbsuiapp.exe"-"!:\sys\bin\cbsuiapp.exe"
-"\epoc32\data\z\resource\apps\cbsuiapp.rsc"-"!:\resource\apps\cbsuiapp.rsc"
-"\epoc32\data\z\resource\apps\cbsuiapp_aif.mif"-"!:\resource\apps\cbsuiapp_aif.mif"
-"\epoc32\data\z\resource\apps\cbsuiapp.mif"-"!:\resource\apps\cbsuiapp.mif"
-"\epoc32\data\z\private\10003a3f\apps\cbsuiapp_reg.rsc"-"!:\private\10003a3f\import\apps\cbsuiapp_reg.rsc"
Binary file cbs/cbsui/Group/cbsuiapp_stub.SIS has changed
--- a/cbs/cbsui/Group/cbsuiapp_stub.pkg Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description:
-;
-; Languages
-&EN
-
-; Header
-#{"CbsUI"}, (0x101F4CD3), 1, 0, 0, TYPE=SA
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-;Files
-""-"z:\sys\bin\cbsuiapp.exe"
-""-"z:\resource\apps\cbsuiapp.rsc"
-""-"z:\resource\apps\cbsuiapp_aif.mif"
-""-"z:\resource\apps\cbsuiapp.mif"
-""-"z:\private\10003a3f\import\apps\cbsuiapp_reg.rsc"
--- a/cbs/cbsui/Group/iconlist.txt Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
--c8,1 qgn_indi_cb_hot_add
--c8,1 qgn_indi_cb_kept_add
--c8,8 qgn_menu_cb_2
--c8,8 qgn_menu_cb
--c8,1 qgn_prop_cb_msg
--c8,1 qgn_prop_cb_msg_unread
--c8,1 qgn_prop_cb_subs
--c8,1 qgn_prop_cb_subs_unread
--c8,1 qgn_prop_cb_unsubs
--c8,1 qgn_prop_cb_unsubs_unread
\ No newline at end of file
--- a/cbs/cbsui/UiInc/CCbsUIMsgView.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,362 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Class for viewing messages.
-*
-*
-*/
-
-
-#ifndef __CBSMSGVIEW_H
-#define __CBSMSGVIEW_H
-
-// INCLUDES
-#include <CbsCommon.h>
-#include <aknview.h>
-#include <AknNaviDecoratorObserver.h>
-#include "MCbsUiTopicMonitorObserver.h"
-#include "MSaveMessageController.h"
-#include "CbsUiDebug.h"
-
-
-// FORWARD DECLARATIONS
-class CCbsUiTopicView;
-class CCbsUiMsgViewContainer;
-class CAknNavigationDecorator;
-class CFindItemMenu;
-class MCbs;
-class CAknNavigationControlContainer;
-
-// CLASS DECLARATION
-/**
-* It is the class for viewing messages.
-*/
-class CCbsUiMsgView : public CAknView,
- public MCbsUiTopicMonitorObserver,
- public MSaveMessageController,
- public MAknNaviDecoratorObserver
- {
- public: // Constructors and destructor
-
- /**
- * Destructor.
- */
- ~CCbsUiMsgView();
-
- /**
- * Two-phased constructor.
- *
- * @param aServer Reference to cbs server.
- */
- static CCbsUiMsgView* NewL( MCbs& aServer );
-
- private: // From MEikMenuObserver
-
- /*
- * Adds find item and checks weather delete, keep or both of
- * them should be removed.
- *
- * @param aResourceId resource ID for identifying the menu pane being
- * initialised.
- * @param aMenuPane the in-memory representation of the menu pane.
- */
- void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
- private: // From MAknNaviDecoratorObserver
-
- /**
- * Method for handling touch events on navigator (navi pane)
- *
- * @param aEventID Id of the event.
- */
- void HandleNaviDecoratorEventL( TInt aEventID );
-
- public: // From MEikCommandObserver
-
- /**
- * Closes context menu if it exists.
- *
- * @param aCommandId Command id, which has been pressed.
- */
- void ProcessCommandL( TInt aCommandId );
-
- public: // From CAknView
-
- /**
- * Returns view id.
- *
- * @return View ID.
- */
- TUid Id() const;
-
- /**
- * Handles the command.
- *
- * @param aCommand menu command which user has selected from
- * option menu
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * Activates the message view. Actiovation depends on the message.
- * Three variations are: normal, immediate and
- * soft notification messages.
- *
- * @param aPrevViewId Previous view id.
- * @param aCustomMessageId With this different mechanism of activations
- * are used. Immediate message uses
- * KCbsImmediateMessageIdInt and normal message
- * uses KCbsUiCustomMessageId. If the message id
- * differ from these, the message is activated
- * by soft notification
- * @param aCustomMessage Message content.
- */
- void DoActivateL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
-
- /**
- * Deactivates the view and destroys needed objects.
- */
- void DoDeactivate();
-
- public: // From MSaveMessageController, these are called from
- // CbsUiUtility
-
- /**
- * Saves a message (the saved message won't be deleted to make
- * room for new messages).
- *
- * Return codes:
- * KErrNone Message is saved.
- * KErrGeneral Message not saved -- total maximum of saved
- * messages reached.
- * KErrNotFound Message not saved -- no message associated
- * with the given handle.
- * KErrDiskFull Message not saved -- FFS out of space.
- *
- * @param aHandle Handle to the message to be saved.
- * @return Return code.
- */
- TInt SaveMessage( const TCbsMessageHandle& aHandle );
-
- public:
-
- /**
- * Sets the message information to navi pane. e.g. Message 1/3.
- */
- void UpdateNaviPaneL();
-
- /**
- * When called, next message is displayed
- */
- void MoveToNextMessageL();
-
- /**
- * When called, previous message is displayed
- */
- void MoveToPreviousMessageL();
-
- /**
- * Topic list or topic messages are changed.
- *
- * @param aEvent reason for event
- * @param aTopicNumber topic number, which caused the event
- */
- void TopicListChangedL(
- TCbsTopicListEvent aEvent, TCbsTopicNumber aTopicNumber );
-
- /**
- * Handle changes in container when rect changes.
- * Update message and set new rect to container.
- */
- void HandleRectChangeInContainerL();
-
- private: // Data structures
-
- enum TMsgViewSetHandle
- {
- EToNext,
- EToPrevious
- };
-
- private: // New functions
-
- /**
- * Creates a find item dialog and pass a message to
- * it and gives the search case, what to look.
- *
- * @param aCommand search case
- */
- void DoSearchL( TInt aCommand );
-
- /**
- * Removes and destroys the context menu.
- */
- void CloseContextMenu();
-
- /**
- * Launch the context menu.
- */
- void LaunchContextMenuL();
-
- /**
- * Deletes a old message.
- */
- void DeleteOldMessage();
-
- /**
- * Loads a message from topic view.
- *
- * @return error code if Loading of message has been leaved and catched.
- */
- TInt DoLoadMessageL();
-
- /**
- * Activates topic view with defined topic number and message handle.
- *
- * @param aTopicNumber which topic the message belongs
- * @param aHandle which message handle is activating topic view.
- */
- void ActivateTopicViewL(
- TCbsTopicNumber aTopicNumber, TCbsMessageHandle aHandle);
-
- /**
- * Sets current message handle to aMessageHandle.
- *
- * @param aMessageHandle message handle
- */
- void SetCurrentMessageHandle( const TDesC8& aMessageHandle );
-
- /**
- * Loads current message buffer.
- */
- void LoadMessageL();
-
- /**
- * Adds date and time to a aMessage.
- *
- * @param aTime A time when message was received.
- * @param aMessage Address of actual pointer variable. So after
- * reallocation real message content is also changed.
- * @param aResourceArrayId Used resource array for date and time format.
- */
- void AddDateAndTimeL(
- const TInt64 aTime, HBufC** aMessage, TUint aResourceArrayId ) const;
-
- /**
- * Returns topic number of current message.
- *
- * @return current topic number
- */
- TCbsTopicNumber CurrentTopicNumber() const;
-
- /**
- * Gets message position in topic where th aHandle belongs.
- *
- * @param aHandle message handle
- * @param aPosition It will contain the message position in topic.
- * @param aTotal It will contain the total message count in topic,
- * @return error code
- */
- TInt GetMessagePosition(
- TCbsMessageHandle aHandle, TInt& aPosition, TInt& aTotal );
-
- /**
- * Sets aHandle to previous or next according to aTo
- * if possible.
- *
- * @param aTo sets aHandle to prev or next
- * @return ETrue if aHandle has been set.
- */
- TBool SetHandleTo( TCbsMessageHandle& aHandle, TMsgViewSetHandle aTo );
-
- /**
- * Deletes a message according to a aHandle.
- *
- * @param aHandle handle to be deleted.
- * @return ETrue if message was deleted
- */
- TBool DeleteMessageL( TCbsMessageHandle aHandle );
-
- /**
- * Activates topic list view.
- */
- void ActivateTopicListViewL() const;
-
- /**
- * Sets current message to newest hot marked message or
- * activates the topic list view.
- *
- * @return ETrue if new view is launched
- */
- TBool HandleSoftNotificationL();
-
- private:
-
- /**
- * C++ constructor.
- *
- * @param aServer Reference to cbs server.
- */
- CCbsUiMsgView( MCbs& aServer );
-
- /**
- * Two-phased constructor.
- */
- void ConstructL();
-
- private: // Data
-
- // message buffer
- HBufC* iMessage;
-
- // Container class
- CCbsUiMsgViewContainer* iContainer;
-
- // Navi pane variables
- CAknNavigationControlContainer* iNaviContainer;
-
- // NaviPaneDecorator
- CAknNavigationDecorator* iDecoratedLabel;
-
- // NaviPaneDecorator
- CAknNavigationDecorator* iPreviousDecoratedLabel;
-
- // Find item common component
- CFindItemMenu* iFindItemMenu;
-
- // Context sensitive menu, which appears when pushed ok key
- CEikMenuBar* iContextMenu;
-
- // To get a topic count and messages inside
- // a topic.
- MCbs& iServer;
-
- // Tells if the message is class 0.
- TBool iIsClass0;
-
- // Current message handle
- TCbsMessageHandle iCurrentHandle;
-
- // True if launched from the other application.
- TBool iFromOtherApplication;
-
- };
-
-#endif //__CBSMSGVIEW_H
-
-
-// End of file
--- a/cbs/cbsui/UiInc/CCbsUIMsgViewContainer.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,245 +0,0 @@
-/*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for the CCbsUiMsgViewContainer class.
-*
-*
-*/
-
-
-#ifndef __CCBSUIMSGVIEWCONTAINER_H
-#define __CCBSUIMSGVIEWCONTAINER_H
-
-// INCLUDES
-#include <coecntrl.h>
-
-
-// FORWARD DECLARATIONS
-class CCbsUiMsgView;
-class CEikRichTextEditor;
-class CRichText;
-class CCbsUiMsgView;
-class CEikButtonGroupContainer;
-class CEikScrollBarFrame;
-class CAknsBasicBackgroundControlContext;
-
-// CLASS DECLARATION
-/**
-* It is the container class viewing messages.
-*/
-class CCbsUiMsgViewContainer : public CCoeControl,
- public MEikScrollBarObserver
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- *
- * @param aMsgView Referenceo to message view.
- * @param aRect Rectangle, which container can use.
- */
- static CCbsUiMsgViewContainer* NewL(
- CCbsUiMsgView& aMsgView,
- const TRect& aRect );
-
- /**
- * Destructor.
- */
- ~CCbsUiMsgViewContainer();
-
- public: // From CCoeControl
-
- /**
- * Returns the numbers of components.
- *
- * @return Number of components in the container
- */
- TInt CountComponentControls() const;
-
- /**
- * Returns a component.
- *
- * @param aIndex component index which is required
- * @return required component
- */
- CCoeControl* ComponentControl( TInt aIndex ) const;
-
- /**
- * Sets new rectangle to the editor.
- */
- void SizeChanged();
-
- /**
- * Handles a needed key events.
- *
- * @param aKeyEvent what kind of key produced this event
- * @param aType Which kind of action produced this event
- * @return EKeyWasConsumed
- */
- TKeyResponse OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType );
-
- /**
- * Gets the control's help context.
- *
- * @param aContext The control's help context
- */
- void GetHelpContext(TCoeHelpContext& aContext) const;
-
- public: // New functions
-
- /**
- * Gets new message from messag view and sets the editor.
- */
- void UpdateMessageL( const TDesC& aMessage );
-
- /**
- * Returns the text in Rich Text editor.
- *
- * @return the text
- */
- CRichText* GetEditor() const;
-
- /**
- * Copies the message to clipboard.
- */
- void CopyToClipboardL() const;
-
- /**
- * From CCoeControl Receives notification on resource changes
- * @param aType type of the resource change
- */
- void HandleResourceChange( TInt aType );
-
- /**
- * From MEikScrollBarObserver Receives and handles
- * scroll bar events
- * @param aScrollBar A pointer to scrollbar which created the event
- * @param aEventType The event occured on the scroll bar
- */
- void HandleScrollEventL( CEikScrollBar* aScrollBar, TEikScrollEvent aEventType );
-
- private: // New functions
-
- /**
- * Sets the viewing component to read only mode
- *
- * @param aReadOnly value to set to
- */
- void SetReadOnly( TBool aReadOnly );
-
- /**
- * Sets the contents of viewing component
- *
- * @param aBuf A new content for editor.
- */
- void SetData16L( const TDesC& aBuf );
-
- /**
- * Sets the contents of viewing component
- *
- * @param aText Text to be inserted.
- */
- void SetDataContentL( CRichText& aText );
-
- /**
- * Created a new editor.
- *
- * @return Component for viewing
- */
- CEikRichTextEditor* CreateEditorL() const;
-
- /**
- * Clears the area between CEikRichTextEditor and Client regtangle.
- *
- * @param aRect Outer rect.
- */
- void Draw( const TRect& aRect ) const;
-
- /**
- * Initializes a variables, which are needed to create
- * scroll indicator. Has to be called every time the
- * content of the message has changed.
- */
- void InitializeMessageInfoL();
-
- /**
- * Creates scroll bar indicator.
- */
- void CreateScrollBarFrameL();
-
- /**
- * Updates the scroll indicator based on the iCurrentScreen and
- * information, which has been set in the InitializeMessageInfoL()
- */
- void UpdateScrollIndicatorL() const;
-
- /**
- * Updates the current screen position.
- *
- * @param aIncrease direction where to modify current screen
- */
- void UpdateCurrentScreen( TBool aIncrease );
-
- /**
- * Scrolls message up.
- */
- void ScrollMessageUpL();
-
- /**
- * Scrolls message down.
- */
- void ScrollMessageDownL();
-
- private:
-
- /**
- * Constructor.
- *
- * @param aListView reference to the msg view.
- */
- CCbsUiMsgViewContainer( CCbsUiMsgView& aListView );
-
- /**
- * Two-phased constructor.
- *
- * @param aRect Rect to be used by this container.
- */
- void ConstructL( const TRect& aRect );
-
- private: // Data
-
- // It is the view class
- CCbsUiMsgView& iMsgView;
-
- // It is the component for viewing message
- CEikRichTextEditor* iEditor;
-
- // ScrollBarFrame
- CEikScrollBarFrame* iSBFrame;
-
- // How many screens the message contains.
- TInt iNumberOfScreens;
-
- // Current message screen. It is updated every time
- // the page is changed.
- TInt iCurrentScreen;
-
- CAknsBasicBackgroundControlContext* iBackGroundControlContext;
-
- };
-
-
-#endif // __CCBSUIMSGVIEWCONTAINER_H
-
-// End of file
--- a/cbs/cbsui/UiInc/CCbsUiAddFromIndexDialog.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Dialog which shows topics, which are not yet
-* in the topic list view. Enables topics adding manually.
-*
-*
-*/
-
-
-#ifndef __CCBSADDFROMINDEXDIALOG_H
-#define __CCBSADDFROMINDEXDIALOG_H
-
-// INCLUDES
-#include <eikdialg.h>
-#include <CbsCommon.h>
-#include "CbsUiConstants.h"
-
-
-// FORWARD DECLARATIONS
-class MCbs;
-class CEikColumnListBox;
-class CAknNavigationDecorator;
-
-
-// CLASS DECLARATION
-
-
-/**
-* Class CCbsUiAddFromIndexDialog is used to add topics. Topics
-* are shown in listbox. User can select topics which will be added.
-*/
-class CCbsUiAddFromIndexDialog: public CEikDialog
- {
- public: // Constructors and destructor
-
- /**
- * C++ constructor.
- *
- * @param aServer Reference to cbs server.
- */
- CCbsUiAddFromIndexDialog( MCbs& aServer );
-
- /**
- * Destructor.
- */
- virtual ~CCbsUiAddFromIndexDialog();
-
- private: // From CEikDialog
-
- /**
- * Creates the controls, which are shown in this dialog.
- */
- void PreLayoutDynInitL();
-
- /**
- * Checks if the user has selected the ok softkey. In that case,
- * the marked topics are send to AddTopicL member function.
- *
- * @param aKeycode pressed key code
- * @return ETrue, to close the dialog
- */
- TBool OkToExitL( TInt aKeycode );
-
- private: // New functions
-
- /**
- * Parses IndexNumber from TopicInfo.
- *
- * @param aTopicInfo Topic information
- * @param aIndexNumber the pared index number
- * @return none
- */
- void GetIndexNumber(
- const TCbsTopicInfo& aTopicInfo ,
- TBuf<KTopicNumberWidth>& aIndexNumber) const;
-
- /**
- * Adds a Topic to the server.
- *
- * @param aTopicInfo Topic information
- * @return error code
- */
- TInt AddTopicL( const TCbsTopicInfo aTopicInfo );
-
- /**
- * Sets the icons to the listbox.
- */
- void SetIconsL() const;
-
- /**
- * Sets the topics to the listbox. Set Topic reads topic informations
- * from cbsserver.
- */
- void SetTopicsL();
-
- /**
- * Creates a title pane.
- */
- void CreateAddFromIndexTitlePaneL() const;
-
- private: // Data
-
- // List of handles
- typedef CArrayFixFlat< TCbsTopicInfo > TCbsTopicInfoHandleList;
-
- // pointer to a handle list
- TCbsTopicInfoHandleList* iHandles;
-
- // Server
- MCbs& iServer;
-
- // ListBox
- CEikColumnListBox* iListBox;
-
- /// Own: Navi pane control
- CAknNavigationDecorator* iNaviDecorator;
- };
-
-#endif // __CCBSADDFROMINDEXDIALOG_H
-
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiConfirmationNote.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Shows global confirmation note and instance of this class
-* has to be a member variable.
-*
-*
-*/
-
-
-#ifndef __CCbsUiConfirmationNote_h
-#define __CCbsUiConfirmationNote_h
-
-// INCLUDES
-#include <e32base.h>
-
-
-// FORWARD DECLARATIONS
-class CAknGlobalConfirmationQuery;
-
-// CLASS DECLARATION
-
-class CCbsUiConfirmationNote : public CBase
- {
- public: // Constructor and destructor
-
- /**
- * Constructor. Prohibited to make a instance.
- */
- CCbsUiConfirmationNote();
-
- /**
- * Destructor.
- */
- virtual ~CCbsUiConfirmationNote();
-
- public: // New functions
-
- /**
- * Shows global confirmation note, not enough memory...
- */
- void ShowGlobalConfirmationNoteL( CCoeEnv& aCoeEnv );
-
- private:
-
- // Own: Confirmation query
- CAknGlobalConfirmationQuery* iGlobalConfirmationQuery;
-
- // Forward declaration
- class CGlobalConfirmationQueryObserver;
-
- // Own: Confirmation query observer
- CGlobalConfirmationQueryObserver* iConfQueryObserver;
-
- };
-
-#endif // __CCbsUiConfirmationNote_h
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiEditTopicDlg.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for the CCbsUiEditTopicDlg class.
-*
-*
-*/
-
-
-#ifndef __CBS_UI_TOPIC_QUERY_H
-#define __CBS_UI_TOPIC_QUERY_H
-
-// INCLUDES
-#include <AknQueryDialog.h> // CAknMultiLineDataQueryDialog
-
-
-// FORWARD DECLARATIONS
-class CCbsUiTopicListView;
-
-
-// CLASS DECLARATION
-
-/**
-* Class CCbsUiEditTopicDlg implements a dialog for
-* Edit and Add topics.
-*/
-class CCbsUiEditTopicDlg : public CAknMultiLineDataQueryDialog
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- *
- * @param aDataText topic name
- * @param aDataText2 topic number
- * @param aTopicListView for adding a topic
- * @param aType EFalse is Edit and ETrue is Add query
- */
- static CCbsUiEditTopicDlg* NewL(
- TDes& aDataText,
- TDes& aDataText2,
- CCbsUiTopicListView& aTopicListView,
- TBool aType);
-
- /**
- * Destructor.
- */
- virtual ~CCbsUiEditTopicDlg();
-
- public: // From CAknNoteDialog
-
- /**
- * Adds or over writes topic. On error shows a error note.
- *
- * @param aButtonId button which has been selected
- */
- TBool OkToExitL( TInt aButtonId );
-
- // From CeikDialog
- /**
- * Handles changes required when switching to a specified line.
- *
- * @param aControlId The Id of the control being switched to.
- */
- void LineChangedL( TInt aControlId );
-
- /**
- * Handles a change to the control's resources.
- * @param aType A message UID value.
- */
- void HandleResourceChange( TInt aType );
-
-
- protected: // From CAknMultiLineDataQueryDialog
-
- /**
- * Changes left soft key to visible if number line is valid
- */
- void UpdateLeftSoftKeyL();
-
- private: // New functions
-
- /**
- * Sets cursor in the end of number line.
- */
- void SetCursorAndFocusL();
-
- private:
-
- /**
- * C++ constructor.
- *
- * @param aTopicListView for adding a topic
- * @param aType EFalse is Edit and ETrue is Add query
- */
- CCbsUiEditTopicDlg(
- CCbsUiTopicListView& aTopicListView,
- TBool aType );
-
- /**
- * Symbian OS constructor
- *
- * @param aDataText topic name
- * @param aDataText2 topic number
- */
- void ConstructL( TDes& aDataText, TDes& aDataText2 );
-
- private: // Data
-
- // to add or change a topic
- CCbsUiTopicListView& iTopicListView;
-
- // EFalse is Edit query and ETrue is Add query
- const TBool iType;
-
- // iUpdateLeftSoftKeyFirstTime is used when update first time Left soft key method.
- TBool iUpdateLeftSoftKeyFirstTime;
-
- };
-
-#endif // __CBS_UI_TOPIC_QUERY_H
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiLanguageSettingPage.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Shows which of the language setting has been selected,
-* All, Selected or Other.
-*
-*
-*/
-
-
-#ifndef __CBS_UI_LANGUAGE_SETTING_PAGE_H
-#define __CBS_UI_LANGUAGE_SETTING_PAGE_H
-
-// INCLUDES
-#include <aknradiobuttonsettingpage.h> // CAknRadioButtonSettingPage
-#include <CbsCommon.h>
-
-
-// FORWARD DECLARATIONS
-class MCbs;
-
-// CLASS DECLARATION
-
-/**
-* This settings page is popped up if a user selects a language setting
-* from the SettingsView.
-*/
-class CCbsUiLanguageSettingPage : public CAknRadioButtonSettingPage
- {
- public: // Constructor
-
- /**
- * C++ constructor.
- *
- * @param aRerourceID Resource id.
- * @param aCurrentSelectionIndex item to be selected
- * @param aItemArray array of items
- * @param aServer to update this level selections
- */
- CCbsUiLanguageSettingPage(
- TInt aResourceID,
- TInt& aCurrentSelectionIndex,
- CDesCArrayFlat* aItemArray,
- MCbs& aServer );
-
-
- protected: // From CEikDialog
-
- /**
- * Sets the selected languages into the server.
- *
- * @param aAccept selected key
- */
- TBool OkToExitL( TBool aAccept );
-
- protected: // From CCoeControl
-
- /*
- * Launches a CCbsUiLanguageDlg if EKeyOk is pressed and the focus
- * is on the selected.
- *
- * @param aKeyEvent what kind of key produced this event
- * @param aType Which kind of action produced this event
- */
- TKeyResponse OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType );
-
- private: // New functions
-
- /**
- * Gets languages from the server and marks selected languages to
- * aIndexArray.
- *
- * @param aIndexArray indexes of selected languages
- * @param aLanguages it will contain selected languages from the server
- */
- void GetLanguagesL( CArrayFix<TInt>& aIndexArray, TCbsDbLanguages& aLanguages );
-
- /**
- * Launches the language dialog.
- */
- void LaunchLanguageDialogL();
-
- /**
- * Sets selected languages into server according to aIndexArray.
- *
- * @param aIndexArray contains selected languages
- * @param aLanguages Contains information about previously selected
- * languages.
- */
- void SetLanguagesL( CArrayFix<TInt>& aIndexArray, TCbsDbLanguages& aLanguages );
-
- private: // Data
-
- // The server. This class doesn't own this.
- MCbs& iServer;
-
- // Current selection index
- TInt& iSelectionIndex;
-
- // To update the selection
- CDesCArrayFlat& iArray;
-
- // it should be possible to launch language dialog only once
- TInt iCurrentLaunchingId;
-
- };
-
-#endif // __CBS_UI_LANGUAGE_SETTING_PAGE_H
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiListQueryDialog.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This is a dialog which is used to shows different language options in the
-* settings view
-*
-*
-*/
-
-
-#ifndef __CCbsUiListQueryDialog_h
-#define __CCbsUiListQueryDialog_h
-
-// INCLUDES
-#include <aknlistquerydialog.h>
-
-
-// CLASS DECLARATION
-
-/**
-* This is a dialog, which can be initialized with selected items.
-*/
-class CCbsUiListQueryDialog : public CAknListQueryDialog
- {
- public: // Constructors and destructor
-
- /**
- * C++ constructor.
- *
- * @param aIndexArray Sets selection indexes and will contain
- * user changed indexes.
- */
- CCbsUiListQueryDialog( CArrayFix<TInt>& aIndexArray );
-
- private: // From CEikDialog
-
- /**
- * Sets selection indexes to list box.
- */
- void PostLayoutDynInitL();
-
- /**
- * If the user has pushed Ok, the dialog Stores the selected
- * values in to the server.
- *
- * @param aKeyCode key code
- * @return ETrue if dialog is closed
- */
- TBool OkToExitL( TInt aKeycode );
-
- private: // Data
-
- // contains selected indexes
- CArrayFix<TInt>& iIndexArray;
-
- };
-
-#endif // __CCbsUiListQueryDialog_h
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiSettingsDialog.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,57 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for the CCbsUisettingsDialog class.
-*
-*
-*/
-
-
-#ifndef __CCBSUISETTINGSDIALOG_H
-#define __CCBSUISETTINGSDIALOG_H
-
-// INCLUDES
-#include <eikdialg.h>
-#include <eiklbx.h>
-#include <aknappui.h>
-#include <RCbs.h>
-#include <CbsCommon.h>
-
-
-
-// CLASS DECLARATION
-/**
-* It is the container class viewing messages.
-*/
-
-class CCbsUiSettingsDialog : public CEikDialog, MEikListBoxObserver
- {
-public:
- ~CCbsUiSettingsDialog();
- CCbsUiSettingsDialog( RCbs* aServer );
-
-private:
- TBool OkToExitL(TInt aButtonId);
- void PreLayoutDynInitL();
- void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
- void HandleListViewActionL( CEikListBox* aListBox );
-
-private:
- CEikListBox* iInbox;
- RCbs* iServer;
-
- };
-
-#endif // __CCBSUISETTINGSDIALOG_H
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiSettingsMonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for the CCbsUiSettingsMonitor class.
-*
-*
-*/
-
-
-#ifndef CCBSUISETTINGSMONITOR_H
-#define CCBSUISETTINGSMONITOR_H
-
-// INCLUDES
-#include <e32base.h>
-
-#include <CbsCommon.h>
-
-
-// FORWARD DECLARATIONS
-class MCbs;
-class CCbsUiappAppUi;
-class MCbsUiSettingsObserver;
-
-// CLASS DEFINITIONS
-
-
-/**
-* Server notifies this class if settings are changed.
-*
-*/
-class CCbsUiSettingsMonitor : public CActive
- {
- public: // New functions
- /**
- * Create an instance of the class.
- *
- * @param aServer cbs server
- * @param aObserver settings observer
- */
- static CCbsUiSettingsMonitor* NewL(
- MCbs& aServer , MCbsUiSettingsObserver& aObserver );
-
- /**
- * Destructor.
- */
- ~CCbsUiSettingsMonitor();
-
- public: // From CActive
-
- /**
- * It is called when server notifies.
- */
- void RunL();
-
- /**
- * Cancels the request.
- */
- void DoCancel();
-
- private: // New functions
-
- /**
- * Issues the request..
- */
- void IssueRequest();
-
- private:
-
- /**
- * Constructor.
- *
- * @param aServer cbs server
- */
- CCbsUiSettingsMonitor(
- MCbs& aServer, MCbsUiSettingsObserver& aObserver );
-
- /**
- * Finalizes the construction.
- */
- void ConstructL();
-
- private: // Data
-
- // ETrue if request is continued.
- TBool iContinue;
-
- // Server subsession for settings
- MCbs& iServer;
-
- // Event which is registered to server
- TCbsSettingsEvent iEvent;
-
- // Observer who is interested about settings changes.
- MCbsUiSettingsObserver& iObserver;
- };
-
-#endif // CCBSUISETTINGSMONITOR_H
-
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiSettingsView.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for the CCbsSettingsView class.
-*
-*
-*/
-
-
-#ifndef __CBSSETTINGSVIEW_H
-#define __CBSSETTINGSVIEW_H
-
-// INCLUDES
-#include <aknsettingpage.h> // MAknSettingPageObserver
-#include <CbsCommon.h>
-#include <aknview.h>
-#include "MCbsUiSettingsObserver.h"
-
-
-
-// FORWARD DECLARATIONS
-class CCbsUiSettingsViewContainer;
-class CLanguageViewContainer;
-class CAknSettingPage;
-class MCbs;
-class CCbsUiLanguageSettingPage;
-class CAknNavigationDecorator;
-class CCbsUiSettingsMonitor;
-
-
-// CLASS DECLARATION
-
-/**
-* This class is used from messenge center.
-* With settings view cbs-settings
-*/
-class CCbsUiSettingsView : public CAknView,
- public MCbsUiSettingsObserver
- {
- public: // Constructors and destructor
-
- /**
- * C++ constructor.
- *
- * @param aServer cbs server
- */
- CCbsUiSettingsView( MCbs& aServer );
-
- /**
- * Two-phased constructor.
- *
- * @param aServer cbs server
- */
- static CCbsUiSettingsView* NewL( MCbs& aServer );
-
- /**
- * Destructor.
- */
- ~CCbsUiSettingsView();
-
- public: // From CAknView
-
- /**
- * Returns the ID of this view.
- *
- * @return ID
- */
- TUid Id() const;
-
- /**
- * Handles commands from options menu
- *
- * @param aCommand Command user has selected from options menu
- */
- void HandleCommandL( TInt aCommand );
-
- /**
- * WindowServer calls when the wiev is activated
- *
- * @param aPrevViewId Previous view id.
- * @param aCustomMessageId message id
- * @param aCustomMessage message content
- */
- void DoActivateL( const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
-
- /**
- * WindowServer calls when the wiev is deactivated
- */
- void DoDeactivate();
-
- public: // New functions
-
- /**
- * Called when navigation pane needs be updated
- */
- void UpdateNaviPaneL();
-
- /**
- * If there has come any changes to settings, then
- * this function will be called.
- */
- void UpdateSettingsL();
-
- /**
- * Sets the context pane icon. State can reception on or
- * off.
- */
- void UpdateContextPaneL();
-
- /**
- * Sets title pane text.
- */
- void UpdateTitlePaneL() const;
-
- public: // From MCbsUiSettingsObserver
-
- /**
- * Settings monitor calls this function when settings has been
- * changed.
- *
- * @param aEvent What kind of event caused the settings change
- */
- void SettingsChangedL( TCbsSettingsEvent aEvent );
-
- /**
- * Handle changes in container when rect changes.
- */
- void HandleRectChangeInContainer();
-
- private: // MEikMenuObserver
-
- /**
- * Delete help menu item if help is not in use
- *
- * @param aResourceId resource id of the menu
- * @param aMenuPane used to modify menu dynamically
- */
- void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
- private: // New functions
-
- /**
- * Activates topic list view.
- */
- void ActivateTopicListViewL() const;
-
- private:
-
- /**
- * By default Symbian OS constructor is private.
- */
- void ConstructL();
-
- private: // Data
-
- // Pointer to the container class
- CCbsUiSettingsViewContainer* iContainer;
-
- // NaviPane
- CAknNavigationDecorator* iDecoratedLabel;
-
- // Reference to the server session. It's owned by uiappappui
- MCbs& iServer;
-
- // Previous application and view which has louch this view
- TVwsViewId iPrevViewId;
-
- // True if launched from the other application.
- TBool iFromOtherApplication;
-
- // Own: Where the images are located.
- HBufC* iImageLibrary;
-
- // Settings Monitor
- CCbsUiSettingsMonitor* iSettingsMonitor;
-
- };
-
-#endif // __CBSSETTINGSVIEW_H
-
-
-// End of file
--- a/cbs/cbsui/UiInc/CCbsUiTopicListMonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for the CCbsUiTopicListMonitor class.
-*
-*
-*/
-
-
-#ifndef CCBSUITOPICLISTMONITOR_H
-#define CCBSUITOPICLISTMONITOR_H
-
-// INCLUDES
-#include <e32base.h>
-#include <CbsCommon.h>
-
-
-// FORWARD DECLARATIONS
-class MCbs;
-class MCbsUiTopicMonitorObserver;
-
-// CLASS DEFINITIONS
-
-
-/**
-* Monitors topic related events.
-*/
-class CCbsUiTopicListMonitor : public CActive
- {
- public: // New functions
-
- /**
- * Create an instance of the class.
- *
- * @param aServer cbs server
- */
- static CCbsUiTopicListMonitor* NewL( MCbs& aServer );
-
- /**
- * Destructor.
- */
- ~CCbsUiTopicListMonitor();
-
- /**
- * Issues the request.
- */
- void IssueRequest();
-
- public: // From CActive
-
- /**
- * It is called when server notifies.
- */
- void RunL();
-
- /**
- * Cancels the request.
- */
- void DoCancel();
-
- public: // New functions
-
- /**
- * Adds a observer to this monitor.
- *
- * @param aObserver Observer to be added.
- */
- void AddObserverL( MCbsUiTopicMonitorObserver* aObserver );
-
- private:
-
- typedef CArrayFixFlat<MCbsUiTopicMonitorObserver*>
- TCbsUiMonitorObservers;
-
- /**
- * Constructor.
- *
- * @param aServer cbs server
- */
- CCbsUiTopicListMonitor( MCbs& aServer );
-
- /**
- * Finalizes the construction.
- */
- void ConstructL();
-
- private: // Data
-
- // ETrue if request is active.
- TBool iContinue;
-
- // To issue the request.
- MCbs& iServer;
-
- // Observers who are interested in topic changes.
- // Monitor doesn't own the observers.
- TCbsUiMonitorObservers* iObservers;
-
- // Which topic handle the event is conserning.
- TCbsTopicNumber iTopicNumber;
-
- // What kind of event has been.
- TCbsTopicListEvent iEvent;
- };
-
-#endif // CCBSUITOPICLISTMONITOR_H
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiTopicListView.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,429 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This is the application main view. Shows all the topics which
-* has been received and their status: subscribed, hotmarked, new messages
-*
-*
-*/
-
-
-#ifndef __CCBSTOPICLISTVIEW_H
-#define __CCBSTOPICLISTVIEW_H
-
-// INCLUDES
-#include <aknview.h>
-#include <CbsCommon.h>
-#include "MCbsUiTopicMonitorObserver.h"
-#include "CbsUiDebug.h"
-
-// CONSTANTS
-const TInt KNumberOfStandardTopics = 17;
-
-
-// FORWARD DECLARATIONS
-
-class CSelectionList;
-class CListBoxNumbers;
-class CCbsUiTopicListViewContainer;
-class MCbs;
-class CAknNavigationDecorator;
-class CAknNavigationControlContainer;
-
-// CLASS DECLARATION
-
-/**
-* This is the application main view. Shows all the topics which
-* has been received and their status: subscribed, hotmarked, new messages
-*
-*/
-class CCbsUiTopicListView : public CAknView,
- public MCbsUiTopicMonitorObserver
- {
- private: // Data declaration
-
- enum TTopicListViewFocusState
- {
- ESetFocusToCurrentHandle,
- ESetFocusToFirstItem,
- ESetFocusToNewestItem,
- ENoFocusUpdate
- };
-
- public: // Constructors and destructor
-
- /**
- * Creates an instance of the class.
- *
- * @param aServer It is the server.
- * @return It returns a pointer to the created class.
- */
- static CCbsUiTopicListView* NewL( MCbs& aServer );
-
- /**
- * Destructor.
- */
- virtual ~CCbsUiTopicListView();
-
- public: // New functions
-
- /**
- * Calls the server to add or change a topic. Which is called
- * depends on the type of the dialog.
- *
- * @param aType is it a edit or add query. True is add query
- * @param aNumber topic number to add or change
- * @param aName topic name to add or change
- * @return error code if something goes wrong
- */
- TInt EditTopic(
- TBool aType,
- TCbsTopicNumber aNumber,
- const TCbsTopicName aName );
-
- /**
- * Adds a topic with specified number and name.
- *
- * @param aNumber It is the number of the topic.
- * @param aName It is the name of the topic.
- * @return a error code if the addition fails
- */
- TInt AddTopic(
- const TCbsTopicNumber& aNumber,
- const TCbsTopicName& aName );
-
- /**
- * Marks topic which is focused. This should be called only when
- * the Options menu is created and when the Ok (selection) key
- * has been pressed. Focus behaviour is based on this.
- */
- void MarkCurrentHandle();
-
- public: // From MCbsUiTopicMonitorObserver
-
- /**
- * Topic list or topic messages are changed.
- *
- * @param aEvent reason for event
- * @param aTopicNumber Topic number, which caused the event
- */
- void TopicListChangedL(
- TCbsTopicListEvent aEvent, TCbsTopicNumber aTopicNumber );
-
- public: // from CAknView
-
- /**
- * Returns the identifier of the view.
- *
- * @return It returns the identifier.
- */
- TUid Id() const;
-
- /**
- * Handles the options menu commands.
- *
- * @param aCommand command to be executed
- */
- void HandleCommandL( TInt aCommand );
-
- public: // New function
- /**
- * Handle changes in container when rect changes.
- */
- void HandleRectChangeInContainer();
-
- private: // from CAknView
-
- /**
- * Activates the view.
- *
- * @param aPrevViewId
- * @param aCustomMessageId
- */
- void DoActivateL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage );
-
- /**
- * Deactivates the view.
- */
- void DoDeactivate();
-
- /**
- * Checks new topic count, if it has been changed after
- * application switch.
- */
- void ViewActivatedL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,const
- TDesC8& aCustomMessage );
-
- void ViewDeactivated();
-
- private: // MEikMenuObserver
-
- /**
- * Sets the menu items according to the state of the topic, which
- * is focused on. Used when options menu is opened. Marks also
- * a current topic handle.
- *
- * @param aResourceId resource id of the menu
- * @param aMenuPane used to modify menu dynamically
- */
- void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
- private: // New functions
-
- /**
- * Sets current topic number according to aTopicNumber.
- *
- * @param aTopicNumber contains current topic number.
- */
- void SetCurrentTopicNumber( const TDesC8& aTopicNumber );
-
- /**
- * Sets current topic number according to aTopicNumber.
- *
- * @param aTopicNumber new current topic number.
- */
- void SetCurrentTopicNumber( const TCbsTopicNumber aTopicNumber );
-
- /**
- * Updates the topics information.
- */
- void ReloadTopicsL();
-
- /**
- * Prepares container for reloading.
- */
- void PrepareReloading();
-
- /**
- * Reloads topics from the server.
- */
- void ReloadL();
-
- /**
- * Ends reloading.
- */
- void EndReloadingL();
-
- /**
- * Sets focus after reload. Should be called after ReloadTopicsL().
- *
- * @param aFocusState focus is set according to this
- */
- void SetFocusAfterReload( TTopicListViewFocusState aFocusState );
-
- /**
- * Sets focus to aIndex.
- *
- * @param aIndex new focused index
- */
- void SetFocusToTopic( TInt aIndex );
-
- /**
- * Updates the focus according to Selection Service after deletion.
- *
- * @param aDeletedTopic Calculates the new focus according to deleted
- * topic.
- */
- void UpdateCurrentTopicAfterDeletion( TCbsTopicNumber aDeletedTopic );
-
- /**
- * Returns the total amount of topics.
- *
- * @return It is the amount of topics.
- */
- TInt TotalTopics() const;
-
- /**
- * Requests the view to move to the previous topic.
- */
- void MoveToPreviousTopic();
-
- /**
- * Writes a CBS to title pane.
- */
- void UpdateTitlePaneL() const;
-
- /**
- * Writes to navi pane a right message:
- * No new messages
- * One new message
- * %N new messages
- */
- void UpdateNaviPaneL();
-
- /**
- * Gets resouce id for text to be displayed.
- *
- * @param aUnreadMessages Number of unread messages.
- * @return resource id for text
- */
- TInt GetInfoResourceId( TInt aUnreadMessages ) const;
-
- /**
- * Creates a new decorated label to navi pane.
- *
- * @param aResourceId text resource id.
- * @param aUnreadMessages number of unread messages
- */
- void CreateNewLabelL( TInt aResourceId, TInt aUnreadMessages );
-
- /**
- * Launches an edit or add topic query dialog.
- *
- * @param aType type of the query.
- * ETrue is add and EFalse is edit query.
- * @param aTopicName name of the topic
- * @param aTopicNumber number of the topic
- */
- void ShowTopicQueryL(
- TBool aType,
- TDes& aTopicName,
- TDes& aTopicNumber );
-
- /**
- * Launchs the edit topic query with the right parameters.
- */
- void ShowEditTopicQueryL();
-
- /**
- * Checks if there has come new topics while this function was
- * last called. Shows a note how many new topics has been added,
- * since last been in TopicListView.
- */
- void CheckNewTopicCountL();
-
- /**
- * Returns the new topics count from server.
- *
- * @return new topic count
- */
- TInt GetNewTopicsCount();
-
- /**
- * Changes the topic name and number to the specified.
- *
- * @param aHandle It is the handle to the topic.
- * @param aNumber It is the new number of the topic.
- * @param aName It is the name of the topic.
- * @return error code in case fail
- */
- TInt UpdateTopic(
- const TCbsTopicNumber& aOldNumber,
- const TCbsTopicNumber& aNumber,
- const TCbsTopicName& aName );
-
- /**
- * Finds topic index by topic number.
- *
- * @param aIndex it will contain the topic index
- * @param aTopicNumber topic number
- * @return KErrNone if no errors
- */
- TInt FindTopicIndexByNumber(
- TInt& aIndex,
- const TCbsTopicNumber& aTopicNumber );
-
- /**
- * Activates the topic view.
- */
- void ActivateTopicViewL() const;
-
- /**
- * Activates settings view.
- */
- void ActivateSettingsViewL() const;
-
- /**
- * Activates a add from index dialog.
- */
- void ActivateAddFromIndexViewL();
-
- /**
- * Activates an idle object to show an information note.
- * Used in call back function.
- *
- * @param aNewTopics count of new topics
- * @return always KErrNone
- */
- static TInt ActivateBackgroundNoteL( TAny* aNewTopics );
-
- private:
-
- /**
- * It is type for topic handles array.
- */
- typedef CArrayFixFlat< TCbsTopicNumber > TCbsUiTopicNumberList;
-
- /**
- * Constructor.
- *
- * @param aServer connection to the server
- */
- CCbsUiTopicListView(MCbs& aServer);
-
- /**
- * Finalizes the construction.
- *
- * Note that it is assumed that the server exists for the life
- * time of the class.
- */
- void ConstructL();
-
- private: // Data
-
- // It is the control for the view.
- CCbsUiTopicListViewContainer* iContainer;
-
- // It is the label in status pane.
- CAknNavigationDecorator* iDecoratedLabel;
-
- // Pointer to server session. Owned by UiApp
- MCbs& iServer;
-
- // It is the array that contains the topic numbers.
- TCbsUiTopicNumberList* iTopicNumberList;
-
- // Handle that is focused.
- TCbsTopicNumber iCurrentTopicNumber;
-
- // For updating information about messages to navi pane.
- CAknNavigationControlContainer* iNaviPane;
-
- // iFocusState is set in HandleCommandL and focus is set in
- // TopicListChangedL.
- TTopicListViewFocusState iFocusState;
-
- // To see wheather it is needed to update navi pane.
- // if ETrue: navi pane is not updated
- TBool iAddFromIndexDialogIsActive;
-
- // for showing background note
- CIdle* iBackgroundNote;
-
- // Count of new topics.
- TInt iNewTopicsCount;
-
-
- };
-
-
-#endif // __CCBSTOPICLISTVIEW_H
-
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiTopicListViewContainer.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,268 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* TopicListViewContainer owns the list box which shows
-* topics.
-*
-*
-*/
-
-
-
-#ifndef __CCBSUITOPICLISTVIEWCONTAINER_H
-#define __CCBSUITOPICLISTVIEWCONTAINER_H
-
-// INCLUDES
-#include <coeccntx.h>
-#include <CbsCommon.h>
-#include <AknIconArray.h> // CAknIconArray
-
-// CONSTANTS
-const TInt KTopicNumberLength = 3;
-
-
-// FORWARD DECLARATIONS
-
-class CCbsUiTopicListView;
-class CEikColumnListBox;
-
-
-
-// CLASS DECLARATION
-
-/**
-* TopicListView container class
-*
-*/
-class CCbsUiTopicListViewContainer : public CCoeControl,
- public MEikListBoxObserver
- {
-
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- *
- * @param aListView to update view
- * @param aRect rectangle for which container can use
- */
- static CCbsUiTopicListViewContainer* NewL(
- CCbsUiTopicListView& aListView,
- const TRect& aRect );
-
- /**
- * Destructor.
- */
- virtual ~CCbsUiTopicListViewContainer();
-
- public: // New functions
-
- /**
- * Resests the array of list box. This should be called when
- * before ReloadOfferTopic.
- */
- void ReloadStarts() const;
-
- /**
- * Adds topic information to the topic.
- *
- * @param aTopic for setting name and topic number to the list box
- */
- void ReloadOfferTopicL( const TCbsTopic& aTopic ) const;
-
- /**
- * Handles a list box item addition. This should be called
- * when reload is done.
- */
- void ReloadEndsL();
-
- /**
- * Returns current position, i.e. Current listbox item.
- *
- * @return currentposition
- */
- TInt CurrentPosition() const;
-
- /**
- * Sets the current item index in the list box.
- *
- * @param aItemIndex new focused item index
- */
- void SetCurrentItemIndex( TInt aItemIndex ) const;
-
- public: // From CCoeControl
-
- /**
- * Returns the count of components.
- *
- * @return number of components
- */
- TInt CountComponentControls() const;
-
- /**
- * Returns a component.
- *
- * @param aIndex component index to return
- * @return requested component
- */
- CCoeControl* ComponentControl( TInt aIndex ) const;
-
- /**
- * Sets a new size to the list box.
- */
- void SizeChanged();
-
- /**
- * Informs that the focus is changed.
- * @param aDrawNow Contains the value that was passed to it by SetFocus()
- */
- void FocusChanged( TDrawNow aDrawNow );
-
- /**
- * Handles a needed key events.
- *
- * @param aKeyEvent what kind of key produced this event
- * @param aType Which kind of action produced this event
- * @return EKeyWasConsumed or EKeyWasNotConsumed
- */
- TKeyResponse OfferKeyEventL(
- const TKeyEvent& aKeyEvent,
- TEventCode aType );
-
- /**
- * Gets the control's help context.
- *
- * @param aContext The control's help context
- */
- void GetHelpContext( TCoeHelpContext& aContext ) const;
-
- public:
- /**
- *
- */
- void HandleResourceChange( TInt aType );
-
- public: // From MEikListBoxObserver
-
- /**
- * Handles list box events,
- *
- * @param aEventType The event identifier.
- */
- void HandleListBoxEventL( CEikListBox* /*aListBox*/,
- TListBoxEvent aEventType );
-
- private: // New functions
-
- /**
- * Indicates, which icon to use:
- * '0' = subscribed and there are no messages
- * '1' = subscribed and there are messages
- * '2' = not subscribed and there are no messages
- * '3' = not subscribed, but are messages
- *
- * @param aTopic to check the topic status
- * @return char which indicates, which icon to use.
- */
- TChar GetStatus( const TCbsTopic& aTopic ) const;
-
- /**
- * Sets topic index to given buffer.
- *
- * @param aTopic a topic, from which will be used topic number
- * @param aIndexNumber buffer to be filled with topic number
- */
- void GetIndexNumber(
- const TCbsTopic& aTopic, TBuf<KTopicNumberLength>& aIndexNumber ) const;
-
- private:
-
- /**
- * Constructor.
- *
- * @param aListView to update view
- */
- CCbsUiTopicListViewContainer(CCbsUiTopicListView& aListView);
-
- /**
- * Symbian OS constructor.
- *
- * @param aRect size of client area
- */
- void ConstructL(const TRect& aRect);
-
- /**
- * LoadIconsL
- *
- * Loads icons to CAknIconArray and set this iconarray
- * to list iListBox(CEikColumnListBox)
- */
- void LoadIconsL();
-
- /**
- * Append icon to icon array.
- *
- * @param aId Icon id
- * @param aIcons Icon array
- * @param aIconFileWithPath Icon file name with path
- * @param aIconGraphicsIndex Picture index.
- * @param aIconGraphicsMaskIndex Mask index.
- * @param aColorIcon Is icon colored
- */
- void AddIconL( TAknsItemID aId, CAknIconArray* aIcons,
- const TDesC& aIconFileWithPath,
- TInt aIconGraphicsIndex,
- TInt aIconGraphicsMaskIndex,
- TBool aColorIcon = EFalse );
-
-
- /**
- * Change bitmaps when skin changes.
- */
- void SkinBitmapChangesL( );
-
- /**
- * Construct icon
- *
- * @param aColourIcon Is icon a colour icon
- * @param aInstance Current skin instance
- * @param aID Icon ID
- * @param aFilename Icon file name with path
- * @param aFileBitmapId ID of the bitmap in the file
- * @param aFileMaskId ID of the mask in the file
- *
- * @return The constructed icon
- */
- CGulIcon* ConstructIconL( TBool& aColourIcon,
- MAknsSkinInstance* aInstance,
- const TAknsItemID& aID,
- const TDesC& aFilename,
- const TInt aFileBitmapId,
- const TInt aFileMaskId );
-
- private: // Data
-
- // Reference to TopicListView.
- CCbsUiTopicListView& iListView;
-
- // For data to be shown in the view.
- CEikColumnListBox* iListBox;
-
- };
-
-
-#endif // __CCBSUITOPICLISTVIEWCONTAINER_H
-
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiTopicView.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,391 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for the CCbsUiTopicView class.
-*
-*
-*/
-
-
-#ifndef __CCBSUITOPICVIEW_H
-#define __CCBSUITOPICVIEW_H
-
-// INCLUDES
-#include <aknview.h>
-#include <CbsCommon.h>
-#include <AknNaviDecoratorObserver.h>
-#include "MCbsUiTopicMonitorObserver.h"
-#include "MSaveMessageController.h"
-#include "CbsUiDebug.h"
-
-
-// FORWARD DECLARATIONS
-
-class CCbsUiTopicViewContainer;
-class MCbs;
-class CAknNavigationDecorator;
-class CAknNavigationControlContainer;
-
-// CLASS DEFINITIONS
-
-/**
-* For showing message in one topic.
-*/
-class CCbsUiTopicView : public CAknView,
- public MCbsUiTopicMonitorObserver,
- public MSaveMessageController,
- public MAknNaviDecoratorObserver
- {
- private: // Data declaration
-
- enum TTopicViewFocusState
- {
- ESetFocusToCurrentHandle,
- ESetFocusToFirstItem,
- ESetFocusToNewestMessage,
- ENoFocusUpdate
- };
-
- public: // Constructors and destructor
-
- /**
- * Creates instance of the class.
- *
- * @param aServer reference to the server
- * @return It is the created instance.
- */
- static CCbsUiTopicView* NewL( MCbs& aServer );
-
- /**
- * Destructor.
- */
- ~CCbsUiTopicView();
-
- public: // New functions
-
- /**
- * Marks the current handle. This should be called only when
- * the Options menu is created and when the Ok (selection) key
- * has been pressed.
- */
- void MarkCurrentlyFocusedHandle();
-
- /**
- * Handle changes in container when rect changes.
- */
- void HandleRectChangeInContainer();
-
- public: // From MCbsUiTopicMonitorObserver
-
- /**
- * Topic list or topic messages are changed.
- *
- * @param aEvent reason for event
- * @param aTopicNumber Topic number, which caused the event
- */
- void TopicListChangedL(
- TCbsTopicListEvent aEvent, TCbsTopicNumber aTopicNumber );
-
- public: // From MSaveMessageController
-
- /**
- * Saves a message (the saved message won't be deleted to make
- * room for new messages).
- *
- * Return codes:
- * KErrNone Message is saved.
- * KErrGeneral Message not saved -- total maximum of saved
- * messages reached.
- * KErrNotFound Message not saved -- no message associated
- * with the given handle.
- * KErrDiskFull Message not saved -- FFS out of space.
- *
- * @param aHandle Handle to the message to be saved.
- * @return Return code.
- */
- TInt SaveMessage( const TCbsMessageHandle& aHandle );
-
- private: // from MEikMenuObserver
-
- /**
- * Sets the options menu according to the current message.
- *
- * @param aResouceId Id of the resouce.
- * @param aMenuPane Pointer to the menu pane.
- */
- void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
- /**
- * Overrides MEikMenuObserver function SetEmphasis. Default
- * implementation has been copied here.
- *
- * Checks if the menu pane is showing. If the menu pane is not
- * showing, message is unlocked, because it has been locked when
- * the menu pane was created.
- *
- * @param aMenuControl pointer to the menu control
- * @param aEmphasis ETrue if menu is showing; otherwise EFalse
- */
- void SetEmphasis( CCoeControl* aMenuControl,TBool aEmphasis );
-
- public: // from CAknView
-
- /**
- * Returns the view id.
- */
- TUid Id() const;
-
- /**
- * To catch which command is selected before menu pane is closed.
- *
- * @param aCommand command to be processed
- */
- void ProcessCommandL( TInt aCommand );
-
- /**
- * Processes the command.
- *
- * @param aCommand It is the command to be processed.
- */
- void HandleCommandL( TInt aCommand );
-
- protected: // from CAknView
-
- /**
- * Activates the view.
- *
- * @param aPrevViewId previous view id
- * @param aCustomMessageId id of the custom message
- * @param aCustomMessage message data
- */
- void DoActivateL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId, const TDesC8& aCustomMessage );
-
- /**
- * Deactivates the view.
- */
- void DoDeactivate();
-
- private: // New functions
-
- /**
- * Sets focus to message, according to aIndex.
- *
- * @param aIndex Index of the focused message.
- */
- void SetFocusToMessage( TInt aIndex );
-
- /**
- * Reloads the messages.
- */
- void ReloadMessagesL();
-
- /**
- * Return the total amount of messages. ("loaded").
- *
- * @return total amount of messages
- */
- TInt TotalMessages() const;
-
- /**
- * Locks the message in the server. Only one message can locked
- * at same time. When new message is locked, old message is unlocked.
- *
- * @param aHandle Message handle to be locked.
- */
- TInt LockMessage( TCbsMessageHandle aHandle );
-
- /**
- * Unlocks the message from the server.
- */
- void UnLockMessage();
-
- /**
- * Updates the status pane.
- */
- void UpdateTitlePaneL( const TCbsTopic& aTopic ) const;
-
- /**
- * Updates the title pane.
- */
- void UpdateNaviPaneL( const TCbsTopic& aTopic );
-
- /**
- * Shows the message in a dialog.
- */
- void ShowMessageL();
-
- /**
- * Finds message index by handle.
- *
- * @param aIndex it will contain the topic index
- * @param aMessageHandle handle to the message
- * @return KErrNone if handle exists
- */
- TInt FindMessageIndexByHandle(
- TInt& aIndex,
- const TCbsMessageHandle& aMessageHandle );
-
- /**
- * Loads all message titles from the server in one topic and offers
- * those to the container.
- *
- * @param aTopicNumber Message headers will be loaded from this topic.
- */
- void LoadAllMessageTitlesL( TCbsTopicNumber aTopicNumber );
-
- /**
- * Prepares container for reloading.
- */
- void PrepareReloading();
-
- /**
- * Sets focus in the list box according to current topic number.
- * It also set the focus according to the view focus state.
- *
- * @param aFocusState indicates where to put the focus
- */
- void SetFocusAfterReloading( TTopicViewFocusState aFocusState );
-
- /**
- * Sets a new current handle according to aDeletedHandle.
- *
- * @param aDeletedHandle A handle to message which has been deleted.
- */
- void SetNewCurrentHandle( TCbsMessageHandle aDeletedHandle );
-
- /**
- * Sets current topic number according to aToPrev
- *
- * @param aToPrev Sets current topic number to previous if ETrue
- */
- void SetCurrentTopicNumber( TBool aToPrev );
-
- /**
- * Sets current topic number to aTopicNumberDes. It is used in
- * view activation.
- *
- * @param aTopicNumberDes new current topic number
- */
- void SetCurrentTopicNumberAndMessageHandle( const TDesC8& aTopicNumberDes );
-
- /**
- * Activates message view with the aMsgHandle.
- *
- * @param aMsgHandle A message handle to be activeted.
- */
- void ActivateMsgViewL( TCbsMessageHandle aMsgHandle ) const;
-
- /**
- * Activates topic list view with topic number.
- *
- * @param aTopicNumber sets the topic number in topic list view.
- */
- void ActivateTopicListViewL( TCbsTopicNumber aTopicNumber ) const;
-
- /**
- * Checks if it is possible to move to previous, next
- * or both directions.
- *
- * @param aToPrevious ETrue if it is possible to move to previous topic
- * @param aToNext ETrue if it is possible to move to next topic
- * @param error code
- */
- TInt CheckIfCanMove( TBool& aToPrevious, TBool& aToNext );
-
- /**
- * Activates the list box after changes. List box is owned by
- * the container.
- */
- void ActivateListBoxL();
-
- /**
- * Set the middle soft key text.
- *
- * @param aResourceId Resource to be read (text label)
- * @param aCommandId Command ID for MSK command
- */
- void SetMiddleSoftKeyLabelL( const TInt aResourceId, const TInt aCommandId );
-
- /**
- * Removes MSK command mappings.
- */
- void RemoveCommandFromMSK();
-
- private:
-
- /**
- * It defines the type for message handle lists.
- */
- typedef CArrayFixFlat< TCbsMessageHandle > TCbsUiMessageHandleList;
-
- /**
- * Constructor.
- *
- * @param aServer reference to the server
- * @param aApplication reference to the application
- */
- CCbsUiTopicView( MCbs& aServer );
-
- /**
- * Finalizes the construction.
- */
- void ConstructL();
-
- private: // From MAknNaviDecoratorObserver
-
- /**
- * Method for handling touch events on navigator (navi pane)
- *
- * @param aEventID Id of the event.
- */
- void HandleNaviDecoratorEventL( TInt aEventID );
-
- private: // Data
-
- // container to the CCbsUiTopicView
- CCbsUiTopicViewContainer* iContainer;
-
- // navi pane variables
- CAknNavigationControlContainer* iNaviContainer;
-
- // navi pane
- CAknNavigationDecorator* iDecoratedLabel;
-
- // navi pane
- CAknNavigationDecorator* iPreviousDecoratedLabel;
-
- // reference to server
- MCbs& iServer;
-
- // array for message handles
- TCbsUiMessageHandleList* iHandles;
-
- // handle to a message, which is focused on.
- TCbsMessageHandle iCurrentHandle;
-
- // Topic number, which this view is currently handling.
- TCbsTopicNumber iCurrentTopicNumber;
-
- // If this is ETrue, message can be unlocked and there fore
- // deleted. It is set EFalse in ProcessCommandL, ETrue
- // in DoActivateL and in HandleCommandL.
- TBool iCanUnlock;
-
- };
-
-
-#endif // __CCBSUITOPICVIEW_H
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiTopicViewContainer.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,250 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* CCbsUiTopicViewContainer is container for CCbsUiTopicView.
-* It has one control, a list box, which is showing information
-* about messages in one topic.
-*
-*
-*/
-
-
-#ifndef CCBSUITOPICVIEWCONTAINER_H
-#define CCBSUITOPICVIEWCONTAINER_H
-
-// INCLUDES
-#include <AknIconArray.h> // CAknIconArray
-#include <coecntrl.h>
-#include <eiklbo.h>
-#include <CbsCommon.h>
-
-
-// FORWARD DECLARATIONS
-
-class CSelectionList;
-class CEikColumnListBox;
-class CListBoxNumbers;
-class CFbsBitmap;
-class CCbsUiTopicView;
-
-
-// CLASS DEFINITIONS
-
-/**
-* Container for CCbsUiTopicView.
-*/
-class CCbsUiTopicViewContainer : public CCoeControl,
- public MEikListBoxObserver
- {
- public: // Constructors and destructor
-
- /**
- * Creates an instance of the class.
- *
- * @param aTopicView For handling key events.
- * @param aRect An area ment for container.
- */
- static CCbsUiTopicViewContainer* NewL(
- CCbsUiTopicView& aTopicView,
- const TRect& aRect );
-
- /**
- * Destructor.
- */
- ~CCbsUiTopicViewContainer();
-
- public: // New functions
-
- /**
- * Resets list box items. This should be called before ReloadOfferL.
- */
- void ReloadStarts() const;
-
- /**
- * During reloading offers the view a single message and the
- * beginning of it.
- *
- * Note that the text part must be less than 100 characters
- * (Well, there is only room for 20 characters, I suppose).
- *
- * @param aMessage It is the message.
- * @param aBuffer It is the beginning of the contents.
- */
- void ReloadOfferL( const TCbsMessage& aMessage, const TDesC& aBuffer ) const;
-
- /**
- * Handles a list box item addition. This should be called
- * when reload is done.
- */
- void ReloadEndsL();
-
- /**
- * Returns the current position.
- *
- * @return Current position in the list.
- */
- TInt CurrentPosition() const;
-
- /**
- * Sets current item index and draws.
- *
- * @param aItemIndex index to be focused
- */
- void SetCurrentItemIndex( TInt aItemIndex ) const;
-
- /**
- * Returns the list box
- *
- * @return list box
- */
- CEikColumnListBox* GetListBox();
-
- public: // from CCoeControl
-
- /**
- * Return the amount of controls.
- *
- * @return amount of controls.
- */
- TInt CountComponentControls() const;
-
- /**
- * Return a control.
- *
- * @param aIndex It is the index to the control.
- * @return It returns the control.
- */
- CCoeControl* ComponentControl( TInt aIndex ) const;
-
- /**
- * Sets a new size to the list box.
- */
- void SizeChanged();
-
- /**
- * Informs that the focus is changed.
- * @param aDrawNow Contains the value that was passed to it by SetFocus()
- */
- void FocusChanged( TDrawNow aDrawNow );
-
- /**
- * Offers a key to the view for handling.
- *
- * @param aKeyEvent what kind of key produced this event
- * @param aType Which kind of action produced this event
- * @return It tells whether the view consumed the keypress or not.
- */
- TKeyResponse OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType );
-
- /**
- * Gets the control's help context.
- *
- * @param aContext The control's help context
- */
- void GetHelpContext( TCoeHelpContext& aContext ) const;
-
- public:
- /**
- *
- */
- void HandleResourceChange( TInt aType );
-
- public: // From MEikListBoxObserver
-
- /**
- * Handles list box events.
- *
- * @param aEventType The event identifier.
- */
- void HandleListBoxEventL( CEikListBox* /*aListBox*/,
- TListBoxEvent aEventType );
-
- private:
-
- /**
- * Constructor.
- *
- * @param aTopicView It is the topic view.
- */
- CCbsUiTopicViewContainer( CCbsUiTopicView& aTopicView );
-
- /**
- * Finalizes the construction.
- *
- * @param aRect It is the client rectangle.
- */
- void ConstructL( const TRect& aRect );
-
- /**
- * LoadIconsL
- *
- * Loads icons to CAknIconArray and set this iconarray
- * to list iListBox(CEikColumnListBox)
- */
- void LoadIconsL();
-
- /**
- * Append icon to icon array.
- *
- * @param aId Icon id
- * @param aIcons Icon array
- * @param aIconFileWithPath Icon file name with path
- * @param aIconGraphicsIndex Picture index.
- * @param aIconGraphicsMaskIndex Mask index.
- */
- void AddIconL( TAknsItemID aId, CAknIconArray* aIcons,
- const TDesC& aIconFileWithPath,
- TInt aIconGraphicsIndex,
- TInt aIconGraphicsMaskIndex,
- TBool aColorIcon = EFalse );
-
- /**
- * Change bitmaps when skin changes.
- */
- void SkinBitmapChangesL( );
-
- /**
- * Construct icon
- *
- * @param aColourIcon Is icon a colour icon
- * @param aInstance Current skin instance
- * @param aID Icon ID
- * @param aFilename Icon file name with path
- * @param aFileBitmapId ID of the bitmap in the file
- * @param aFileMaskId ID of the mask in the file
- *
- * @return The constructed icon
- */
- CGulIcon* ConstructIconL( TBool& aColourIcon,
- MAknsSkinInstance* aInstance,
- const TAknsItemID& aID,
- const TDesC& aFilename,
- const TInt aFileBitmapId,
- const TInt aFileMaskId );
-
- private: // Data
-
- // It is the listbox.
- CEikColumnListBox* iListBox;
-
- // For handling some key pressures and for marking a current
- // topic handle.
- CCbsUiTopicView& iTopicView;
-
- };
-
-#endif // CCBSUITOPICVIEWCONTAINER_H
-
- // End of File
--- a/cbs/cbsui/UiInc/CCbsUiViewFactory.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,106 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Works as a mediator to different views
-*
-*
-*/
-
-
-#ifndef CCBS_UI_VIEW_FACTORY_H
-#define CCBS_UI_VIEW_FACTORY_H
-
-// INCLUDES
-#include <e32base.h>
-#include <CbsCommon.h>
-
-
-// FORWARD DECLARATIONS
-class MCbs;
-class CCbsUiTopicListView;
-class CCbsUiTopicView;
-class CCbsUiMsgView;
-class CCbsUiTopicListMonitor;
-class CCbsUiSettingsView;
-class CAknView;
-class CCbsUiTopicListMonitor;
-
-// CLASS DECLARATION
-
-
-/**
-* For creating views in cbsui.
-*
-*/
-class CCbsUiViewFactory : public CBase
- {
- public: // Constructors and destructor
-
- /**
- * C++ constructor.
- */
- CCbsUiViewFactory(
- MCbs& aServer, CCbsUiTopicListMonitor& aTopicMonitor );
-
- /**
- * Destructor.
- */
- virtual ~CCbsUiViewFactory();
-
- public: // New functions
-
- /**
- * Returns pointer to topic list view and keeps a reference
- * to that object.
- *
- * @return created view
- */
- CAknView* CreateTopicListViewLC();
-
- /**
- * Returns pointer to topioc view and keeps a reference
- * to that object.
- *
- * @return created view
- */
- CAknView* CreateTopicViewLC();
-
- /**
- * Returns pointer to msg view and keeps a reference
- * to that object.
- *
- * @return created view
- */
- CAknView* CreateMsgViewLC();
-
- /**
- * Returns pointer to settings view and keeps a reference
- * to that object.
- *
- * @return created view
- */
- CAknView* CreateSettingsViewLC();
-
- private: // Data
-
- // Ref:
- CCbsUiTopicListMonitor& iTopicMonitor;
-
- // Ref:
- MCbs& iServer;
- };
-
-#endif // CCBS_UI_VIEW_FACTORY_H
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiappAppUi.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* User Interface class.
-*
-*
-*/
-
-
-#ifndef __CBSUIAPPAPPUI_H
-#define __CBSUIAPPAPPUI_H
-
-// INCLUDES
-#include <aknViewAppUi.h> // CAknViewAppUi
-
-
-// FORWARD DECLARATIONS
-class CCbsUiTopicListMonitor;
-class MCbs;
-
-// CLASS DECLARATION
-
-/**
-* It is the application user interface. Creates all the views and
-* handles their activation.
-*/
-class CCbsUiappAppUi : public CAknViewAppUi
- {
-
- public: // Constructors and destructor
-
- /**
- * C++ constructor.
- */
- CCbsUiappAppUi(MCbs& aServer);
-
- /**
- * Destructor.
- */
- virtual ~CCbsUiappAppUi();
-
- public: // From CEikAppUi
-
- /**
- * Update context icon when parameter aType is KAknsMessageSkinChange
- */
- void HandleResourceChangeL( TInt aType );
-
- private: // From CEikAppUi
-
- /**
- * Handles common commands.
- *
- * @param aCommand It is command to be processed.
- */
- void HandleCommandL( TInt aCommand );
-
- private:
-
- /**
- * By default Symbian OS constructor is private.
- */
- void ConstructL();
-
- /**
- * Checks the SIM status
- * @return TInt, value of sim state
- */
- TInt CheckSimStateL();
-
- private: // Data
-
- // Ref: It is the connection to the server.
- MCbs& iServer;
-
- // TopicListMonitor
- CCbsUiTopicListMonitor* iTopicListMonitor;
-
- };
-
-
-#endif // __CBSUIAPP_H
-
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiappApplication.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* The application class.
-*
-*
-*/
-
-
-#ifndef __CBSUIAPPAPPLICATION_H
-#define __CBSUIAPPAPPLICATION_H
-
-// INCLUDES
-#include <aknapp.h>
-
-
-// CLASS DECLARATION
-
-
-/**
-* The Application class
-*/
-class CCbsUiappApplication : public CAknApplication
- {
- private: // Functions from base classes
-
- /**
- * From CApaApplication
- */
- CApaDocument* CreateDocumentL();
-
- /**
- * From CApaApplication.
- */
- TUid AppDllUid() const;
- };
-
-
-#endif // __CBSUIAPPAPPLICATION_H
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiappDocument.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for the CCbsUiappDocument class.
-*
-*
-*/
-
-
-#ifndef __CBSUIAPPDOCUMENT_H
-#define __CBSUIAPPDOCUMENT_H
-
-// INCLUDES
-#include <eikdoc.h>
-
-
-// FORWARD DECLARATIONS
-class MCbs;
-
-// CLASS DECLARATION
-
-/**
-* The Document class
-*/
-class CCbsUiappDocument : public CEikDocument
- {
- public: // Constructors and destructor
-
- /**
- * Returns new instance of CbsUiDocument.
- *
- * @param aApp application
- * @return new instance of CbsUiDocument
- */
- static CCbsUiappDocument* NewL( CEikApplication& aApp );
-
- /**
- * Destructor.
- */
- ~CCbsUiappDocument();
-
- public: // From CEikDocument
-
- /**
- * Stop doc file being created
- * @param aDoOpen not used
- * @param aFilename not used
- * @param aFs not used
- * @return NULL
- */
- inline CFileStore* OpenFileL( TBool /*aDoOpen*/,
- const TDesC& /*aFilename*/,
- RFs& /*aFs*/);
-
- /**
- * Since 3.0
- * Stop doc file being created
- * @param aFileStore not used
- * @param aFile not used
- */
- inline void OpenFileL( CFileStore*& /*aFileStore*/, RFile& /*aFile*/ );
-
- private: // Constructors
-
- /**
- * C++ default constructor.
- *
- * @param aApp application
- */
- CCbsUiappDocument( CEikApplication& aApp );
-
- /**
- * Symbian OS constructor.
- */
- void ConstructL();
-
- private: // Functions from base classes
-
- /**
- * From CEikDocument
- * Creates and returns an instance of CBSUI application
- *
- * @return an instance of CBSUI application
- */
- CEikAppUi* CreateAppUiL();
-
- private: // Data
-
- // Own: For creating connection to the server
- MCbs* iServer;
- };
-
-
-#include "CCbsUiappDocument.inl"
-
-#endif // __CBSUIAPPDOCUMENT_H
-
-// End of File
--- a/cbs/cbsui/UiInc/CCbsUiappDocument.inl Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Inline implementation of CCbsUiappDocument class.
-*
-*
-*/
-
-
-
-// ---------------------------------------------------------
-// CCbsUiappDocument::OpenFileL
-//
-// Stop doc file being created
-//
-// ---------------------------------------------------------
-//
-CFileStore* CCbsUiappDocument::OpenFileL( TBool /*aDoOpen*/,
- const TDesC& /*aFilename*/,
- RFs& /*aFs*/)
- {
- return NULL;
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiappDocument::OpenFileL
-//
-// Stop doc file being created
-//
-// ---------------------------------------------------------
-//
-void CCbsUiappDocument::OpenFileL( CFileStore*& /*aFileStore*/, RFile& /*aFile*/ )
- {
- }
-
-// End of file
--- a/cbs/cbsui/UiInc/CbsUiConstants.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Contains constants which are used in CBSUI application.
-*
-*
-*/
-
-
-#ifndef __CBS_UI_CONSTANTS_H
-#define __CBS_UI_CONSTANTS_H
-
-// INCLUDES
-#include "Cbsuiapp.hrh"
-
-
-// CONSTANTS
-const TInt KCbsUiCustomMessageIdInt = 11;
-const TUid KCbsUiCustomMessageId = { KCbsUiCustomMessageIdInt };
- // When message view is launched by other
- // application its message id is 0, this
- // just has to differ from the other
- // applications message id.
-
-// When view is launched with this id it knows to set the focus to id,
-// which is passed as parameter to DoActivateL.
-const TUid KSetFocusToId = { 12 };
-
-// activates view to its current id.
-const TUid KSetFocusToCurrentId = { 13 };
-
-// How many digits there are in topic number
-const TInt KTopicNumberWidth = EMaxTopicNumberLength;
-
-const TInt KNumberOfTemporaryMessages = 3;
-
-// Error value used in Cbs ui.
-const TInt KCbsErrValue = -1;
-
-// This kind of topic number cannot exists
-const TInt KCbsInvalidTopicNumber = 22000;
-
-// max message title length
-const TInt KMaxMessageTitleLength = 40;
-
-
-// DATA TYPES
-enum { EMinTopicNumber = 0, EMaxTopicNumber = 999 };
-
-enum TCbsUiLanguageSelectionIndex
- {
- ECbsUiAll = 0,
- ECbsUiSelected = 1,
- ECbsUiOther = 2
- };
-
-// for activating topic view with right state
-struct TCbsUiTopicActivationPckg
- {
- // current topic number
- TCbsTopicNumber iTopicNumber;
-
- // current message handle
- TCbsMessageHandle iMessageHandle;
- };
-
-#endif // __CBS_UI_CONSTANTS_H
-
-// End of File
--- a/cbs/cbsui/UiInc/CbsUiDebug.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Provides macros for testing.
-*
-*
-*/
-
-
-#ifndef CBS_UI_DEBUG_H
-#define CBS_UI_DEBUG_H
-
-
-////////////////////////////
-// MEMORY TEST MACRO //
-
-
-#ifdef _DEBUG
-#define __CBSUI_DEBUG
-#endif // _DEBUG
-
-#ifdef __CBSUI_DEBUG
- #define __CBSUI_ASSERT(condition, function) \
- __ASSERT_DEBUG(condition, function)
- #define __CBSUI_ASSERT_E(condition, error) \
- __ASSERT_DEBUG(condition, CbsUiPanic(error) )
-#else
- #define __CBSUI_ASSERT(condition, function)
- #define __CBSUI_ASSERT_E(condition, error)
-#endif //__CBSUI_DEBUG
-
-
-#endif // CBS_UI_DEBUG_H
-
-// End of File
--- a/cbs/cbsui/UiInc/CbsUiId.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Contains applications uid.
-*
-*
-*/
-
-
-#ifndef __CBS_UI_ID_H
-#define __CBS_UI_ID_H
-
-// MACROS
-#define KUidCbsUiappDef 0x101F4CD3
-
-#endif // __CBS_UI_ID_H
-
-// End of File
--- a/cbs/cbsui/UiInc/CbsUiPanic.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Contains the panic function for CbsUiApp.
-*
-*
-*/
-
-
-#ifndef __CBS_UI_PANIC_H
-#define __CBS_UI_PANIC_H
-
-// INCLUDES
-#include <e32def.h>
-
-
-// DATA TYPES
-enum TCbsUiPanic
- {
- ECbsUiError = 0, // not used at the moment
- EStatusPaneError = 1, // if status pane is null
- EStatusOrTitlePaneError = 2, // if status or title pane is null
- ENaviPaneError = 3, // if navi pane is null
- ENaviDecoratorError = 4, // navi decorator null error
- EListBoxInDialogError = 5, // list box creation error
- ETopicHandleError = 6, // handles creation error
- EServerCreationFailedError = 7, // server creation failed
- EServerNullError = 8, // server null error
- EListBoxNullError = 9, // list box null error
- EMenuPaneNullError = 10, // menu pane null error
- EFindItemNullError = 11, // find item null error
- ETopicCountError = 12, // error when counting new topics
- EContainerNullError = 13, // container null error
- EMessageListNullError = 14, // not used at the moment
- EMessageContentsError = 15, // message content is not valid
- EListBoxAlreadyExistsError = 16, // list box already exists error
- EEditorNullError = 17, // editor null error
- ETopicNumberError = 18, // topic number is invalid
- EEditorCreationError = 19, // not used at the moment
- EWrongViewIdError = 20, // not used at the moment
- EContextMenuAlreadeyExists = 21, // not used at the moment
- EErrEditTopicDlgOkToExit = 22, // null pointer error in edit
- // dialog
- EErrMsgContents = 23, // not used at the moment
- EErrNotAMsgHandle = 24, // invalid message handle
- EErrNotANumber = 25, // converting a descriptor
- // to number error
- EErrScrollIndicatorAllreadyExists = 26, // scroll indicator allready
- // exists
- EErrAlgorithm = 27, // not used at them moment
- EErrIndexOutOfBounds = 28, // index out of bounds error
- EErrMsgNotFound = 29, // message not found error
- EErrMsgHandleNotFound = 30, // message handle not found error
- EErrNoSuchMessageHandle = 31, // not used at the moment
- EErrTopicsCountError = 32, // topics count error
- EErrBadIndex = 33, // bad index error
- EErrWrongNotify = 34, // not used
- EErrTopicNotFound = 35, // topic not found error
- EErrBadHandle = 36, // not used
- EErrMsgReadError = 37, // message read error
- EErrNullPointer = 38, // null pointer
- EErrBadSelection = 39, // selection error
- EErrAllocation = 40, // not used
- EErrInvalidValue = 41, // invalid value error
- EErrNotATopicNumber = 42, // invalid topic number
- EErrServerDisconnected = 43, // server not connected error
- EErrAllreadyExists = 44, // trying to creat item, which is
- // allready created
- EErrInvalidEvent = 45, // invalid event
- EErrBadLength = 46, // descriptor too big
- EErrEmptyDesc = 47, // empty descriptor error
- EErrMsgImbalance = 48, // message postion is invalid
- EErrMsgNotExists = 49, // not used
- EErrTopicNumberNotFound = 50, // topic number not found
- EErrNotAValidObserver = 51, // not used
- EErrServerError = 52 // not used
- };
-
-// FUNCTION PROTOTYPES
-GLDEF_C void CbsUiPanic( TCbsUiPanic aPanic );
-
-#endif // __CBS_UI_PANIC_H
-
-// End of File
--- a/cbs/cbsui/UiInc/CbsUiUtility.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Provides different utility functions for CBSUI.
-*
-*
-*/
-
-
-#ifndef __CBS_UI_CLEANUP_HANDLER_H
-#define __CBS_UI_CLEANUP_HANDLER_H
-
-// INCLUDES
-#include <aknnotedialog.h> // CAknNoteDialog
-
-
-// FORWARD DECLARATIONS
-class MSaveMessageController;
-class MCbs;
-
-
-// CLASS DECLARATION
-
-/**
-* Offers utility functions for CBSUI.
-*
-*/
-class CbsUiUtility
- {
-
- public: // New functions
-
- /**
- * Shows confirmation note with text accordingly to aResourceId.
- *
- * @param aResourceId resource id
- * @param aWaitingDialog if ETrue dialog waits before continues
- */
- LOCAL_C void ShowConfirmationNoteL(
- const TInt aResourceId, TBool aWaitingDialog = EFalse );
-
- /**
- * Shows error note with text accordingly to aResourceId.
- *
- * @param aResourceId resource id
- */
- LOCAL_C void ShowErrorNoteL( const TInt aResourceId );
-
- /**
- * Shows warning note with text accordingly to aResourceId.
- *
- * @param aResourceId resource id
- */
- LOCAL_C void ShowWarningNoteL( const TInt aResourceId );
-
- /**
- * Shows a note accordingly to parameters.
- *
- * @param aResource note resource id
- * @param aTimeout duration
- * @param aTone sound
- */
- LOCAL_C void ShowNoteL( const TInt aResource,
- const CAknNoteDialog::TTimeout aTimeout,
- const CAknNoteDialog::TTone aTone );
-
- /**
- * Returns a new navigation pane. Remember to delete a memory area!
- *
- * @return new empty decorated label
- */
- LOCAL_C CAknNavigationDecorator* CreateEmptyNavigationPaneL();
-
- /**
- * Returns ETrue if message is saved
- *
- * @param aHandle message to be checked
- * @param aServer is needed to get information
- * @return ETrue if current message is saved
- */
- LOCAL_C TBool IsSavedL( const TCbsMessageHandle aHandle, MCbs& aServer );
-
- /**
- * Saves the message and shows a error message in case
- * something went wrong.
- *
- * @param aHandle message to be saved
- * @param aSaver saves the message and shows global error note if needed
- * @return Error code
- */
- LOCAL_C TInt SaveCurrentMessageL(
- const TCbsMessageHandle aHandle,
- MSaveMessageController& aSaver );
-
- };
-
-#endif // __CBS_UI_CLEANUP_HANDLER_H
-
-// End of File
--- a/cbs/cbsui/UiInc/MCbs.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,558 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Interface for cbs client.
-*
-*
-*/
-
-
-#ifndef __MCbs_h
-#define __MCbs_h
-
-// INCLUDES
-#include <CbsCommon.h>
-
-/**
-* Interface MCbs is used to change real client server
-* connection to some test stub implementation.
-*/
-class MCbs
- {
- public:
-
- /**
- * Destructor.
- */
- virtual ~MCbs() {}
-
- /**
- * Creates connection to the server.
- *
- * Note that the method must be called before calling any other
- * methods. The method returns an error code and, therefore,
- * the caller is responsible of checking that everything went just
- * fine.
- *
- * @return Error code.
- */
- virtual TInt Connect() = 0;
-
- /**
- * Closes the session to the server.
- */
- virtual void Close() = 0;
-
- /**
- * Returns the version of CbsClient.
- *
- * CbsServer and CbsClient must be of same version.
- *
- * @return Returns the version of CbsClient.
- */
- virtual TVersion Version() const = 0;
-
- // === Settings-related methods
-
- /**
- * Returns the reception status in aStatus, which is ETrue if the reception is
- * on. Otherwise it is EFalse.
- *
- * @param aStatus The method returns the reception status in this parameter.
- */
- virtual void GetReceptionStatus( TBool& aStatus ) = 0;
-
- /**
- * Changes the reception status to aStatus.
- *
- * @param aStatus It contains the new reception status.
- * @return Error code.
- */
- virtual TInt SetReceptionStatus( TBool aStatus ) = 0;
-
- /**
- * Returns the topic detection status in aStatus, which is ETrue if the detection
- * is on. Otherwise it is EFalse.
- *
- * @param aStatus The method returns the topic detection status in this parameter.
- */
- virtual void GetTopicDetectionStatus( TBool& aStatus ) = 0;
-
- /**
- * Changes the topic detection status to aStatus.
- *
- * @param aStatus It contains the new topic detection status.
- * @return Error code.
- */
- virtual TInt SetTopicDetectionStatus( TBool aStatus ) = 0;
-
- /**
- * Returns the preferred languages in aLanguages.
- *
- * @param aLanguages The method returns the languages in this parameter.
- */
- virtual void GetLanguages( TCbsSettingsLanguages& aLanguages ) = 0;
-
- /**
- * Changes the preferred languages to aLanguages.
- *
- * @param aLanguages It contains the new preferred languages.
- * @return Error code.
- */
- virtual TInt SetLanguages( const TCbsSettingsLanguages& aLanguages ) = 0;
-
- /**
- * Requests the server to notify the client whenever any settings will be
- * changed.
- *
- * Note that for each subsession only one this kind of request can be pending. Each
- * client is responsible of assuring this.
- *
- * @param aStatus It is the variable that the server will modify whenever an event occurs.
- * @param aEvent The server will store the type of occurred event to this variable.
- */
- virtual void NotifySettingsChanged( TRequestStatus& aStatus, TCbsSettingsEvent& aEvent ) = 0;
-
- /**
- * Cancels the request to notify the client.
- */
- virtual void NotifySettingsChangedCancel() = 0;
-
- // === Topic Collection-related methods
-
- /**
- * Resets the iterator. Must be called prior any call to HasNextTopic()
- * or NextTopic()!
- */
- virtual void StartCollectionBrowsing() = 0;
-
- /**
- * Returns ETrue, if there is a topic not accessed with NextTopic()
- *
- * @return ETrue, if there is a topic. EFalse if the end of the collection
- * has been reached.
- */
- virtual TBool HasNextCollectionTopic() = 0;
-
- /**
- * Returns the next topic in the topic collection skipping all topics with
- * a topic number matching a topic already listed in the current topic list.
- * This function will return KErrNotFound if the collection is tried to
- * access beyond the end of the list. Otherwise the error code will be
- * the same returned by GetTopicInfo().
- *
- * @param aInfo The topic information will be stored here.
- * @return The error code. KErrNotFound if there are no topics left.
- */
- virtual TInt NextCollectionTopic( TCbsTopicInfo& aInfo ) = 0;
-
- // === Topic list-related methods
-
- /**
- * Returns the total amount of topics the topic list contains.
- *
- * @param aCount It will contain the total amount of topics.
- */
- virtual void GetTopicCount( TInt& aCount ) = 0;
-
- /**
- * Returns information about a topic from the topic list.
- *
- * Return values:
- * KErrArgument Topic was not found.
- *
- * Rest of return values indicate a file error.
- *
- * @param aIndex It is the index to the topic.
- * @param aTopic It will contain the topic information.
- * @return Error code.
- */
- virtual TInt GetTopic( const TInt aIndex, TCbsTopic& aTopic ) = 0;
-
- /**
- * Finds the topic by the given number.
- *
- * Return values:
- * KErrNone Topic returned in parameter aTopic.
- * KErrNotFound Topic was not found.
- *
- * @param aNumber Number of the topic
- * @param aTopic Return: contains the topic information
- * @return Error code
- */
- virtual TInt FindTopicByNumber( TCbsTopicNumber aNumber,
- TCbsTopic& aTopic ) = 0;
-
- /**
- * Deletes an existing topic.
- *
- * @param aNumber Number of the topic to be deleted
- * @return Error code
- */
- virtual TInt DeleteTopic( TCbsTopicNumber aNumber ) = 0;
-
- /**
- * Delete all topics.
- *
- * @return Error code.
- */
- virtual TInt DeleteAllTopics() = 0;
-
- /**
- * Adds a new topic. The handle assigned to the topic will be returned
- * in aTopic.
- *
- * Return values:
- * KErrNone Topic was successfully added.
- * KErrAlreadyExists A topic of the same number already exists in DB
- * KErrArgument Topic number given was not in a proper range.
- * KErrDiskFull Topic not added - FFS out of space
- *
- * Note that the number of the new topic must be unused.
- *
- * @param aTopic Contains the information of the new topic.
- * On return, aTopic also contains the topic
- * handle.
- * @return Error code.
- */
- virtual TInt AddTopic( TCbsTopic& aTopic ) = 0;
-
- /**
- * Changes the name and number of the existing topic.
- *
- * Note that the changing fails in case there is another topic with
- * the new topic number. It also fails if the topic is protected.
- *
- * Return values:
- * KErrNone Topic name and number successfully changed.
- * KErrDiskFull Topic information not changed - FFS out of space
- *
- * @param aOldNumber Number of the topic to be changed
- * @param aNewNumber Number to be given for the topic
- * @param aName Name to be given for the topic
- * @return Error code
- */
- virtual TInt ChangeTopicNameAndNumber(
- TCbsTopicNumber aOldNumber,
- TCbsTopicNumber aNewNumber,
- const TCbsTopicName& aName ) = 0;
-
- /**
- * Changes topic subscription status.
- *
- * @param aNumber Number of the topic
- * @param aNewStatus New subscription status
- * @return Error code
- */
- virtual TInt ChangeTopicSubscriptionStatus(
- TCbsTopicNumber aNumber, TBool aNewStatus ) = 0;
-
- /**
- * Changes topic hotmark status.
- *
- * @param aNumber Number of the topic
- * @param aNewStatus New hotmark status
- * @return Error code
- */
- virtual TInt ChangeTopicHotmarkStatus( TCbsTopicNumber aNumber,
- TBool aNewStatus ) = 0;
-
- /**
- * Requests the server to notify the client whenever an event occurs
- * that changes the information of the topics.
- *
- * Note that the client may select what kind of events it is
- * interested in. Note also that there can be at most one pending
- * request per instance of the class.
- *
- * @param aStatus The variable that the server will modify
- * whenever an event occurs.
- * @param aRequested Events the client is interested in
- * @param aEvent Indicates the variable that will contain the
- * type of event that occured.
- * @param aNumber Indicates the variable that will contain the
- * topic number that was changed in event.
- */
- virtual void NotifyOnTopicListEvent(
- TRequestStatus& aStatus,
- const TInt aRequested,
- TCbsTopicListEvent& aEvent,
- TCbsTopicNumber& aNumber ) = 0;
-
- /**
- * Cancels the pending notify request.
- */
- virtual void NotifyOnTopicListEventCancel() = 0;
-
- /**
- * Returns the number of topics added since last GetNewTopicsCount()
- * by the topic detection feature.
- *
- * @param aCount It will contain the amount of new topics.
- * @return TInt Result code.
- */
- virtual TInt GetNewTopicsCount( TInt& aCount ) = 0;
-
- /**
- * Returns the number of the topic which was last added
- * to topic list.
- *
- * Note: if a topic list cache is maintained by the client
- * (as CBS UI application does), this function has to
- * be called BEFORE calling GetTopicCount() and GetTopic()
- * to make sure that no topic is added in between
- * GetTopic() and GetLatestTopicHandle() calls. If this
- * happens, GetLatestTopicHandle() will return a handle
- * to a topic that is not cached client-side.
- *
- * Return codes:
- * KErrNone aNumber is a valid topic number.
- * KErrNotFound No topic added since server start,
- * aNumber is not valid.
- *
- * @param aNumber Returns: number of the topic last added
- * @return Result code
- */
- virtual TInt GetLatestTopicNumber( TCbsTopicNumber& aNumber ) = 0;
-
- /**
- * Returns the total amount of unread messages.
- *
- * @param aCount Return: number of unread messages
- */
- virtual void GetUnreadMessageCount( TInt& aCount ) = 0;
-
- /**
- * Returns the handle to the latest hotmarked message that has been
- * received after the system has started up.
- *
- * @param aMessage Handle to the message
- */
- virtual void GetHotmarkedMessageHandle( TCbsMessageHandle& aMessage ) = 0;
-
- /**
- * Returns the number of unread messages in hotmarked topics.
- *
- * This function is to used by the client when deciding whether
- * the message or topic list view should be opened to display
- * a hotmarked message(s).
- *
- * @return Number of unread hotmarked messages
- */
- virtual TInt NumberOfUnreadHotmarkedMessages() = 0;
-
- /**
- * Returns the numbers of topics that precede and succeed the given
- * topic in server-side topic list.
- *
- * If the given topic is the first topic in list, aPosition has
- * ECbsHead bit up. If the given topic is the last topic in list,
- * aPosition has ECbsTail bit up.
- *
- * Return code values:
- * KErrNone aPrevTopicNumber, aNextTopicNumber and aPosition
- * contain valid values.
- * KErrNotFound aCurrentTopicNumber specified a topic that was not
- * on topic list.
- *
- * @param aCurrentTopicNumber Number that specifies the topic
- * whose surroundings are returned
- * @param aPrevTopicNumber Returns: number of topic preceding
- * the given topic
- * @param aNextTopicNumber Returns: number of topic succeeding
- * the given topic
- * @param aPosition Returns: position of current
- * topic in list.
- * @return Result code
- */
- virtual TInt GetNextAndPrevTopicNumber(
- const TCbsTopicNumber& aCurrentTopicNumber,
- TCbsTopicNumber& aPrevTopicNumber,
- TCbsTopicNumber& aNextTopicNumber,
- TInt& aPosition ) = 0;
-
- // === Topic Messages-related methods
-
- /**
- * Returns the total amount of messages the topic contains.
- *
- * Return codes:
- * KErrNotFound Invalid handle.
- * KErrNone aCount contains the number of messages
- * in topic
- *
- * @param aNumber Number of the topic.
- * @param aCount Number of messages in given topic.
- * @return Result code
- */
- virtual TInt GetMessageCount( TCbsTopicNumber aNumber,
- TInt& aCount ) = 0;
-
- /**
- * Returns message information.
- *
- * Return codes:
- * KErrNotFound Topic or message not found.
- * KErrNone aMessage contains the message information.
- *
- * @param aNumber Number of the topic
- * @param aIndex Index to the message in topic.
- * @param aMessage Returns: the message information
- * @return Error code
- */
- virtual TInt GetMessage( TCbsTopicNumber aNumber, TInt aIndex,
- TCbsMessage& aMessage ) = 0;
-
- /**
- * Finds a message by given handle.
- *
- * @param aHandle Handle to the message.
- * @param aMessage Return: contains the message information.
- * @return Error code.
- */
- virtual TInt FindMessageByHandle(
- const TCbsMessageHandle& aHandle,
- TCbsMessage& aMessage ) = 0;
-
- /**
- * Returns the index of a message with given handle in topic.
- *
- * Result code KErrNotFound indicates that no message was found with
- * the given handle.
- *
- * @param aHandle Handle of the message
- * @param aIndex Return: index of the message in message topic
- * @return Result code
- */
- virtual TInt GetMessageIndexByHandle(
- const TCbsMessageHandle& aHandle, TInt& aIndex ) = 0;
-
- /**
- * Deletes an existing message.
- *
- * Note that it does not care a lot about the status of the message.
- *
- * Please check also the description of LockMessage().
- *
- * @param aHandle It is handle to the message.
- * @return Error code.
- */
- virtual TInt DeleteMessage( const TCbsMessageHandle& aHandle ) = 0;
-
- /**
- * Saves a message (the saved message won't be deleted to make
- * room for new messages).
- *
- * Return codes:
- * KErrNone Message is saved.
- * KErrGeneral Message not saved -- total maximum of saved
- * messages reached.
- * KErrNotFound Message not saved -- no message associated
- * with the given handle.
- * KErrDiskFull Message not saved -- FFS out of space.
- *
- * @param aHandle Handle to the message to be saved.
- * @return Return code.
- */
- virtual TInt SaveMessage( const TCbsMessageHandle& aHandle ) = 0;
-
- /**
- * Locks the message.
- *
- * Note that a single topic messages subsession can have at most one locked
- * message.
- *
- * Message can be unlocked by trying to lock a null message. Locked message
- * will also be automatically unlocked when subsession is closed. If a message
- * is locked, then it will not be deleted from the database. Thus, deleting a
- * message or trying to delete a topic that contains such a message will fail.
- *
- * Locking a message does not prevent to save the message nor read the message.
- *
- * @param aHandle It is handle to the message to be locked.
- * @return Error code.
- */
- virtual TInt LockMessage( const TCbsMessageHandle& aHandle ) = 0;
-
- /**
- * Sets the message as read.
- *
- * @param aHandle It is handle to the message to be set read.
- */
- virtual TInt ReadMessage( const TCbsMessageHandle& aHandle ) = 0;
-
- /**
- * Returns the message contents.
- *
- * @param aHandle It is handle to the message.
- * @param aBuffer It will contain the contents (as much as it fits).
- * @return Error code.
- */
- virtual TInt GetMessageContents(
- const TCbsMessageHandle& aHandle,
- TDes& aBuffer ) = 0;
-
- /**
- * Returns the handles of messages that precede and succeed the
- * given message in server-side list of topic messages.
- *
- * Topic is resolved from the given message handle
- *
- * If the given handle specifies the first message in topic,
- * aPosition has ECbsHead bit up. If the given handle specifies
- * the last message in topic, aPosition has ECbsTail bit up.
- *
- * Return code values:
- * KErrNone aPrevMsgHandle, aNextMsgHandle and aPosition
- * contain valid values.
- * KErrNotFound aCurrentMsgHandle specified a message that was not
- * found.
- *
- * @param aCurrentMsgHandle Handle that specifies the message
- * whose surroundings are returned
- * @param aPrevMsgHandle Returns: handle of message
- * preceding the given message
- * @param aNextMsgHandle Returns: handle of message
- * succeeding the given topic
- * @param aPosition Returns: position of current topic
- * in list
- * @return Result code
- */
- virtual TInt GetNextAndPrevMessageHandle(
- const TCbsMessageHandle& aCurrentMsgHandle,
- TCbsMessageHandle& aPrevMsgHandle,
- TCbsMessageHandle& aNextMsgHandle,
- TInt& aPosition ) = 0;
-
- // Other methods
-
- /**
- * Returns ETrue if CbsServer session has been established.
- *
- * @return ETrue, if session open.
- */
- virtual TBool Connected() const = 0;
-
- /**
- * Forces the server to shut down.
- *
- * NOTE: Shutdown not fully implemented in CbsServer yet.
- */
- virtual void Shutdown() const = 0;
-
- };
-
-#endif // __MCbs_h
-
-// End of file
--- a/cbs/cbsui/UiInc/MCbsUiSettingsObserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Observes settings monitor.
-*
-*
-*/
-
-
-#ifndef CBS_UI_SETTINGS_OBSERVER_H
-#define CBS_UI_SETTINGS_OBSERVER_H
-
-
-
-// CLASS DECLARATION
-
-
-/**
-* Observes settings monitor.
-*
-*/
-class MCbsUiSettingsObserver
- {
- public:
-
- /**
- * Settings monitor calls this function when settings has been
- * changed.
- *
- * @param aEvent What kind of event caused the settings change
- */
- virtual void SettingsChangedL( TCbsSettingsEvent aEvent ) = 0;
-
- };
-
-#endif // CBS_UI_SETTINGS_OBSERVER_H
-
-// End of File
-
--- a/cbs/cbsui/UiInc/MCbsUiTopicMonitorObserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Observes topic monitor.
-*
-*
-*/
-
-
-#ifndef CBS_UI_TOPIC_MONITOR_OBSERVER_H
-#define CBS_UI_TOPIC_MONITOR_OBSERVER_H
-
-// INCLUDES
-#include <CbsCommon.h>
-
-
-
-// CLASS DECLARATION
-
-/**
-* Observes topic monitor.
-*
-*/
-class MCbsUiTopicMonitorObserver
- {
- public:
-
- /**
- * Topic list or topic messages are changed.
- *
- * @param aEvent reason for event
- * @param aTopicNumber Topic number, which caused the event
- */
- virtual void TopicListChangedL(
- TCbsTopicListEvent aEvent, TCbsTopicNumber aTopicNumber ) = 0;
-
- };
-
-#endif // CBS_UI_TOPIC_MONITOR_OBSERVER_H
-
-// End of File
--- a/cbs/cbsui/UiInc/MSaveMessageController.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Declares functions needed to save message.
-*
-*
-*/
-
-
-#ifndef __MSaveMessageController_h
-#define __MSaveMessageController_h
-
-// INCLUDES
-#include <CbsCommon.h>
-
-
-
-// CLASS DECLARATION
-
-/**
-* Helper class for saving message.
-*/
-class MSaveMessageController
- {
- public: // New functions
-
- /**
- * Saves a message (the saved message won't be deleted to make
- * room for new messages).
- *
- * Return codes:
- * KErrNone Message is saved.
- * KErrGeneral Message not saved -- total maximum of saved
- * messages reached.
- * KErrNotFound Message not saved -- no message associated
- * with the given handle.
- * KErrDiskFull Message not saved -- FFS out of space.
- *
- * @param aHandle Handle to the message to be saved.
- * @return Return code.
- */
- virtual TInt SaveMessage( const TCbsMessageHandle& aHandle ) = 0;
- };
-
-#endif // __MSaveMessageController_h
-
-// END OF FILE
--- a/cbs/cbsui/UiInc/RCbsUi.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Interface for CBS Client
-*
-*/
-
-
-#ifndef __RCbsUi_h
-#define __RCbsUi_h
-
-// INCLUDE FILES
-#include <e32base.h>
-#include <CbsCommon.h>
-#include <RCbs.h>
-
-#include "MCbs.h"
-
-
-// CLASS DECLARATION
-
-/**
-* Delecates calls to RCbs.
-*/
-class RCbsUi : public MCbs
- {
- public: // Constructor and destructor
-
- /**
- * Constructor.
- */
- RCbsUi();
-
- /**
- * Destructor.
- */
- ~RCbsUi();
-
- public: // From MCbs
-
- TInt Connect();
- void Close();
- TVersion Version() const;
-
- // === Settings-related methods
- void GetReceptionStatus( TBool& aStatus );
- TInt SetReceptionStatus( TBool aStatus );
- void GetTopicDetectionStatus( TBool& aStatus );
- TInt SetTopicDetectionStatus( TBool aStatus );
- void GetLanguages( TCbsSettingsLanguages& aLanguages );
- TInt SetLanguages( const TCbsSettingsLanguages& aLanguages );
- void NotifySettingsChanged( TRequestStatus& aStatus, TCbsSettingsEvent& aEvent );
- void NotifySettingsChangedCancel();
-
- // === Topic Collection-related methods
- void StartCollectionBrowsing();
- TBool HasNextCollectionTopic();
- TInt NextCollectionTopic( TCbsTopicInfo& aInfo );
-
- // === Topic list-related methods
- void GetTopicCount( TInt& aCount );
- TInt GetTopic( const TInt aIndex, TCbsTopic& aTopic );
- TInt FindTopicByNumber( TCbsTopicNumber aNumber, TCbsTopic& aTopic );
- TInt DeleteTopic( TCbsTopicNumber aNumber );
- TInt DeleteAllTopics();
- TInt AddTopic( TCbsTopic& aTopic );
- TInt ChangeTopicNameAndNumber(
- TCbsTopicNumber aOldNumber,
- TCbsTopicNumber aNewNumber,
- const TCbsTopicName& aName );
- TInt ChangeTopicSubscriptionStatus(
- TCbsTopicNumber aNumber, TBool aNewStatus );
- TInt ChangeTopicHotmarkStatus( TCbsTopicNumber aNumber,
- TBool aNewStatus );
- void NotifyOnTopicListEvent(
- TRequestStatus& aStatus,
- const TInt aRequested,
- TCbsTopicListEvent& aEvent,
- TCbsTopicNumber& aNumber );
- void NotifyOnTopicListEventCancel();
- TInt GetNewTopicsCount( TInt& aCount );
- TInt GetLatestTopicNumber( TCbsTopicNumber& aNumber );
- void GetUnreadMessageCount( TInt& aCount );
- void GetHotmarkedMessageHandle( TCbsMessageHandle& aMessage );
- TInt NumberOfUnreadHotmarkedMessages();
- TInt GetNextAndPrevTopicNumber(
- const TCbsTopicNumber& aCurrentTopicNumber,
- TCbsTopicNumber& aPrevTopicNumber,
- TCbsTopicNumber& aNextTopicNumber,
- TInt& aPosition );
-
- // === Topic Messages-related methods
- TInt GetMessageCount( TCbsTopicNumber aNumber, TInt& aCount );
- TInt GetMessage( TCbsTopicNumber aNumber, TInt aIndex,
- TCbsMessage& aMessage );
- TInt FindMessageByHandle(
- const TCbsMessageHandle& aHandle,
- TCbsMessage& aMessage );
- TInt GetMessageIndexByHandle(
- const TCbsMessageHandle& aHandle, TInt& aIndex );
- TInt DeleteMessage( const TCbsMessageHandle& aHandle );
- TInt SaveMessage( const TCbsMessageHandle& aHandle );
- TInt LockMessage( const TCbsMessageHandle& aHandle );
- TInt ReadMessage( const TCbsMessageHandle& aHandle );
- TInt GetMessageContents(
- const TCbsMessageHandle& aHandle,
- TDes& aBuffer );
- TInt GetNextAndPrevMessageHandle(
- const TCbsMessageHandle& aCurrentMsgHandle,
- TCbsMessageHandle& aPrevMsgHandle,
- TCbsMessageHandle& aNextMsgHandle,
- TInt& aPosition );
-
- // Other methods
- TBool Connected() const;
- void Shutdown() const;
-
- private: // Data
-
- // Real cbs client
- RCbs iServer;
-
- };
-
-#endif // __RCbsUi_h
-
-// End of file
--- a/cbs/cbsui/UiInc/ccbsuisettingsviewcontainer.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,283 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for the CCbsUiSettingsViewContainer class.
-*
-*
-*/
-
-
-#ifndef __CCBSUISETTINGSVIEWCONTAINER_H
-#define __CCBSUISETTINGSVIEWCONTAINER_H
-
-// INCLUDES
-#include <bldvariant.hrh>
-#include <coecntrl.h>
-#include <eiklbo.h> // MEikListBoxObserver
-#include <CbsCommon.h>
-#include "CbsUiConstants.h"
-
-
-// FORWARD DECLARATIONS
-class CCbsUiMsgView;
-class MCbs;
-class CCbsUiSettingsView;
-class CAknSettingStyleListBox;
-class CSelectionItemList;
-
-// CLASS DECLARATION
-
-/**
-* Container for settings view components.
-*
-*/
-class CCbsUiSettingsViewContainer : public CCoeControl,
- public MEikListBoxObserver
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- *
- * @param aView settings view
- * @param aRect containers area
- * @param aServer cbs server
- */
- static CCbsUiSettingsViewContainer* NewL( CCbsUiSettingsView& aView,
- const TRect& aRect,
- MCbs& aServer );
-
- /**
- * Destructor.
- */
- ~CCbsUiSettingsViewContainer();
-
- public: // From CCoeControl
-
- /**
- * Returns the numbers of components.
- *
- * @return Number of components in the container
- */
- TInt CountComponentControls() const;
-
- /**
- * Returns a component.
- *
- * @param aIndex component index which is required
- * @return required component
- */
- CCoeControl* ComponentControl( TInt aIndex ) const;
-
- /**
- * Sets a new size to list box.
- */
- void SizeChanged();
-
- /**
- * Informs that the focus is changed.
- * @param aDrawNow Contains the value that was passed to it by SetFocus()
- */
- void FocusChanged( TDrawNow aDrawNow );
-
- /**
- * Offers key event to list box.
- *
- * @param aKeyEvent what kind of key produced this event
- * @param aType Which kind of action produced this event
- * @return EKeyWasConsumed
- */
- TKeyResponse OfferKeyEventL(
- const TKeyEvent& aKeyEvent, TEventCode aType );
-
- /**
- * Gets the control's help context.
- *
- * @param aContext The control's help context
- */
- void GetHelpContext( TCoeHelpContext& aContext ) const;
-
- /**
- * Handles a change to the control's resources.
- * @param aType A message UID value.
- */
- void HandleResourceChange( TInt aType );
-
- public: // New functions
-
- /**
- * Changes the value which the user has pushed and asks
- * server to save that value. If the user has choosed the
- * language item the language page will show up. Calls
- * private HandleListViewActionL.
- *
- * @param aLaunchedFromOptionMenu if ETrue pop_up_setting_item
- * will be launhed
- * @return EKeyWasConsumed
- */
- TKeyResponse HandleListViewActionL( TBool aLaunchedFromOptionMenu );
-
- /**
- * Offers public interface to update all settings.
- * Is needed if operator changes some values during in settings view.
- */
- void UpdateSettingsL();
-
- /**
- * Sets focus to first item in settings list box. Needed, because
- * sometimes view is not activated correctly.
- */
- void SetFocusToFirstItem() const;
-
- protected: // From MEikListBoxObsever
-
- /**
- * Handles list box events.
- *
- * @param aListBox the originating list box
- * @param aEventType a code for the event.
- */
- void HandleListBoxEventL( CEikListBox* aListBox,
- TListBoxEvent aEventType );
-
- private: // New functions
-
- /**
- * With this settings view can update the text in the
- * list box for language item. This can only be called from
- * GetSettingsL!
- */
- void SetLanguageSelectionL( CDesCArray& aItemArray );
-
- /**
- * Creates a list box.
- */
- void CreateListBoxL();
-
- /**
- * Gets the settings of reception, language and detection from the
- * sserver and sets these values to list box.
- */
- void GetSettingsL();
-
- /**
- * Changes the value which the user has pushed and asks
- * server to save that value. If the user has choosed the
- * language item the language page will show up.
- *
- * @param aListBox changes are focused on this list box
- * @param aLaunchedFromOptionMenu if ETrue pop_up_setting_item
- * will be launhed
- * @return EKeyWasConsumed
- */
- TKeyResponse HandleListViewActionL(
- const CEikListBox* aListBox, TBool aLaunchedFromOptionMenu );
-
- /**
- * Launches a dialog for On and Off setting items.
- *
- * @param aValue it will contain selected value in dialog
- * @param aUpdate if aValue has changed in dialog
- * @param aResouceId setting text resource id
- */
- void LaunchDialogOnOffL(
- const TBool& aValue, TBool& aUpdate, TInt aResouceId ) const;
-
- /**
- * Launches a topic detection dialog for On and Off setting items.
- *
- * @param aValue it will contain selected value in dialog
- * @param aUpdate if aValue has changed in dialog
- * @param aResouceId setting text resource id
- */
- void LaunchTopicDetectionDialogOnOffL(
- const TBool& aValue, TBool& aUpdate, TInt aResouceId ) const;
-
- /**
- * Prepares the language setting page with the values stored in
- * the server.
- */
- void PrepareLanguageSettingPageL();
-
- /**
- * Returns selected item in settings page.
- *
- * @return selected item
- */
- TCbsUiLanguageSelectionIndex GetSelected();
-
- /**
- * Launchs language setting page with aItems.
- *
- * @param aItems items in language setting page.
- * @param aCurrentSelectionIndex item to be selected
- */
- void LaunchLanguageSettingPageL(
- CDesCArrayFlat& aItems, TInt& aCurrentSelectionIndex );
-
- /**
- * Sets items to a aItemList from resource array.
- *
- * @param aResourceId resource array
- * @param aItemList list to be filled
- */
- void AddItemsToListL(
- TInt aResourceId,
- CDesCArrayFlat& aItemList ) const;
-
- private:
-
- /**
- * C++ constructor.
- *
- * @param aView settings view
- * @param aServer cbs server
- */
- CCbsUiSettingsViewContainer( CCbsUiSettingsView& aView,
- MCbs& aServer );
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL( const TRect& aRect );
-
-
- /**
- * Checks if phone is in offline mode or not
- * @return ETrue if phone is in offline mode
- * Otherwise EFalse.
- */
- TBool IsPhoneOfflineL() const;
-
-
- private: // Data
-
- // List box object in dialog.
- CAknSettingStyleListBox* iListBox;
-
- // For setting mop parent
- CCbsUiSettingsView& iView;
-
- // With the help of server it is possible to set and get
- // setting information.
- MCbs& iServer;
-
- // If ofline feature is supported then this is ETrue.
- TBool iOfflineFeatureSupported;
-
- };
-
-
-#endif //__CCBSUISETTINGSVIEWCONTAINER_H
-
-// End of file
--- a/cbs/cbsui/UiSrc/CCbsUiAddFromIndexDialog.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,321 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Dialog which shows topics, which are not yet in
-* the topic list view. Enables topics adding manually.
-*
-*
-*/
-
-
-// INCLUDES
-#include <barsread.h>
-#include <gulicon.h>
-#include <eikclbd.h>
-#include <eikspane.h>
-#include <aknnavide.h>
-#include <akntitle.h>
-#include <avkon.hrh>
-#include <aknnotewrappers.h>
-#include <cbsuiApp.rsg>
-#include <aknlists.h>
-#include <AknIconArray.h>
-#include "CCbsUiAddFromIndexDialog.h"
-#include "Cbsuiapp.hrh"
-#include "CbsUiPanic.h"
-#include "MCbs.h"
-
-// CONSTANTS
-const TInt KAssumedAverageOfItems = 5;
-const TInt KNumberOfIconsInAddFromIndexDialog = 4;
-_LIT(KCbsIconListSeparator, "1\t");
-_LIT(KCbsColumnListSeparator, " ");
-
-// if the aTopicInfo.iNumber is shorter than KWidth,
-// this character will be used to fill empty spaces.
-const TUint KZeroFill = '0';
-
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CCbsUiAddFromIndexDialog::CCbsUiAddFromIndexDialog( MCbs& aServer ) :
-iServer(aServer)
- {
- }
-
-// Destructor
-CCbsUiAddFromIndexDialog::~CCbsUiAddFromIndexDialog()
- {
- delete iHandles;
- delete iNaviDecorator;
- }
-
-//-----------------------------------------------------------------------------
-//
-// CCbsUiAddFromIndexDialog::PreLayoutDynInitL()
-//
-// Sets the choices to controls in AddFromIndexdialog
-//
-//-----------------------------------------------------------------------------
-void CCbsUiAddFromIndexDialog::PreLayoutDynInitL()
- {
- CEikDialog::PreLayoutDynInitL();
-
- CAknNavigationControlContainer* naviPane =
- STATIC_CAST( CAknNavigationControlContainer*,
- iEikonEnv->AppUiFactory()->StatusPane()->ControlL(
- TUid::Uid( EEikStatusPaneUidNavi) ) );
-
- __ASSERT_DEBUG( naviPane, CbsUiPanic( ENaviPaneError ) );
-
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC( reader, R_QTN_CB_AD_SEL_TOP );
-
- delete iNaviDecorator;
- iNaviDecorator = NULL;
-
- iNaviDecorator = naviPane->
- ConstructNavigationDecoratorFromResourceL( reader );
-
- __ASSERT_DEBUG( iNaviDecorator, CbsUiPanic( ENaviDecoratorError ) );
-
- naviPane->PushL( *iNaviDecorator );
- CleanupStack::PopAndDestroy();
-
- iListBox = STATIC_CAST(
- CAknSingleGraphicStyleListBox*, Control(ECbsUiAddFromIndexDlgLine) );
-
- __ASSERT_DEBUG( iListBox, CbsUiPanic( EListBoxInDialogError ) );
-
- SetIconsL();
- SetTopicsL();
-
- // Scrollbar
- iListBox->CreateScrollBarFrameL(ETrue);
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto);
-
- // order has to be this; otherwise on error add from index title pane
- // remains.
- CreateAddFromIndexTitlePaneL();
-
- MEikAppUiFactory* appUiFactory = iEikonEnv->AppUiFactory();
- TRect rect = appUiFactory->ClientRect();
- iListBox->SetRect( rect );
- }
-
-//-----------------------------------------------------------------------------
-//
-// CCbsUiAddFromIndexDialog::OkToExitL()
-//
-// Handles keyevents. In case "Softkey OK" it
-// add selected topics using member function addtopic
-//
-//-----------------------------------------------------------------------------
-TBool CCbsUiAddFromIndexDialog::OkToExitL( TInt aKeycode )
- {
- TBool result( EFalse );
- switch ( aKeycode )
- {
- case EAknSoftkeyOk:
- {
- const CListBoxView::CSelectionIndexArray* selArray =
- iListBox->SelectionIndexes();
-
- if ( selArray )
- {
- // Initialize the marked contact id array using selArray
- TInt count( selArray->Count() );
- TInt ret( KErrNone );
- for ( TInt i = 0; i < count && ret == KErrNone; ++i )
- {
- const TInt selIndex( (*selArray)[i] );
- ret = AddTopicL( iHandles->At(selIndex) );
- }
- }
- // Ok to exit, dialog is also removed from the stack
- result = ETrue;
- iEikonEnv->RemoveFromStack( this );
- break;
- }
- // If Mark or Unmark is pressed, the dialog must not exit.
- // Dialog must also stay in stack.
- case EAknSoftkeyMark:
- case EAknSoftkeyUnmark:
- {
- result = EFalse;
- break;
- }
- default:
- break;
- }
-
- return result;
- }
-
-
-//-----------------------------------------------------------------------------
-//
-// CCbsUiAddFromIndexDialog::GetIndexNumber()
-//
-// Parses Indexnumber from topic info. Is used by
-// SetTopics-member function.
-//
-//-----------------------------------------------------------------------------
-void CCbsUiAddFromIndexDialog::GetIndexNumber( const TCbsTopicInfo& aTopicInfo ,
- TBuf<KTopicNumberWidth>& aIndexNumber ) const
- {
- TBuf<KTopicNumberWidth> ind;
- ind.AppendNum( TInt(aTopicInfo.iNumber) );
- aIndexNumber.Justify(ind , KTopicNumberWidth, ERight, KZeroFill);
- }
-
-//-----------------------------------------------------------------------------
-//
-// CCbsUiAddFromIndexDialog::AddTopicL()
-//
-//
-//
-//-----------------------------------------------------------------------------
-TInt CCbsUiAddFromIndexDialog::AddTopicL( const TCbsTopicInfo aTopicInfo )
- {
- TCbsTopic topic;
-
- topic.iHotmarked = EFalse;
- topic.iName = aTopicInfo.iName;
- topic.iNumber = aTopicInfo.iNumber;
- topic.iProtected = EFalse;
- topic.iSavedMessages = 0;
- topic.iUnreadMessages = 0;
- topic.iSubscribed = 0;
-
- TInt ret( iServer.AddTopic(topic) );
-
- switch ( ret )
- {
- case KErrNone:
- // ok, do nothing
- break;
- case KErrAlreadyExists: // same handling
- case KErrArgument: // same handling
- // after this error still tryes to append other items if exists
- ret = KErrNone;
- break;
- default:
- User::LeaveIfError(ret);
- break;
- }
-
- return ret;
- }
-
-//-----------------------------------------------------------------------------
-//
-// CCbsUiAddFromIndexDialog::SetIconsL()
-//
-// Sets the multiselction box-images.
-//
-//-----------------------------------------------------------------------------
-void CCbsUiAddFromIndexDialog::SetIconsL() const
- {
- CAknIconArray* icons = new (ELeave)
- CAknIconArray(KNumberOfIconsInAddFromIndexDialog);
-
- CleanupStack::PushL(icons);
- icons->ConstructFromResourceL(R_CHECKBOX_ICONS);
- CleanupStack::Pop(); // icons
-
- iListBox->ItemDrawer()->ColumnData()->SetIconArray(icons);
- }
-
-//-----------------------------------------------------------------------------
-//
-// CCbsUiAddFromIndexDialog::SetTopicsL()
-//
-//
-//-----------------------------------------------------------------------------
-void CCbsUiAddFromIndexDialog::SetTopicsL()
- {
- TCbsTopicInfo topicinfo;
-
- iServer.StartCollectionBrowsing();
-
- iHandles = new (ELeave) TCbsTopicInfoHandleList(KAssumedAverageOfItems);
-
- __ASSERT_DEBUG( iHandles, CbsUiPanic( ETopicHandleError ) );
-
- iHandles->Reset();
- TInt err(KErrNone);
-
- while( iServer.HasNextCollectionTopic() && err == KErrNone )
- {
- err = iServer.NextCollectionTopic(topicinfo);
- if ( err == KErrNone )
- {
- MDesCArray* itemList = iListBox->Model()->ItemTextArray();
- CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList);
-
- TBuf<KTopicNumberWidth> index;
- GetIndexNumber( topicinfo, index );
-
- HBufC* buffer = HBufC::NewMaxLC(
- KCbsIconListSeparator().Length() + index.Length() +
- KCbsColumnListSeparator().Length() + topicinfo.iName.Length() );
-
- TPtr ptr = buffer->Des();
-
- ptr = KCbsIconListSeparator;
- ptr.Append(index);
- ptr.Append(KCbsColumnListSeparator);
- ptr.Append(topicinfo.iName);
-
- itemArray->AppendL(*buffer);
- iHandles->AppendL(topicinfo);
- CleanupStack::PopAndDestroy(); // buffer
- }
- }
-
- iListBox->HandleItemAdditionL();
- if ( iListBox->Model()->NumberOfItems() == 0 )
- {
- // No warning, but we can close the dialog
- User::Leave(KErrNone);
- }
- }
-
-//-----------------------------------------------------------------------------
-//
-// CCbsUiAddFromIndexDialog::CreateAddFromIndexTitlePaneL()
-//
-//
-//-----------------------------------------------------------------------------
-void CCbsUiAddFromIndexDialog::CreateAddFromIndexTitlePaneL() const
- {
- CEikStatusPane* sp = STATIC_CAST( CAknAppUi*, CEikonEnv::Static()->
- EikAppUi() )->StatusPane();
-
- CAknTitlePane* title = STATIC_CAST(CAknTitlePane*, sp->
- ControlL( TUid::Uid(EEikStatusPaneUidTitle) ));
-
- __ASSERT_DEBUG( sp && title, CbsUiPanic( EStatusOrTitlePaneError ) );
-
- TResourceReader titlereader;
- iCoeEnv->CreateResourceReaderLC( titlereader, R_QTN_CB_TITLE_ADD_TOPICS );
- title->SetFromResourceL( titlereader );
- CleanupStack::PopAndDestroy(); // resource title
- }
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiConfirmationNote.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,119 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implementation for CCbsUiConfirmationNote.
-*
-*
-*/
-
-
-// INCLUDES
-#include <AknGlobalConfirmationQuery.h>
-#include <StringLoader.h>
-#include <CbsUiApp.rsg>
-#include "CCbsUiConfirmationNote.h"
-
-
-// MODULE DATA STRUCTURES
-
-/**
- * Global Confirmation query observer. Doesn't do anything.
- */
-class CCbsUiConfirmationNote::CGlobalConfirmationQueryObserver :
- public CActive
- {
- public: // constructor
-
- inline CGlobalConfirmationQueryObserver() : CActive(EPriorityIdle)
- {
- }
-
- inline ~CGlobalConfirmationQueryObserver()
- {
- Cancel();
- }
-
- inline void ConstructL()
- {
- CActiveScheduler::Add(this);
- SetActive();
- }
-
- public: // from CActive
-
- void DoCancel()
- {
- }
-
- void RunL()
- {
- Cancel();
- }
- };
-
-// ================= MEMBER FUNCTIONS =======================
-
-CCbsUiConfirmationNote::CCbsUiConfirmationNote()
- {
- }
-
-CCbsUiConfirmationNote::~CCbsUiConfirmationNote()
- {
- delete iConfQueryObserver;
- delete iGlobalConfirmationQuery;
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiConfirmationNote::ShowGlobalConfirmationNoteL
-//
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CCbsUiConfirmationNote::ShowGlobalConfirmationNoteL( CCoeEnv& aCoeEnv )
- {
- // create active object
- CGlobalConfirmationQueryObserver* observer =
- new (ELeave) CGlobalConfirmationQueryObserver();
-
- if (iConfQueryObserver)
- {
- delete iConfQueryObserver;
- iConfQueryObserver = NULL;
- }
- iConfQueryObserver = observer;
- iConfQueryObserver->ConstructL();
-
- // show critical level note
- CAknGlobalConfirmationQuery* dlg = CAknGlobalConfirmationQuery::NewL();
- if (iGlobalConfirmationQuery)
- {
- delete iGlobalConfirmationQuery;
- iGlobalConfirmationQuery = NULL;
- }
- iGlobalConfirmationQuery = dlg;
-
- HBufC* noteText = StringLoader::LoadLC(
- R_TEXT_NOTE_NOT_ENOUGH_MEMORY, &aCoeEnv);
-
- iGlobalConfirmationQuery->ShowConfirmationQueryL(
- iConfQueryObserver->iStatus,
- *noteText,
- R_AVKON_SOFTKEYS_OK_EMPTY);
-
- CleanupStack::PopAndDestroy(noteText);
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiEditTopicDlg.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implementation of CCbsUiEditTopicDlg.
-*
-*
-*/
-
-
-// INCLUDES
-#include <avkon.hrh> // EMultilineFirstLine, EMultilineSecondLine
-#include <layoutmetadata.cdl.h> // Layout_Meta_Data::IsLandscapeOrientation()
-#include <AknUtils.h> // AknTextUtils
-#include <aknQueryControl.h>
-#include <cbsuiApp.rsg>
-#include <StringLoader.h>
-#include <AknDef.h> // KEikDynamicLayoutVariantSwitch
-#include "Cbsuiapp.hrh"
-#include "CCbsUiEditTopicDlg.h"
-#include "CCbsUiTopicListView.h"
-#include "CbsUiPanic.h"
-#include "CbsUiUtility.h"
-
-
-//CONSTANTS
-_LIT(KDummyString,"");
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CCbsUiEditTopicDlg::CCbsUiEditTopicDlg( CCbsUiTopicListView& aTopicListView,
- TBool aType )
- :
-CAknMultiLineDataQueryDialog(ENoTone),
-iTopicListView(aTopicListView),
-iType(aType)
- {
- }
-
-// ---------------------------------------------------------
-// CCbsUiEditTopicDlg::ConstructL
-//
-// ---------------------------------------------------------
-//
-void CCbsUiEditTopicDlg::ConstructL( TDes& aDataText, TDes& aDataText2 )
- {
- SetDataL(aDataText, aDataText2);
- iUpdateLeftSoftKeyFirstTime = ETrue;
- }
-
-// ---------------------------------------------------------
-// CCbsUiEditTopicDlg::NewL
-//
-// ---------------------------------------------------------
-//
-CCbsUiEditTopicDlg* CCbsUiEditTopicDlg::NewL( TDes& aDataText, TDes& aDataText2,
- CCbsUiTopicListView& aTopicListView, TBool aType )
- {
- CCbsUiEditTopicDlg* self =
- new (ELeave) CCbsUiEditTopicDlg(aTopicListView, aType);
- CleanupStack::PushL(self);
- self->ConstructL(aDataText, aDataText2);
- CleanupStack::Pop(); // self
-
- return self;
- }
-
-// Destructor
-CCbsUiEditTopicDlg::~CCbsUiEditTopicDlg()
- {
- }
-
-// ---------------------------------------------------------
-// CCbsUiEditTopicDlg::OkToExitL
-//
-// ---------------------------------------------------------
-//
-TBool CCbsUiEditTopicDlg::OkToExitL( TInt aButtonId )
- {
- // just to update the values
- TBool okToExit( CAknMultiLineDataQueryDialog::OkToExitL( aButtonId ) );
- if ( okToExit )
- {
- TBuf<KCbsDbTopicNameLength> dummy( KDummyString );
- TBuf<KCbsDbTopicNameLength> topicNumberStr;
- topicNumberStr = SecondData( dummy );
- AknTextUtils::ConvertDigitsTo( topicNumberStr, EDigitTypeWestern );
- TLex lex( topicNumberStr );
- TCbsTopicNumber tn;
-
- // No need to panic!
- User::LeaveIfError( lex.Val( tn, EDecimal ) );
-
- TCbsTopicName topicName;
-
- topicName.Append( FirstData( dummy ) );
-
- TInt ret( KErrGeneral ); // just to differ from KErrNone
-
- ret = iTopicListView.EditTopic( iType, tn, topicName );
-
- switch ( ret )
- {
- case KErrDiskFull:
- User::Leave( KErrDiskFull );
- break;
- case KErrNone:
- // do nothing
- break;
- default:
- // shows the error note and the dialog is not closed
- CbsUiUtility::ShowErrorNoteL( R_TEXT_NOTE_NUMBER_ERROR );
- okToExit = EFalse;
- SetCursorAndFocusL();
- break;
- }
- }
-
- return okToExit;
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiEditTopicDlg::LineChangedL
-//
-// ---------------------------------------------------------
-//
-void CCbsUiEditTopicDlg::LineChangedL( TInt /*aControlId*/ )
- {
- UpdateLeftSoftKeyL();
- }
-
-
-// ----------------------------------------------------
-// CCbsUiEditTopicDlg::HandleResourceChange
-//
-// ----------------------------------------------------
-void CCbsUiEditTopicDlg::HandleResourceChange( TInt aType )
- {
- CAknMultiLineDataQueryDialog::HandleResourceChange( aType );
-
- if( aType == KEikDynamicLayoutVariantSwitch )
- {
- TRAPD( ignore, UpdateLeftSoftKeyL( ) );
- if( ignore )
- {
- ignore = KErrNone; //Prevent ARMV5 compilation varning
- }
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiEditTopicDlg::UpdateLeftSoftKeyL
-// Note: iUpdateLeftSoftKeyFirstTime must use because when we
-// go to UpdateLeftSoftKeyL() method first time then IdOfFocusControl()
-// method doesn't work ok yet.
-// ---------------------------------------------------------
-//
-void CCbsUiEditTopicDlg::UpdateLeftSoftKeyL()
- {
- if( ( Layout_Meta_Data::IsLandscapeOrientation() ) &&
- ( ( IdOfFocusControl() == EMultilineFirstLine) || iUpdateLeftSoftKeyFirstTime ) )
- {
- MakeLeftSoftkeyVisible( ETrue );
- }
- else
- {
- TBuf<EMaxTopicNumberLength> buf;
- SecondControl()->GetText( buf );
- AknTextUtils::ConvertDigitsTo( buf, EDigitTypeWestern );
- TLex lex( buf );
- TInt topicNumber( -1 );
- if ( lex.Val( topicNumber ) == KErrNone )
- {
- MakeLeftSoftkeyVisible( ETrue );
- }
- else
- {
- MakeLeftSoftkeyVisible( EFalse );
- }
- }
- iUpdateLeftSoftKeyFirstTime = EFalse;
- }
-
-// ---------------------------------------------------------
-// CCbsUiEditTopicDlg::SetCursorAndFocusL
-//
-// ---------------------------------------------------------
-//
-void CCbsUiEditTopicDlg::SetCursorAndFocusL()
- {
- TryChangeFocusToL(EMultilineSecondLine);
- CAknQueryControl* control =
- STATIC_CAST( CAknQueryControl*,
- Control(EMultilineSecondLine) );
- CEikEdwin* edwin = STATIC_CAST(
- CEikEdwin*, control->ControlByLayoutOrNull(EDataLayout) );
- edwin->SetSelectionL( control->GetTextLength(),0 );
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiLanguageSettingPage.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,239 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implementation of CCbsUiLanguageSettingPage.
-*
-*
-*/
-
-
-// INCLUDES
-#include <cbsuiApp.rsg>
-#include <AknQueryDialog.h>
-#include "CCbsUiLanguageSettingPage.h"
-#include "CCbsUiListQueryDialog.h"
-#include "CbsUiPanic.h"
-#include "CbsUiConstants.h"
-#include "MCbs.h"
-
-
-
-// CONSTANTS
-const TInt KFirstLaunch = 1;
-const TInt KAverageReceivedLanguages = 4;
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CCbsUiLanguageSettingPage::CCbsUiLanguageSettingPage(
- TInt aResourceID,
- TInt& aCurrentSelectionIndex,
- CDesCArrayFlat* aItemArray,
- MCbs& aServer )
- :
- CAknRadioButtonSettingPage(aResourceID, aCurrentSelectionIndex, aItemArray),
- iServer(aServer),
- iSelectionIndex(aCurrentSelectionIndex),
- iArray(*aItemArray)
- {
- }
-
-// ---------------------------------------------------------
-// CCbsUiLanguageSettingPage::OkToExitL
-//
-// (other iItems were commented in a header).
-// ---------------------------------------------------------
-//
-TBool CCbsUiLanguageSettingPage::OkToExitL( TBool aAccept )
- {
- __ASSERT_DEBUG( &iServer, CbsUiPanic(EServerNullError) );
-
- // if ok key has been pushed, then this level options
- // settings will be made
- if ( aAccept )
- {
- TCbsDbLanguages lang;
- iServer.GetLanguages(lang);
-
- switch ( iSelectionIndex )
- {
- case ECbsUiAll:
- lang.iLanguages[ECbsAll] = ETrue;
- lang.iLanguages[ECbsOther] = EFalse;
- break;
- case ECbsUiSelected:
- // don't set languages after this, allready set in language dlg
- LaunchLanguageDialogL();
- break;
- case ECbsUiOther:
- lang.iLanguages[ECbsAll] = EFalse;
- lang.iLanguages[ECbsOther] = ETrue;
- break;
- default:
- __ASSERT_DEBUG( 0, CbsUiPanic(EErrInvalidValue) );
- break;
- }
-
- if ( iSelectionIndex == ECbsUiAll || iSelectionIndex == ECbsUiOther )
- {
- User::LeaveIfError( iServer.SetLanguages(lang) );
- }
- }
-
-
- return ETrue;
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiLanguageSettingPage::OfferKeyEventL
-//
-// (other iItems were commented in a header).
-// ---------------------------------------------------------
-//
-TKeyResponse CCbsUiLanguageSettingPage::OfferKeyEventL(
- const TKeyEvent& aKeyEvent,
- TEventCode aType )
- {
- __ASSERT_DEBUG( ListBoxControl(), CbsUiPanic(EListBoxNullError) );
-
- switch ( aKeyEvent.iCode )
- {
- case EKeyOK:
- LaunchLanguageDialogL();
- break;
- default:
- break;
- }
-
- return CAknSettingPage::OfferKeyEventL( aKeyEvent, aType );
- }
-
-// ---------------------------------------------------------
-// CCbsUiLanguageSettingPage::GetLanguagesL
-//
-// (other iItems were commented in a header).
-// ---------------------------------------------------------
-//
-void CCbsUiLanguageSettingPage::GetLanguagesL(
- CArrayFix<TInt>& aIndexArray, TCbsDbLanguages& aLanguages )
- {
- iServer.GetLanguages(aLanguages);
-
- for ( TInt j(0); j < ECbsOther; j++ )
- {
- if ( aLanguages.iLanguages[j] )
- {
- aIndexArray.AppendL(j);
- }
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiLanguageSettingPage::LaunchLanguageDialogL
-//
-// (other iItems were commented in a header).
-// ---------------------------------------------------------
-//
-void CCbsUiLanguageSettingPage::LaunchLanguageDialogL()
- {
- iCurrentLaunchingId++;
-
- if ( iCurrentLaunchingId == KFirstLaunch )
- {
- if ( ListBoxControl()->CurrentItemIndex() == ECbsUiSelected )
- {
- CArrayFixFlat<TInt>* indexArray =
- new (ELeave) CArrayFixFlat<TInt>(KAverageReceivedLanguages);
- CleanupStack::PushL(indexArray);
-
- TCbsDbLanguages languages;
- GetLanguagesL(*indexArray, languages);
-
- CCbsUiListQueryDialog* dlg = new (ELeave)
- CCbsUiListQueryDialog(*indexArray);
- TInt ret( dlg->ExecuteLD(R_LANGUAGE_MULTISELECTION_LIST_QUERY) );
-
- if( ret )
- {
- SetLanguagesL(*indexArray, languages);
- }
- else
- {
- iCurrentLaunchingId--;
- User::Leave( KErrNone );
- }
-
- CleanupStack::PopAndDestroy(); // indexArray;
- }
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiLanguageSettingPage::SetLanguagesL
-//
-// (other iItems were commented in a header).
-// ---------------------------------------------------------
-//
-void CCbsUiLanguageSettingPage::SetLanguagesL(
- CArrayFix<TInt>& aIndexArray, TCbsDbLanguages& aLanguages )
- {
- // just clearing the language selection before setting them
- for ( TInt i(0); i < ECbsOther; i++ )
- {
- aLanguages.iLanguages[i] = EFalse;
- }
-
- // set the values which are chosen
- if ( &aIndexArray )
- {
- TInt count( aIndexArray.Count() );
-
- for (TInt i(0); i < count; i++)
- {
- TInt selectedIndex( aIndexArray.At(i) );
- __ASSERT_DEBUG( selectedIndex < ECbsOther,
- CbsUiPanic(EErrIndexOutOfBounds) );
- aLanguages.iLanguages[selectedIndex] = ETrue;
- }
-
- TBool languageSelected( count > 0 );
- if ( languageSelected )
- {
- aLanguages.iLanguages[ECbsAll] = EFalse;
- aLanguages.iLanguages[ECbsOther] = EFalse;
- }
- else
- {
- // The user can clear the languages and then previously
- // defined value will be selected.
- // If other has not been previously selected, then
- // all has to be selected
- if ( !aLanguages.iLanguages[ECbsOther] )
- {
- aLanguages.iLanguages[ECbsAll] = ETrue;
- }
- }
-
- User::LeaveIfError( iServer.SetLanguages( aLanguages ) );
- }
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiListQueryDialog.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implementation of CCbsUiListQueryDialog
-*
-*
-*/
-
-
-// INCLUDES
-#include <eikclb.h> // CEikColumnListBox
-#include <eikaufty.h> // MEikAppUiFactory
-#include <aknlists.h> // CAknSingleGraphicStyleListBox
-#include <gulicon.h> // CGulIcon
-#include <eikclbd.h> // CColumnListBoxData
-#include <aknnavide.h> // CAknNavigationDecorator
-#include <akntitle.h> // CAknTitlePane
-#include <barsread.h> // TResourceReader
-#include <AknIconArray.h>
-#include <StringLoader.h>
-#include "CCbsUiListQueryDialog.h"
-#include "CbsUiPanic.h"
-#include "MCbs.h"
-
-
-
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ constructor can NOT contain any code, that
-// might leave.
-//
-CCbsUiListQueryDialog::CCbsUiListQueryDialog(
- CArrayFix<TInt>& aIndexArray ) :
- CAknListQueryDialog( &aIndexArray ),
- iIndexArray( aIndexArray )
- {
- }
-
-// ---------------------------------------------------------
-// CCbsUiListQueryDialog::PostLayoutDynInitL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiListQueryDialog::PostLayoutDynInitL()
- {
- CAknListQueryDialog::PostLayoutDynInitL();
- ListBox()->SetSelectionIndexesL( &iIndexArray );
- }
-
-// ---------------------------------------------------------
-// CCbsUiListQueryDialog::OkToExitL
-//
-//
-// ---------------------------------------------------------
-//
-TBool CCbsUiListQueryDialog::OkToExitL( TInt aKeyCode )
- {
- if ( aKeyCode == EEikBidOk )
- {
- iIndexArray.Reset();
- }
-
- return CAknListQueryDialog::OkToExitL( aKeyCode );
- }
-
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiMsgView.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1030 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implementation of CCbsUiMsgView.
-*
-*
-*/
-
-
-
-// INCLUDES
-#include <AknUtils.h> //AknTextUtils
-#include <bldvariant.hrh> // for feature flags
-#include <featmgr.h> // for feature manager
-#include <aknappui.h>
-#include <aknViewAppUi.h>
-#include <eikmenup.h>
-#include <avkon.hrh>
-#include <aknnavide.h>
-#include <txtrich.h> // CRichText
-#include <AknProgressDialog.h>
-#include <eikmenub.h>
-#include <hlplch.h>
-#include <avkon.rsg>
-#include <StringLoader.h>
-#include <cbsuiApp.rsg>
-#include <barsread.h>
-#include <AknQueryDialog.h>
-#include <eikmop.h>
-#include <FindItemmenu.rsg>
-#include <finditemmenu.h>
-#include <finditemdialog.h>
-#include <akntitle.h>
-#include "CCbsUIMsgView.h"
-#include "Cbsuiapp.hrh"
-#include "CCbsUIMsgViewContainer.h"
-#include "CbsUiPanic.h"
-#include "CbsUiConstants.h"
-#include "CbsUiUtility.h"
-#include "CbsUiDebug.h"
-#include "MCbs.h"
-#include "CbsUiId.h" //KUidCbsUiappDef
-
-
-
-// CONSTANTS
-
-static const TUid KUidCbsUiappApp = { KUidCbsUiappDef };
-const TInt KCbsImmediateMessageIdInt = 313;
-const TInt KMaxAssumedDateTimeLength = 30;
-
-_LIT(KSpace, " ");
-_LIT(KLineBreak, "\n");
-const TInt KMaxSeparatorLenght = 5;
-const TInt KOneHotMarkedMessage = 1;
-
-
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-
-CCbsUiMsgView::CCbsUiMsgView( MCbs& aServer )
-:
-iServer( aServer )
- {
- }
-
-// Symbian OS default constructor can leave.
-void CCbsUiMsgView::ConstructL()
- {
- BaseConstructL( R_CBSUI_MSGVIEW );
- iFindItemMenu = CFindItemMenu::NewL( ECbsUiCmdFindItem );
- iFromOtherApplication = EFalse;
-
- CEikStatusPane* statusPane = StatusPane();
-
- iNaviContainer =
- STATIC_CAST( CAknNavigationControlContainer*, statusPane->
- ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
-
- }
-
-// Two-phased constructor.
-CCbsUiMsgView* CCbsUiMsgView::NewL( MCbs& aServer )
- {
- CCbsUiMsgView* self = new (ELeave) CCbsUiMsgView( aServer );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop();
- return self;
- }
-
-// Destructor
-CCbsUiMsgView::~CCbsUiMsgView()
- {
- CloseContextMenu();
-
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- }
-
- delete iContainer;
- delete iFindItemMenu;
-
- if ( iNaviContainer && iDecoratedLabel )
- {
- iNaviContainer->Pop ( iDecoratedLabel );
- delete iDecoratedLabel;
- }
- iDecoratedLabel = NULL;
-
- if ( iNaviContainer && iPreviousDecoratedLabel )
- {
- iNaviContainer->Pop ( iPreviousDecoratedLabel );
- delete iPreviousDecoratedLabel;
- }
- iPreviousDecoratedLabel = NULL;
-
- delete iMessage;
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::HandleNaviDecoratorEventL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::HandleNaviDecoratorEventL( TInt aEventID )
- {
-
- switch ( aEventID )
- {
- // Left arrow tapped from the navi pane
- case MAknNaviDecoratorObserver::EAknNaviDecoratorEventLeftTabArrow:
- {
- if( AknLayoutUtils::LayoutMirrored() )
- {
- MoveToNextMessageL();
- }
- else
- {
- MoveToPreviousMessageL();
- }
- break;
- }
- // Right arrow tapped from the navi pane
- case MAknNaviDecoratorObserver::EAknNaviDecoratorEventRightTabArrow:
- {
- if( AknLayoutUtils::LayoutMirrored() )
- {
- MoveToPreviousMessageL();
- }
- else
- {
- MoveToNextMessageL();
- }
- break;
- }
- default:
- {
- break;
- }
- }
-
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::DynInitMenuPaneL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::DynInitMenuPaneL( TInt aResourceId,
- CEikMenuPane* aMenuPane )
- {
- __ASSERT_DEBUG( aMenuPane, CbsUiPanic( EMenuPaneNullError ) );
- __ASSERT_DEBUG( iFindItemMenu, CbsUiPanic( EFindItemNullError ) );
-
- switch ( aResourceId )
- {
- case R_CBSUI_MSGVIEW_MENU:
- {
- iFindItemMenu->DisplayFindItemMenuItemL(
- *aMenuPane,
- ECbsUiappCmdMsgMenuDelete );
-
- if ( CbsUiUtility::IsSavedL(iCurrentHandle, iServer) )
- {
- aMenuPane->DeleteMenuItem( ECbsUiappCmdMsgMenuKeep );
- }
- if( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
- {
- aMenuPane->DeleteMenuItem( EAknCmdHelp );
- }
- break;
- }
- case R_FINDITEMMENU_MENU:
- {
- iFindItemMenu->DisplayFindItemCascadeMenuL( *aMenuPane );
- break;
- }
- default:
- break;
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::ProcessCommandL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::ProcessCommandL( TInt aCommand )
- {
- if ( iContextMenu )
- {
- iContextMenu->StopDisplayingMenuBar();
- CloseContextMenu();
- }
-
- // Context sensitive menu should be opened when MSK pressed
- switch ( aCommand )
- {
- case EAknSoftkeyContextOptions:
- HandleCommandL( EAknSoftkeyContextOptions );
- break;
- default:
- break;
- }
- // Call base class
- CAknView::ProcessCommandL( aCommand );
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::Id
-//
-//
-// ---------------------------------------------------------
-//
-TUid CCbsUiMsgView::Id() const
- {
- return TUid::Uid( ECbsUiMsgViewId );
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::MoveToNextMessage
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::MoveToNextMessageL()
- {
- // if a message is class 0, then changing the message
- // content is not allowed.
- if ( iIsClass0 )
- {
- return;
- }
-
- if ( SetHandleTo(iCurrentHandle, EToNext) )
- {
- DoLoadMessageL();
- }
-
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::MoveToPreviousMessage
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::MoveToPreviousMessageL()
- {
- // if a message is class 0, then changing the message
- // content is not allowed.
- if ( iIsClass0 )
- {
- return;
- }
-
- if ( SetHandleTo(iCurrentHandle, EToPrevious) )
- {
- DoLoadMessageL();
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::HandleCommandL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::HandleCommandL( TInt aCommand )
- {
- if ( iFindItemMenu && iFindItemMenu->CommandIsValidL( aCommand ) )
- {
- DoSearchL( aCommand );
- }
-
- TBool exit(EFalse); // program exits if true
-
- switch ( aCommand )
- {
- case EAknSoftkeyBack:
- {
- ActivateTopicViewL( CurrentTopicNumber(), iCurrentHandle );
- break;
- }
- case ECbsUiappCmdMsgMenuKeep:
- {
- if ( CbsUiUtility::SaveCurrentMessageL(iCurrentHandle, *this) ==
- KErrNone && iIsClass0 )
- {
- exit = ETrue;
-
- // show modal note
- CbsUiUtility::ShowConfirmationNoteL(
- R_TEXT_NOTE_MSG_KEPT, ETrue);
- }
- break;
- }
- case ECbsUiCmdCopyToClipboard:
- {
- iContainer->CopyToClipboardL();
- CbsUiUtility::ShowConfirmationNoteL(R_TEXT_NOTE_MSG_TO_CLIP);
- break;
- }
- case ECbsUiappCmdMsgMenuDelete:
- {
- if ( DeleteMessageL(iCurrentHandle) && iIsClass0 )
- {
- exit = ETrue;
- }
- break;
- }
- case EAknSoftkeyContextOptions:
- case ECbsUiappCmdOkKey:
- {
- LaunchContextMenuL();
- break;
- }
- case EAknCmdHelp:
- AppUi()->HandleCommandL(aCommand);
- break;
- case EAknSoftkeyExit: // let it run through
- case EAknCmdExit:
- {
- if ( !iFromOtherApplication )
- {
- // if it has been CBSUI then do this
- ActivateTopicListViewL();
- }
- else
- {
- exit = ETrue;
- }
- iFromOtherApplication = EFalse;
- break;
- }
- default:
- break;
- }
-
- if ( exit )
- {
- STATIC_CAST(
- MEikCommandObserver*, AppUi() )->ProcessCommandL(EAknCmdExit);
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::DoActivateL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::DoActivateL( const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage )
- {
- iIsClass0 = EFalse;
- TBool topicListViewActivated(EFalse);
-
- switch ( aCustomMessageId.iUid )
- {
- case KCbsUiCustomMessageIdInt:
- iFromOtherApplication = EFalse;
- Cba()->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_BACK);
- SetCurrentMessageHandle(aCustomMessage);
- break;
- case KCbsImmediateMessageIdInt:
- if ( aPrevViewId.iAppUid != KUidCbsUiappApp )
- {
- iFromOtherApplication = ETrue;
- }
- SetCurrentMessageHandle(aCustomMessage);
- Cba()->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_EXIT);
- Cba()->DrawDeferred();
- iIsClass0 = ETrue;
- break;
- default: // this should be soft notification
- iFromOtherApplication = EFalse;
- Cba()->SetCommandSetL(R_AVKON_SOFTKEYS_OPTIONS_BACK);
- topicListViewActivated = HandleSoftNotificationL();
- break;
- }
-
- if ( !topicListViewActivated )
- {
- if ( !iContainer )
- {
- iContainer = CCbsUiMsgViewContainer::NewL(*this, ClientRect());
- AppUi()->AddToViewStackL(*this, iContainer);
- }
-
- TInt err( DoLoadMessageL() );
-
- // if it is class 0 message and some error occurs
- if ( err != KErrNone && iIsClass0 )
- {
- User::Leave(err);
- }
-
- if ( iMessage )
- {
- iContainer->ActivateL();
- }
- else
- {
- // some error occured
- ActivateTopicViewL( CurrentTopicNumber(), iCurrentHandle );
- }
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::DoDeactivate()
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::DoDeactivate()
- {
- iServer.LockMessage(NULL);
-
- CloseContextMenu();
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- delete iContainer;
- iContainer = NULL;
- }
-
- delete iDecoratedLabel;
- iDecoratedLabel = NULL;
-
- DeleteOldMessage();
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::UpdateNaviPaneL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::UpdateNaviPaneL()
- {
-
- TInt currentPosition( KCbsErrValue );
- TInt totalMessages( KCbsErrValue );
-
- TInt err (
- GetMessagePosition( iCurrentHandle, currentPosition, totalMessages ) );
-
- TBool prev( currentPosition != 0 );
- TBool next( ( currentPosition + 1 ) < totalMessages );
-
- // If a message is class 0, then the navipane is empty
- if ( iIsClass0 || err != KErrNone )
- {
- // Delete the existed label before creating a new one
- // in case of memory leak
- CAknNavigationDecorator* oldLabel = iDecoratedLabel;
- iDecoratedLabel = CbsUiUtility::CreateEmptyNavigationPaneL();
- delete oldLabel;
- return;
- }
-
- // Create a new decorator
- CArrayFixFlat<TInt>* array = new( ELeave ) CArrayFixFlat<TInt>( 2 );
- CleanupStack::PushL( array );
- array->AppendL( currentPosition + 1 );
- array->AppendL( totalMessages );
- HBufC* messageLocationInTopic = StringLoader::LoadL( R_MESSAGE_LOCATION_IN_TOPIC, *array, iCoeEnv );
- CleanupStack::PopAndDestroy(); // array
- CleanupStack::PushL( messageLocationInTopic );
-
- CAknNavigationDecorator* newDecoratedLabel = iNaviContainer->CreateNavigationLabelL( *messageLocationInTopic );
- CleanupStack::PopAndDestroy(); // messageLocationInTopic
-
- CleanupStack::PushL( newDecoratedLabel );
-
- // Set new decorator on top of navi pane's decorator stack
- // ( topmost decorator is the one to show )
- iNaviContainer->PushL( *newDecoratedLabel );
-
- // Remove previous decorator from decorator stack and delete it
- if ( iPreviousDecoratedLabel )
- {
- iNaviContainer->Pop( iPreviousDecoratedLabel );
- delete iPreviousDecoratedLabel;
- iPreviousDecoratedLabel = NULL;
- }
-
- // Update decorator pointers to new ones
- iPreviousDecoratedLabel = iDecoratedLabel;
- iDecoratedLabel = newDecoratedLabel;
-
- __ASSERT_DEBUG( iDecoratedLabel, CbsUiPanic( EErrNullPointer ) );
-
- // Set observer for navi pane
- iDecoratedLabel->SetNaviDecoratorObserver( this );
-
- CleanupStack::Pop( newDecoratedLabel );
-
- iDecoratedLabel->MakeScrollButtonVisible( ETrue );
-
- if( AknLayoutUtils::LayoutMirrored() )
- {
- iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ELeftButton, !next );
- iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ERightButton, !prev );
- }
- else
- {
- iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ELeftButton, !prev );
- iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ERightButton, !next );
- }
-
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::SaveMessage
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiMsgView::SaveMessage( const TCbsMessageHandle& aHandle )
- {
- return iServer.SaveMessage(aHandle);
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::DoSearchL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::DoSearchL( TInt aCommand )
- {
- CFindItemDialog* dialog = CFindItemDialog::NewL(
- iContainer->GetEditor()->Read(0),
- iFindItemMenu->SearchCase(aCommand) );
- dialog->ExecuteLD();
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::TopicListChangedL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::TopicListChangedL( TCbsTopicListEvent /*aEvent*/, TCbsTopicNumber aTopicNumber )
- {
- if ( iContainer && (CurrentTopicNumber() == aTopicNumber) )
- {
- UpdateNaviPaneL();
- }
- }
-
-
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::HandleRectChangeInContainerL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::HandleRectChangeInContainerL()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- iContainer->UpdateMessageL( *iMessage );
- }
-
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::CloseContextMenu
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::CloseContextMenu()
- {
- if ( iContextMenu )
- {
- AppUi()->RemoveFromViewStack(*this, iContextMenu);
- delete iContextMenu;
- iContextMenu = NULL;
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::LaunchContextMenuL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::LaunchContextMenuL()
- {
- TInt rssName = R_CBSUI_MSG_KEEP_AND_DELETE_CONTEXT_MENUBAR;
-
- if ( CbsUiUtility::IsSavedL(iCurrentHandle, iServer) )
- {
- rssName = R_CBSUI_MSG_DELETE_CONTEXT_MENUBAR;
- }
-
- CloseContextMenu();
-
- __ASSERT_DEBUG( !iContextMenu, CbsUiPanic(EErrAllreadyExists) );
-
- iContextMenu = new (ELeave) CEikMenuBar;
- iContextMenu->ConstructL(
- this,
- 0,
- rssName );
-
- // Set type to context sensitive
- iContextMenu->SetMenuType( CEikMenuBar::EMenuContext );
-
- AppUi()->AddToViewStackL(
- *this,
- iContextMenu,
- ECoeStackPriorityMenu,
- ECoeStackFlagRefusesFocus );
-
- iContextMenu->TryDisplayMenuBarL();
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::DeleteOldMessage
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::DeleteOldMessage()
- {
- delete iMessage;
- iMessage = NULL;
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::DoLoadMessageL
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiMsgView::DoLoadMessageL()
- {
- TRAPD( err, LoadMessageL() );
-
- switch ( err )
- {
- case KErrNotFound:
- {
- // If the message cannot be found
- // it is not necessary to do anything.
- // It is just showing some other message (current).
- break;
- }
- case KErrNone:
- {
- // normal case
- __ASSERT_DEBUG( iMessage, CbsUiPanic(EErrNullPointer) );
- iContainer->UpdateMessageL(*iMessage);
- // navi pane has to be updated in all cases; expect when leave
- UpdateNaviPaneL();
- Cba()->SetCommandSetL( R_CBS_SOFTKEYS_OPTIONS_BACK__CONTEXTOPTIONS );
- break;
- }
- default:
- User::Leave( err );
- break;
- }
-
- return err;
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::ActivateTopicViewL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::ActivateTopicViewL( TCbsTopicNumber aTopicNumber, TCbsMessageHandle aHandle )
- {
- TPckgBuf<TCbsUiTopicActivationPckg> message;
- message().iTopicNumber = aTopicNumber;
- message().iMessageHandle = aHandle;
-
- AppUi()->ActivateLocalViewL(
- TUid::Uid(ECbsUiTopicViewId), KSetFocusToId, message );
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::SetCurrentMessageHandle
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::SetCurrentMessageHandle( const TDesC8& aMessageHandle )
- {
- TPckgBuf<TCbsMessageHandle> pckgMessageHandle;
- pckgMessageHandle.Copy(aMessageHandle);
- iCurrentHandle = pckgMessageHandle();
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::LoadMessageL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::LoadMessageL()
- {
- User::LeaveIfError( iServer.LockMessage(iCurrentHandle) );
-
- TCbsMessage message;
- TInt err( iServer.FindMessageByHandle(iCurrentHandle, message) );
- __CBSUI_ASSERT( err == KErrNone, CbsUiPanic(EErrMsgHandleNotFound) );
- User::LeaveIfError(err);
-
- // mark the message as read
- err = iServer.ReadMessage(iCurrentHandle);
- User::LeaveIfError(err);
-
- DeleteOldMessage();
- iMessage = HBufC::NewMaxL(message.iLength);
- TPtr messageContent = iMessage->Des();
-
- err = iServer.GetMessageContents(iCurrentHandle, messageContent);
-
- __CBSUI_ASSERT( err == KErrNone,
- CbsUiPanic(EMessageContentsError) );
-
- if ( err != KErrNone )
- {
- DeleteOldMessage();
- User::Leave(err);
- }
-
- AddDateAndTimeL(
- message.iDateTime,
- &iMessage, // address of pointer variable
- R_CBS_DATE_FORMAT_ARRAY );
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::AddDateAndTime
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::AddDateAndTimeL( const TInt64 aTime, HBufC** aMessage, TUint aResourceArrayId ) const
- {
- __ASSERT_DEBUG( aTime >= 0, CbsUiPanic(EErrInvalidValue) );
- __ASSERT_DEBUG( *aMessage, CbsUiPanic(EErrNullPointer) );
- __ASSERT_DEBUG( (*aMessage)->Length() > 0, CbsUiPanic(EErrEmptyDesc) );
- __ASSERT_DEBUG( aResourceArrayId > 0, CbsUiPanic(EErrInvalidValue) );
-
- HBufC* timeBuffer = HBufC::NewMaxLC( KMaxAssumedDateTimeLength );
- TInt bufLen( 0 );
- TTime time( aTime );
-
- // change universal time to local time
- TLocale locale;
- time += locale.UniversalTimeOffset();
-
- TPtr des = timeBuffer->Des();
- TInt length( ( *aMessage )->Length() );
-
- // for adding date and time to message
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC( reader, aResourceArrayId );
- TInt count( reader.ReadInt16() );
-
- TBuf<KMaxSeparatorLenght> separator( KLineBreak );
- TInt separatorsLength( KLineBreak().Length() + KSpace().Length() );
-
- for ( TInt i( 0 ); i < count; i++ )
- {
- TUint resourceId( reader.ReadUint32() );
-
- HBufC* format = iCoeEnv->AllocReadResourceLC( resourceId );
-
- time.FormatL( des, *format );
- AknTextUtils::DisplayTextLanguageSpecificNumberConversion( des );
-
- if ( i > 0 )
- {
- separator = KSpace;
- }
-
- bufLen += timeBuffer->Length();
- (*aMessage) = (*aMessage)->ReAllocL(
- length + bufLen + separatorsLength );
-
- // have to get a new pointer after reallocation
- TPtr ptr2 = ( *aMessage )->Des();
- ptr2.Append( separator );
- ptr2.Append( *timeBuffer );
-
- CleanupStack::PopAndDestroy(); // format
- }
-
- CleanupStack::PopAndDestroy( 2 ); // timeBuffer, reader
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::CurrentTopicNumber
-//
-//
-// ---------------------------------------------------------
-//
-TCbsTopicNumber CCbsUiMsgView::CurrentTopicNumber() const
- {
- return STATIC_CAST( TCbsTopicNumber, (iCurrentHandle >> 16) & 0xFFFF );
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::GetMessagePosition
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiMsgView::GetMessagePosition( TCbsMessageHandle aHandle, TInt& aPosition, TInt& aTotal )
- {
- TInt err( iServer.GetMessageIndexByHandle(aHandle, aPosition) );
-
- __CBSUI_ASSERT( err == KErrNone, CbsUiPanic(EErrMsgHandleNotFound) );
- __CBSUI_ASSERT( aPosition != KCbsErrValue, CbsUiPanic(EErrInvalidValue) );
-
- if ( err == KErrNone )
- {
- err = iServer.GetMessageCount( CurrentTopicNumber(), aTotal );
- }
-
- __CBSUI_ASSERT( err == KErrNone, CbsUiPanic(EErrMsgHandleNotFound) );
- __CBSUI_ASSERT( aPosition + 1 <= aTotal, CbsUiPanic(EErrMsgImbalance) );
-
- return err;
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::SetHandleTo
-//
-//
-// ---------------------------------------------------------
-//
-TBool CCbsUiMsgView::SetHandleTo( TCbsMessageHandle& aHandle, TMsgViewSetHandle aTo )
- {
- TCbsMessageHandle prev;
- TCbsMessageHandle next;
- TInt position(KCbsErrValue);
- TBool result(EFalse);
-
- TInt err( iServer.GetNextAndPrevMessageHandle(
- aHandle, prev, next, position) );
-
- if ( err == KErrNone )
- {
- __ASSERT_DEBUG(
- position >= 0 && position <= (ECbsTail | ECbsHead),
- CbsUiPanic(EErrInvalidValue) );
-
- switch ( aTo )
- {
- case EToPrevious:
- // if position is head it cannot go thru
- if ( (position & ECbsHead) == 0 )
- {
- aHandle = prev;
- result = ETrue;
- }
- break;
- case EToNext:
- // if position is tail it cannot go thru
- if ( (position & ECbsTail) == 0 )
- {
- aHandle = next;
- result = ETrue;
- }
- break;
- default:
- __ASSERT_DEBUG(0, CbsUiPanic(EErrInvalidValue));
- break;
- }
- }
-
- return result;
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::DeleteMessageL
-//
-//
-// ---------------------------------------------------------
-//
-TBool CCbsUiMsgView::DeleteMessageL( TCbsMessageHandle aHandle )
- {
- TBool result(EFalse);
-
- CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-
- if ( dlg->ExecuteLD(R_DELETE_MSG_CONFIRMATION_QUERY) )
- {
- TCbsMessageHandle handleToBeFocused(aHandle);
-
- if ( !SetHandleTo(handleToBeFocused, EToNext) )
- {
- if ( !SetHandleTo(handleToBeFocused, EToPrevious) )
- {
- // next or previous could not be set, 0 will unlock message
- handleToBeFocused = 0;
- }
- }
-
- // Unlock message to be deleted and lock next message before delete
- __ASSERT_DEBUG(handleToBeFocused != aHandle,
- CbsUiPanic(EErrInvalidValue));
-
- iServer.LockMessage(handleToBeFocused);
- iServer.DeleteMessage(aHandle);
-
- // free handleToBeFocused message
- if ( handleToBeFocused != 0)
- {
- iServer.LockMessage(NULL);
- }
-
- // Topic number is still the same even if the message is
- // deleted.
- ActivateTopicViewL( CurrentTopicNumber(), handleToBeFocused );
- result = ETrue;
- }
-
- return result;
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::ActivateTopicListViewL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgView::ActivateTopicListViewL() const
- {
- AppUi()->ActivateLocalViewL( TUid::Uid(ECbsUiTopicListViewId) );
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgView::HandleSoftNotification
-//
-//
-// ---------------------------------------------------------
-//
-TBool CCbsUiMsgView::HandleSoftNotificationL()
- {
- TCbsTopic topic;
- TInt err;
- TBool result( EFalse );
- TInt count( iServer.NumberOfUnreadHotmarkedMessages() );
- __ASSERT_DEBUG(
- count >= KOneHotMarkedMessage, CbsUiPanic(EErrInvalidValue) );
-
- switch ( count )
- {
- case KOneHotMarkedMessage:
- iServer.GetHotmarkedMessageHandle( iCurrentHandle );
- err = iServer.FindTopicByNumber( CurrentTopicNumber(), topic );
- if ( err == KErrNone )
- {
- //Update Title pane
- CEikStatusPane* sp = StatusPane();
- CAknTitlePane* title =
- STATIC_CAST(CAknTitlePane*, sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle) ) );
- title->SetTextL( topic.iName );
- }
- break;
- default: // Many hot marked messages
- ActivateTopicListViewL();
- result = ETrue;
- break;
- }
-
- return result;
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiMsgViewContainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,754 +0,0 @@
-/*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of CCbsUiMsgViewContainer class.
-*
-*
-*/
-
-
-// INCLUDES
-#include <bldvariant.hrh> // for feature flags
-#include <eikenv.h>
-#include <AknLayoutDef.h> // enum TAknLayoutId
-#include <aknenv.h> // for iAvkonEnv
-#include <AknUtils.h> // AknLayoutUtils
-#include <sysutil.h> // FFS critical level check
-#include <eikrted.h>
-#include <barsread.h>
-#include <txtrich.h>
-#include <calslbs.h>
-#include <baclipb.h>
-#include <aknkeys.h>
-#include <applayout.cdl.h> // Multiline_Message_writing_texts_Line_3
-#include <AknLayout2ScalableDef.h> // TAknLayoutScalableParameterLimits
-#include <aknlayoutscalable_apps.cdl.h> // list_single_mce_message_pane_ParamLimits().iRows
-#include <AknDef.h> // KEikDynamicLayoutVariantSwitch
-#include <AknsConstants.h> // KAknsMessageSkinChange
-#include <aknappui.h>
-#include <AknsBasicBackgroundControlContext.h> // CAknsBasicBackgroundControlContext
-#include <AknsUtils.h> // MAknsSkinInstance
-#include <AknsDrawUtils.h> // AknsDrawUtils
-#include <cbsuiApp.rsg>
-#include "CbsUiId.h"
-#include <csxhelp/cbs.hlp.hrh>
-#include "CCbsUIMsgViewContainer.h"
-#include "CCbsUIMsgView.h"
-#include "Cbsuiapp.hrh"
-#include "CbsUiPanic.h"
-#include <gdi.h>
-
-
-
-// LOCAL CONSTANTS AND MACROS
-const TInt KEditorNumOfLines = 7;
-const TInt KFirstScreen = 0;
-const TInt KOneScreen = 1;
-const TInt KMsgNumberOfControls = 1;
-const TInt KMsgControlIndexEditor = 0;
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-CCbsUiMsgViewContainer::CCbsUiMsgViewContainer( CCbsUiMsgView& aMsgView )
-: iMsgView(aMsgView)
- {
- }
-
-// Symbian OS default constructor can leave.
-void CCbsUiMsgViewContainer::ConstructL( const TRect& aRect )
- {
- CreateWindowL();
- SetMopParent(&iMsgView);
-
- iEditor = CreateEditorL();
- SetReadOnly(ETrue);
-
- SetRect(aRect);
-
- // for Skin Support, Create background control context:
- iBackGroundControlContext = CAknsBasicBackgroundControlContext::NewL(
- KAknsIIDQsnBgAreaMain, // Default mainpane skinning
- Rect(), // Layout to the entire client rect
- EFalse );
- if ( iBackGroundControlContext )
- {
- iEditor->SetSkinBackgroundControlContextL( iBackGroundControlContext );
- }
- }
-
-
-// Two-phased constructor.
-CCbsUiMsgViewContainer* CCbsUiMsgViewContainer::NewL( CCbsUiMsgView& aMsgView,
- const TRect& aRect )
- {
- CCbsUiMsgViewContainer* self = new (ELeave)
- CCbsUiMsgViewContainer(aMsgView);
-
- CleanupStack::PushL(self);
- self->ConstructL(aRect);
- CleanupStack::Pop();
- return self;
- }
-
-// Destructor
-CCbsUiMsgViewContainer::~CCbsUiMsgViewContainer()
- {
- delete iBackGroundControlContext;
- delete iEditor;
- delete iSBFrame;
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::CountComponentControls
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiMsgViewContainer::CountComponentControls() const
- {
- TInt countScrollBarComponents( 0 );
- if ( iSBFrame )
- {
- countScrollBarComponents = iSBFrame->CountComponentControls();
- }
- return KMsgNumberOfControls + countScrollBarComponents;
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::ComponentControl
-//
-//
-// ---------------------------------------------------------
-//
-CCoeControl* CCbsUiMsgViewContainer::ComponentControl( TInt aIndex ) const
- {
- CCoeControl* control = NULL;
-
- TInt countScrollBarComponents( 0 );
- if ( iSBFrame )
- {
- countScrollBarComponents = iSBFrame->CountComponentControls();
- }
-
- switch ( aIndex )
- {
- case KMsgControlIndexEditor:
- control = iEditor;
- break;
- default:
- if ( iSBFrame
- && aIndex >= KMsgNumberOfControls
- && aIndex < countScrollBarComponents + KMsgNumberOfControls )
- {
- control = iSBFrame->ComponentControl( aIndex - KMsgNumberOfControls );
- }
- else
- {
- control = NULL;
- }
- break;
- }
- return control;
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::OfferKeyEventL
-//
-//
-// ---------------------------------------------------------
-//
-TKeyResponse CCbsUiMsgViewContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent,
- TEventCode /*aType*/ )
- {
- __ASSERT_DEBUG( iEditor, CbsUiPanic(EEditorNullError) );
-
- switch ( aKeyEvent.iCode )
- {
- case EKeyLeftArrow:
- {
- if( AknLayoutUtils::LayoutMirrored() )
- {
- iMsgView.MoveToNextMessageL();
- }
- else
- {
- iMsgView.MoveToPreviousMessageL();
- }
- break;
- }
- case EKeyRightArrow:
- {
- if( AknLayoutUtils::LayoutMirrored() )
- {
- iMsgView.MoveToPreviousMessageL();
- }
- else
- {
- iMsgView.MoveToNextMessageL();
- }
- break;
- }
- case EKeyUpArrow :
- {
- ScrollMessageUpL();
- break;
- }
- case EKeyDownArrow:
- {
- ScrollMessageDownL();
- break;
- }
- case EKeyOK:
- {
- iMsgView.ProcessCommandL( ECbsUiappCmdOkKey );
- break;
- }
- case EKeyBackspace:
- {
- iMsgView.ProcessCommandL( ECbsUiappCmdMsgMenuDelete );
- break;
- }
- default:
- {
- break;
- }
- }
-
- return EKeyWasConsumed;
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::UpdateMessageL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgViewContainer::UpdateMessageL( const TDesC& aMessage )
- {
- SetData16L(aMessage);
-
- InitializeMessageInfoL();
-
- CreateScrollBarFrameL();
- UpdateScrollIndicatorL();
-
- iEditor->DrawNow();
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::SizeChanged
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgViewContainer::SizeChanged()
- {
- if ( iEditor )
- {
- TRAPD( ignore, iEditor->SelectAllL() ); // This is needed before calling layoutedwin!
- if( ignore )
- {
- ignore = KErrNone; //Prevent ARMV5 compilation varning
- }
- if ( AknLayoutUtils::ScalableLayoutInterfaceAvailable() )
- {
- TAknLayoutScalableParameterLimits scalbleParamLimits;
- scalbleParamLimits = AknLayoutScalable_Apps::list_single_mce_message_pane_ParamLimits();
- AknLayoutUtils::LayoutEdwin( iEditor, Rect(), AppLayout::Multiline_Message_writing_texts_Line_3(scalbleParamLimits.LastRow() ) );
- }
- else
- {
- AknLayoutUtils::LayoutEdwin( iEditor, Rect(), AppLayout::Multiline_Message_writing_texts_Line_3( KEditorNumOfLines ) );
- }
- if ( iBackGroundControlContext )
- {
- TRAPD( ignore, iEditor->SetSkinBackgroundControlContextL( iBackGroundControlContext ) );
- if( ignore )
- {
- ignore = KErrNone; //Prevent ARMV5 compilation varning
- }
- }
- iEditor->DrawNow();
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewConctainer::CreateEditorL
-//
-//
-// ---------------------------------------------------------
-//
-CEikRichTextEditor* CCbsUiMsgViewContainer::CreateEditorL() const
- {
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader, R_MSG_READER);
-
- CEikRichTextEditor* editor = new (ELeave) CEikRichTextEditor;
- CleanupStack::PushL( editor );
- editor->SetContainerWindowL(*this);
- editor->ConstructFromResourceL( reader );
- CleanupStack::Pop(); // editor
- CleanupStack::PopAndDestroy(); // reader
-
- __ASSERT_DEBUG( editor, CbsUiPanic(EEditorNullError) );
-
- return editor;
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewConctainer::Draw
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgViewContainer::Draw( const TRect& aRect ) const
- {
- CWindowGc& aGc = SystemGc();
-
- // for clearing gap between editor and the view rect
- if ( IsReadyToDraw() )
- {
- aGc.SetBrushColor( AKN_LAF_COLOR (0) );
- DrawUtils::ClearBetweenRects( aGc, aRect, iEditor->Rect() );
- if ( iBackGroundControlContext )
- {//Draw the skin background
- MAknsSkinInstance* skin = AknsUtils::SkinInstance();
- AknsDrawUtils::Background( skin, iBackGroundControlContext, this, aGc, aRect );
- }
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::InitializeMessageInfoL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgViewContainer::InitializeMessageInfoL()
- {
-
- iEditor->TextLayout()->SetAmountToFormat( CTextLayout::EFFormatAllText );
-
- iEditor->CreateTextViewL();
- iEditor->NotifyNewFormatL();
- TInt numberOfLines = iEditor->TextLayout()->NumFormattedLines();
-
- if ( AknLayoutUtils::ScalableLayoutInterfaceAvailable() )
- {
- TInt linesInScreen;
- TAknLayoutScalableParameterLimits scalbleParamLimits;
- scalbleParamLimits = AknLayoutScalable_Apps::list_single_mce_message_pane_ParamLimits();
- linesInScreen = scalbleParamLimits.LastRow();
- iNumberOfScreens = ( numberOfLines - 1 ) / linesInScreen + 1;
- }
- else
- {
- iNumberOfScreens = ( numberOfLines - 1 ) / KEditorNumOfLines + 1;
- }
-
- iCurrentScreen = KFirstScreen;
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::CreateScrollBarFrameL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgViewContainer::CreateScrollBarFrameL()
- {
- if ( !iSBFrame )
- {
- iSBFrame = new (ELeave) CEikScrollBarFrame( iEditor, this, ETrue );
- }
-
- CAknAppUiBase* appUi = static_cast<CAknAppUiBase*>( iEikonEnv->EikAppUi() );
- if ( AknLayoutUtils::DefaultScrollBarType( appUi ) == CEikScrollBarFrame::EDoubleSpan )
- {
- // For EDoubleSpan type scrollbar
- iSBFrame->CreateDoubleSpanScrollBarsL( EFalse, EFalse ); // non-window owning scrollbar
- iSBFrame->SetTypeOfVScrollBar( CEikScrollBarFrame::EDoubleSpan );
- iSBFrame->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto );
- TAknWindowLineLayout scrollPane = AknLayoutScalable_Apps::scroll_pane_cp017().LayoutLine();
- AknLayoutUtils::LayoutVerticalScrollBar( iSBFrame, Rect(), scrollPane );
- }
- else
- {
- // For EArrowHead type scrollbar
- iSBFrame->SetTypeOfVScrollBar( CEikScrollBarFrame::EArrowHead );
- iSBFrame->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,CEikScrollBarFrame::EAuto );
- }
- ActivateL();
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::UpdateScrollIndicatorL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgViewContainer::UpdateScrollIndicatorL() const
- {
- if ( !iSBFrame )
- {
- return;
- }
-
-
- TEikScrollBarModel hSbarModel;
- TEikScrollBarModel vSbarModel;
- vSbarModel.iThumbSpan = 1;
-
- vSbarModel.iThumbPosition = iCurrentScreen; // where is the position
- // how many items
- // if there is only one screen we don't need scroll bars (= 0)
-
- if ( iNumberOfScreens == KOneScreen )
- {
- vSbarModel.iScrollSpan = 0;
- iSBFrame->SetScrollBarVisibilityL(
- CEikScrollBarFrame::EOff,
- CEikScrollBarFrame::EOff );
- }
- else
- {
- vSbarModel.iScrollSpan = iNumberOfScreens;
- iSBFrame->SetScrollBarVisibilityL(
- CEikScrollBarFrame::EOff,
- CEikScrollBarFrame::EAuto );
- }
-
- if ( iSBFrame->TypeOfVScrollBar() == CEikScrollBarFrame::EDoubleSpan )
- {
- // For EDoubleSpan type scrollbar
- TAknDoubleSpanScrollBarModel hDsSbarModel( hSbarModel );
- TAknDoubleSpanScrollBarModel vDsSbarModel( vSbarModel );
-
- TEikScrollBarFrameLayout layout;
- layout.iTilingMode = TEikScrollBarFrameLayout::EInclusiveRectConstant;
- TRect inclusiveRect( Rect( ) ); // We need to have two of these variables
- TRect clientRect( Rect( ) );
-
- iSBFrame->TileL( &hDsSbarModel, &vDsSbarModel, clientRect, inclusiveRect, layout );
- iSBFrame->SetVFocusPosToThumbPos( vSbarModel.iThumbPosition );
- }
- else
- {
- iSBFrame->Tile( &vSbarModel );
- iSBFrame->SetVFocusPosToThumbPos( vSbarModel.iThumbPosition );
- }
- iSBFrame->DrawScrollBarsNow();
-
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::UpdateCurrentScreen
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgViewContainer::UpdateCurrentScreen( TBool aIncrease )
- {
- if ( aIncrease )
- {
- if ( iCurrentScreen < iNumberOfScreens - 1 )
- {
- iCurrentScreen++;
- }
- }
- else
- {
- if ( iCurrentScreen > KFirstScreen )
- {
- iCurrentScreen--;
- }
- }
-
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::SetReadOnly
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgViewContainer::SetReadOnly( TBool aReadOnly )
- {
- __ASSERT_DEBUG(iEditor, CbsUiPanic(EErrNullPointer) );
- iEditor->SetReadOnly(aReadOnly);
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::SetDataContentL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgViewContainer::SetDataContentL( CRichText& aText )
- {
- iEditor->SetDocumentContentL(aText);
- iEditor->SelectAllL(); // This is needed before calling layoutedwin!
-
-
- if ( AknLayoutUtils::ScalableLayoutInterfaceAvailable() )
- {
- TAknLayoutScalableParameterLimits scalbleParamLimits;
- scalbleParamLimits = AknLayoutScalable_Apps::list_single_mce_message_pane_ParamLimits();
- AknLayoutUtils::LayoutEdwin( iEditor, Rect(), AppLayout::Multiline_Message_writing_texts_Line_3(scalbleParamLimits.LastRow() ) );
- }
- else
- {
- AknLayoutUtils::LayoutEdwin( iEditor, Rect(), AppLayout::Multiline_Message_writing_texts_Line_3( KEditorNumOfLines ) );
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::SetData16L
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgViewContainer::SetData16L( const TDesC& aBuf )
- {
- __ASSERT_DEBUG(aBuf.Length() > 0, CbsUiPanic(EErrInvalidValue) );
-
- CParaFormatLayer* globalParaLayer = CParaFormatLayer::NewL();
- CleanupStack::PushL(globalParaLayer);
-
- CCharFormatLayer* globalCharLayer = NULL;
- TRgb textColor;
-
- TCharFormat charFormat;
- TCharFormatMask formatMask;
-
- ( reinterpret_cast< CGlobalText* >( iEditor->Text() ) )
- ->GetCharFormat( charFormat, formatMask, 0, 0 );
-
- TInt error = AknsUtils::GetCachedColor(
- AknsUtils::SkinInstance(),
- textColor,
- KAknsIIDQsnTextColors,
- EAknsCIQsnTextColorsCG6 );
-
- if ( error != KErrNone )
- {
- textColor = KRgbBlack;
- }
-
- charFormat.iFontPresentation.iTextColor = textColor;
- formatMask.SetAll();
-
- globalCharLayer = CCharFormatLayer::NewL( charFormat, formatMask );
- CleanupStack::PushL( globalCharLayer );
-
- CRichText* richText = CRichText::NewL( globalParaLayer, globalCharLayer );
- CleanupStack::PushL( richText );
-
- TInt length( aBuf.Size() / 2 );
-
- for (TInt i = 0; i < length; i++)
- {
- if ( aBuf[i] == EKeyLineFeed )
- {
- richText->InsertL( i, CEditableText::EParagraphDelimiter );
- }
- else
- {
- richText->InsertL( i, aBuf[i] );
- }
- }
-
- SetDataContentL( *richText );
-
- iEditor->SetCharFormatLayer( globalCharLayer );
-
- CleanupStack::PopAndDestroy(); // richText
- CleanupStack::Pop(); // globalCharLayer
- CleanupStack::PopAndDestroy(); // globalParaLayer
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::GetEditor
-//
-//
-// ---------------------------------------------------------
-//
-CRichText* CCbsUiMsgViewContainer::GetEditor() const
- {
- __ASSERT_DEBUG(iEditor->RichText()->LdDocumentLength() > 0,
- CbsUiPanic(EErrInvalidValue) );
-
- return iEditor->RichText();
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::CopyToClipboard
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiMsgViewContainer::CopyToClipboardL() const
- {
- TInt msgLength;
-
- msgLength = iEditor->TextLength();
- if ( SysUtil::FFSSpaceBelowCriticalLevelL( &iCoeEnv->FsSession(), 2 * msgLength ) )
- {
- User::Leave( KErrDiskFull );
- }
-
- CPlainText* plainText = CPlainText::NewL();
-
- CleanupStack::PushL(plainText);
- plainText->InsertL( 0, iEditor->RichText()->Read(0) );
- plainText->ConvertAllFieldsToText();
-
- CClipboard* cb = CClipboard::NewForWritingLC( iCoeEnv->FsSession() );
- plainText->CopyToStoreL(
- cb->Store(),
- cb->StreamDictionary(),
- 0,
- plainText->DocumentLength() );
-
- cb->CommitL();
- CleanupStack::PopAndDestroy(2); //cb, plainText
- }
-
-
-// ----------------------------------------------------
-// CCbsUiMsgViewContainer::HandleResourceChange
-//
-//
-// ----------------------------------------------------
-void CCbsUiMsgViewContainer::HandleResourceChange( TInt aType )
- {
- CCoeControl::HandleResourceChange( aType );
- if( aType == KEikDynamicLayoutVariantSwitch )
- {
- TRAPD( ignore, iMsgView.HandleRectChangeInContainerL() );
- if ( iBackGroundControlContext )
- {
- iBackGroundControlContext->SetRect( Rect() );
- }
-
- if( ignore )
- {
- ignore = KErrNone; //Prevent ARMV5 compilation varning
- }
- }
- else
- {
- if( ( aType == KAknsMessageSkinChange ) && ( iBackGroundControlContext ) )
- {
- TRAPD( ignore, iEditor->SetSkinBackgroundControlContextL( iBackGroundControlContext ) );
- if( ignore )
- {
- ignore = KErrNone; //Prevent ARMV5 compilation varning
- }
- }
- }
-
- }
-
-
-// ----------------------------------------------------
-// CCbsUiMsgViewContainer::HandleScrollEventL
-// ----------------------------------------------------
-void CCbsUiMsgViewContainer::HandleScrollEventL( CEikScrollBar* aScrollBar,
- TEikScrollEvent aEventType )
- {
- switch( aEventType )
- {
- case EEikScrollUp:
- case EEikScrollPageUp:
- {
- ScrollMessageUpL();
- break;
- }
- case EEikScrollDown:
- case EEikScrollPageDown:
- {
- ScrollMessageDownL();
- break;
- }
- case EEikScrollThumbDragVert:
- {
- if( aScrollBar->ThumbPosition() > iCurrentScreen )
- {
- ScrollMessageDownL();
- }
- else if ( aScrollBar->ThumbPosition() < iCurrentScreen )
- {
- ScrollMessageUpL();
- }
- break;
- }
- default:
- break;
- }
- }
-
-// ----------------------------------------------------
-// CCbsUiMsgViewContainer::ScrollMessageUpL
-// ----------------------------------------------------
-void CCbsUiMsgViewContainer::ScrollMessageUpL()
- {
- if( iCurrentScreen > 0 )
- {
- iEditor->MoveDisplayL( TCursorPosition::EFPageUp );
- iEditor->MoveDisplayL( TCursorPosition::EFLineUp );
- UpdateCurrentScreen( EFalse );
- UpdateScrollIndicatorL();
- }
- }
-
-// ----------------------------------------------------
-// CCbsUiMsgViewContainer::ScrollMessageDownL
-// ----------------------------------------------------
-void CCbsUiMsgViewContainer::ScrollMessageDownL()
- {
- if( iCurrentScreen < iNumberOfScreens-1 )
- {
- iEditor->MoveDisplayL( TCursorPosition::EFPageDown );
- iEditor->MoveDisplayL( TCursorPosition::EFLineDown );
- UpdateCurrentScreen( ETrue );
- UpdateScrollIndicatorL();
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiMsgViewContainer::GetHelpContext
-//
-// Gets the control's help context.
-// ---------------------------------------------------------
-//
-void CCbsUiMsgViewContainer::GetHelpContext( TCoeHelpContext& aContext ) const
- {
- aContext.iMajor = TUid::Uid(KUidCbsUiappDef);
- aContext.iContext = KCBS_HLP_MSG;
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiSettingsMonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of CCbsUiSettingsMonitor class.
-*
-*
-*/
-
-
-// INCLUDES
-#include "MCbs.h"
-#include "CCbsUiSettingsMonitor.h"
-#include "CbsUiPanic.h"
-#include "MCbsUiSettingsObserver.h"
-
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-CCbsUiSettingsMonitor::CCbsUiSettingsMonitor(
- MCbs& aServer,
- MCbsUiSettingsObserver& aObserver )
- :
- CActive(EPriorityStandard),
- iContinue(ETrue),
- iServer(aServer),
- iObserver(aObserver)
- {
- }
-
-// Symbian OS default constructor can leave.
-void CCbsUiSettingsMonitor::ConstructL( )
- {
- CActiveScheduler::Add( this );
- IssueRequest();
- }
-
-// Two-phased constructor.
-CCbsUiSettingsMonitor* CCbsUiSettingsMonitor::NewL(
- MCbs& aServer, MCbsUiSettingsObserver& aObserver )
- {
- CCbsUiSettingsMonitor* self = new (ELeave) CCbsUiSettingsMonitor(
- aServer, aObserver);
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop();
-
- return self;
- }
-
-// Destructor
-CCbsUiSettingsMonitor::~CCbsUiSettingsMonitor()
- {
- iContinue = EFalse;
- Cancel();
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsMonitor::IssueRequest
-//
-// This metor issues request
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsMonitor::IssueRequest()
- {
- if ( iContinue )
- {
- SetActive();
- iServer.NotifySettingsChanged( iStatus, iEvent );
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsMonitor::RunL
-//
-// calls SettingsChanged method on application class
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsMonitor::RunL()
- {
- iObserver.SettingsChangedL(iEvent); // Doesn't inform the reason!!
-
- __ASSERT_DEBUG( iEvent == ECbsModifiedReceptionStatus ||
- iEvent == ECbsModifiedTopicDetectionStatus ||
- iEvent == ECbsModifiedLanguages,
- CbsUiPanic(EErrInvalidEvent) );
-
- if ( iContinue )
- {
- IssueRequest();
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsMonitor::DoCancel
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsMonitor::DoCancel()
- {
- iContinue = EFalse;
- iServer.NotifySettingsChangedCancel();
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiSettingsView.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,393 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of CCbsUiSettingsView class.
-*
-*
-*/
-
-
-// INCLUDES
-#include <AknsUtils.h> // CreateIconL
-#include <AknsConstants.h> // KAknsIIDQgnMenuCbCxt, KAknsIIDQgnMenuCb2Cxt
-#include <bldvariant.hrh> // for feature flags
-#include <featmgr.h> // for feature manager
-#include <aknViewAppUi.h>
-#include <avkon.hrh>
-#include <aknnavide.h>
-#include <hlplch.h>
-#include <cbsuiApp.rsg>
-#include <akntitle.h>
-#include <cbsuiapp.mbg>
-#include <barsread.h>
-#include "CCbsUiSettingsView.h"
-#include "ccbsuisettingsviewcontainer.h"
-#include "Cbsuiapp.hrh"
-#include "CCbsUiappApplication.h"
-#include "CbsUiId.h"
-#include "CbsUiUtility.h"
-#include "CbsUiPanic.h"
-#include "CCbsUiSettingsMonitor.h"
-#include "CbsUiConstants.h"
-#include "MCbs.h"
-
-
-
-// CONSTANTS
-static const TUid KUidCbsUiappApp = { KUidCbsUiappDef };
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ constructor
-CCbsUiSettingsView::CCbsUiSettingsView( MCbs& aServer )
-: iServer(aServer)
- {
- }
-
-// Symbian OS default constructor can leave.
-void CCbsUiSettingsView::ConstructL()
- {
- BaseConstructL(R_CBSUI_SETTINGSVIEW);
- iImageLibrary = iCoeEnv->AllocReadResourceL(R_CBS_IMAGE_LIBRARY);
- iSettingsMonitor = CCbsUiSettingsMonitor::NewL(iServer, *this);
- }
-
-// Two-phased constructor.
-CCbsUiSettingsView* CCbsUiSettingsView::NewL( MCbs& aServer )
- {
- CCbsUiSettingsView* self = new (ELeave) CCbsUiSettingsView( aServer );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop();
- return self;
- }
-
-// Destructor
-CCbsUiSettingsView::~CCbsUiSettingsView()
- {
- if (iContainer)
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
-
- // Destroy the control container
- delete iContainer;
- }
-
- delete iDecoratedLabel;
- delete iImageLibrary;
- delete iSettingsMonitor;
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsView::Id
-//
-//
-// ---------------------------------------------------------
-//
-TUid CCbsUiSettingsView::Id() const
- {
- return TUid::Uid( ECbsUiSettingsViewId );
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsView::HandleCommandL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsView::HandleCommandL( TInt aCommand )
- {
- switch ( aCommand )
- {
- case EAknSoftkeyBack:
- {
- // if it has been CBS then do this
- if ( !iFromOtherApplication )
- {
- ActivateTopicListViewL();
- }
- else
- {
- AppUi()->ProcessCommandL( EAknCmdExit );
- }
- break;
- }
- case EAknSoftkeyChange:
- {
- iContainer->HandleListViewActionL( EFalse );
- break;
- }
- case ECbsUiappSettingsViewCmdChange:
- {
- iContainer->HandleListViewActionL( ETrue );
- break;
- }
- case EAknCmdHelp:
- AppUi()->HandleCommandL( aCommand );
- break;
- case EAknCmdExit:
- {
- AppUi()->ProcessCommandL( EAknCmdExit );
- break;
- }
- default:
- break;
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsView::DoActivateL
-//
-// Creates container, and calls updatenavipaneL()
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsView::DoActivateL( const TVwsViewId& aPrevViewId,
- TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/ )
- {
- __ASSERT_DEBUG( &aPrevViewId, CbsUiPanic(EErrNullPointer) );
- iPrevViewId = aPrevViewId;
-
- if ( iPrevViewId.iAppUid != KUidCbsUiappApp )
- {
- iFromOtherApplication = ETrue;
- }
- else
- {
- iFromOtherApplication = EFalse;
- }
-
- if ( !iContainer )
- {
- iContainer = CCbsUiSettingsViewContainer::NewL(
- *this,
- ClientRect(),
- iServer );
- AppUi()->AddToViewStackL( *this, iContainer );
- }
- else
- {
- iContainer->SetFocusToFirstItem();
- }
-
- iContainer->ActivateL();
-
- UpdateNaviPaneL();
- UpdateTitlePaneL();
-
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsView::DoDeactivate
-//
-// Deletes container and decorated labels
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsView::DoDeactivate()
- {
- if ( iContainer )
- {
- // Remove view and its control from the view stack
- AppUi()->RemoveFromViewStack( *this, iContainer );
- // Destroy the container control
- delete iContainer;
- iContainer = NULL;
- }
-
- delete iDecoratedLabel;
- iDecoratedLabel = NULL;
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsView::UpdateNaviPaneL
-//
-// Must be implemented
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsView::UpdateNaviPaneL()
- {
- __ASSERT_DEBUG( !iDecoratedLabel, CbsUiPanic(EErrAllreadyExists) );
-
- delete iDecoratedLabel;
- iDecoratedLabel = NULL;
-
- iDecoratedLabel = CbsUiUtility::CreateEmptyNavigationPaneL();
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsView::UpdateSettingsL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsView::UpdateSettingsL()
- {
- if ( iContainer )
- {
- iContainer->UpdateSettingsL();
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsView::UpdateContextPaneL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsView::UpdateContextPaneL()
- {
- __ASSERT_DEBUG( iImageLibrary, CbsUiPanic(EErrNullPointer) );
-
- CEikStatusPane* sp = StatusPane();
-
- __ASSERT_DEBUG( sp, CbsUiPanic( EStatusPaneError ) );
-
- TBool reception;
- iServer.GetReceptionStatus( reception );
-
- CAknTitlePane* title = STATIC_CAST(CAknTitlePane*, sp->
- ControlL( TUid::Uid(EEikStatusPaneUidTitle) ));
-
- __ASSERT_DEBUG( title, CbsUiPanic(EErrNullPointer) );
-
- MAknsSkinInstance* skin = AknsUtils::SkinInstance();
-
- if (reception)
- {
- CFbsBitmap* bmp = NULL;
- CFbsBitmap* maskbmp = NULL;
-#ifdef __SCALABLE_ICONS
- AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCbCxt, bmp,
- maskbmp, *iImageLibrary, EMbmCbsuiappQgn_menu_cb,
- EMbmCbsuiappQgn_menu_cb_mask );
-#else
- AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCbCxt, bmp,
- maskbmp, *iImageLibrary, EMbmCbsuiappQgn_menu_cb_cxt,
- EMbmCbsuiappQgn_menu_cb_cxt_mask );
-#endif //__SCALABLE_ICONS
- title->SetSmallPicture(bmp, maskbmp, ETrue);
- }
- else
- {
- CFbsBitmap* bmp = NULL;
- CFbsBitmap* maskbmp = NULL;
-#ifdef __SCALABLE_ICONS
- AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCb2Cxt, bmp,
- maskbmp, *iImageLibrary, EMbmCbsuiappQgn_menu_cb_2,
- EMbmCbsuiappQgn_menu_cb_2_mask);
-#else
- AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCb2Cxt, bmp,
- maskbmp, *iImageLibrary, EMbmCbsuiappQgn_menu_cb_2_cxt,
- EMbmCbsuiappQgn_menu_cb_2_cxt_mask);
-#endif //__SCALABLE_ICONS
- title->SetSmallPicture(bmp, maskbmp, ETrue);
- }
-
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsView::SettingsChangedL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsView::SettingsChangedL( TCbsSettingsEvent aEvent )
- {
- if ( aEvent == ECbsModifiedLanguages )
- {
- UpdateSettingsL();
- }
- UpdateContextPaneL();
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsView::HandleRectChangeInContainer
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsView::HandleRectChangeInContainer()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsView::DynInitMenuPaneL
-//
-// Delete help menu item if help is not in use
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
- {
- switch ( aResourceId )
- {
- case R_CBSUI_SETTINGSVIEW_FILE_MENU:
- {
- if( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
- {
- aMenuPane->DeleteMenuItem( EAknCmdHelp );
- }
- break;
- }
- default:
- break;
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsView::ActivateTopicListViewL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsView::ActivateTopicListViewL() const
- {
- TPckgBuf<TCbsTopicNumber> pckgDummy(KCbsInvalidTopicNumber);
-
- AppUi()->ActivateLocalViewL(
- TUid::Uid(ECbsUiTopicListViewId),
- KSetFocusToCurrentId,
- pckgDummy);
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::UpdateTitlePaneL
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsView::UpdateTitlePaneL() const
- {
- CEikStatusPane *sp = StatusPane();
- CAknTitlePane *title = STATIC_CAST( CAknTitlePane*, sp->
- ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
-
- __ASSERT_DEBUG( sp && title, CbsUiPanic( EStatusOrTitlePaneError ) );
-
- TResourceReader titleReader;
- iCoeEnv->CreateResourceReaderLC( titleReader, R_QTN_CB_TITLE_CBS );
- title->SetFromResourceL( titleReader );
- CleanupStack::PopAndDestroy(); // titleReader
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiTopicListMonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implementaion of CCbsUiTopicListMonitor.
-*
-*
-*/
-
-
-// INCLUDES
-#include "MCbs.h"
-#include "CCbsUiTopicListMonitor.h"
-#include "MCbsUiTopicMonitorObserver.h"
-#include "CbsUiPanic.h"
-#include "CbsUiConstants.h"
-
-
-
-// CONSTANTS
-const TInt KNumberOfObservers = 3;
-
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CCbsUiTopicListMonitor::CCbsUiTopicListMonitor( MCbs& aServer )
- : CActive(EPriorityStandard), iContinue(ETrue), iServer(aServer)
- {
- }
-
-// Symbian OS default constructor can leave
-void CCbsUiTopicListMonitor::ConstructL( )
- {
- CActiveScheduler::Add(this);
- IssueRequest();
-
- iObservers = new (ELeave) TCbsUiMonitorObservers(KNumberOfObservers);
- }
-
-
-// Two-phased constructor.
-CCbsUiTopicListMonitor* CCbsUiTopicListMonitor::NewL( MCbs& aServer )
- {
- CCbsUiTopicListMonitor* self =
- new (ELeave) CCbsUiTopicListMonitor(aServer);
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop();
-
- return self;
- }
-
-
-// Destructor
-CCbsUiTopicListMonitor::~CCbsUiTopicListMonitor()
- {
- delete iObservers;
- Cancel();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListMonitor::IssueRequest()
-//
-//
-// ---------------------------------------------------------
-void CCbsUiTopicListMonitor::IssueRequest()
- {
- if ( iContinue )
- {
- SetActive();
-
- iServer.NotifyOnTopicListEvent(
- iStatus, ECbsTopicAllEvents, iEvent, iTopicNumber );
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicListMonitor::RunL
-//
-//
-// ---------------------------------------------------------
-void CCbsUiTopicListMonitor::RunL()
-
- {
- if ( iObservers->Count() > 0 )
- {
- for ( TInt i(0); i < iObservers->Count(); i++ )
- {
- iObservers->At(i)->TopicListChangedL(iEvent, iTopicNumber);
- }
- }
-
- __ASSERT_DEBUG(
- (iEvent & ECbsTopicAllEvents), CbsUiPanic(EErrInvalidEvent) );
-
- if ( iContinue )
- {
- IssueRequest();
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicListMonitor::DoCancel
-//
-//
-// ---------------------------------------------------------
-void CCbsUiTopicListMonitor::DoCancel()
- {
- iContinue = EFalse;
-
- iServer.NotifyOnTopicListEventCancel();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListMonitor::AddObserverL
-//
-//
-// ---------------------------------------------------------
-void CCbsUiTopicListMonitor::AddObserverL(
- MCbsUiTopicMonitorObserver* aObserver )
- {
- __ASSERT_DEBUG( iObservers, CbsUiPanic(EErrNullPointer) );
- __ASSERT_DEBUG( aObserver, CbsUiPanic(EErrNullPointer) );
-
- iObservers->AppendL(aObserver);
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiTopicListView.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1071 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implementation of CCbsUiTopicLIstView class.
-*
-*
-*/
-
-
-// INCLUDES
-#include <AknUtils.h> // AknTextUtils
-#include <bldvariant.hrh> // for feature flags
-#include <featmgr.h> // for feature manager
-#include <e32def.h>
-#include <akntitle.h>
-#include <aknViewAppUi.h>
-#include <aknnavide.h>
-#include <akntitle.h>
-#include <avkon.hrh>
-#include <barsread.h>
-#include <StringLoader.h>
-#include <eikmenup.h>
-#include <aknnotewrappers.h>
-#include <hlplch.h>
-#include <cbsuiApp.rsg>
-#include "MCbs.h"
-#include "CCbsUiTopicListView.h"
-#include "CCbsUiTopicListViewContainer.h"
-#include "CCbsUiEditTopicDlg.h"
-#include "Cbsuiapp.hrh"
-#include "CbsUiPanic.h"
-#include "CbsUiConstants.h"
-#include "CCbsUiAddFromIndexDialog.h"
-#include "CbsUiDebug.h"
-#include <AknNotifyStd.h> // ECellBroadcastNotification
-#include <AknSoftNotifier.h> // Soft Notification API
-
-
-// CONSTANTS
-const TInt KTopicNameLenght = 20;
-const TInt KCountOfAllTopics = 1000;
-const TInt KIndexTopic = 0;
-const TInt KTwoTopics = 2;
-
-// MODULE DATA STRUCTURES
-enum TMessageCounts { EManyNewMessages = -1, ENoNewMessages = 0, EOneNewMessage = 1 };
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CCbsUiTopicListView::CCbsUiTopicListView( MCbs& aServer ) : iServer( aServer ), iFocusState( ENoFocusUpdate )
- {
- }
-
-// Symbian OS default constructor can leave.
-void CCbsUiTopicListView::ConstructL()
- {
- BaseConstructL(R_CBSUI_TOPICLISTVIEW);
- iTopicNumberList = new (ELeave) TCbsUiTopicNumberList(KNumberOfStandardTopics);
- CEikStatusPane* statusPane = StatusPane();
- iNaviPane = STATIC_CAST( CAknNavigationControlContainer*, statusPane->
- ControlL( TUid::Uid(EEikStatusPaneUidNavi) ) );
- __ASSERT_DEBUG( iNaviPane, CbsUiPanic(ENaviPaneError) );
- }
-
-// Two-phased constructor.
-CCbsUiTopicListView* CCbsUiTopicListView::NewL( MCbs& aServer )
- {
- CCbsUiTopicListView* self = new (ELeave) CCbsUiTopicListView(aServer);
- CleanupStack::PushL(self);
- self->ConstructL();
- CleanupStack::Pop();
- return self;
- }
-
-// Destructor
-CCbsUiTopicListView::~CCbsUiTopicListView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack(*this, iContainer);
- }
- delete iContainer;
- delete iDecoratedLabel;
- delete iTopicNumberList;
- delete iBackgroundNote;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::ReloadTopicsL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::ReloadTopicsL()
- {
- __ASSERT_DEBUG( iTopicNumberList, CbsUiPanic(ETopicHandleError) );
- PrepareReloading();
- ReloadL();
- EndReloadingL();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::PrepareReloading
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::PrepareReloading()
- {
- if ( iContainer )
- {
- iContainer->ReloadStarts();
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::ReloadL
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::ReloadL()
- {
- iTopicNumberList->Reset();
-
- TInt count(0);
- iServer.GetTopicCount(count);
- __ASSERT_DEBUG( count >= 0, CbsUiPanic(ETopicCountError) );
-
- TCbsTopic topic;
-
- for ( TInt index(0); index < count; index++ )
- {
- // First, get the topic.
- TInt rr( iServer.GetTopic(index, topic) );
- __CBSUI_ASSERT( rr == KErrNone, CbsUiPanic(EErrTopicNotFound) );
-
- if ( rr == KErrNone )
- {
- // Offer the topic to the view.
- if ( iContainer )
- {
- iContainer->ReloadOfferTopicL(topic);
- }
-
- // And append to the handles list.
- iTopicNumberList->AppendL(topic.iNumber);
- }
- }
- }
-
-void CCbsUiTopicListView::EndReloadingL()
- {
- iContainer->ReloadEndsL();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::SetFocusAfterReload
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::SetFocusAfterReload( TTopicListViewFocusState aFocusState )
- {
- if ( aFocusState == ENoFocusUpdate )
- {
- return;
- }
-
- // if the focus need to be changed
- TInt focusedItem(KCbsErrValue);
-
- TBool setFocusToFirstItem(
- (aFocusState == ESetFocusToFirstItem) ||
- (FindTopicIndexByNumber(focusedItem, iCurrentTopicNumber) != KErrNone)
- );
-
- if ( setFocusToFirstItem )
- {
- // If there is some error let's try to put focus to first item
- focusedItem = 0;
- }
-
- __ASSERT_DEBUG( focusedItem != KCbsErrValue, CbsUiPanic(EErrInvalidValue) );
-
- SetFocusToTopic(focusedItem);
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::SetFocusToTopic
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::SetFocusToTopic( TInt aIndex )
- {
- if ( iTopicNumberList->Count() <= 0)
- {
- return;
- }
-
- __ASSERT_DEBUG( aIndex >= 0 && aIndex < iTopicNumberList->Count(),
- CbsUiPanic(EErrIndexOutOfBounds) );
-
- if (iContainer)
- {
- // first one in the list is the newest
- iContainer->SetCurrentItemIndex(aIndex);
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::UpdateCurrentTopicAfterDeletion
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::UpdateCurrentTopicAfterDeletion( TCbsTopicNumber aDeletedTopic )
- {
-
- TInt topicPosition(-1);
- TInt err( FindTopicIndexByNumber(topicPosition, aDeletedTopic) );
-
- TBool isLastTopic(
- ( (topicPosition + 1) == TotalTopics() ) &&
- (topicPosition >= 0)
- );
-
- if ( isLastTopic )
- {
- // then previous topic should be focused after deletion
- topicPosition--;
- }
- else
- {
- // then the next topic will be focused after deletion
- topicPosition++;
- }
-
- // if there is some error lets put the focus to the first item
- if ( topicPosition >= TotalTopics() ||
- topicPosition < 0 ||
- err != KErrNone )
- {
- topicPosition = 0;
- }
-
- __ASSERT_DEBUG( err == KErrNone, CbsUiPanic(EErrMsgNotFound) );
-
- iCurrentTopicNumber = iTopicNumberList->At(topicPosition);
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::TotalTopics
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicListView::TotalTopics() const
- {
- __ASSERT_DEBUG( iTopicNumberList->Count() >= 0, CbsUiPanic(EErrTopicsCountError) );
- return iTopicNumberList->Count();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::UpdateTitlePaneL
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::UpdateTitlePaneL() const
- {
- CEikStatusPane *sp = StatusPane();
- CAknTitlePane *title = STATIC_CAST(CAknTitlePane*, sp->
- ControlL( TUid::Uid(EEikStatusPaneUidTitle) ) );
-
- __ASSERT_DEBUG( sp && title, CbsUiPanic(EStatusOrTitlePaneError) );
-
- TResourceReader titleReader;
- iCoeEnv->CreateResourceReaderLC(titleReader, R_QTN_CB_TITLE_CBS);
- title->SetFromResourceL(titleReader);
- CleanupStack::PopAndDestroy(); // titleReader
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::UpdateNaviPaneL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::UpdateNaviPaneL()
- {
-
- if ( iAddFromIndexDialogIsActive )
- {
- // No need to update navi pane
- return;
- }
-
- // let's keep a address of the previous
- // label so it is possible to delete
- // it, after the new label has been created.
- CAknNavigationDecorator* oldLabel = iDecoratedLabel;
-
- TInt unreadMessages(0);
- iServer.GetUnreadMessageCount(unreadMessages);
-
- CreateNewLabelL( GetInfoResourceId(unreadMessages), unreadMessages );
-
- // Old label has to be deleted and
- // the final label is destroyed in the destructor.
- if ( oldLabel )
- {
- delete oldLabel;
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::GetInfoResourceId
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicListView::GetInfoResourceId( TInt aUnreadMessages ) const
- {
- __ASSERT_DEBUG( aUnreadMessages >= 0, CbsUiPanic(EErrInvalidValue) );
-
- TInt result(EManyNewMessages);
-
- switch ( aUnreadMessages )
- {
- case ENoNewMessages:
- result = R_CB_TL_NO_NEW_MESSAGES;
- break;
- case EOneNewMessage:
- result = R_CB_TL_ONE_NEW_MESSAGE;
- break;
- default:
- break;
- }
-
- return result;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::CreateNewLabelL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::CreateNewLabelL( TInt aResourceId, TInt aUnreadMessages )
- {
- __ASSERT_DEBUG(
- aResourceId == EManyNewMessages ||
- aResourceId == R_CB_TL_NO_NEW_MESSAGES ||
- aResourceId == R_CB_TL_ONE_NEW_MESSAGE,
- CbsUiPanic(EErrInvalidValue) );
-
- HBufC* stringHolder = NULL;
-
- if ( aResourceId == EManyNewMessages )
- {
- stringHolder = StringLoader::LoadLC(
- R_CB_TL_NEW_MESSAGES, aUnreadMessages);
- }
- else
- {
- stringHolder = iCoeEnv->AllocReadResourceLC(aResourceId);
- }
-
- __ASSERT_DEBUG( stringHolder, CbsUiPanic(EErrNullPointer) );
- if ( stringHolder )
- {
- iDecoratedLabel = iNaviPane->CreateNavigationLabelL(*stringHolder);
- CleanupStack::PopAndDestroy(); // stringholder
- }
-
- __ASSERT_DEBUG( iDecoratedLabel, CbsUiPanic(EErrNullPointer) );
- iNaviPane->PushL(*iDecoratedLabel);
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::ShowTopicQueryL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::ShowTopicQueryL( TBool aType,
- TDes& aTopicName,
- TDes& aTopicNumber )
- {
- CCbsUiEditTopicDlg* dlg = CCbsUiEditTopicDlg::NewL(
- aTopicName, aTopicNumber, *this, aType );
- dlg->ExecuteLD( R_EDIT_TOPIC_QUERY );
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::ShowEditTopicQueryL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::ShowEditTopicQueryL()
- {
- TCbsTopic topic;
- TInt err( iServer.FindTopicByNumber( iCurrentTopicNumber, topic ) );
-
- if ( err != KErrNone )
- {
- User::Leave( KErrNone );
- }
-
- TBuf<KTopicNumberWidth> number;
- number.AppendNum( TInt( topic.iNumber ) );
- AknTextUtils::DisplayTextLanguageSpecificNumberConversion( number );
- ShowTopicQueryL( EFalse, topic.iName, number );
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::EditTopic
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicListView::EditTopic( TBool aType,
- TCbsTopicNumber aNumber,
- const TCbsTopicName aName )
- {
- TInt ret( KErrGeneral );
-
- if ( aType ) // add query
- {
- ret = AddTopic(aNumber, aName);
- }
- else // edit query
- {
- ret = UpdateTopic( iCurrentTopicNumber, aNumber, aName );
- if( ret == KErrNone )
- {
- iCurrentTopicNumber = aNumber;
- }
- }
-
- return ret;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::CheckNewTopicCountL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::CheckNewTopicCountL()
- {
- iNewTopicsCount = GetNewTopicsCount();
-
- __CBSUI_ASSERT( iNewTopicsCount >= 0, CbsUiPanic(EErrInvalidValue) );
-
- if ( iNewTopicsCount > ENoNewMessages )
- {
- if ( !iBackgroundNote )
- {
- iBackgroundNote = CIdle::NewL(CActive::EPriorityIdle);
- }
-
- TCallBack cb(ActivateBackgroundNoteL, this);
- iBackgroundNote->Start(cb);
- }
-
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::GetNewTopicsCount
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicListView::GetNewTopicsCount()
- {
- TInt newTopics(KCbsErrValue);
- if ( iServer.Connected() )
- {
-#ifdef _DEBUG
- TInt ret =
-#endif
- iServer.GetNewTopicsCount(newTopics);
-
- __CBSUI_ASSERT( ret == KErrNone, CbsUiPanic(EErrTopicsCountError) );
- }
-
- return newTopics;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::MarkCurrentHandle
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::MarkCurrentHandle()
- {
- TInt index( iContainer->CurrentPosition() );
-
- if ( index >= 0 && iTopicNumberList->Count() > index )
- {
- iCurrentTopicNumber = iTopicNumberList->At( index );
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::TopicListChangedL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::TopicListChangedL( TCbsTopicListEvent /*aEvent*/, TCbsTopicNumber /*aTopicNumber*/ )
- {
- if ( iContainer )
- {
- ReloadTopicsL();
- UpdateNaviPaneL();
- SetFocusAfterReload(iFocusState);
- iFocusState = ENoFocusUpdate;
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::HandleCommandL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::HandleCommandL( TInt aCommandId )
- {
-
- switch ( aCommandId )
- {
- case ECbsUiappCmdSwitchOpen:
- {
- // To open a right topic
- MarkCurrentHandle();
- ActivateTopicViewL();
- break;
- }
- case ECbsUiappCmdSwitchSubscribe:
- {
- // Change subscription status
- User::LeaveIfError(
- iServer.ChangeTopicSubscriptionStatus(
- iCurrentTopicNumber, ETrue ) );
-
- iFocusState = ESetFocusToCurrentHandle;
- break;
- }
- case ECbsUiappCmdSwitchUnsubscribe:
- {
- // Change subscription status
- User::LeaveIfError(
- iServer.ChangeTopicSubscriptionStatus(
- iCurrentTopicNumber, EFalse ));
- iFocusState = ESetFocusToCurrentHandle;
- break;
- }
- case ECbsUiappCmdSwitchHotmark: // Implementation is almost the same with
- // ECbsUiappCmdSwitchHotmark and
- // ECbsUiappCmdSwitchUnhotmark.
- case ECbsUiappCmdSwitchUnhotmark:
- {
- // Requires refresh
- TBool hot(EFalse);
-
- if ( aCommandId == ECbsUiappCmdSwitchHotmark )
- {
- hot = ETrue;
- TInt focusedItemIndex;
- if(FindTopicIndexByNumber(focusedItemIndex, iCurrentTopicNumber) == KErrNone)
- {
- TCbsTopic topic;
- // First, get the topic.
- TInt rr( iServer.GetTopic(focusedItemIndex, topic) );
- if ( rr == KErrNone )
- {
- if ( !topic.iSubscribed )
- {
- // Change subscription status to subscribed
- User::LeaveIfError(iServer.ChangeTopicSubscriptionStatus(
- iCurrentTopicNumber, ETrue )) ;
- }
- }
- }
- }
-
- User::LeaveIfError(iServer.ChangeTopicHotmarkStatus(iCurrentTopicNumber, hot));
- iFocusState = ESetFocusToCurrentHandle;
- break;
- }
- case ECbsUiappCmdSwitchSettings:
- {
- ActivateSettingsViewL();
- break;
- }
- // Topic sub menu pop up window commands.
- case ECbsUiappCmdSwitchAddManually:
- {
- TBuf<KTopicNameLenght> name;
- TBuf<KTopicNumberWidth> number;
-
- ShowTopicQueryL( ETrue, name, number );
- AknTextUtils::ConvertDigitsTo( number, EDigitTypeWestern );
-
- TInt topicNumber(KCbsErrValue);
- if ( number.Length() > 0 )
- {
- TLex lex(number);
- TInt err( lex.Val(topicNumber) );
-
- if ( err == KErrNone )
- {
- SetCurrentTopicNumber( (TCbsTopicNumber) topicNumber );
- }
- __CBSUI_ASSERT( err == KErrNone, CbsUiPanic(EErrNotANumber) );
- }
-
- iFocusState = ESetFocusToCurrentHandle;
- break;
- }
- case ECbsUiappCmdSwitchAddFromIndex:
- {
-#ifdef _DEBUG
- GetNewTopicsCount(); // just to reset
-#endif
- // topic detection need to shut down when
- // add from index dialog is shown.
- TBool topicDetection;
- iServer.GetTopicDetectionStatus(topicDetection);
-
- if ( topicDetection )
- {
- User::LeaveIfError( iServer.SetTopicDetectionStatus(EFalse) );
- }
-
- iAddFromIndexDialogIsActive = ETrue;
- ActivateAddFromIndexViewL();
-
- __ASSERT_DEBUG(GetNewTopicsCount() == 0, CbsUiPanic(ETopicCountError) );
-
- iAddFromIndexDialogIsActive = EFalse;
- UpdateTitlePaneL();
- UpdateNaviPaneL();
-
- if ( topicDetection )
- {
- User::LeaveIfError( iServer.SetTopicDetectionStatus(topicDetection) );
- }
-
- iFocusState = ESetFocusToCurrentHandle;
- break;
- }
- case ECbsUiappCmdSwitchEdit:
- {
- ShowEditTopicQueryL();
- iFocusState = ESetFocusToCurrentHandle;
- break;
- }
- case ECbsUiappCmdSwitchDelete:
- {
- if ( iCurrentTopicNumber != KIndexTopic )
- {
- CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-
- if ( dlg->ExecuteLD(R_DELETE_TOPIC_CONFIRMATION_QUERY) )
- {
- TInt unreadHotmarkedMessages;
- User::LeaveIfError(
- iServer.DeleteTopic(iCurrentTopicNumber) );
- UpdateCurrentTopicAfterDeletion(iCurrentTopicNumber);
- unreadHotmarkedMessages = iServer.NumberOfUnreadHotmarkedMessages();
- if( unreadHotmarkedMessages <= 0 )
- {
- CAknSoftNotifier* notifier = CAknSoftNotifier::NewLC();
- notifier->CancelSoftNotificationL( ECellBroadcastNotification);
- CleanupStack::PopAndDestroy( notifier );
- }
- }
- iFocusState = ESetFocusToCurrentHandle;
- }
- break;
- }
- case ECbsUiappCmdSwitchDeleteAll:
- {
- TInt queryOk;
- CAknQueryDialog* dlg = CAknQueryDialog::NewL();
- queryOk= dlg->ExecuteLD(R_DELETE_ALL_TOPICS_CONFIRMATION_QUERY );
-
- if( queryOk )
- {
- User::LeaveIfError( iServer.DeleteAllTopics() );
- CAknSoftNotifier* notifier = CAknSoftNotifier::NewLC(); // on CS
- notifier->CancelSoftNotificationL( ECellBroadcastNotification);
- CleanupStack::PopAndDestroy( notifier );
- }
- iFocusState = ESetFocusToCurrentHandle;
- break;
- }
- case EAknCmdHelp:
- AppUi()->HandleCommandL(aCommandId);
- break;
- case EAknSoftkeyExit: // same functionality
- case EAknCmdExit:
- {
- ( (MEikCommandObserver*)AppUi() )->ProcessCommandL(EAknCmdExit);
- break;
- }
- default:
- break;
- }
- }
-
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::HandleRectChangeInContainer
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::HandleRectChangeInContainer()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::DoActivateL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::DoActivateL( const TVwsViewId& /*aPrevViewId*/,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage )
- {
- if ( !iContainer )
- {
- iContainer = CCbsUiTopicListViewContainer::NewL( *this, ClientRect() );
- AppUi()->AddToViewStackL( *this, iContainer );
- }
-
- TTopicListViewFocusState focus = ESetFocusToFirstItem;
-
- if ( aCustomMessageId == KSetFocusToId )
- {
- focus = ESetFocusToCurrentHandle;
- SetCurrentTopicNumber(aCustomMessage);
- }
- else if ( aCustomMessageId == KSetFocusToCurrentId )
- {
- focus = ESetFocusToCurrentHandle;
- }
- else
- {
- focus = ESetFocusToFirstItem;
- }
-
- ReloadTopicsL();
- SetFocusAfterReload(focus);
- UpdateTitlePaneL();
- UpdateNaviPaneL();
- iContainer->ActivateL();
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::AddTopic
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicListView::AddTopic( const TCbsTopicNumber& aNumber, const TCbsTopicName& aName )
- {
- __ASSERT_DEBUG( &aName, CbsUiPanic(EErrNullPointer) );
-
- TCbsTopic topic;
- topic.iHotmarked = EFalse;
- topic.iName = aName;
- topic.iNumber = aNumber;
- topic.iProtected = EFalse;
- topic.iSavedMessages = 0;
- topic.iUnreadMessages = 0;
- topic.iSubscribed = 0;
- return iServer.AddTopic( topic );
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::UpdateTopic
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicListView::UpdateTopic( const TCbsTopicNumber& aOldNumber,
- const TCbsTopicNumber& aNumber,
- const TCbsTopicName& aName )
- {
- __ASSERT_DEBUG( &aName, CbsUiPanic(EErrNullPointer) );
- return iServer.ChangeTopicNameAndNumber( aOldNumber, aNumber, aName );
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::DoDeactivate
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::DoDeactivate()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- }
- delete iContainer;
- iContainer = NULL;
- }
-
-void CCbsUiTopicListView::ViewActivatedL(
- const TVwsViewId& aPrevViewId,
- TUid aCustomMessageId,const
- TDesC8& aCustomMessage)
- {
- CheckNewTopicCountL();
- CAknView::ViewActivatedL(aPrevViewId, aCustomMessageId, aCustomMessage);
- }
-
-void CCbsUiTopicListView::ViewDeactivated()
- {
- // just to update
- GetNewTopicsCount();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::DynInitMenuPaneL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::DynInitMenuPaneL( TInt aResourceId,
- CEikMenuPane* aMenuPane )
- {
- __ASSERT_DEBUG( aMenuPane, CbsUiPanic( EMenuPaneNullError ) );
-
- TCbsTopic topic;
- TInt ret( iServer.GetTopic(iContainer->CurrentPosition() , topic) );
-
- // If topic doesn't exists it is better to leave and close the
- // menu.
- User::LeaveIfError(ret);
-
- if ( aResourceId == R_CBSUI_TOPICLISTVIEW_MENU )
- {
- MarkCurrentHandle(); // to freeze a selected item
-
- // If topic is subscribed,..
- if ( topic.iSubscribed )
- {
- // then remove subscribed item.
- aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchSubscribe );
- }
- else
- {
- // otherwise remove unsubscribed item.
- aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchUnsubscribe );
- }
-
- // And the same for hotmark/unhotmark.
- if ( topic.iHotmarked )
- {
- aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchHotmark );
- }
- else
- {
- aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchUnhotmark );
- }
-
- if( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
- {
- aMenuPane->DeleteMenuItem( EAknCmdHelp );
- }
- }
- else if ( aResourceId == R_CBSUI_TOPIC_MENU )
- {
- TInt topics;
- topics = iTopicNumberList->Count();
-
- // If there is no room for topics, then remove add manually.
- if ( topics >= KCountOfAllTopics )
- {
- aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchAddManually );
- }
-
- // If only index topic in topic list then "Delete all" menuitem is not shown
- if ( topics < KTwoTopics )
- {
- aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchDeleteAll );
- }
-
- // Protected topic can not be edited or deleted.
- if ( topic.iProtected )
- {
- aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchEdit );
- aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchDelete );
- }
-
- // Check if there are Index message received.
- iServer.StartCollectionBrowsing();
-
- if( !iServer.HasNextCollectionTopic() )
- {
- aMenuPane->DeleteMenuItem( ECbsUiappCmdSwitchAddFromIndex );
- }
- }
- else
- {
- //Does nothing
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::SetCurrentTopicNumber
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::SetCurrentTopicNumber( const TDesC8& aTopicNumber )
- {
- TPckgBuf<TCbsTopicNumber> pckgTopicNumber;
- pckgTopicNumber.Copy(aTopicNumber);
- iCurrentTopicNumber = pckgTopicNumber();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::SetCurrentTopicNumber
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::SetCurrentTopicNumber( const TCbsTopicNumber aTopicNumber)
- {
- iCurrentTopicNumber = aTopicNumber;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::Id
-//
-//
-// ---------------------------------------------------------
-//
-TUid CCbsUiTopicListView::Id() const
- {
- return TUid::Uid( ECbsUiTopicListViewId );
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::FindTopicIndexByNumber
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicListView::FindTopicIndexByNumber( TInt& aIndex,
- const TCbsTopicNumber& aTopicNumber )
- {
- TInt ret(KErrGeneral);
-
- for ( TInt i(0); i < iTopicNumberList->Count() && ret != KErrNone; i++ )
- {
- if ( iTopicNumberList->At(i) == aTopicNumber )
- {
- ret = KErrNone;
- aIndex = i;
- }
- }
- return ret;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::ActivateTopicViewL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::ActivateTopicViewL() const
- {
- TPckgBuf<TCbsTopicNumber> message( iCurrentTopicNumber );
-
- AppUi()->ActivateLocalViewL(
- TUid::Uid(ECbsUiTopicViewId), KCbsUiCustomMessageId, message );
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::ActivateSettingsViewL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::ActivateSettingsViewL() const
- {
- AppUi()->ActivateLocalViewL( TUid::Uid(ECbsUiSettingsViewId) );
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::ActivateAddFromIndexViewL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListView::ActivateAddFromIndexViewL()
- {
- CCbsUiAddFromIndexDialog* dialog =
- new ( ELeave ) CCbsUiAddFromIndexDialog( iServer );
-
- dialog->ExecuteLD(R_CBS_ADD_FROM_INDEX_DIALOG);
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListView::ActivateBackgroundNote
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicListView::ActivateBackgroundNoteL( TAny* aTopicList )
- {
- __ASSERT_DEBUG( aTopicList, CbsUiPanic(EErrNullPointer) );
- TInt newTopics( STATIC_CAST(CCbsUiTopicListView*, aTopicList)->iNewTopicsCount );
-
- if ( newTopics > ENoNewMessages )
- {
- HBufC* stringHolder = NULL;
- if ( newTopics > EOneNewMessage )
- {
- stringHolder = StringLoader::LoadLC(
- R_PLURAL_TOPIC_ADDED, newTopics );
- }
- else
- {
- stringHolder = STATIC_CAST(CCbsUiTopicListView*, aTopicList)->
- iCoeEnv->AllocReadResourceLC(
- R_TEXT_NOTE_NEW_TOPIC_ADDED );
- }
-
- CAknConfirmationNote* note = new (ELeave) CAknConfirmationNote;
- note->ExecuteLD(*stringHolder);
-
- CleanupStack::PopAndDestroy(); // stringholder
- }
-
- return KErrNone;
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiTopicListViewContainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,617 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* TopicListViewContainer owns the list box which shows topics.
-*
-*/
-
-
-// INCLUDES
-#include <akncontext.h> // CAknContextPane
-#include <cbsuiapp.mbg> // TMbmCbsuiapp
-#include <AknsConstants.h> // KAknsMessageSkinChange
-#include <AknsUtils.h> // CreateIconL, SkinInstance
-#include <AknUtils.h> // AknTextUtils
-#include <AknDef.h> // KEikDynamicLayoutVariantSwitch
-#include <barsread.h>
-#include <aknlists.h>
-#include <gulicon.h>
-#include <eikclbd.h>
-#include <AknIconArray.h>
-#include <data_caging_path_literals.hrh> // KDC_RESOURCE_FILES_DIR
-#include <cbsuiApp.rsg>
-#include "CbsUiId.h"
-#include <csxhelp/cbs.hlp.hrh>
-#include "CCbsUiTopicListViewContainer.h"
-#include "CCbsUiTopicListView.h"
-#include "Cbsuiapp.hrh"
-#include "CbsUiUtility.h"
-#include "CbsUiPanic.h"
-#include "CbsUiConstants.h"
-
-
-// CONSTANTS
-_LIT(KDirAndCbsUiAppMbmFile,"z:cbsuiapp.mbm");
-_LIT(KItemSeparator1, "\t ");
-_LIT(KItemSeparator2, "\t4");
-const TInt KSizeOfStatus = 1;
-const TInt KCountOfSeparator1 = 2;
-const TInt KNumberOfIconsInTopicListContainer = 5;
-const TUint KZeroFill = '0';
-const TUint KSubscribedAndNoMessages = '0';
-const TUint KSubscribedAndMessages = '1';
-const TUint KNotSubscribedAndNoMessages = '2';
-const TUint KNotSubscribedButMessagesExists = '3';
-
-
-//DATA TYPES
-enum TopicListViewIconArrayIndexes
- {
- ECbsPropCbSubs = 0,
- ECbsPropCbSubsUnread,
- ECbsPropCbUnsubs,
- ECbsPropCbUnsubsUnread,
- ECbsIndiCbHotAdd
- };
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-
-CCbsUiTopicListViewContainer::CCbsUiTopicListViewContainer( CCbsUiTopicListView& aListView )
- : iListView( aListView )
- {
- }
-
-// Symbian OS default constructor can leave.
-void CCbsUiTopicListViewContainer::ConstructL( const TRect& aRect )
- {
- CreateWindowL();
-
- SetMopParent(&iListView);
-
- iListBox = new(ELeave) CAknSingleGraphicHeadingStyleListBox;
- iListBox->SetContainerWindowL(*this);
-
- iListBox->ConstructL( this, EEikListBoxMultipleSelection );
-
- CDesCArrayFlat* array =
- new (ELeave) CDesCArrayFlat(KNumberOfStandardTopics);
-
- // changing the owner, shouldn't leave
- iListBox->Model()->SetItemTextArray( array );
-
- iListBox->CreateScrollBarFrameL( ETrue );
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
- CEikScrollBarFrame::EOff,
- CEikScrollBarFrame::EAuto );
- iListBox->SetListBoxObserver( this );
-
- SetRect( aRect );
- LoadIconsL();
- }
-
-// Two-phased constructor.
-CCbsUiTopicListViewContainer* CCbsUiTopicListViewContainer::NewL( CCbsUiTopicListView& aListView,
- const TRect& aRect )
- {
- CCbsUiTopicListViewContainer* self =
- new (ELeave) CCbsUiTopicListViewContainer( aListView );
-
- CleanupStack::PushL( self );
- self->ConstructL( aRect );
- CleanupStack::Pop();
-
- return self;
- }
-
-// Destructor
-CCbsUiTopicListViewContainer::~CCbsUiTopicListViewContainer()
- {
- delete iListBox;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::ReloadStarts
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListViewContainer::ReloadStarts() const
- {
- MDesCArray* itemList = iListBox->Model()->ItemTextArray();
- CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList);
-
- itemArray->Reset();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::CountComponentControls
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicListViewContainer::CountComponentControls() const
- {
- return 1;
- }
-
-// ---------------------------------------------------------
-//
-//
-//
-// ---------------------------------------------------------
-//
-CCoeControl* CCbsUiTopicListViewContainer::ComponentControl( TInt /*aIndex*/ ) const
- {
- return iListBox;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::OfferKeyEventL
-//
-//
-// ---------------------------------------------------------
-//
-TKeyResponse CCbsUiTopicListViewContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent,
- TEventCode aType )
- {
- TKeyResponse result = EKeyWasNotConsumed;
-
- switch ( aKeyEvent.iCode )
- {
- case EKeyEnter: // To support qwert keyboard
- case EKeyOK:
- // to open a right topic
- iListView.MarkCurrentHandle();
- iListView.ProcessCommandL(ECbsUiappCmdSwitchOpen);
- result = EKeyWasConsumed;
- break;
- case EKeyBackspace:
- iListView.MarkCurrentHandle();
- iListView.ProcessCommandL(ECbsUiappCmdSwitchDelete);
- result = EKeyWasConsumed;
- break;
- default:
- result = iListBox->OfferKeyEventL(aKeyEvent, aType);
- break;
- }
-
- return result;
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::SetCurrentItemIndex
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListViewContainer::SetCurrentItemIndex( TInt aItemIndex ) const
- {
-
- MDesCArray* itemList = iListBox->Model()->ItemTextArray();
- CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList);
-
- TInt count( itemArray->MdcaCount() );
-
- __ASSERT_DEBUG(
- aItemIndex >= EMinTopicNumber &&
- aItemIndex <= EMaxTopicNumber,
- CbsUiPanic( EErrBadIndex ) );
-
- if ( aItemIndex < count && aItemIndex >= EMinTopicNumber )
- {
- iListBox->SetCurrentItemIndexAndDraw( aItemIndex );
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::ReloadOfferTopicL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListViewContainer::ReloadOfferTopicL( const TCbsTopic& aTopic ) const
- {
-
- MDesCArray* itemList = iListBox->Model()->ItemTextArray();
- CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList);
-
- TBuf<KSizeOfStatus> ch;
- ch.Append( GetStatus(aTopic) );
- TBuf<KTopicNumberLength> index;
- GetIndexNumber(aTopic, index);
- AknTextUtils::DisplayTextLanguageSpecificNumberConversion( index );
-
- HBufC* buffer = HBufC::NewLC(
- aTopic.iName.Length() + KItemSeparator1().Length() *
- KCountOfSeparator1 + KItemSeparator2().Length() +
- index.Length() + ch.Length() );
-
- TPtr ptr = buffer->Des();
- ptr = ch;
- ptr.Append(KItemSeparator1);
- ptr.Append(index);
- ptr.Append(KItemSeparator1);
- ptr.Append(aTopic.iName);
-
- if ( aTopic.iHotmarked )
- {
- ptr.Append(KItemSeparator2);
- }
-
- itemArray->AppendL(*buffer);
- CleanupStack::PopAndDestroy(); // buffer
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::ReloadEndsL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListViewContainer::ReloadEndsL()
- {
- iListBox->HandleItemAdditionL();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::CurrentPosition
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicListViewContainer::CurrentPosition() const
- {
- TInt result(KCbsErrValue);
-
- if ( iListBox )
- {
- result = iListBox->CurrentItemIndex();
- }
-
- return result;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::GetStatus
-//
-// Informs which icon to use.
-// ---------------------------------------------------------
-//
-TChar CCbsUiTopicListViewContainer::GetStatus( const TCbsTopic& aTopic ) const
- {
-
- TChar retVal(KSubscribedAndNoMessages);
-
-
- if ( aTopic.iSubscribed )
- {
- if ( aTopic.iUnreadMessages == 0 )
- {
- retVal = KSubscribedAndNoMessages;
- }
- else
- {
- retVal = KSubscribedAndMessages;
- }
- }
- else
- {
- if ( aTopic.iUnreadMessages == 0 )
- {
- retVal = KNotSubscribedAndNoMessages;
- }
- else
- {
- retVal = KNotSubscribedButMessagesExists;
- }
- }
-
- return retVal;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::GetIndexNumber
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListViewContainer::GetIndexNumber( const TCbsTopic& aTopic ,
- TBuf<KTopicNumberLength>& aIndexNumber ) const
- {
- TBuf<KTopicNumberLength> ind;
-
- __ASSERT_DEBUG( aIndexNumber.MaxSize() >= KTopicNumberLength,
- CbsUiPanic(EErrBadLength) );
-
- ind.AppendNum( TInt(aTopic.iNumber) );
- aIndexNumber.Justify(ind , KTopicNumberLength, ERight, KZeroFill);
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::SizeChanged
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListViewContainer::SizeChanged()
- {
- if (iListBox)
- {
- iListBox->SetRect( Rect() );
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::FocusChanged
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListViewContainer::FocusChanged( TDrawNow aDrawNow )
- {
- CCoeControl::FocusChanged( aDrawNow );
- if( iListBox )
- {
- iListBox->SetFocus( IsFocused(), aDrawNow );
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::GetHelpContext
-//
-// Gets the control's help context.
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListViewContainer::GetHelpContext(TCoeHelpContext& aContext) const
- {
- aContext.iMajor = TUid::Uid(KUidCbsUiappDef);
- aContext.iContext = KCBS_HLP_MAIN;
- }
-
-
-
-// ----------------------------------------------------
-// CCbsUiTopicListViewContainer::HandleResourceChange
-//
-// ----------------------------------------------------
-void CCbsUiTopicListViewContainer::HandleResourceChange( TInt aType )
- {
- CCoeControl::HandleResourceChange( aType );
-
- if( aType == KEikDynamicLayoutVariantSwitch )
- {
- iListView.HandleRectChangeInContainer();
- }
-
- if( aType == KAknsMessageSkinChange )
- {
- // change skin bitmap
- TRAPD( ignore, SkinBitmapChangesL( ) );
- if( ignore )
- {
- ignore = KErrNone; //Prevent ARMV5 compilation varning
- }
- }
- }
-
-// ----------------------------------------------------
-// CCbsUiTopicListViewContainer::HandleListBoxEventL
-//
-// ----------------------------------------------------
-void CCbsUiTopicListViewContainer::HandleListBoxEventL( CEikListBox* /*aListBox*/,
- TListBoxEvent aEventType )
- {
- switch ( aEventType )
- {
- case EEventItemSingleClicked:
- {
- TKeyEvent keyEvent;
- keyEvent.iCode = EKeyOK;
- OfferKeyEventL( keyEvent, EEventKey );
- break;
- }
- default:
- break;
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::LoadIconsL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListViewContainer::LoadIconsL()
- {
- CAknIconArray* icons =
- new (ELeave) CAknIconArray(KNumberOfIconsInTopicListContainer);
- CleanupStack::PushL(icons);
-
- TParse parse;
- parse.Set(KDirAndCbsUiAppMbmFile, &KDC_APP_BITMAP_DIR, NULL);
- TFileName mbmFileAndPathName(parse.FullName());
-
- // First icon & mask.
- AddIconL( KAknsIIDQgnPropCbSubs, icons, mbmFileAndPathName, EMbmCbsuiappQgn_prop_cb_subs,
- EMbmCbsuiappQgn_prop_cb_subs_mask );
-
- // Second icon & mask.
- AddIconL( KAknsIIDQgnPropCbSubsUnread, icons, mbmFileAndPathName, EMbmCbsuiappQgn_prop_cb_subs_unread,
- EMbmCbsuiappQgn_prop_cb_subs_unread_mask );
-
- // Third icon & mask.
- AddIconL( KAknsIIDQgnPropCbUnsubs, icons, mbmFileAndPathName, EMbmCbsuiappQgn_prop_cb_unsubs,
- EMbmCbsuiappQgn_prop_cb_unsubs_mask );
-
- // Fourth icon & mask.
- AddIconL( KAknsIIDQgnPropCbUnsubsUnread, icons, mbmFileAndPathName, EMbmCbsuiappQgn_prop_cb_unsubs_unread,
- EMbmCbsuiappQgn_prop_cb_unsubs_unread_mask );
-
- // Fifth icon & mask.
- AddIconL( KAknsIIDQgnIndiCbHotAdd, icons, mbmFileAndPathName, EMbmCbsuiappQgn_indi_cb_hot_add,
- EMbmCbsuiappQgn_indi_cb_hot_add_mask, ETrue );
-
- CleanupStack::Pop(); // icons
-
- iListBox->ItemDrawer()->ColumnData()->SetIconArray( icons );
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicListViewContainer::AddIconL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicListViewContainer::AddIconL(
- TAknsItemID aId,
- CAknIconArray* aIcons,
- const TDesC& aIconFileWithPath,
- TInt aIconGraphicsIndex,
- TInt aIconGraphicsMaskIndex,
- TBool aColorIcon )
- {
- // icon & mask.
- MAknsSkinInstance* skins = AknsUtils::SkinInstance();
-
- // COnstruct the icon and append it to icon array
- CGulIcon* icon = ConstructIconL( aColorIcon, skins, aId,
- aIconFileWithPath, aIconGraphicsIndex, aIconGraphicsMaskIndex );
- CleanupStack::PushL( icon );
- aIcons->AppendL( icon );
- CleanupStack::Pop( ); // icon
- }
-
-// ----------------------------------------------------
-// CCbsUiTopicListViewContainer::SkinBitmapChangesL
-// ----------------------------------------------------
-void CCbsUiTopicListViewContainer::SkinBitmapChangesL()
- {
- CArrayPtr<CGulIcon> *icons = 0;
- icons = iListBox->ItemDrawer()->ColumnData()->IconArray();
-
- TAknsItemID id;
- id.iMajor = 0;
- id.iMinor = 0;
-
- TInt count = icons->Count();
- TInt bitmapIndex = 0;
- TInt bitmapMaskIndex = 0;
- TBool colourIcon( EFalse );
-
- // Change list icons
- MAknsSkinInstance* skins = AknsUtils::SkinInstance();
- for ( TInt cc=count; --cc>=0; )
- {
- switch( cc )
- {
- case ECbsPropCbSubs:
- bitmapIndex = EMbmCbsuiappQgn_prop_cb_subs;
- bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_subs_mask;
- id = KAknsIIDQgnPropCbSubs;
- break;
- case ECbsPropCbSubsUnread:
- bitmapIndex = EMbmCbsuiappQgn_prop_cb_subs_unread;
- bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_subs_unread_mask;
- id = KAknsIIDQgnPropCbSubsUnread;
- break;
- case ECbsPropCbUnsubs:
- bitmapIndex = EMbmCbsuiappQgn_prop_cb_unsubs;
- bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_unsubs_mask;
- id = KAknsIIDQgnPropCbUnsubs;
- break;
- case ECbsPropCbUnsubsUnread:
- bitmapIndex = EMbmCbsuiappQgn_prop_cb_unsubs_unread;
- bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_unsubs_unread_mask;
- id = KAknsIIDQgnPropCbUnsubsUnread;
- break;
- case ECbsIndiCbHotAdd:
- bitmapIndex = EMbmCbsuiappQgn_indi_cb_hot_add;
- bitmapMaskIndex = EMbmCbsuiappQgn_indi_cb_hot_add_mask;
- id = KAknsIIDQgnIndiCbHotAdd;
- colourIcon = ETrue;
- break;
- default:
- bitmapIndex = EMbmCbsuiappQgn_prop_cb_unsubs_unread;
- bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_unsubs_unread_mask;
- id = KAknsIIDQgnPropCbUnsubsUnread;
- break;
- }
-
- // icon & mask
- TParse parse;
- parse.Set( KDirAndCbsUiAppMbmFile, &KDC_APP_BITMAP_DIR, NULL );
- TFileName mbmFileAndPathName( parse.FullName() );
-
- CGulIcon* icon = ConstructIconL( colourIcon, skins, id,
- mbmFileAndPathName, bitmapIndex, bitmapMaskIndex );
-
- CleanupStack::PushL( icon );
- CGulIcon* iconToBeDelete = icons->At( cc );
- icons->At( cc ) = icon;
- delete iconToBeDelete;
- iconToBeDelete = NULL;
-
- CleanupStack::Pop(); // icon
-
- colourIcon = EFalse;
- }
- }
-
-
-// ----------------------------------------------------
-// CCbsUiTopicListViewContainer::ConstructIconL
-// ----------------------------------------------------
-CGulIcon* CCbsUiTopicListViewContainer::ConstructIconL(
- TBool& aColourIcon,
- MAknsSkinInstance* aSkins,
- const TAknsItemID& aID,
- const TDesC& aFilename,
- const TInt aFileBitmapId,
- const TInt aFileMaskId )
- {
- // icon & mask
- CFbsBitmap* bitmap;
- CFbsBitmap* mask;
-
- if ( aColourIcon )
- {
- AknsUtils::CreateColorIconL(
- aSkins,
- aID,
- KAknsIIDQsnIconColors,
- EAknsCIQsnIconColorsCG13, // Check the used color group - this is usually correct group for D-column stuff
- bitmap,
- mask,
- aFilename,
- aFileBitmapId,
- aFileMaskId ,
- KRgbBlack ); // This is default color used, if the color skinning fails, or there is no color defined.
- }
- else
- {
- AknsUtils::CreateIconL( aSkins, aID, bitmap,
- mask, aFilename, aFileBitmapId,
- aFileMaskId );
- }
-
- CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
- return icon;
- }
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiTopicView.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1009 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implementation of CCbsUiTopicView.
-*
-*
-*/
-
-
-// INCLUDES
-#include <AknUtils.h> // AknTextUtils
-#include <bldvariant.hrh> // for feature flags
-#include <featmgr.h> // for feature manager
-#include <aknViewAppUi.h>
-#include <aknnavide.h>
-#include <calslbs.h>
-#include <eikclb.h>
-#include <akntitle.h>
-#include <eikmenub.h>
-#include <eikmenup.h>
-#include <hlplch.h>
-#include <AknQueryDialog.h>
-#include <barsread.h> // TResourceReader
-#include <cbsuiApp.rsg>
-#include <e32std.h>
-#include "CCbsUiTopicView.h"
-#include "CCbsUiTopicViewContainer.h"
-#include "Cbsuiapp.hrh"
-#include "CbsUiPanic.h"
-#include "CbsUiUtility.h"
-#include "CbsUiConstants.h"
-#include "CbsUiDebug.h"
-#include "MCbs.h"
-#include <StringLoader.h>
-#include <AknNaviDecoratorObserver.h>
-#include <aknnavi.h>
-
-
-
-// CONSTANTS
-const TUint KZeroFill = '0';
-const TUint KCbsMSKControlID = 3;
-
-
-// MODULE DATA STRUCTURES
-
-// buffer to be used to unpack action information
-typedef TPckgBuf<TCbsUiTopicActivationPckg> TTopicNumberBuf;
-
-// index for setting the focus
-enum TTopicViewFocusIndexes
- {
- EFirstMessage = 0
- };
-
-
-
-//=============================================================================
-// MEMBER FUNCTIONS
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CCbsUiTopicView::CCbsUiTopicView( MCbs& aServer )
-: iServer( aServer )
- {
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::ConstructL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::ConstructL()
- {
- BaseConstructL( R_CBSUI_TOPICVIEW );
-
- // Create array for handles.
- iHandles = new (ELeave) TCbsUiMessageHandleList(
- KNumberOfTemporaryMessages);
-
- CEikStatusPane* sp = StatusPane();
-
- iNaviContainer =
- STATIC_CAST( CAknNavigationControlContainer*, sp->
- ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ) );
- }
-
-
-// Two-phased constructor.
-CCbsUiTopicView* CCbsUiTopicView::NewL( MCbs& aServer )
- {
- __ASSERT_DEBUG( &aServer, CbsUiPanic(EErrNullPointer) );
-
- // Normal two phase construction.
- CCbsUiTopicView* self =
- new (ELeave) CCbsUiTopicView(aServer);
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop();
-
- return self;
- }
-
-// Destructor
-CCbsUiTopicView::~CCbsUiTopicView()
- {
- if ( iContainer )
- {
- AppUi()->RemoveFromViewStack( *this, iContainer );
- }
-
- delete iContainer;
- delete iHandles;
-
- if ( iNaviContainer && iDecoratedLabel )
- {
- iNaviContainer->Pop ( iDecoratedLabel );
- delete iDecoratedLabel;
- }
- iDecoratedLabel = NULL;
-
- if ( iNaviContainer && iPreviousDecoratedLabel )
- {
- iNaviContainer->Pop ( iPreviousDecoratedLabel );
- delete iPreviousDecoratedLabel;
- }
- iPreviousDecoratedLabel = NULL;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::ReloadMessagesL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::ReloadMessagesL()
- {
- TCbsTopic topic;
- TInt err( iServer.FindTopicByNumber(iCurrentTopicNumber, topic) );
-
- if ( err != KErrNone )
- {
- ActivateTopicListViewL(iCurrentTopicNumber);
- return;
- }
-
- UpdateTitlePaneL(topic);
- UpdateNaviPaneL(topic);
-
- PrepareReloading();
- LoadAllMessageTitlesL(iCurrentTopicNumber);
- ActivateListBoxL();
-
- // Set the MSK according to message count
- if ( !iHandles->Count() )
- {
- RemoveCommandFromMSK();
- SetMiddleSoftKeyLabelL( R_TEXT_SOFTKEY_EMPTY, ECbsUiappNullCmd );
- }
- else
- {
- RemoveCommandFromMSK();
- SetMiddleSoftKeyLabelL( R_QTN_MSK_OPEN, ECbsUiappCmdTopicMSKRead );
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::TotalMessages
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicView::TotalMessages() const
- {
- return iHandles->Count();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::UpdateTitlePaneL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::UpdateTitlePaneL( const TCbsTopic& aTopic ) const
- {
- CEikStatusPane* sp = StatusPane();
- CAknTitlePane* title =
- STATIC_CAST(
- CAknTitlePane*, sp->ControlL( TUid::Uid(EEikStatusPaneUidTitle) ) );
-
- __ASSERT_DEBUG( sp && title, CbsUiPanic(EStatusOrTitlePaneError) );
-
- title->SetTextL(aTopic.iName);
-
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::UpdateNaviPaneL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::UpdateNaviPaneL( const TCbsTopic& aTopic )
- {
- TBool next( EFalse );
- TBool previous( EFalse );
- TInt err( CheckIfCanMove( previous, next ) );
-
- if ( err != KErrNone )
- {
- iDecoratedLabel = CbsUiUtility::CreateEmptyNavigationPaneL();
- return;
- }
-
- TBuf<EMaxTopicNumberLength> number;
- TBuf<EMaxTopicNumberLength> buffer;
-
- buffer.AppendNum( TInt( aTopic.iNumber ) );
- number.Justify( buffer, EMaxTopicNumberLength, ERight, KZeroFill );
- AknTextUtils::DisplayTextLanguageSpecificNumberConversion( number );
-
- // Create a new decorator
- CAknNavigationDecorator* newDecoratedLabel =
- iNaviContainer->CreateNavigationLabelL ( number );
- CleanupStack::PushL( newDecoratedLabel );
-
- // Set new decorator on top of navi pane's decorator stack
- // (topmost decorator is the one to show)
- iNaviContainer->PushL( *newDecoratedLabel );
-
- // remove previous decorator from decorator stack and delete it
- if ( iPreviousDecoratedLabel )
- {
- iNaviContainer->Pop( iPreviousDecoratedLabel );
- delete iPreviousDecoratedLabel;
- iPreviousDecoratedLabel = NULL;
- }
-
- // update decorator pointers to new ones
- iPreviousDecoratedLabel = iDecoratedLabel;
- iDecoratedLabel = newDecoratedLabel;
-
- // set observer for navi pane
- iDecoratedLabel->SetNaviDecoratorObserver( this );
-
- CleanupStack::Pop( newDecoratedLabel );
-
- iDecoratedLabel->MakeScrollButtonVisible( ETrue );
-
- if( AknLayoutUtils::LayoutMirrored() )
- {
- // Should be arrows.
- iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ELeftButton, !next );
- // And these should also be arrows.
- iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ERightButton, !previous );
- }
- else
- {
- // Should be arrows.
- iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ELeftButton, !previous );
- // And these should also be arrows.
- iDecoratedLabel->SetScrollButtonDimmed( CAknNavigationDecorator::ERightButton, !next );
- }
-
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::MarkCurrentlyFocusedHandle
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::MarkCurrentlyFocusedHandle()
- {
- if ( iContainer->CurrentPosition() >= 0 &&
- TotalMessages() > iContainer->CurrentPosition() )
- {
- iCurrentHandle = iHandles->At( iContainer->CurrentPosition() );
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::HandleRectChangeInContainer
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::HandleRectChangeInContainer()
- {
- if ( iContainer )
- {
- iContainer->SetRect( ClientRect() );
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::SetFocusToMessage
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::SetFocusToMessage( TInt aIndex )
- {
- if ( iContainer && TotalMessages() > 0 )
- {
- __ASSERT_DEBUG( aIndex >= 0 && aIndex < TotalMessages(),
- CbsUiPanic(EErrIndexOutOfBounds) );
- // first one in the list is the newest
- iContainer->SetCurrentItemIndex(aIndex);
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::TopicListChangedL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::TopicListChangedL( TCbsTopicListEvent aEvent, TCbsTopicNumber aTopicNumber )
-
- {
- if ( iContainer && iCurrentTopicNumber == aTopicNumber )
- {
- if ( aEvent == ECbsTopicReceivedNewMessage )
- {
- ReloadMessagesL();
- }
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::SaveMessage
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicView::SaveMessage( const TCbsMessageHandle& aHandle )
- {
- return iServer.SaveMessage( aHandle );
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::LockMessage
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicView::LockMessage( TCbsMessageHandle aHandle )
- {
- return iServer.LockMessage(aHandle);
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::UnLockMessage
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::UnLockMessage()
- {
- if ( iServer.Connected() )
- {
- iServer.LockMessage(NULL);
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::ShowMessageL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::ShowMessageL()
- {
- if ( TotalMessages() == 0 )
- {
- return;
- }
-
- User::LeaveIfError( LockMessage(iCurrentHandle) );
-
- ActivateMsgViewL(iCurrentHandle);
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::DynInitMenuPaneL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::DynInitMenuPaneL( TInt aResourceId,
- CEikMenuPane* aMenuPane )
- {
- __ASSERT_DEBUG( aMenuPane, CbsUiPanic(EMenuPaneNullError) );
- __ASSERT_DEBUG( aResourceId >= 0, CbsUiPanic( EErrInvalidValue) );
- if ( aResourceId == R_CBSUI_TOPICVIEW_MENU )
- {
- if ( TotalMessages() > 0 )
- {
- // for using a right message
- MarkCurrentlyFocusedHandle();
-
- // Lock message that it is not deleted automatically.
- // If error, close the menu pane
- User::LeaveIfError( LockMessage(iCurrentHandle) );
-
- if( CbsUiUtility::IsSavedL(iCurrentHandle, iServer) )
- {
- aMenuPane->DeleteMenuItem(ECbsUiappCmdTopicMenuKeep);
- }
- }
- else
- {
- // If no messages, then not possible to do anything..
- aMenuPane->DeleteMenuItem(ECbsUiappCmdTopicMenuRead);
- aMenuPane->DeleteMenuItem(ECbsUiappCmdTopicMenuKeep);
- aMenuPane->DeleteMenuItem(ECbsUiappCmdMessageDelete);
- }
- if( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
- {
- aMenuPane->DeleteMenuItem( EAknCmdHelp );
- }
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::SetEmphasis
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::SetEmphasis( CCoeControl* aMenuControl,TBool aEmphasis )
- {
- __ASSERT_DEBUG( aMenuControl, CbsUiPanic(EErrNullPointer) );
- CAknView::SetEmphasis(aMenuControl, aEmphasis);
-
- // Checks if the menu pane is showing.
- if ( !aEmphasis && iCanUnlock )
- {
- // Has to be unlocked, because otherwise message could stay as locked
- // and could not be deleted automatically by the server.
- UnLockMessage();
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::ProcessCommandL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::ProcessCommandL( TInt aCommand )
- {
- switch ( aCommand )
- {
- case ECbsUiappCmdTopicMenuRead: // same operation
- case ECbsUiappCmdTopicMSKRead:
- case ECbsUiappCmdTopicMenuKeep: // cannot unlock current message
- case ECbsUiappCmdMessageDelete:
- iCanUnlock = EFalse; // prevents SetEmphasis to unlock message
- break;
- default:
- break;
- };
-
- CAknView::ProcessCommandL(aCommand);
-
- switch ( aCommand )
- {
- case ECbsUiappCmdTopicMenuKeep: // same operation
- case ECbsUiappCmdMessageDelete:
- // Have to unlock message, because in error situation
- // message would be locked after these two operations.
- UnLockMessage();
- break;
- default:
- break;
- };
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::HandleCommandL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::HandleCommandL( TInt aCommandId )
- {
- TTopicViewFocusState focusState = ENoFocusUpdate;
-
- switch (aCommandId)
- {
- case EAknSoftkeyBack:
- {
- ActivateTopicListViewL(iCurrentTopicNumber);
- break;
- }
- // MSK
- case ECbsUiappCmdTopicMSKRead:
- case ECbsUiappCmdTopicMenuRead:
- {
- // to open a right message
- MarkCurrentlyFocusedHandle();
- if ( TotalMessages() > 0 )
- {
- ShowMessageL();
- }
- break;
- }
- case ECbsUiappCmdTopicMenuKeep:
- {
- CbsUiUtility::SaveCurrentMessageL(iCurrentHandle, *this);
- focusState = ESetFocusToCurrentHandle;
- break;
- }
- case ECbsUiappCmdMessageDelete:
- {
- if ( TotalMessages() > 0 )
- {
- CAknQueryDialog* dlg = CAknQueryDialog::NewL();
-
- if ( dlg->ExecuteLD(R_DELETE_MSG_CONFIRMATION_QUERY) )
- {
- // Unlock the message, so that it could be deleted
- UnLockMessage();
-
- if ( iServer.DeleteMessage(iCurrentHandle) == KErrNone )
- {
- SetNewCurrentHandle(iCurrentHandle);
- }
- }
- focusState = ESetFocusToCurrentHandle;
- }
- break;
- }
- case ECbsUiappTopicViewCmdGoToPrevTopic:
- {
- TBool toPrevious(ETrue);
- SetCurrentTopicNumber(toPrevious);
- focusState = ESetFocusToFirstItem;
- break;
- }
- case ECbsUiappTopicViewCmdGoToNextTopic:
- {
- TBool toPrevious(EFalse);
- SetCurrentTopicNumber(toPrevious);
- focusState = ESetFocusToFirstItem;
- break;
- }
- case EAknCmdHelp:
- AppUi()->HandleCommandL(aCommandId);
- break;
- case EAknCmdExit:
- {
- ( (MEikCommandObserver*)AppUi() )->
- ProcessCommandL(EAknCmdExit);
- break;
- }
- default:
- {
- break;
- }
- }
-
- if ( focusState != ENoFocusUpdate )
- {
- ReloadMessagesL();
- SetFocusAfterReloading(focusState);
- }
-
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::DoActivateL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::DoActivateL( const TVwsViewId& /*aPrevViewId*/,
- TUid aCustomMessageId,
- const TDesC8& aCustomMessage )
- {
- iCanUnlock = ETrue;
- if ( !iContainer )
- {
- iContainer = CCbsUiTopicViewContainer::NewL(*this, ClientRect());
- AppUi()->AddToViewStackL( *this, iContainer );
- }
-
- SetCurrentTopicNumberAndMessageHandle(aCustomMessage);
-
- ReloadMessagesL();
-
- TTopicViewFocusState focus(ESetFocusToFirstItem);
- if ( aCustomMessageId == KSetFocusToId )
- {
- focus = ESetFocusToCurrentHandle;
- }
-
- SetFocusAfterReloading(focus);
-
- // if the list box focus is changed, then container should be activetd
- // after ReloadMessagesL
- iContainer->ActivateL();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::DoDeactivate
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::DoDeactivate()
- {
- if (iContainer)
- {
- AppUi()->RemoveFromViewStack(*this, iContainer);
- delete iContainer;
- iContainer = NULL;
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::Id
-//
-//
-// ---------------------------------------------------------
-//
-TUid CCbsUiTopicView::Id() const
- {
- return TUid::Uid( ECbsUiTopicViewId );
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::FindMessageIndexByHandle
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicView::FindMessageIndexByHandle( TInt& aIndex,
- const TCbsMessageHandle& aMsgHandle )
- {
- __ASSERT_DEBUG( &aIndex, CbsUiPanic(EErrNullPointer) );
-
- TInt ret(KErrGeneral);
-
- for ( TInt i(0); i < TotalMessages() && ret != KErrNone; i++ )
- {
- if ( iHandles->At(i) == aMsgHandle )
- {
- ret = KErrNone;
- aIndex = i;
- }
- }
-
- return ret;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::LoadAllMessageTitlesL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::LoadAllMessageTitlesL( TCbsTopicNumber aTopicNumber )
- {
- TBuf<KMaxMessageTitleLength> buffer;
- TCbsMessage message;
- iHandles->Reset();
-
- // Then take the total amount of messages in the topic.
- TInt count(0);
- User::LeaveIfError( iServer.GetMessageCount(aTopicNumber, count) );
-
- for ( TInt index(0); index < count; index++ )
- {
- if ( iServer.GetMessage(aTopicNumber, index, message) == KErrNone )
- {
- if ( iContainer )
- {
- // Add contents.
- TInt err =
- iServer.GetMessageContents(message.iHandle, buffer);
-
- __CBSUI_ASSERT(
- err == KErrNone, CbsUiPanic(EMessageContentsError) );
- User::LeaveIfError(err);
-
- iContainer->ReloadOfferL(message, buffer);
- }
-
- iHandles->AppendL(message.iHandle);
- }
-
- buffer.Zero();
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::PrepareReloading
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::PrepareReloading()
- {
- if ( iContainer )
- {
- iContainer->ReloadStarts();
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::SetFocusAfterReloading
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::SetFocusAfterReloading( TTopicViewFocusState aFocusState )
- {
- TInt focusedItem(KCbsErrValue);
-
- // has to find index from the ui side, because in the
- // server side the index could be an other.
- TBool setFocusToFirstItem(
- (aFocusState == ESetFocusToFirstItem) ||
- (aFocusState == ESetFocusToNewestMessage) ||
- (FindMessageIndexByHandle(focusedItem, iCurrentHandle) != KErrNone)
- );
-
- if ( setFocusToFirstItem )
- {
- focusedItem = EFirstMessage;
- }
-
- __ASSERT_DEBUG(
- focusedItem != KCbsErrValue, CbsUiPanic(EErrInvalidValue) );
-
- SetFocusToMessage(focusedItem);
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::SetNewCurrentHandle
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::SetNewCurrentHandle( TCbsMessageHandle aDeletedHandle )
- {
-
- TInt messagePosition(KCbsErrValue);
- TInt err( FindMessageIndexByHandle(messagePosition, aDeletedHandle) );
-
- TBool isLastMessage =
- ( (messagePosition + 1) == TotalMessages() ) &&
- (messagePosition >= 0);
-
- if ( isLastMessage )
- {
- // then previous handle should be focused after deletion
- messagePosition--;
- }
- else
- {
- // then the next handle will be focused after deletion
- messagePosition++;
- }
-
- if ( messagePosition >= TotalMessages() ||
- messagePosition < 0 ||
- err != KErrNone )
- {
- messagePosition = 0;
- }
-
- __ASSERT_DEBUG( err == KErrNone, CbsUiPanic(EErrMsgNotFound) );
-
- iCurrentHandle = iHandles->At(messagePosition);
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::SetCurrentTopicNumber
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::SetCurrentTopicNumber( TBool aToPrev )
- {
- TCbsTopicNumber prev;
- TCbsTopicNumber next;
- TInt position;
-
- TInt err( iServer.GetNextAndPrevTopicNumber(
- iCurrentTopicNumber, prev, next, position) );
-
- if ( err == KErrNone ) // handle exists
- {
- if ( aToPrev )
- {
- if ( position != ECbsHead )
- {
- iCurrentTopicNumber = prev;
- }
- }
- else
- {
- if ( position != ECbsTail )
- {
- iCurrentTopicNumber = next;
- }
- }
- }
- else
- {
- __CBSUI_ASSERT( 0, CbsUiPanic(EErrTopicNumberNotFound) );
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::SetCurrentTopicNumberAndMessageHandle
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::SetCurrentTopicNumberAndMessageHandle( const TDesC8& aTopicNumberDes )
- {
- TTopicNumberBuf aTopicNumberBuf;
- aTopicNumberBuf.Copy(aTopicNumberDes);
- iCurrentTopicNumber = aTopicNumberBuf().iTopicNumber;
- iCurrentHandle = aTopicNumberBuf().iMessageHandle;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::ActivateMsgViewL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::ActivateMsgViewL( TCbsMessageHandle aMsgHandle ) const
- {
- TPckgBuf<TCbsMessageHandle> pckgMessageHandle(aMsgHandle);
-
- AppUi()->ActivateLocalViewL(
- TUid::Uid(ECbsUiMsgViewId), KCbsUiCustomMessageId, pckgMessageHandle);
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::ActivateTopicListViewL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::ActivateTopicListViewL( TCbsTopicNumber aTopicNumber ) const
- {
- TPckgBuf<TCbsTopicNumber> pckgTopicNumber(aTopicNumber);
-
- AppUi()->ActivateLocalViewL(
- TUid::Uid(ECbsUiTopicListViewId), KSetFocusToId, pckgTopicNumber);
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::CheckIfCanMove
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicView::CheckIfCanMove( TBool& aToPrevious, TBool& aToNext )
- {
- TCbsTopicNumber prevDummy; // not used
- TCbsTopicNumber nextDummy;
- TInt position;
-
- TInt err( iServer.GetNextAndPrevTopicNumber(
- iCurrentTopicNumber, prevDummy, nextDummy, position) );
-
- __CBSUI_ASSERT( err == KErrNone, CbsUiPanic(EErrTopicNumberNotFound) );
- __CBSUI_ASSERT(
- position >= 0 && position <= (ECbsTail | ECbsHead),
- CbsUiPanic(EErrInvalidValue) );
-
- aToPrevious = EFalse;
- aToNext = EFalse;
-
- if ( err == KErrNone )
- {
- if ( !position ) // topic in both sides
- {
- aToPrevious = ETrue;
- aToNext = ETrue;
- }
- else if ( position == ECbsTail )
- {
- aToPrevious = ETrue;
- }
- else if ( position == ECbsHead )
- {
- aToNext = ETrue;
- }
- else
- {
- //Does nothing
- }
- }
-
- return err;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::ActivateListBoxL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::ActivateListBoxL()
- {
- iContainer->ReloadEndsL();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::SetMiddleSoftKeyLabelL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::SetMiddleSoftKeyLabelL(
- const TInt aResourceId, const TInt aCommandId )
- {
- CEikButtonGroupContainer* cbaGroup = Cba();
- if ( cbaGroup )
- {
- HBufC* mskText = StringLoader::LoadLC( aResourceId );
- TPtr mskPtr = mskText->Des();
- cbaGroup->AddCommandToStackL(
- KCbsMSKControlID,
- aCommandId,
- mskPtr );
- CleanupStack::PopAndDestroy( mskText );
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::RemoveCommandFromMSK
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::RemoveCommandFromMSK()
- {
- if ( Cba() )
- {
- Cba()->RemoveCommandFromStack( KCbsMSKControlID, ECbsUiappCmdTopicMSKRead );
- Cba()->RemoveCommandFromStack( KCbsMSKControlID, ECbsUiappNullCmd );
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicView::HandleNaviDecoratorEventL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicView::HandleNaviDecoratorEventL( TInt aEventID )
- {
- TTopicViewFocusState focusState = ENoFocusUpdate;
-
- switch ( aEventID )
- {
- case MAknNaviDecoratorObserver::EAknNaviDecoratorEventLeftTabArrow:
- {
- SetCurrentTopicNumber( ETrue );
- focusState = ESetFocusToFirstItem;
- break;
- }
- case MAknNaviDecoratorObserver::EAknNaviDecoratorEventRightTabArrow:
- {
- SetCurrentTopicNumber( EFalse );
- focusState = ESetFocusToFirstItem;
- break;
- }
- default:
- {
- break;
- }
- }
-
- if ( focusState != ENoFocusUpdate )
- {
- ReloadMessagesL();
- SetFocusAfterReloading( focusState );
- }
- }
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiTopicViewContainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,605 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: CCbsUiTopicViewContainer is container for CCbsUiTopicView.
-* It has one control, a list box, which is showing information
-* about messages in one topic.
-*
-*
-*/
-
-
-// INCLUDES
-#include <AknsConstants.h> // KAknsMessageSkinChange
-#include <cbsuiapp.mbg> // TMbmCbsuiapp
-#include <AknsUtils.h> // CreateIconL, SkinInstance
-#include <akncontext.h> // CAknContextPane
-#include <AknUtils.h> // AknLayoutUtils
-#include <AknDef.h> // KEikDynamicLayoutVariantSwitch
-#include <e32std.h>
-#include <calslbs.h>
-#include <barsread.h>
-#include <gulicon.h>
-#include <eikfrlbd.h>
-#include <eikclbd.h>
-#include <eikslb.h>
-#include <eiklbx.h>
-#include <avkon.hrh>
-#include <aknlists.h>
-#include <AknIconArray.h>
-#include <data_caging_path_literals.hrh> // KDC_RESOURCE_FILES_DIR
-#include <cbsuiApp.rsg>
-#include "CbsUiId.h"
-#include <csxhelp/cbs.hlp.hrh>
-#include "Cbsuiapp.hrh"
-#include "CCbsUiTopicViewContainer.h"
-#include "CCbsUiTopicView.h"
-#include "CbsUiUtility.h"
-#include "CbsUiPanic.h"
-#include "CbsUiConstants.h"
-
-
-// CONSTANTS
-_LIT(KDirAndCbsUiAppMbmFile,"z:cbsuiapp.mbm");
-_LIT(KSeparator1, "1\t");
-_LIT(KSeparator2, "0\t");
-_LIT(KSeparator3, "\t2");
-
-const TInt KNumberOfIconsInTopicViewcontainer = 6;
-
-
-//DATA TYPES
-enum TopicViewIconArrayIndexes
- {
- ECbsPropCbMsgUnread = 0,
- ECbsPropCbMsg,
- ECbsIndiCbKeptAdd
- };
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CCbsUiTopicViewContainer::CCbsUiTopicViewContainer( CCbsUiTopicView& aTopicView )
- : iTopicView( aTopicView )
- {
- }
-
-// Symbian OS default constructor can leave.
-void CCbsUiTopicViewContainer::ConstructL( const TRect& aRect )
- {
- CreateWindowL();
- SetMopParent(&iTopicView);
-
- iListBox = new (ELeave) CAknSingleGraphicStyleListBox;
- iListBox->SetContainerWindowL(*this);
- iListBox->ConstructL(this, EEikListBoxMultipleSelection);
- iListBox->CreateScrollBarFrameL( ETrue );
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
- CEikScrollBarFrame::EOff,
- CEikScrollBarFrame::EAuto );
-
- CDesCArrayFlat* array =
- new (ELeave) CDesCArrayFlat( KNumberOfTemporaryMessages );
-
- // changing the owner, shouldn't leave
- iListBox->Model()->SetItemTextArray(array);
- iListBox->SetListBoxObserver( this );
-
- SetRect(aRect);
- LoadIconsL();
- }
-
-// Two-phased constructor.
-CCbsUiTopicViewContainer* CCbsUiTopicViewContainer::NewL( CCbsUiTopicView& aTopicView, const TRect& aRect )
- {
- CCbsUiTopicViewContainer* self =
- new (ELeave) CCbsUiTopicViewContainer(aTopicView);
-
- CleanupStack::PushL(self);
- self->ConstructL(aRect);
- CleanupStack::Pop();
- return self;
- }
-
-// Destructor
-CCbsUiTopicViewContainer::~CCbsUiTopicViewContainer()
- {
- delete iListBox;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicViewContainer::ReloadStarts
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicViewContainer::ReloadStarts() const
- {
- MDesCArray* itemList = iListBox->Model()->ItemTextArray();
- CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList);
- itemArray->Reset();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicViewContainer::ReloadOfferL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicViewContainer::ReloadOfferL( const TCbsMessage& aMessage, const TDesC& aBuffer ) const
- {
- MDesCArray* itemList = iListBox->Model()->ItemTextArray();
- CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList);
-
- TInt titleLength( (aBuffer.Length() > KMaxMessageTitleLength ) ?
- KMaxMessageTitleLength : aBuffer.Length() );
-
- HBufC* buffer = HBufC::NewMaxLC( titleLength + KSeparator1().Length() + KSeparator2().Length() +
- KSeparator3().Length() );
-
- TPtr ptr = buffer->Des();
-
- // First column icon.
- if ( aMessage.iRead )
- {
- ptr = KSeparator1;
- }
- else
- {
- ptr = KSeparator2;
- }
-
- for ( TInt index(0); index < titleLength; index++ )
- {
- TChar character = aBuffer[index];
-
- // if character is line break, then stop
- if ( character == EKeyLineFeed
- || character == EKeyEnter )
- {
- break;
- }
-
- ptr.Append( character );
- }
-
- // And finally saved icon.
- if ( aMessage.iPermanent )
- {
- ptr.Append(KSeparator3);
- }
-
- // Finally append!
- itemArray->AppendL(*buffer);
- CleanupStack::PopAndDestroy(); // buffer
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicViewContainer::ReloadEndsL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicViewContainer::ReloadEndsL()
- {
- // Inform listbox that some items has been added.
- iListBox->HandleItemAdditionL();
- // check if listbox has any item. if numberOfItems == 0
- // then disable scrollbars
- if ( iListBox->Model()->NumberOfItems() == 0 )
- {
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
- CEikScrollBarFrame::EOff,
- CEikScrollBarFrame::EOff );
- }
- else
- {
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
- CEikScrollBarFrame::EOff,
- CEikScrollBarFrame::EAuto );
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicViewContainer::CurrentPosition
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicViewContainer::CurrentPosition() const
- {
- return iListBox->CurrentItemIndex();
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicViewContainer::SetCurrentItemIndex
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicViewContainer::SetCurrentItemIndex( TInt aItemIndex ) const
- {
- __ASSERT_DEBUG( aItemIndex >= 0, CbsUiPanic(EErrInvalidValue) );
-
- MDesCArray* itemList = iListBox->Model()->ItemTextArray();
- CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList);
-
- TInt count( itemArray->MdcaCount() );
-
- if ( count > aItemIndex && count >= 0 )
- {
- iListBox->SetCurrentItemIndexAndDraw(aItemIndex);
- }
- }
-
-// ----------------------------------------------------
-// CCbsUiTopicViewContainer::HandleListBoxEventL
-//
-// ----------------------------------------------------
-void CCbsUiTopicViewContainer::HandleListBoxEventL( CEikListBox* /*aListBox*/,
- TListBoxEvent aEventType )
- {
- switch ( aEventType )
- {
- case EEventItemSingleClicked:
- {
- TKeyEvent keyEvent;
- keyEvent.iCode = EKeyOK;
- OfferKeyEventL( keyEvent, EEventKey );
- break;
- }
- default:
- break;
- }
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicViewContainer::GetListBox
-//
-//
-// ---------------------------------------------------------
-//
-CEikColumnListBox* CCbsUiTopicViewContainer::GetListBox()
- {
- return iListBox;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicViewContainer::CountComponentControls
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiTopicViewContainer::CountComponentControls() const
- {
- return 1;
- }
-
-// ---------------------------------------------------------
-//
-//
-//
-// ---------------------------------------------------------
-//
-CCoeControl* CCbsUiTopicViewContainer::ComponentControl( TInt /*aIndex*/ ) const
- {
- return iListBox;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicViewContainer::OfferKeyEventL
-//
-//
-// ---------------------------------------------------------
-//
-TKeyResponse CCbsUiTopicViewContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType )
- {
- TKeyResponse result = EKeyWasNotConsumed;
-
- switch (aKeyEvent.iCode)
- {
- case EKeyLeftArrow:
- {
- if( AknLayoutUtils::LayoutMirrored() )
- {
- // Go to next topic.
- iTopicView.ProcessCommandL( ECbsUiappTopicViewCmdGoToNextTopic );
- }
- else
- {
- // Go to previous topic.
- iTopicView.ProcessCommandL( ECbsUiappTopicViewCmdGoToPrevTopic );
- }
- result = EKeyWasConsumed;
- break;
- }
- case EKeyRightArrow:
- {
- if( AknLayoutUtils::LayoutMirrored() )
- {
- // Go to previous topic.
- iTopicView.ProcessCommandL( ECbsUiappTopicViewCmdGoToPrevTopic );
- }
- else
- {
- // Go to next topic.
- iTopicView.ProcessCommandL( ECbsUiappTopicViewCmdGoToNextTopic );
- }
- result = EKeyWasConsumed;
- break;
- }
- case EKeyEnter:
- case EKeyOK:
- {
- // to open a right message
- iTopicView.MarkCurrentlyFocusedHandle();
- iTopicView.ProcessCommandL( ECbsUiappCmdTopicMenuRead );
- result = EKeyWasConsumed;
- break;
- }
- case EKeyBackspace:
- {
- iTopicView.MarkCurrentlyFocusedHandle();
- iTopicView.ProcessCommandL( ECbsUiappCmdMessageDelete );
- result = EKeyWasConsumed;
- break;
- }
- default:
- {
- result = iListBox->OfferKeyEventL( aKeyEvent, aType );
- break;
- }
- }
-
- return result;
- }
-
-// ---------------------------------------------------------
-// CCbsUiTopicViewContainer::SizeChanged
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicViewContainer::SizeChanged()
- {
- if (iListBox)
- {
- iListBox->SetRect( Rect() );
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicViewContainer::FocusChanged
-// ---------------------------------------------------------
-//
-void CCbsUiTopicViewContainer::FocusChanged( TDrawNow aDrawNow )
- {
- CCoeControl::FocusChanged( aDrawNow );
- if( iListBox )
- {
- iListBox->SetFocus( IsFocused(), aDrawNow );
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicViewContainer::GetHelpContext
-//
-// Gets the control's help context.
-// ---------------------------------------------------------
-//
-void CCbsUiTopicViewContainer::GetHelpContext( TCoeHelpContext& aContext ) const
- {
- aContext.iMajor = TUid::Uid(KUidCbsUiappDef);
- aContext.iContext = KCBS_HLP_TOPIC_VIEW;
- }
-
-
-// ----------------------------------------------------
-// CCbsUiTopicViewContainer::HandleResourceChange
-//
-//
-// ----------------------------------------------------
-void CCbsUiTopicViewContainer::HandleResourceChange( TInt aType )
- {
- CCoeControl::HandleResourceChange( aType );
-
- if( aType == KEikDynamicLayoutVariantSwitch )
- {
- iTopicView.HandleRectChangeInContainer();
- }
-
- if( aType == KAknsMessageSkinChange )
- {
- // change skin bitmap
- TRAPD( ignore, SkinBitmapChangesL( ) );
- if( ignore )
- {
- ignore = KErrNone; //This prevent only ARMV5 varnings!!
- }
- }
- }
-
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicViewContainer::LoadIconsL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicViewContainer::LoadIconsL()
- {
- CAknIconArray* icons = new (ELeave) CAknIconArray(KNumberOfIconsInTopicViewcontainer);
- CleanupStack::PushL(icons);
-
- TParse parse;
- parse.Set(KDirAndCbsUiAppMbmFile, &KDC_APP_BITMAP_DIR, NULL);
- TFileName mbmFileAndPathName(parse.FullName());
-
- // First icon & mask.
- AddIconL( KAknsIIDQgnPropCbMsgUnread, icons, mbmFileAndPathName, EMbmCbsuiappQgn_prop_cb_msg_unread,
- EMbmCbsuiappQgn_prop_cb_msg_unread_mask );
-
- // Second icon & mask.
- AddIconL( KAknsIIDQgnPropCbMsg, icons, mbmFileAndPathName, EMbmCbsuiappQgn_prop_cb_msg,
- EMbmCbsuiappQgn_prop_cb_msg_mask );
-
- // Third icon & mask.
- AddIconL( KAknsIIDQgnIndiCbKeptAdd, icons, mbmFileAndPathName, EMbmCbsuiappQgn_indi_cb_kept_add,
- EMbmCbsuiappQgn_indi_cb_kept_add_mask, ETrue );
-
- CleanupStack::Pop(); // icons
-
- iListBox->ItemDrawer()->ColumnData()->SetIconArray( icons );
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiTopicViewContainer::AddIconL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiTopicViewContainer::AddIconL(
- TAknsItemID aId,
- CAknIconArray* aIcons,
- const TDesC& aIconFileWithPath,
- TInt aIconGraphicsIndex,
- TInt aIconGraphicsMaskIndex,
- TBool aColorIcon )
- {
- // icon & mask.
- MAknsSkinInstance* skins = AknsUtils::SkinInstance();
-
- // COnstruct the icon and append it to icon array
- CGulIcon* icon = ConstructIconL( aColorIcon, skins, aId,
- aIconFileWithPath, aIconGraphicsIndex, aIconGraphicsMaskIndex );
- CleanupStack::PushL( icon );
- aIcons->AppendL( icon );
- CleanupStack::Pop( ); // icon
- }
-
-
-
-// ----------------------------------------------------
-// CCbsUiTopicViewContainer::SkinBitmapChangesL
-// ----------------------------------------------------
-void CCbsUiTopicViewContainer::SkinBitmapChangesL()
- {
- CArrayPtr<CGulIcon> *icons = 0;
- icons = iListBox->ItemDrawer()->ColumnData()->IconArray();
- TAknsItemID id;
- id.iMajor = 0;
- id.iMinor = 0;
- TInt count = icons->Count();
- TInt bitmapIndex = 0;
- TInt bitmapMaskIndex = 0;
-
- //change list icons
- MAknsSkinInstance* skins = AknsUtils::SkinInstance();
- for ( TInt cc=count; --cc>=0; )
- {
- switch( cc )
- {
- case ECbsPropCbMsgUnread:
- bitmapIndex = EMbmCbsuiappQgn_prop_cb_msg_unread;
- bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_msg_unread_mask;
- id = KAknsIIDQgnPropCbMsgUnread;
- break;
- case ECbsPropCbMsg:
- bitmapIndex = EMbmCbsuiappQgn_prop_cb_msg;
- bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_msg_mask;
- id = KAknsIIDQgnPropCbMsg;
- break;
- case ECbsIndiCbKeptAdd:
- bitmapIndex = EMbmCbsuiappQgn_indi_cb_kept_add;
- bitmapMaskIndex = EMbmCbsuiappQgn_indi_cb_kept_add_mask;
- id = KAknsIIDQgnIndiCbKeptAdd;
- break;
- default:
- bitmapIndex = EMbmCbsuiappQgn_prop_cb_msg_unread;
- bitmapMaskIndex = EMbmCbsuiappQgn_prop_cb_msg_unread_mask;
- id = KAknsIIDQgnPropCbMsgUnread;
- break;
- }
-
- CFbsBitmap* bitmap;
- CFbsBitmap* mask;
- TParse parse;
- parse.Set(KDirAndCbsUiAppMbmFile, &KDC_APP_BITMAP_DIR, NULL);
- TFileName mbmFileAndPathName(parse.FullName());
- AknsUtils::CreateIconL( skins, id, bitmap,
- mask, mbmFileAndPathName, bitmapIndex, bitmapMaskIndex );
-
- CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
-
- CleanupStack::PushL( icon );
- CGulIcon* iconToBeDelete = icons->At( cc );
- icons->At( cc ) = icon;
- delete iconToBeDelete;
- iconToBeDelete = NULL;
-
- CleanupStack::Pop(); // icon
-
- }
- }
-
-
-// ----------------------------------------------------
-// CCbsUiTopicViewContainer::ConstructIconL
-// ----------------------------------------------------
-CGulIcon* CCbsUiTopicViewContainer::ConstructIconL(
- TBool& aColourIcon,
- MAknsSkinInstance* aSkins,
- const TAknsItemID& aID,
- const TDesC& aFilename,
- const TInt aFileBitmapId,
- const TInt aFileMaskId )
- {
- // icon & mask
- CFbsBitmap* bitmap;
- CFbsBitmap* mask;
-
- if ( aColourIcon )
- {
- AknsUtils::CreateColorIconL(
- aSkins,
- aID,
- KAknsIIDQsnIconColors,
- EAknsCIQsnIconColorsCG13, // Check the used color group - this is usually correct group for D-column stuff
- bitmap,
- mask,
- aFilename,
- aFileBitmapId,
- aFileMaskId ,
- KRgbBlack ); // This is default color used, if the color skinning fails, or there is no color defined.
- }
- else
- {
- AknsUtils::CreateIconL( aSkins, aID, bitmap,
- mask, aFilename, aFileBitmapId,
- aFileMaskId );
- }
-
- CGulIcon* icon = CGulIcon::NewL( bitmap, mask );
- return icon;
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiappAppUi.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,212 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implements the User Interface class.
-*
-*
-*/
-
-
-// INCLUDES
-#include <bldvariant.hrh> // KFeatureIdBtSap
-#include <e32property.h> // RProperty
-#include <PSVariables.h> // Property values
-#include <featmgr.h> // FeatureManager
-#include <AknsConstants.h> // KAknsMessageSkinChange
-#include <AknsUtils.h> // CreateIconL, SkinInstance
-#include <cbsuiapp.mbg> // TMbmCbsuiapp
-#include <avkon.hrh>
-#include <aknnotedialog.h> // ELongTimeout
-#include <aknnotewrappers.h>
-#include <akntitle.h>
-#include <hlplch.h>
-#include <BTSapDomainPSKeys.h> // KPSUidBluetoothSapConnectionState, KBTSapConnectionState
-#include <data_caging_path_literals.hrh> // KDC_RESOURCE_FILES_DIR
-#include <cbsuiApp.rsg> // R_QTN_OFFLINE_NOT_POSSIBLE_SAP
-#include "CCbsUiappAppUi.h"
-#include "CCbsUiTopicListMonitor.h"
-#include "CbsUiPanic.h"
-#include "CCbsUiViewFactory.h"
-#include "MCbs.h"
-
-
-// CONSTANTS
-_LIT(KDirAndCbsUiAppMbmFile,"z:cbsuiapp.mbm");
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-
-CCbsUiappAppUi::CCbsUiappAppUi( MCbs& aServer ) : iServer( aServer )
- {
- }
-
-// Destructor
-CCbsUiappAppUi::~CCbsUiappAppUi()
- {
- delete iTopicListMonitor;
- FeatureManager::UnInitializeLib();
- }
-
-// ----------------------------------------------------
-// CCbsUiappAppUi::HandleResourceChangeL
-//
-//
-// ----------------------------------------------------
-void CCbsUiappAppUi::HandleResourceChangeL( TInt aType )
- {
- CAknViewAppUi::HandleResourceChangeL( aType );
-
- if( aType == KAknsMessageSkinChange )
- {
- // change application icon dynamically
- TBool reception;
- CEikStatusPane *sp = ( (CAknAppUi*)CEikonEnv::Static()->EikAppUi() )->StatusPane();
- CAknTitlePane* title = STATIC_CAST(CAknTitlePane*, sp->
- ControlL( TUid::Uid(EEikStatusPaneUidTitle) ));
- MAknsSkinInstance* skin = AknsUtils::SkinInstance();
- iServer.GetReceptionStatus( reception );
-
- TParse parse;
- parse.Set( KDirAndCbsUiAppMbmFile, &KDC_APP_BITMAP_DIR, NULL );
- TFileName mbmFileAndPathName(parse.FullName());
-
- if (reception)
- {
-
- CFbsBitmap* bmp = NULL;
- CFbsBitmap* maskbmp = NULL;
-#ifdef __SCALABLE_ICONS
- AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCbCxt, bmp,
- maskbmp, mbmFileAndPathName, EMbmCbsuiappQgn_menu_cb,
- EMbmCbsuiappQgn_menu_cb_mask );
-#else
- AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCbCxt, bmp,
- maskbmp, mbmFileAndPathName, EMbmCbsuiappQgn_menu_cb_cxt,
- EMbmCbsuiappQgn_menu_cb_cxt_mask );
-#endif //__SCALABLE_ICONS
- title->SetSmallPicture(bmp, maskbmp, ETrue);
- }
- else
- {
- CFbsBitmap* bmp = NULL;
- CFbsBitmap* maskbmp = NULL;
-#ifdef __SCALABLE_ICONS
- AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCb2Cxt, bmp,
- maskbmp, mbmFileAndPathName, EMbmCbsuiappQgn_menu_cb_2,
- EMbmCbsuiappQgn_menu_cb_2_mask);
-#else
- AknsUtils::CreateIconL( skin, KAknsIIDQgnMenuCb2Cxt, bmp,
- maskbmp, mbmFileAndPathName, EMbmCbsuiappQgn_menu_cb_2_cxt,
- EMbmCbsuiappQgn_menu_cb_2_cxt_mask);
-#endif //__SCALABLE_ICONS
- title->SetSmallPicture(bmp, maskbmp, ETrue);
- }
- }
- }
-
-
-
-// Symbian OS default constructor can leave.
-void CCbsUiappAppUi::ConstructL()
- {
- BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
-
- FeatureManager::InitializeLibL();
- if ( FeatureManager::FeatureSupported( KFeatureIdBtSap ) )
- {
- TInt simStatus;
- simStatus = CheckSimStateL();
- if ( EBTSapNotConnected != simStatus )
- {
- HBufC* text = iCoeEnv->AllocReadResourceLC( R_QTN_OFFLINE_NOT_POSSIBLE_SAP );
- CAknInformationNote* note = new( ELeave ) CAknInformationNote( ETrue );
- note->SetTimeout( CAknNoteDialog::ELongTimeout );
- note->ExecuteLD( *text );
- CleanupStack::PopAndDestroy( ); //text
- User::Leave( KErrGeneral );
- }
- }
-
- __ASSERT_DEBUG( &iServer, CbsUiPanic(EServerCreationFailedError) );
- __ASSERT_DEBUG( iServer.Connected(), CbsUiPanic(EErrServerDisconnected) );
-
- iTopicListMonitor = CCbsUiTopicListMonitor::NewL(iServer);
-
- CCbsUiViewFactory* viewFactory = new (ELeave) CCbsUiViewFactory(
- iServer, *iTopicListMonitor);
- CleanupStack::PushL(viewFactory);
-
- AddViewL( viewFactory->CreateTopicListViewLC() );
- CleanupStack::Pop(); // view
-
- AddViewL( viewFactory->CreateTopicViewLC() );
- CleanupStack::Pop(); // view
-
- AddViewL( viewFactory->CreateMsgViewLC() );
- CleanupStack::Pop(); // view
-
- AddViewL( viewFactory->CreateSettingsViewLC() );
- CleanupStack::Pop(); // view
-
- CleanupStack::PopAndDestroy(); // viewFactory
- }
-
-// ---------------------------------------------------------
-// CCbsUiappAppUi::HandleCommandL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiappAppUi::HandleCommandL( TInt aCommand )
- {
- switch ( aCommand )
- {
- case EAknCmdHelp:
- {
- HlpLauncher::LaunchHelpApplicationL(iEikonEnv->WsSession(), AppHelpContextL());
- break;
- }
- case EAknCmdExit:
- case EEikCmdExit:
- Exit();
- break;
- default:
- break;
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiappAppUi::CheckSimStateL
-//
-//
-// ---------------------------------------------------------
-TInt CCbsUiappAppUi::CheckSimStateL()
- {
- TInt btSapState( EBTSapNotConnected );
- TInt err = RProperty::Get( KPSUidBluetoothSapConnectionState,
- KBTSapConnectionState,
- btSapState );
- if ( err )
- {
- btSapState = EBTSapNotConnected;
- }
- return btSapState;
- }
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiappApplication.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implements the application class.
-*
-*
-*/
-
-
-// INCLUDES
-#include <eikstart.h>
-#include "CCbsUiappApplication.h"
-#include "CCbsUiappDocument.h"
-#include "CbsUiId.h"
-
-
-
-// CONSTANTS
-static const TUid KUidCbsUiappApp = { KUidCbsUiappDef };
-
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-
-// ---------------------------------------------------------
-// CCbsUiappApplication::AppDllUid
-//
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TUid CCbsUiappApplication::AppDllUid() const
- {
- return KUidCbsUiappApp;
- }
-
-// ---------------------------------------------------------
-// CCbsUiappApplication::CreateDocumentL
-//
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-CApaDocument* CCbsUiappApplication::CreateDocumentL()
- {
- return CCbsUiappDocument::NewL(*this);
- }
-
-// ================= OTHER EXPORTED FUNCTIONS ==============
-
-
-LOCAL_C CApaApplication* NewApplication()
- {
- return new CCbsUiappApplication;
- }
-
-GLDEF_C TInt E32Main()
- {
- return EikStart::RunApplication(NewApplication);
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CCbsUiappDocument.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of the CCbsUiappDocument class.
-*
-*
-*/
-
-
-
-// INCLUDES
-#include <RCbs.h>
-#include "CCbsUiappDocument.h"
-#include "CCbsUiappAppUi.h"
-#include "RCbsUi.h"
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-//
-
-CCbsUiappDocument::CCbsUiappDocument( CEikApplication& aApp ) :
- CEikDocument(aApp)
- {
- }
-
-void CCbsUiappDocument::ConstructL()
- {
- iServer = new (ELeave) RCbsUi;
- // Create connection to the server.
- User::LeaveIfError( iServer->Connect() );
- }
-
-CCbsUiappDocument* CCbsUiappDocument::NewL( CEikApplication& aApp )
- {
- CCbsUiappDocument* self = new( ELeave ) CCbsUiappDocument( aApp );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop(); // self
- return self;
- }
-
-CCbsUiappDocument::~CCbsUiappDocument()
- {
- delete iServer;
- }
-
-CEikAppUi* CCbsUiappDocument::CreateAppUiL()
- {
- return new (ELeave) CCbsUiappAppUi( *iServer );
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CbsUiPanic.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implementation of CbsUiPanic
-*
-*
-*/
-
-
-// INCLUDES
-#include <e32base.h>
-#include "CbsUiPanic.h"
-
-
-// CONSTANTS
-_LIT( KCbsUiName, "CbsUiApp" );
-
-
-
-// ================= OTHER EXPORTED FUNCTIONS ==============
-
-//
-// ---------------------------------------------------------
-// CbsUiPanic
-//
-//
-GLDEF_C void CbsUiPanic( TCbsUiPanic aPanic )
- {
- User::Panic( KCbsUiName, aPanic );
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/CbsUiUtility.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,171 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implementation of CbsUiClenaupHandler
-*
-*
-*/
-
-
-// INCLUDES
-#include <e32base.h>
-#include <gulicon.h>
-#include <aknnotewrappers.h>
-#include <aknappui.h>
-#include <aknnavi.h>
-#include <CbsCommon.h>
-#include <cbsuiApp.rsg>
-#include "CbsUiUtility.h"
-#include "CbsUiPanic.h"
-#include "MSaveMessageController.h"
-#include "CbsUiDebug.h"
-#include "MCbs.h"
-
-
-
-// =================== MEMBER FUNCTIONS ====================
-
-
-// ---------------------------------------------------------
-// CbsUiUtility::ShowConfirmationNoteL
-//
-//
-// ---------------------------------------------------------
-//
-void CbsUiUtility::ShowConfirmationNoteL(
- const TInt aResourceId, TBool aWaitingDialog )
- {
- HBufC* text = CCoeEnv::Static()->AllocReadResourceLC(aResourceId);
- CAknConfirmationNote* note =
- new (ELeave) CAknConfirmationNote(aWaitingDialog);
- note->ExecuteLD(*text);
- CleanupStack::PopAndDestroy(text);
- }
-
-// ---------------------------------------------------------
-// CbsUiUtility::ShowErrorNoteL
-//
-//
-// ---------------------------------------------------------
-//
-void CbsUiUtility::ShowErrorNoteL( const TInt aResourceId )
- {
- HBufC* text = CCoeEnv::Static()->AllocReadResourceLC( aResourceId );
- CAknErrorNote* note = new (ELeave) CAknErrorNote;
- note->ExecuteLD( *text );
- CleanupStack::PopAndDestroy( text );
- }
-
-// ---------------------------------------------------------
-// CbsUiUtility::ShowWarningNoteL
-//
-//
-// ---------------------------------------------------------
-//
-void CbsUiUtility::ShowWarningNoteL( const TInt aResourceId )
- {
- HBufC* text = CCoeEnv::Static()->AllocReadResourceLC( aResourceId );
- CAknWarningNote* note = new (ELeave) CAknWarningNote;
- note->ExecuteLD( *text );
- CleanupStack::PopAndDestroy( text );
- }
-
-// ---------------------------------------------------------
-// CbsUiUtility::CreateEmptyNavigationPaneL
-//
-//
-// ---------------------------------------------------------
-//
-CAknNavigationDecorator* CbsUiUtility::CreateEmptyNavigationPaneL()
- {
- CEikStatusPane* statusPane =
- STATIC_CAST( CAknAppUi*,
- CEikonEnv::Static()->EikAppUi() )->StatusPane();
-
- CAknNavigationControlContainer* naviContainer =
- STATIC_CAST( CAknNavigationControlContainer*, statusPane->
- ControlL(TUid::Uid(EEikStatusPaneUidNavi)) );
-
- CAknNavigationDecorator* decorator;
- decorator = naviContainer->CreateNavigationLabelL();
-
- naviContainer->PushL(*decorator);
-
- return decorator;
- }
-
-// ---------------------------------------------------------
-// CbsUiUtility::IsSavedL
-//
-//
-// ---------------------------------------------------------
-//
-TBool CbsUiUtility::IsSavedL( const TCbsMessageHandle aHandle, MCbs& aServer )
- {
- __ASSERT_DEBUG(&aServer, CbsUiPanic(EErrNullPointer) );
- __ASSERT_DEBUG(aServer.Connected(), CbsUiPanic(EErrServerDisconnected) );
-
- TCbsMessage message;
-
- TInt ret = aServer.FindMessageByHandle(aHandle, message);
-
- __CBSUI_ASSERT( ret == KErrNone, CbsUiPanic(EErrMsgHandleNotFound) );
-
- User::LeaveIfError(ret);
- TBool saved(EFalse);
-
- if ( message.iPermanent )
- {
- saved = ETrue;
- }
-
- return saved;
- }
-
-// ---------------------------------------------------------
-// CbsUiUtility::SaveCurrentMessageL
-//
-//
-// ---------------------------------------------------------
-//
-TInt CbsUiUtility::SaveCurrentMessageL(
- const TCbsMessageHandle aHandle, MSaveMessageController& aSaver )
- {
- __ASSERT_DEBUG(&aSaver, CbsUiPanic(EErrNullPointer) );
-
- TInt resultCode( aSaver.SaveMessage(aHandle) );
-
- switch ( resultCode )
- {
- case KErrDiskFull:
- {
- User::Leave( KErrDiskFull );
- break;
- }
- case KErrNone: // Normal case
- {
- // do nothing
- break;
- }
- default:
- {
- CbsUiUtility::ShowErrorNoteL(R_TEXT_NOTE_MEMORY_FULL_ERROR);
- break;
- }
- }
-
- return resultCode;
- }
-
-// End of File
--- a/cbs/cbsui/UiSrc/RCbsUi.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,310 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* RCbsUi calls directly real cbs client, which handles
-* the actual calls to server.
-*
-*/
-
-
-// INCLUDES
-#include "RCbsUi.h"
-#include <RCbs.h>
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-RCbsUi::RCbsUi()
- {
- }
-
-RCbsUi::~RCbsUi()
- {
- }
-
-TInt RCbsUi::Connect()
- {
- return iServer.Connect();
- }
-
-void RCbsUi::Close()
- {
- iServer.Close();
- }
-
-TVersion RCbsUi::Version() const
- {
- return iServer.Version();
- }
-
-// Settings-related methods
-void RCbsUi::GetReceptionStatus(
- TBool& aStatus )
- {
- iServer.GetReceptionStatus( aStatus );
- }
-
-TInt RCbsUi::SetReceptionStatus(
- TBool aStatus )
- {
- return iServer.SetReceptionStatus( aStatus );
- }
-
-void RCbsUi::GetTopicDetectionStatus(
- TBool& aStatus )
- {
- iServer.GetTopicDetectionStatus( aStatus );
- }
-
-TInt RCbsUi::SetTopicDetectionStatus(
- TBool aStatus )
- {
- return iServer.SetTopicDetectionStatus(aStatus);
- }
-
-void RCbsUi::GetLanguages(
- TCbsSettingsLanguages& aLanguages )
- {
- iServer.GetLanguages(aLanguages);
- }
-
-TInt RCbsUi::SetLanguages(
- const TCbsSettingsLanguages& aLanguages )
- {
- return iServer.SetLanguages(aLanguages);
- }
-
-void RCbsUi::NotifySettingsChanged(
- TRequestStatus& aStatus,
- TCbsSettingsEvent& aEvent )
- {
- iServer.NotifySettingsChanged( aStatus, aEvent );
- }
-
-void RCbsUi::NotifySettingsChangedCancel()
- {
- iServer.NotifySettingsChangedCancel();
- }
-
-// Topic Collection -related methods
-void RCbsUi::StartCollectionBrowsing()
- {
- iServer.StartCollectionBrowsing();
- }
-
-TBool RCbsUi::HasNextCollectionTopic()
- {
- return iServer.HasNextCollectionTopic();
- }
-
-TInt RCbsUi::NextCollectionTopic(
- TCbsTopicInfo& aInfo )
- {
- return iServer.NextCollectionTopic(aInfo);
- }
-
-// Topic List-related methods
-void RCbsUi::GetTopicCount(
- TInt& aCount )
- {
- iServer.GetTopicCount(aCount);
- }
-
-TInt RCbsUi::GetTopic(
- const TInt aIndex,
- TCbsTopic& aTopic )
- {
- return iServer.GetTopic(aIndex, aTopic);
- }
-
-TInt RCbsUi::FindTopicByNumber(
- TCbsTopicNumber aNumber,
- TCbsTopic& aTopic )
- {
- return iServer.FindTopicByNumber( aNumber, aTopic );
- }
-
-TInt RCbsUi::DeleteTopic(
- TCbsTopicNumber aNumber )
- {
- return iServer.DeleteTopic(aNumber);
- }
-
-TInt RCbsUi::DeleteAllTopics()
- {
- return iServer.DeleteAllTopics();
- }
-
-TInt RCbsUi::AddTopic(
- TCbsTopic& aTopic )
- {
- return iServer.AddTopic(aTopic);
- }
-
-TInt RCbsUi::ChangeTopicNameAndNumber(
- TCbsTopicNumber aOldNumber,
- TCbsTopicNumber aNewNumber,
- const TCbsTopicName& aName )
- {
- return iServer.ChangeTopicNameAndNumber(aOldNumber, aNewNumber, aName);
- }
-
-TInt RCbsUi::ChangeTopicSubscriptionStatus(
- TCbsTopicNumber aNumber,
- TBool aNewStatus )
- {
- return iServer.ChangeTopicSubscriptionStatus( aNumber, aNewStatus );
- }
-
-TInt RCbsUi::ChangeTopicHotmarkStatus(
- TCbsTopicNumber aNumber,
- TBool aNewStatus )
- {
- return iServer.ChangeTopicHotmarkStatus( aNumber, aNewStatus );
- }
-
-void RCbsUi::NotifyOnTopicListEvent(
- TRequestStatus& aStatus,
- const TInt aRequested,
- TCbsTopicListEvent& aEvent,
- TCbsTopicNumber& aNumber )
- {
- iServer.NotifyOnTopicListEvent(aStatus, aRequested, aEvent, aNumber);
- }
-
-void RCbsUi::NotifyOnTopicListEventCancel()
- {
- iServer.NotifyOnTopicListEventCancel();
- }
-
-TInt RCbsUi::GetNewTopicsCount(
- TInt& aCount )
- {
- return iServer.GetNewTopicsCount(aCount);
- }
-
-TInt RCbsUi::GetLatestTopicNumber( TCbsTopicNumber& aNumber )
- {
- return iServer.GetLatestTopicNumber(aNumber);
- }
-
-void RCbsUi::GetUnreadMessageCount(
- TInt& aCount )
- {
- iServer.GetUnreadMessageCount(aCount);
- }
-
-void RCbsUi::GetHotmarkedMessageHandle(
- TCbsMessageHandle& aMessage )
- {
- iServer.GetHotmarkedMessageHandle(aMessage);
- }
-
-TInt RCbsUi::NumberOfUnreadHotmarkedMessages()
- {
- return iServer.NumberOfUnreadHotmarkedMessages();
- }
-
-TInt RCbsUi::GetNextAndPrevTopicNumber(
- const TCbsTopicNumber& aCurrentTopicNumber,
- TCbsTopicNumber& aPrevTopicNumber,
- TCbsTopicNumber& aNextTopicNumber,
- TInt& aPosition )
- {
- return iServer.GetNextAndPrevTopicNumber(
- aCurrentTopicNumber, aPrevTopicNumber, aNextTopicNumber, aPosition);
- }
-
-
-// Topic Messages-related methods
-TInt RCbsUi::GetMessageCount(
- TCbsTopicNumber aNumber,
- TInt& aCount )
- {
- return iServer.GetMessageCount(aNumber, aCount);
- }
-
-TInt RCbsUi::GetMessage(
- TCbsTopicNumber aNumber,
- TInt aIndex,
- TCbsMessage& aMessage )
- {
- return iServer.GetMessage(aNumber, aIndex, aMessage);
- }
-
-TInt RCbsUi::FindMessageByHandle(
- const TCbsMessageHandle& aHandle,
- TCbsMessage& aMessage )
- {
- return iServer.FindMessageByHandle(aHandle, aMessage);
- }
-
-TInt RCbsUi::GetMessageIndexByHandle(
- const TCbsMessageHandle& aHandle, TInt& aIndex )
- {
- return iServer.GetMessageIndexByHandle(aHandle, aIndex);
- }
-
-TInt RCbsUi::DeleteMessage(
- const TCbsMessageHandle& aHandle )
- {
- return iServer.DeleteMessage(aHandle);
- }
-
-TInt RCbsUi::SaveMessage(
- const TCbsMessageHandle& aHandle )
- {
- return iServer.SaveMessage(aHandle);
- }
-
-TInt RCbsUi::LockMessage(
- const TCbsMessageHandle& aHandle )
- {
- return iServer.LockMessage(aHandle);
- }
-
-TInt RCbsUi::ReadMessage(
- const TCbsMessageHandle& aHandle )
- {
- return iServer.ReadMessage(aHandle);
- }
-
-TInt RCbsUi::GetMessageContents(
- const TCbsMessageHandle& aHandle,
- TDes& aBuffer )
- {
- return iServer.GetMessageContents(aHandle, aBuffer);
- }
-
-TInt RCbsUi::GetNextAndPrevMessageHandle(
- const TCbsMessageHandle& aCurrentMsgHandle,
- TCbsMessageHandle& aPrevMsgHandle,
- TCbsMessageHandle& aNextMsgHandle,
- TInt& aPosition )
- {
- return iServer.GetNextAndPrevMessageHandle(
- aCurrentMsgHandle, aPrevMsgHandle, aNextMsgHandle, aPosition);
- }
-
-TBool RCbsUi::Connected() const
- {
- return iServer.Connected();
- }
-
-void RCbsUi::Shutdown() const
- {
- iServer.Shutdown();
- }
-
-// End of File
--- a/cbs/cbsui/UiSrc/ccbsuisettingsviewcontainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,683 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implementation of CCbsUiSettingsViewContainer.
-*
-*
-*/
-
-
-// INCLUDES
-#include <bldvariant.hrh> // For feature flags
-#include <featmgr.h> // FeatureManager
-#include <aknnotewrappers.h> // CAknErrorNote
-#include <e32def.h>
-#include <aknlists.h>
-#include <akncheckboxsettingpage.h>
-#include <cbsuiApp.rsg>
-#include <barsread.h>
-#include <centralrepository.h> // CRepository
-#include <CoreApplicationUIsSDKCRKeys.h> // KCRUidCoreApplicationUIs, TCoreAppUIsNetworkConnectionAllowed
-#include "CbsUiId.h"
-#include <csxhelp/mce.hlp.hrh>
-#include <AknDef.h> // KEikDynamicLayoutVariantSwitch
-#include "MCbs.h"
-#include "ccbsuisettingsviewcontainer.h"
-#include "CCbsUiSettingsView.h"
-#include "CbsUiConstants.h"
-#include "CCbsUiLanguageSettingPage.h"
-#include "CbsUiPanic.h"
-
-
-
-// CONSTANTS
-
-// exact number of items in selection list
-const TInt KNumberOfItemsInSelectionPage = 3;
-
-// There should be only one item in the list box before, which
-// is reception.
-const TInt KPreciseNumberOfItemsBeforeLanguage = 1;
-const TInt KNumberOfOnOfItems = 2;
-
-
-
-
-// MODULE DATA STRUCTURES
-enum TCbsUiSettingValues { EReception, ELanguage, ETopicDetection };
-
-// to select right item in setting_items_with_two_available_values
-enum TCbsUiSettingOnOff
- {
- ESettingOn = 0,
- ESettingOff
- };
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CCbsUiSettingsViewContainer::CCbsUiSettingsViewContainer(
- CCbsUiSettingsView& aView,
- MCbs& aServer )
- : iView( aView ), iServer( aServer )
- {
- }
-
-// Symbian OS default constructor can leave.
-void CCbsUiSettingsViewContainer::ConstructL( const TRect& aRect )
- {
- CreateWindowL();
- SetMopParent(&iView);
- CreateListBoxL();
- SetRect( aRect );
-
- // Prepare FeatureManager, read values to members and uninitialize FeatureManager
- FeatureManager::InitializeLibL();
- iOfflineFeatureSupported = FeatureManager::FeatureSupported( KFeatureIdOfflineMode );
- }
-
-// Two-phased constructor.
-CCbsUiSettingsViewContainer* CCbsUiSettingsViewContainer::NewL(
- CCbsUiSettingsView& aView,
- const TRect& aRect,
- MCbs& aServer )
- {
- CCbsUiSettingsViewContainer* self =
- new (ELeave) CCbsUiSettingsViewContainer(aView, aServer);
-
- CleanupStack::PushL(self);
- self->ConstructL(aRect);
- CleanupStack::Pop();
-
- return self;
- }
-
-// Destructor
-CCbsUiSettingsViewContainer::~CCbsUiSettingsViewContainer()
- {
- delete iListBox;
- FeatureManager::UnInitializeLib();
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::CountComponentControls
-//
-//
-// ---------------------------------------------------------
-//
-TInt CCbsUiSettingsViewContainer::CountComponentControls() const
- {
- return 1;
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::ComponentControl
-//
-//
-// ---------------------------------------------------------
-//
-CCoeControl* CCbsUiSettingsViewContainer::ComponentControl( TInt aIndex ) const
- {
- CCoeControl* control = NULL;
-
- switch ( aIndex )
- {
- case 0:
- control = iListBox;
- break;
- default:
- break;
- }
-
- return control;
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::OfferKeyEventL
-//
-//
-// ---------------------------------------------------------
-//
-TKeyResponse CCbsUiSettingsViewContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent,
- TEventCode aType )
- {
- return iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::SizeChanged
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::SizeChanged()
- {
- iListBox->SetRect( Rect() );
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::FocusChanged
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::FocusChanged( TDrawNow aDrawNow )
- {
- CCoeControl::FocusChanged( aDrawNow );
- if( iListBox )
- {
- iListBox->SetFocus( IsFocused(), aDrawNow );
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::CreateListBoxL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::CreateListBoxL()
- {
- iListBox = new (ELeave) CAknSettingStyleListBox;
- iListBox->SetContainerWindowL( *this );
- iListBox->ConstructL( this, EAknListBoxSelectionListWithShortcuts );
- iListBox->SetListBoxObserver( this );
- iListBox->CreateScrollBarFrameL( ETrue );
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff,
- CEikScrollBarFrame::EAuto );
- GetSettingsL();
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::GetSettingsL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::GetSettingsL()
- {
- __ASSERT_DEBUG( iListBox, CbsUiPanic(EListBoxNullError) );
-
- MDesCArray* itemList =
- STATIC_CAST(CEikFormattedCellListBox*,
- iListBox)->Model()->ItemTextArray();
-
- CDesCArray* itemArray = STATIC_CAST(CDesCArray*, itemList);
-
- itemArray->Reset();
-
- TBool status;
- iServer.GetReceptionStatus(status);
-
- TInt resourceId(R_TEXT_RECEPTION_ON);
-
- if ( !status )
- {
- resourceId = R_TEXT_RECEPTION_OFF;
- }
-
- HBufC* reception = iCoeEnv->AllocReadResourceLC(resourceId);
- itemArray->AppendL(*reception);
- CleanupStack::PopAndDestroy(); // reception
-
- // This must be here, don't move; otherwise order
- // is different in the list box.
- SetLanguageSelectionL(*itemArray);
-
- iServer.GetTopicDetectionStatus(status);
- resourceId = R_TEXT_DETECTION_ON;
-
- if ( !status )
- {
- resourceId = R_TEXT_DETECTION_OFF;
- }
-
- HBufC* detection = iCoeEnv->AllocReadResourceLC(resourceId);
-
- itemArray->AppendL(*detection);
- CleanupStack::PopAndDestroy(); // detection
-
- iListBox->HandleItemAdditionL();
-
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::PrepareLanguageSettingPageL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::PrepareLanguageSettingPageL()
- {
-
- CDesCArrayFlat* items =
- new (ELeave) CDesCArrayFlat(KNumberOfItemsInSelectionPage);
- CleanupStack::PushL(items);
-
- AddItemsToListL(
- R_CBS_LANGUAGE_SETTING_PAGE_ARRAY, *items);
-
- TInt selected( GetSelected() );
-
- LaunchLanguageSettingPageL(*items, selected);
-
- CleanupStack::PopAndDestroy(); // items
-
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::GetSelected
-//
-//
-// ---------------------------------------------------------
-//
-TCbsUiLanguageSelectionIndex CCbsUiSettingsViewContainer::GetSelected()
- {
- TCbsDbLanguages dbLanguages;
- iServer.GetLanguages(dbLanguages);
-
- TCbsUiLanguageSelectionIndex result(ECbsUiSelected);
-
- if ( dbLanguages.iLanguages[ECbsAll] )
- {
- result = ECbsUiAll;
- }
- else if ( dbLanguages.iLanguages[ECbsOther] )
- {
- result = ECbsUiOther;
- }
- else
- {
- result = ECbsUiSelected;
- }
-
- return result;
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::LaunchLanguageSettingPageL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::LaunchLanguageSettingPageL(
- CDesCArrayFlat& aItems, TInt& aCurrentSelectionIndex )
- {
- __ASSERT_DEBUG(
- aCurrentSelectionIndex >= ECbsUiAll &&
- aCurrentSelectionIndex <= ECbsUiOther,
- CbsUiPanic(EErrIndexOutOfBounds) );
- __ASSERT_DEBUG( aItems.Count() == 3, CbsUiPanic(EErrInvalidValue) );
-
- CCbsUiLanguageSettingPage* languagePage =
- new (ELeave) CCbsUiLanguageSettingPage(
- R_LANGUAGE_SETTING_PAGE, aCurrentSelectionIndex,
- &aItems, iServer);
-
- languagePage->ExecuteLD(CAknSettingPage::EUpdateWhenChanged);
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::AddItemsToListL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::AddItemsToListL(
- TInt aResourceId,
- CDesCArrayFlat& aItemList ) const
- {
- __ASSERT_DEBUG(aResourceId >= 0, CbsUiPanic(EErrInvalidValue) );
- __ASSERT_DEBUG( aItemList.MdcaCount() == 0, CbsUiPanic(EErrInvalidValue) );
-
- TResourceReader reader;
- iCoeEnv->CreateResourceReaderLC(reader, aResourceId);
- TInt count( reader.ReadInt16() );
-
- for ( TInt i(0); i < count; i++ )
- {
- HBufC* selectableItem = reader.ReadHBufCL();
-
- CleanupStack::PushL(selectableItem);
- aItemList.AppendL(*selectableItem);
- CleanupStack::PopAndDestroy(); // selectableItem
- }
-
- CleanupStack::PopAndDestroy(); // reader
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::HandleListViewActionL
-//
-//
-// ---------------------------------------------------------
-//
-TKeyResponse CCbsUiSettingsViewContainer::HandleListViewActionL(
- const CEikListBox* aListBox, TBool aLaunchedFromOptionMenu )
- {
- __ASSERT_DEBUG( aListBox, CbsUiPanic(EErrNullPointer) );
-
- switch ( aListBox->CurrentItemIndex() )
- {
- case EReception:
- {
- if ( IsPhoneOfflineL() )
- {
- // If is in offline mode, don't set reception on or off(Only error note)
- HBufC* text = iCoeEnv->AllocReadResourceLC( R_QTN_OFFLINE_NOT_POSSIBLE );
- CAknErrorNote* note = new (ELeave) CAknErrorNote( ETrue );
- note->ExecuteLD( *text );
- CleanupStack::PopAndDestroy( ); //text
- }
- else
- {
- TBool reception;
- TBool update(ETrue); // if value need to be updated
- iServer.GetReceptionStatus(reception);
- if ( aLaunchedFromOptionMenu )
- {
- LaunchDialogOnOffL(reception, update, R_TEXT_RECEPTION);
- }
- if ( update )
- {
- if ( !reception )
- {
- // Reception is off. -> Set reception On
- User::LeaveIfError( iServer.SetReceptionStatus( ETrue ) );
- }
- else
- {
- // Reception is On. -> Set reception Off
- User::LeaveIfError( iServer.SetReceptionStatus( EFalse ) );
- }
- }
- }
- break;
- }
- case ELanguage:
- {
- PrepareLanguageSettingPageL();
- break;
- }
- case ETopicDetection:
- {
- TBool detection;
- TBool update(ETrue);
-
- iServer.GetTopicDetectionStatus(detection);
-
- if ( aLaunchedFromOptionMenu )
- {
- LaunchTopicDetectionDialogOnOffL(detection, update, R_TEXT_TOPIC_DETECTION);
- }
-
- if ( update )
- {
- User::LeaveIfError( iServer.SetTopicDetectionStatus(!detection) );
- }
- break;
- }
- default:
- break;
- }
-
- GetSettingsL();
-
- return EKeyWasConsumed;
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::LaunchDialogOnOffL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::LaunchDialogOnOffL(
- const TBool& aValue, TBool& aUpdate, TInt aResourceId ) const
- {
- TInt selected( aValue ? ESettingOn : ESettingOff );
-
- CDesCArrayFlat* items =
- new (ELeave) CDesCArrayFlat(KNumberOfOnOfItems);
- CleanupStack::PushL(items);
-
- AddItemsToListL(R_CBS_ON_OFF_ARRAY, *items);
-
- HBufC* settingText = iCoeEnv->AllocReadResourceL(aResourceId);
- CleanupStack::PushL(settingText);
-
- CAknRadioButtonSettingPage* dlg =
- new (ELeave) CAknRadioButtonSettingPage(
- R_ON_OFF_SETTING_PAGE, selected, items);
-
- CleanupStack::PushL(dlg);
- dlg->SetSettingTextL(*settingText);
- CleanupStack::Pop(); // dlg
-
- dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged);
-
- CleanupStack::PopAndDestroy(); // settingText
-
- TBool valueNotChanged(
- selected == (aValue ? ESettingOn : ESettingOff) );
- if ( valueNotChanged )
- {
- aUpdate = EFalse;
- }
-
- CleanupStack::PopAndDestroy(); // items
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::LaunchTopicDetectionDialogOnOffL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::LaunchTopicDetectionDialogOnOffL(
- const TBool& aValue, TBool& aUpdate, TInt aResourceId ) const
- {
- TInt selected( aValue ? ESettingOn : ESettingOff );
-
- CDesCArrayFlat* items =
- new (ELeave) CDesCArrayFlat(KNumberOfOnOfItems);
- CleanupStack::PushL(items);
-
- AddItemsToListL(R_CBS_TOPIC_DETECTION_ON_OFF_ARRAY, *items);
-
- HBufC* settingText = iCoeEnv->AllocReadResourceL(aResourceId);
- CleanupStack::PushL(settingText);
-
- CAknRadioButtonSettingPage* dlg =
- new (ELeave) CAknRadioButtonSettingPage(
- R_ON_OFF_SETTING_PAGE, selected, items);
-
- CleanupStack::PushL(dlg);
- dlg->SetSettingTextL(*settingText);
- CleanupStack::Pop(); // dlg
-
- dlg->ExecuteLD(CAknSettingPage::EUpdateWhenChanged);
-
- CleanupStack::PopAndDestroy(); // settingText
-
- TBool valueNotChanged(
- selected == (aValue ? ESettingOn : ESettingOff) );
- if ( valueNotChanged )
- {
- aUpdate = EFalse;
- }
-
- CleanupStack::PopAndDestroy(); // items
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::HandleListViewActiontL
-//
-//
-// ---------------------------------------------------------
-//
-TKeyResponse CCbsUiSettingsViewContainer::HandleListViewActionL(
- TBool aLaunchedFromOptionMenu )
- {
- if ( iListBox )
- {
- return HandleListViewActionL(iListBox, aLaunchedFromOptionMenu);
- }
- return EKeyWasNotConsumed;
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::UpdateSettingsL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::UpdateSettingsL()
- {
- GetSettingsL();
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::SetFocusToFirstItem
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::SetFocusToFirstItem() const
- {
- __ASSERT_DEBUG( iListBox, CbsUiPanic(EErrNullPointer) );
- iListBox->SetCurrentItemIndexAndDraw(0);
- }
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::HandleListBoxEventL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::HandleListBoxEventL(
- CEikListBox* aListBox,
- TListBoxEvent aEventType )
- {
- if ( EEventEnterKeyPressed == aEventType
- || EEventItemSingleClicked == aEventType )
- {
- HandleListViewActionL(aListBox, EFalse);
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::SetLanguageSelectionL
-//
-//
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::SetLanguageSelectionL(
- CDesCArray& aItemArray )
- {
- TInt count( aItemArray.MdcaCount() );
-
- __ASSERT_ALWAYS( count == KPreciseNumberOfItemsBeforeLanguage,
- CbsUiPanic(EErrIndexOutOfBounds) );
-
- if ( count == KPreciseNumberOfItemsBeforeLanguage )
- {
- TInt textId(R_TEXT_LANGUAGE_ALL);
-
- switch ( GetSelected() )
- {
- case ECbsUiAll:
- // do nothing
- break;
- case ECbsUiSelected:
- textId = R_TEXT_LANGUAGE_SELECTED;
- break;
- case ECbsUiOther:
- textId = R_TEXT_LANGUAGE_OTHER;
- break;
- default:
- break;
- }
-
- HBufC* language = iCoeEnv->AllocReadResourceLC(textId);
- aItemArray.AppendL(*language);
-
- CleanupStack::PopAndDestroy(); // language
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::GetHelpContext
-//
-// Gets the control's help context.
-// ---------------------------------------------------------
-//
-void CCbsUiSettingsViewContainer::GetHelpContext( TCoeHelpContext& aContext ) const
- {
- aContext.iMajor = TUid::Uid(KUidCbsUiappDef);
- aContext.iContext = KMCE_HLP_SETTINGS_CB;
- }
-
-
-
-// ----------------------------------------------------
-// CCbsUiSettingsViewContainer::HandleResourceChange
-//
-// ----------------------------------------------------
-void CCbsUiSettingsViewContainer::HandleResourceChange( TInt aType )
- {
- CCoeControl::HandleResourceChange( aType );
-
- if( aType == KEikDynamicLayoutVariantSwitch )
- {
- iView.HandleRectChangeInContainer();
- }
- }
-
-
-// ---------------------------------------------------------
-// CCbsUiSettingsViewContainer::IsPhoneOfflineL
-//
-// Checks if phone is in offline mode or not.
-// Return ETrue if phone is in offline mode.
-// Return EFalse if phone is not in offline mode.
-// ---------------------------------------------------------
-//
-TBool CCbsUiSettingsViewContainer::IsPhoneOfflineL() const
- {
- if ( iOfflineFeatureSupported )
- {
- CRepository* repository = CRepository::NewLC( KCRUidCoreApplicationUIs );
- TInt connAllowed = 1;
- repository->Get( KCoreAppUIsNetworkConnectionAllowed, connAllowed );
- CleanupStack::PopAndDestroy(); // repository
- if ( !connAllowed )
- {
- return ETrue;
- }
- }
- return EFalse;
- }
-
-
-// End of File
--- a/cbs/cbsui/UiSrc/ccbsuiviewfactory.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implementation of CCbsUiViewFactory.
-*
-*
-*/
-
-
-// INCLUDES
-#include "CCbsUiViewFactory.h"
-#include "CCbsUiSettingsView.h"
-#include "CCbsUiTopicListView.h"
-#include "CCbsUiTopicView.h"
-#include "CCbsUIMsgView.h"
-#include "CCbsUiTopicListMonitor.h"
-#include "CCbsUiSettingsMonitor.h"
-#include "CbsUiPanic.h"
-
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CCbsUiViewFactory::CCbsUiViewFactory(
- MCbs& aServer, CCbsUiTopicListMonitor& aTopicMonitor ) :
- iTopicMonitor( aTopicMonitor ),
- iServer( aServer )
- {
- }
-
-// Destructor
-CCbsUiViewFactory::~CCbsUiViewFactory()
- {
- }
-
-// ---------------------------------------------------------
-// CCbsUiViewFactory::CreateTopicListViewLC
-//
-//
-// ---------------------------------------------------------
-//
-CAknView* CCbsUiViewFactory::CreateTopicListViewLC()
- {
- CCbsUiTopicListView* view = CCbsUiTopicListView::NewL( iServer );
- CleanupStack::PushL( view );
- iTopicMonitor.AddObserverL( view );
- return view;
- }
-
-// ---------------------------------------------------------
-// CCbsUiViewFactory::CreateTopicViewLC
-//
-//
-// ---------------------------------------------------------
-//
-CAknView* CCbsUiViewFactory::CreateTopicViewLC()
- {
- CCbsUiTopicView* view = CCbsUiTopicView::NewL( iServer );
- CleanupStack::PushL( view );
- iTopicMonitor.AddObserverL( view );
- return view;
- }
-
-// ---------------------------------------------------------
-// CCbsUiViewFactory::CreateMsgViewLC
-//
-//
-// ---------------------------------------------------------
-//
-CAknView* CCbsUiViewFactory::CreateMsgViewLC()
- {
- CCbsUiMsgView* view = CCbsUiMsgView::NewL( iServer );
- CleanupStack::PushL( view );
- iTopicMonitor.AddObserverL( view );
- return view;
- }
-
-// ---------------------------------------------------------
-// CCbsUiViewFactory::CreateSettingsViewLC
-//
-//
-// ---------------------------------------------------------
-//
-CAknView* CCbsUiViewFactory::CreateSettingsViewLC()
- {
- CCbsUiSettingsView* view = CCbsUiSettingsView::NewL( iServer );
- CleanupStack::PushL( view );
- view->UpdateContextPaneL();
- return view;
- }
-
-
-// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/cbsui.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,66 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = app
+TARGET = cbsui
+DEPENDPATH += .
+INCLUDEPATH += .
+
+CONFIG += hb
+MOC_DIR = moc
+
+ICON = resources/icons/qgn_menu_cb.svg
+
+symbian:
+{
+ TARGET.CAPABILITY = CAP_APPLICATION
+ TARGET.UID3 = 0x101F4CD3
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+ ../../inc \
+ $$MOC_DIR
+ LIBS += -lcbsclient \
+ -lflogger
+
+ BLD_INF_RULES.prj_exports += "rom/cbsui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cbsui.iby)" \
+ "rom/cbsuiresources.iby CORE_MW_LAYER_IBY_EXPORT_PATH(cbsuiresources.iby)" \
+ "rom/cbsui_stub.sis /epoc32/data/z/system/install/cbsui_stub.sis"
+
+}
+
+
+# Input
+HEADERS += inc/cbslog.h \
+ inc/cbsuimainwindow.h \
+ inc/cbsuitopiclistview.h \
+ inc/cbsuitopicview.h \
+ inc/cbsuiviewmanager.h \
+ inc/ccbsuisettingsmonitor.h \
+ inc/ccbsuitopiclistmonitor.h \
+ inc/mcbs.h \
+ inc/mcbsuisettingsobserver.h \
+ inc/mcbsuitopicmonitorobserver.h \
+ inc/msavemessagecontroller.h \
+ inc/rcbsui.h
+SOURCES += src/cbsuimainwindow.cpp \
+ src/cbsuitopiclistview.cpp \
+ src/cbsuitopicview.cpp \
+ src/cbsuiviewmanager.cpp \
+ src/ccbsuitopiclistmonitor.cpp \
+ src/main.cpp \
+ src/rcbsui.cpp
+
+RESOURCES += resources/cbs_app.qrc
+
Binary file cbs/cbsui/help/data/xhtml.zip has changed
--- a/cbs/cbsui/help/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - Initial contribution
-*
-* Contributors:
-*
-*
-* Description:
-* Export help related files.
-*
-*/
-
-#include <platform_paths.hrh>
-PRJ_EXPORTS
-:zip ../data/xhtml.zip /epoc32/data/z/resource/ overwrite
-:zip ../data/xhtml.zip /epoc32/winscw/c/resource/ overwrite
-
-../inc/cbs.hlp.hrh MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/cbs.hlp.hrh)
-../rom/cbsuihelps_variant.iby CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(cbsuihelps_variant.iby)
--- a/cbs/cbsui/help/inc/cbs.hlp.hrh Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//
-// cbs.hlp.hrh generated by CSXHelp Utilities.
-//
-
-#ifndef __CBS_HLP_HRH__
-#define __CBS_HLP_HRH__
-
-_LIT(KCBS_HLP_TOPIC_VIEW, "CBS_HLP_TOPIC_VIEW"); //
-_LIT(KCBS_HLP_MAIN, "CBS_HLP_MAIN"); //
-_LIT(KCBS_HLP_MSG, "CBS_HLP_MSG"); //
-
-#endif
\ No newline at end of file
--- a/cbs/cbsui/help/rom/cbsuihelps_variant.iby Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __CBSUIHELPS_VARIANT_IBY__
-#define __CBSUIHELPS_VARIANT_IBY__
-
-#if defined(FF_S60_HELPS_IN_USE) && defined(__CELL_BROADCAST)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CD3\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CD3\contents.zip)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CD3\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CD3\index.xml)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CD3\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CD3\keywords.xml)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CD3\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CD3\meta.xml)
-#endif
-
-#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/cbslog.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Offers logging facility through flogger
+*
+*/
+
+
+#ifndef CBSLOG_H
+#define CBSLOG_H
+
+// LOGGING LEVELS
+const TInt SIMPLE( 1 );
+const TInt NORMAL( 2 );
+const TInt DETAILED( 3 );
+
+#include <flogger.h>
+#include <e32svr.h> // For RDebug
+
+#define ENABLE_CBS_LOGGING
+
+
+#ifdef ENABLE_CBS_LOGGING
+
+ //
+ // DEFINE THE LOGGING LEVEL HERE: SIMPLE, NORMAL, DETAILED
+ //
+ #define LOGGING_LEVEL NORMAL
+
+ // CONSTANTS
+ _LIT( KLogDir, "cbs" );
+ _LIT( KLogFile, "cbsui_qt.txt" );
+
+ // This warning is disabled: conditinal expression is constant.
+
+ //
+ // USE THIS MACRO FOR LOGGING. THE LEVEL OF LOGGING CAN BE
+ // SIMPLE, NORMAL, DETAILED
+ //
+ #ifdef LOG
+ #undef LOG
+ #endif
+
+ #define LOG( LEVEL, TEXT ) \
+ { \
+ if ( LEVEL <= LOGGING_LEVEL ) \
+ { \
+ _LIT( KText, TEXT ); \
+ RFileLogger::Write( \
+ KLogDir, \
+ KLogFile, \
+ EFileLoggingModeAppend, \
+ KText ); \
+ RDebug::Print( KText ); \
+ } \
+ }
+
+ #ifdef LOG2
+ #undef LOG2
+ #endif
+
+ #define LOG2( LEVEL, TEXT, VARIABLE ) \
+ { \
+ if ( LEVEL <= LOGGING_LEVEL ) \
+ { \
+ _LIT( KText, TEXT ); \
+ RFileLogger::WriteFormat( \
+ KLogDir, \
+ KLogFile, \
+ EFileLoggingModeAppend, \
+ TRefByValue<const TDesC>( KText() ), VARIABLE ); \
+ RDebug::Print( KText, VARIABLE ); \
+ } \
+ }
+
+ #ifdef LOG3
+ #undef LOG3
+ #endif
+
+ #define LOG3( LEVEL, TEXT, VARIABLE1, VARIABLE2 ) \
+ { \
+ if ( LEVEL <= LOGGING_LEVEL ) \
+ { \
+ _LIT( KText, TEXT ); \
+ RFileLogger::WriteFormat( \
+ KLogDir, \
+ KLogFile, \
+ EFileLoggingModeAppend, \
+ TRefByValue<const TDesC>( KText() ), VARIABLE1, VARIABLE2 ); \
+ RDebug::Print( KText, VARIABLE1, VARIABLE2 ); \
+ } \
+ }
+
+#else // ENABLE_CBS_LOGGING
+
+ #define LOG( LEVEL, TEXT )
+
+ #define LOG2( LEVEL, TEXT, VARIABLE1 )
+
+ #define LOG3( LEVEL, TEXT, VARIABLE1, VARIABLE2 )
+
+#endif // ENABLE_CBS_LOGGING
+
+#endif // CBSLOG_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/cbsuiconstants.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,79 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Contains constants which are used in CBSUI application.
+*
+*
+*/
+
+
+#ifndef __CBS_UI_CONSTANTS_H
+#define __CBS_UI_CONSTANTS_H
+
+// INCLUDES
+
+// CONSTANTS
+const TInt KCbsUiCustomMessageIdInt = 11;
+const TUid KCbsUiCustomMessageId = { KCbsUiCustomMessageIdInt };
+ // When message view is launched by other
+ // application its message id is 0, this
+ // just has to differ from the other
+ // applications message id.
+
+// When view is launched with this id it knows to set the focus to id,
+// which is passed as parameter to DoActivateL.
+const TUid KSetFocusToId = { 12 };
+
+// activates view to its current id.
+const TUid KSetFocusToCurrentId = { 13 };
+
+// How many digits there are in topic number
+const TInt KTopicNumberWidth = 3; //EMaxTopicNumberLength;
+
+const TInt KNumberOfTemporaryMessages = 3;
+
+// Error value used in Cbs ui.
+const TInt KCbsErrValue = -1;
+
+// This kind of topic number cannot exists
+const TInt KCbsInvalidTopicNumber = 22000;
+
+// Max message title length
+const TInt KMaxMessageTitleLength = 40;
+
+// Max topic name length
+const TInt KMaxTopicNameLength = 80;
+
+// DATA TYPES
+enum { EMinTopicNumber = 0, EMaxTopicNumber = 999 };
+
+enum TCbsUiLanguageSelectionIndex
+ {
+ ECbsUiAll = 0,
+ ECbsUiSelected = 1,
+ ECbsUiOther = 2
+ };
+
+// for activating topic view with right state
+struct TCbsUiTopicActivationPckg
+ {
+ // current topic number
+ TCbsTopicNumber iTopicNumber;
+
+ // current message handle
+ TCbsMessageHandle iMessageHandle;
+ };
+
+#endif // __CBS_UI_CONSTANTS_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/cbsuidebug.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Provides macros for testing.
+*
+*
+*/
+
+
+#ifndef CBSUIDEBUG_H
+#define CBSUIDEBUG_H
+
+
+////////////////////////////
+// MEMORY TEST MACRO //
+
+
+#ifdef _DEBUG
+#define _CBSUI_DEBUG
+#endif // _DEBUG
+
+#ifdef _CBSUI_DEBUG
+ #define _CBSUI_ASSERT(condition, function) \
+ _ASSERT_DEBUG(condition, function)
+ #define _CBSUI_ASSERT_E(condition, error) \
+ _ASSERT_DEBUG(condition, CbsUiPanic(error) )
+#else
+ #define _CBSUI_ASSERT(condition, function)
+ #define _CBSUI_ASSERT_E(condition, error)
+#endif //_CBSUI_DEBUG
+
+
+#endif // CBSUIDEBUG_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/cbsuimainwindow.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,44 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CBSUIMAINWINDOW_H
+#define CBSUIMAINWINDOW_H
+
+#include <hbmainwindow.h>
+
+class HbMainWindow;
+class MCbs;
+class CbsUiViewManager;
+
+class CbsUiMainWindow : public HbMainWindow
+{
+public:
+ CbsUiMainWindow();
+ virtual ~CbsUiMainWindow();
+
+private:
+ /*
+ * Own
+ */
+ MCbs *mServer;
+ /*
+ * Own
+ */
+ CbsUiViewManager *mViewManager;
+};
+
+#endif /* CBSUIMAINWINDOW_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/cbsuitopiclistview.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,301 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CBSUITOPICLISTVIEW_H
+#define CBSUITOPICLISTVIEW_H
+
+#include <hbview.h>
+#include <CbsCommon.h>
+#include <CbsCommonTypes.h>
+
+#include "mcbsuitopicmonitorobserver.h"
+
+// CONSTANTS
+const TInt KNumberOfStandardTopics = 17; //TODO what's this
+
+class HbListWidget;
+class HbAction;
+class CCbsUiTopicListMonitor;
+class CbsUiViewManager;
+class MCbs;
+class HbInputDialog;
+class HbListWidgetItem;
+class QPointF;
+
+typedef CArrayFixFlat< TCbsTopicNumber > TCbsUiTopicNumberList;
+
+class CbsUiTopicListView: public HbView,
+ public MCbsUiTopicMonitorObserver
+{
+ Q_OBJECT
+public:
+ /**
+ * Constructor
+ */
+ CbsUiTopicListView();
+
+ /**
+ * Destructor
+ */
+ ~CbsUiTopicListView();
+
+ /**
+ * Init.
+ *
+ * @param server MCbs reference from CbsUiMainWindow
+ * @param viewManager CbsUiViewManager reference from CbsUiMainWindow
+ */
+ void init(MCbs &server, CbsUiViewManager &viewManager);
+
+public: // from MCbsUiTopicMonitorObserver
+ /**
+ * Topic list or topic messages are changed.
+ *
+ * @param aEvent reason for event
+ * @param aTopicNumber Topic number, which caused the event
+ */
+ virtual void TopicListChangedL(TCbsTopicListEvent aEvent,
+ TCbsTopicNumber aTopicNumber);
+
+private slots:
+
+ /**
+ * Connect with left toolbar
+ */
+ void toggleReception();
+
+ /**
+ * Connect with popup menu hotmark action
+ */
+ void toggleHotmark();
+
+ /**
+ * Connect with popup menu Subscription action
+ */
+ void toggleSubscription();
+
+ /**
+ * Connect with add topic toolbar
+ */
+ void addTopic();
+
+ /**
+ * Connect with popup menu delete action
+ */
+ void deleteTopic();
+
+ /**
+ * Connect with popup menu edit action
+ */
+ void editTopic();
+
+ /**
+ * Connect with short press
+ *
+ * @param item selection item
+ */
+ void showTopicSelectionView(HbListWidgetItem *item);
+
+ /**
+ * showTopicView
+ *
+ * @param item selection item
+ */
+ void showTopicView(HbListWidgetItem *item);
+
+ /**
+ * showTopicIndexMenu(000)
+ *
+ * @param item selection item
+ * @param coords availalbe menu show position
+ */
+ void showTopicIndexMenu(HbListWidgetItem *item, QPointF coords);
+
+ /**
+ * ShowTopicsMenu(1-999)
+ *
+ * @param item selection item
+ * @param coords availalbe menu show position
+ */
+ void showTopicsMenu(HbListWidgetItem *item, QPointF coords);
+
+ /**
+ * Connect with add / edit popup dialog to en/dis able OK button
+ */
+ void updateQueryAction(QString text);
+
+private:
+
+ /**
+ * createComponents
+ */
+ void createComponents();
+
+ /**
+ * Reload topic index data and update topic index widget. (000)
+ */
+ void reloadTopicIndex();
+
+ /**
+ * Reload topics data and update topics widget (1-999)
+ */
+ void reloadTopics();
+
+ /**
+ * Update given item
+ *
+ * @param item selection item
+ * @param topic selection topic
+ */
+ void updateItem(HbListWidgetItem &item, const TCbsTopic &topic);
+
+ /**
+ * UpdateItemIcon
+ *
+ * @param item selection item
+ * @param topic selection topic
+ */
+ void updateItemIcon(HbListWidgetItem &item, const TCbsTopic &topic);
+
+ /**
+ * updateItemText
+ *
+ * @param item selection item
+ * @param topic selection topic
+ */
+ void updateItemText(HbListWidgetItem &item, const TCbsTopic &topic);
+
+ /**
+ * Update current item by mTopicRow
+ *
+ * @param topic selection topic
+ */
+ void updateCurrentItem(const TCbsTopic &topic);
+
+ /**
+ * UpdateCurrentItemIcon, (un)subcribe and (un)hotmark
+ *
+ * @param topic selection topic
+ */
+ void updateCurrentItemIcon(const TCbsTopic &topic);
+
+ /**
+ * UpdateCurrentItemText
+ *
+ * @param topic selection topic
+ */
+ void updateCurrentItemText(const TCbsTopic &topic);
+
+ /**
+ * ShowPopupMenu
+ *
+ * @param topic selection topic
+ * @param coords availalbe menu show position
+ */
+ void showPopupMenu(const TCbsTopic &topic, QPointF coords);
+
+ /**
+ * Show current topic query dialog
+ * (edit/add current topic number or name)
+ *
+ * @param topic selection topic
+ * @param isAddTopic check if add or edit mode
+ */
+ bool showTopicQuery(TCbsTopic &topic, const bool isAddTopic);
+
+ /**
+ * Show topic number in use popup when edit topic
+ */
+ void showNumberInUsePopup();
+
+private: // Data
+ /**
+ * Not own, from CbsUiMainWindow
+ */
+ MCbs *mServer;
+ /**
+ * Not own, from CbsUiMainWindow
+ */
+ CbsUiViewManager *mViewManager;
+
+ int mTopicRow;
+
+ /**
+ * Not own, load from docml
+ */
+ HbListWidget *mTopicIndexWidget;
+
+ /**
+ * Not own, load from docml
+ */
+ HbListWidget *mTopicsWidget;
+
+ /**
+ * Not own, load from docml
+ */
+ HbAction *mReceptionButton;
+
+ /**
+ * Not own, load from docml
+ */
+ HbAction *mOpenAction;
+
+ /**
+ * Not own, load from docml
+ */
+ HbAction *mSubscibeAction;
+
+ /**
+ * Not own, load from docml
+ */
+ HbAction *mUnSubscibeAction;
+
+ /**
+ * Not own, load from docml
+ */
+ HbAction *mHotmarkAction;
+
+ /**
+ * Not own, load from docml
+ */
+ HbAction *mUnHotmarkAction;
+
+ /**
+ * Not own, load from docml
+ */
+ HbAction *mEditAction;
+
+ /**
+ * Not own, load from docml
+ */
+ HbAction *mDeleteAction;
+
+ //Monitors changes in topic list (Symbian).
+ CCbsUiTopicListMonitor *mMonitor;
+
+ /**
+ * Own, for add / edit topic
+ */
+ HbInputDialog *mTopicQuery;
+
+ /**
+ * Own
+ */
+ TCbsUiTopicNumberList *mTopicNumberList;
+};
+
+#endif // CBSUITOPICLISTVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/cbsuitopicview.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CBSUITOPICVIEW_H
+#define CBSUITOPICVIEW_H
+
+#include <hbview.h>
+#include <hbaction.h>
+#include <CbsCommonTypes.h>
+#include "mcbsuitopicmonitorobserver.h"
+
+class HbListWidget;
+class MCbs;
+class CbsUiViewManager;
+
+class CbsUiTopicView : public HbView,
+ public MCbsUiTopicMonitorObserver
+{
+ Q_OBJECT
+
+public:
+
+ /**
+ * Constructor
+ */
+ CbsUiTopicView();
+
+ /**
+ * Destructor
+ */
+ ~CbsUiTopicView();
+
+ /**
+ * Constructor
+ * @param server The handler of connecting to Cbs server.
+ * @param viewManager CbsUiViewManager.
+ */
+ void init(MCbs &server, CbsUiViewManager &viewManager);
+
+public: // From MCbsUiTopicMonitorObserver
+ /**
+ * Topic list or topic messages are changed.
+ *
+ * @param aEvent reason for event
+ * @param aTopicNumber Topic number, which caused the event
+ */
+ virtual void TopicListChangedL(TCbsTopicListEvent aEvent,
+ TCbsTopicNumber aTopicNumber);
+
+ /**
+ * Reload Messages
+ *
+ * @param topicNumber topic number
+ */
+ void reloadMessages(TCbsTopicNumber topicNumber);
+
+private:
+ /**
+ * It defines the type for message handle lists.
+ */
+ //typedef CArrayFixFlat< TCbsMessageHandle > TCbsUiMessageHandleList;
+
+ void createComponents();
+ void addMessage(const TCbsMessage &message, const QString &msgName);
+
+private: // Data
+ // Not own
+ MCbs *mServer;
+
+ // Not own
+ CbsUiViewManager *mViewManager;
+
+ // Own
+ HbListWidget *mTopic;
+
+ //TCbsUiMessageHandleList* mMsgHandles;
+ TCbsTopicNumber mCurrentTopicNumber;
+
+ // Previous Message(not own)
+ HbAction *mPrevious;
+
+ //Previous Message(not own)
+ HbAction *mBack;
+};
+
+#endif // CBSUITOPICVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/cbsuiutility.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,107 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Provides different utility functions for CBSUI.
+*
+*/
+
+
+#ifndef CBSUIUTILITY_H
+#define CBSUIUTILITY_H
+
+// INCLUDES
+
+// FORWARD DECLARATIONS
+class MSaveMessageController;
+class MCbs;
+
+
+// CLASS DECLARATION
+
+/**
+* Offers utility functions for CBSUI.
+*
+*/
+class CbsUiUtility
+ {
+
+ public: // New functions
+
+ /**
+ * Shows confirmation note with text accordingly to aResourceId.
+ *
+ * @param aResourceId resource id
+ * @param aWaitingDialog if ETrue dialog waits before continues
+ */
+ LOCAL_C void ShowConfirmationNoteL(
+ const TInt aResourceId, TBool aWaitingDialog = EFalse );
+
+ /**
+ * Shows error note with text accordingly to aResourceId.
+ *
+ * @param aResourceId resource id
+ */
+ LOCAL_C void ShowErrorNoteL( const TInt aResourceId );
+
+ /**
+ * Shows warning note with text accordingly to aResourceId.
+ *
+ * @param aResourceId resource id
+ */
+ LOCAL_C void ShowWarningNoteL( const TInt aResourceId );
+
+ /**
+ * Shows a note accordingly to parameters.
+ *
+ * @param aResource note resource id
+ * @param aTimeout duration
+ * @param aTone sound
+ */
+ /*LOCAL_C void ShowNoteL( const TInt aResource,
+ const CAknNoteDialog::TTimeout aTimeout,
+ const CAknNoteDialog::TTone aTone );*/
+
+ /**
+ * Returns a new navigation pane. Remember to delete a memory area!
+ *
+ * @return new empty decorated label
+ */
+ //LOCAL_C CAknNavigationDecorator* CreateEmptyNavigationPaneL();
+
+ /**
+ * Returns ETrue if message is saved
+ *
+ * @param aHandle message to be checked
+ * @param aServer is needed to get information
+ * @return ETrue if current message is saved
+ */
+ LOCAL_C TBool IsSavedL( const TCbsMessageHandle aHandle, MCbs& aServer );
+
+ /**
+ * Saves the message and shows a error message in case
+ * something went wrong.
+ *
+ * @param aHandle message to be saved
+ * @param aSaver saves the message and shows global error note if needed
+ * @return Error code
+ */
+ LOCAL_C TInt SaveCurrentMessageL(
+ const TCbsMessageHandle aHandle,
+ MSaveMessageController& aSaver );
+
+ };
+
+#endif // CBSUIUTILITY_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/cbsuiviewmanager.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,131 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CBSUIVIEWMANAGER_H
+#define CBSUIVIEWMANAGER_H
+
+#include <QObject>
+#include <CbsCommonTypes.h>
+#include <hbdocumentloader.h>
+
+class HbMainWindow;
+class MCbs;
+class CCbsUiTopicListMonitor;
+class CbsUiTopicListView;
+class CbsUiTopicView;
+class HbAction;
+
+
+// Here we create custom document loader to be able to use own classes in XML.
+class CbsUiDocumentLoader : public HbDocumentLoader
+{
+public:
+ virtual QObject *createObject(const QString &type, const QString &name);
+};
+
+class CbsUiViewManager : public QObject
+{
+ Q_OBJECT
+public:
+
+ /**
+ * Constructor
+ *
+ * @param window The mainwindow of qt mode.
+ * @param server The handler of connecting to Cbs server.
+ */
+ CbsUiViewManager(HbMainWindow *window, MCbs &server);
+
+ /**
+ * Destructor
+ */
+ ~CbsUiViewManager();
+
+ /**
+ * Get handler of CbsUiDocumentLoader
+ *
+ * @return The handler of CbsUiDocumentLoader.
+ */
+ CbsUiDocumentLoader* xmlLoader() { return mLoader; };
+
+public slots:
+
+ /**
+ * Activate the currenct view as Topic view
+ *
+ * @param topicNumber The currenct topic number.
+ */
+ void activateTopicView(TCbsTopicNumber topicNumber);
+
+ /**
+ * Activate the currenct view as Topic list view
+ */
+ void activateMainView();
+
+private:
+
+ /**
+ * Not Own, from CbsUiMainWindow
+ */
+ HbMainWindow *mMainWindow;
+
+ /**
+ * Own
+ */
+ CCbsUiTopicListMonitor *mTopicMonitor;
+
+ /**
+ * Not own, reference of MCbs
+ */
+ MCbs &mServer;
+
+ /**
+ * Own but don't delete. Deleted via mObjects
+ */
+ CbsUiTopicListView *mTopicListView;
+
+ /**
+ * Own but don't delete. Deleted via mObjects
+ */
+ CbsUiTopicView *mTopicView;
+
+ /**
+ * Own
+ */
+ CbsUiDocumentLoader *mLoader;
+
+ /**
+ * objects load from XML. Needs to be deleted once application exits
+ */
+ QList<QObject *> mObjects;
+
+ /**
+ * Own but don't delete. Deleted via mObjects
+ */
+ HbAction *mSoftKeyBackAction;
+
+ /**
+ * Own but don't delete. Deleted via mObjects
+ */
+ HbAction *mSoftKeyExitAction;
+
+};
+
+#endif // CBSUIVIEWMANAGER_H
+
+// End of file
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/ccbsuisettingsmonitor.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef CCBSUISETTINGSMONITOR_H
+#define CCBSUISETTINGSMONITOR_H
+
+// INCLUDES
+#include <E32BASE.H>
+#include <cbscommon.h>
+
+// FORWARD DECLARATIONS
+class MCbs;
+class CCbsUiappAppUi;
+class MCbsUiSettingsObserver;
+
+// CLASS DEFINITIONS
+
+
+/**
+* Server notifies this class if settings are changed.
+*
+*/
+class CCbsUiSettingsMonitor : public CActive
+ {
+ public: // New functions
+ /**
+ * Create an instance of the class.
+ *
+ * @param aServer cbs server
+ * @param aObserver settings observer
+ */
+ static CCbsUiSettingsMonitor* NewL(
+ MCbs& aServer , MCbsUiSettingsObserver& aObserver );
+
+ /**
+ * Destructor.
+ */
+ ~CCbsUiSettingsMonitor();
+
+ public: // From CActive
+
+ /**
+ * It is called when server notifies.
+ */
+ void RunL();
+
+ /**
+ * Cancels the request.
+ */
+ void DoCancel();
+
+ private: // New functions
+
+ /**
+ * Issues the request..
+ */
+ void IssueRequest();
+
+ private:
+
+ /**
+ * Constructor.
+ *
+ * @param aServer cbs server
+ */
+ CCbsUiSettingsMonitor(
+ MCbs& aServer, MCbsUiSettingsObserver& aObserver );
+
+ /**
+ * Finalizes the construction.
+ */
+ void ConstructL();
+
+ private: // Data
+
+ // ETrue if request is continued.
+ TBool iContinue;
+
+ // Server subsession for settings
+ MCbs& iServer;
+
+ // Event which is registered to server
+ TCbsSettingsEvent iEvent;
+
+ // Observer who is interested about settings changes.
+ MCbsUiSettingsObserver& iObserver;
+ };
+
+#endif // CCBSUISETTINGSMONITOR_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/ccbsuitopiclistmonitor.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,117 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef CCBSUITOPICLISTMONITOR_H
+#define CCBSUITOPICLISTMONITOR_H
+
+// INCLUDES
+#include <e32base.h>
+#include <CbsCommon.h>
+
+
+// FORWARD DECLARATIONS
+class MCbs;
+class MCbsUiTopicMonitorObserver;
+
+// CLASS DEFINITIONS
+
+
+/**
+* Monitors topic related events.
+*/
+class CCbsUiTopicListMonitor : public CActive
+ {
+ public: // New functions
+
+ /**
+ * Create an instance of the class.
+ *
+ * @param aServer cbs server
+ */
+ static CCbsUiTopicListMonitor* NewL( MCbs& aServer );
+
+ /**
+ * Destructor.
+ */
+ ~CCbsUiTopicListMonitor();
+
+ /**
+ * Issues the request.
+ */
+ void IssueRequest();
+
+ public: // From CActive
+
+ /**
+ * It is called when server notifies.
+ */
+ void RunL();
+
+ /**
+ * Cancels the request.
+ */
+ void DoCancel();
+
+ public: // New functions
+
+ /**
+ * Adds a observer to this monitor.
+ *
+ * @param aObserver Observer to be added.
+ */
+ void AddObserverL( MCbsUiTopicMonitorObserver* aObserver );
+
+ private:
+
+ typedef CArrayFixFlat<MCbsUiTopicMonitorObserver*>
+ TCbsUiMonitorObservers;
+
+ /**
+ * Constructor.
+ *
+ * @param aServer cbs server
+ */
+ CCbsUiTopicListMonitor( MCbs& aServer );
+
+ /**
+ * Finalizes the construction.
+ */
+ void ConstructL();
+
+ private: // Data
+
+ // ETrue if request is active.
+ TBool iContinue;
+
+ // To issue the request.
+ MCbs& iServer;
+
+ // Observers who are interested in topic changes.
+ // Monitor doesn't own the observers.
+ TCbsUiMonitorObservers* iObservers;
+
+ // Which topic handle the event is conserning.
+ TCbsTopicNumber iTopicNumber;
+
+ // What kind of event has been.
+ TCbsTopicListEvent iEvent;
+ };
+
+#endif // CCBSUITOPICLISTMONITOR_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/mcbs.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,557 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Interface for cbs client.
+*
+*/
+
+
+#ifndef MCBS_H
+#define MCBS_H
+
+// INCLUDES
+#include <CbsCommon.h>
+
+/**
+* Interface MCbs is used to change real client server
+* connection to some test stub implementation.
+*/
+class MCbs
+ {
+ public:
+
+ /**
+ * Destructor.
+ */
+ virtual ~MCbs() {}
+
+ /**
+ * Creates connection to the server.
+ *
+ * Note that the method must be called before calling any other
+ * methods. The method returns an error code and, therefore,
+ * the caller is responsible of checking that everything went just
+ * fine.
+ *
+ * @return Error code.
+ */
+ virtual TInt Connect() = 0;
+
+ /**
+ * Closes the session to the server.
+ */
+ virtual void Close() = 0;
+
+ /**
+ * Returns the version of CbsClient.
+ *
+ * CbsServer and CbsClient must be of same version.
+ *
+ * @return Returns the version of CbsClient.
+ */
+ virtual TVersion Version() const = 0;
+
+ // === Settings-related methods
+
+ /**
+ * Returns the reception status in aStatus, which is ETrue if the reception is
+ * on. Otherwise it is EFalse.
+ *
+ * @param aStatus The method returns the reception status in this parameter.
+ */
+ virtual void GetReceptionStatus( TBool& aStatus ) = 0;
+
+ /**
+ * Changes the reception status to aStatus.
+ *
+ * @param aStatus It contains the new reception status.
+ * @return Error code.
+ */
+ virtual TInt SetReceptionStatus( TBool aStatus ) = 0;
+
+ /**
+ * Returns the topic detection status in aStatus, which is ETrue if the detection
+ * is on. Otherwise it is EFalse.
+ *
+ * @param aStatus The method returns the topic detection status in this parameter.
+ */
+ virtual void GetTopicDetectionStatus( TBool& aStatus ) = 0;
+
+ /**
+ * Changes the topic detection status to aStatus.
+ *
+ * @param aStatus It contains the new topic detection status.
+ * @return Error code.
+ */
+ virtual TInt SetTopicDetectionStatus( TBool aStatus ) = 0;
+
+ /**
+ * Returns the preferred languages in aLanguages.
+ *
+ * @param aLanguages The method returns the languages in this parameter.
+ */
+ virtual void GetLanguages( TCbsSettingsLanguages& aLanguages ) = 0;
+
+ /**
+ * Changes the preferred languages to aLanguages.
+ *
+ * @param aLanguages It contains the new preferred languages.
+ * @return Error code.
+ */
+ virtual TInt SetLanguages( const TCbsSettingsLanguages& aLanguages ) = 0;
+
+ /**
+ * Requests the server to notify the client whenever any settings will be
+ * changed.
+ *
+ * Note that for each subsession only one this kind of request can be pending. Each
+ * client is responsible of assuring this.
+ *
+ * @param aStatus It is the variable that the server will modify whenever an event occurs.
+ * @param aEvent The server will store the type of occurred event to this variable.
+ */
+ virtual void NotifySettingsChanged( TRequestStatus& aStatus, TCbsSettingsEvent& aEvent ) = 0;
+
+ /**
+ * Cancels the request to notify the client.
+ */
+ virtual void NotifySettingsChangedCancel() = 0;
+
+ // === Topic Collection-related methods
+
+ /**
+ * Resets the iterator. Must be called prior any call to HasNextTopic()
+ * or NextTopic()!
+ */
+ virtual void StartCollectionBrowsing() = 0;
+
+ /**
+ * Returns ETrue, if there is a topic not accessed with NextTopic()
+ *
+ * @return ETrue, if there is a topic. EFalse if the end of the collection
+ * has been reached.
+ */
+ virtual TBool HasNextCollectionTopic() = 0;
+
+ /**
+ * Returns the next topic in the topic collection skipping all topics with
+ * a topic number matching a topic already listed in the current topic list.
+ * This function will return KErrNotFound if the collection is tried to
+ * access beyond the end of the list. Otherwise the error code will be
+ * the same returned by GetTopicInfo().
+ *
+ * @param aInfo The topic information will be stored here.
+ * @return The error code. KErrNotFound if there are no topics left.
+ */
+ virtual TInt NextCollectionTopic( TCbsTopicInfo& aInfo ) = 0;
+
+ // === Topic list-related methods
+
+ /**
+ * Returns the total amount of topics the topic list contains.
+ *
+ * @param aCount It will contain the total amount of topics.
+ */
+ virtual void GetTopicCount( TInt& aCount ) = 0;
+
+ /**
+ * Returns information about a topic from the topic list.
+ *
+ * Return values:
+ * KErrArgument Topic was not found.
+ *
+ * Rest of return values indicate a file error.
+ *
+ * @param aIndex It is the index to the topic.
+ * @param aTopic It will contain the topic information.
+ * @return Error code.
+ */
+ virtual TInt GetTopic( const TInt aIndex, TCbsTopic& aTopic ) = 0;
+
+ /**
+ * Finds the topic by the given number.
+ *
+ * Return values:
+ * KErrNone Topic returned in parameter aTopic.
+ * KErrNotFound Topic was not found.
+ *
+ * @param aNumber Number of the topic
+ * @param aTopic Return: contains the topic information
+ * @return Error code
+ */
+ virtual TInt FindTopicByNumber( TCbsTopicNumber aNumber,
+ TCbsTopic& aTopic ) = 0;
+
+ /**
+ * Deletes an existing topic.
+ *
+ * @param aNumber Number of the topic to be deleted
+ * @return Error code
+ */
+ virtual TInt DeleteTopic( TCbsTopicNumber aNumber ) = 0;
+
+ /**
+ * Delete all topics.
+ *
+ * @return Error code.
+ */
+ virtual TInt DeleteAllTopics() = 0;
+
+ /**
+ * Adds a new topic. The handle assigned to the topic will be returned
+ * in aTopic.
+ *
+ * Return values:
+ * KErrNone Topic was successfully added.
+ * KErrAlreadyExists A topic of the same number already exists in DB
+ * KErrArgument Topic number given was not in a proper range.
+ * KErrDiskFull Topic not added - FFS out of space
+ *
+ * Note that the number of the new topic must be unused.
+ *
+ * @param aTopic Contains the information of the new topic.
+ * On return, aTopic also contains the topic
+ * handle.
+ * @return Error code.
+ */
+ virtual TInt AddTopic( TCbsTopic& aTopic ) = 0;
+
+ /**
+ * Changes the name and number of the existing topic.
+ *
+ * Note that the changing fails in case there is another topic with
+ * the new topic number. It also fails if the topic is protected.
+ *
+ * Return values:
+ * KErrNone Topic name and number successfully changed.
+ * KErrDiskFull Topic information not changed - FFS out of space
+ *
+ * @param aOldNumber Number of the topic to be changed
+ * @param aNewNumber Number to be given for the topic
+ * @param aName Name to be given for the topic
+ * @return Error code
+ */
+ virtual TInt ChangeTopicNameAndNumber(
+ TCbsTopicNumber aOldNumber,
+ TCbsTopicNumber aNewNumber,
+ const TCbsTopicName& aName ) = 0;
+
+ /**
+ * Changes topic subscription status.
+ *
+ * @param aNumber Number of the topic
+ * @param aNewStatus New subscription status
+ * @return Error code
+ */
+ virtual TInt ChangeTopicSubscriptionStatus(
+ TCbsTopicNumber aNumber, TBool aNewStatus ) = 0;
+
+ /**
+ * Changes topic hotmark status.
+ *
+ * @param aNumber Number of the topic
+ * @param aNewStatus New hotmark status
+ * @return Error code
+ */
+ virtual TInt ChangeTopicHotmarkStatus( TCbsTopicNumber aNumber,
+ TBool aNewStatus ) = 0;
+
+ /**
+ * Requests the server to notify the client whenever an event occurs
+ * that changes the information of the topics.
+ *
+ * Note that the client may select what kind of events it is
+ * interested in. Note also that there can be at most one pending
+ * request per instance of the class.
+ *
+ * @param aStatus The variable that the server will modify
+ * whenever an event occurs.
+ * @param aRequested Events the client is interested in
+ * @param aEvent Indicates the variable that will contain the
+ * type of event that occured.
+ * @param aNumber Indicates the variable that will contain the
+ * topic number that was changed in event.
+ */
+ virtual void NotifyOnTopicListEvent(
+ TRequestStatus& aStatus,
+ const TInt aRequested,
+ TCbsTopicListEvent& aEvent,
+ TCbsTopicNumber& aNumber ) = 0;
+
+ /**
+ * Cancels the pending notify request.
+ */
+ virtual void NotifyOnTopicListEventCancel() = 0;
+
+ /**
+ * Returns the number of topics added since last GetNewTopicsCount()
+ * by the topic detection feature.
+ *
+ * @param aCount It will contain the amount of new topics.
+ * @return TInt Result code.
+ */
+ virtual TInt GetNewTopicsCount( TInt& aCount ) = 0;
+
+ /**
+ * Returns the number of the topic which was last added
+ * to topic list.
+ *
+ * Note: if a topic list cache is maintained by the client
+ * (as CBS UI application does), this function has to
+ * be called BEFORE calling GetTopicCount() and GetTopic()
+ * to make sure that no topic is added in between
+ * GetTopic() and GetLatestTopicHandle() calls. If this
+ * happens, GetLatestTopicHandle() will return a handle
+ * to a topic that is not cached client-side.
+ *
+ * Return codes:
+ * KErrNone aNumber is a valid topic number.
+ * KErrNotFound No topic added since server start,
+ * aNumber is not valid.
+ *
+ * @param aNumber Returns: number of the topic last added
+ * @return Result code
+ */
+ virtual TInt GetLatestTopicNumber( TCbsTopicNumber& aNumber ) = 0;
+
+ /**
+ * Returns the total amount of unread messages.
+ *
+ * @param aCount Return: number of unread messages
+ */
+ virtual void GetUnreadMessageCount( TInt& aCount ) = 0;
+
+ /**
+ * Returns the handle to the latest hotmarked message that has been
+ * received after the system has started up.
+ *
+ * @param aMessage Handle to the message
+ */
+ virtual void GetHotmarkedMessageHandle( TCbsMessageHandle& aMessage ) = 0;
+
+ /**
+ * Returns the number of unread messages in hotmarked topics.
+ *
+ * This function is to used by the client when deciding whether
+ * the message or topic list view should be opened to display
+ * a hotmarked message(s).
+ *
+ * @return Number of unread hotmarked messages
+ */
+ virtual TInt NumberOfUnreadHotmarkedMessages() = 0;
+
+ /**
+ * Returns the numbers of topics that precede and succeed the given
+ * topic in server-side topic list.
+ *
+ * If the given topic is the first topic in list, aPosition has
+ * ECbsHead bit up. If the given topic is the last topic in list,
+ * aPosition has ECbsTail bit up.
+ *
+ * Return code values:
+ * KErrNone aPrevTopicNumber, aNextTopicNumber and aPosition
+ * contain valid values.
+ * KErrNotFound aCurrentTopicNumber specified a topic that was not
+ * on topic list.
+ *
+ * @param aCurrentTopicNumber Number that specifies the topic
+ * whose surroundings are returned
+ * @param aPrevTopicNumber Returns: number of topic preceding
+ * the given topic
+ * @param aNextTopicNumber Returns: number of topic succeeding
+ * the given topic
+ * @param aPosition Returns: position of current
+ * topic in list.
+ * @return Result code
+ */
+ virtual TInt GetNextAndPrevTopicNumber(
+ const TCbsTopicNumber& aCurrentTopicNumber,
+ TCbsTopicNumber& aPrevTopicNumber,
+ TCbsTopicNumber& aNextTopicNumber,
+ TInt& aPosition ) = 0;
+
+ // === Topic Messages-related methods
+
+ /**
+ * Returns the total amount of messages the topic contains.
+ *
+ * Return codes:
+ * KErrNotFound Invalid handle.
+ * KErrNone aCount contains the number of messages
+ * in topic
+ *
+ * @param aNumber Number of the topic.
+ * @param aCount Number of messages in given topic.
+ * @return Result code
+ */
+ virtual TInt GetMessageCount( TCbsTopicNumber aNumber,
+ TInt& aCount ) = 0;
+
+ /**
+ * Returns message information.
+ *
+ * Return codes:
+ * KErrNotFound Topic or message not found.
+ * KErrNone aMessage contains the message information.
+ *
+ * @param aNumber Number of the topic
+ * @param aIndex Index to the message in topic.
+ * @param aMessage Returns: the message information
+ * @return Error code
+ */
+ virtual TInt GetMessage( TCbsTopicNumber aNumber, TInt aIndex,
+ TCbsMessage& aMessage ) = 0;
+
+ /**
+ * Finds a message by given handle.
+ *
+ * @param aHandle Handle to the message.
+ * @param aMessage Return: contains the message information.
+ * @return Error code.
+ */
+ virtual TInt FindMessageByHandle(
+ const TCbsMessageHandle& aHandle,
+ TCbsMessage& aMessage ) = 0;
+
+ /**
+ * Returns the index of a message with given handle in topic.
+ *
+ * Result code KErrNotFound indicates that no message was found with
+ * the given handle.
+ *
+ * @param aHandle Handle of the message
+ * @param aIndex Return: index of the message in message topic
+ * @return Result code
+ */
+ virtual TInt GetMessageIndexByHandle(
+ const TCbsMessageHandle& aHandle, TInt& aIndex ) = 0;
+
+ /**
+ * Deletes an existing message.
+ *
+ * Note that it does not care a lot about the status of the message.
+ *
+ * Please check also the description of LockMessage().
+ *
+ * @param aHandle It is handle to the message.
+ * @return Error code.
+ */
+ virtual TInt DeleteMessage( const TCbsMessageHandle& aHandle ) = 0;
+
+ /**
+ * Saves a message (the saved message won't be deleted to make
+ * room for new messages).
+ *
+ * Return codes:
+ * KErrNone Message is saved.
+ * KErrGeneral Message not saved -- total maximum of saved
+ * messages reached.
+ * KErrNotFound Message not saved -- no message associated
+ * with the given handle.
+ * KErrDiskFull Message not saved -- FFS out of space.
+ *
+ * @param aHandle Handle to the message to be saved.
+ * @return Return code.
+ */
+ virtual TInt SaveMessage( const TCbsMessageHandle& aHandle ) = 0;
+
+ /**
+ * Locks the message.
+ *
+ * Note that a single topic messages subsession can have at most one locked
+ * message.
+ *
+ * Message can be unlocked by trying to lock a null message. Locked message
+ * will also be automatically unlocked when subsession is closed. If a message
+ * is locked, then it will not be deleted from the database. Thus, deleting a
+ * message or trying to delete a topic that contains such a message will fail.
+ *
+ * Locking a message does not prevent to save the message nor read the message.
+ *
+ * @param aHandle It is handle to the message to be locked.
+ * @return Error code.
+ */
+ virtual TInt LockMessage( const TCbsMessageHandle& aHandle ) = 0;
+
+ /**
+ * Sets the message as read.
+ *
+ * @param aHandle It is handle to the message to be set read.
+ */
+ virtual TInt ReadMessage( const TCbsMessageHandle& aHandle ) = 0;
+
+ /**
+ * Returns the message contents.
+ *
+ * @param aHandle It is handle to the message.
+ * @param aBuffer It will contain the contents (as much as it fits).
+ * @return Error code.
+ */
+ virtual TInt GetMessageContents(
+ const TCbsMessageHandle& aHandle,
+ TDes& aBuffer ) = 0;
+
+ /**
+ * Returns the handles of messages that precede and succeed the
+ * given message in server-side list of topic messages.
+ *
+ * Topic is resolved from the given message handle
+ *
+ * If the given handle specifies the first message in topic,
+ * aPosition has ECbsHead bit up. If the given handle specifies
+ * the last message in topic, aPosition has ECbsTail bit up.
+ *
+ * Return code values:
+ * KErrNone aPrevMsgHandle, aNextMsgHandle and aPosition
+ * contain valid values.
+ * KErrNotFound aCurrentMsgHandle specified a message that was not
+ * found.
+ *
+ * @param aCurrentMsgHandle Handle that specifies the message
+ * whose surroundings are returned
+ * @param aPrevMsgHandle Returns: handle of message
+ * preceding the given message
+ * @param aNextMsgHandle Returns: handle of message
+ * succeeding the given topic
+ * @param aPosition Returns: position of current topic
+ * in list
+ * @return Result code
+ */
+ virtual TInt GetNextAndPrevMessageHandle(
+ const TCbsMessageHandle& aCurrentMsgHandle,
+ TCbsMessageHandle& aPrevMsgHandle,
+ TCbsMessageHandle& aNextMsgHandle,
+ TInt& aPosition ) = 0;
+
+ // Other methods
+
+ /**
+ * Returns ETrue if CbsServer session has been established.
+ *
+ * @return ETrue, if session open.
+ */
+ virtual TBool Connected() const = 0;
+
+ /**
+ * Forces the server to shut down.
+ *
+ * NOTE: Shutdown not fully implemented in CbsServer yet.
+ */
+ virtual void Shutdown() const = 0;
+
+ };
+
+#endif // MCBS_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/mcbsuisettingsobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Observes settings monitor.
+*
+*/
+
+
+#ifndef CBSUISETTINGSOBSERVER_H
+#define CBSUISETTINGSOBSERVER_H
+
+
+
+// CLASS DECLARATION
+
+
+/**
+* Observes settings monitor.
+*
+*/
+class MCbsUiSettingsObserver
+ {
+ public:
+
+ /**
+ * Settings monitor calls this function when settings has been
+ * changed.
+ *
+ * @param aEvent What kind of event caused the settings change
+ */
+ virtual void SettingsChangedL( TCbsSettingsEvent aEvent ) = 0;
+
+ };
+
+#endif // CBSUISETTINGSOBSERVER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/mcbsuitopicmonitorobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Observes topic monitor.
+*
+*/
+
+
+#ifndef CBS_UI_TOPIC_MONITOR_OBSERVER_H
+#define CBS_UI_TOPIC_MONITOR_OBSERVER_H
+
+// INCLUDES
+#include <CbsCommon.h>
+
+
+
+// CLASS DECLARATION
+
+/**
+* Observes topic monitor.
+*
+*/
+class MCbsUiTopicMonitorObserver
+ {
+ public:
+
+ /**
+ * Topic list or topic messages are changed.
+ *
+ * @param aEvent reason for event
+ * @param aTopicNumber Topic number, which caused the event
+ */
+ virtual void TopicListChangedL(
+ TCbsTopicListEvent aEvent, TCbsTopicNumber aTopicNumber ) = 0;
+
+ };
+
+#endif // CBS_UI_TOPIC_MONITOR_OBSERVER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/msavemessagecontroller.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,57 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Declares functions needed to save message.
+*
+*/
+
+
+#ifndef MSAVEMESSAGECONTROLLER_H
+#define MSAVEMESSAGECONTROLLER_H
+
+// INCLUDES
+#include <CbsCommon.h>
+
+
+
+// CLASS DECLARATION
+
+/**
+* Helper class for saving message.
+*/
+class MSaveMessageController
+ {
+ public: // New functions
+
+ /**
+ * Saves a message (the saved message won't be deleted to make
+ * room for new messages).
+ *
+ * Return codes:
+ * KErrNone Message is saved.
+ * KErrGeneral Message not saved -- total maximum of saved
+ * messages reached.
+ * KErrNotFound Message not saved -- no message associated
+ * with the given handle.
+ * KErrDiskFull Message not saved -- FFS out of space.
+ *
+ * @param aHandle Handle to the message to be saved.
+ * @return Return code.
+ */
+ virtual TInt SaveMessage( const TCbsMessageHandle& aHandle ) = 0;
+ };
+
+#endif // MSAVEMESSAGECONTROLLER_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/inc/rcbsui.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,137 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+#ifndef RCBSUI_H
+#define RCBSUI_H
+
+// INCLUDE FILES
+#include <e32base.h>
+#include <CbsCommon.h>
+#include <RCbs.h>
+
+#include "mcbs.h"
+
+
+// CLASS DECLARATION
+
+/**
+* Delecates calls to RCbs.
+*/
+class RCbsUi : public MCbs
+ {
+ public: // Constructor and destructor
+
+ /**
+ * Constructor.
+ */
+ RCbsUi();
+
+ /**
+ * Destructor.
+ */
+ ~RCbsUi();
+
+ public: // From MCbs
+
+ TInt Connect();
+ void Close();
+ TVersion Version() const;
+
+ // === Settings-related methods
+ void GetReceptionStatus( TBool& aStatus );
+ TInt SetReceptionStatus( TBool aStatus );
+ void GetTopicDetectionStatus( TBool& aStatus );
+ TInt SetTopicDetectionStatus( TBool aStatus );
+ void GetLanguages( TCbsSettingsLanguages& aLanguages );
+ TInt SetLanguages( const TCbsSettingsLanguages& aLanguages );
+ void NotifySettingsChanged( TRequestStatus& aStatus, TCbsSettingsEvent& aEvent );
+ void NotifySettingsChangedCancel();
+
+ // === Topic Collection-related methods
+ void StartCollectionBrowsing();
+ TBool HasNextCollectionTopic();
+ TInt NextCollectionTopic( TCbsTopicInfo& aInfo );
+
+ // === Topic list-related methods
+ void GetTopicCount( TInt& aCount );
+ TInt GetTopic( const TInt aIndex, TCbsTopic& aTopic );
+ TInt FindTopicByNumber( TCbsTopicNumber aNumber, TCbsTopic& aTopic );
+ TInt DeleteTopic( TCbsTopicNumber aNumber );
+ TInt DeleteAllTopics();
+ TInt AddTopic( TCbsTopic& aTopic );
+ TInt ChangeTopicNameAndNumber(
+ TCbsTopicNumber aOldNumber,
+ TCbsTopicNumber aNewNumber,
+ const TCbsTopicName& aName );
+ TInt ChangeTopicSubscriptionStatus(
+ TCbsTopicNumber aNumber, TBool aNewStatus );
+ TInt ChangeTopicHotmarkStatus( TCbsTopicNumber aNumber,
+ TBool aNewStatus );
+ void NotifyOnTopicListEvent(
+ TRequestStatus& aStatus,
+ const TInt aRequested,
+ TCbsTopicListEvent& aEvent,
+ TCbsTopicNumber& aNumber );
+ void NotifyOnTopicListEventCancel();
+ TInt GetNewTopicsCount( TInt& aCount );
+ TInt GetLatestTopicNumber( TCbsTopicNumber& aNumber );
+ void GetUnreadMessageCount( TInt& aCount );
+ void GetHotmarkedMessageHandle( TCbsMessageHandle& aMessage );
+ TInt NumberOfUnreadHotmarkedMessages();
+ TInt GetNextAndPrevTopicNumber(
+ const TCbsTopicNumber& aCurrentTopicNumber,
+ TCbsTopicNumber& aPrevTopicNumber,
+ TCbsTopicNumber& aNextTopicNumber,
+ TInt& aPosition );
+
+ // === Topic Messages-related methods
+ TInt GetMessageCount( TCbsTopicNumber aNumber, TInt& aCount );
+ TInt GetMessage( TCbsTopicNumber aNumber, TInt aIndex,
+ TCbsMessage& aMessage );
+ TInt FindMessageByHandle(
+ const TCbsMessageHandle& aHandle,
+ TCbsMessage& aMessage );
+ TInt GetMessageIndexByHandle(
+ const TCbsMessageHandle& aHandle, TInt& aIndex );
+ TInt DeleteMessage( const TCbsMessageHandle& aHandle );
+ TInt SaveMessage( const TCbsMessageHandle& aHandle );
+ TInt LockMessage( const TCbsMessageHandle& aHandle );
+ TInt ReadMessage( const TCbsMessageHandle& aHandle );
+ TInt GetMessageContents(
+ const TCbsMessageHandle& aHandle,
+ TDes& aBuffer );
+ TInt GetNextAndPrevMessageHandle(
+ const TCbsMessageHandle& aCurrentMsgHandle,
+ TCbsMessageHandle& aPrevMsgHandle,
+ TCbsMessageHandle& aNextMsgHandle,
+ TInt& aPosition );
+
+ // Other methods
+ TBool Connected() const;
+ void Shutdown() const;
+
+ private: // Data
+
+ // Real cbs client
+ RCbs iServer;
+
+ };
+
+#endif // RCBSUI_H
+
+// End of file
--- a/cbs/cbsui/loc/cbsuiapp.loc Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,343 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This file contains the localised strings for CBS.
-*
-*
-*/
-
-
-// LOCALISATION STRINGS
-
-// d: Text in Delete topic confirmation query
-// l: popup_note_window
-#define qtn_cb_query_delete_topic "Do you want to delete topic?"
-
-// d: Text in Delete topics confirmation query
-// l: popup_note_window
-#define qtn_cb_query_delete_all_topic "Do you want to delete all topics?"
-
-// d: Mememory full error note
-// d: is shown to the user when the amount of the kept messages exceeds the reserved amount
-// l: popup_note_window
-#define qtn_cb_note_mem_full_del_msg "Reserved space is full. Delete messages before keeping more!"
-
-// d: Title pane text, in topic list view
-// l: title_pane_t2/opt12
-#define qtn_cb_title_cbs "CBS"
-
-// d: Caption string for AIF file (short)
-// l: cell_app_pane_t1
-//
-#define qtn_cb_title_grid "CBS"
-
-// d: Title pane text, in add topic from index view
-// l: title_pane_t2/opt12
-#define qtn_cb_title_addtopics "Add Topics"
-
-// d: Navi pane text, in add topic from index view
-// l: navi_text_pane_t1
-#define qtn_cb_ad_sel_top "Select topics (help hints)"
-
-// d: Navi Pane text, used in topic list view
-// l: navi_text_pane_t1
-#define qtn_cb_tl_one_new_message "One new message"
-
-// d: Navi Pane text, used in topic list view
-// l: navi_text_pane_t1
-#define qtn_cb_tl_no_new_messages "No new messages"
-
-// d: Navi Pane text, used in topic list view
-// d: There are %N - new messages
-// l: navi_text_pane_t1
-#define qtn_cb_tl_new_messages "%N new messages"
-
-// d: Command in options menu in CBS.
-// d: Opens currently selected item.
-// l: list_single_pane_t1_cp2
-#define qtn_cb_cmd_open "Open"
-
-// d: Command in options menu in CBS. Topic list view
-// d: Subscribes selected topic
-// l: list_single_pane_t1_cp2
-#define qtn_cb_cmd_subscribe "Subscribe"
-
-// d: Command in options menu in CBS. Topic list view
-// d: UnSubscribes selected topic
-// l: list_single_pane_t1_cp2
-#define qtn_cb_cmd_unsubscribe "UnSubscribe"
-
-// d: Command in options menu in CBS. Topic list view
-// d: Hotmarks selected topic
-// l: list_single_pane_t1_cp2
-#define qtn_cb_cmd_hotmark "Hotmark"
-
-// d: Command in options menu in CBS. Topic list view
-// d: UnHotmarks selected topic
-// l: list_single_pane_t1_cp2
-#define qtn_cb_cmd_unhotmark "Unhotmark"
-
-// d: Command in options menu in CBS. TopicListView
-// d: Opens settings view
-// l: list_single_pane_t1_cp2
-#define qtn_cb_cmd_settings "Settings"
-
-// d: Command in options list in CBS view msg. topic view
-// d: Saves message.
-// l: list_single_pane_t1_cp2
-#define qtn_cb_cmd_keep_topic "Keep"
-
-// d: Command in options list in CBS view msg. topic view
-// d: Deletes message.
-// l: list_single_pane_t1_cp2
-#define qtn_cb_cmd_del_msg "Delete"
-
-// d: Command in options list in CBS message view.
-// d: show find item sub menu
-// l: list_single_pane_t1_cp2
-//#define qtn_find_item "Find Item"
-
-// d: Command in options list in CBS message view.
-// d: Copies the message to clipboard.
-// l: list_single_pane_t1_cp2
-#define qtn_cb_cmd_copy_clip "Copy to clipboard"
-
-// d: Command in options list in CBS.
-// d: Closes cbs application.
-// l: list_single_pane_t1_cp2
-#define qtn_cb_cmd_exit "Exit"
-
-// d: Command in options menu in CBS. Topic list view
-// d: Opens "topic" submenu
-// l: list_single_pane_t1_cp2/opt3
-#define qtn_cb_cmd_topic "Topic"
-
-// d: Command in qtn_cb_cmd_topic sub menu in CBS. Topic List view
-// d: Opens dialog for manual topic adding
-// l: list_single_popup_submenu_pane_t1
-#define qtn_cb_topic_add_man "Add manually"
-
-// d: Command in qtn_cb_cmd_topic sub menu in CBS. Topic List view
-// d: Opens dialog for adding topic from index.
-// l: list_single_popup_submenu_pane_t1
-#define qtn_cb_topic_add_f_index "Add from index"
-
-// d: Command in qtn_cb_cmd_topic sub menu in CBS. Topic List view
-// d: Opens dialog for editing topic.
-// l: list_single_popup_submenu_pane_t1
-#define qtn_cb_topic_edit "Edit"
-
-// d: Command in qtn_cb_cmd_topic sub menu in CBS. Topic List view
-// d: Deletes selected topic.
-// l: list_single_popup_submenu_pane_t1
-#define qtn_cb_topic_delete "Delete"
-
-// d: Command in qtn_cb_cmd_topic sub menu in CBS. Topic List view
-// d: Deletes all topics.
-// l: list_single_popup_submenu_pane_t1
-#define qtn_cb_topic_delete_all "Delete all"
-
-// d: Command in options menu in CBS. topic view
-// d: Opens currently selected Message.
-// l: list_single_pane_t1_cp2
-#define qtn_cb_cmd_msg_open "Open"
-
-// d: Defines whether cell broadcasts are received or not.
-// d: This is shown in the Settings view.
-// l: list_setting_pane_t1
-#define qtn_mce_settings_cb_reception "Reception"
-
-// d: Defines language(s) of received messages.
-// d: This is shown in the Settings view.
-// l: list_setting_pane_t1
-#define qtn_mce_settings_cb_language "Language"
-
-// d: Defines if all messages are received (Off) or only wanted ones (On).
-// d: This is shown in the Settings view.
-// l: list_setting_pane_t1
-#define qtn_mce_settings_cb_topic "Topic detection"
-
-// d: Value of reception.
-// d: This is shown in the Settings view.
-// l: list_set_graphic_pane_t1
-#define qtn_mce_settings_cb_re_on "On"
-
-// d: Value of reception.
-// d: This is shown in the Settings view.
-// l: list_set_graphic_pane_t1
-#define qtn_mce_settings_cb_re_off "Off"
-
-// d: Value of topic detection.
-// d: This is shown in the Settings view.
-// l: list_set_graphic_pane_t1
-#define qtn_mce_settings_cb_topic_detection_on "On"
-
-// d: Value of topic detection.
-// d: This is shown in the Settings view.
-// l: list_set_graphic_pane_t1
-#define qtn_mce_settings_cb_topic_detection_off "Off"
-
-// d: One new topic added confirmation note
-// l: popup_note_window
-#define qtn_cb_note_new_to_added "New topic added!"
-
-// d: N new topic added confirmation note
-// l: popup_note_window
-#define qtn_cb_note_new_tos_added "%N New topics added!"
-
-// d: Name field in the edit topic query
-// l: popup_query_data_code_window/opt2
-#define qtn_cb_litext_name "Name"
-
-// d: Number field in the edit topic query
-// l: popup_query_data_code_window/opt2
-#define qtn_cb_litext_number "Number"
-
-// d: An error note text, which is shown if the user adds
-// d: an already existing number.
-// l: popup_note_window
-#define qtn_cb_note_change_number "The topic number is already in use. Enter another number"
-
-// d: Information note to the user when he has copied the CBS message to
-// d: clipboard.
-// l: popup_note_window
-#define qtn_cb_note_msg_to_clip "Message copied to clipboard!"
-
-// d: Used in message viewer, while reading the message. Text example: "Message 2/3"
-// l: navi_text_pane_t1
-#define qtn_cb_msg_message "Message %0N/%1N"
-
-// d: If the SIM card max number topics are subscribed, then this error text will be shown
-// l: popup_note_window
-#define qtn_cb_note_can_not_subs "Can not subscribe more topics!"
-
-// d: In message view if the user selects delete from the options menu or the
-// d: context sensitive menu, this confirmation note will be shown.
-// l: popup_note_window
-#define qtn_cb_note_delete_msg "Delete message?"
-
-// language settings
-
-// d: Language setting for all the languages.
-// l: list_set_graphic_pane_t1
-#define qtn_mce_settings_cb_all "All"
-
-// d: Language setting for selected languages.
-// l: list_set_graphic_pane_t1
-#define qtn_mce_settings_cb_selected "Selected"
-
-// d: Language setting for other languages.
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_other "Other"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_german "German"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_english "English"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_italian "Italian"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_french "French"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_spanish "Spanish"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_dutch "Dutch"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_swedish "Swedish"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_danish "Danish"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_portuguese "Portuguese"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_finnish "Finnish"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_norwegian "Norwegian"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_greek "Greek"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_turkish "Turkish"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_hungarian "Hungarian"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_polish "Polish"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_czech "Czech"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_hebrew "Hebrew"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_arabic "Arabic"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_russian "Russian"
-
-// d: Language value
-// l: list_single_graphic_heading_pane_t1
-#define qtn_mce_settings_cb_icelandic "Icelandic"
-
-// d: This note will show up when user has saved the message
-// l: popup_note_window
-#define qtn_logs_info_msg_kept "Message is kept"
-
-// d: Used in settings menu to change value.
-// l: list_single_pane_t1_cp2
-#define qtn_mce_settings_change "Change"
-
-// d: Used in settings menu to exit the application.
-// l: list_single_pane_t1_cp2
-#define qtn_mce_settings_exit "Exit"
-
-// d: Used in language selection list.
-// d: Notice that this is a heading pane in the main pane
-// d: and not in the pop up window. This has been agreed to be the id.
-// l: heading_pane_t1
-#define qtn_mce_settings_cb_quest_langu "Select languages:"
-
-
-// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/resources/cbs_app.qrc Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,16 @@
+<RCC>
+ <qresource prefix="/xml" >
+ <file alias="cbs_app.docml">cbs_app.docml</file>
+ <file alias="cbs_topic_view.docml">cbs_topic_view.docml</file>
+ </qresource>
+ <qresource prefix="/icons" >
+ <file>icons/hotmark2.png</file>
+ <file>icons/save.png</file>
+ <file>icons/sub2.png</file>
+ <file>icons/empty.png</file>
+ <file>icons/qgn_menu_cb.svg</file>
+ </qresource>
+ <qresource prefix="/translations" >
+ <file alias="cbsui_en">cbsui_en.qm</file>
+ </qresource>
+</RCC>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/resources/cbsui_en.qm Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,1 @@
+<¸dÊÍ!¿`¡½ÝB²å
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/resources/cbsui_en.ts Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="3.0" language="en_GB" sourcelanguage="en_GB">
+<context>
+<message numerus="no" id="txt_cbs_unhotmark">
+ <comment></comment>
+ <source>Unhotmark</source>
+ <translation variants="no">Unhotmark</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_topics">
+ <comment></comment>
+ <source>Topics</source>
+ <translation variants="no">Topics</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_not_available">
+ <comment></comment>
+ <source>Not available</source>
+ <translation variants="no">Not available</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_topic_number">
+ <comment></comment>
+ <source>Topic number:</source>
+ <translation variants="no">Topic number:</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_edit">
+ <comment></comment>
+ <source>Edit</source>
+ <translation variants="no">Edit</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_delete">
+ <comment></comment>
+ <source>Delete</source>
+ <translation variants="no">Delete</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_hotmark">
+ <comment></comment>
+ <source>Hotmark</source>
+ <translation variants="no">Hotmark</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_unsubscribe">
+ <comment></comment>
+ <source>Unsubscribe</source>
+ <translation variants="no">Unsubscribe</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_help">
+ <comment></comment>
+ <source>Help</source>
+ <translation variants="no">Help</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_000_topic_index">
+ <comment></comment>
+ <source>000 Topic Index</source>
+ <translation variants="no">000 Topic Index</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_settings">
+ <comment></comment>
+ <source>Settings</source>
+ <translation variants="no">Settings</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_deactivate">
+ <comment></comment>
+ <source>Deactivate reception</source>
+ <translation variants="no">Deactivate reception</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_subscribe">
+ <comment></comment>
+ <source>Subscribe</source>
+ <translation variants="no">Subscribe</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_add_topic">
+ <comment></comment>
+ <source>Add topic</source>
+ <translation variants="no">Add topic</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_topic_name">
+ <comment></comment>
+ <source>Topic name:</source>
+ <translation variants="no">Topic name:</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_exit">
+ <comment></comment>
+ <source>Exit</source>
+ <translation variants="no">Exit</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_no_messages">
+ <comment></comment>
+ <source>No messages</source>
+ <translation variants="no">No messages</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_activate">
+ <comment></comment>
+ <source>Activate reception</source>
+ <translation variants="no">Activate reception</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_open">
+ <comment></comment>
+ <source>Open</source>
+ <translation variants="no">Open</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_delete_topic">
+ <comment></comment>
+ <source>Delete topic</source>
+ <translation variants="no">Delete topic</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_cbs_title">
+ <comment></comment>
+ <source>Cell broadcast</source>
+ <translation variants="no">Cell broadcast</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+</context>
+</TS>
Binary file cbs/cbsui/resources/cbsui_text_map.xls has changed
Binary file cbs/cbsui/resources/icons/empty.png has changed
Binary file cbs/cbsui/resources/icons/hotmark2.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/resources/icons/qgn_menu_cb.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg width="100%" height="100%" viewBox="0 0 88 88">
+<linearGradient id="_16" gradientUnits="userSpaceOnUse" x1="42.15" y1="46" x2="58.62" y2="78.43">
+<stop stop-color="#A2C2DD" offset="0.1"/>
+<stop stop-color="#6C83BB" offset="0.71"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<path fill="url(#_16)" d="M31.763,14.056l0.14,7.126l-2.095,0.698l0.985,5.623l-3.374,47.313 c8.046,12.167,27.262,9.969,33.093-0.528l-4.698-47.42l1.033-5.787l-1.953-0.406l0.102-7.213L42.929,4.587L31.763,14.056z"/>
+<linearGradient id="_17" gradientUnits="userSpaceOnUse" x1="24.41" y1="54.57" x2="68.41" y2="54.57">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<path fill="url(#_17)" d="M31.497,27.468l-3.362,47.148c6.784,10.051,24.6,10.625,31.658-0.483l-4.735-47.301 L31.497,27.468z"/>
+<linearGradient id="_18" gradientUnits="userSpaceOnUse" x1="28.41" y1="42.61" x2="76.66" y2="42.61">
+<stop stop-color="#E6EEF4" offset="0"/>
+<stop stop-color="#575AC6" offset="0.44"/>
+<stop stop-color="#003D6D" offset="0.94"/>
+</linearGradient>
+<path fill="url(#_18)" d="M56.81,44.608l-0.962-9.832c-5.548,7.959-20.328,6.802-24.896,0.4l-0.707,9.79 C38.02,52.629,50.138,52.005,56.81,44.608z"/>
+<linearGradient id="_19" gradientUnits="userSpaceOnUse" x1="28.41" y1="62.89" x2="76.66" y2="62.89">
+<stop stop-color="#E6EEF4" offset="0"/>
+<stop stop-color="#575AC6" offset="0.44"/>
+<stop stop-color="#003D6D" offset="0.94"/>
+</linearGradient>
+<path fill="url(#_19)" d="M58.782,64.331l-0.913-9.328c-10.027,10.121-24.347,5.465-28.28-0.294l-0.725,9.64 C39.175,75.736,53.395,70.499,58.782,64.331z"/>
+<linearGradient id="_20" gradientUnits="userSpaceOnUse" x1="7.69" y1="18.09" x2="58.02" y2="60.59">
+<stop stop-color="#A2C2DD" offset="0.1"/>
+<stop stop-color="#6C83BB" offset="0.71"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<path fill-opacity="0.2" fill="url(#_20)" d="M46.749,29.609l2.183,40.648c0,0,1.005,8.438-3.289,11.941 c5.612-0.146,11.949-3.967,14.15-8.066l-4.884-48.222L46.749,29.609z"/>
+<polygon fill="#FFFFFF" points="35.842,32.35 39.324,33.851 39.283,38.504 35.882,36.843 "/>
+<polygon fill="#FFFFFF" points="35.207,51.374 38.607,52.987 38.526,57.994 35.125,56.219 "/>
+<polygon fill="#FFFFFF" points="38.123,78.503 38.283,73.336 34.723,71.722 34.641,76.485 "/>
+<linearGradient id="_21" gradientUnits="userSpaceOnUse" x1="41.84" y1="23.51" x2="55.61" y2="18.86">
+<stop stop-color="#FFFFFF" offset="0.15"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_21)" points="56.038,21.628 41.723,18.646 30.602,22.354 44.895,27.441 "/>
+<linearGradient id="_22" gradientUnits="userSpaceOnUse" x1="58.2" y1="10.84" x2="42.42" y2="25.98">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_22)" points="44.563,17.068 54.29,13.813 54.182,21.547 44.463,26.324 "/>
+<linearGradient id="_23" gradientUnits="userSpaceOnUse" x1="39.28" y1="38.89" x2="38.53" y2="15.89">
+<stop stop-color="#FFFFFF" offset="0.15"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_23)" points="32.469,14.375 44.668,16.911 44.463,26.324 32.622,22.192 "/>
+<linearGradient id="_24" gradientUnits="userSpaceOnUse" x1="35.43" y1="4.26" x2="42.18" y2="21">
+<stop stop-color="#FFFFFF" offset="0.15"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_24)" points="32.469,14.375 44.672,17.708 42.96,5.479 "/>
+<linearGradient id="_25" gradientUnits="userSpaceOnUse" x1="50.6" y1="2.79" x2="44.4" y2="24.33">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_25)" points="44.672,17.708 42.96,5.479 54.29,13.813 "/>
+<linearGradient id="_26" gradientUnits="userSpaceOnUse" x1="18.12" y1="30.75" x2="44.93" y2="26.25">
+<stop stop-color="#FFFFFF" offset="0.15"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_26)" points="44.895,27.441 44.895,32.552 31.497,27.468 30.602,22.354 "/>
+<linearGradient id="_27" gradientUnits="userSpaceOnUse" x1="50.89" y1="16.44" x2="49.64" y2="38.69">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_27)" points="44.832,27.441 44.832,32.552 55.107,26.841 56.038,21.628 "/>
+<polygon fill="#FFFFFF" points="33.92,22.619 33.987,15.952 43.203,18.442 43.108,25.821 "/>
+<polygon fill="#FFFFFF" points="46.03,25.549 46.012,18.651 53.245,15.823 53.07,22.07 "/>
+<polygon fill="#A2C2DD" points="33.948,22.656 33.987,15.952 35.123,16.296 35.084,23.035 "/>
+<polygon fill="#A2C2DD" points="46.012,18.651 46.074,25.519 47.272,24.943 47.214,18.189 "/>
+<linearGradient id="_28" gradientUnits="userSpaceOnUse" x1="31.51" y1="23.39" x2="45.1" y2="37.71">
+<stop stop-color="#A2C2DD" offset="0.1"/>
+<stop stop-color="#6C83BB" offset="0.71"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<polygon fill="url(#_28)" points="31.497,27.468 44.832,32.552 44.821,33.78 31.455,28.208 "/>
+<polygon fill="#003D6D" points="55.107,26.841 44.832,32.552 44.821,33.741 55.156,27.725 "/>
+<g fill-opacity="0.5" stroke-opacity="0.5">
+<linearGradient id="_29" gradientUnits="userSpaceOnUse" x1="6.38" y1="23.02" x2="32.62" y2="23.02">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#C0C6E8" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_29)" points="5.822,5.384 6.071,40.66 43.108,25.821 43.203,18.442 "/>
+<linearGradient id="_30" gradientUnits="userSpaceOnUse" x1="85.82" y1="22.82" x2="57.05" y2="22.82">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#C0C6E8" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_30)" points="46.012,18.651 86.274,2.451 86.643,43.188 46.074,25.519 "/>
+</g>
+<rect fill="none" height="88" width="88"/>
+</svg>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/resources/icons/qgn_menu_cb_2.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg width="100%" height="100%" viewBox="0 0 88 88">
+<linearGradient id="_14" gradientUnits="userSpaceOnUse" x1="42.15" y1="46" x2="58.61" y2="78.43">
+<stop stop-color="#A2C2DD" offset="0.1"/>
+<stop stop-color="#6C83BB" offset="0.71"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<path fill="url(#_14)" d="M31.763,14.056l0.14,7.126l-2.095,0.698l0.985,5.623l-3.374,47.313 c8.046,12.167,27.262,9.969,33.093-0.528l-4.698-47.42l1.033-5.787l-1.953-0.406l0.102-7.213L42.929,4.587L31.763,14.056z"/>
+<linearGradient id="_15" gradientUnits="userSpaceOnUse" x1="24.41" y1="54.57" x2="68.41" y2="54.57">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<path fill="url(#_15)" d="M31.497,27.468l-3.362,47.148c6.784,10.051,24.6,10.625,31.658-0.483l-4.735-47.301 L31.497,27.468z"/>
+<linearGradient id="_16" gradientUnits="userSpaceOnUse" x1="28.41" y1="42.61" x2="76.66" y2="42.61">
+<stop stop-color="#E6EEF4" offset="0"/>
+<stop stop-color="#575AC6" offset="0.44"/>
+<stop stop-color="#003D6D" offset="0.94"/>
+</linearGradient>
+<path fill="url(#_16)" d="M56.81,44.608l-0.962-9.832c-5.548,7.959-20.328,6.802-24.896,0.4l-0.707,9.79 C38.02,52.629,50.138,52.005,56.81,44.608z"/>
+<linearGradient id="_17" gradientUnits="userSpaceOnUse" x1="28.41" y1="62.89" x2="76.66" y2="62.89">
+<stop stop-color="#E6EEF4" offset="0"/>
+<stop stop-color="#575AC6" offset="0.44"/>
+<stop stop-color="#003D6D" offset="0.94"/>
+</linearGradient>
+<path fill="url(#_17)" d="M58.782,64.331l-0.913-9.328c-10.027,10.121-24.347,5.465-28.28-0.294l-0.725,9.64 C39.175,75.736,53.395,70.499,58.782,64.331z"/>
+<linearGradient id="_18" gradientUnits="userSpaceOnUse" x1="7.69" y1="18.09" x2="58.02" y2="60.59">
+<stop stop-color="#A2C2DD" offset="0.1"/>
+<stop stop-color="#6C83BB" offset="0.71"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<path fill-opacity="0.2" fill="url(#_18)" d="M46.749,29.609l2.183,40.648c0,0,1.005,8.438-3.289,11.941 c5.612-0.146,11.949-3.967,14.15-8.066l-4.884-48.222L46.749,29.609z"/>
+<polygon fill="#235487" points="35.842,32.35 39.324,33.851 39.283,38.504 35.882,36.843 "/>
+<polygon fill="#235487" points="35.207,51.374 38.607,52.987 38.526,57.994 35.125,56.219 "/>
+<polygon fill="#235487" points="38.123,78.503 38.283,73.336 34.723,71.722 34.641,76.485 "/>
+<linearGradient id="_19" gradientUnits="userSpaceOnUse" x1="41.84" y1="23.51" x2="55.61" y2="18.86">
+<stop stop-color="#FFFFFF" offset="0.15"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_19)" points="56.038,21.628 41.723,18.646 30.602,22.354 44.895,27.441 "/>
+<linearGradient id="_20" gradientUnits="userSpaceOnUse" x1="58.2" y1="10.84" x2="42.42" y2="25.98">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_20)" points="44.563,17.068 54.29,13.813 54.182,21.547 44.463,26.324 "/>
+<linearGradient id="_21" gradientUnits="userSpaceOnUse" x1="39.28" y1="38.89" x2="38.53" y2="15.89">
+<stop stop-color="#FFFFFF" offset="0.15"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_21)" points="32.469,14.375 44.668,16.911 44.463,26.324 32.622,22.192 "/>
+<linearGradient id="_22" gradientUnits="userSpaceOnUse" x1="35.43" y1="4.26" x2="42.18" y2="21.01">
+<stop stop-color="#FFFFFF" offset="0.15"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_22)" points="32.469,14.375 44.672,17.708 42.96,5.479 "/>
+<linearGradient id="_23" gradientUnits="userSpaceOnUse" x1="50.6" y1="2.79" x2="44.39" y2="24.33">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_23)" points="44.672,17.708 42.96,5.479 54.29,13.813 "/>
+<linearGradient id="_24" gradientUnits="userSpaceOnUse" x1="18.12" y1="30.75" x2="44.93" y2="26.25">
+<stop stop-color="#FFFFFF" offset="0.15"/>
+<stop stop-color="#A2C2DD" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_24)" points="44.895,27.441 44.895,32.552 31.497,27.468 30.602,22.354 "/>
+<linearGradient id="_25" gradientUnits="userSpaceOnUse" x1="50.89" y1="16.44" x2="49.64" y2="38.69">
+<stop stop-color="#FFFFFF" offset="0"/>
+<stop stop-color="#A2C2DD" offset="0.35"/>
+<stop stop-color="#6C83BB" offset="0.7"/>
+<stop stop-color="#003D6D" offset="1"/>
+</linearGradient>
+<polygon fill="url(#_25)" points="44.832,27.441 44.832,32.552 55.107,26.841 56.038,21.628 "/>
+<polygon fill="#87A8CB" points="33.92,22.619 33.987,15.952 43.203,18.442 43.108,25.821 "/>
+<polygon fill="#496DA2" points="46.03,25.549 46.012,18.651 53.245,15.823 53.07,22.07 "/>
+<polygon fill="#496DA2" points="33.948,22.656 33.987,15.952 35.123,16.296 35.084,23.035 "/>
+<polygon fill="#235487" points="46.012,18.651 46.074,25.519 47.272,24.943 47.214,18.189 "/>
+<linearGradient id="_26" gradientUnits="userSpaceOnUse" x1="31.51" y1="23.39" x2="45.1" y2="37.71">
+<stop stop-color="#A2C2DD" offset="0.1"/>
+<stop stop-color="#6C83BB" offset="0.71"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<polygon fill="url(#_26)" points="31.497,27.468 44.832,32.552 44.821,33.78 31.455,28.208 "/>
+<polygon fill="#003D6D" points="55.107,26.841 44.832,32.552 44.821,33.741 55.156,27.725 "/>
+<rect fill="none" height="88" width="88"/>
+</svg>
\ No newline at end of file
Binary file cbs/cbsui/resources/icons/save.png has changed
Binary file cbs/cbsui/resources/icons/sub2.png has changed
--- a/cbs/cbsui/rom/CbsUiApp.iby Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: IBY file for cbsui application
-*
-*/
-
-#ifndef __CBSUIAPP_IBY__
-#define __CBSUIAPP_IBY__
-
-#ifdef __CELL_BROADCAST
-
-S60_APP_EXE(CbsUiApp)
-SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,CbsUiApp)
-S60_APP_AIF_ICONS(CbsUiApp)
-S60_APP_AIF_RSC(CbsUiApp)
-
-// Enabler for eclipsing ROM binaries
-data=ZSYSTEM\install\cbsuiapp_stub.sis system\install\cbsuiapp_stub.sis
-data=ZPRIVATE\10003a3f\apps\cbsuiapp_reg.rsc private\10003a3f\import\apps\cbsuiapp_reg.rsc
-
-#endif
-
-#endif
--- a/cbs/cbsui/rom/CbsUiResources.iby Tue Feb 02 01:11:09 2010 +0200
+++ b/cbs/cbsui/rom/CbsUiResources.iby Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -11,19 +11,18 @@
*
* Contributors:
*
-* Description: IBY file for cbsui application
+* Description: CBS resources rom build file
*
*/
-#ifndef __CBS_RESOURCES_IBY__
-#define __CBS_RESOURCES_IBY__
-//Resource file(s) for CBSUI application (Cbsui.iby)
+#ifndef __CBSUI_RESOURCES_IBY__
+#define __CBSUI_RESOURCES_IBY__
#ifdef __CELL_BROADCAST
-S60_APP_RESOURCE(CbsUiApp)
+data=DATAZ_\resource\apps\cbsui.rsc S60_APP_RESOURCE(cbsui.rsc)
-#endif //__CELL_BROADCAST
+#endif // __CELL_BROADCAST
-#endif //__CBS_RESOURCES_IBY__
\ No newline at end of file
+#endif // __CBSUI_RESOURCES_IBY__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/rom/cbsui.iby Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: CBS rom build file
+*
+*/
+
+
+#ifndef __CBSUI_IBY__
+#define __CBSUI_IBY__
+
+#ifdef __CELL_BROADCAST
+
+file=ABI_DIR\BUILD_DIR\cbsui.exe SHARED_LIB_DIR\cbsui.exe
+data=ZSYSTEM\install\cbsui_stub.sis system\install\cbsui_stub.sis
+data=ZPRIVATE\10003a3f\import\apps\cbsui_reg.rsc private\10003a3f\import\apps\cbsui_reg.rsc
+
+#endif // __CELL_BROADCAST
+
+#endif // __CBSUI_IBY__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/rom/cbsui_stub.pkg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,31 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: For packing cbs application stub.
+;
+; Languages
+&EN
+
+; Header
+#{"cbsui"}, (0x101F4CD3), 1, 0, 0, TYPE=SA
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+; Files
+""-"z:\sys\bin\cbsui.exe"
+""-"z:\resource\apps\cbsui.rsc"
+""-"z:\private\10003a3f\import\apps\cbsui_reg.rsc"
Binary file cbs/cbsui/rom/cbsui_stub.sis has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/sis/cbsui.pkg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,34 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: For packing cbs application stub.
+;
+; Languages
+&EN
+
+; Header
+#{"cbsui"}, (0x101F4CD3), 10, 1, 0, TYPE=PU
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+;Supports Series 60 v 5.0
+[0x1028315F], 0, 0, 0, {"Series60ProductID"}
+
+; Files
+"\epoc32\RELEASE\armv5\UREL\cbsui.exe"-"c:\sys\bin\cbsui.exe"
+"\epoc32\data\z\resource\apps\cbsui.rsc"-"c:\resource\apps\cbsui.rsc"
+"\epoc32\data\z\private\10003a3f\import\apps\cbsui_reg.rsc"-"c:\private\10003a3f\import\apps\cbsui_reg.rsc"
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/src/cbsuimainwindow.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "rcbsui.h"
+#include "cbsuiviewmanager.h"
+#include "cbslog.h"
+
+#include "cbsuimainwindow.h"
+
+// ======== MEMBER FUNCTIONS ==================================================
+
+// ----------------------------------------------------------------------------
+// CbsUiMainWindow::CbsUiMainWindow
+// ----------------------------------------------------------------------------
+//
+CbsUiMainWindow::CbsUiMainWindow()
+{
+ LOG(NORMAL,"CBSUI: CbsUiMainWindow::CbsUiMainWindow IN");
+ // Create connection to the server. SYMBIAN/S60 CODE
+ mServer = new RCbsUi;
+ if ( mServer ) {
+ // Connect Cbs Server
+ int result = mServer->Connect();
+ LOG2(NORMAL,"CBSUI: CbsUiMainWindow::CbsUiMainWindow \
+ connect server %d", result);
+ // Construct the view manager.
+ mViewManager = new CbsUiViewManager(this, *mServer);
+ }
+ LOG(NORMAL,"CBSUI: CbsUiMainWindow::CbsUiMainWindow OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiMainWindow::~CbsUiMainWindow
+// ----------------------------------------------------------------------------
+//
+CbsUiMainWindow::~CbsUiMainWindow()
+{
+ LOG(NORMAL,"CBSUI: CbsUiMainWindow::~CbsUiMainWindow IN");
+ mServer->Close();
+ delete mServer;
+ LOG(NORMAL,"CBSUI: CbsUiMainWindow::~CbsUiMainWindow OUT");
+}
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/src/cbsuitopiclistview.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,896 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <hbaction.h>
+#include <hbtoolbar.h>
+#include <hbicon.h>
+#include <hblabel.h>
+#include <hblistwidgetitem.h>
+#include <hbabstractviewitem.h>
+#include <hbinputdialog.h>
+#include <hbmessagebox.h>
+#include <hblistwidget.h>
+#include <hbvalidator.h>
+#include <hbmenu.h>
+#include <hbmessagebox.h>
+
+#include "cbsuitopiclistview.h"
+#include "cbsuiviewmanager.h"
+#include "rcbsui.h"
+#include "cbslog.h"
+#include "cbsuiconstants.h"
+#include "ccbsuitopiclistmonitor.h"
+
+// DocML usage
+const char *T_TOPIC_LIST = "t:ListWidget";
+const char *T_TOPICINDEX = "t:topicIndex";
+// other items (for decoration)
+const char *T_LABEL = "t:label";
+
+const char *T_TOGGLE_RECEPTION = "t:toggle_reception";
+const char *T_ADD_TOPIC = "t:add_topic";
+
+// Options menu
+const char *T_EXIT = "t:exit";
+
+const char *T_OPEN = "t:open";
+const char *T_SUBSCRIBE = "t:subscribe";
+const char *T_UNSUBSCRIBE = "t:unsubscribe";
+const char *T_HOTMARK = "t:hotmark";
+const char *T_UNHOTMARK = "t:unhotmark";
+const char *T_DELETE = "t:delete";
+const char *T_EDIT = "t:edit";
+
+// ======== MEMBER FUNCTIONS ==================================================
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::CbsUiTopicListView
+// ----------------------------------------------------------------------------
+CbsUiTopicListView::CbsUiTopicListView()
+ : HbView(),
+ mServer(NULL),
+ mViewManager(NULL),
+ mTopicRow(-1),
+ mTopicIndexWidget(NULL),
+ mTopicsWidget(NULL),
+ mReceptionButton(NULL),
+ mOpenAction(NULL),
+ mSubscibeAction(NULL),
+ mUnSubscibeAction(NULL),
+ mHotmarkAction(NULL),
+ mUnHotmarkAction(NULL),
+ mEditAction(NULL),
+ mDeleteAction(NULL),
+ mMonitor(NULL),
+ mTopicQuery(NULL),
+ mTopicNumberList(NULL)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::CbsUiTopicListView IN");
+ mTopicNumberList = new TCbsUiTopicNumberList(KNumberOfStandardTopics);
+ QT_TRAP_THROWING(mTopicNumberList->AppendL(0));
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::CbsUiTopicListView OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::~CbsUiTopicListView
+// ----------------------------------------------------------------------------
+CbsUiTopicListView::~CbsUiTopicListView()
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::~CbsUiTopicListView IN");
+ delete mTopicNumberList;
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::~CbsUiTopicListView OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::init
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::init(MCbs &server,
+ CbsUiViewManager &viewManager)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::init IN");
+ mViewManager = &viewManager;
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::init 1");
+ mServer = &server;
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::init 2");
+ // First get pointers to UI components
+ createComponents();
+
+ // Update reception status to UI
+ TBool status; //Symbian variable..
+ mServer->GetReceptionStatus(status);
+ if (status) {
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::init reception ON");
+ mReceptionButton->setText(hbTrId("txt_cbs_deactivate"));
+ } else {
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::init reception OFF");
+ mReceptionButton->setText(hbTrId("txt_cbs_activate"));
+ }
+
+ // Update Topic index and Topics
+ reloadTopicIndex();
+ reloadTopics();
+
+ // Symbian code, leave etc to be handled.
+ // QT_TRAP_THROWING( mMonitor = CCbsUiTopicListMonitor::NewL( *mServer ) );
+ // mMonitor->AddObserverL( this );
+ // Longpress in topic list, this is needed always
+ bool ret(false);
+
+ // conntect topic index list widget operation
+ ret = connect(mTopicIndexWidget,
+ SIGNAL(longPressed(HbListWidgetItem *, QPointF)),
+ this, SLOT(showTopicIndexMenu(HbListWidgetItem *, QPointF)));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init connect \
+ TopicIndex long press %d", ret);
+
+ ret = connect(mTopicIndexWidget, SIGNAL(activated(HbListWidgetItem *)),
+ this, SLOT(showTopicSelectionView(HbListWidgetItem *)));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init connect \
+ TopicIndex short press %d", ret);
+
+ // conntect topics list widget operation
+ ret = connect(mTopicsWidget,
+ SIGNAL(longPressed(HbListWidgetItem*, QPointF)),
+ this, SLOT(showTopicsMenu(HbListWidgetItem *, QPointF)));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init connect\
+ Topics long press %d", ret);
+
+ ret = connect(mTopicsWidget, SIGNAL(activated(HbListWidgetItem *)),
+ this, SLOT(showTopicView(HbListWidgetItem *)));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init connect \
+ topics short press %d", ret);
+
+ // connect reception action
+ ret = connect(mReceptionButton, SIGNAL(triggered(bool)),
+ this, SLOT(toggleReception()));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init connect reception %d", ret);
+
+ // Open
+ mOpenAction = qobject_cast<HbAction *>(
+ mViewManager->xmlLoader()->findObject(T_OPEN));
+ ret = connect(mOpenAction, SIGNAL(triggered()),
+ this, SLOT(showTopicView()));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init open %d", ret)
+
+ // Subscribe
+ mSubscibeAction = qobject_cast<HbAction *>(
+ mViewManager->xmlLoader()->findObject(T_SUBSCRIBE));
+ ret = connect(mSubscibeAction, SIGNAL(triggered()),
+ this, SLOT(toggleSubscription()));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init subscribe %d", ret)
+
+ // UnSubscribe
+ mUnSubscibeAction = qobject_cast<HbAction *>(
+ mViewManager->xmlLoader()->findObject(T_UNSUBSCRIBE));
+ ret = connect(mUnSubscibeAction, SIGNAL(triggered()),
+ this, SLOT(toggleSubscription()));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init subscribe %d", ret)
+
+ // Hotmark
+ mHotmarkAction = qobject_cast<HbAction *>(
+ mViewManager->xmlLoader()->findObject(T_HOTMARK));
+ ret = connect(mHotmarkAction, SIGNAL(triggered()),
+ this, SLOT(toggleHotmark()));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init hotmark %d", ret)
+
+ // UnHotmark
+ mUnHotmarkAction = qobject_cast<HbAction *>(
+ mViewManager->xmlLoader()->findObject(T_UNHOTMARK));
+ ret = connect(mUnHotmarkAction, SIGNAL(triggered()),
+ this, SLOT(toggleHotmark()));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init hotmark %d", ret)
+
+ // Edit
+ mEditAction = qobject_cast<HbAction *>(
+ mViewManager->xmlLoader()->findObject(T_EDIT));
+ ret = connect(mEditAction, SIGNAL(triggered()) ,
+ this, SLOT(editTopic()));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init edit %d", ret)
+
+ // Delete
+ mDeleteAction = qobject_cast<HbAction *>(
+ mViewManager->xmlLoader()->findObject(T_DELETE));
+ ret = connect(mDeleteAction, SIGNAL(triggered()),
+ this, SLOT(deleteTopic()));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::init delete %d", ret)
+
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::init OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::TopicListChangedL
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::TopicListChangedL(TCbsTopicListEvent /*aEvent*/,
+ TCbsTopicNumber /*aTopicNumber*/ )
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::TopicListChangedL IN");
+ reloadTopicIndex();
+ reloadTopics();
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::TopicListChangedL OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::createComponents
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::createComponents()
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::createComponents IN");
+ // The topic index widget
+ mTopicIndexWidget = qobject_cast<HbListWidget *>(
+ mViewManager->xmlLoader()->findWidget(T_TOPICINDEX));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\
+ mTopicIndexWidget=%d", mTopicIndexWidget)
+
+ // The topic list widget
+ mTopicsWidget = qobject_cast<HbListWidget *>(
+ mViewManager->xmlLoader()->findWidget(T_TOPIC_LIST));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\
+ mTopicsWidget=%d", mTopicsWidget)
+
+ // Button for changing reception status
+ mReceptionButton = qobject_cast<HbAction *>(
+ mViewManager->xmlLoader()->findObject(T_TOGGLE_RECEPTION));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\
+ mReceptionButton=%d", mReceptionButton)
+
+ // Connect signals of DocML objects
+ HbAction *addTopic = qobject_cast<HbAction *>(
+ mViewManager->xmlLoader()->findObject(T_ADD_TOPIC));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\
+ addTopic=%d", addTopic)
+ connect(addTopic, SIGNAL(triggered(bool)), this, SLOT(addTopic()));
+
+ HbAction *exit = qobject_cast<HbAction *>(
+ mViewManager->xmlLoader()->findObject(T_EXIT));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\
+ exit=%d", exit)
+ connect(exit, SIGNAL(triggered(bool)), mViewManager, SLOT(close()));
+
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::createComponents OUT")
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::reloadTopicIndex
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::reloadTopicIndex()
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::reloadTopicIndex IN")
+ if (mTopicIndexWidget && mTopicNumberList) {
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::reloadTopicIndex reload")
+ HbListWidgetItem *item = new HbListWidgetItem();
+
+ TCbsTopic topic;
+ mServer->GetTopic(0, topic);
+ mTopicNumberList->At(0) = 0;
+
+ updateItem(*item, topic);
+ mTopicIndexWidget->clear();
+ mTopicIndexWidget->addItem(item);
+
+ // Connect signal to indicate topic selection
+ connect(mTopicIndexWidget, SIGNAL(activated(HbListWidgetItem *)),
+ this, SLOT(showTopicSelectionView(HbListWidgetItem *)));
+ }
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::reloadTopicIndex OUT")
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::reloadTopics
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::reloadTopics()
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::reloadTopics IN");
+ if (mTopicNumberList && mTopicsWidget) {
+ int count(0);
+ mServer->GetTopicCount(count);
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::reloadTopics total count %d",
+ count);
+ // Reset first
+ mTopicNumberList->Reset();
+ QT_TRAP_THROWING(mTopicNumberList->AppendL(0));
+ mTopicsWidget->clear();
+
+ // Add updated topics one by one
+ for (int i = 1; i < count; i++) {
+ TCbsTopic topic;
+ mServer->GetTopic(i, topic);
+ QT_TRAP_THROWING(mTopicNumberList->AppendL(topic.iNumber));
+ HbListWidgetItem *item = new HbListWidgetItem();
+ updateItem(*item, topic);
+ mTopicsWidget->addItem(item);
+
+ // Connect signal to indicate topic selection
+ connect(mTopicsWidget, SIGNAL(activated(HbListWidgetItem *)),
+ this, SLOT(showTopicView(HbListWidgetItem *)));
+ }
+ }
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::reloadTopics OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::showTopicSelectionView
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::showTopicSelectionView(HbListWidgetItem */*item*/)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicSelectionView IN");
+ mTopicRow = 0;
+ if (mTopicNumberList) {
+ TInt messages(0);
+ mServer->GetMessageCount(0, messages);
+ if (messages) {
+ // TODO: show topic selection view
+ }
+ }
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicSelectionView OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::showTopicView
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::showTopicView(HbListWidgetItem *item)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::topicSelection IN");
+ mTopicRow = mTopicsWidget->row(item)+1;
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::topicSelection index=%d",
+ mTopicRow);
+ if (mTopicNumberList) {
+ TCbsTopicNumber selectTopic(mTopicNumberList->At(mTopicRow));
+ TInt messages(0);
+ mServer->GetMessageCount(selectTopic, messages);
+ if (messages) {
+ // it will be reopened
+ // mViewManager->activateTopicView(selectTopic);
+ }
+ }
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::topicSelection OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::addTopic
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::addTopic()
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::addTopic IN");
+ // Handle not OK cases, KErrAlreadyExists, KErrArgument, KErrDiskFull
+ // Todo: Add from index if it is available
+ TCbsTopic topic;
+ if (showTopicQuery(topic, true) &&
+ KErrNone == mServer->AddTopic(topic)) {
+ reloadTopics();
+ }
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::addTopic OUT");
+}
+
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::editTopic
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::editTopic()
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::editTopic IN");
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::editTopic mTopicRow=%d", mTopicRow)
+ TInt count(0);
+ mServer->GetTopicCount(count);
+ if (mTopicRow > 0 && mTopicRow < count) {
+ // Get topic we need to edit
+ TCbsTopic topic;
+ mServer->GetTopic(mTopicRow, topic);
+ TCbsTopicNumber oldTopicNumber = topic.iNumber;
+ TCbsTopicNumber newTopicNumber(EMaxTopicNumber);
+ TCbsTopicName newTopicName;
+ if (showTopicQuery(topic, false)) {
+ newTopicNumber = topic.iNumber;
+ newTopicName = topic.iName;
+ }
+ TInt err = mServer->ChangeTopicNameAndNumber(oldTopicNumber,
+ newTopicNumber, newTopicName);
+ if (KErrNone == err) {
+ reloadTopics();
+ }
+ }
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::editTopic OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::deleteTopic
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::deleteTopic()
+ {
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::deleteTopic IN row %d", mTopicRow);
+ TInt count(0);
+ mServer->GetTopicCount(count);
+ if (mTopicRow > 0 && mTopicRow < count) {
+ // user confirmation
+ HbMessageBox *box = new HbMessageBox(hbTrId("txt_cbs_delete_topic"),
+ HbMessageBox::MessageTypeQuestion);
+ HbAction *action = box->exec();
+ if (action == box->primaryAction()) {
+ TCbsTopicNumber selectTopic(mTopicNumberList->At(mTopicRow));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::deleteTopic topic number %d",
+ selectTopic);
+ if (KErrNone == mServer->DeleteTopic(selectTopic)) {
+ reloadTopics();
+ }
+ }
+ delete box;
+ box = NULL;
+ }
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::deleteTopic OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::toggleReception
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::toggleReception()
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::ToggleReception IN");
+ TBool status; //Symbian variable..
+ mServer->GetReceptionStatus(status);
+
+ if (status) {
+ // Deactivate reception and switch the text on UI
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::ToggleReception 1->0");
+ mServer->SetReceptionStatus(EFalse);
+
+ mReceptionButton->setText( hbTrId("txt_cbs_activate") );
+ } else {
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::ToggleReception 0->1");
+ // Activate reception and switch the text on UI
+ mServer->SetReceptionStatus(ETrue);
+ mReceptionButton->setText(hbTrId("txt_cbs_deactivate"));
+ }
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::ToggleReception OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::toggleHotmark
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::toggleHotmark()
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::toggleHotmark IN")
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::toggleHotmark\
+ mTopicRow %d", mTopicRow);
+ TInt count(0);
+ mServer->GetTopicCount(count);
+ if (mTopicRow >= 0 && mTopicRow < count) {
+ // Update data
+ TCbsTopic topic;
+ mServer->GetTopic(mTopicRow, topic);
+ LOG3(NORMAL,"CBSUI: CbsUiTopicListView::toggleHotmark\
+ before toggle hormark (S,H)=(%d,%d)",
+ topic.iSubscribed, topic.iHotmarked);
+
+ if (topic.iHotmarked) {
+ mServer->ChangeTopicHotmarkStatus(topic.iNumber, EFalse);
+ mServer->ChangeTopicSubscriptionStatus(topic.iNumber, ETrue);
+ topic.iHotmarked = EFalse;
+ topic.iSubscribed = ETrue;
+ } else {
+ if (topic.iSubscribed){
+ mServer->ChangeTopicHotmarkStatus(topic.iNumber, ETrue);
+ topic.iHotmarked = ETrue;
+ } else {
+ mServer->ChangeTopicHotmarkStatus(topic.iNumber, ETrue);
+ mServer->ChangeTopicSubscriptionStatus(topic.iNumber, ETrue);
+ topic.iHotmarked = ETrue;
+ topic.iSubscribed = ETrue;
+ }
+ }
+ LOG3(NORMAL,"CBSUI: CbsUiTopicListView::toggleHotmark\
+ after toggle hotmark (S,H)=(%d,%d)",
+ topic.iSubscribed, topic.iHotmarked);
+ // Update icon
+ updateCurrentItemIcon(topic);
+ }
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::toggleHotmark OUT")
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::toggleSubscription
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::toggleSubscription()
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::toggleSubsciption IN")
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::toggleSubsciption mTopicRow=%d",
+ mTopicRow)
+ TInt count(0);
+ mServer->GetTopicCount(count);
+ if (mTopicRow >= 0 && mTopicRow < count) {
+ TCbsTopic topic;
+ mServer->GetTopic(mTopicRow, topic);
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::toggleSubsciption\
+ topic number %d", topic.iNumber);
+ LOG3(NORMAL,"CBSUI: CbsUiTopicListView::toggleSubscription\
+ before toggle subscibe (S,H)=(%d,%d)",
+ topic.iSubscribed, topic.iHotmarked);
+
+ if (topic.iSubscribed) {
+ if (topic.iHotmarked) {
+ mServer->ChangeTopicHotmarkStatus(topic.iNumber, EFalse);
+ topic.iHotmarked = EFalse;
+ }
+ mServer->ChangeTopicSubscriptionStatus(topic.iNumber, EFalse);
+ topic.iSubscribed = EFalse;
+ } else {
+ mServer->ChangeTopicSubscriptionStatus(topic.iNumber, ETrue);
+ topic.iSubscribed = ETrue;
+ }
+ LOG3(NORMAL,"CBSUI: CbsUiTopicListView::toggleSubscription\
+ after toggle subscibe (S,H)=(%d,%d)",
+ topic.iSubscribed, topic.iHotmarked);
+ // Update icon
+ updateCurrentItemIcon(topic);
+ }
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::toggleSubsciption OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::showTopicIndexMenu
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::showTopicIndexMenu(HbListWidgetItem *item, QPointF coords)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicIndexMenu IN");
+ Q_UNUSED(item);
+ mTopicRow = 0;
+ TCbsTopic topic;
+ mServer->GetTopic(0, topic);
+ LOG3(NORMAL,"CBSUI: CbsUiTopicListView::showTopicIndexMenu (row %d: %d)",
+ mTopicRow, topic.iNumber);
+ showPopupMenu(topic, coords);
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicIndexMenu OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::showTopicsMenu
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::showTopicsMenu(HbListWidgetItem *item, QPointF coords)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicsMenu IN");
+ mTopicRow = mTopicsWidget->row(item)+1;
+ TCbsTopic topic;
+ mServer->GetTopic(mTopicRow, topic);
+ LOG3(NORMAL,"CBSUI: CbsUiTopicListView::showTopicsMenu (row %d: %d)",
+ mTopicRow, topic.iNumber);
+ showPopupMenu(topic, coords);
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicsMenu OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::showPopupMenu
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::showPopupMenu(const TCbsTopic &topic, QPointF coords)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::showPopupMenu IN");
+ HbMenu *contextMenu = new HbMenu();
+ contextMenu->setTimeout(HbPopup::NoTimeout);
+ contextMenu->setDismissPolicy(HbPopup::TapOutside);
+
+ TInt messageCount(0);
+ mServer->GetMessageCount(topic.iNumber, messageCount);
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::showPopupMenu\
+ messageCount=%d", messageCount)
+
+ // Open
+ if (topic.iNumber && messageCount) {
+ contextMenu->addAction(mOpenAction);
+ }
+ // Subscribe / UnSubscribe
+ if (topic.iSubscribed) {
+ contextMenu->addAction(mUnSubscibeAction);
+ } else {
+ contextMenu->addAction(mSubscibeAction);
+ }
+ // Hotmark / UnHotmark
+ if (topic.iHotmarked) {
+ contextMenu->addAction(mUnHotmarkAction);
+ } else {
+ contextMenu->addAction(mHotmarkAction);
+ }
+ // Edit & Delete
+ if (topic.iNumber) {
+ contextMenu->addAction(mEditAction);
+ contextMenu->addAction(mDeleteAction);
+ }
+
+ // Show context sensitive menu.
+ contextMenu->exec(coords);
+ contextMenu->clearActions();
+ delete contextMenu;
+ contextMenu = NULL;
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::showPopupMenu OUT")
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::updateQueryAction
+// ----------------------------------------------------------------------------
+//
+void CbsUiTopicListView::updateQueryAction( QString text )
+{
+ LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateQueryAction IN" )
+ LOG2(NORMAL, "SATAPP: CbsUiTopicListView::updateQueryAction text=%s",
+ text.utf16())
+ if (mTopicQuery && text.length() > 0) {
+ mTopicQuery->primaryAction()->setEnabled(true);
+ LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateQueryAction enable OK")
+ }
+ LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateQueryAction OUT" )
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::updateItem
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::updateItem(HbListWidgetItem &item,
+ const TCbsTopic &topic)
+{
+ LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateItem IN" )
+ updateItemText(item, topic);
+ updateItemIcon(item, topic);
+ LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateItem OUT" )
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::updateItemIcon
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::updateItemIcon(HbListWidgetItem &item,
+ const TCbsTopic &topic)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemIcon IN");
+ // TODO: what is the correct way to handle graphics (SVG?)
+
+ if (topic.iSubscribed) {
+ if (topic.iHotmarked) {
+ item.setDecorationIcon(HbIcon(":/icons/icons/hotmark2.png"));
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemIcon Hotmarked");
+ } else {
+ item.setDecorationIcon(HbIcon(":/icons/icons/sub2.png"));
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemIcon Subscribed");
+ }
+ } else {
+ // No icon if not subscribted:
+ // List item without an icon is alligned on left (looks bad)
+ // temporary solution is to use empty icon
+ item.setDecorationIcon(HbIcon(":/icons/icons/empty.png"));
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemIcon Empty");
+ }
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemIcon OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::updateItemText
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::updateItemText(HbListWidgetItem &item,
+ const TCbsTopic &topic)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemText IN");
+ QString txtL1;
+ QString txtL2;
+ if (0 == topic.iNumber) {
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemText topic index");
+ txtL1 = hbTrId("txt_cbs_000_topic_index");
+ txtL2 = hbTrId("txt_cbs_not_available");
+ } else {
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemText topics");
+ txtL1 = QVariant(topic.iNumber).toString();
+ txtL2 = hbTrId("txt_cbs_no_messages");
+ // instert zeros to topic number in case 2 or 1 digit topic number.
+ switch (txtL1.length()) {
+ case 1:
+ {
+ txtL1.insert(0, "0");
+ txtL1.insert(0, "0");
+ break;
+ }
+ case 2:
+ {
+ txtL1.insert(0, "0");
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ // do nothing
+ }
+
+ txtL1.append(' '); // a space
+ QString name = QString::fromUtf16(topic.iName.Ptr(), topic.iName.Length());
+ txtL1.append(name);
+ if (topic.iUnreadMessages) {
+ txtL1.append(" ("); // space + (
+ txtL1.append(QVariant(topic.iUnreadMessages).toString());
+ txtL1.append(')'); // closing )
+ }
+ // Update the status of topic
+ TInt numberOfMessages(0);
+ mServer->GetMessageCount(topic.iNumber, numberOfMessages);
+ if (numberOfMessages) {
+ TCbsMessage message;
+ TBuf<KMaxMessageTitleLength> buffer; // symbian code
+ // take the last message, not sure is this correct
+ TInt err = mServer->GetMessage(topic.iNumber,
+ numberOfMessages - 1, message);
+ if (KErrNone == err) {
+ err = mServer->GetMessageContents(message.iHandle, buffer);
+ txtL2 = QString::fromUtf16(buffer.Ptr(), buffer.Length());
+ // TODO: timestamp and second text line
+ }
+ }
+ }
+ item.setText(txtL1);
+ item.setSecondaryText(txtL2);
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::updateItemText OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::updateCurrentItem
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::updateCurrentItem(const TCbsTopic &topic)
+{
+ LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItem IN" )
+ LOG2(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItem row=%d",
+ mTopicRow)
+ updateCurrentItemIcon(topic);
+ updateCurrentItemText(topic);
+ LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItem OUT" )
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::updateCurrentItemIcon
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::updateCurrentItemIcon(const TCbsTopic &topic)
+{
+ LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItemIcon IN" )
+ LOG2(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItemIcon row=%d",
+ mTopicRow)
+ HbListWidgetItem *list = NULL;
+ if (0 == mTopicRow) {
+ list = mTopicIndexWidget->item(0);
+ } else {
+ list = mTopicsWidget->item(mTopicRow - 1);
+ }
+ updateItemIcon(*list, topic);
+ LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItemIcon OUT" )
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::updateCurrentItemText
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::updateCurrentItemText(const TCbsTopic &topic)
+{
+ LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItemText IN" )
+ LOG2(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItemText row=%d",
+ mTopicRow)
+ HbListWidgetItem *list = NULL;
+ if (0 == mTopicRow) {
+ list = mTopicIndexWidget->item(0);
+ } else {
+ list = mTopicsWidget->item(mTopicRow - 1);
+ }
+ updateItemText(*list, topic);
+ LOG(NORMAL, "SATAPP: CbsUiTopicListView::updateCurrentItemText OUT" )
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::showTopicQuery
+// ----------------------------------------------------------------------------
+bool CbsUiTopicListView::showTopicQuery(TCbsTopic &topic, const bool isAddTopic)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery IN");
+ bool ret = false; // user didn't click OK
+ // Compose dialog
+ mTopicQuery = new HbInputDialog();
+ mTopicQuery->setSecondRowVisible(true);
+ // Name
+ mTopicQuery->setInputMode(HbInputDialog::TextInput, 0);
+ mTopicQuery->lineEdit(0)->setMaxLength(KMaxTopicNameLength);
+ QString name = QString::fromUtf16(topic.iName.Ptr(), topic.iName.Length());
+ if (name.length()) {
+ mTopicQuery->setTextValue(QVariant(name), 0);
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery old name %s",
+ name.utf16());
+ }
+
+ // Number
+ mTopicQuery->setInputMode(HbInputDialog::IntInput, 1);
+ mTopicQuery->lineEdit(1)->setMaxLength(3);
+ int number = topic.iNumber;
+ if (number){
+ mTopicQuery->setTextValue(QVariant(number), 1);
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery old number%d", number);
+ }
+
+ mTopicQuery->setPromptText(hbTrId("txt_cbs_topic_name"), 0);
+ mTopicQuery->setPromptText(hbTrId("txt_cbs_topic_number"), 1);
+
+ // Disable OK button if invalid topic number input
+ HbAction *perimaryAction = mTopicQuery->primaryAction();
+ perimaryAction->setEnabled(false);
+ connect(mTopicQuery->lineEdit(1), SIGNAL(textChanged(QString)),
+ this, SLOT( updateQueryAction(QString)));
+
+ // Add validation for topic number (1-999)
+ HbValidator *val =new HbValidator;
+ QRegExp r("\\d{1,3}"); // from 1 to 3 digits
+ val->setMasterValidator(new QRegExpValidator(r,0));
+ val->addField(new QIntValidator(1,999,0),"");
+ mTopicQuery->setValidator(val, 1);
+
+ // Show the dialog
+ HbAction *action = mTopicQuery->exec();
+
+ // Fatch name and number from dialog
+ name = mTopicQuery->value(0).toString();
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery name=%s ", name.utf16());
+ number = mTopicQuery->value(1).toString().toInt();
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery number=%d ", number);
+ bool isNumberExist(false);
+ if (isAddTopic) {
+ int count(0);
+ mServer->GetTopicCount(count);
+ LOG2(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery topic total count %d",
+ count);
+ // Check if there is a toipc number same as number which user add
+ for (int i = 1; i < count; i++) {
+ TCbsTopic currentTopic;
+ mServer->GetTopic(i, currentTopic);
+ if (currentTopic.iNumber == number) {
+ isNumberExist = true;
+ break;
+ }
+ }
+ }
+
+ // check that a topic number was entered and ok pressed
+ // name is optional
+ if (action == mTopicQuery->primaryAction()) {
+ if ( isNumberExist || !number){
+ // 000 topic and exist number topic can't be edited
+ showNumberInUsePopup();
+ showTopicQuery( topic, isAddTopic);
+ } else {
+ ret = true;
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery OK")
+ topic.iNumber = number;
+ topic.iSubscribed = ETrue;
+ topic.iHotmarked = EFalse;
+ if (name.length()) {
+ topic.iName = name.utf16();
+ }
+ }
+ }
+ delete mTopicQuery;
+ mTopicQuery = NULL;
+
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::showTopicQuery OUT");
+ return ret;
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicListView::showNumberInUsePopup
+// ----------------------------------------------------------------------------
+void CbsUiTopicListView::showNumberInUsePopup()
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::showNumberInUsePopup IN");
+ HbMessageBox *inUsedPopup = new HbMessageBox(HbMessageBox::MessageTypeWarning);
+ inUsedPopup->setText(tr("topic number already in use "));
+ inUsedPopup->exec();
+ delete inUsedPopup;
+ inUsedPopup = NULL;
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::showNumberInUsePopup OUT");
+}
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/src/cbsuitopicview.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,175 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <QGraphicsLinearLayout>
+
+#include <hbapplication.h>
+#include <hbmenu.h>
+#include <hbicon.h>
+#include <hblistwidget.h>
+#include <hblistwidgetitem.h>
+
+#include "cbsuitopicview.h"
+#include "cbsuiviewmanager.h"
+#include "rcbsui.h"
+#include "cbslog.h"
+#include "cbsuiconstants.h"
+
+const char *T_TITLE = "listWidget2";
+const char *T_PREVIOUS= "action";
+const char *T_BACK= "action_2";
+
+// ======== MEMBER FUNCTIONS ==================================================
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicView::CbsUiTopicView
+// ----------------------------------------------------------------------------
+CbsUiTopicView::CbsUiTopicView()
+ : HbView(),
+ mServer(NULL),
+ mViewManager(NULL),
+ mTopic(NULL),
+ mCurrentTopicNumber(NULL)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::CbsUiTopicView IN");
+
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::CbsUiTopicView OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicView::~CbsUiTopicView
+// ----------------------------------------------------------------------------
+CbsUiTopicView::~CbsUiTopicView()
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::~CbsUiTopicView IN");
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::~CbsUiTopicView OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicView::init
+// ----------------------------------------------------------------------------
+void CbsUiTopicView::init(MCbs &server, CbsUiViewManager &viewManager)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::init IN");
+ mViewManager = &viewManager;
+ mServer = &server;
+ createComponents();
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::init OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicView::TopicListChangedL
+// ----------------------------------------------------------------------------
+void CbsUiTopicView::TopicListChangedL(TCbsTopicListEvent /*aEvent*/,
+ TCbsTopicNumber /*aTopicNumber*/)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::TopicListChangedL IN");
+ /*if (mTopic &&
+ mCurrentTopicNumber == aTopicNumber &&
+ ECbsTopicReceivedNewMessage == aEvent) {
+ reloadMessages(aTopicNumber);
+ } */
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::TopicListChangedL OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicView::createComponents
+// ----------------------------------------------------------------------------
+void CbsUiTopicView::createComponents()
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::createComponents IN");
+
+ mTopic = qobject_cast<HbListWidget *>(
+ mViewManager->xmlLoader()->findWidget(T_TITLE));
+ LOG2(NORMAL,"CBSUI: CbsUiTopicView::createComponents mTopic=%d", mTopic);
+
+ // Previous Action
+ mPrevious = qobject_cast<HbAction *>(
+ mViewManager->xmlLoader()->findObject(T_PREVIOUS));
+
+ if (!mPrevious) {
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\
+ mPrevious faild");
+ }
+
+ // Back Action
+ mBack = qobject_cast<HbAction *>(
+ mViewManager->xmlLoader()->findObject(T_BACK));
+
+ if (!mBack) {
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\
+ mBack faild");
+ } else {
+ connect(mBack, SIGNAL(triggered(bool)), mViewManager, SLOT(activateMainView()));
+ LOG(NORMAL,"CBSUI: CbsUiTopicListView::createComponents\
+ mBack successfully");
+ }
+
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::createComponents OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicView::reloadMessages
+// ----------------------------------------------------------------------------
+void CbsUiTopicView::reloadMessages(TCbsTopicNumber topicNumber)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::reloadMessages IN");
+ mCurrentTopicNumber = topicNumber;
+ // Update topic details
+ HbListWidgetItem* listItem = new HbListWidgetItem();
+ TCbsTopic topic;
+
+ mServer->GetTopic(mCurrentTopicNumber, topic);
+
+ // Clear first
+ mTopic->clear();
+ QString name = QString::fromUtf16(topic.iName.Ptr(), topic.iName.Length());
+ QString numberAndName = QVariant(topic.iNumber).toString();
+ // instert zeros to topic number in case 2 or 1 digit topic number.
+ switch (numberAndName.length()) {
+ case 1:
+ {
+ numberAndName.insert(0, "0");
+ numberAndName.insert(0, "0");
+ break;
+ }
+ case 2:
+ {
+ numberAndName.insert(0, "0");
+ break;
+ }
+ default:{}
+ // do nothing
+ }
+
+ listItem->setText(numberAndName);
+ //updateStatusIcon(*listItem, topic);
+ mTopic->addItem(listItem);
+ listItem = NULL;
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::reloadMessages OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiTopicView::addMessage
+// ----------------------------------------------------------------------------
+void CbsUiTopicView::addMessage(const TCbsMessage& /*message*/,
+ const QString& /*msgName*/)
+{
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::addMessage IN");
+ LOG(NORMAL,"CBSUI: CbsUiTopicView::addMessage OUT");
+}
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/src/cbsuiutility.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,163 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Implementation of CbsUiClenaupHandler
+*
+*
+*/
+
+
+// INCLUDES
+#include "CbsUiUtility.h"
+#include "MSaveMessageController.h"
+#include "CbsUiDebug.h"
+#include "MCbs.h"
+
+
+
+// =================== MEMBER FUNCTIONS ====================
+
+
+// ---------------------------------------------------------
+// CbsUiUtility::ShowConfirmationNoteL
+//
+//
+// ---------------------------------------------------------
+//
+void CbsUiUtility::ShowConfirmationNoteL(
+ const TInt aResourceId, TBool aWaitingDialog )
+ {
+ /*HBufC* text = CCoeEnv::Static()->AllocReadResourceLC(aResourceId);
+ CAknConfirmationNote* note =
+ new (ELeave) CAknConfirmationNote(aWaitingDialog);
+ note->ExecuteLD(*text);
+ CleanupStack::PopAndDestroy(text);*/
+ }
+
+// ---------------------------------------------------------
+// CbsUiUtility::ShowErrorNoteL
+//
+//
+// ---------------------------------------------------------
+//
+void CbsUiUtility::ShowErrorNoteL( const TInt aResourceId )
+ {
+ /*HBufC* text = CCoeEnv::Static()->AllocReadResourceLC( aResourceId );
+ CAknErrorNote* note = new (ELeave) CAknErrorNote;
+ note->ExecuteLD( *text );
+ CleanupStack::PopAndDestroy( text );*/
+ }
+
+// ---------------------------------------------------------
+// CbsUiUtility::ShowWarningNoteL
+//
+//
+// ---------------------------------------------------------
+//
+void CbsUiUtility::ShowWarningNoteL( const TInt aResourceId )
+ {
+ /* HBufC* text = CCoeEnv::Static()->AllocReadResourceLC( aResourceId );
+ CAknWarningNote* note = new (ELeave) CAknWarningNote;
+ note->ExecuteLD( *text );
+ CleanupStack::PopAndDestroy( text );*/
+ }
+
+// ---------------------------------------------------------
+// CbsUiUtility::CreateEmptyNavigationPaneL
+//
+//
+// ---------------------------------------------------------
+//
+/*CAknNavigationDecorator* CbsUiUtility::CreateEmptyNavigationPaneL()
+ {
+ CEikStatusPane* statusPane =
+ STATIC_CAST( CAknAppUi*,
+ CEikonEnv::Static()->EikAppUi() )->StatusPane();
+
+ CAknNavigationControlContainer* naviContainer =
+ STATIC_CAST( CAknNavigationControlContainer*, statusPane->
+ ControlL(TUid::Uid(EEikStatusPaneUidNavi)) );
+
+ CAknNavigationDecorator* decorator;
+ decorator = naviContainer->CreateNavigationLabelL();
+
+ naviContainer->PushL(*decorator);
+
+ return decorator;
+ }*/
+
+// ---------------------------------------------------------
+// CbsUiUtility::IsSavedL
+//
+//
+// ---------------------------------------------------------
+//
+TBool CbsUiUtility::IsSavedL( const TCbsMessageHandle aHandle, MCbs& aServer )
+ {
+ /*__ASSERT_DEBUG(&aServer, CbsUiPanic(EErrNullPointer) );
+ __ASSERT_DEBUG(aServer.Connected(), CbsUiPanic(EErrServerDisconnected) );
+
+ TCbsMessage message;
+
+ TInt ret = aServer.FindMessageByHandle(aHandle, message);
+
+ __CBSUI_ASSERT( ret == KErrNone, CbsUiPanic(EErrMsgHandleNotFound) );
+
+ User::LeaveIfError(ret);
+ TBool saved(EFalse);
+
+ if ( message.iPermanent )
+ {
+ saved = ETrue;
+ }
+ */
+ return EFalse; //saved;
+ }
+
+// ---------------------------------------------------------
+// CbsUiUtility::SaveCurrentMessageL
+//
+//
+// ---------------------------------------------------------
+//
+TInt CbsUiUtility::SaveCurrentMessageL(
+ const TCbsMessageHandle aHandle, MSaveMessageController& aSaver )
+ {
+ /* __ASSERT_DEBUG(&aSaver, CbsUiPanic(EErrNullPointer) );
+
+ TInt resultCode( aSaver.SaveMessage(aHandle) );
+
+ switch ( resultCode )
+ {
+ case KErrDiskFull:
+ {
+ User::Leave( KErrDiskFull );
+ break;
+ }
+ case KErrNone: // Normal case
+ {
+ // do nothing
+ break;
+ }
+ default:
+ {
+ //CbsUiUtility::ShowErrorNoteL(R_TEXT_NOTE_MEMORY_FULL_ERROR);
+ break;
+ }
+ } */
+
+ return 0; //resultCode;
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/src/cbsuiviewmanager.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,193 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <hbmainwindow.h>
+#include <hbdocumentloader.h>
+#include <hbaction.h>
+#include <hbmenu.h>
+
+#include "cbsuiviewmanager.h"
+#include "cbsuitopiclistview.h"
+#include "cbsuitopicview.h"
+#include "mcbs.h"
+#include "cbslog.h"
+
+const char *CBS_APP_XML = ":/xml/cbs_app.docml";
+const char *CBS_TOPIC_VIEW_XML = ":/xml/cbs_topic_view.docml";
+const char *CBS_MAIN_VIEW = "t:view";
+const char *CBS_TOPIC_VIEW ="t:view2";
+
+// ======== MEMBER FUNCTIONS ==================================================
+// ----------------------------------------------------------------------------
+// CbsUiViewManager::CbsUiViewManager
+// ----------------------------------------------------------------------------
+//
+CbsUiViewManager::CbsUiViewManager(HbMainWindow *window, MCbs &server)
+ :mMainWindow(window),
+ mServer(server),
+ mTopicListView(NULL),
+ mTopicView(NULL),
+ mLoader(NULL),
+ mSoftKeyBackAction(NULL),
+ mSoftKeyExitAction(NULL)
+{
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::CbsUiViewManager IN");
+
+ // SYMBIAN CODE:
+ //mTopicMonitor = CCbsUiTopicListMonitor::NewL(mServer); not in use at the moment
+
+ bool ok = false;
+ mLoader = new CbsUiDocumentLoader();
+ // ownership of the objects are transferred to caller
+ mObjects = mLoader->load(CBS_APP_XML, &ok);
+ if (ok) {
+ activateMainView();
+ } else {
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::CbsUiViewManager DocML failure!");
+ }
+
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::CbsUiViewManager OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiViewManager::~CbsUiViewManager
+// ----------------------------------------------------------------------------
+//
+CbsUiViewManager::~CbsUiViewManager()
+{
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::~CbsUiViewManager IN");
+ //delete mTopicMonitor; not in use at the moment
+ delete mLoader;
+ // delete all objects created from DocML.
+ while (!mObjects.isEmpty()) {
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::~CbsUiViewManager deleting...");
+ delete mObjects.takeFirst();
+ }
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::~CbsUiViewManager OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiViewManager::activateTopicView
+// ----------------------------------------------------------------------------
+//
+void CbsUiViewManager::activateTopicView(TCbsTopicNumber topicNumber)
+{
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::activateTopicView IN");
+ if (!mTopicView) {
+ bool ok = false;
+ // ownership of the objects are transferred to caller
+ mObjects += mLoader->load(CBS_TOPIC_VIEW_XML, &ok);
+ if (ok) {
+ mTopicView =
+ qobject_cast<CbsUiTopicView *>(mLoader->findWidget(CBS_TOPIC_VIEW));
+ mTopicView->init(mServer, *this);
+ } else {
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::activateTopicView DocML failure!");
+ }
+ }
+
+ if (mTopicView != mMainWindow->currentView()) {
+ if (!mSoftKeyBackAction) {
+ mSoftKeyBackAction = new HbAction(Hb::BackAction,mTopicView);
+ LOG2(NORMAL,"CBSUI: CbsUiViewManager::activateTopicView \
+ mSoftKeyBackAction==%d", mSoftKeyBackAction);
+ }
+
+ mTopicView->reloadMessages(topicNumber);
+ mMainWindow->addSoftKeyAction(Hb::SecondarySoftKey,mSoftKeyBackAction);
+ bool ret = connect(mSoftKeyBackAction, SIGNAL(triggered()),
+ this, SLOT(activateMainView()));
+ HbView* view = mMainWindow->currentView();
+ mMainWindow->removeView(view);
+ // just temp implement
+ mTopicListView = 0;
+ mMainWindow->addView(mTopicView);
+ LOG2(NORMAL,"CBSUI: CbsUiViewManager::activateTopicView\
+ mTopicView=%d", mTopicView);
+ }
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::activateTopicView OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiViewManager::activateMainView
+// ----------------------------------------------------------------------------
+//
+void CbsUiViewManager::activateMainView()
+{
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::activateMainView IN");
+ if (!mTopicListView) {
+ // First time called
+ mTopicListView = qobject_cast<CbsUiTopicListView *>
+ (mLoader->findWidget(CBS_MAIN_VIEW));
+ mTopicListView->init(mServer, *this);
+ // Connect signal to change view
+ bool ret = connect(mTopicListView,
+ SIGNAL(topicSelected(TCbsTopicNumber)), this,
+ SLOT(activateTopicView(TCbsTopicNumber)));
+ LOG2(NORMAL,"CBSUI: CbsUiViewManager::activateMainView ret=%d", ret);
+ } else {
+ HbView *view = mMainWindow->currentView();
+ mMainWindow->removeView(view);
+ // just temp implement
+ mTopicView = 0;
+ }
+
+ if (!mSoftKeyExitAction) {
+ mSoftKeyExitAction = new HbAction(Hb::QuitAction, mTopicListView);
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::activateMainView add quit action");
+ }
+ if ( mSoftKeyBackAction ) {
+ mMainWindow->removeSoftKeyAction(Hb::SecondarySoftKey, mSoftKeyBackAction);
+ mSoftKeyBackAction = 0;
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::activateMainView remove back action");
+ }
+
+ mMainWindow->addSoftKeyAction(Hb::SecondarySoftKey,mSoftKeyExitAction);
+ bool ret = connect(mSoftKeyExitAction, SIGNAL(triggered()),
+ mMainWindow, SLOT(close()));
+ LOG2(NORMAL,"CBSUI: CbsUiViewManager::activateMainView connect exit=%d", ret);
+ mMainWindow->addView(mTopicListView);
+ mMainWindow->setCurrentView(mTopicListView);
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::activateMainView OUT");
+}
+
+// ----------------------------------------------------------------------------
+// CbsUiDocumentLoader::createObject
+// For DocML usage:
+// ----------------------------------------------------------------------------
+//
+QObject *CbsUiDocumentLoader::createObject(
+ const QString& type, const QString &name)
+{
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::createObject IN");
+ if (type == CbsUiTopicListView::staticMetaObject.className()) {
+ QObject *object = new CbsUiTopicListView;
+ object->setObjectName(name);
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::createObject:CbsUiTopicListView OUT");
+ return object;
+ } else if (type == CbsUiTopicView::staticMetaObject.className()) {
+ QObject *object = new CbsUiTopicView;
+ object->setObjectName(name);
+ LOG(NORMAL,"CBSUI: CbsUiViewManager::createObject:CbsUiTopicView OUT");
+ return object;
+ }
+ LOG2(NORMAL,"CBSUI: CbsUiViewManager::createObject: \
+ object name = %s",name.utf16());
+ return HbDocumentLoader::createObject(type, name);
+}
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/src/ccbsuisettingsmonitor.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,136 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+// INCLUDES
+#include "MCbs.h"
+#include "CCbsUiSettingsMonitor.h"
+//#include "CbsUiPanic.h"
+#include "MCbsUiSettingsObserver.h"
+
+
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------------------------------
+// CCbsUiSettingsMonitor::CCbsUiSettingsMonitor
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CCbsUiSettingsMonitor::CCbsUiSettingsMonitor(
+ MCbs& aServer,
+ MCbsUiSettingsObserver& aObserver )
+ :
+ CActive(EPriorityStandard),
+ iContinue(ETrue),
+ iServer(aServer),
+ iObserver(aObserver)
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// CCbsUiSettingsMonitor::ConstructL
+// Symbian OS default constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CCbsUiSettingsMonitor::ConstructL( )
+ {
+ CActiveScheduler::Add( this );
+ IssueRequest();
+ }
+
+// ----------------------------------------------------------------------------
+// CCbsUiSettingsMonitor::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CCbsUiSettingsMonitor* CCbsUiSettingsMonitor::NewL(
+ MCbs& aServer, MCbsUiSettingsObserver& aObserver )
+ {
+ CCbsUiSettingsMonitor* self = new (ELeave) CCbsUiSettingsMonitor(
+ aServer, aObserver);
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+
+ return self;
+ }
+
+
+// ----------------------------------------------------------------------------
+// CbsUiViewManager::activateMainView
+// Destructor
+// ----------------------------------------------------------------------------
+//
+CCbsUiSettingsMonitor::~CCbsUiSettingsMonitor()
+ {
+ iContinue = EFalse;
+ Cancel();
+ }
+
+
+// ----------------------------------------------------------------------------
+// CCbsUiSettingsMonitor::IssueRequest
+//
+// This metor issues request
+// ----------------------------------------------------------------------------
+//
+void CCbsUiSettingsMonitor::IssueRequest()
+ {
+ if ( iContinue )
+ {
+ SetActive();
+ iServer.NotifySettingsChanged( iStatus, iEvent );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CCbsUiSettingsMonitor::RunL
+//
+// calls SettingsChanged method on application class
+// ----------------------------------------------------------------------------
+//
+void CCbsUiSettingsMonitor::RunL()
+ {
+ iObserver.SettingsChangedL(iEvent); // Doesn't inform the reason!!
+
+ /* __ASSERT_DEBUG( iEvent == ECbsModifiedReceptionStatus ||
+ iEvent == ECbsModifiedTopicDetectionStatus ||
+ iEvent == ECbsModifiedLanguages,
+ CbsUiPanic(EErrInvalidEvent) );
+*/
+ if ( iContinue )
+ {
+ IssueRequest();
+ }
+ }
+
+
+// ----------------------------------------------------------------------------
+// CCbsUiSettingsMonitor::DoCancel
+//
+// ----------------------------------------------------------------------------
+//
+void CCbsUiSettingsMonitor::DoCancel()
+ {
+ iContinue = EFalse;
+ iServer.NotifySettingsChangedCancel();
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/src/ccbsuitopiclistmonitor.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,161 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+
+// INCLUDES
+#include <QObject>
+#include "mcbs.h"
+#include "ccbsuitopiclistmonitor.h"
+#include "mcbsuitopicmonitorobserver.h"
+#include "cbsuiconstants.h"
+
+
+
+// CONSTANTS
+const TInt KNumberOfObservers = 3;
+
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------------------------------
+// CCbsUiSettingsMonitor::CCbsUiSettingsMonitor
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CCbsUiTopicListMonitor::CCbsUiTopicListMonitor( MCbs& aServer )
+ : CActive(EPriorityStandard), iContinue(ETrue), iServer(aServer)
+ {
+ }
+
+
+// ----------------------------------------------------------------------------
+// CCbsUiTopicListMonitor::ConstructL
+// Symbian OS default constructor can leave
+// ----------------------------------------------------------------------------
+//
+void CCbsUiTopicListMonitor::ConstructL( )
+ {
+ CActiveScheduler::Add(this);
+ IssueRequest();
+
+ iObservers = new (ELeave) TCbsUiMonitorObservers(KNumberOfObservers);
+ }
+
+// ----------------------------------------------------------------------------
+// CCbsUiTopicListMonitor::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CCbsUiTopicListMonitor* CCbsUiTopicListMonitor::NewL( MCbs& aServer )
+ {
+ CCbsUiTopicListMonitor* self =
+ new (ELeave) CCbsUiTopicListMonitor(aServer);
+
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+
+ return self;
+ }
+
+
+
+// ----------------------------------------------------------------------------
+// CCbsUiTopicListMonitor::~CCbsUiTopicListMonitor
+// Destructor
+// ----------------------------------------------------------------------------
+//
+CCbsUiTopicListMonitor::~CCbsUiTopicListMonitor()
+ {
+ delete iObservers;
+ Cancel();
+ }
+
+// ----------------------------------------------------------------------------
+// CCbsUiTopicListMonitor::IssueRequest()
+//
+//
+// ----------------------------------------------------------------------------
+//
+void CCbsUiTopicListMonitor::IssueRequest()
+ {
+ if ( iContinue )
+ {
+ SetActive();
+
+ iServer.NotifyOnTopicListEvent(
+ iStatus, ECbsTopicAllEvents, iEvent, iTopicNumber );
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CCbsUiTopicListMonitor::RunL
+//
+//
+// ----------------------------------------------------------------------------
+//
+void CCbsUiTopicListMonitor::RunL()
+
+ {
+ if ( iObservers->Count() > 0 )
+ {
+ for ( TInt i(0); i < iObservers->Count(); i++ )
+ {
+ iObservers->At(i)->TopicListChangedL(iEvent, iTopicNumber);
+ }
+ }
+ // TODO: Panics..
+ //__ASSERT_DEBUG(
+ // (iEvent & ECbsTopicAllEvents), CbsUiPanic(EErrInvalidEvent) );
+
+ if ( iContinue )
+ {
+ IssueRequest();
+ }
+ }
+
+// ----------------------------------------------------------------------------
+// CCbsUiTopicListMonitor::DoCancel
+//
+//
+// ----------------------------------------------------------------------------
+//
+void CCbsUiTopicListMonitor::DoCancel()
+ {
+ iContinue = EFalse;
+
+ iServer.NotifyOnTopicListEventCancel();
+ }
+
+// ----------------------------------------------------------------------------
+// CCbsUiTopicListMonitor::AddObserverL
+//
+//
+// ----------------------------------------------------------------------------
+//
+void CCbsUiTopicListMonitor::AddObserverL(
+ MCbsUiTopicMonitorObserver* aObserver )
+ {
+ /* __ASSERT_DEBUG( iObservers, CbsUiPanic(EErrNullPointer) );
+ __ASSERT_DEBUG( aObserver, CbsUiPanic(EErrNullPointer) );
+*/
+ iObservers->AppendL(aObserver);
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/src/main.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <QtGui>
+#include <QTranslator>
+
+#include <hbapplication.h>
+#include <hbinstance.h>
+
+#include "cbsuimainwindow.h"
+#include "cbslog.h"
+
+int main(int argc, char *argv[])
+{
+ LOG(NORMAL,"CBSUI: main IN");
+
+ // Initialization
+ HbApplication app(argc, argv);
+
+ QTranslator translator;
+ bool ok = translator.load(":/translations/cbsui_en");
+ LOG2(NORMAL, "CBSUI: main, translation %d (1=OK, 0=fail)", ok )
+ app.installTranslator(&translator);
+
+ // Main window widget.
+ // Includes decorators such as signal strength and battery life indicator.
+ CbsUiMainWindow mainWindow;
+ #ifndef __WINSCW
+ LOG(NORMAL,"CBSUI: main set LANDSCAPE mode");
+ hbInstance->setOrientation(Qt::Horizontal);
+ #endif
+ mainWindow.show();
+ LOG(NORMAL,"CBSUI: main mainwindow show over");
+ // Enter event loop
+ int result = app.exec();
+ LOG2(NORMAL,"CBSUI: main exit %d", result);
+ return result;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cbs/cbsui/src/rcbsui.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,311 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* RCbsUi calls directly real cbs client, which handles
+* the actual calls to server.
+*
+*/
+
+
+// INCLUDES
+#include <QObject>
+#include "rcbsui.h"
+#include <RCbs.h>
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+RCbsUi::RCbsUi()
+ {
+ }
+
+RCbsUi::~RCbsUi()
+ {
+ }
+
+TInt RCbsUi::Connect()
+ {
+ return iServer.Connect();
+ }
+
+void RCbsUi::Close()
+ {
+ iServer.Close();
+ }
+
+TVersion RCbsUi::Version() const
+ {
+ return iServer.Version();
+ }
+
+// Settings-related methods
+void RCbsUi::GetReceptionStatus(
+ TBool& aStatus )
+ {
+ iServer.GetReceptionStatus( aStatus );
+ }
+
+TInt RCbsUi::SetReceptionStatus(
+ TBool aStatus )
+ {
+ return iServer.SetReceptionStatus( aStatus );
+ }
+
+void RCbsUi::GetTopicDetectionStatus(
+ TBool& aStatus )
+ {
+ iServer.GetTopicDetectionStatus( aStatus );
+ }
+
+TInt RCbsUi::SetTopicDetectionStatus(
+ TBool aStatus )
+ {
+ return iServer.SetTopicDetectionStatus(aStatus);
+ }
+
+void RCbsUi::GetLanguages(
+ TCbsSettingsLanguages& aLanguages )
+ {
+ iServer.GetLanguages(aLanguages);
+ }
+
+TInt RCbsUi::SetLanguages(
+ const TCbsSettingsLanguages& aLanguages )
+ {
+ return iServer.SetLanguages(aLanguages);
+ }
+
+void RCbsUi::NotifySettingsChanged(
+ TRequestStatus& aStatus,
+ TCbsSettingsEvent& aEvent )
+ {
+ iServer.NotifySettingsChanged( aStatus, aEvent );
+ }
+
+void RCbsUi::NotifySettingsChangedCancel()
+ {
+ iServer.NotifySettingsChangedCancel();
+ }
+
+// Topic Collection -related methods
+void RCbsUi::StartCollectionBrowsing()
+ {
+ iServer.StartCollectionBrowsing();
+ }
+
+TBool RCbsUi::HasNextCollectionTopic()
+ {
+ return iServer.HasNextCollectionTopic();
+ }
+
+TInt RCbsUi::NextCollectionTopic(
+ TCbsTopicInfo& aInfo )
+ {
+ return iServer.NextCollectionTopic(aInfo);
+ }
+
+// Topic List-related methods
+void RCbsUi::GetTopicCount(
+ TInt& aCount )
+ {
+ iServer.GetTopicCount(aCount);
+ }
+
+TInt RCbsUi::GetTopic(
+ const TInt aIndex,
+ TCbsTopic& aTopic )
+ {
+ return iServer.GetTopic(aIndex, aTopic);
+ }
+
+TInt RCbsUi::FindTopicByNumber(
+ TCbsTopicNumber aNumber,
+ TCbsTopic& aTopic )
+ {
+ return iServer.FindTopicByNumber( aNumber, aTopic );
+ }
+
+TInt RCbsUi::DeleteTopic(
+ TCbsTopicNumber aNumber )
+ {
+ return iServer.DeleteTopic(aNumber);
+ }
+
+TInt RCbsUi::DeleteAllTopics()
+ {
+ return iServer.DeleteAllTopics();
+ }
+
+TInt RCbsUi::AddTopic(
+ TCbsTopic& aTopic )
+ {
+ return iServer.AddTopic(aTopic);
+ }
+
+TInt RCbsUi::ChangeTopicNameAndNumber(
+ TCbsTopicNumber aOldNumber,
+ TCbsTopicNumber aNewNumber,
+ const TCbsTopicName& aName )
+ {
+ return iServer.ChangeTopicNameAndNumber(aOldNumber, aNewNumber, aName);
+ }
+
+TInt RCbsUi::ChangeTopicSubscriptionStatus(
+ TCbsTopicNumber aNumber,
+ TBool aNewStatus )
+ {
+ return iServer.ChangeTopicSubscriptionStatus( aNumber, aNewStatus );
+ }
+
+TInt RCbsUi::ChangeTopicHotmarkStatus(
+ TCbsTopicNumber aNumber,
+ TBool aNewStatus )
+ {
+ return iServer.ChangeTopicHotmarkStatus( aNumber, aNewStatus );
+ }
+
+void RCbsUi::NotifyOnTopicListEvent(
+ TRequestStatus& aStatus,
+ const TInt aRequested,
+ TCbsTopicListEvent& aEvent,
+ TCbsTopicNumber& aNumber )
+ {
+ iServer.NotifyOnTopicListEvent(aStatus, aRequested, aEvent, aNumber);
+ }
+
+void RCbsUi::NotifyOnTopicListEventCancel()
+ {
+ iServer.NotifyOnTopicListEventCancel();
+ }
+
+TInt RCbsUi::GetNewTopicsCount(
+ TInt& aCount )
+ {
+ return iServer.GetNewTopicsCount(aCount);
+ }
+
+TInt RCbsUi::GetLatestTopicNumber( TCbsTopicNumber& aNumber )
+ {
+ return iServer.GetLatestTopicNumber(aNumber);
+ }
+
+void RCbsUi::GetUnreadMessageCount(
+ TInt& aCount )
+ {
+ iServer.GetUnreadMessageCount(aCount);
+ }
+
+void RCbsUi::GetHotmarkedMessageHandle(
+ TCbsMessageHandle& aMessage )
+ {
+ iServer.GetHotmarkedMessageHandle(aMessage);
+ }
+
+TInt RCbsUi::NumberOfUnreadHotmarkedMessages()
+ {
+ return iServer.NumberOfUnreadHotmarkedMessages();
+ }
+
+TInt RCbsUi::GetNextAndPrevTopicNumber(
+ const TCbsTopicNumber& aCurrentTopicNumber,
+ TCbsTopicNumber& aPrevTopicNumber,
+ TCbsTopicNumber& aNextTopicNumber,
+ TInt& aPosition )
+ {
+ return iServer.GetNextAndPrevTopicNumber(
+ aCurrentTopicNumber, aPrevTopicNumber, aNextTopicNumber, aPosition);
+ }
+
+
+// Topic Messages-related methods
+TInt RCbsUi::GetMessageCount(
+ TCbsTopicNumber aNumber,
+ TInt& aCount )
+ {
+ return iServer.GetMessageCount(aNumber, aCount);
+ }
+
+TInt RCbsUi::GetMessage(
+ TCbsTopicNumber aNumber,
+ TInt aIndex,
+ TCbsMessage& aMessage )
+ {
+ return iServer.GetMessage(aNumber, aIndex, aMessage);
+ }
+
+TInt RCbsUi::FindMessageByHandle(
+ const TCbsMessageHandle& aHandle,
+ TCbsMessage& aMessage )
+ {
+ return iServer.FindMessageByHandle(aHandle, aMessage);
+ }
+
+TInt RCbsUi::GetMessageIndexByHandle(
+ const TCbsMessageHandle& aHandle, TInt& aIndex )
+ {
+ return iServer.GetMessageIndexByHandle(aHandle, aIndex);
+ }
+
+TInt RCbsUi::DeleteMessage(
+ const TCbsMessageHandle& aHandle )
+ {
+ return iServer.DeleteMessage(aHandle);
+ }
+
+TInt RCbsUi::SaveMessage(
+ const TCbsMessageHandle& aHandle )
+ {
+ return iServer.SaveMessage(aHandle);
+ }
+
+TInt RCbsUi::LockMessage(
+ const TCbsMessageHandle& aHandle )
+ {
+ return iServer.LockMessage(aHandle);
+ }
+
+TInt RCbsUi::ReadMessage(
+ const TCbsMessageHandle& aHandle )
+ {
+ return iServer.ReadMessage(aHandle);
+ }
+
+TInt RCbsUi::GetMessageContents(
+ const TCbsMessageHandle& aHandle,
+ TDes& aBuffer )
+ {
+ return iServer.GetMessageContents(aHandle, aBuffer);
+ }
+
+TInt RCbsUi::GetNextAndPrevMessageHandle(
+ const TCbsMessageHandle& aCurrentMsgHandle,
+ TCbsMessageHandle& aPrevMsgHandle,
+ TCbsMessageHandle& aNextMsgHandle,
+ TInt& aPosition )
+ {
+ return iServer.GetNextAndPrevMessageHandle(
+ aCurrentMsgHandle, aPrevMsgHandle, aNextMsgHandle, aPosition);
+ }
+
+TBool RCbsUi::Connected() const
+ {
+ return iServer.Connected();
+ }
+
+void RCbsUi::Shutdown() const
+ {
+ iServer.Shutdown();
+ }
+
+// End of File
--- a/cbs/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/cbs/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -17,7 +17,6 @@
#include "../CbsServer/Group/bld.inf"
-#include "../cbsui/Group/bld.inf"
// End of File
\ No newline at end of file
--- a/cellular/PsetNotesUi/Group/Psui.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Group/Psui.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -25,22 +25,22 @@
TARGETTYPE dll
UID 0x1000008d 0x100059C6
-SOURCEPATH ../Src
+SOURCEPATH ../Src
SOURCE PsuiBarringObs.cpp
-SOURCE PsuiWaitingObs.cpp
-SOURCE PsuiDivertObs.cpp
-SOURCE PsuiNoteMaster.cpp
-SOURCE PsuiResourceLoader.cpp
-SOURCE PsuiContainer.cpp
-SOURCE PsuiCliObserver.cpp
-SOURCE PsuiVariationProxy.cpp
+SOURCE PsuiWaitingObs.cpp
+SOURCE PsuiDivertObs.cpp
+SOURCE PsuiNoteMaster.cpp
+SOURCE PsuiResourceLoader.cpp
+SOURCE PsuiContainer.cpp
+SOURCE PsuiCliObserver.cpp
+SOURCE PsuiVariationProxy.cpp
#ifdef RD_PHONE_NG
-SOURCE PsuiQueryDialog.cpp
+SOURCE PsuiQueryDialog.cpp
#endif // RD_PHONE_NG
-SOURCE PsuiReqObserver.cpp
-SOURCE PsuiNoteController.cpp
+SOURCE PsuiReqObserver.cpp
+SOURCE PsuiNoteController.cpp
-START RESOURCE ../Data/Psui.rss
+START RESOURCE ../data/Psui.rss
HEADER
TARGETPATH RESOURCE_FILES_DIR
// Language definition
@@ -50,7 +50,7 @@
SYSTEMINCLUDE ../../../inc
-USERINCLUDE . ../Inc
+USERINCLUDE . ../Inc
MW_LAYER_SYSTEMINCLUDE
LIBRARY bafl.lib
@@ -61,10 +61,10 @@
LIBRARY avkon.lib
LIBRARY commonengine.lib
LIBRARY etelmm.lib
-LIBRARY featmgr.lib
+LIBRARY featmgr.lib
LIBRARY numbergrouping.lib
LIBRARY servicerequest.lib
-LIBRARY centralrepository.lib
+LIBRARY centralrepository.lib
#ifdef RD_PHONE_NG
LIBRARY eikdlg.lib
LIBRARY eikcore.lib
--- a/cellular/PsetNotesUi/Group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -25,12 +25,12 @@
../Group/Psui.mmp
PRJ_EXPORTS
-../Inc/PsuiResourceLoader.h |../../../inc/psuiresourceloader.h
-../Data/psui_stub.SIS /epoc32/data/z/system/install/psui_stub.sis
+../inc/PsuiResourceLoader.h |../../../inc/PsuiResourceLoader.h
+../data/psui_stub.SIS /epoc32/data/z/system/install/psui_stub.SIS
// IBY Files
-../Rom/Psui.iby CORE_APP_LAYER_IBY_EXPORT_PATH(Psui.iby)
-../Rom/PsuiResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(PsuiResources.iby)
+../rom/Psui.iby CORE_APP_LAYER_IBY_EXPORT_PATH(Psui.iby)
+../rom/PsuiResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(PsuiResources.iby)
// LOC files
../loc/psui.loc MW_LAYER_LOC_EXPORT_PATH(psui.loc)
--- a/cellular/PsetNotesUi/Inc/PsuiNoteController.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Inc/PsuiNoteController.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <coemain.h>
-#include "PsuiNoteMaster.h"
+#include "PsuiNoteMaster.h"
// CLASS DECLARATION
--- a/cellular/PsetNotesUi/Inc/PsuiNoteMaster.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Inc/PsuiNoteMaster.h Fri Mar 19 09:40:14 2010 +0200
@@ -25,9 +25,9 @@
// INCLUDES
#include <aknnotewrappers.h>
#include <bldvariant.hrh>
-#include "PsuiConstants.h"
-#include "PsuiInternalConstants.h"
-#include "PsetCallDiverting.h"
+#include "psuiconstants.h"
+#include "PsuiInternalConstants.h"
+#include "psetcalldiverting.h"
// FORWARD DECLARATIONS
class MPsetCallWaiting;
@@ -176,7 +176,7 @@
private: //new
- void AppendCFNumber( TDes& aString, const TDesC& aNumber);
+ void AppendCFNumber( TDes& aString, const TDesC& aNumber);
void CreateListBoxL(
TCFType aCFType, CAknSinglePopupMenuStyleListBox* aList );
--- a/cellular/PsetNotesUi/Inc/PsuiQueryDialog.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Inc/PsuiQueryDialog.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
#define CPSUIQUERYDIALOG_H
// INCLUDES
-#include <AknQueryDialog.h>
+#include <AknQueryDialog.h>
NONSHARABLE_CLASS ( CPsuiQueryDialog ) : public CAknQueryDialog
{
--- a/cellular/PsetNotesUi/Inc/PsuiReqObserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Inc/PsuiReqObserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <mservicerequestobserver.h>
-#include "PsuiNoteMaster.h"
+#include "PsuiNoteMaster.h"
// FORWARD DECLARATIONS
--- a/cellular/PsetNotesUi/Inc/PsuiVariationProxy.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Inc/PsuiVariationProxy.h Fri Mar 19 09:40:14 2010 +0200
@@ -12,9 +12,9 @@
* Contributors:
*
* Description:
-* CPsuiVariationProxy class is proxy class for
-* central repository variation
-* (Call waiting/distinguish between not provisioned and not activated).
+* CPsuiVariationProxy class is proxy class for
+* central repository variation
+* (Call waiting/distinguish between not provisioned and not activated).
*
*
*/
@@ -42,39 +42,39 @@
{
public: //constructor & destructor
- /* Symbian OS 2-phase Constructor. */
- static CPSuiVariationProxy* NewL();
-
- /* Destructor */
- ~CPSuiVariationProxy();
-
+ /* Symbian OS 2-phase Constructor. */
+ static CPSuiVariationProxy* NewL();
+
+ /* Destructor */
+ ~CPSuiVariationProxy();
+
public:
- /**
+ /**
* Check from member variable 'iFeatures' is the requested feature active.
- *
- * @param aFeature is uid for used central repository variable.
- * @return returns TBool type ETrue/EFalse is current feature enabled or not
- */
-
- TBool FeatureEnabled( TUint aFeature ) const;
+ *
+ * @param aFeature is uid for used central repository variable.
+ * @return returns TBool type ETrue/EFalse is current feature enabled or not
+ */
+
+ TBool FeatureEnabled( TUint aFeature ) const;
private:
-
- /**
+
+ /**
* Constructor
- *
- * Open CenRep, read data into 'iFeatures' and close CenRep
- *
- */
- void ConstructL();
-
+ *
+ * Open CenRep, read data into 'iFeatures' and close CenRep
+ *
+ */
+ void ConstructL();
+
private:
- /* Default constructor */
- CPSuiVariationProxy();
+ /* Default constructor */
+ CPSuiVariationProxy();
private:
- // Saves cen rep data. Readed in ConstructL()
- TInt iFeatures;
-
+ // Saves cen rep data. Readed in ConstructL()
+ TInt iFeatures;
+
};
#endif
--- a/cellular/PsetNotesUi/Src/PsuiBarringObs.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Src/PsuiBarringObs.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,13 +17,13 @@
// INCLUDE FILES
-#include <Psui.rsg>
-#include <PsuiContainer.h>
+#include <psui.rsg>
+#include <psuicontainer.h>
#include <exterror.h>
#include <etelsat.h>
#include "PsuiInternalConstants.h"
-#include "PsuiNoteController.h"
+#include "PsuiNoteController.h"
// MEMBER FUNCTIONS
// ---------------------------------------------------------------------------
--- a/cellular/PsetNotesUi/Src/PsuiCliObserver.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Src/PsuiCliObserver.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,13 +17,13 @@
// INCLUDE FILES
-#include <Psui.rsg>
+#include <psui.rsg>
#include <featmgr.h>
#include <etelsat.h>
-#include "PsuiCliObserver.h"
-#include "PsuiContainer.h"
-#include "PsuiNoteController.h"
+#include "psuicliobserver.h"
+#include "psuicontainer.h"
+#include "PsuiNoteController.h"
// MEMBER FUNCTIONS
--- a/cellular/PsetNotesUi/Src/PsuiContainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Src/PsuiContainer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,7 +17,7 @@
//INCLUDES
-#include <PsuiContainer.h>
+#include <psuicontainer.h>
#include "PsuiResourceLoader.h"
--- a/cellular/PsetNotesUi/Src/PsuiDivertObs.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Src/PsuiDivertObs.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,13 +17,13 @@
// INCLUDE FILES
-#include <Psui.rsg>
+#include <psui.rsg>
#include <mmlist.h>
#include <featmgr.h>
-#include <PsuiContainer.h>
+#include <psuicontainer.h>
#include <etelsat.h>
-#include "PsuiNoteController.h"
+#include "PsuiNoteController.h"
// ---------------------------------------------------------------------------
--- a/cellular/PsetNotesUi/Src/PsuiNoteController.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Src/PsuiNoteController.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,8 +17,8 @@
// INCLUDE FILES
-#include "PsuiNoteController.h"
-#include "PsuiInternalConstants.h"
+#include "PsuiNoteController.h"
+#include "PsuiInternalConstants.h"
// ================= MEMBER FUNCTIONS =======================
@@ -74,7 +74,7 @@
//
void CPsuiNoteController::ShowNoteL( TPsuiNoteTypes aType, TInt aResourceID )
{
- iNote->ShowNoteL( aType, aResourceID );
+ iNote->ShowNoteL( aType, aResourceID );
}
// ---------------------------------------------------------
@@ -83,7 +83,7 @@
//
void CPsuiNoteController::ShowBscListL( TInt aResourceHeading, TUint8 aBsc[KPSUIMaxBscNumber] )
{
- iNote->ShowBscListL( aResourceHeading, aBsc );
+ iNote->ShowBscListL( aResourceHeading, aBsc );
}
// ---------------------------------------------------------
@@ -92,7 +92,7 @@
//
TInt CPsuiNoteController::SetErrorNoteResourceID ( const TInt aErrorCode )
{
- return iNote->SetErrorNoteResourceID( aErrorCode );
+ return iNote->SetErrorNoteResourceID( aErrorCode );
}
// ---------------------------------------------------------
@@ -101,9 +101,9 @@
//
void CPsuiNoteController::RemoveNotesL()
{
- delete iNote;
- iNote = NULL;
- iNote = CPsuiNoteMaster::NewL();
+ delete iNote;
+ iNote = NULL;
+ iNote = CPsuiNoteMaster::NewL();
}
// ---------------------------------------------------------
@@ -112,7 +112,7 @@
//
void CPsuiNoteController::KillStaticNoteL()
{
- iNote->KillStaticNoteL();
+ iNote->KillStaticNoteL();
}
// ---------------------------------------------------------
@@ -124,7 +124,7 @@
MPsetCli* aCliEngine )
{
iNote->SetEngineContacts( aWaitingEngine, aBarringEngine,
- aDivertEngine, aCliEngine );
+ aDivertEngine, aCliEngine );
}
// ---------------------------------------------------------
@@ -135,7 +135,7 @@
CMobilePhoneCFList& aList, TCFType aCFType, TInt& aIndex )
{
return iNote->ShowBscCFListL( aResourceHeading, aList,
- aCFType, aIndex );
+ aCFType, aIndex );
}
// ---------------------------------------------------------
@@ -145,7 +145,7 @@
void CPsuiNoteController::ShowCfInfoL( TCFType& aCFType,
const RMobilePhone::TMobilePhoneCFInfoEntryV1& aSetting )
{
- iNote->ShowCfInfoL( aCFType, aSetting );
+ iNote->ShowCfInfoL( aCFType, aSetting );
}
// End of File
--- a/cellular/PsetNotesUi/Src/PsuiNoteMaster.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Src/PsuiNoteMaster.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,26 +17,26 @@
// INCLUDE FILES
-#include <Psui.rsg>
+#include <psui.rsg>
#include <aknlists.h>
-#include <PsuiContainer.h>
-#include <StringLoader.h>
+#include <psuicontainer.h>
+#include <StringLoader.h>
#include <exterror.h>
#include <gsmerror.h>
#include <mmlist.h>
#include <featmgr.h>
-#include <NumberGrouping.h>
+#include <NumberGrouping.h>
#include <cservicerequest.h>
#include <e32property.h>
-#include <BTSapDomainPSKeys.h>
+#include <BTSapDomainPSKeys.h>
#include "PsuiInternalConstants.h"
-#include "PsuiNoteMaster.h"
-#include "PsuiReqObserver.h"
-#include "PsuiQueryDialog.h"
+#include "PsuiNoteMaster.h"
+#include "PsuiReqObserver.h"
+#include "PsuiQueryDialog.h"
#include <centralrepository.h>
-#include <NumberGroupingCRKeys.h>
+#include <NumberGroupingCRKeys.h>
// MACROS
#ifdef _DEBUG
@@ -130,11 +130,11 @@
{
if ( aResourceID < 0 )
{
- if ( aType == EPsuiWaitingNote )
- {
- iRequesting = ETrue;
- iServiceRequest->StartL( KNullDesC );
- }
+ if ( aType == EPsuiWaitingNote )
+ {
+ iRequesting = ETrue;
+ iServiceRequest->StartL( KNullDesC );
+ }
return;
}
@@ -295,7 +295,7 @@
}
// Get base text and set phone number into it.
- // Note that two characters are reserved for LRM markers.
+ // Note that two characters are reserved for LRM markers.
TBuf<KPSUIDetailsText+2> string;
StringLoader::Load( string, R_TO_NUMBER );
string.Append( KPSUIListDivider );
@@ -305,14 +305,14 @@
CRepository* repository = CRepository::NewL( KCRUidNumberGrouping );
pngErr = repository->Get( KNumberGrouping, pngSupported );
delete repository;
-
+
if ( KErrNone == pngErr && pngSupported != 0 )
{
CPNGNumberGrouping* numberGrouping =
CPNGNumberGrouping::NewL( KPSUIMaxPSUIItemLength );
CleanupStack::PushL( numberGrouping );
- //Check that number fits (with or w/o number formatting).
+ //Check that number fits (with or w/o number formatting).
if ( (aSetting.iNumber.iTelNumber.Length() + 2) <= numberGrouping->MaxDisplayLength() )
{
numberGrouping->Set( aSetting.iNumber.iTelNumber );
@@ -354,10 +354,10 @@
iQuery = CPsuiQueryDialog::NewL( CAknQueryDialog::ENoTone );
TInt command( iQuery->ExecuteLD( R_CONFIRMATION_QUERY, string ) );
if( command == EKeyNo )
- {
- // End -key was pressed so don't relaunch previous query
- aCFType = EPsuiNoCF;
- }
+ {
+ // End -key was pressed so don't relaunch previous query
+ aCFType = EPsuiNoCF;
+ }
iQuery = NULL;
}
@@ -570,11 +570,11 @@
// CPsuiNoteMaster::AppendCFNumber
// ---------------------------------------------------------------------------
void CPsuiNoteMaster::AppendCFNumber( TDes& aString, const TDesC& aNumber )
- {
- aString.Append( KLRMarker );
- aString.Append( aNumber );
- aString.Append( KLRMarker );
- }
+ {
+ aString.Append( KLRMarker );
+ aString.Append( aNumber );
+ aString.Append( KLRMarker );
+ }
// ---------------------------------------------------------------------------
// CPsuiNoteMaster::SetBsGroupLC
// ---------------------------------------------------------------------------
@@ -587,7 +587,7 @@
string = StringLoader::LoadLC( R_BS_ALPHA_0 );
break;
case 10:
- string = StringLoader::LoadLC( R_BS_ALPHA_10 );
+ string = StringLoader::LoadLC( R_BS_ALPHA_10 );
break;
case 11:
string = StringLoader::LoadLC( R_BS_ALPHA_11 );
--- a/cellular/PsetNotesUi/Src/PsuiQueryDialog.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Src/PsuiQueryDialog.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,7 +17,7 @@
// INCLUDE FILES
-#include "PsuiQueryDialog.h"
+#include "PsuiQueryDialog.h"
// ================= MEMBER FUNCTIONS =======================
@@ -25,7 +25,7 @@
// might leave.
//
CPsuiQueryDialog::CPsuiQueryDialog( CAknQueryDialog::TTone aTone ) :
- CAknQueryDialog( aTone )
+ CAknQueryDialog( aTone )
{
}
@@ -53,14 +53,14 @@
TKeyResponse CPsuiQueryDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent,
TEventCode aType )
{
- if ( ( aKeyEvent.iScanCode == EStdKeyNo || aKeyEvent.iCode == EKeyNo ) &&
- aType == EEventKeyUp )
- {
- // End -key was pressed, so exit this query dialog
- TryExitL( EKeyNo );
- }
+ if ( ( aKeyEvent.iScanCode == EStdKeyNo || aKeyEvent.iCode == EKeyNo ) &&
+ aType == EEventKeyUp )
+ {
+ // End -key was pressed, so exit this query dialog
+ TryExitL( EKeyNo );
+ }
- return EKeyWasNotConsumed;
+ return EKeyWasNotConsumed;
}
// ---------------------------------------------------------------------------
@@ -69,7 +69,7 @@
//
TBool CPsuiQueryDialog::OkToExitL( TInt /*aCommand*/ )
{
- // Dismiss query
+ // Dismiss query
return ETrue;
}
--- a/cellular/PsetNotesUi/Src/PsuiReqObserver.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Src/PsuiReqObserver.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include <PsuiContainer.h>
+#include <psuicontainer.h>
-#include "PsuiReqObserver.h"
+#include "PsuiReqObserver.h"
// MACROS
--- a/cellular/PsetNotesUi/Src/PsuiResourceLoader.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Src/PsuiResourceLoader.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDE FILES
#include <coemain.h>
-#include <ConeResLoader.h>
+#include <ConeResLoader.h>
-#include "PsuiResourceLoader.h"
+#include "PsuiResourceLoader.h"
// CONSTANTS
_LIT( KPsuiResourceFileNameAndPath, "Z:\\resource\\Psui.rsc" );
--- a/cellular/PsetNotesUi/Src/PsuiVariationProxy.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Src/PsuiVariationProxy.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,40 +17,40 @@
*/
-#include "PsuiVariationProxy.h"
+#include "PsuiVariationProxy.h"
#include <centralrepository.h>
-#include <settingsinternalcrkeys.h>
+#include <settingsinternalcrkeys.h>
CPSuiVariationProxy::CPSuiVariationProxy()
- {
- }
-
+ {
+ }
+
CPSuiVariationProxy::~CPSuiVariationProxy()
- {
- }
-
+ {
+ }
+
CPSuiVariationProxy* CPSuiVariationProxy::NewL()
- {
- CPSuiVariationProxy* self = new ( ELeave ) CPSuiVariationProxy();
+ {
+ CPSuiVariationProxy* self = new ( ELeave ) CPSuiVariationProxy();
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
return self;
- }
-
+ }
+
void CPSuiVariationProxy::ConstructL()
- {
- TInt setting = 0;
- CRepository* centralRepository = CRepository::NewLC( KCRUidPhoneSettings );
- centralRepository->Get( KPSetCallWaiting, setting );
- if( setting )
- {
- iFeatures |= KCallWaitingDistiquishNotProvisioned;
- }
- CleanupStack::PopAndDestroy( centralRepository );
- }
-
+ {
+ TInt setting = 0;
+ CRepository* centralRepository = CRepository::NewLC( KCRUidPhoneSettings );
+ centralRepository->Get( KPSetCallWaiting, setting );
+ if( setting )
+ {
+ iFeatures |= KCallWaitingDistiquishNotProvisioned;
+ }
+ CleanupStack::PopAndDestroy( centralRepository );
+ }
+
TBool CPSuiVariationProxy::FeatureEnabled( TUint aFeature ) const
- {
- return aFeature&iFeatures;
- }
+ {
+ return aFeature&iFeatures;
+ }
--- a/cellular/PsetNotesUi/Src/PsuiWaitingObs.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/PsetNotesUi/Src/PsuiWaitingObs.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,13 +17,13 @@
// INCLUDE FILES
-#include <Psui.rsg>
-#include <PsuiContainer.h>
+#include <psui.rsg>
+#include <psuicontainer.h>
#include <etelsat.h>
-#include "PsuiInternalConstants.h"
-#include "PsuiNoteController.h"
-#include "PsuiVariationProxy.h"
+#include "PsuiInternalConstants.h"
+#include "PsuiNoteController.h"
+#include "PsuiVariationProxy.h"
// MEMBER FUNCTIONS
// ---------------------------------------------------------------------------
@@ -110,7 +110,7 @@
TUint8 aBsc[KPSUIMaxBscNumber] )
{
- if ( iCallWaitingDistinguishEnabled && aStatus == MPsetCallWaiting::EStatusNotProvisioned )
+ if ( iCallWaitingDistinguishEnabled && aStatus == MPsetCallWaiting::EStatusNotProvisioned )
{
CPsuiNoteController::InstanceL()->ShowNoteL(
EPsuiConfirmationNote, R_CW_NOT_PROVISIONED_NOTE );
@@ -123,30 +123,30 @@
else
{
if( iCallWaitingDistinguishEnabled )
- {
-
- //show only "CW active" even if the bsc list is present.
- //This change is to fix the error ENYI-6DYFKZ
- CPsuiNoteController::InstanceL()->ShowNoteL( EPsuiConfirmationNote,
+ {
+
+ //show only "CW active" even if the bsc list is present.
+ //This change is to fix the error ENYI-6DYFKZ
+ CPsuiNoteController::InstanceL()->ShowNoteL( EPsuiConfirmationNote,
R_CW_ACTIVE_NO_BSC_NOTE );
- }
+ }
else
- {
-
- //if no bsc-list present, show only "CW active"
- if ( aBsc[0] == KPSUINoBscGroup )
- {
- CPsuiNoteController::InstanceL()->ShowNoteL( EPsuiConfirmationNote,
+ {
+
+ //if no bsc-list present, show only "CW active"
+ if ( aBsc[0] == KPSUINoBscGroup )
+ {
+ CPsuiNoteController::InstanceL()->ShowNoteL( EPsuiConfirmationNote,
R_CW_ACTIVE_NO_BSC_NOTE );
- }
- else
- {
+ }
+ else
+ {
- CPsuiNoteController::InstanceL()->ShowBscListL(
+ CPsuiNoteController::InstanceL()->ShowBscListL(
R_CW_STATUS_HEADING,
aBsc );
- }
- }
+ }
+ }
}
}
--- a/cellular/SSSettings/Logger/SSSettingsLogger.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/Logger/SSSettingsLogger.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
#ifndef SSSETTINGSLOGGER_H
#define SSSETTINGSLOGGER_H
-#include "SSSettingsLoggingConf.h"
+#include "SSSettingsLoggingConf.h"
#include <e32std.h>
#include <flogger.h>
#include <e32svr.h>
--- a/cellular/SSSettings/group/SSSettings.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/group/SSSettings.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -16,37 +16,37 @@
*/
#include <platform_paths.hrh>
-#include "../Logger/SSSettingsLoggingConf.h"
+#include "../logger/SSSettingsLoggingConf.h"
TARGET sssettings.dll
TARGETTYPE dll
UID 0x1000008d 0x10005A01
-VENDORID VID_DEFAULT
+VENDORID VID_DEFAULT
// Capability assignment.
CAPABILITY CAP_GENERAL_DLL
sourcepath ../src
-SOURCE RSSSettings.cpp
-SOURCE CSSSettingsNotifier.cpp
-SOURCE CSSSettingsAlsNotifier.cpp
-SOURCE RCustomerServiceProfileCache.cpp
-SOURCE CSSSettingsRefreshContainer.cpp
-SOURCE CSSSettingsRefreshHandler.cpp
-SOURCE CSSSettingsActiveObject.cpp
+SOURCE RSSSettings.cpp
+SOURCE CSSSettingsNotifier.cpp
+SOURCE CSSSettingsAlsNotifier.cpp
+SOURCE RCustomerServiceProfileCache.cpp
+SOURCE CSSSettingsRefreshContainer.cpp
+SOURCE CSSSettingsRefreshHandler.cpp
+SOURCE CSSSettingsActiveObject.cpp
USERINCLUDE ../inc
-USERINCLUDE ../Logger
+USERINCLUDE ../Logger
SYSTEMINCLUDE ../inc
MW_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE ../../../inc
+SYSTEMINCLUDE ../../../inc
LIBRARY euser.lib
-LIBRARY etel.lib // ETel connection
-LIBRARY customapi.lib // Custom ETel API
+LIBRARY etel.lib // etel connection
+LIBRARY customapi.lib // custom etel api
LIBRARY etelmm.lib
LIBRARY featmgr.lib
LIBRARY satclient.lib
--- a/cellular/SSSettings/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -23,10 +23,10 @@
PRJ_EXPORTS
-../inc/CSSSettingsRefreshContainer.h |../../../inc/csssettingsrefreshcontainer.h
-../inc/MSSSettingsRefreshHandler.h |../../../inc/msssettingsrefreshhandler.h
+../inc/CSSSettingsRefreshContainer.h |../../../inc/CSSSettingsRefreshContainer.h
+../inc/MSSSettingsRefreshHandler.h |../../../inc/MSSSettingsRefreshHandler.h
-../group/SSSettings_stub.SIS /epoc32/data/z/system/install/sssettings_stub.sis
+../group/SSSettings_stub.SIS /epoc32/data/z/system/install/SSSettings_stub.SIS
// IBY files
../rom/SSSettings.iby CORE_APP_LAYER_IBY_EXPORT_PATH(SSSettings.iby)
--- a/cellular/SSSettings/inc/CSSSettingsAlsNotifier.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/inc/CSSSettingsAlsNotifier.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,8 +23,8 @@
#include <etelmm.h>
#include <cenrepnotifyhandler.h>
-#include "RSSSettings.h"
-#include "CSSSettingsActiveObject.h"
+#include "rsssettings.h"
+#include "CSSSettingsActiveObject.h"
// FORWARD DECLARATIONS
class RMmCustomAPI;
--- a/cellular/SSSettings/inc/CSSSettingsNotifier.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/inc/CSSSettingsNotifier.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,8 +22,8 @@
// INCLUDES
#include <cenrepnotifyhandler.h>
-#include "RSSSettings.h"
-#include "CSSSettingsActiveObject.h"
+#include "rsssettings.h"
+#include "CSSSettingsActiveObject.h"
// FORWARD DECLARATIONS
class CSSSettingsAlsNotifier;
--- a/cellular/SSSettings/inc/CSSSettingsRefreshContainer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/inc/CSSSettingsRefreshContainer.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
-#include <MSSSettingsRefreshHandler.h>
+#include <MSSSettingsRefreshHandler.h>
// FORWARD DECLARATIONS
--- a/cellular/SSSettings/inc/CSSSettingsRefreshHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/inc/CSSSettingsRefreshHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,15 +22,15 @@
// INCLUDES
-#include <MSSSettingsRefreshHandler.h>
+#include <MSSSettingsRefreshHandler.h>
#include <msatrefreshobserver.h>
-#include <MSSSettingsRefreshObserver.h>
-#include <RSSSettings.h>
-#include <RCustomerServiceProfileCache.h>
-#include <RSatRefresh.h>
-#include <RSatSession.h>
+#include <msssettingsrefreshobserver.h>
+#include <rsssettings.h>
+#include <rcustomerserviceprofilecache.h>
+#include <RSatRefresh.h>
+#include <RSatSession.h>
#include <cenrepnotifyhandler.h>
-#include "CSSSettingsActiveObject.h"
+#include "CSSSettingsActiveObject.h"
// DATA TYPES
@@ -78,16 +78,16 @@
/**
* @see MSSSettingsRefreshHandler::NotifyFileChangeL.
- */
- void NotifyFileChangeL(
+ */
+ void NotifyFileChangeL(
MSSSettingsRefreshObserver& aObserver,
TSatElementaryFiles aObservedFiles,
TSatRefreshType aObservedRefreshType );
- /**
+ /**
* @see MSSSettingsRefreshHandler::CancelNotify.
- */
- void CancelNotify();
+ */
+ void CancelNotify();
/**
* @see MSSSettingsRefreshHandler::ChangedCspTable.
@@ -99,17 +99,17 @@
public: // Functions from base classes
- /**
+ /**
* @see MSatRefreshObserver::AllowRefresh
*/
TBool AllowRefresh(
TSatRefreshType aType,
const TSatRefreshFiles& aFiles );
- /**
+ /**
* @see MSatRefreshObserver::Refresh
*/
- void Refresh(
+ void Refresh(
TSatRefreshType aType,
const TSatRefreshFiles& aFiles );
--- a/cellular/SSSettings/inc/MSSSettingsRefreshHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/inc/MSSSettingsRefreshHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
-#include <MSSSettingsRefreshObserver.h>
+#include <msssettingsrefreshobserver.h>
#include <msatrefreshobserver.h>
@@ -43,25 +43,25 @@
public: // New functions
/**
- * Start the waiting for refresh events.
+ * Start the waiting for refresh events.
*
* @param aObserver The observer to handle refresh events.
* @param aObservedFile The file change to be observed.
* @param aObservedRefreshType The refresh type(s) to be observed.
- */
- virtual void NotifyFileChangeL(
+ */
+ virtual void NotifyFileChangeL(
MSSSettingsRefreshObserver& aObserver,
TSatElementaryFiles aObservedFile,
TSatRefreshType aObservedRefreshType ) = 0;
- /**
- * Cancel the notification started in NotifyFileChangeL.
+ /**
+ * Cancel the notification started in NotifyFileChangeL.
*
* @param aObserver The observer whose notify to be canceled.
* @param aObservedFile The file change to be canceled.
* @param aObservedRefreshType The refresh type to be canceled.
- */
- virtual void CancelNotify() = 0;
+ */
+ virtual void CancelNotify() = 0;
/**
* Get the changed CSP information after Refresh.
--- a/cellular/SSSettings/src/CSSSettingsActiveObject.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/src/CSSSettingsActiveObject.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,7 +17,7 @@
// INCLUDE FILES
-#include "CSSSettingsActiveObject.h"
+#include "CSSSettingsActiveObject.h"
#include <e32property.h>
--- a/cellular/SSSettings/src/CSSSettingsAlsNotifier.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/src/CSSSettingsAlsNotifier.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,14 +20,14 @@
// INCLUDE FILES
#include <rmmcustomapi.h>
#include <startupdomainpskeys.h>
-#include <centralrepository.h>
-#include <SSSettingsPrivatePSKeys.h> // SSSettings Pub&Sub keys.
-#include <SSSettingsPrivateCRKeys.h> // SSSettings CentRep keys.
-#include <PSVariables.h>
+#include <centralrepository.h>
+#include <SSSettingsPrivatePSKeys.h> // sssettings pub&sub keys.
+#include <SSSettingsPrivateCRKeys.h> // sssettings centrep keys.
+#include <PSVariables.h>
-#include "CSSSettingsAlsNotifier.h"
-#include "CSSSettingsActiveObject.h"
-#include "SSSettingsLogger.h"
+#include "CSSSettingsAlsNotifier.h"
+#include "CSSSettingsActiveObject.h"
+#include "SSSettingsLogger.h"
// ================= MEMBER FUNCTIONS =======================
// -----------------------------------------------------------------------------
@@ -488,7 +488,7 @@
if ( error == KErrNone )
{
// Make sure that SIM state is OK otherwise parameters coming from SIM are mess.
- if ( simState ==ESimUsable )
+ if ( simState ==ESimUsable )
{
// Get Als support from Product Profile.
error = CheckAlsSupportInProductProfile( iPPSupportAls );
@@ -514,30 +514,30 @@
// Open connection RCustomerServiceProfileCache.
RCustomerServiceProfileCache alsProfileCache;
- error = alsProfileCache.Open();
- if ( error != KErrNone )
- {
- return error;
- }
-
+ error = alsProfileCache.Open();
+ if ( error != KErrNone )
+ {
+ return error;
+ }
+
// Get ALS CSP bit from cache.
- iAlsCSPError = alsProfileCache.CspCPHSTeleservices( params );
-
- if ( iAlsCSPError == KErrNone || iAlsCSPError == KErrNotSupported )
- {
- // Checks CSP ALS support.
- iAlsCSPSupport = CheckIfAlsCSPSupported( params );
- }
- // If ETEL/TSY responses with error KErrNotReady/KErrServerBusy then CSP value is not correct one
- // and iAlsStatusChecked is set to EFalse.
- else if ( iAlsCSPError == KErrNotReady || iAlsCSPError == KErrServerBusy )
- {
- iAlsStatusChecked = EFalse;
- alsProfileCache.Close();
- return iAlsCSPError;
- }
- // Close connection RCustomerServiceProfileCache.
- alsProfileCache.Close();
+ iAlsCSPError = alsProfileCache.CspCPHSTeleservices( params );
+
+ if ( iAlsCSPError == KErrNone || iAlsCSPError == KErrNotSupported )
+ {
+ // Checks CSP ALS support.
+ iAlsCSPSupport = CheckIfAlsCSPSupported( params );
+ }
+ // If ETEL/TSY responses with error KErrNotReady/KErrServerBusy then CSP value is not correct one
+ // and iAlsStatusChecked is set to EFalse.
+ else if ( iAlsCSPError == KErrNotReady || iAlsCSPError == KErrServerBusy )
+ {
+ iAlsStatusChecked = EFalse;
+ alsProfileCache.Close();
+ return iAlsCSPError;
+ }
+ // Close connection RCustomerServiceProfileCache.
+ alsProfileCache.Close();
// Save PP and SIM als values to P&S.
if ( savePPSimAls )
@@ -577,11 +577,11 @@
TBool CSSSettingsAlsNotifier::CheckIfAlsCSPSupported(
const RMobilePhone::TCspCPHSTeleservices aContainer ) const
{
- TBool supported(EFalse);
+ TBool supported(EFalse);
if ( ( aContainer & RMobilePhone::KCspALS ) != 0 )
- {
- supported = ETrue;
+ {
+ supported = ETrue;
}
return supported;
}
@@ -664,9 +664,9 @@
if ( error == KErrNone )
{
error = RProperty::Set(
- KPSUidSSConfig,
- KSettingsPPSupportsALS,
- iPPSupportAls );
+ KPSUidSSConfig,
+ KSettingsPPSupportsALS,
+ iPPSupportAls );
}
if ( error != KErrNone )
--- a/cellular/SSSettings/src/CSSSettingsNotifier.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/src/CSSSettingsNotifier.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,12 +19,12 @@
// INCLUDE FILES
#include <rmmcustomapi.h>
#include <centralrepository.h>
-#include <SSSettingsPrivateCRKeys.h>
+#include <SSSettingsPrivateCRKeys.h>
-#include "CSSSettingsNotifier.h"
-#include "MSSSettingsObserver.h"
-#include "CSSSettingsAlsNotifier.h"
-#include "SSSettingsLogger.h"
+#include "CSSSettingsNotifier.h"
+#include "msssettingsobserver.h"
+#include "CSSSettingsAlsNotifier.h"
+#include "SSSettingsLogger.h"
// DATA TYPES
@@ -111,10 +111,10 @@
CSSSettingsNotifier::~CSSSettingsNotifier()
{
Cancel();
- if( iCenRepAlsNotifyHandler )
- {
+ if( iCenRepAlsNotifyHandler )
+ {
iCenRepAlsNotifyHandler->StopListening();
- }
+ }
if( iCenRepClirNotifyHandler )
{
--- a/cellular/SSSettings/src/CSSSettingsRefreshContainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/src/CSSSettingsRefreshContainer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include <CSSSettingsRefreshContainer.h>
-#include "CSSSettingsRefreshHandler.h"
+#include <CSSSettingsRefreshContainer.h>
+#include "CSSSettingsRefreshHandler.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/cellular/SSSettings/src/CSSSettingsRefreshHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/src/CSSSettingsRefreshHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,13 +19,13 @@
// INCLUDE FILES
#include <centralrepository.h>
-#include <RSatRefresh.h>
-#include <BTSapDomainPSKeys.h> // BT SAP Central Repository key.
+#include <RSatRefresh.h>
+#include <BTSapDomainPSKeys.h> // bt sap central repository key.
#include <featmgr.h>
-#include "CSSSettingsRefreshHandler.h"
-#include "SSSettingsLogger.h"
-#include "CSSSettingsActiveObject.h"
+#include "CSSSettingsRefreshHandler.h"
+#include "SSSettingsLogger.h"
+#include "CSSSettingsActiveObject.h"
// ============================= LOCAL FUNCTIONS ===============================
@@ -266,17 +266,17 @@
( TSatElementaryFiles ) changedFiles );
if ( aFiles.Locate( KCsp1Ef ) != KErrNotFound )
- {
- iRSatRefresh->RefreshEFRead( ETrue );
- }
- else if( aFiles.Locate( KCsp2Ef ) != KErrNotFound )
- {
- iRSatRefresh->RefreshEFRead( ETrue );
- }
- else
- {
- iRSatRefresh->RefreshEFRead( EFalse );
- }
+ {
+ iRSatRefresh->RefreshEFRead( ETrue );
+ }
+ else if( aFiles.Locate( KCsp2Ef ) != KErrNotFound )
+ {
+ iRSatRefresh->RefreshEFRead( ETrue );
+ }
+ else
+ {
+ iRSatRefresh->RefreshEFRead( EFalse );
+ }
}
else // ESSSettingsAllowRefresh
{
@@ -291,20 +291,20 @@
// check if some CSP file is into the list and send right response
// since itself reads CSP files.
if ( !changedFiles )
- {
- if ( aFiles.Locate( KCsp1Ef ) != KErrNotFound )
+ {
+ if ( aFiles.Locate( KCsp1Ef ) != KErrNotFound )
{
iRSatRefresh->RefreshEFRead( EFalse );
}
else if( aFiles.Locate( KCsp2Ef ) != KErrNotFound )
- {
- iRSatRefresh->RefreshEFRead( EFalse );
- }
+ {
+ iRSatRefresh->RefreshEFRead( EFalse );
+ }
else
- {
- iRSatRefresh->RefreshEFRead( ETrue );
- }
- }
+ {
+ iRSatRefresh->RefreshEFRead( ETrue );
+ }
+ }
__SSSLOGSTRING1("[SSS] DoHandleRefresh: changedFiles: %d", changedFiles);
}
else
@@ -314,23 +314,23 @@
}
if ( !iNotifyInfo->iObserver && ( aType == EFileChangeNotification
- || aType == ESimInitFileChangeNotification
- || aType == ESimInit ) )
- {
+ || aType == ESimInitFileChangeNotification
+ || aType == ESimInit ) )
+ {
if ( aFiles.Locate( KCsp1Ef ) != KErrNotFound )
- {
+ {
iRSatRefresh->RefreshEFRead( EFalse );
}
else if( aFiles.Locate( KCsp2Ef ) != KErrNotFound )
- {
- iRSatRefresh->RefreshEFRead( EFalse );
- }
+ {
+ iRSatRefresh->RefreshEFRead( EFalse );
+ }
else
{
iRSatRefresh->RefreshEFRead( ETrue );
}
- }
-
+ }
+
__SSSLOGSTRING("[SSS] <--CSSSettingsRefreshHandler::DoHandleRefresh");
return allow;
}
--- a/cellular/SSSettings/src/RCustomerServiceProfileCache.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/src/RCustomerServiceProfileCache.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,13 +19,13 @@
// INCLUDE FILES
#include <bldvariant.hrh> // for feature definitions
#include <etel.h>
-#include <SSSettingsPrivatePSKeys.h>
+#include <SSSettingsPrivatePSKeys.h>
#include <centralrepository.h>
#include <mmtsy_names.h>
#include <featmgr.h>
-#include "RCustomerServiceProfileCache.h"
-#include "SSSettingsLogger.h"
+#include "rcustomerserviceprofilecache.h"
+#include "SSSettingsLogger.h"
// CONSTANTS
#define KSSSettingsTSYName KMmTsyModuleName
@@ -80,8 +80,8 @@
// Constructor
// -----------------------------------------------------------------------------
EXPORT_C RCustomerServiceProfileCache::RCustomerServiceProfileCache()
- :iData( NULL ),iOldCspFile(NULL)
{
+ iData = NULL;
}
// -----------------------------------------------------------------------------
@@ -119,8 +119,6 @@
__SSSLOGSTRING("[SSS]--> RCustomerServiceProfileCache::Close");
if ( iData == NULL )
{
- delete iOldCspFile;
- iOldCspFile = NULL;
return;
}
@@ -462,12 +460,7 @@
}
User::LeaveIfError(
CspCacheDoOpenEtelConnection( iData->iEtel, iData->iPhone ) );
-
- if( iOldCspFile )
- {
- delete iOldCspFile;
- iOldCspFile = NULL;
- }
+
// Create and reset old CSP file variable.
iOldCspFile = new ( ELeave ) RMobilePhone::TMobilePhoneCspFileV1;
DoResetOldCspFile();
@@ -502,34 +495,34 @@
error = DefineAndSetValue( KPSUidSSConfig, KSettingsCspCache1, value );
}
else if ( error == KErrNotFound && aGroup == ESsCspGroup2 )
- {
- error = DefineAndSetValue( KPSUidSSConfig, KSettingsCspCache2, value );
- }
+ {
+ error = DefineAndSetValue( KPSUidSSConfig, KSettingsCspCache2, value );
+ }
if ( error == KErrNone )
{
if ( value != KCspCacheNoFile )
- {
- __SSSLOGSTRING("[SSS] ---> GetCustomerServiceProfile");
- TRequestStatus status;
- // GetCustomerServiceProfile status returns KErrNotFound if CSP product profile is OFF.
- iData->iPhone.GetCustomerServiceProfile(
- status ,
- iData->iCspFilePckg );
- User::WaitForRequest( status );
- error = status.Int();
- __SSSLOGSTRING1("[SSS] <--- GetCustomerServiceProfile: error: %d", error);
-
- if (( error == KErrNotReady ) || ( error == KErrServerBusy ))
- {
- return error;
- }
- }
+ {
+ __SSSLOGSTRING("[SSS] ---> GetCustomerServiceProfile");
+ TRequestStatus status;
+ // GetCustomerServiceProfile status returns KErrNotFound if CSP product profile is OFF.
+ iData->iPhone.GetCustomerServiceProfile(
+ status ,
+ iData->iCspFilePckg );
+ User::WaitForRequest( status );
+ error = status.Int();
+ __SSSLOGSTRING1("[SSS] <--- GetCustomerServiceProfile: error: %d", error);
+
+ if (( error == KErrNotReady ) || ( error == KErrServerBusy ))
+ {
+ return error;
+ }
+ }
else // CSP has been read return value, if value is KCspCacheNoFile then return KErrNotSupported.
- {
- __SSSLOGSTRING("[SSS] CSP file cannot be found from SIM");
- return KErrNotSupported;
- }
+ {
+ __SSSLOGSTRING("[SSS] CSP file cannot be found from SIM");
+ return KErrNotSupported;
+ }
if ( error == KErrNone )
{
@@ -565,7 +558,7 @@
}
else
{
- value = KCspCacheNoFile;
+ value = KCspCacheNoFile;
error = KErrNotSupported;
}
}
@@ -585,10 +578,10 @@
}
// Do not set error if defError is KErrNone. If Define/Set failed then error value is set.
- if ( defError != KErrNone )
- {
- error = defError;
- }
+ if ( defError != KErrNone )
+ {
+ error = defError;
+ }
}
__SSSLOGSTRING1("[SSS] RCustomerServiceProfileCache::DoGetValues: error: %d", error);
--- a/cellular/SSSettings/src/RSSSettings.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/SSSettings/src/RSSSettings.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -23,18 +23,18 @@
#include <e32base.h>
#include <rmmcustomapi.h>
#include <mmtsy_names.h>
-#include <PSVariables.h>
+#include <PSVariables.h>
#include <startupdomainpskeys.h>
-#include <centralrepository.h> // Central repository
-#include <SSSettingsPrivateCRKeys.h> // Settings Central Repository keys.
+#include <centralrepository.h> // central repository
+#include <SSSettingsPrivateCRKeys.h> // settings central repository keys.
#include <telservicesinternalcrkeys.h>
#include <telservicesvariant.hrh>
-#include "RSSSettings.h"
-#include "MSSSettingsObserver.h"
-#include "CSSSettingsNotifier.h"
-#include "CSSSettingsAlsNotifier.h"
-#include "SSSettingsLogger.h"
+#include "rsssettings.h"
+#include "msssettingsobserver.h"
+#include "CSSSettingsNotifier.h"
+#include "CSSSettingsAlsNotifier.h"
+#include "SSSettingsLogger.h"
// CONSTANTS
_LIT( KPanicCat, "SSSettings" );
@@ -706,41 +706,41 @@
__SSSLOGSTRING1("[SSS] RSSSettings::IsALSSupported alsCSPError value: %d", aAlsCspError );
// When PP ALS is on and used SIM card suppports CSP ALS then alsCSPSupport returns EFALSE and alsCSPError KErrNotSupported but ALS functionality
- // needs to be shown therefore KErrNone is returned.
+ // needs to be shown therefore KErrNone is returned.
if ( aPpAlsValue && !aSimAlsValue && aAlsCspSupport == FALSE && aAlsCspError == KErrNotSupported )
{
error = KErrNone;
- }
+ }
else if ( aPpAlsValue && aSimAlsValue && aAlsCspSupport == FALSE )
- {
- error = KErrNone;
- }
+ {
+ error = KErrNone;
+ }
else if ( aPpAlsValue && aSimAlsValue && aAlsCspSupport == TRUE )
{
- error = KErrNone;
- }
+ error = KErrNone;
+ }
else if ( aPpAlsValue && !aSimAlsValue && aAlsCspSupport == FALSE )
- {
- error = KErrNone;
- }
+ {
+ error = KErrNone;
+ }
else if ( aPpAlsValue && !aSimAlsValue && aAlsCspSupport == TRUE )
- {
- error = KErrNone;
- }
+ {
+ error = KErrNone;
+ }
else if ( !aPpAlsValue && aSimAlsValue && aAlsCspSupport == TRUE )
- {
- error = KErrNone;
- }
+ {
+ error = KErrNone;
+ }
else if ( !aPpAlsValue && aSimAlsValue && aAlsCspSupport == FALSE )
- {
- error = KErrNotSupported;
- }
+ {
+ error = KErrNotSupported;
+ }
else if ( !aPpAlsValue && !aSimAlsValue && aAlsCspSupport == TRUE )
- {
- error = KErrNone;
- }
-
- return error;
+ {
+ error = KErrNone;
+ }
+
+ return error;
}
// ---------------------------------------------------------
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/bwins/sssettingswrapperu.def Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,17 @@
+EXPORTS
+ ?qt_metacast@SsSettingsWrapper@@UAEPAXPBD@Z @ 1 NONAME ; void * SsSettingsWrapper::qt_metacast(char const *)
+ ?metaObject@SsSettingsWrapper@@UBEPBUQMetaObject@@XZ @ 2 NONAME ; struct QMetaObject const * SsSettingsWrapper::metaObject(void) const
+ ??_ESsSettingsWrapper@@UAE@I@Z @ 3 NONAME ; SsSettingsWrapper::~SsSettingsWrapper(unsigned int)
+ ??1SsSettingsWrapper@@UAE@XZ @ 4 NONAME ; SsSettingsWrapper::~SsSettingsWrapper(void)
+ ?get@SsSettingsWrapper@@QAEHW4SsSettingsWrapperSettings@@AAH@Z @ 5 NONAME ; int SsSettingsWrapper::get(enum SsSettingsWrapperSettings, int &)
+ ?staticMetaObject@SsSettingsWrapper@@2UQMetaObject@@B @ 6 NONAME ; struct QMetaObject const SsSettingsWrapper::staticMetaObject
+ ?set@SsSettingsWrapper@@QAEHW4SsSettingsWrapperSettings@@H@Z @ 7 NONAME ; int SsSettingsWrapper::set(enum SsSettingsWrapperSettings, int)
+ ?trUtf8@SsSettingsWrapper@@SA?AVQString@@PBD0@Z @ 8 NONAME ; class QString SsSettingsWrapper::trUtf8(char const *, char const *)
+ ?qt_metacall@SsSettingsWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 9 NONAME ; int SsSettingsWrapper::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?phoneSettingChanged@SsSettingsWrapper@@IAEXW4SsSettingsWrapperSettings@@H@Z @ 10 NONAME ; void SsSettingsWrapper::phoneSettingChanged(enum SsSettingsWrapperSettings, int)
+ ?tr@SsSettingsWrapper@@SA?AVQString@@PBD0H@Z @ 11 NONAME ; class QString SsSettingsWrapper::tr(char const *, char const *, int)
+ ?tr@SsSettingsWrapper@@SA?AVQString@@PBD0@Z @ 12 NONAME ; class QString SsSettingsWrapper::tr(char const *, char const *)
+ ?trUtf8@SsSettingsWrapper@@SA?AVQString@@PBD0H@Z @ 13 NONAME ; class QString SsSettingsWrapper::trUtf8(char const *, char const *, int)
+ ??0SsSettingsWrapper@@QAE@PAVQObject@@@Z @ 14 NONAME ; SsSettingsWrapper::SsSettingsWrapper(class QObject *)
+ ?getStaticMetaObject@SsSettingsWrapper@@SAABUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const & SsSettingsWrapper::getStaticMetaObject(void)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/eabi/sssettingswrapperu.def Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,17 @@
+EXPORTS
+ _ZN17SsSettingsWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
+ _ZN17SsSettingsWrapper11qt_metacastEPKc @ 2 NONAME
+ _ZN17SsSettingsWrapper16staticMetaObjectE @ 3 NONAME DATA 16
+ _ZN17SsSettingsWrapper19getStaticMetaObjectEv @ 4 NONAME
+ _ZN17SsSettingsWrapper19phoneSettingChangedE25SsSettingsWrapperSettingsi @ 5 NONAME
+ _ZN17SsSettingsWrapper3getE25SsSettingsWrapperSettingsRi @ 6 NONAME
+ _ZN17SsSettingsWrapper3setE25SsSettingsWrapperSettingsi @ 7 NONAME
+ _ZN17SsSettingsWrapperC1EP7QObject @ 8 NONAME
+ _ZN17SsSettingsWrapperC2EP7QObject @ 9 NONAME
+ _ZN17SsSettingsWrapperD0Ev @ 10 NONAME
+ _ZN17SsSettingsWrapperD1Ev @ 11 NONAME
+ _ZN17SsSettingsWrapperD2Ev @ 12 NONAME
+ _ZNK17SsSettingsWrapper10metaObjectEv @ 13 NONAME
+ _ZTI17SsSettingsWrapper @ 14 NONAME
+ _ZTV17SsSettingsWrapper @ 15 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/rom/sssettingswrapper.iby Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __SSSETTINGSWRAPPER_IBY__
+#define __SSSETTINGSWRAPPER_IBY__
+
+#include <bldvariant.hrh>
+
+file=ABI_DIR\BUILD_DIR\sssettingswrapper.dll SHARED_LIB_DIR\sssettingswrapper.dll
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/src/logging.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef LOGGING_H
+#define LOGGING_H
+
+#include <QDebug>
+
+#define DPRINT qDebug() << __PRETTY_FUNCTION__
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/src/sssettingswrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+
+#include <sssettingswrapper.h>
+#include <RSSSettings.h>
+#include "sssettingswrapper_p.h"
+#include "logging.h"
+
+/*!
+ SsSettingsWrapper::SsSettingsWrapper
+ */
+SsSettingsWrapper::SsSettingsWrapper(QObject *parent):
+ QObject(parent), m_Priv(new SsSettingsWrapperPrivate(*this))
+{
+ DPRINT << ": IN";
+
+ // Initialize RSSSettings
+ m_ssSettings = new RSSSettings;
+ int err = m_ssSettings->Open();
+ DPRINT << "err: " << err;
+ // Register for notifications
+ m_ssSettings->RegisterAll( *m_Priv );
+
+ DPRINT << ": OUT";
+}
+
+/*!
+ SsSettingsWrapper::~SsSettingsWrapper
+ */
+SsSettingsWrapper::~SsSettingsWrapper()
+{
+ DPRINT << ": IN";
+
+ if(m_ssSettings){
+ m_ssSettings->Close();
+ }
+ delete m_ssSettings;
+ delete m_Priv;
+
+ DPRINT << ": OUT";
+}
+
+/*!
+ SsSettingsWrapper::get
+ */
+int SsSettingsWrapper::get(SsSettingsWrapperSettings setting, int &value)
+{
+ DPRINT << ": IN";
+
+ int err = m_ssSettings->Get(static_cast<TSSSettingsSetting>(setting), value);
+
+ DPRINT << ": err: " << err;
+ DPRINT << ": setting: " << setting;
+ DPRINT << ": value: " << value;
+ DPRINT << ": OUT" ;
+ return err;
+}
+
+/*!
+ SsSettingsWrapper::set
+ */
+int SsSettingsWrapper::set(SsSettingsWrapperSettings setting, int value)
+{
+ DPRINT << ": IN";
+
+ int err = m_ssSettings->Set( static_cast<TSSSettingsSetting>(setting), value );
+
+ DPRINT << ": err: " << err;
+ DPRINT << ": setting: " << setting;
+ DPRINT << ": value: " << value;
+ DPRINT << ": OUT" ;
+ return err;
+}
+
+// End of File.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/src/sssettingswrapper_p.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include "sssettingswrapper_p.h"
+#include "sssettingswrapper.h"
+#include "logging.h"
+#include <RSSSettings.h>
+
+/*!
+ SsSettingsWrapperPrivate::SsSettingsWrapperPrivate
+ */
+SsSettingsWrapperPrivate::SsSettingsWrapperPrivate( SsSettingsWrapper &owner ) : m_Owner(owner)
+{
+ DPRINT;
+}
+
+/*!
+ SsSettingsWrapperPrivate::~SsSettingsWrapperPrivate
+ */
+SsSettingsWrapperPrivate::~SsSettingsWrapperPrivate()
+{
+ DPRINT;
+}
+
+/*!
+ SsSettingsWrapperPrivate::PhoneSettingChanged
+ */
+void SsSettingsWrapperPrivate::PhoneSettingChanged(
+ TSSSettingsSetting aSetting,
+ TInt aNewValue )
+{
+ DPRINT << ": IN";
+ DPRINT << ": aSetting: " << static_cast<SsSettingsWrapperSettings>(aSetting);
+ DPRINT << ": aNewValue: " << aNewValue;
+
+ emit m_Owner.phoneSettingChanged(
+ static_cast<SsSettingsWrapperSettings>(aSetting),
+ static_cast<int>(aNewValue));
+
+ DPRINT << ": OUT";
+}
+
+// End of File.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/src/sssettingswrapper_p.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef SSSETTINGSWRAPPER_P_H
+#define SSSETTINGSWRAPPER_P_H
+
+#include <RSSSettings.h>
+#include <MSSSettingsObserver.h>
+
+
+class SsSettingsWrapper;
+
+class SsSettingsWrapperPrivate: public MSSSettingsObserver
+{
+public:
+ SsSettingsWrapperPrivate( SsSettingsWrapper &owner );
+
+ ~SsSettingsWrapperPrivate();
+
+public: // From MSSSettingsObserver:
+ void PhoneSettingChanged(
+ TSSSettingsSetting aSetting,
+ TInt aNewValue );
+
+private: // Data:
+
+ SsSettingsWrapper &m_Owner;
+
+};
+
+#endif // SSSETTINGSWRAPPER_P
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/src/sssettingswrapper_s.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+
+#include "sssettingswrapper.h"
+#include "logging.h"
+
+
+SsSettingsWrapper::SsSettingsWrapper(QObject *parent):
+ QObject(parent)
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+SsSettingsWrapper::~SsSettingsWrapper()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+
+int SsSettingsWrapper::get(SsSettingsWrapperSettings setting, int &value)
+{
+ DPRINT << "DUMMY WRAPPER";
+ return 0;
+}
+
+int SsSettingsWrapper::set(SsSettingsWrapperSettings setting, int value)
+{
+ DPRINT << "DUMMY WRAPPER";
+ return 0;
+}
+
+// End of File.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/sssettingswrapper.pri Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,27 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+HEADERS += ../../../../phonesrv_plat/ss_settings_api/inc/sssettingswrapper.h \
+ ../../../../phonesrv_plat/ss_settings_api/inc/sssettingswrappertypes.h \
+
+symbian: {
+ SOURCES += ./src/sssettingswrapper.cpp \
+ ./src/sssettingswrapper_p.cpp
+}
+else: {
+ SOURCES = ./src/sssettingswrapper_s.cpp
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/sssettingswrapper.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,49 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = lib
+TARGET =
+MOC_DIR = moc
+
+INCLUDEPATH += ../../../../phonesrv_plat/ss_settings_api/inc
+SOURCEPATH += src
+
+# Input
+include(sssettingswrapper.pri)
+
+DEFINES += BUILD_SSSETTINGSWRAPPER
+
+symbian: {
+ LIBS += -lsssettings
+ load(data_caging_paths)
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+
+ TARGET.EPOCALLOWDLLDATA = 1
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
+ TARGET.UID3 = 0X20029F22
+
+ # For sis file
+ dllfile.sources = $${TARGET}.dll
+ dllfile.path = $$SHARED_LIB_DIR
+ DEPLOYMENT += dllfile
+
+ BLD_INF_RULES.prj_exports += \
+ "$${LITERAL_HASH}include <platform_paths.hrh>" \
+ "./rom/sssettingswrapper.iby CORE_MW_LAYER_IBY_EXPORT_PATH(sssettingswrapper.iby)"
+} else: {
+ DESTDIR = c:\hb\lib
+ DLLDESTDIR = c:\hb\bin
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/tsrc/mocks/mock_rsssettings.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,189 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include <smcmockclassincludes.h>
+#include <RSSSettings.h>
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// RSSSettings::RSSSettings
+// -----------------------------------------------------------------------------
+//
+RSSSettings::RSSSettings( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::Close
+// -----------------------------------------------------------------------------
+//
+void RSSSettings::Close( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::Open
+// -----------------------------------------------------------------------------
+//
+TInt RSSSettings::Open( )
+ {
+ SMC_MOCK_METHOD0( TInt )
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::Open
+// -----------------------------------------------------------------------------
+//
+TInt RSSSettings::Open(
+ RTelServer * aTelServer )
+ {
+ SMC_MOCK_METHOD1( TInt, RTelServer *, aTelServer )
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::RegisterAll
+// -----------------------------------------------------------------------------
+//
+TInt RSSSettings::RegisterAll(
+ MSSSettingsObserver & aObserver )
+ {
+ //SMC_MOCK_METHOD1( TInt, MSSSettingsObserver &, aObserver )
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::Register
+// -----------------------------------------------------------------------------
+//
+TInt RSSSettings::Register(
+ TSSSettingsSetting aSetting,
+ MSSSettingsObserver & aObserver )
+ {
+ //SMC_MOCK_METHOD2( TInt, TSSSettingsSetting, aSetting,
+ // MSSSettingsObserver &, aObserver )
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::CancelAll
+// -----------------------------------------------------------------------------
+//
+void RSSSettings::CancelAll(
+ MSSSettingsObserver & aObserver )
+ {
+ //SMC_MOCK_METHOD1( void, MSSSettingsObserver &, aObserver )
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::Cancel
+// -----------------------------------------------------------------------------
+//
+void RSSSettings::Cancel(
+ TSSSettingsSetting aSetting,
+ MSSSettingsObserver & aObserver )
+ {
+ //SMC_MOCK_METHOD2( void, TSSSettingsSetting, aSetting,
+ // MSSSettingsObserver &, aObserver )
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::Get
+// -----------------------------------------------------------------------------
+//
+TInt RSSSettings::Get(
+ TSSSettingsSetting aSetting,
+ TInt & aValue )
+ {
+ SMC_MOCK_METHOD2( TInt, TSSSettingsSetting, aSetting,
+ TInt &, aValue )
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::Set
+// -----------------------------------------------------------------------------
+//
+TInt RSSSettings::Set(
+ TSSSettingsSetting aSetting,
+ TInt aValue )
+ {
+ SMC_MOCK_METHOD2( TInt, TSSSettingsSetting, aSetting,
+ TInt, aValue )
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::HandleSIMChanged
+// -----------------------------------------------------------------------------
+//
+TInt RSSSettings::HandleSIMChanged( )
+ {
+ SMC_MOCK_METHOD0( TInt )
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::PreviousCugValue
+// -----------------------------------------------------------------------------
+//
+TInt RSSSettings::PreviousCugValue(
+ TInt & aPreviousValue )
+ {
+ SMC_MOCK_METHOD1( TInt, TInt &, aPreviousValue )
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::ResetPreviousCugValue
+// -----------------------------------------------------------------------------
+//
+TInt RSSSettings::ResetPreviousCugValue( )
+ {
+ SMC_MOCK_METHOD0( TInt )
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::HandleRefresh
+// -----------------------------------------------------------------------------
+//
+TInt RSSSettings::HandleRefresh( )
+ {
+ SMC_MOCK_METHOD0( TInt )
+ }
+
+
+// -----------------------------------------------------------------------------
+// RSSSettings::IsValueValidCugIndex
+// -----------------------------------------------------------------------------
+//
+TBool RSSSettings::IsValueValidCugIndex(
+ const TInt & aValue ) const
+ {
+ SMC_MOCK_METHOD1( TBool, const TInt &, aValue )
+ }
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/tsrc/run_auto_tests_qt.bat Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,187 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+
+@echo off
+setlocal
+goto :startup
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function DEFAULT
+::
+:: Modify this function
+:: - TESTED_SRC can be changed to match tested code.
+:: Specifies path from testcode group directory to
+:: tested code
+:: - Add test directories to be runned
+:: ie. "call :build ut_projectdirectory" or use
+:: "for /f %%a in ('dir /b ut_*') do call :build %%a"
+:: which compiles, instruments and runs all test directories
+:: starting with "ut_".
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:DEFAULT
+set TESTED_SRC=..\..\src\*
+
+for /f %%a in ('dir /b ut_*') do call :build %%a
+if [%DOMODULESTESTS%] EQU [TRUE] (
+for /f %%a in ('dir /b mt_*') do call :build %%a
+)
+
+call :finish
+goto :END
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function STARTUP
+::
+:: Initializing script
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:STARTUP
+
+set BUILDTESTS=TRUE
+set RUNTESTS=TRUE
+set INSTRUMENT=TRUE
+set REMOVEINSTRUMENT=TRUE
+set DOMODULESTESTS=TRUE
+set ABLD_CALL=abld build winscw udeb -keepgoing
+set PATH_TO_DLL=\epoc32\release\winscw\udeb
+set PATH_TO_COVERAGE_DATA=\coverage_data
+
+if not exist %PATH_TO_COVERAGE_DATA% (
+mkdir %PATH_TO_COVERAGE_DATA%
+)
+
+if [%1] EQU [] ( goto default )
+
+call :%1
+call :%2
+call :%3
+call :%4
+call :%5
+echo Running tests = %RUNTESTS%
+echo Instrumenting tests = %INSTRUMENT%
+goto default
+
+:/NOCLEANUP
+set REMOVEINSTRUMENT=FALSE
+goto end
+
+:/NORUN
+set RUNTESTS=FALSE
+set REMOVEINSTRUMENT=FALSE
+goto end
+
+:/NOINSTRUMENT
+set INSTRUMENT=FALSE
+goto end
+
+:/NOBUILD
+set BUILDTESTS=FALSE
+goto end
+
+:/ONLYUNITTESTS
+set DOMODULESTESTS=FALSE
+goto end
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function FINISH
+::
+:: Finishes run_auto_tests.bat
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:FINISH
+
+if [%RUNTESTS%] EQU [TRUE] (
+call :runtests
+)
+
+if [%INSTRUMENT%] EQU [TRUE] (
+call :calculatecoverage
+)
+
+if [%REMOVEINSTRUMENT%] EQU [TRUE] (
+call :removecoverage
+)
+goto end
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function BUILD
+:: param directory
+::
+:: builds test from given directory
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:BUILD
+setlocal
+if [%BUILDTESTS%] EQU [FALSE] ( goto end )
+echo Building %1
+if not exist %1 (
+echo %1 Not found!
+goto end
+)
+
+pushd .
+call cd %1
+call qmake
+call bldmake bldfiles
+call abld clean winscw udeb
+if [%INSTRUMENT%] EQU [TRUE] (
+call ctcwrap -n %PATH_TO_COVERAGE_DATA%\%1 -i d -C "EXCLUDE=*" -C "NO_EXCLUDE=%TESTED_SRC%" %ABLD_CALL%
+) else (
+call %ABLD_CALL%
+)
+
+popd
+endlocal
+goto end
+
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function RUNTESTS
+::
+:: NOTE! Function assumes that test binary is named according to test directory.
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:RUNTESTS
+echo Running tests
+for /f %%a in ('dir /b ut_*') do call %PATH_TO_DLL%\%%a.exe -dtextshell --
+goto end
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function CALCULATECOVERAGE
+::
+:: Calculates test coverage. Generates html
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:CALCULATECOVERAGE
+echo Calculating coverage
+ctcpost %PATH_TO_COVERAGE_DATA%\*.sym | ctcmerge -i - -o profile.txt
+call ctc2html -t 70 -i profile.txt -o \coverage_result -nsb
+goto end
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function REMOVECOVERAGE
+::
+:: Removes data from coverage directory
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:REMOVECOVERAGE
+echo Removing deleting coverage data
+call del %PATH_TO_COVERAGE_DATA%\*.sym
+call del %PATH_TO_COVERAGE_DATA%\*.dat
+call del profile.txt
+goto end
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function END
+::
+:: Prints done
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:END
+echo Done!
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/tsrc/ut_sssettingswrapper/qtestmains60.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef QTESTMAINS60
+#define QTESTMAINS60
+
+#define QTEST_MAIN_S60(TestObject) \
+int main(int argc, char *argv[]) \
+{ \
+char *new_argv[3]; \
+QCoreApplication app(argc, argv); \
+\
+QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; \
+QByteArray bytes = str.toAscii(); \
+\
+char arg1[] = "-o"; \
+\
+new_argv[0] = argv[0]; \
+new_argv[1] = arg1; \
+new_argv[2] = bytes.data(); \
+\
+TestObject tc; \
+return QTest::qExec(&tc, 3, new_argv); \
+}
+
+#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/tsrc/ut_sssettingswrapper/ut_sssettingswrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,125 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "ut_sssettingswrapper.h"
+#include "qtestmains60.h"
+#define private public
+#include "sssettingswrapper.h"
+#include "sssettingswrapper_p.h"
+
+/*!
+ UT_SsSettingsWrapper::UT_SsSettingsWrapper
+ */
+UT_SsSettingsWrapper::UT_SsSettingsWrapper()
+ : mWrapper(NULL)
+{
+}
+
+/*!
+ UT_SsSettingsWrapper::~UT_SsSettingsWrapper
+ */
+UT_SsSettingsWrapper::~UT_SsSettingsWrapper()
+{
+ delete mWrapper;
+}
+
+/*!
+ UT_SsSettingsWrapper::init
+ */
+void UT_SsSettingsWrapper::init()
+{
+ initialize();
+
+ mWrapper = new SsSettingsWrapper();
+}
+
+/*!
+ UT_SsSettingsWrapper::cleanup
+ */
+void UT_SsSettingsWrapper::cleanup()
+{
+ reset();
+
+ delete mWrapper;
+ mWrapper = NULL;
+}
+
+/*!
+ UT_SsSettingsWrapper::t_memleak
+ */
+void UT_SsSettingsWrapper::t_memleak()
+{
+
+}
+
+/*!
+ UT_SsSettingsWrapper::t_get
+ */
+void UT_SsSettingsWrapper::t_get()
+{
+ int value = 0;
+ expect("RSSSettings::Get").with(ESSSettingsCug, 0);
+ QVERIFY( !mWrapper->get(Cug, value) );
+ expect("RSSSettings::Get").with(ESSSettingsClir, 0);
+ QVERIFY( !mWrapper->get(Clir, value) );
+ expect("RSSSettings::Get").with(ESSSettingsAls, 0);
+ QVERIFY( !mWrapper->get(Als, value) );
+ expect("RSSSettings::Get").with(ESSSettingsAlsBlocking, 0);
+ QVERIFY( !mWrapper->get(AlsBlocking, value) );
+ expect("RSSSettings::Get").with(ESSSettingsDefaultCug, 0);
+ QVERIFY( !mWrapper->get(DefaultCug, value) );
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_SsSettingsWrapper::t_set
+ */
+void UT_SsSettingsWrapper::t_set()
+{
+ int value = 0;
+ expect("RSSSettings::Set").with(ESSSettingsCug, 0);
+ QVERIFY( !mWrapper->set(Cug, value) );
+ expect("RSSSettings::Set").with(ESSSettingsClir, 0);
+ QVERIFY( !mWrapper->set(Clir, value) );
+ expect("RSSSettings::Set").with(ESSSettingsAls, 0);
+ QVERIFY( !mWrapper->set(Als, value) );
+ expect("RSSSettings::Set").with(ESSSettingsAlsBlocking, 0);
+ QVERIFY( !mWrapper->set(AlsBlocking, value) );
+ expect("RSSSettings::Set").with(ESSSettingsDefaultCug, 0);
+ QVERIFY( !mWrapper->set(DefaultCug, value) );
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_SsSettingsWrapper::t_PhoneSettingChanged
+ */
+Q_DECLARE_METATYPE(SsSettingsWrapperSettings)
+void UT_SsSettingsWrapper::t_PhoneSettingChanged()
+{
+ qRegisterMetaType<SsSettingsWrapperSettings> ("SsSettingsWrapperSettings");
+ QSignalSpy spy(mWrapper,
+ SIGNAL(phoneSettingChanged(SsSettingsWrapperSettings, int )));
+
+ mWrapper->m_Priv->PhoneSettingChanged(ESSSettingsCug, 0);
+
+ QCOMPARE(spy.count(), 1);
+ const QList<QVariant> &arguments = spy.at(0);
+ QVERIFY(Cug == arguments.at(0).value<SsSettingsWrapperSettings>());
+ QVERIFY(0 == arguments.at(1).value<int>());
+}
+
+QTEST_MAIN_S60(UT_SsSettingsWrapper)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/tsrc/ut_sssettingswrapper/ut_sssettingswrapper.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef UT_SSSETTINGWRAPPER_H
+#define UT_SSSETTINGWRAPPER_H
+
+#include <QtTest/QtTest>
+#include <mockservice.h>
+
+class SsSettingsWrapper;
+
+class UT_SsSettingsWrapper : public QObject, MockService
+{
+ Q_OBJECT
+
+public:
+ UT_SsSettingsWrapper();
+ ~UT_SsSettingsWrapper();
+
+private slots:
+
+ void init();
+ void cleanup();
+
+ void t_memleak();
+ void t_get();
+ void t_set();
+
+ void t_PhoneSettingChanged();
+
+private:
+ SsSettingsWrapper *mWrapper;
+
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/SSSettings/xqbindings/sssettingswrapper/tsrc/ut_sssettingswrapper/ut_sssettingswrapper.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,46 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: Project file for building unit test component
+#
+#
+
+CONFIG += qtestlib
+TEMPLATE = app
+TARGET =
+DEPENDPATH += . ../../src/
+INCLUDEPATH += .
+DEFINES += BUILD_SSSETTINGSWRAPPER
+
+QT -= gui
+QT += testlib
+
+symbian: {
+ CONFIG += no_icon
+ INCLUDEPATH += /epoc32/include/mw/QtTest \
+ /epoc32/include/platform/mw \
+ /epoc32/include/mw/qt
+ LIBS += -lmocklib -lsymbianmock
+}
+
+# test code
+HEADERS += ut_sssettingswrapper.h
+SOURCES += ut_sssettingswrapper.cpp
+
+# code to be tested
+HEADERS += ../../../../../../phonesrv_plat/ss_settings_api/inc/sssettingswrapper.h
+SOURCES += ../../src/sssettingswrapper.cpp \
+ ../../src/sssettingswrapper_p.cpp
+
+# mocks needed for testing
+SOURCES += ../mocks/mock_rsssettings.cpp
--- a/cellular/ServiceRequest/data/ServiceRequest.rss Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/ServiceRequest/data/ServiceRequest.rss Fri Mar 19 09:40:14 2010 +0200
@@ -29,7 +29,7 @@
#include <avkon.mbg>
#include <avkon.loc>
-#include "ServiceRequest.hrh"
+#include "ServiceRequest.hrh"
RESOURCE RSS_SIGNATURE { }
--- a/cellular/ServiceRequest/group/ServiceRequest.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/ServiceRequest/group/ServiceRequest.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -25,11 +25,11 @@
TARGETTYPE DLL
UID 0x1000008d 0x10005A3D
-SOURCEPATH ../src
-SOURCE CServiceRequest.cpp
+SOURCEPATH ../src
+SOURCE CServiceRequest.cpp
// Resource files
-START RESOURCE ../data/ServiceRequest.rss
+START RESOURCE ../data/ServiceRequest.rss
TARGETPATH RESOURCE_FILES_DIR
HEADER
LANGUAGE_IDS
@@ -41,7 +41,7 @@
MW_LAYER_SYSTEMINCLUDE
-LIBRARY euser.lib cone.lib avkon.lib commonengine.lib
+LIBRARY euser.lib cone.lib avkon.lib commonengine.lib
LIBRARY aknnotify.lib
// End of file
--- a/cellular/ServiceRequest/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/ServiceRequest/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -21,9 +21,9 @@
DEFAULT
PRJ_EXPORTS
-../inc/CServiceRequest.h |../../../inc/cservicerequest.h
-../inc/MServiceRequestObserver.h |../../../inc/mservicerequestobserver.h
-../data/servicerequest_stub.SIS /epoc32/data/z/system/install/servicerequest_stub.sis
+../inc/CServiceRequest.h |../../../inc/CServiceRequest.h
+../inc/MServiceRequestObserver.h |../../../inc/MServiceRequestObserver.h
+../data/servicerequest_stub.SIS /epoc32/data/z/system/install/servicerequest_stub.SIS
../rom/servicerequest.iby CORE_APP_LAYER_IBY_EXPORT_PATH(servicerequest.iby)
../rom/servicerequestResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(servicerequestResources.iby)
--- a/cellular/ServiceRequest/inc/CServiceRequest.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/ServiceRequest/inc/CServiceRequest.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,7 +23,7 @@
// INCLUDES
#include <e32std.h>
#include <e32base.h>
-#include <AknProgressDialog.h>
+#include <AknProgressDialog.h>
// FORWARD DECLARATIONS
class MServiceRequestObserver;
--- a/cellular/ServiceRequest/inc/ServiceRequest.hrh Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/ServiceRequest/inc/ServiceRequest.hrh Fri Mar 19 09:40:14 2010 +0200
@@ -24,7 +24,7 @@
enum TSerqNotes
{
ESerqRequestingNote = 1
- };
+ };
#endif
--- a/cellular/ServiceRequest/rom/servicerequestResources.iby Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/ServiceRequest/rom/servicerequestResources.iby Fri Mar 19 09:40:14 2010 +0200
@@ -19,6 +19,6 @@
#ifndef __SERVICEREQUESTRESOURCES_IBY__
#define __SERVICEREQUESTRESOURCES_IBY__
-data=DATAZ_\RESOURCE_FILES_DIR\SERVICEREQUEST.rsc RESOURCE_FILES_DIR\SERVICEREQUEST.rsc
+data=DATAZ_\RESOURCE_FILES_DIR\SERVICEREQUEST.rsc RESOURCE_FILES_DIR\SERVICEREQUEST.rsc
#endif
--- a/cellular/ServiceRequest/src/CServiceRequest.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/ServiceRequest/src/CServiceRequest.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,16 +18,16 @@
// INCLUDE FILES
-#include "CServiceRequest.h"
-#include "MServiceRequestObserver.h"
-#include <ServiceRequest.rsg>
+#include "CServiceRequest.h"
+#include "MServiceRequestObserver.h"
+#include <servicerequest.rsg>
-#include <AknWaitDialog.h>
-#include <AknGlobalNote.h>
+#include <AknWaitDialog.h>
+#include <AknGlobalNote.h>
#include <aknnotewrappers.h>
#include <avkon.hrh>
-#include <StringLoader.h>
+#include <StringLoader.h>
#include <gsmerror.h>
#include <exterror.h>
#include <ConeResLoader.h>
--- a/cellular/telephonysettings/Logger/PhoneSettingsLogger.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/Logger/PhoneSettingsLogger.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
#ifndef PHONESETTINGSLOGGER_H
#define PHONESETTINGSLOGGER_H
-#include "PhoneSettingsLoggingConf.h"
+#include "PhoneSettingsLoggingConf.h"
#include <e32std.h>
#include <flogger.h>
#include <e32svr.h>
--- a/cellular/telephonysettings/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -26,7 +26,7 @@
PRJ_EXPORTS
-../group/phonesettings_stub.SIS /epoc32/data/z/system/install/phonesettings_stub.sis
+../group/phonesettings_stub.SIS /epoc32/data/z/system/install/phonesettings_stub.SIS
// IBY files
../rom/PhoneSettings.iby CORE_APP_LAYER_IBY_EXPORT_PATH(PhoneSettings.iby)
--- a/cellular/telephonysettings/group/phonesettings.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/group/phonesettings.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -17,7 +17,7 @@
*/
#include <platform_paths.hrh>
-#include "../Logger/PhoneSettingsLoggingConf.h"
+#include "../logger/PhoneSettingsLoggingConf.h"
// Capability assignment.
CAPABILITY CAP_GENERAL_DLL
@@ -28,38 +28,41 @@
UID 0x1000008d 0x100058e3
SOURCEPATH ../src
-SOURCE PsetCallWaiting.cpp
-SOURCE PsetContainer.cpp
-SOURCE PsetCallBarring.cpp
-SOURCE PsetCallDiverting.cpp
-SOURCE PsetTelephony.cpp
-SOURCE PsetCli.cpp
-SOURCE PsetVariationProxy.cpp
-SOURCE PsetNetwork.cpp
-SOURCE PsetSAObserver.cpp
-SOURCE PsetCSP.cpp
-SOURCE PSetUtility.cpp
-SOURCE PSetRefreshHandlerImpl.cpp
+SOURCE PsetCallWaiting.cpp
+SOURCE PsetContainer.cpp
+SOURCE PsetCallBarring.cpp
+SOURCE PsetCallDiverting.cpp
+SOURCE PsetTelephony.cpp
+SOURCE PsetCli.cpp
+SOURCE PsetVariationProxy.cpp
+SOURCE PsetNetwork.cpp
+SOURCE PsetSAObserver.cpp
+SOURCE PsetCSP.cpp
+SOURCE PSetUtility.cpp
+SOURCE PSetRefreshHandlerImpl.cpp
SOURCE PSetCallDivertingBase.cpp
SOURCE PSetSubscriberIdCheck.cpp
-SOURCE PSetCallDivertingBasicImpl.cpp
+SOURCE PSetCallDivertingBasicImpl.cpp
SOURCE PSetCallDivertingCreator.cpp
-SOURCE PSetCallDivertingDualAffectImpl.cpp
+SOURCE PSetCallDivertingDualAffectImpl.cpp
USERINCLUDE ../inc
-USERINCLUDE ../Logger
-SYSTEMINCLUDE ../../../inc
+USERINCLUDE ../Logger
+SYSTEMINCLUDE ../../../inc
// APP include needed because telephonysettings
// uses vmbx headers from APP layer.
-APP_LAYER_SYSTEMINCLUDE
-
+// <-- QT PHONE START -->
+MW_LAYER_SYSTEMINCLUDE
+// <-- QT PHONE END -->
LIBRARY euser.lib
LIBRARY etel.lib
LIBRARY etelmm.lib
LIBRARY customapi.lib
LIBRARY bafl.lib
LIBRARY sssettings.lib
-LIBRARY vmbx.lib
+// <-- QT PHONE START -->
+//LIBRARY vmbx.lib
+// <-- QT PHONE END -->
LIBRARY featmgr.lib
LIBRARY centralrepository.lib
--- a/cellular/telephonysettings/inc/MCallDiverting.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/inc/MCallDiverting.h Fri Mar 19 09:40:14 2010 +0200
@@ -29,7 +29,13 @@
class MCallDiverting
{
public:
-
+// <-- QT PHONE START -->
+ /**
+ * Sets observer which informs when request is completed
+ */
+ virtual void SetRequestObserver( MPsetRequestObserver* aObs ) = 0;
+// <-- QT PHONE END -->
+
/**
* Sets diverting to the network.
*
@@ -115,8 +121,9 @@
* @param aVmbx vmbx connection.
* @return used vmbx number.
*/
- virtual TInt OpenVmbxLC( TDes& aTelNumber, RVmbxNumber& aVmbx ) = 0;
-
+ // <-- QT PHONE START-->
+ //virtual TInt OpenVmbxLC( TDes& aTelNumber, RVmbxNumber& aVmbx ) = 0;
+ // <-- QT PHONE END-->
/*
* Virtual destructor.
*/
--- a/cellular/telephonysettings/inc/MNetworkInfoObs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/inc/MNetworkInfoObs.h Fri Mar 19 09:40:14 2010 +0200
@@ -26,7 +26,7 @@
#endif
#ifndef __MNETWORKSELECT_H
-#include "MNetworkSelect.h"
+#include "mnetworkselect.h"
#endif
// DATA TYPES
--- a/cellular/telephonysettings/inc/PSetCallDivertingBase.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/inc/PSetCallDivertingBase.h Fri Mar 19 09:40:14 2010 +0200
@@ -24,10 +24,10 @@
#include <badesca.h>
#include <mmretrieve.h>
#include <ctsydomaincrkeys.h>
-#include "MCallDiverting.h"
-#include "MSSSettingsObserver.h"
+#include "MCallDiverting.h"
+#include "msssettingsobserver.h"
#include "nwdefs.h"
-#include "PsetConstants.h"
+#include "psetconstants.h"
// CLASS DECLARATION
class MPsetDivertObserver;
@@ -66,7 +66,13 @@
~CPSetCallDivertingBase();
public: // From base class.
-
+// <-- QT PHONE START -->
+ /**
+ * @see MCallDiverting.
+ */
+ void SetRequestObserver( MPsetRequestObserver* aObs );
+// <-- QT PHONE END -->
+
/**
* @see MCallDiverting.
*/
@@ -111,9 +117,10 @@
/**
* @see MCallDiverting.
- */
- TInt OpenVmbxLC( TDes& aTelNumber, RVmbxNumber& aVmbx );
-
+ */
+ // <-- QT PHONE START-->
+ //TInt OpenVmbxLC( TDes& aTelNumber, RVmbxNumber& aVmbx );
+ // <-- QT PHONE END-->
/**
* @see MCallDiverting.
*/
--- a/cellular/telephonysettings/inc/PSetCallDivertingBasicImpl.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/inc/PSetCallDivertingBasicImpl.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,13 +21,13 @@
// INCLUDES
#include <e32base.h>
-#include <PsetCallDiverting.h>
+#include <psetcalldiverting.h>
#include <mmretrieve.h>
#include <ctsydomaincrkeys.h>
-#include "MSSSettingsObserver.h"
+#include "msssettingsobserver.h"
#include "nwdefs.h"
-#include "PsetConstants.h"
-#include "PSetCallDivertingBase.h"
+#include "psetconstants.h"
+#include "PSetCallDivertingBase.h"
// CLASS DECLARATION
class CPsetSAObserver;
--- a/cellular/telephonysettings/inc/PSetCallDivertingCreator.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/inc/PSetCallDivertingCreator.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,11 +22,13 @@
// INCLUDES
#include <e32base.h>
#include <badesca.h>
-#include <vmnumber.h>
+// <-- QT PHONE START -->
+//#include <vmnumber.h>
+// <-- QT PHONE END-->
#include <etelmm.h>
#include <nwdefs.h>
-#include "MPsetDivertObs.h"
-#include "MCallDiverting.h"
+#include "mpsetdivertobs.h"
+#include "MCallDiverting.h"
/**
* Factory class for creating divert related classes.
--- a/cellular/telephonysettings/inc/PSetCallDivertingDualAffectImpl.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/inc/PSetCallDivertingDualAffectImpl.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,13 +21,13 @@
// INCLUDES
#include <e32base.h>
-#include <PsetCallDiverting.h>
+#include <psetcalldiverting.h>
#include <mmretrieve.h>
#include <ctsydomaincrkeys.h>
-#include "MSSSettingsObserver.h"
+#include "msssettingsobserver.h"
#include "nwdefs.h"
-#include "PsetConstants.h"
-#include "PSetCallDivertingBase.h"
+#include "psetconstants.h"
+#include "PSetCallDivertingBase.h"
// CLASS DECLARATION
class CPsetSAObserver;
--- a/cellular/telephonysettings/inc/PSetRefreshHandlerImpl.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/inc/PSetRefreshHandlerImpl.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
-#include <PSetRefreshHandler.h>
+#include <psetrefreshhandler.h>
#include <msatrefreshobserver.h>
@@ -61,16 +61,16 @@
/**
* @see CPSetRefreshHandler::NotifyFileChangeL.
- */
- void NotifyFileChangeL(
+ */
+ void NotifyFileChangeL(
MSSSettingsRefreshObserver& aObserver,
TSatElementaryFiles aObservedFiles,
TSatRefreshType aObservedRefreshType );
- /**
+ /**
* @see CPSetRefreshHandler::CancelNotify.
- */
- void CancelNotify();
+ */
+ void CancelNotify();
/**
* @see CPSetRefreshHandler::ChangedCspSettings.
@@ -82,17 +82,17 @@
public: // Functions from base classes
- /**
+ /**
* @see MSSSettingsRefreshObserver::AllowRefresh
*/
TBool AllowRefresh(
const TSatRefreshType aType,
const TSatElementaryFiles aFiles );
- /**
+ /**
* @see MSSSettingsRefreshObserver::Refresh
*/
- void Refresh(
+ void Refresh(
const TSatRefreshType aType,
const TSatElementaryFiles aFiles );
--- a/cellular/telephonysettings/inc/PSetUtility.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/inc/PSetUtility.h Fri Mar 19 09:40:14 2010 +0200
@@ -87,6 +87,10 @@
*****************************************************/
static RMobilePhone::TMobilePhoneCFCondition
GetDivertReason( TCallDivertingCondition aCondition );
+// <-- QT PHONE START -->
+ static TCallDivertingCondition
+ GetDivertReason( RMobilePhone::TMobilePhoneCFCondition aCondition );
+// <-- QT PHONE END -->
static RMobilePhone::TMobileService VerifyAltLineUseL();
};
--- a/cellular/telephonysettings/inc/PsetVariationProxy.h Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/inc/PsetVariationProxy.h Fri Mar 19 09:40:14 2010 +0200
@@ -12,9 +12,9 @@
* Contributors:
*
* Description:
-* CPsetVariationProxy class is proxy class for
-* central repository variation
-* (Call waiting/distinguish between not provisioned and not activated).
+* CPsetVariationProxy class is proxy class for
+* central repository variation
+* (Call waiting/distinguish between not provisioned and not activated).
*
*
*/
@@ -42,47 +42,47 @@
{
public: //constructor & destructor
- /*
- * Symbian OS 2-phase Constructor.
- *
- * @param aUid identifing the central repository UID.
+ /*
+ * Symbian OS 2-phase Constructor.
+ *
+ * @param aUid identifing the central repository UID.
* @param aId central repository ID.
* @return the created instance.
- */
- static CPSetVariationProxy* NewL( const TUid& aUid,
+ */
+ static CPSetVariationProxy* NewL( const TUid& aUid,
const TUint aId );
-
- /* Destructor */
- ~CPSetVariationProxy();
-
+
+ /* Destructor */
+ ~CPSetVariationProxy();
+
public:
- /**
+ /**
* Check from member variable 'iFeature' is the requested feature active.
- *
- * @param aFeature is uid for used central repository variable.
- * @return returns TBool type ETrue/EFalse is current feature enabled or not
- */
- TBool IsFeatureEnabled( TUint aFeature ) const;
-
- private:
-
- /**
- * Constructor
- *
- * Open CenRep, read data into 'iFeatures' and close CenRep
- */
- void ConstructL( const TUid& aUid, const TUint aId );
-
+ *
+ * @param aFeature is uid for used central repository variable.
+ * @return returns TBool type ETrue/EFalse is current feature enabled or not
+ */
+ TBool IsFeatureEnabled( TUint aFeature ) const;
+
private:
- /* Default constructor */
- CPSetVariationProxy();
-
+ /**
+ * Constructor
+ *
+ * Open CenRep, read data into 'iFeatures' and close CenRep
+ */
+ void ConstructL( const TUid& aUid, const TUint aId );
+
private:
- // Saves cen rep data readed in ConstructL()
- TInt iFeature;
+ /* Default constructor */
+ CPSetVariationProxy();
+
+ private:
+
+ // Saves cen rep data readed in ConstructL()
+ TInt iFeature;
};
#endif // PSETVARIATIONPROXY_H
--- a/cellular/telephonysettings/src/PSetCallDivertingBase.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PSetCallDivertingBase.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,27 +17,29 @@
// INCLUDE FILES
-#include "PSetCallDivertingBasicImpl.h"
+#include "PSetCallDivertingBasicImpl.h"
#include <badesca.h>
#include <etelmm.h>
#include <e32math.h>
-#include <vmnumber.h>
+// <-- QT PHONE START -->
+//include <vmnumber.h>
+// <-- QT PHONE END -->
#include <e32svr.h>
#include <featmgr.h>
#include <centralrepository.h>
-#include <SettingsInternalCRKeys.h>
+#include <settingsinternalcrkeys.h>
-#include "PsetCallDiverting.h"
-#include "PsetContainer.h"
-#include "MPsetDivertObs.h"
-#include "PsetTelephony.h"
-#include "PSetPanic.h"
-#include "MPsetRequestObs.h"
-#include "PSetUtility.h"
-#include "PhoneSettingsLogger.h"
-#include "PsetSAObserver.h"
-#include "PSetCallDivertingBase.h"
+#include "psetcalldiverting.h"
+#include "psetcontainer.h"
+#include "mpsetdivertobs.h"
+#include "PsetTelephony.h"
+#include "PSetPanic.h"
+#include "mpsetrequestobs.h"
+#include "PSetUtility.h"
+#include "PhoneSettingsLogger.h"
+#include "psetsaobserver.h"
+#include "PSetCallDivertingBase.h"
// LOCAL CONSTANTS AND MACROS
@@ -167,6 +169,17 @@
// Empty implementation.
}
+// <-- QT PHONE START -->
+// ---------------------------------------------------------------------------
+// SetRequestObserver
+// ---------------------------------------------------------------------------
+//
+void CPSetCallDivertingBase::SetRequestObserver( MPsetRequestObserver* aObs )
+ {
+ iReqObserver = aObs;
+ }
+// <-- QT PHONE END -->
+
// ---------------------------------------------------------------------------
// SetDivertingL
// ---------------------------------------------------------------------------
@@ -808,12 +821,15 @@
// Verifies whether the divert-to number is to voice mail box.
// ---------------------------------------------------------------------------
//
-TBool CPSetCallDivertingBase::IsVMBXDivertL( TDesC& aTelNumber )
+TBool CPSetCallDivertingBase::IsVMBXDivertL( TDesC& /*aTelNumber*/ )
{
+
__PHSLOGSTRING("[PHS]--> CPSetCallDivertingBase::IsVMBXDivertL" );
TBool result = EFalse;
-
+ // <-- QT PHONE START -->
+
+ /*
if ( FeatureManager::FeatureSupported ( KFeatureIdVmbxCallDivertIcon ) )
{
RVmbxNumber vmbxConnection;
@@ -847,6 +863,8 @@
}
}
}
+*/
+ // <-- QT PHONE END-->
__PHSLOGSTRING("[PHS] <--CPSetCallDivertingBase::IsVMBXDivertL" );
return result;
}
@@ -854,6 +872,8 @@
// ---------------------------------------------------------------------------
// Opens Vmbx. Leaves vmbx to the stack.
// ---------------------------------------------------------------------------
+// <-- QT PHONE START-->
+/*
TInt CPSetCallDivertingBase::OpenVmbxLC( TDes& aTelNumber, RVmbxNumber& aVmbx )
{
__PHSLOGSTRING("[PHS]--> CPSetCallDivertingBase::OpenVmbxLC" );
@@ -861,8 +881,10 @@
CleanupClosePushL( aVmbx );
__PHSLOGSTRING("[PHS]<-- CPSetCallDivertingBase::OpenVmbxLC" );
return aVmbx.GetVmbxNumber( aTelNumber );
+
}
-
+*/
+// <-- QT PHONE END-->
// ---------------------------------------------------------------------------
// If SsSettings notifies of settings change, copy new value to member variable.
// ---------------------------------------------------------------------------
--- a/cellular/telephonysettings/src/PSetCallDivertingBasicImpl.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PSetCallDivertingBasicImpl.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,26 +17,28 @@
// INCLUDE FILES
-#include "PSetCallDivertingBasicImpl.h"
+#include "PSetCallDivertingBasicImpl.h"
#include <badesca.h>
#include <etelmm.h>
#include <e32math.h>
-#include <vmnumber.h>
+// <-- QT PHONE START -->
+//#include <vmnumber.h>
+// <-- QT PHONE END-->
#include <e32svr.h>
#include <featmgr.h>
#include <centralrepository.h>
-#include <SettingsInternalCRKeys.h>
+#include <settingsinternalcrkeys.h>
-#include "PsetCallDiverting.h"
-#include "PsetContainer.h"
-#include "MPsetDivertObs.h"
-#include "PsetTelephony.h"
-#include "PSetPanic.h"
-#include "MPsetRequestObs.h"
-#include "PSetUtility.h"
-#include "PhoneSettingsLogger.h"
-#include "PsetSAObserver.h"
+#include "psetcalldiverting.h"
+#include "psetcontainer.h"
+#include "mpsetdivertobs.h"
+#include "PsetTelephony.h"
+#include "PSetPanic.h"
+#include "mpsetrequestobs.h"
+#include "PSetUtility.h"
+#include "PhoneSettingsLogger.h"
+#include "psetsaobserver.h"
// LOCAL CONSTANTS AND MACROS
_LIT( KPSetIntNbr, "+" );
@@ -203,7 +205,11 @@
__PHSLOGSTRING("[PHS]--> CPSetCallDivertingBasicImpl::RunL: EPSetChangeDivert" );
//Notify Observer
iDivertStatus.iStatus = PSetUtility::GetChangeInfoStatus( iChangeInfo.iAction );
-
+// <-- QT PHONE START -->
+ iDivertStatus.iNumber = iChangeInfo.iNumber.iTelNumber;
+ iDivertStatus.iCondition = PSetUtility::GetDivertReason(iReason);
+ iDivertStatus.iNoReplyTimer = iChangeInfo.iTimeout;
+// <-- QT PHONE END -->
// Check is done because of VOIP notification functionality(PSetNotesUI).
if ( iVoiceDivert && !iVideoDivert )
{
--- a/cellular/telephonysettings/src/PSetCallDivertingCreator.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PSetCallDivertingCreator.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,14 +18,14 @@
// INCLUDE FILES
-#include "PSetCallDivertingBasicImpl.h"
-#include "PSetCallDivertingDualAffectImpl.h"
-#include "PSetCallDivertingCreator.h"
-#include "PsetVariationProxy.h"
+#include "PSetCallDivertingBasicImpl.h"
+#include "PSetCallDivertingDualAffectImpl.h"
+#include "PSetCallDivertingCreator.h"
+#include "PsetVariationProxy.h"
-#include <PsetCallDiverting.h>
+#include <psetcalldiverting.h>
#include <centralrepository.h>
-#include <telservicesinternalcrkeys.h> // Telephony service local variation keys.
+#include <telservicesinternalcrkeys.h> // telephony service local variation keys.
#include <telservicesvariant.hrh>
--- a/cellular/telephonysettings/src/PSetCallDivertingDualAffectImpl.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PSetCallDivertingDualAffectImpl.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,27 +17,29 @@
// INCLUDE FILES
-#include "PSetCallDivertingDualAffectImpl.h"
-#include "PSetSubscriberIdCheck.h"
+#include "PSetCallDivertingDualAffectImpl.h"
+#include "PSetSubscriberIdCheck.h"
#include <badesca.h>
#include <etelmm.h>
#include <e32math.h>
-#include <vmnumber.h>
+// <-- QT PHONE START -->
+//#include <vmnumber.h>
+// <-- QT PHONE END -->
#include <e32svr.h>
#include <featmgr.h>
#include <centralrepository.h>
-#include <SettingsInternalCRKeys.h>
+#include <settingsinternalcrkeys.h>
-#include "PsetCallDiverting.h"
-#include "PsetContainer.h"
-#include "MPsetDivertObs.h"
-#include "PsetTelephony.h"
-#include "PSetPanic.h"
-#include "MPsetRequestObs.h"
-#include "PSetUtility.h"
-#include "PhoneSettingsLogger.h"
-#include "PsetSAObserver.h"
+#include "psetcalldiverting.h"
+#include "psetcontainer.h"
+#include "mpsetdivertobs.h"
+#include "PsetTelephony.h"
+#include "PSetPanic.h"
+#include "mpsetrequestobs.h"
+#include "PSetUtility.h"
+#include "PhoneSettingsLogger.h"
+#include "psetsaobserver.h"
// LOCAL CONSTANTS AND MACROS
_LIT( KPSetIntNbr, "+" );
--- a/cellular/telephonysettings/src/PSetRefreshHandlerImpl.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PSetRefreshHandlerImpl.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,12 +18,12 @@
// INCLUDE FILES
-#include "PSetRefreshHandlerImpl.h"
+#include "PSetRefreshHandlerImpl.h"
#include <etelmm.h>
#include <msssettingsrefreshhandler.h>
#include <csssettingsrefreshcontainer.h>
-#include <PsetCSP.h>
-#include "PhoneSettingsLogger.h"
+#include <psetcsp.h>
+#include "PhoneSettingsLogger.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/cellular/telephonysettings/src/PSetSubscriberIdCheck.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PSetSubscriberIdCheck.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,7 +17,7 @@
// INCLUDE FILES
-#include "PSetSubscriberIdCheck.h"
+#include "PSetSubscriberIdCheck.h"
_LIT( KRogersImsi, "30272" );
const TInt KMinImsiLength = 5;
--- a/cellular/telephonysettings/src/PSetUtility.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PSetUtility.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDE FILES
-#include "PSetUtility.h"
-#include <RSSSettings.h>
-#include "PhoneSettingsLogger.h"
+#include "PSetUtility.h"
+#include <rsssettings.h>
+#include "PhoneSettingsLogger.h"
// ============================ MEMBER FUNCTIONS ===============================
@@ -311,6 +311,39 @@
}
}
+// <-- QT PHONE START -->
+// ---------------------------------------------------------------------------
+//
+// Returns divert reason
+//
+// ---------------------------------------------------------------------------
+//
+TCallDivertingCondition PSetUtility::GetDivertReason(
+ RMobilePhone::TMobilePhoneCFCondition aCondition )
+ {
+ switch ( aCondition )
+ {
+ /*****************************************************
+ * Series 60 Customer / ETel
+ * Series 60 ETel API
+ *****************************************************/
+ case RMobilePhone::ECallForwardingAllConditionalCases:
+ return EDivertConditionAllConditionalCases;
+ case RMobilePhone::ECallForwardingAllCases:
+ return EDivertConditionAllCalls;
+ case RMobilePhone::ECallForwardingUnconditional:
+ return EDivertConditionUnconditional;
+ case RMobilePhone::ECallForwardingBusy:
+ return EDivertConditionBusy;
+ case RMobilePhone::ECallForwardingNoReply:
+ return EDivertConditionNoReply;
+ case RMobilePhone::ECallForwardingNotReachable:
+ default:
+ return EDivertConditionNotReachable;
+ }
+ }
+// <-- QT PHONE END -->
+
// ---------------------------------------------------------------------------
// Verify that ALS is really used.
// ---------------------------------------------------------------------------
--- a/cellular/telephonysettings/src/PsetCSP.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PsetCSP.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -22,9 +22,9 @@
//INCLUDE FILES
-#include "PsetCSP.h"
+#include "psetcsp.h"
#include <etelmm.h>
-#include "PhoneSettingsLogger.h"
+#include "PhoneSettingsLogger.h"
// MEMBER FUNCTIONS
// ---------------------------------------------------------------------------
--- a/cellular/telephonysettings/src/PsetCallBarring.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PsetCallBarring.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,14 +19,14 @@
// Include Files
#include <etelmm.h>
-#include <RSSSettings.h>
-#include "MPsetRequestObs.h"
-#include "PsetCallBarring.h"
-#include "PsetTelephony.h"
-#include "PSetPanic.h"
-#include "PsetConstants.h"
-#include "PSetUtility.h"
-#include "PhoneSettingsLogger.h"
+#include <rsssettings.h>
+#include "mpsetrequestobs.h"
+#include "psetcallbarring.h"
+#include "PsetTelephony.h"
+#include "PSetPanic.h"
+#include "psetconstants.h"
+#include "PSetUtility.h"
+#include "PhoneSettingsLogger.h"
// CONSTANTS
_LIT( KPSNameOfClass, "CPsetCallBarring" );
@@ -191,17 +191,17 @@
__PHSLOGSTRING1("[PHS] SetBarringL: Password: %S", &aBarring.iPassword);
__PHSLOGSTRING1("[PHS] SetBarringL: Settings: %d", aBarring.iSetting);
- ValidateBsc( aBsc );
-
- if ( aBsc == EAltTele )
- {
- iBarringParameters.iServiceGroup = PSetUtility::VerifyAltLineUseL();
- }
-
- iBarringParameters.iPassword = aBarring.iPassword;
+ ValidateBsc( aBsc );
+
+ if ( aBsc == EAltTele )
+ {
+ iBarringParameters.iServiceGroup = PSetUtility::VerifyAltLineUseL();
+ }
+
+ iBarringParameters.iPassword = aBarring.iPassword;
iBarringParameters.iAction = SetBarringAction( aBarring.iSetting );
iBarringParameters.iServiceGroup = PSetUtility::ChangeToEtelInternal( aBsc );
-
+
__PHSLOGSTRING1("[PHS] SetBarringL: Program: %d", aBarring.iType);
// Start to request barring change.
@@ -258,7 +258,7 @@
iObserver->SetEngineContact( this );
// Does not leave
TRAPD( err, iObserver->HandleCBRequestingL( EFalse, ETrue ) );
-
+
if ( !IsActive() || err != KErrNone )
{
return KErrGeneral;
@@ -555,44 +555,44 @@
RMobilePhone::TMobilePhoneCBInfoEntryV1 cbInfo;
TInt entries = cbStatusList->Enumerate();
__PHSLOGSTRING1("[PHS] HandleInquiryResultL: Entry count: %d", entries);
- TInt i(0);
- TInt cbArray(0);
- // If alternate line in use then only als line service information is shown.
+ TInt i(0);
+ TInt cbArray(0);
+ // If alternate line in use then only als line service information is shown.
if ( iAls == ESSSettingsAlsAlternate )
- {
- while ( entries > i )
- {
- cbInfo = cbStatusList->GetEntryL( i );
+ {
+ while ( entries > i )
+ {
+ cbInfo = cbStatusList->GetEntryL( i );
- if ( cbInfo.iStatus == RMobilePhone::ECallBarringStatusActive && cbInfo.iServiceGroup == RMobilePhone::EAuxVoiceService )
- {
- __PHSLOGSTRING1("[PHS] ALS: iServiceGroup: %d", cbInfo.iServiceGroup);
- status = EBarringStatusActive;
- arrayOfBsc[cbArray] = static_cast <TUint8>
- ( PSetUtility::ChangeToGSM( cbInfo.iServiceGroup ) );
- cbArray++;
- }
- i++;
- }
+ if ( cbInfo.iStatus == RMobilePhone::ECallBarringStatusActive && cbInfo.iServiceGroup == RMobilePhone::EAuxVoiceService )
+ {
+ __PHSLOGSTRING1("[PHS] ALS: iServiceGroup: %d", cbInfo.iServiceGroup);
+ status = EBarringStatusActive;
+ arrayOfBsc[cbArray] = static_cast <TUint8>
+ ( PSetUtility::ChangeToGSM( cbInfo.iServiceGroup ) );
+ cbArray++;
+ }
+ i++;
+ }
}
- else // All other services than alternate line service is allowed to show when primary line is active.
- {
- while ( entries > i )
- {
- cbInfo = cbStatusList->GetEntryL( i );
+ else // All other services than alternate line service is allowed to show when primary line is active.
+ {
+ while ( entries > i )
+ {
+ cbInfo = cbStatusList->GetEntryL( i );
- if ( cbInfo.iStatus == RMobilePhone::ECallBarringStatusActive && cbInfo.iServiceGroup != RMobilePhone::EAuxVoiceService )
- {
- __PHSLOGSTRING1("[PHS] iServiceGroup: %d", cbInfo.iServiceGroup);
- status = EBarringStatusActive;
- arrayOfBsc[cbArray] = static_cast <TUint8>
- ( PSetUtility::ChangeToGSM( cbInfo.iServiceGroup ) );
- cbArray++;
- }
- i++;
- }
- }
-
+ if ( cbInfo.iStatus == RMobilePhone::ECallBarringStatusActive && cbInfo.iServiceGroup != RMobilePhone::EAuxVoiceService )
+ {
+ __PHSLOGSTRING1("[PHS] iServiceGroup: %d", cbInfo.iServiceGroup);
+ status = EBarringStatusActive;
+ arrayOfBsc[cbArray] = static_cast <TUint8>
+ ( PSetUtility::ChangeToGSM( cbInfo.iServiceGroup ) );
+ cbArray++;
+ }
+ i++;
+ }
+ }
+
arrayOfBsc[cbArray] = KPSetUnusedValue;
CleanupStack::PopAndDestroy( cbStatusList );
iObserver->HandleBarringModeStatusL( arrayOfBsc, status );
--- a/cellular/telephonysettings/src/PsetCallDiverting.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PsetCallDiverting.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -22,20 +22,21 @@
#include <e32math.h>
#include <e32svr.h>
#include <badesca.h>
-
-#include <vmnumber.h>
+// <-- QT PHONE START -->
+//#include <vmnumber.h>
+// <-- QT PHONE END-->
#include <centralrepository.h>
-#include <SettingsInternalCRKeys.h>
+#include <settingsinternalcrkeys.h>
-#include "PsetCallDiverting.h"
-#include "PsetContainer.h"
-#include "MPsetDivertObs.h"
-#include "PsetTelephony.h"
-#include "PSetPanic.h"
-#include "PhoneSettingsLogger.h"
+#include "psetcalldiverting.h"
+#include "psetcontainer.h"
+#include "mpsetdivertobs.h"
+#include "PsetTelephony.h"
+#include "PSetPanic.h"
+#include "PhoneSettingsLogger.h"
-#include "PSetCallDivertingCreator.h"
-#include "MCallDiverting.h"
+#include "PSetCallDivertingCreator.h"
+#include "MCallDiverting.h"
// MEMBER FUNCTIONS
// ---------------------------------------------------------------------------
@@ -261,15 +262,20 @@
EXPORT_C void CPsetCallDiverting::SetRequestObserver( MPsetRequestObserver* aObs )
{
iReqObserver = aObs;
+// <-- QT PHONE START -->
+ iDivert->SetRequestObserver(aObs);
+// <-- QT PHONE END -->
}
// ---------------------------------------------------------------------------
// Queries for voice mail box number
// ---------------------------------------------------------------------------
//
-EXPORT_C void CPsetCallDiverting::VoiceMailQueryL( TDes& aTelNumber )
+EXPORT_C void CPsetCallDiverting::VoiceMailQueryL( TDes& /*aTelNumber*/ )
{
__PHSLOGSTRING("[PHS]--> CPsetCallDiverting::VoiceMailQueryL" );
+// <-- QT PHONE START -->
+/*
RVmbxNumber vmbxConnection;
TBool vmbxNrChanged = ETrue;
TInt retValue = iDivert->OpenVmbxLC( aTelNumber, vmbxConnection );
@@ -290,6 +296,8 @@
User::Leave( KErrCancel );
}
CleanupStack::PopAndDestroy(); // vmbxConnection
+ */
+// <-- QT PHONE END-->
__PHSLOGSTRING("[PHS] <--CPsetCallDiverting::VoiceMailQueryL" );
}
@@ -298,9 +306,11 @@
// Queries for voice mail box number
// ---------------------------------------------------------------------------
//
-EXPORT_C void CPsetCallDiverting::VideoMailQueryL( TDes& aTelNumber )
+EXPORT_C void CPsetCallDiverting::VideoMailQueryL( TDes& /*aTelNumber*/ )
{
__PHSLOGSTRING("[PHS]--> CPsetCallDiverting::VideoMailQueryL" );
+ // <-- QT PHONE START -->
+ /*
RVmbxNumber vmbxConnection;
TBool vmbxNrChanged = ETrue;
TInt retValue = OpenVideoMailboxLC( aTelNumber, vmbxConnection );
@@ -321,6 +331,8 @@
User::Leave( KErrCancel );
}
CleanupStack::PopAndDestroy(); // vmbxConnection
+ */
+ // <-- QT PHONE END-->
__PHSLOGSTRING("[PHS] <--CPsetCallDiverting::VideoMailQueryL" );
}
@@ -329,13 +341,18 @@
// Opens Vmbx. Leaves vmbx to the stack.
// ---------------------------------------------------------------------------
//
-TInt CPsetCallDiverting::OpenVideoMailboxLC( TDes& aTelNumber, RVmbxNumber& aVmbx )
+// <-- QT PHONE START -->
+TInt CPsetCallDiverting::OpenVideoMailboxLC( TDes& /*aTelNumber*/, RVmbxNumber& /*aVmbx*/ )
{
+/*
__PHSLOGSTRING("[PHS]--> CPsetCallDiverting::OpenVideoMailboxLC" );
User::LeaveIfError( aVmbx.Open( iPhone ) );
CleanupClosePushL( aVmbx );
- __PHSLOGSTRING("[PHS]<-- CPsetCallDiverting::OpenVideoMailboxLC" );
+ __PHSLOGSTRING("[PHS]<-- CPsetCallDiverting::OpenVideoMailboxLC" );
return aVmbx.GetVideoMbxNumber( aTelNumber );
+*/
+ return 0;
+// <-- QT PHONE END -->
}
// End of File
--- a/cellular/telephonysettings/src/PsetCallWaiting.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PsetCallWaiting.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,17 +18,17 @@
// Include Files
-#include "PsetCallWaiting.h"
-#include "MPsetCallWaitingObs.h"
+#include "psetcallwaiting.h"
+#include "mpsetcallwaitingobs.h"
#include "nwdefs.h"
-#include "PSetPanic.h"
-#include "PsetConstants.h"
-#include "MPsetRequestObs.h"
-#include "PSetUtility.h"
-#include "PhoneSettingsLogger.h"
+#include "PSetPanic.h"
+#include "psetconstants.h"
+#include "mpsetrequestobs.h"
+#include "PSetUtility.h"
+#include "PhoneSettingsLogger.h"
-#include "PsetVariationProxy.h"
-#include <settingsinternalcrkeys.h>
+#include "PsetVariationProxy.h"
+#include <settingsinternalcrkeys.h>
// CONSTANTS
_LIT( KPSNameOfClass, "CPsetCallWaiting" );
@@ -107,14 +107,14 @@
Cancel();
iReqObserver = NULL;
- if ( iSsSettings )
+ if ( iSsSettings )
{
iSsSettings->Cancel( ESSSettingsAls, *this );
iSsSettings->Close();
}
delete iSsSettings;
iSsSettings = NULL;
-
+
delete iCwInterrogator;
iCwInterrogator = NULL;
}
@@ -125,14 +125,14 @@
//
// ---------------------------------------------------------------------------
void CPsetCallWaiting::PhoneSettingChanged( TSSSettingsSetting aSetting, TInt aNewValue )
- {
- __PHSLOGSTRING("[PHS]--> PhoneSettingChanged::ValidateBsc" );
- if ( aSetting == ESSSettingsAls )
+ {
+ __PHSLOGSTRING("[PHS]--> PhoneSettingChanged::ValidateBsc" );
+ if ( aSetting == ESSSettingsAls )
{
iAls = static_cast <TSSSettingsAlsValue> (aNewValue);
}
__PHSLOGSTRING("[PHS] <--PhoneSettingChanged::ValidateBsc" );
- }
+ }
// ---------------------------------------------------------------------------
//
@@ -193,14 +193,14 @@
RMobilePhone::TMobileService cwBasicServiceGroup;
- ValidateBsc( aBsc );
+ ValidateBsc( aBsc );
if ( aBsc == EAltTele )
{
cwBasicServiceGroup = PSetUtility::VerifyAltLineUseL();
}
- cwBasicServiceGroup = PSetUtility::ChangeToEtelInternal( aBsc );
+ cwBasicServiceGroup = PSetUtility::ChangeToEtelInternal( aBsc );
if ( aSetting == EActivateCallWaiting )
{
@@ -272,8 +272,8 @@
// even though request is not active.
iObserver->SetEngineContact( *this );
// Does not leave
- TRAPD( err, iObserver->HandleCWRequestingL( EFalse, ETrue ) );
-
+ TRAPD( err, iObserver->HandleCWRequestingL( EFalse, ETrue ) );
+
if ( !IsActive() || err != KErrNone )
{
return KErrGeneral;
@@ -347,25 +347,25 @@
// pass on the status if the current status is still
// unknown and the received status is not unknown
switch ( cwInfo.iStatus )
- {
- case RMobilePhone::ECallWaitingStatusNotProvisioned:
- {
- status = EStatusNotProvisioned;
- break;
- }
-
- case RMobilePhone::ECallWaitingStatusNotAvailable:
- {
- status = EStatusNotAvailable;
- break;
- }
-
- default:
- {
- status = TGetCallWaitingStatus( cwInfo.iStatus );
- break;
- }
- }
+ {
+ case RMobilePhone::ECallWaitingStatusNotProvisioned:
+ {
+ status = EStatusNotProvisioned;
+ break;
+ }
+
+ case RMobilePhone::ECallWaitingStatusNotAvailable:
+ {
+ status = EStatusNotAvailable;
+ break;
+ }
+
+ default:
+ {
+ status = TGetCallWaitingStatus( cwInfo.iStatus );
+ break;
+ }
+ }
}
arrayOfBsc[i] = static_cast <TUint8>
--- a/cellular/telephonysettings/src/PsetCli.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PsetCli.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,10 +18,10 @@
//INCLUDE FILES
-#include "PsetCli.h"
-#include "PSetPanic.h"
-#include "PsetConstants.h"
-#include "MPsetRequestObs.h"
+#include "psetcli.h"
+#include "PSetPanic.h"
+#include "psetconstants.h"
+#include "mpsetrequestobs.h"
#include <bldvariant.hrh>
#include <featmgr.h>
--- a/cellular/telephonysettings/src/PsetContainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PsetContainer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,9 +20,9 @@
// INCLUDES
-#include "PsetContainer.h"
-#include "PsetConstants.h"
-#include "PSetRefreshHandlerImpl.h"
+#include "psetcontainer.h"
+#include "psetconstants.h"
+#include "PSetRefreshHandlerImpl.h"
#include <mmtsy_names.h>
// ---------------------------------------------------------------------------
--- a/cellular/telephonysettings/src/PsetNetwork.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PsetNetwork.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,18 +18,18 @@
// INCLUDE FILES
-#include "MPsetNetworkInfoObs.h"
-#include "PsetNetwork.h"
-#include "PsetSAObserver.h"
-#include "PSetPanic.h"
-#include "PsetConstants.h"
-#include "MPsetNetworkSelect.h"
+#include "mpsetnetworkinfoobs.h"
+#include "psetnetwork.h"
+#include "psetsaobserver.h"
+#include "PSetPanic.h"
+#include "psetconstants.h"
+#include "mpsetnetworkselect.h"
#include <etelmm.h>
#include <mmretrieve.h>
#include <rmmcustomapi.h>
#include <e32svr.h>
-#include "PhoneSettingsLogger.h"
+#include "PhoneSettingsLogger.h"
// LOCAL CONSTANTS AND MACROS
_LIT( KPSNameOfClass, "CPsetNetwork" );
@@ -564,7 +564,7 @@
__PHSLOGSTRING("[PHS]--> CPsetNetwork::ResetNetworkSearch");
RMmCustomAPI customApi;
TInt error = customApi.Open( iPhone );
- if (error == KErrNone)
+ if (error == KErrNone)
{
customApi.ResetNetServer();
}
--- a/cellular/telephonysettings/src/PsetSAObserver.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PsetSAObserver.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,15 +20,15 @@
// INCLUDE FILES
#include <centralrepository.h>
#include <ctsydomainpskeys.h>
-#include <telservicesinternalcrkeys.h> // Telephony service local variation keys.
+#include <telservicesinternalcrkeys.h> // telephony service local variation keys.
#include <telservicesvariant.hrh>
-#include "PsetSAObserver.h"
-#include "MPsetNetworkInfoObs.h"
-#include "MPsetDivertObs.h"
-#include "PhoneSettingsLogger.h"
-#include "PSetUtility.h"
-#include "PsetVariationProxy.h"
+#include "psetsaobserver.h"
+#include "mpsetnetworkinfoobs.h"
+#include "mpsetdivertobs.h"
+#include "PhoneSettingsLogger.h"
+#include "PSetUtility.h"
+#include "PsetVariationProxy.h"
//CONSTANTS
const TInt KPsetRequesterUncertain = 0;
@@ -116,7 +116,7 @@
__PHSLOGSTRING("[PHS]--> CPsetSAObserver::IsGPRSConnected" );
TInt connectionStatus = KErrGeneral;
- TInt error = RProperty::Get( KUidSystemCategory,
+ TInt error = RProperty::Get( KUidSystemCategory,
KPSUidGprsStatusValue,
connectionStatus );
@@ -305,7 +305,7 @@
TInt package = aDivertNotify.iPreviousCfStatus;
TPckg<TInt> indicatorPckg( package );
TInt error = iRepository->Set( KCtsyUnconditionalCFStatus, indicatorPckg );
- __PHSLOGSTRING("[PHS]<-- CPsetSAObserver::NotifyDivertChange" );
+ __PHSLOGSTRING("[PHS]<-- CPsetSAObserver::NotifyDivertChange" );
}
// ---------------------------------------------------------------------------
--- a/cellular/telephonysettings/src/PsetTelephony.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PsetTelephony.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -21,9 +21,9 @@
#include <etelmm.h>
#include <e32svr.h>
#include <mmtsy_names.h>
-#include "PsetConstants.h"
-#include "PsetTelephony.h"
-#include "PhoneSettingsLogger.h"
+#include "psetconstants.h"
+#include "PsetTelephony.h"
+#include "PhoneSettingsLogger.h"
// MEMBER FUNCTIONS
// ---------------------------------------------------------------------------
--- a/cellular/telephonysettings/src/PsetVariationProxy.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/cellular/telephonysettings/src/PsetVariationProxy.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
*/
-#include "PsetVariationProxy.h"
+#include "PsetVariationProxy.h"
#include <centralrepository.h>
-#include <settingsinternalcrkeys.h>
+#include <settingsinternalcrkeys.h>
#include <telservicesinternalcrkeys.h>
// ---------------------------------------------------------------------------
@@ -27,16 +27,16 @@
// ---------------------------------------------------------------------------
//
CPSetVariationProxy::CPSetVariationProxy()
- {
- }
+ {
+ }
// ---------------------------------------------------------------------------
// Destructor
// ---------------------------------------------------------------------------
//
CPSetVariationProxy::~CPSetVariationProxy()
- {
- }
+ {
+ }
// ---------------------------------------------------------------------------
// NewL
@@ -45,13 +45,13 @@
CPSetVariationProxy* CPSetVariationProxy::NewL(
const TUid& aUid,
const TUint aId )
- {
- CPSetVariationProxy* self = new ( ELeave ) CPSetVariationProxy();
+ {
+ CPSetVariationProxy* self = new ( ELeave ) CPSetVariationProxy();
CleanupStack::PushL( self );
self->ConstructL( aUid, aId );
CleanupStack::Pop( self );
return self;
- }
+ }
// ---------------------------------------------------------------------------
// ConstructL
@@ -60,29 +60,29 @@
void CPSetVariationProxy::ConstructL(
const TUid& aUid,
const TUint aId )
- {
- TInt keySetting = 0;
- CRepository* centralRepository = CRepository::NewLC( aUid );
- User::LeaveIfError( centralRepository->Get( aId, keySetting ) );
-
- if( ( aUid == KCRUidPhoneSettings ) &&
+ {
+ TInt keySetting = 0;
+ CRepository* centralRepository = CRepository::NewLC( aUid );
+ User::LeaveIfError( centralRepository->Get( aId, keySetting ) );
+
+ if( ( aUid == KCRUidPhoneSettings ) &&
( keySetting ) )
- {
- iFeature |= KCallWaitingDistiquishNotProvisioned;
- }
- else if ( aUid == KCRUidTelSrvVariation )
- {
- iFeature |= keySetting;
- }
-
- CleanupStack::PopAndDestroy( centralRepository );
- }
+ {
+ iFeature |= KCallWaitingDistiquishNotProvisioned;
+ }
+ else if ( aUid == KCRUidTelSrvVariation )
+ {
+ iFeature |= keySetting;
+ }
+
+ CleanupStack::PopAndDestroy( centralRepository );
+ }
// ---------------------------------------------------------------------------
// IsFeatureEnabled
// ---------------------------------------------------------------------------
//
TBool CPSetVariationProxy::IsFeatureEnabled( TUint aFeature ) const
- {
- return aFeature&iFeature;
- }
+ {
+ return aFeature&iFeature;
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/bwins/psetwrapperu.def Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,109 @@
+EXPORTS
+ ?getAvailableNetworks@PSetNetworkWrapper@@QAEXXZ @ 1 NONAME ; void PSetNetworkWrapper::getAvailableNetworks(void)
+ ?trUtf8@PSetWrapper@@SA?AVQString@@PBD0@Z @ 2 NONAME ; class QString PSetWrapper::trUtf8(char const *, char const *)
+ ?getStaticMetaObject@PSetWrapper@@SAABUQMetaObject@@XZ @ 3 NONAME ; struct QMetaObject const & PSetWrapper::getStaticMetaObject(void)
+ ?staticMetaObject@PSetCallWaitingWrapper@@2UQMetaObject@@B @ 4 NONAME ; struct QMetaObject const PSetCallWaitingWrapper::staticMetaObject
+ ?staticMetaObject@PSetWrapper@@2UQMetaObject@@B @ 5 NONAME ; struct QMetaObject const PSetWrapper::staticMetaObject
+ ??_EPSetWrapper@@UAE@I@Z @ 6 NONAME ; PSetWrapper::~PSetWrapper(unsigned int)
+ ?trUtf8@PSetCallWaitingWrapper@@SA?AVQString@@PBD0@Z @ 7 NONAME ; class QString PSetCallWaitingWrapper::trUtf8(char const *, char const *)
+ ?validateDivertNumber@PSetCallDivertingWrapper@@ABEHABVTDesC16@@@Z @ 8 NONAME ; int PSetCallDivertingWrapper::validateDivertNumber(class TDesC16 const &) const
+ ?qt_metacast@PSetNetworkWrapper@@UAEPAXPBD@Z @ 9 NONAME ; void * PSetNetworkWrapper::qt_metacast(char const *)
+ ?metaObject@PSetWrapper@@UBEPBUQMetaObject@@XZ @ 10 NONAME ; struct QMetaObject const * PSetWrapper::metaObject(void) const
+ ?callDivertingWrapper@PSetWrapper@@QAEAAVPSetCallDivertingWrapper@@XZ @ 11 NONAME ; class PSetCallDivertingWrapper & PSetWrapper::callDivertingWrapper(void)
+ ?getDefaultNumbers@PSetCallDivertingWrapper@@QAEXAAVQStringList@@@Z @ 12 NONAME ; void PSetCallDivertingWrapper::getDefaultNumbers(class QStringList &)
+ ?getVoiceMailBoxNumber@PSetCallDivertingWrapper@@QAEXAAVQString@@@Z @ 13 NONAME ; void PSetCallDivertingWrapper::getVoiceMailBoxNumber(class QString &)
+ ?getCallWaitingStatus@PSetCallWaitingWrapper@@QAEXXZ @ 14 NONAME ; void PSetCallWaitingWrapper::getCallWaitingStatus(void)
+ ?tr@PSetCliWrapper@@SA?AVQString@@PBD0@Z @ 15 NONAME ; class QString PSetCliWrapper::tr(char const *, char const *)
+ ?cliInformation@PSetCliWrapper@@IAEXABW4PsCallLineIdentity@@@Z @ 16 NONAME ; void PSetCliWrapper::cliInformation(enum PsCallLineIdentity const &)
+ ?handleDivertingError@PSetCallDivertingWrapper@@IAEXH@Z @ 17 NONAME ; void PSetCallDivertingWrapper::handleDivertingError(int)
+ ?tr@PSetWrapper@@SA?AVQString@@PBD0H@Z @ 18 NONAME ; class QString PSetWrapper::tr(char const *, char const *, int)
+ ?staticMetaObject@PSetCliWrapper@@2UQMetaObject@@B @ 19 NONAME ; struct QMetaObject const PSetCliWrapper::staticMetaObject
+ ?cancelRequest@PSetNetworkWrapper@@QAEXXZ @ 20 NONAME ; void PSetNetworkWrapper::cancelRequest(void)
+ ?getClipMode@PSetCliWrapper@@QAEXXZ @ 21 NONAME ; void PSetCliWrapper::getClipMode(void)
+ ??0PSetCallDivertingWrapper@@QAE@AAVCPsetContainer@@PAVQObject@@@Z @ 22 NONAME ; PSetCallDivertingWrapper::PSetCallDivertingWrapper(class CPsetContainer &, class QObject *)
+ ?metaObject@PSetCliWrapper@@UBEPBUQMetaObject@@XZ @ 23 NONAME ; struct QMetaObject const * PSetCliWrapper::metaObject(void) const
+ ?tr@PSetCallWaitingWrapper@@SA?AVQString@@PBD0@Z @ 24 NONAME ; class QString PSetCallWaitingWrapper::tr(char const *, char const *)
+ ?qt_metacast@PSetCallDivertingWrapper@@UAEPAXPBD@Z @ 25 NONAME ; void * PSetCallDivertingWrapper::qt_metacast(char const *)
+ ?getNetworkAccessMode@PSetNetworkWrapper@@QBEXXZ @ 26 NONAME ; void PSetNetworkWrapper::getNetworkAccessMode(void) const
+ ??1PSetCallWaitingWrapper@@UAE@XZ @ 27 NONAME ; PSetCallWaitingWrapper::~PSetCallWaitingWrapper(void)
+ ?callWaitingWrapper@PSetWrapper@@QAEAAVPSetCallWaitingWrapper@@XZ @ 28 NONAME ; class PSetCallWaitingWrapper & PSetWrapper::callWaitingWrapper(void)
+ ?handleCnapStatus@PSetCliWrapper@@IAEXH@Z @ 29 NONAME ; void PSetCliWrapper::handleCnapStatus(int)
+ ?availableNetworksGot@PSetNetworkWrapper@@IAEXAAV?$QList@PAUNetworkInfo@PSetNetworkWrapper@@@@@Z @ 30 NONAME ; void PSetNetworkWrapper::availableNetworksGot(class QList<struct PSetNetworkWrapper::NetworkInfo *> &)
+ ?handleCallWaitingChanged@PSetCallWaitingWrapper@@IAEXW4PsCallWaitingCommand@1@H@Z @ 31 NONAME ; void PSetCallWaitingWrapper::handleCallWaitingChanged(enum PSetCallWaitingWrapper::PsCallWaitingCommand, int)
+ ?metaObject@PSetCallDivertingWrapper@@UBEPBUQMetaObject@@XZ @ 32 NONAME ; struct QMetaObject const * PSetCallDivertingWrapper::metaObject(void) const
+ ?cancelProcess@PSetCallDivertingWrapper@@QAEXXZ @ 33 NONAME ; void PSetCallDivertingWrapper::cancelProcess(void)
+ ?networkWrapper@PSetWrapper@@QAEAAVPSetNetworkWrapper@@XZ @ 34 NONAME ; class PSetNetworkWrapper & PSetWrapper::networkWrapper(void)
+ ?getColpMode@PSetCliWrapper@@QAEXXZ @ 35 NONAME ; void PSetCliWrapper::getColpMode(void)
+ ?requestingSelectedNetwork@PSetNetworkWrapper@@IAEX_N@Z @ 36 NONAME ; void PSetNetworkWrapper::requestingSelectedNetwork(bool)
+ ?qt_metacall@PSetNetworkWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 37 NONAME ; int PSetNetworkWrapper::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?handleDivertingChanged@PSetCallDivertingWrapper@@IAEXABVPSCallDivertingCommand@@_N@Z @ 38 NONAME ; void PSetCallDivertingWrapper::handleDivertingChanged(class PSCallDivertingCommand const &, bool)
+ ?trUtf8@PSetCallWaitingWrapper@@SA?AVQString@@PBD0H@Z @ 39 NONAME ; class QString PSetCallWaitingWrapper::trUtf8(char const *, char const *, int)
+ ?networkChanged@PSetNetworkWrapper@@IAEXAAUNetworkInfo@1@AAW4RegistrationStatus@1@@Z @ 40 NONAME ; void PSetNetworkWrapper::networkChanged(struct PSetNetworkWrapper::NetworkInfo &, enum PSetNetworkWrapper::RegistrationStatus &)
+ ?cliWrapper@PSetWrapper@@QAEAAVPSetCliWrapper@@XZ @ 41 NONAME ; class PSetCliWrapper & PSetWrapper::cliWrapper(void)
+ ?handleCliStatus@PSetCliWrapper@@IAEXPAEHABW4PsCallLineIdentity@@@Z @ 42 NONAME ; void PSetCliWrapper::handleCliStatus(unsigned char *, int, enum PsCallLineIdentity const &)
+ ?qt_metacall@PSetCallDivertingWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 43 NONAME ; int PSetCallDivertingWrapper::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?trUtf8@PSetCallDivertingWrapper@@SA?AVQString@@PBD0H@Z @ 44 NONAME ; class QString PSetCallDivertingWrapper::trUtf8(char const *, char const *, int)
+ ?getNetworkSelectionMode@PSetNetworkWrapper@@QBE?AW4ErrorCode@1@AAW4NetworkSelectionMode@1@@Z @ 45 NONAME ; enum PSetNetworkWrapper::ErrorCode PSetNetworkWrapper::getNetworkSelectionMode(enum PSetNetworkWrapper::NetworkSelectionMode &) const
+ ?tr@PSetNetworkWrapper@@SA?AVQString@@PBD0@Z @ 46 NONAME ; class QString PSetNetworkWrapper::tr(char const *, char const *)
+ ?qt_metacast@PSetCliWrapper@@UAEPAXPBD@Z @ 47 NONAME ; void * PSetCliWrapper::qt_metacast(char const *)
+ ?staticMetaObject@PSetCallDivertingWrapper@@2UQMetaObject@@B @ 48 NONAME ; struct QMetaObject const PSetCallDivertingWrapper::staticMetaObject
+ ??0PSetCliWrapper@@QAE@AAVCPsetContainer@@PAVQObject@@@Z @ 49 NONAME ; PSetCliWrapper::PSetCliWrapper(class CPsetContainer &, class QObject *)
+ ?trUtf8@PSetCliWrapper@@SA?AVQString@@PBD0@Z @ 50 NONAME ; class QString PSetCliWrapper::trUtf8(char const *, char const *)
+ ??0PSetNetworkWrapper@@QAE@AAVCPsetContainer@@PAVQObject@@@Z @ 51 NONAME ; PSetNetworkWrapper::PSetNetworkWrapper(class CPsetContainer &, class QObject *)
+ ?qt_metacall@PSetCallWaitingWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 52 NONAME ; int PSetCallWaitingWrapper::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?networkAccessModeGot@PSetNetworkWrapper@@IAEXH@Z @ 53 NONAME ; void PSetNetworkWrapper::networkAccessModeGot(int)
+ ?searchingNetworks@PSetNetworkWrapper@@IAEXAAW4RequestType@1@@Z @ 54 NONAME ; void PSetNetworkWrapper::searchingNetworks(enum PSetNetworkWrapper::RequestType &)
+ ?trUtf8@PSetNetworkWrapper@@SA?AVQString@@PBD0@Z @ 55 NONAME ; class QString PSetNetworkWrapper::trUtf8(char const *, char const *)
+ ?getClirMode@PSetCliWrapper@@QAEXXZ @ 56 NONAME ; void PSetCliWrapper::getClirMode(void)
+ ?getStaticMetaObject@PSetCliWrapper@@SAABUQMetaObject@@XZ @ 57 NONAME ; struct QMetaObject const & PSetCliWrapper::getStaticMetaObject(void)
+ ?handleDivertingStatus@PSetCallDivertingWrapper@@IAEXAAV?$QList@PAVPSCallDivertingStatus@@@@_N@Z @ 58 NONAME ; void PSetCallDivertingWrapper::handleDivertingStatus(class QList<class PSCallDivertingStatus *> &, bool)
+ ??1PSetCallDivertingWrapper@@UAE@XZ @ 59 NONAME ; PSetCallDivertingWrapper::~PSetCallDivertingWrapper(void)
+ ?selectNetwork@PSetNetworkWrapper@@QAEXABUNetworkInfo@1@@Z @ 60 NONAME ; void PSetNetworkWrapper::selectNetwork(struct PSetNetworkWrapper::NetworkInfo const &)
+ ?qt_metacall@PSetWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 61 NONAME ; int PSetWrapper::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?trUtf8@PSetNetworkWrapper@@SA?AVQString@@PBD0H@Z @ 62 NONAME ; class QString PSetNetworkWrapper::trUtf8(char const *, char const *, int)
+ ?trUtf8@PSetCallDivertingWrapper@@SA?AVQString@@PBD0@Z @ 63 NONAME ; class QString PSetCallDivertingWrapper::trUtf8(char const *, char const *)
+ ?tr@PSetCallDivertingWrapper@@SA?AVQString@@PBD0H@Z @ 64 NONAME ; class QString PSetCallDivertingWrapper::tr(char const *, char const *, int)
+ ?handleCliRequesting@PSetCliWrapper@@IAEX_N0@Z @ 65 NONAME ; void PSetCliWrapper::handleCliRequesting(bool, bool)
+ ?handleCallWaitingError@PSetCallWaitingWrapper@@IAEXH@Z @ 66 NONAME ; void PSetCallWaitingWrapper::handleCallWaitingError(int)
+ ?getStaticMetaObject@PSetCallWaitingWrapper@@SAABUQMetaObject@@XZ @ 67 NONAME ; struct QMetaObject const & PSetCallWaitingWrapper::getStaticMetaObject(void)
+ ?metaObject@PSetCallWaitingWrapper@@UBEPBUQMetaObject@@XZ @ 68 NONAME ; struct QMetaObject const * PSetCallWaitingWrapper::metaObject(void) const
+ ?trUtf8@PSetWrapper@@SA?AVQString@@PBD0H@Z @ 69 NONAME ; class QString PSetWrapper::trUtf8(char const *, char const *, int)
+ ?getCallDivertingStatus@PSetCallDivertingWrapper@@QAEXV?$QFlags@W4PsService@@@@W4PsCallDivertingCondition@@H@Z @ 70 NONAME ; void PSetCallDivertingWrapper::getCallDivertingStatus(class QFlags<enum PsService>, enum PsCallDivertingCondition, int)
+ ?tr@PSetWrapper@@SA?AVQString@@PBD0@Z @ 71 NONAME ; class QString PSetWrapper::tr(char const *, char const *)
+ ?setNetworkAccessMode@PSetNetworkWrapper@@QAEXW4NetworkAccessMode@1@@Z @ 72 NONAME ; void PSetNetworkWrapper::setNetworkAccessMode(enum PSetNetworkWrapper::NetworkAccessMode)
+ ?setCallDiverting@PSetCallDivertingWrapper@@QAEHAAVPSCallDivertingCommand@@H@Z @ 73 NONAME ; int PSetCallDivertingWrapper::setCallDiverting(class PSCallDivertingCommand &, int)
+ ??1PSetCliWrapper@@UAE@XZ @ 74 NONAME ; PSetCliWrapper::~PSetCliWrapper(void)
+ ?getColrMode@PSetCliWrapper@@QAEXXZ @ 75 NONAME ; void PSetCliWrapper::getColrMode(void)
+ ??0PSetWrapper@@QAE@PAVQObject@@@Z @ 76 NONAME ; PSetWrapper::PSetWrapper(class QObject *)
+ ?qt_metacall@PSetCliWrapper@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 77 NONAME ; int PSetCliWrapper::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?handleCallWaitingRequesting@PSetCallWaitingWrapper@@IAEX_N0@Z @ 78 NONAME ; void PSetCallWaitingWrapper::handleCallWaitingRequesting(bool, bool)
+ ?handleCliError@PSetCliWrapper@@IAEXH@Z @ 79 NONAME ; void PSetCliWrapper::handleCliError(int)
+ ?cancelAll@PSetCliWrapper@@QAEXXZ @ 80 NONAME ; void PSetCliWrapper::cancelAll(void)
+ ??1PSetWrapper@@UAE@XZ @ 81 NONAME ; PSetWrapper::~PSetWrapper(void)
+ ?handleCFRequesting@PSetCallDivertingWrapper@@IAEX_N0@Z @ 82 NONAME ; void PSetCallDivertingWrapper::handleCFRequesting(bool, bool)
+ ?networkReqestFailed@PSetNetworkWrapper@@IAEXW4ErrorCode@1@W4RequestType@1@@Z @ 83 NONAME ; void PSetNetworkWrapper::networkReqestFailed(enum PSetNetworkWrapper::ErrorCode, enum PSetNetworkWrapper::RequestType)
+ ?cancelProcess@PSetCallWaitingWrapper@@QAEXXZ @ 84 NONAME ; void PSetCallWaitingWrapper::cancelProcess(void)
+ ?setNewDefaultNumber@PSetCallDivertingWrapper@@QAEXVQString@@@Z @ 85 NONAME ; void PSetCallDivertingWrapper::setNewDefaultNumber(class QString)
+ ?findPlus@PSetCallDivertingWrapper@@ABE_NABVTDesC16@@@Z @ 86 NONAME ; bool PSetCallDivertingWrapper::findPlus(class TDesC16 const &) const
+ ??_EPSetNetworkWrapper@@UAE@I@Z @ 87 NONAME ; PSetNetworkWrapper::~PSetNetworkWrapper(unsigned int)
+ ??_EPSetCallDivertingWrapper@@UAE@I@Z @ 88 NONAME ; PSetCallDivertingWrapper::~PSetCallDivertingWrapper(unsigned int)
+ ?setCallWaiting@PSetCallWaitingWrapper@@QAEXW4PsCallWaitingCommand@1@H@Z @ 89 NONAME ; void PSetCallWaitingWrapper::setCallWaiting(enum PSetCallWaitingWrapper::PsCallWaitingCommand, int)
+ ??_EPSetCliWrapper@@UAE@I@Z @ 90 NONAME ; PSetCliWrapper::~PSetCliWrapper(unsigned int)
+ ?trUtf8@PSetCliWrapper@@SA?AVQString@@PBD0H@Z @ 91 NONAME ; class QString PSetCliWrapper::trUtf8(char const *, char const *, int)
+ ?handleCallWaitingGetStatus@PSetCallWaitingWrapper@@IAEXW4PsCallWaitingStatus@1@ABV?$QList@E@@@Z @ 92 NONAME ; void PSetCallWaitingWrapper::handleCallWaitingGetStatus(enum PSetCallWaitingWrapper::PsCallWaitingStatus, class QList<unsigned char> const &)
+ ?tr@PSetCallDivertingWrapper@@SA?AVQString@@PBD0@Z @ 93 NONAME ; class QString PSetCallDivertingWrapper::tr(char const *, char const *)
+ ?requestDone@PSetCallDivertingWrapper@@IAEXXZ @ 94 NONAME ; void PSetCallDivertingWrapper::requestDone(void)
+ ?qt_metacast@PSetWrapper@@UAEPAXPBD@Z @ 95 NONAME ; void * PSetWrapper::qt_metacast(char const *)
+ ?getCnap@PSetCliWrapper@@QAEXXZ @ 96 NONAME ; void PSetCliWrapper::getCnap(void)
+ ?tr@PSetCliWrapper@@SA?AVQString@@PBD0H@Z @ 97 NONAME ; class QString PSetCliWrapper::tr(char const *, char const *, int)
+ ?getStaticMetaObject@PSetCallDivertingWrapper@@SAABUQMetaObject@@XZ @ 98 NONAME ; struct QMetaObject const & PSetCallDivertingWrapper::getStaticMetaObject(void)
+ ?metaObject@PSetNetworkWrapper@@UBEPBUQMetaObject@@XZ @ 99 NONAME ; struct QMetaObject const * PSetNetworkWrapper::metaObject(void) const
+ ?tr@PSetNetworkWrapper@@SA?AVQString@@PBD0H@Z @ 100 NONAME ; class QString PSetNetworkWrapper::tr(char const *, char const *, int)
+ ?staticMetaObject@PSetNetworkWrapper@@2UQMetaObject@@B @ 101 NONAME ; struct QMetaObject const PSetNetworkWrapper::staticMetaObject
+ ?qt_metacast@PSetCallWaitingWrapper@@UAEPAXPBD@Z @ 102 NONAME ; void * PSetCallWaitingWrapper::qt_metacast(char const *)
+ ??1PSetNetworkWrapper@@UAE@XZ @ 103 NONAME ; PSetNetworkWrapper::~PSetNetworkWrapper(void)
+ ?tr@PSetCallWaitingWrapper@@SA?AVQString@@PBD0H@Z @ 104 NONAME ; class QString PSetCallWaitingWrapper::tr(char const *, char const *, int)
+ ??0PSetCallWaitingWrapper@@QAE@AAVCPsetContainer@@PAVQObject@@@Z @ 105 NONAME ; PSetCallWaitingWrapper::PSetCallWaitingWrapper(class CPsetContainer &, class QObject *)
+ ??_EPSetCallWaitingWrapper@@UAE@I@Z @ 106 NONAME ; PSetCallWaitingWrapper::~PSetCallWaitingWrapper(unsigned int)
+ ?getStaticMetaObject@PSetNetworkWrapper@@SAABUQMetaObject@@XZ @ 107 NONAME ; struct QMetaObject const & PSetNetworkWrapper::getStaticMetaObject(void)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/eabi/psetwrapperu.def Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,109 @@
+EXPORTS
+ _ZN11PSetWrapper10cliWrapperEv @ 1 NONAME
+ _ZN11PSetWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 2 NONAME
+ _ZN11PSetWrapper11qt_metacastEPKc @ 3 NONAME
+ _ZN11PSetWrapper14networkWrapperEv @ 4 NONAME
+ _ZN11PSetWrapper16staticMetaObjectE @ 5 NONAME DATA 16
+ _ZN11PSetWrapper18callWaitingWrapperEv @ 6 NONAME
+ _ZN11PSetWrapper19getStaticMetaObjectEv @ 7 NONAME
+ _ZN11PSetWrapper20callDivertingWrapperEv @ 8 NONAME
+ _ZN11PSetWrapperC1EP7QObject @ 9 NONAME
+ _ZN11PSetWrapperC2EP7QObject @ 10 NONAME
+ _ZN11PSetWrapperD0Ev @ 11 NONAME
+ _ZN11PSetWrapperD1Ev @ 12 NONAME
+ _ZN11PSetWrapperD2Ev @ 13 NONAME
+ _ZN14PSetCliWrapper11getClipModeEv @ 14 NONAME
+ _ZN14PSetCliWrapper11getClirModeEv @ 15 NONAME
+ _ZN14PSetCliWrapper11getColpModeEv @ 16 NONAME
+ _ZN14PSetCliWrapper11getColrModeEv @ 17 NONAME
+ _ZN14PSetCliWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 18 NONAME
+ _ZN14PSetCliWrapper11qt_metacastEPKc @ 19 NONAME
+ _ZN14PSetCliWrapper14cliInformationERK18PsCallLineIdentity @ 20 NONAME
+ _ZN14PSetCliWrapper14handleCliErrorEi @ 21 NONAME
+ _ZN14PSetCliWrapper15handleCliStatusEPhiRK18PsCallLineIdentity @ 22 NONAME
+ _ZN14PSetCliWrapper16handleCnapStatusEi @ 23 NONAME
+ _ZN14PSetCliWrapper16staticMetaObjectE @ 24 NONAME DATA 16
+ _ZN14PSetCliWrapper19getStaticMetaObjectEv @ 25 NONAME
+ _ZN14PSetCliWrapper19handleCliRequestingEbb @ 26 NONAME
+ _ZN14PSetCliWrapper7getCnapEv @ 27 NONAME
+ _ZN14PSetCliWrapper9cancelAllEv @ 28 NONAME
+ _ZN14PSetCliWrapperC1ER14CPsetContainerP7QObject @ 29 NONAME
+ _ZN14PSetCliWrapperC2ER14CPsetContainerP7QObject @ 30 NONAME
+ _ZN14PSetCliWrapperD0Ev @ 31 NONAME
+ _ZN14PSetCliWrapperD1Ev @ 32 NONAME
+ _ZN14PSetCliWrapperD2Ev @ 33 NONAME
+ _ZN18PSetNetworkWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 34 NONAME
+ _ZN18PSetNetworkWrapper11qt_metacastEPKc @ 35 NONAME
+ _ZN18PSetNetworkWrapper13cancelRequestEv @ 36 NONAME
+ _ZN18PSetNetworkWrapper13selectNetworkERKNS_11NetworkInfoE @ 37 NONAME
+ _ZN18PSetNetworkWrapper14networkChangedERNS_11NetworkInfoERNS_18RegistrationStatusE @ 38 NONAME
+ _ZN18PSetNetworkWrapper16staticMetaObjectE @ 39 NONAME DATA 16
+ _ZN18PSetNetworkWrapper17searchingNetworksERNS_11RequestTypeE @ 40 NONAME
+ _ZN18PSetNetworkWrapper19getStaticMetaObjectEv @ 41 NONAME
+ _ZN18PSetNetworkWrapper19networkReqestFailedENS_9ErrorCodeENS_11RequestTypeE @ 42 NONAME
+ _ZN18PSetNetworkWrapper20availableNetworksGotER5QListIPNS_11NetworkInfoEE @ 43 NONAME
+ _ZN18PSetNetworkWrapper20getAvailableNetworksEv @ 44 NONAME
+ _ZN18PSetNetworkWrapper20networkAccessModeGotEi @ 45 NONAME
+ _ZN18PSetNetworkWrapper20setNetworkAccessModeENS_17NetworkAccessModeE @ 46 NONAME
+ _ZN18PSetNetworkWrapper25requestingSelectedNetworkEb @ 47 NONAME
+ _ZN18PSetNetworkWrapperC1ER14CPsetContainerP7QObject @ 48 NONAME
+ _ZN18PSetNetworkWrapperC2ER14CPsetContainerP7QObject @ 49 NONAME
+ _ZN18PSetNetworkWrapperD0Ev @ 50 NONAME
+ _ZN18PSetNetworkWrapperD1Ev @ 51 NONAME
+ _ZN18PSetNetworkWrapperD2Ev @ 52 NONAME
+ _ZN22PSetCallWaitingWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 53 NONAME
+ _ZN22PSetCallWaitingWrapper11qt_metacastEPKc @ 54 NONAME
+ _ZN22PSetCallWaitingWrapper13cancelProcessEv @ 55 NONAME
+ _ZN22PSetCallWaitingWrapper14setCallWaitingENS_20PsCallWaitingCommandEi @ 56 NONAME
+ _ZN22PSetCallWaitingWrapper16staticMetaObjectE @ 57 NONAME DATA 16
+ _ZN22PSetCallWaitingWrapper19getStaticMetaObjectEv @ 58 NONAME
+ _ZN22PSetCallWaitingWrapper20getCallWaitingStatusEv @ 59 NONAME
+ _ZN22PSetCallWaitingWrapper22handleCallWaitingErrorEi @ 60 NONAME
+ _ZN22PSetCallWaitingWrapper24handleCallWaitingChangedENS_20PsCallWaitingCommandEi @ 61 NONAME
+ _ZN22PSetCallWaitingWrapper26handleCallWaitingGetStatusENS_19PsCallWaitingStatusERK5QListIhE @ 62 NONAME
+ _ZN22PSetCallWaitingWrapper27handleCallWaitingRequestingEbb @ 63 NONAME
+ _ZN22PSetCallWaitingWrapperC1ER14CPsetContainerP7QObject @ 64 NONAME
+ _ZN22PSetCallWaitingWrapperC2ER14CPsetContainerP7QObject @ 65 NONAME
+ _ZN22PSetCallWaitingWrapperD0Ev @ 66 NONAME
+ _ZN22PSetCallWaitingWrapperD1Ev @ 67 NONAME
+ _ZN22PSetCallWaitingWrapperD2Ev @ 68 NONAME
+ _ZN24PSetCallDivertingWrapper11qt_metacallEN11QMetaObject4CallEiPPv @ 69 NONAME
+ _ZN24PSetCallDivertingWrapper11qt_metacastEPKc @ 70 NONAME
+ _ZN24PSetCallDivertingWrapper11requestDoneEv @ 71 NONAME
+ _ZN24PSetCallDivertingWrapper13cancelProcessEv @ 72 NONAME
+ _ZN24PSetCallDivertingWrapper16setCallDivertingER22PSCallDivertingCommandi @ 73 NONAME
+ _ZN24PSetCallDivertingWrapper16staticMetaObjectE @ 74 NONAME DATA 16
+ _ZN24PSetCallDivertingWrapper17getDefaultNumbersER11QStringList @ 75 NONAME
+ _ZN24PSetCallDivertingWrapper18handleCFRequestingEbb @ 76 NONAME
+ _ZN24PSetCallDivertingWrapper19getStaticMetaObjectEv @ 77 NONAME
+ _ZN24PSetCallDivertingWrapper19setNewDefaultNumberE7QString @ 78 NONAME
+ _ZN24PSetCallDivertingWrapper20handleDivertingErrorEi @ 79 NONAME
+ _ZN24PSetCallDivertingWrapper21getVoiceMailBoxNumberER7QString @ 80 NONAME
+ _ZN24PSetCallDivertingWrapper21handleDivertingStatusER5QListIP21PSCallDivertingStatusEb @ 81 NONAME
+ _ZN24PSetCallDivertingWrapper22getCallDivertingStatusE6QFlagsI9PsServiceE24PsCallDivertingConditioni @ 82 NONAME
+ _ZN24PSetCallDivertingWrapper22handleDivertingChangedERK22PSCallDivertingCommandb @ 83 NONAME
+ _ZN24PSetCallDivertingWrapperC1ER14CPsetContainerP7QObject @ 84 NONAME
+ _ZN24PSetCallDivertingWrapperC2ER14CPsetContainerP7QObject @ 85 NONAME
+ _ZN24PSetCallDivertingWrapperD0Ev @ 86 NONAME
+ _ZN24PSetCallDivertingWrapperD1Ev @ 87 NONAME
+ _ZN24PSetCallDivertingWrapperD2Ev @ 88 NONAME
+ _ZNK11PSetWrapper10metaObjectEv @ 89 NONAME
+ _ZNK14PSetCliWrapper10metaObjectEv @ 90 NONAME
+ _ZNK18PSetNetworkWrapper10metaObjectEv @ 91 NONAME
+ _ZNK18PSetNetworkWrapper20getNetworkAccessModeEv @ 92 NONAME
+ _ZNK18PSetNetworkWrapper23getNetworkSelectionModeERNS_20NetworkSelectionModeE @ 93 NONAME
+ _ZNK22PSetCallWaitingWrapper10metaObjectEv @ 94 NONAME
+ _ZNK24PSetCallDivertingWrapper10metaObjectEv @ 95 NONAME
+ _ZNK24PSetCallDivertingWrapper20validateDivertNumberERK7TDesC16 @ 96 NONAME
+ _ZNK24PSetCallDivertingWrapper8findPlusERK7TDesC16 @ 97 NONAME
+ _ZTI11PSetWrapper @ 98 NONAME
+ _ZTI14PSetCliWrapper @ 99 NONAME
+ _ZTI18PSetNetworkWrapper @ 100 NONAME
+ _ZTI22PSetCallWaitingWrapper @ 101 NONAME
+ _ZTI24PSetCallDivertingWrapper @ 102 NONAME
+ _ZTV11PSetWrapper @ 103 NONAME
+ _ZTV14PSetCliWrapper @ 104 NONAME
+ _ZTV18PSetNetworkWrapper @ 105 NONAME
+ _ZTV22PSetCallWaitingWrapper @ 106 NONAME
+ _ZTV24PSetCallDivertingWrapper @ 107 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/psetwrapper.pri Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,43 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+HEADERS += ../../../../phonesrv_plat/\phone_settings_api/inc/psetcalldivertingwrapper.h \
+ ../../../../phonesrv_plat/\phone_settings_api/inc/psetcallwaitingwrapper.h \
+ ../../../../phonesrv_plat/\phone_settings_api/inc/psetcliwrapper.h \
+ ../../../../phonesrv_plat/\phone_settings_api/inc/psetnetworkwrapper.h \
+ ../../../../phonesrv_plat/\phone_settings_api/inc/psetwrapper.h \
+ ../../../../phonesrv_plat/\phone_settings_api/inc/psetwrappertypes.h \
+ ./src/psetcalldivertingwrapper_p.h \
+ ./src/psetcallwaitingwrapper_p.h \
+ ./src/psetcliwrapper_p.h \
+ ./src/psetnetworkwrapper_p.h
+
+symbian: {
+ SOURCES += ./src/psetcalldivertingwrapper_p.cpp \
+ ./src/psetcliwrapper_p.cpp \
+ ./src/psetcallwaitingwrapper_p.cpp \
+ ./src/psetnetworkwrapper_p.cpp \
+ ./src/psetwrapper.cpp \
+ ./src/psetcliwrapper.cpp \
+ ./src/psetcallwaitingwrapper.cpp \
+ ./src/psetcalldivertingwrapper.cpp \
+ ./src/psetnetworkwrapper.cpp \
+ ./src/psetnetworkinfoconverter.cpp
+}
+else: {
+ SOURCES = ./src/psetwrapper_s.cpp
+}
+
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/psetwrapper.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,56 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = lib
+TARGET = psetwrapper
+MOC_DIR = moc
+
+INCLUDEPATH += ../../../../phonesrv_plat/phone_settings_api/inc
+SOURCEPATH += src
+
+# Input
+include(psetwrapper.pri)
+
+DEFINES += BUILD_PSETWRAPPER
+
+symbian: {
+ LIBS += -lsssettings \
+ -lphonesettings \
+ -lcustomapi \
+ -letelmm \
+ -lbafl \
+ -lphoneclient \
+ -lvmbxengine
+
+ load(data_caging_paths)
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+ TARGET.EPOCALLOWDLLDATA = 1
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
+ TARGET.UID3 = 0X20029F20
+
+ # For sis file
+ dllfile.sources = $${TARGET}.dll
+ dllfile.path = $$SHARED_LIB_DIR
+ DEPLOYMENT += dllfile
+
+ BLD_INF_RULES.prj_exports += \
+ "$${LITERAL_HASH}include <platform_paths.hrh>" \
+ "./rom/psetwrapper.iby CORE_MW_LAYER_IBY_EXPORT_PATH(psetwrapper.iby)"
+
+} else: {
+ DESTDIR = c:\hb\lib
+ DLLDESTDIR = c:\hb\bin
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/rom/psetwrapper.iby Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __PSETWRAPPER_IBY__
+#define __PSETWRAPPER_IBY__
+
+#include <bldvariant.hrh>
+
+file=ABI_DIR\BUILD_DIR\psetwrapper.dll SHARED_LIB_DIR\psetwrapper.dll
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/logging.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,25 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef LOGGING_H
+#define LOGGING_H
+
+#include <QDebug>
+
+#define DPRINT qDebug() << __PRETTY_FUNCTION__
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcalldivertingwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,318 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include <QtGlobal>
+#include <rsssettings.h>
+#include <PsetContainer.h>
+#include <PsetCallDiverting.h>
+#include <mmlist.h>
+#include <cphcltemergencycall.h>
+#include <badesca.h>
+#include <cvoicemailbox.h>
+#include <cvoicemailboxentry.h>
+#include "psetcalldivertingwrapper.h"
+#include "psetcalldivertingwrapper_p.h"
+#include "logging.h"
+
+//Constant
+_LIT(KCFInvalidChars,"*#pw");
+_LIT(KCFPlusSign,"+");
+
+/*!
+ PSetCallDivertingWrapper::PSetCallDivertingWrapper
+ */
+PSetCallDivertingWrapper::PSetCallDivertingWrapper(
+ CPsetContainer &psetContainer, QObject *parent) :
+ QObject(parent), m_psetCallDiverting(NULL), m_emergencyCall(NULL),
+ m_DefaultNumberListCDes(NULL), m_Priv(NULL)
+{
+ DPRINT << ": IN";
+
+ m_Priv = new PSetCallDivertingWrapperPrivate(*this);
+ QScopedPointer<PSetCallDivertingWrapperPrivate> privateImplGuard(m_Priv);
+
+ QT_TRAP_THROWING(
+ m_psetCallDiverting = psetContainer.CreateCFObjectL( *m_Priv ));
+ m_psetCallDiverting->SetRequestObserver(m_Priv);
+ QScopedPointer<CPsetCallDiverting> pSetCallDivertingGuard(m_psetCallDiverting);
+
+ QT_TRAP_THROWING(m_emergencyCall = CPhCltEmergencyCall::NewL( m_Priv ));
+ QScopedPointer<CPhCltEmergencyCall> emergencyCallGuard(m_emergencyCall);
+
+ privateImplGuard.take();
+ pSetCallDivertingGuard.take();
+ emergencyCallGuard.take();
+
+ DPRINT << ": OUT";
+}
+
+/*!
+ PSetCallDivertingWrapper::~PSetCallDivertingWrapper
+ */
+PSetCallDivertingWrapper::~PSetCallDivertingWrapper()
+{
+ DPRINT << ": IN";
+
+ delete m_psetCallDiverting;
+ delete m_emergencyCall;
+
+ if (m_DefaultNumberListCDes) {
+ m_DefaultNumberListCDes->Reset();
+ delete m_DefaultNumberListCDes;
+ }
+
+ delete m_Priv;
+
+ DPRINT << ": OUT";
+}
+
+// -------- Wrapper interface --------- //
+/*!
+ PSetCallDivertingWrapper::setCallDiverting
+ */
+int PSetCallDivertingWrapper::setCallDiverting(
+ PSCallDivertingCommand& aSetting, int aBasicServiceGroup)
+{
+ DPRINT << ": IN";
+
+ TCallDivertSetting param;
+ param.iCondition = m_Priv->convert(aSetting.iCondition);
+ param.iSetting = m_Priv->convert(aSetting.iSetting);
+ param.iStatus = m_Priv->convert(aSetting.iStatus);
+ param.iServiceGroup = m_Priv->convert(aSetting.iServiceGroup);
+ param.iNumber = TPtrC16(aSetting.iNumber.utf16());
+ param.iNoReplyTimer = aSetting.iNoReplyTimer;
+
+ int result = validateDivertNumber(param.iNumber);
+ if (0 == result) {
+ QT_TRAP_THROWING(
+ m_psetCallDiverting->SetDivertingL(
+ param,
+ static_cast<TBasicServiceGroups>(aBasicServiceGroup)));
+ }
+
+ DPRINT << ": OUT";
+ return result;
+}
+
+/*!
+ PSetCallDivertingWrapper::getCallDivertingStatus
+ */
+void PSetCallDivertingWrapper::getCallDivertingStatus(
+ const PsServiceGroup aServiceGroup,
+ const PsCallDivertingCondition aCondition,
+ int aBsc)
+{
+ DPRINT << ": IN";
+ DPRINT << "aServiceGroup : " << aServiceGroup;
+ DPRINT << "aCondition : " << aCondition;
+
+ QT_TRAP_THROWING(
+ m_psetCallDiverting->GetDivertingStatusL(
+ m_Priv->convert(aServiceGroup),
+ m_Priv->convert(aCondition),
+ (TBasicServiceGroups)aBsc));
+
+ DPRINT << ": OUT";
+}
+
+/*!
+ PSetCallDivertingWrapper::cancelProcess
+ */
+void PSetCallDivertingWrapper::cancelProcess()
+{
+ DPRINT << ": IN";
+
+ m_psetCallDiverting->CancelCurrentRequest();
+
+ DPRINT << ": OUT";
+}
+
+/*!
+ PSetCallDivertingWrapper::getDefaultNumbers
+ */
+void PSetCallDivertingWrapper::getDefaultNumbers(QStringList &aDefNumbers)
+{
+ // QStringList?, max 3 numbers to retrieve.
+
+ DPRINT << ": IN";
+
+ while (!m_DefaultnumberListQSList.empty()) {
+ m_DefaultnumberListQSList.removeFirst();
+ }
+ m_DefaultNumberListCDes = new CDesC16ArrayFlat(3);
+ QT_TRAP_THROWING(
+ m_psetCallDiverting->GetDefaultNumbersL(*m_DefaultNumberListCDes));
+ int count = m_DefaultNumberListCDes->Count();
+ for (int i = 0; i < count; i++) {
+ m_DefaultnumberListQSList.append(QString::fromUtf16(
+ m_DefaultNumberListCDes->MdcaPoint(i).Ptr(),
+ m_DefaultNumberListCDes->MdcaPoint(i).Length()));
+ }
+ aDefNumbers = m_DefaultnumberListQSList;
+ m_DefaultNumberListCDes->Reset();
+ delete m_DefaultNumberListCDes;
+ m_DefaultNumberListCDes = NULL;
+
+ DPRINT << ": OUT";
+}
+
+/*!
+ PSetCallDivertingWrapper::setNewDefaultNumber
+ */
+void PSetCallDivertingWrapper::setNewDefaultNumber(QString aNumber)
+{
+ DPRINT << ": IN";
+
+ TBuf<KPsetPhoneNumberLength> bufNumber(aNumber.utf16());
+ TInt found(KErrNotFound);
+ TInt loc(KErrNotFound);
+ m_DefaultNumberListCDes = new CDesC16ArrayFlat(3);
+ QT_TRAP_THROWING(
+ m_psetCallDiverting->GetDefaultNumbersL(*m_DefaultNumberListCDes));
+ found = m_DefaultNumberListCDes->Find(bufNumber, loc);
+ m_DefaultNumberListCDes->Reset();
+ delete m_DefaultNumberListCDes;
+ m_DefaultNumberListCDes = NULL;
+ if (found != KErrNone) { //number is not part of current def.numbers
+ QT_TRAP_THROWING(
+ m_psetCallDiverting->SetNewDefaultNumberL(bufNumber));
+ } else {
+ QT_TRAP_THROWING(
+ m_psetCallDiverting->SwapDefaultNumberL(loc+1));
+ }
+
+ DPRINT << ": OUT";
+}
+
+/*!
+ PSetCallDivertingWrapper::getVoiceMailBoxNumber
+ */
+void PSetCallDivertingWrapper::getVoiceMailBoxNumber(QString &aVmbxNumber)
+{
+ DPRINT << ": IN";
+
+ CVoiceMailboxEntry* psetVoiceMailboxEntry = NULL;
+ CVoiceMailbox* psetVoiceMailBoxScoped = NULL;
+ QT_TRAP_THROWING(psetVoiceMailBoxScoped = CVoiceMailbox::NewL());
+ QScopedPointer<CVoiceMailbox> psetVoiceMailBox(psetVoiceMailBoxScoped);
+
+ TVoiceMailboxParams psetVoiceMailboxParams;
+ // Selected mailbox type is voice
+ psetVoiceMailboxParams.iType = EVmbxVoice;
+ psetVoiceMailboxEntry = 0;
+ TInt error = psetVoiceMailBox->GetStoredEntry( psetVoiceMailboxParams, psetVoiceMailboxEntry );
+ if ( KErrNone == error ) {
+ // Entry ok, check the number
+ TPtrC ptrNumber( KNullDesC );
+ if ( KErrNone == psetVoiceMailboxEntry->GetVmbxNumber( ptrNumber )) {
+ // number ok
+ aVmbxNumber = QString::fromUtf16(ptrNumber.Ptr(),
+ ptrNumber.Length());
+ }
+ }
+ else if ( KErrNotFound == error ) {
+ // No number defined, query new entry from user
+ error = psetVoiceMailBox->QueryNewEntry( psetVoiceMailboxParams, psetVoiceMailboxEntry );
+
+ if ( KErrNone == error ) {
+ // Save new entry and get the number.
+ error = psetVoiceMailBox->SaveEntry( *psetVoiceMailboxEntry );
+ TPtrC ptrNumber( KNullDesC );
+ if ( KErrNone == psetVoiceMailboxEntry->GetVmbxNumber( ptrNumber )) {
+ // New number ok.
+ aVmbxNumber = QString::fromUtf16(ptrNumber.Ptr(),
+ ptrNumber.Length());
+ }
+ } else {
+ // New number not given.
+ DPRINT << "New number error: " << error;
+ }
+ }
+ else {
+ // illegal argument
+ DPRINT << "error: " << error;
+ }
+
+ delete psetVoiceMailboxEntry; // Entry ownership was transferred
+ psetVoiceMailboxEntry = NULL;
+
+ DPRINT << "aVmbxNumber: " << aVmbxNumber;
+ DPRINT << ": OUT";
+}
+
+/*!
+ PSetCallDivertingWrapper::validateDivertNumber
+ */
+int PSetCallDivertingWrapper::validateDivertNumber(
+ const TDesC16& aDivertTo) const
+{
+ DPRINT << ": IN ";
+
+ int result = 0;
+
+ QString diverto = QString::fromUtf16(aDivertTo.Ptr(),aDivertTo.Length());
+ DPRINT << "aDivertTo: " << diverto;
+ TInt noOfInvalidChars = KCFInvalidChars().Length();
+ TBool isEmergency(EFalse);
+ TTelNumber number;
+ TInt error = m_emergencyCall->IsEmergencyPhoneNumber(aDivertTo, number,
+ isEmergency);
+ if ((error == KErrNone) && isEmergency) {
+ result = KErrGsmSSIllegalOperation;
+ DPRINT << ": emergency number.";
+ } else {
+ // Plus is a special case, as it is accepted as first character.
+ if (findPlus(aDivertTo)) {
+ result = KErrGsmSSUnknownAlphabet;
+ }
+ for (int index = 0; index < noOfInvalidChars; index++) {
+ if (aDivertTo.Find(KCFInvalidChars().Mid(index, 1)) == KErrNone) {
+ result = KErrGsmSSUnknownAlphabet;
+ DPRINT << ": Invalid divert number. ";
+ }
+ }
+ }
+
+ DPRINT << ": OUT : result " << result;
+ return result;
+}
+
+/*!
+ PSetCallDivertingWrapper::findPlus
+ Seeks '+' from given number. If '+' is first character, it is ignored.
+ */
+bool PSetCallDivertingWrapper::findPlus(const TDesC16& aDivertTo) const
+{
+ DPRINT << ": IN ";
+
+ bool plusFound(false);
+ if (!(aDivertTo.Find(KCFPlusSign) == KErrNotFound)) {
+ //first char '+', but there can additional '+'s
+ //ignore first '+'
+ TPtrC concat = aDivertTo.Right(aDivertTo.Length() - 1);
+ if (concat.Find(KCFPlusSign) == KErrNone) {
+ plusFound = true;
+ DPRINT << ": Invalid divert number. ";
+ }
+ }
+
+ DPRINT << ": OUT : plusFound " << plusFound;
+ return plusFound;
+}
+
+// End of File.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcalldivertingwrapper_p.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,356 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include <mpsetdivertobs.h>
+#include <mphcltemergencycallobserver.h>
+#include <mmlist.h>
+#include "psetcalldivertingwrapper_p.h"
+#include "logging.h"
+
+/*!
+ PSetCallDivertingWrapperPrivate::PSetCallDivertingWrapperPrivate
+ */
+PSetCallDivertingWrapperPrivate::PSetCallDivertingWrapperPrivate(
+ PSetCallDivertingWrapper &owner) :
+ m_Owner(owner)
+{
+ DPRINT;
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::~PSetCallDivertingWrapperPrivate
+ */
+PSetCallDivertingWrapperPrivate::~PSetCallDivertingWrapperPrivate()
+{
+ DPRINT;
+ while (!m_DivertingStatusList.empty()) {
+ DPRINT << "m_DivertingStatusList item to be deleted";
+ delete m_DivertingStatusList.takeFirst();
+ }
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::HandleDivertingChangedL
+ */
+void PSetCallDivertingWrapperPrivate::HandleDivertingChangedL(
+ const TCallDivertSetting& aSetting, TBool aPlural)
+{
+ DPRINT << ": IN ";
+
+ m_callDivertingSetting.iCondition = convert(aSetting.iCondition);
+ m_callDivertingSetting.iStatus = convert(aSetting.iStatus);
+ m_callDivertingSetting.iSetting =
+ static_cast<PsCallDivertingSetting>(aSetting.iSetting);
+ m_callDivertingSetting.iServiceGroup = convert(aSetting.iServiceGroup);
+ m_callDivertingSetting.iNumber =
+ QString::fromUtf16(aSetting.iNumber.Ptr(), aSetting.iNumber.Length());
+ m_callDivertingSetting.iNoReplyTimer = aSetting.iNoReplyTimer;
+ QT_TRYCATCH_LEAVING(
+ emit m_Owner.handleDivertingChanged(m_callDivertingSetting, aPlural));
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::HandleDivertingStatusL
+ */
+void PSetCallDivertingWrapperPrivate::HandleDivertingStatusL(
+ CMobilePhoneCFList& aSetting, TBool aPlural)
+{
+ DPRINT << ": IN ";
+
+ // reset list
+ while (!m_DivertingStatusList.empty()) {
+ PSCallDivertingStatus* divertingStatus =
+ m_DivertingStatusList.takeFirst();
+ DPRINT << ": delete : " << divertingStatus;
+ delete divertingStatus;
+ }
+ TInt entries = aSetting.Enumerate();
+ TInt numberOfBscs = 0;
+ RMobilePhone::TMobilePhoneCFInfoEntryV1 cfInfo;
+ while (entries > numberOfBscs) {
+ cfInfo = aSetting.GetEntryL(numberOfBscs);
+ PSCallDivertingStatus* divertingStatus =
+ new (ELeave) PSCallDivertingStatus();
+ divertingStatus->iCondition = convert(cfInfo.iCondition);
+ divertingStatus->iServiceGroup = cfInfo.iServiceGroup;
+ divertingStatus->iStatus = convert(cfInfo.iStatus);
+ divertingStatus->iNumber = QString::fromUtf16(
+ cfInfo.iNumber.iTelNumber.Ptr(),
+ cfInfo.iNumber.iTelNumber.Length());
+ divertingStatus->iTimeout = cfInfo.iTimeout;
+ m_DivertingStatusList.append(divertingStatus);
+ numberOfBscs++;
+ }
+
+ QT_TRYCATCH_LEAVING(
+ emit m_Owner.handleDivertingStatus(m_DivertingStatusList,aPlural));
+
+ DPRINT << ": OUT";
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::HandleDivertingErrorL
+ */
+void PSetCallDivertingWrapperPrivate::HandleDivertingErrorL(TInt aReason)
+{
+ DPRINT << ": IN : aReason" << aReason;
+
+ QT_TRYCATCH_LEAVING(
+ emit m_Owner.handleDivertingError(aReason));
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::HandleCFRequestingL
+ */
+void PSetCallDivertingWrapperPrivate::HandleCFRequestingL(TBool aOngoing,
+ TBool aInterrupted)
+{
+ DPRINT << ": IN ";
+
+ QT_TRYCATCH_LEAVING(
+ emit m_Owner.handleCFRequesting(aOngoing, aInterrupted));
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::SetEngineContact
+ */
+void PSetCallDivertingWrapperPrivate::SetEngineContact(
+ MPsetCallDiverting* aDivertEngine)
+{
+ DPRINT << ": IN ";
+
+ Q_UNUSED(aDivertEngine);
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::HandleEmergencyDialL
+ */
+void PSetCallDivertingWrapperPrivate::HandleEmergencyDialL(const TInt aStatus)
+{
+ DPRINT << ": IN ";
+
+ Q_UNUSED(aStatus);
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::RequestComplete
+ */
+void PSetCallDivertingWrapperPrivate::RequestComplete()
+{
+ DPRINT << ": IN ";
+ QT_TRYCATCH_LEAVING(
+ emit m_Owner.requestDone());
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::RequestStatusChanged
+ */
+void PSetCallDivertingWrapperPrivate::RequestStatusChanged(TInt aNewStatus)
+{
+ DPRINT << ": IN ";
+ Q_UNUSED(aNewStatus);
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::convert
+ */
+PsCallDivertingCondition PSetCallDivertingWrapperPrivate::convert(
+ TCallDivertingCondition type)
+{
+ switch (type) {
+ case EDivertConditionUnconditional:
+ return DivertConditionUnconditional;
+ case EDivertConditionBusy:
+ return DivertConditionBusy;
+ case EDivertConditionNoReply:
+ return DivertConditionNoReply;
+ case EDivertConditionNotReachable:
+ return DivertConditionNotReachable;
+ case EDivertConditionAllCalls:
+ return DivertConditionAllCalls;
+ case EDivertConditionAllConditionalCases:
+ return DivertConditionAllConditionalCases;
+ default:
+ break;
+ }
+ return DivertConditionUnknown;
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::convert
+ */
+TCallDivertingCondition PSetCallDivertingWrapperPrivate::convert(
+ PsCallDivertingCondition type)
+{
+ switch (type) {
+ case DivertConditionUnconditional:
+ return EDivertConditionUnconditional;
+ case DivertConditionBusy:
+ return EDivertConditionBusy;
+ case DivertConditionNoReply:
+ return EDivertConditionNoReply;
+ case DivertConditionNotReachable:
+ return EDivertConditionNotReachable;
+ case DivertConditionAllCalls:
+ return EDivertConditionAllCalls;
+ case DivertConditionAllConditionalCases:
+ return EDivertConditionAllConditionalCases;
+ default:
+ break;
+ }
+ return EDivertConditionUnconditional;
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::convert
+ */
+PsCallDivertingCondition PSetCallDivertingWrapperPrivate::convert(
+ RMobilePhone::TMobilePhoneCFCondition type)
+{
+ switch (type) {
+ case RMobilePhone::ECallForwardingUnconditional:
+ return DivertConditionUnconditional;
+ case RMobilePhone::ECallForwardingBusy:
+ return DivertConditionBusy;
+ case RMobilePhone::ECallForwardingNoReply:
+ return DivertConditionNoReply;
+ case RMobilePhone::ECallForwardingNotReachable:
+ return DivertConditionNotReachable;
+ case RMobilePhone::ECallForwardingAllCases:
+ return DivertConditionAllCalls;
+ case RMobilePhone::ECallForwardingAllConditionalCases:
+ return DivertConditionAllConditionalCases;
+ default:
+ break;
+ }
+ return DivertConditionUnknown;
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::convert
+ */
+PsCallDivertingStatus PSetCallDivertingWrapperPrivate::convert(
+ TDivertingStatus type)
+{
+ switch (type) {
+ case EDivertingStatusActive:
+ return DivertingStatusActive;
+ case EDivertingStatusInactive:
+ return DivertingStatusInactive;
+ case EDivertingStatusNotRegistered:
+ return DivertingStatusNotRegistered;
+ case EDivertingStatusNotProvisioned:
+ return DivertingStatusNotProvisioned;
+ default:
+ break;
+ }
+ return DivertingStatusUnknown;
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::convert
+ */
+TDivertingStatus PSetCallDivertingWrapperPrivate::convert(
+ PsCallDivertingStatus type)
+{
+ switch (type) {
+ case DivertingStatusActive:
+ return EDivertingStatusActive;
+ case DivertingStatusInactive:
+ return EDivertingStatusInactive;
+ case DivertingStatusNotRegistered:
+ return EDivertingStatusNotRegistered;
+ case DivertingStatusNotProvisioned:
+ return EDivertingStatusNotProvisioned;
+ default:
+ break;
+ }
+ return EDivertingStatusUnknown;
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::convert
+ */
+PsCallDivertingStatus PSetCallDivertingWrapperPrivate::convert(
+ RMobilePhone::TMobilePhoneCFStatus type)
+{
+ switch (type) {
+ case RMobilePhone::ECallForwardingStatusActive:
+ return DivertingStatusActive;
+ case RMobilePhone::ECallForwardingStatusNotActive:
+ return DivertingStatusInactive;
+ case RMobilePhone::ECallForwardingStatusNotRegistered:
+ return DivertingStatusNotRegistered;
+ case RMobilePhone::ECallForwardingStatusNotProvisioned:
+ return DivertingStatusNotProvisioned;
+ default:
+ break;
+ }
+ return DivertingStatusUnknown;
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::convert
+ */
+PsServiceGroup PSetCallDivertingWrapperPrivate::convert(TServiceGroup type)
+{
+ PsServiceGroup ret(ServiceGroupAllTeleservices);
+ ret &= type;
+ return ret;
+}
+
+/*!
+ PSetCallDivertingWrapperPrivate::convert
+ */
+TServiceGroup PSetCallDivertingWrapperPrivate::convert(PsServiceGroup type)
+{
+ const int tmp = type;
+ TServiceGroup ret = (TServiceGroup)tmp;
+ return ret;
+}
+
+TDivertingSetting PSetCallDivertingWrapperPrivate::convert(
+ PsCallDivertingSetting type)
+{
+ switch(type){
+ case ActivateDiverting:
+ return EActivateDiverting;
+ case CancelDiverting:
+ return ECancelDiverting;
+ case RegisterDiverting:
+ return ERegisterDiverting;
+ case EraseDiverting:
+ return EEraseDiverting;
+ case CheckStatus:
+ default:
+ return ECheckStatus;
+ }
+}
+
+// end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcalldivertingwrapper_p.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef DIVERTINGOBSERVER_H_
+#define DIVERTINGOBSERVER_H_
+
+#include <mpsetdivertobs.h>
+#include <mphcltemergencycallobserver.h>
+#include <mpsetrequestobs.h>
+#include "psetcalldivertingwrapper.h"
+#include "psetwrappertypes.h"
+
+class PSetCallDivertingWrapperPrivate :
+ public MPsetDivertObserver,
+ public MPhCltEmergencyCallObserver,
+ public MPsetRequestObserver
+{
+public:
+ PSetCallDivertingWrapperPrivate(PSetCallDivertingWrapper &owner);
+
+ virtual ~PSetCallDivertingWrapperPrivate();
+
+public:
+ // Functions from base classes (observer interface):
+
+ /**
+ * Handles showing notes, when diverts change.
+ *
+ * @param aSetting Setting which was changed.
+ * @param aPlural Plural notes to be used.
+ */
+ void HandleDivertingChangedL(const TCallDivertSetting& aSetting,
+ TBool aPlural);
+
+ /**
+ * Handles showing of status inquiry notes.
+ *
+ * @param aBsc List of basic services.
+ * @param aSetting Divert setting which was queried.
+ * @param aPlural Plural notes to be used.
+ */
+
+ void HandleDivertingStatusL(CMobilePhoneCFList& aSetting, TBool aPlural);
+
+ /**
+ * Handles showing of error notes.
+ *
+ * @param aReason Reason for diverting error.
+ */
+ void HandleDivertingErrorL(TInt aReason);
+
+ /**
+ * Handles requesting notes.
+ *
+ * @param aOngoing Is there a request going on.
+ * @param aInterrupted Request needs to immediately cancelled.
+ */
+ void HandleCFRequestingL(TBool aOngoing, TBool aInterrupted);
+
+ /**
+ * Sets pointer so that message is passed succesfully
+ * from requester to observer.
+ *
+ * @param aDivertEngine Source for the events to observer.
+ */
+ void SetEngineContact(MPsetCallDiverting* aDivertEngine);
+
+public:
+ // From MPhCltEmergencyCallObserver
+
+ /**
+ * It is called whenever client's dial request is completed.
+ *
+ * @param aStatus error code of the success of the operation.
+ */
+ void HandleEmergencyDialL(const TInt aStatus);
+
+public:
+ // From MPsetRequestObserver
+ /**
+ * Informs the receiver that request has been completed.
+ */
+ void RequestComplete();
+
+ /**
+ * Informs the receiver that request state has changed.
+ * @param new status, or when finished KErrNone or error code.
+ */
+ void RequestStatusChanged( TInt aNewStatus );
+
+public:
+ TCallDivertingCondition convert(PsCallDivertingCondition type);
+ TDivertingStatus convert(PsCallDivertingStatus type);
+ TServiceGroup convert(PsServiceGroup type);
+ TDivertingSetting convert(PsCallDivertingSetting type);
+
+private:
+ PsCallDivertingCondition convert(TCallDivertingCondition type);
+ PsCallDivertingCondition convert(RMobilePhone::TMobilePhoneCFCondition type);
+ PsCallDivertingStatus convert(TDivertingStatus type);
+ PsCallDivertingStatus convert(RMobilePhone::TMobilePhoneCFStatus type);
+ PsServiceGroup convert(TServiceGroup type);
+
+
+private:
+ PSetCallDivertingWrapper &m_Owner;
+
+ QList<PSCallDivertingStatus*> m_DivertingStatusList;
+
+ PSCallDivertingCommand m_callDivertingSetting;
+};
+
+#endif /* DIVERTINGOBSERVER_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallwaitingwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include <rsssettings.h>
+#include <PsetContainer.h>
+#include <PsetCallWaiting.h>
+#include "psetcallwaitingwrapper.h"
+#include "psetcallwaitingwrapper_p.h"
+#include "logging.h"
+
+/*!
+ PSetCallWaitingWrapper::PSetCallWaitingWrapper
+ */
+PSetCallWaitingWrapper::PSetCallWaitingWrapper(
+ CPsetContainer &psetContainer,
+ QObject *parent) :
+ QObject(parent),
+ m_psetCallWaiting(NULL),
+ m_privateImpl(new PSetCallWaitingWrapperPrivate(*this))
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(m_psetCallWaiting =
+ psetContainer.CreateCWObjectL(*m_privateImpl));
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCallWaitingWrapper::~PSetCallWaitingWrapper
+ */
+PSetCallWaitingWrapper::~PSetCallWaitingWrapper()
+{
+ DPRINT << ": IN ";
+
+ delete m_psetCallWaiting;
+
+ DPRINT << ": OUT ";
+}
+
+// -------- Wrapper interface --------- //
+/*!
+ PSetCallWaitingWrapper::setCallWaiting
+ */
+void PSetCallWaitingWrapper::setCallWaiting(PsCallWaitingCommand aSetting,
+ int aBasicServiceGroup )
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(m_psetCallWaiting->SetCallWaitingL(
+ (MPsetCallWaiting::TSetCallWaiting)aSetting,
+ (TBasicServiceGroups)aBasicServiceGroup));
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCallWaitingWrapper::getCallWaitingStatus
+ */
+void PSetCallWaitingWrapper::getCallWaitingStatus()
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(m_psetCallWaiting->GetCallWaitingStatusL());
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCallWaitingWrapper::cancelProcess
+ */
+void PSetCallWaitingWrapper::cancelProcess()
+{
+ DPRINT << ": IN ";
+
+ m_psetCallWaiting->CancelProcess();
+
+ DPRINT << ": OUT ";
+}
+
+// End of File.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallwaitingwrapper_p.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,177 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include <rsssettings.h>
+#include <PsetContainer.h>
+#include <PsetCallWaiting.h>
+#include "psetcallwaitingwrapper.h"
+#include "psetcallwaitingwrapper_p.h"
+#include "logging.h"
+
+/*!
+ ConvertToQtType
+ */
+PSetCallWaitingWrapper::PsCallWaitingStatus ConvertToQtType(
+ const MPsetCallWaiting::TGetCallWaitingStatus& status)
+{
+ PSetCallWaitingWrapper::PsCallWaitingStatus convertedType =
+ PSetCallWaitingWrapper::StatusUnknown;
+
+ switch (status) {
+ case MPsetCallWaiting::EStatusActive:
+ convertedType = PSetCallWaitingWrapper::StatusActive;
+ break;
+ case MPsetCallWaiting::EStatusDisabled:
+ convertedType = PSetCallWaitingWrapper::StatusDisabled;
+ break;
+ case MPsetCallWaiting::EStatusNotAvailable:
+ convertedType = PSetCallWaitingWrapper::StatusNotAvailable;
+ break;
+ case MPsetCallWaiting::EStatusNotProvisioned:
+ convertedType = PSetCallWaitingWrapper::StatusNotProvisioned;
+ break;
+ case MPsetCallWaiting::EStatusUnknown:
+ convertedType = PSetCallWaitingWrapper::StatusUnknown;
+ break;
+ default:
+ Q_ASSERT_X(false, "switch default", "unknown enumerator");
+ break;
+ }
+
+ return convertedType;
+}
+
+/*!
+ ConvertToQtType
+ */
+PSetCallWaitingWrapper::PsCallWaitingCommand ConvertToQtType(
+ const MPsetCallWaiting::TSetCallWaiting& callWaitingCommand)
+{
+ PSetCallWaitingWrapper::PsCallWaitingCommand convertedType =
+ PSetCallWaitingWrapper::ActivateCallWaiting;
+
+ switch (callWaitingCommand) {
+ case MPsetCallWaiting::EActivateCallWaiting:
+ convertedType = PSetCallWaitingWrapper::ActivateCallWaiting;
+ break;
+ case MPsetCallWaiting::EDeactivateCallWaiting:
+ convertedType = PSetCallWaitingWrapper::DeactivateCallWaiting;
+ break;
+ default:
+ Q_ASSERT_X(false, "switch default", "unknown enumerator");
+ break;
+ }
+
+ return convertedType;
+}
+
+/*!
+ PSetCallWaitingWrapperPrivate::PSetCallWaitingWrapperPrivate
+ */
+PSetCallWaitingWrapperPrivate::PSetCallWaitingWrapperPrivate(
+ PSetCallWaitingWrapper &owner ) : m_Owner(owner)
+{
+ DPRINT;
+}
+
+/*!
+ PSetCallWaitingWrapperPrivate::~PSetCallWaitingWrapperPrivate
+ */
+PSetCallWaitingWrapperPrivate::~PSetCallWaitingWrapperPrivate()
+{
+ DPRINT;
+}
+
+// -------- Observer interface --------- //
+/*!
+ PSetCallWaitingWrapperPrivate::HandleCallWaitingGetStatusL
+ */
+void PSetCallWaitingWrapperPrivate::HandleCallWaitingGetStatusL(
+ const MPsetCallWaiting::TGetCallWaitingStatus aStatus,
+ TUint8 aBsc[KPSetNumberOfBsc] )
+{
+ DPRINT << "aStatus:" << aStatus;
+
+ QT_TRYCATCH_LEAVING(
+ QList<unsigned char> basicServiceGroupIds;
+ int index = 0;
+ unsigned char groupIdCandidate = aBsc[index];
+ while (groupIdCandidate != KPSetUnusedValue) {
+ basicServiceGroupIds << groupIdCandidate;
+ groupIdCandidate = aBsc[++index];
+ }
+
+ emit m_Owner.handleCallWaitingGetStatus(
+ ConvertToQtType(aStatus), basicServiceGroupIds );
+ )
+}
+
+/*!
+ PSetCallWaitingWrapperPrivate::HandleCallWaitingChangedL
+ */
+void PSetCallWaitingWrapperPrivate::HandleCallWaitingChangedL(
+ const MPsetCallWaiting::TSetCallWaiting aSetting,
+ const int aResult )
+{
+ DPRINT << "aSetting: " << aSetting
+ << "aResult" << aResult;
+
+ QT_TRYCATCH_LEAVING(
+ emit m_Owner.handleCallWaitingChanged(
+ ConvertToQtType(aSetting),
+ static_cast<int>(aResult) );
+ )
+}
+
+/*!
+ PSetCallWaitingWrapperPrivate::HandleCWRequestingL
+ */
+void PSetCallWaitingWrapperPrivate::HandleCWRequestingL( TBool aOngoing,
+ TBool aInterrupted )
+{
+ DPRINT << "aOngoing: " << aOngoing
+ << " aInterrupted: " << aInterrupted;
+
+ QT_TRYCATCH_LEAVING(
+ emit m_Owner.handleCallWaitingRequesting(
+ static_cast<bool>(aOngoing),
+ static_cast<bool>(aInterrupted) );
+ )
+}
+
+/*!
+ PSetCallWaitingWrapperPrivate::HandleCWErrorL
+ */
+void PSetCallWaitingWrapperPrivate::HandleCWErrorL( TInt aError )
+{
+ DPRINT << "aError: " << aError;
+
+ QT_TRYCATCH_LEAVING(
+ emit m_Owner.handleCallWaitingError( aError );
+ )
+}
+
+/*!
+ PSetCallWaitingWrapperPrivate::SetEngineContact
+ */
+void PSetCallWaitingWrapperPrivate::SetEngineContact(
+ MPsetCallWaiting& aEngineContact )
+{
+ DPRINT << "aEngineContact: " << &aEngineContact;
+}
+
+// End of File.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcallwaitingwrapper_p.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,86 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef PSETCALLWAITINGWRAPPER_P_H_
+#define PSETCALLWAITINGWRAPPER_P_H_
+
+#include <mpsetcallwaitingobs.h>
+
+// Forward declarations
+class PSetCallWaitingWrapper;
+
+class PSetCallWaitingWrapperPrivate:
+ public MPsetCallWaitingObserver
+{
+public:
+
+ PSetCallWaitingWrapperPrivate( PSetCallWaitingWrapper &owner );
+
+ ~PSetCallWaitingWrapperPrivate();
+
+public: // From MPsetCallWaitingObserver
+
+ /**
+ * Handles notes when requesting Call Waiting status.
+ *
+ * @param aStatus Query result.
+ * @param aBsc is List of active groups.
+ */
+ void HandleCallWaitingGetStatusL(
+ const MPsetCallWaiting::TGetCallWaitingStatus aStatus,
+ TUint8 aBsc[KPSetNumberOfBsc] );
+
+ /**
+ * Handles notes when Call Waiting has been changed.
+ *
+ * @param aSetting Changed setting.
+ * @param aResult Result of the action.
+ */
+ void HandleCallWaitingChangedL(
+ const MPsetCallWaiting::TSetCallWaiting aSetting,
+ const TInt aResult );
+
+ /**
+ * Handles requesting notes.
+ *
+ * @param aStarted Is there a request going on.
+ * @param aInterrupted Request needs to be immediately cancelled.
+ */
+ void HandleCWRequestingL( TBool aOngoing,
+ TBool aInterrupted );
+ /**
+ * Handles errors in call waiting requests.
+ *
+ * @param aReason Reason for the error.
+ */
+ void HandleCWErrorL( TInt aReason );
+
+ /**
+ * Sets pointer so that message is passed succesfully
+ * from requester to observer.
+ *
+ * @param aEngineContact Source of events to observer.
+ */
+ void SetEngineContact( MPsetCallWaiting& aEngineContact );
+
+private: // Data:
+ PSetCallWaitingWrapper &m_Owner;
+
+};
+
+
+#endif /* PSETCALLWAITINGWRAPPER_P_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcliwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,125 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include "psetcliwrapper_p.h"
+#include "psetcliwrapper.h"
+#include "logging.h"
+#include <rsssettings.h>
+#include <msssettingsobserver.h>
+#include <mpsetcliobserver.h>
+#include <PsetContainer.h>
+#include <PsetCli.h>
+
+/*!
+ PSetCliWrapper::PSetCliWrapper
+ */
+PSetCliWrapper::PSetCliWrapper( CPsetContainer &psetContainer,
+ QObject *parent): QObject(parent),
+ m_privateImpl(new PSetCliWrapperPrivate(*this))
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(
+ m_psetCli = psetContainer.CreateCliObjectL(*m_privateImpl));
+}
+
+/*!
+ PSetCliWrapper::~PSetCliWrapper
+ */
+PSetCliWrapper::~PSetCliWrapper()
+{
+ DPRINT << ": IN ";
+
+ delete m_psetCli;
+
+ DPRINT << ": OUT ";
+}
+
+// -------- Wrapper interface --------- //
+/*!
+ PSetCliWrapper::getColpMode
+ */
+void PSetCliWrapper::getColpMode()
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(m_psetCli->GetColpModeL());
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCliWrapper::getClipMode
+ */
+void PSetCliWrapper::getClipMode()
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(m_psetCli->GetClipModeL());
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCliWrapper::getClirMode
+ */
+void PSetCliWrapper::getClirMode()
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(m_psetCli->GetClirModeL());
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCliWrapper::getColrMode
+ */
+void PSetCliWrapper::getColrMode()
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(m_psetCli->GetColrModeL());
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCliWrapper::getCnap
+ */
+void PSetCliWrapper::getCnap()
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(m_psetCli->GetCnapL());
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetCliWrapper::cancelAll
+ */
+void PSetCliWrapper::cancelAll()
+{
+ DPRINT << ": IN ";
+
+ m_psetCli->CancelAll();
+
+ DPRINT << ": OUT ";
+}
+
+// End of File.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcliwrapper_p.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,119 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include "psetcliwrapper_p.h"
+#include "psetcliwrapper.h"
+#include "psetwrappertypes.h"
+#include "logging.h"
+#include <rsssettings.h>
+#include <PsetContainer.h>
+#include <PsetCli.h>
+
+/*!
+ PSetCliWrapperPrivate::PSetCliWrapperPrivate
+ */
+PSetCliWrapperPrivate::PSetCliWrapperPrivate(
+ PSetCliWrapper &owner) :
+ m_Owner(owner)
+{
+ DPRINT;
+}
+
+/*!
+ PSetCliWrapperPrivate::~PSetCliWrapperPrivate
+ */
+PSetCliWrapperPrivate::~PSetCliWrapperPrivate()
+{
+ DPRINT;
+}
+
+// -------- Observer interface --------- //
+/*!
+ PSetCliWrapperPrivate::SetEngineContact
+ */
+void PSetCliWrapperPrivate::SetEngineContact(MPsetCli* aEngine)
+{
+ DPRINT << "aEngine: " << aEngine;
+}
+
+/*!
+ PSetCliWrapperPrivate::HandleCliRequestingL
+ */
+void PSetCliWrapperPrivate::HandleCliRequestingL(TBool aOngoing,
+ TBool aInterrupted)
+{
+ DPRINT << "aOngoing: " << aOngoing
+ << " aInterrupted: " << aInterrupted;
+
+ QT_TRYCATCH_LEAVING(
+ emit m_Owner.handleCliRequesting(static_cast<bool>(aOngoing),
+ static_cast<bool> (aInterrupted));
+ )
+}
+
+/*!
+ PSetCliWrapperPrivate::CliInformationL
+ */
+void PSetCliWrapperPrivate::CliInformationL(TPsuiCli aType)
+{
+ DPRINT << "aType: " << aType;
+
+ QT_TRYCATCH_LEAVING(
+ emit m_Owner.cliInformation(static_cast<PsCallLineIdentity>(aType));
+ )
+}
+
+/*!
+ PSetCliWrapperPrivate::HandleCliStatusL
+ */
+void PSetCliWrapperPrivate::HandleCliStatusL(
+ TUint8 aBsc[KPSetNumberOfBsc], TPsuiCli aMode)
+{
+ DPRINT << "aBsc[0]: " << aBsc[0]
+ << " aMode: " << aMode;
+
+ QT_TRYCATCH_LEAVING(
+ emit m_Owner.handleCliStatus(static_cast<unsigned char *>(aBsc),
+ KPSetNumberOfBsc, static_cast<PsCallLineIdentity> (aMode));
+ )
+}
+
+/*!
+ PSetCliWrapperPrivate::HandleCnapStatusL
+ */
+void PSetCliWrapperPrivate::HandleCnapStatusL(TInt aStatus)
+{
+ DPRINT << "aStatus: " << aStatus;
+
+ QT_TRYCATCH_LEAVING(
+ emit m_Owner.handleCnapStatus(aStatus);
+ )
+}
+
+/*!
+ PSetCliWrapperPrivate::HandleCliErrorL
+ */
+void PSetCliWrapperPrivate::HandleCliErrorL(TInt aError)
+{
+ DPRINT << "aError: " << aError;
+
+ QT_TRYCATCH_LEAVING(
+ emit m_Owner.handleCliError(aError);
+ )
+}
+
+// End of File.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetcliwrapper_p.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+
+#ifndef PSETCLIWRAPPER_P_H_
+#define PSETCLIWRAPPER_P_H_
+
+#include <mpsetcliobserver.h>
+
+class PSetCliWrapper;
+
+class PSetCliWrapperPrivate : public MPsetCliObserver
+{
+public:
+ PSetCliWrapperPrivate( PSetCliWrapper &owner );
+ ~PSetCliWrapperPrivate();
+
+public: // From MPsetCliObserver
+ void SetEngineContact( MPsetCli* aEngine );
+ void HandleCliRequestingL( TBool aOngoing,
+ TBool aInterrupted );
+ void CliInformationL( TPsuiCli aType );
+ void HandleCliStatusL( TUint8 aBsc[KPSetNumberOfBsc], TPsuiCli aMode );
+ void HandleCnapStatusL( TInt aStatus );
+ void HandleCliErrorL( TInt aError );
+private:
+ PSetCliWrapper &m_Owner;
+};
+
+#endif
+
+// End of File.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkinfoconverter.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,153 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include "psetnetworkinfoconverter.h"
+
+/*!
+ \class NetworkInfoConverter
+ \brief Offers converting services between Symbian and Qt data types.
+*/
+
+/*!
+ NetworkInfoConverter::ConvertToSymbianType
+ */
+MPsetNetworkSelect::TNetworkInfo NetworkInfoConverter::ConvertToSymbianType(
+ const PSetNetworkWrapper::NetworkInfo &networkInfo)
+{
+ MPsetNetworkSelect::TNetworkInfo convertedType;
+ convertedType.iId = ConvertToSymbianType(networkInfo.m_id);
+ convertedType.iStatus = ConvertToSymbianType(networkInfo.m_status);
+ convertedType.iMode = ConvertToSymbianType(networkInfo.m_mode);
+ convertedType.iAccess = ConvertToSymbianType(networkInfo.m_access);
+ convertedType.iShortName.Copy(networkInfo.m_shortName.utf16());
+ convertedType.iLongName.Copy(networkInfo.m_longName.utf16());
+ return convertedType;
+}
+
+/*!
+ NetworkInfoConverter::ConvertToSymbianType
+ */
+MPsetNetworkSelect::TNetworkId NetworkInfoConverter::ConvertToSymbianType(
+ const PSetNetworkWrapper::NetworkId &networkId)
+{
+ MPsetNetworkSelect::TNetworkId convertedType;
+ convertedType.iCountryCode.Copy(networkId.m_countryCode.utf16());
+ convertedType.iNetworkCode.Copy(networkId.m_networkCode.utf16());
+ return convertedType;
+}
+
+/*!
+ NetworkInfoConverter::ConvertToSymbianType
+ */
+MPsetNetworkSelect::TNetworkStatus NetworkInfoConverter::ConvertToSymbianType(
+ const PSetNetworkWrapper::NetworkStatus &networkStatus)
+{
+ MPsetNetworkSelect::TNetworkStatus convertedType =
+ MPsetNetworkSelect::ENetStatUnknown;
+ switch (networkStatus)
+ {
+ case PSetNetworkWrapper::StatusUnknown:
+ convertedType = MPsetNetworkSelect::ENetStatUnknown;
+ break;
+ case PSetNetworkWrapper::StatusAvailable:
+ convertedType = MPsetNetworkSelect::ENetStatAvailable;
+ break;
+ case PSetNetworkWrapper::StatusCurrent:
+ convertedType = MPsetNetworkSelect::ENetStatCurrent;
+ break;
+ case PSetNetworkWrapper::StatusForbidden:
+ convertedType = MPsetNetworkSelect::ENetStatForbidden;
+ break;
+ default:
+ Q_ASSERT_X(false, "switch default", "unknown enumerator");
+ break;
+ }
+
+ return convertedType;
+}
+
+/*!
+ NetworkInfoConverter::ConvertToSymbianType
+ */
+MPsetNetworkSelect::TSelectMode NetworkInfoConverter::ConvertToSymbianType(
+ const PSetNetworkWrapper::NetworkSelectionMode &selectionMode)
+{
+ MPsetNetworkSelect::TSelectMode convertedType =
+ MPsetNetworkSelect::ENetSelectModeAutomatic;
+ switch (selectionMode)
+ {
+ case PSetNetworkWrapper::SelectionModeAutomatic:
+ convertedType = MPsetNetworkSelect::ENetSelectModeAutomatic;
+ break;
+ case PSetNetworkWrapper::SelectionModeManual:
+ convertedType = MPsetNetworkSelect::ENetSelectModeManual;
+ break;
+ default:
+ Q_ASSERT_X(false, "switch default", "unknown enumerator");
+ break;
+ }
+
+ return convertedType;
+}
+
+/*!
+ NetworkInfoConverter::ConvertToSymbianType
+ */
+MPsetNetworkSelect::TNetworkAccess NetworkInfoConverter::ConvertToSymbianType(
+ const PSetNetworkWrapper::NetworkAccessType &accessType)
+{
+ MPsetNetworkSelect::TNetworkAccess convertedType =
+ MPsetNetworkSelect::ENetNetworkGSM;
+ switch (accessType)
+ {
+ case PSetNetworkWrapper::AccessTypeGsm:
+ convertedType = MPsetNetworkSelect::ENetNetworkGSM;
+ break;
+ case PSetNetworkWrapper::AccessTypeWcdma:
+ convertedType = MPsetNetworkSelect::ENetNetworkWCDMA;
+ break;
+ default:
+ Q_ASSERT_X(false, "switch default", "unknown enumerator");
+ break;
+ }
+
+ return convertedType;
+}
+
+/*!
+ NetworkInfoConverter::ConvertToQtType
+ */
+PSetNetworkWrapper::NetworkSelectionMode NetworkInfoConverter::ConvertToQtType(
+ const MPsetNetworkSelect::TSelectMode &selectMode)
+{
+ PSetNetworkWrapper::NetworkSelectionMode convertedType =
+ PSetNetworkWrapper::SelectionModeAutomatic;
+ switch (selectMode)
+ {
+ case MPsetNetworkSelect::ENetSelectModeAutomatic:
+ convertedType = PSetNetworkWrapper::SelectionModeAutomatic;
+ break;
+ case MPsetNetworkSelect::ENetSelectModeManual:
+ convertedType = PSetNetworkWrapper::SelectionModeManual;
+ break;
+ default:
+ Q_ASSERT_X(false, "switch default", "unknown enumerator");
+ break;
+ }
+
+ return convertedType;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkinfoconverter.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef PSETNETWORKINFOCONVERTER_H
+#define PSETNETWORKINFOCONVERTER_H
+
+#include <psetnetworkwrapper.h>
+#include <MPsetNetworkSelect.h>
+
+class NetworkInfoConverter
+{
+public:
+
+ static MPsetNetworkSelect::TNetworkInfo ConvertToSymbianType(
+ const PSetNetworkWrapper::NetworkInfo &networkInfo);
+
+ static MPsetNetworkSelect::TNetworkId ConvertToSymbianType(
+ const PSetNetworkWrapper::NetworkId &networkId);
+
+ static MPsetNetworkSelect::TNetworkStatus ConvertToSymbianType(
+ const PSetNetworkWrapper::NetworkStatus &networkStatus);
+
+ static MPsetNetworkSelect::TSelectMode ConvertToSymbianType(
+ const PSetNetworkWrapper::NetworkSelectionMode &selectionMode);
+
+ static MPsetNetworkSelect::TNetworkAccess ConvertToSymbianType(
+ const PSetNetworkWrapper::NetworkAccessType &accessType);
+
+ static PSetNetworkWrapper::NetworkSelectionMode ConvertToQtType(
+ const MPsetNetworkSelect::TSelectMode &selectMode);
+};
+
+#endif // PSETNETWORKINFOCONVERTER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,224 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include <QtGlobal>
+#include "psetnetworkwrapper.h"
+#include "psetnetworkwrapper_p.h"
+#include "logging.h"
+
+/*!
+ \class PSetNetworkWrapper
+ \brief TODO: description
+*/
+
+/*!
+ \enum PSetNetworkWrapper::ErrorCode
+
+ This enumeration defines error codes used by PSetNetworkWrapper.
+*/
+/*!
+ \var PSetNetworkWrapper::ErrNoError
+ Indicates that no error has happened.
+*/
+
+// TODO: better commenting for NetworkAccessMode enumeration
+/*!
+ \enum NetworkAccessMode
+ This enumeration defines possible network access modes.
+*/
+/*!
+ \var PSetNetworkWrapper::AccessModeDual
+ Dual mode.
+*/
+/*!
+ \var PSetNetworkWrapper::AccessModeUmts
+ 3g/UMTS network mode.
+*/
+/*!
+ \var PSetNetworkWrapper::AccessModeGsm
+ 2g/GSM network mode.
+*/
+
+/*!
+ \struct PSetNetworkWrapper::NetworkId
+ NetworkId contains network and country identifiers.
+*/
+// TODO: is that valid way to document struct members
+/*!
+ \var PSetNetworkWrapper::NetworkId::m_countryCode
+ Country code. Maximum length is 4.
+*/
+/*!
+ \var PSetNetworkWrapper::NetworkId::m_networkCode
+ Network code. Maximum length is 8.
+*/
+
+/*!
+ \enum PSetNetworkWrapper::NetworkSelectionMode
+ Network selection mode.
+*/
+/*!
+ \var PSetNetworkWrapper::SelectionModeManual
+ Specific network is selected manually.
+*/
+/*!
+ \var PSetNetworkWrapper::SelectionModeAutomatic
+ Network is selected automatically without user interaction.
+*/
+
+/*!
+ \enum PSetNetworkWrapper::NetworkStatus
+ Status of a network.
+*/
+// TODO: enumerator comments
+/*!
+ \var PSetNetworkWrapper::StatusUnknown
+*/
+/*!
+ \var PSetNetworkWrapper::StatusAvailable
+*/
+/*!
+ \var PSetNetworkWrapper::StatusCurrent
+*/
+/*!
+ \var PSetNetworkWrapper::StatusForbidden
+*/
+
+/*!
+ \enum PSetNetworkWrapper::NetworkAccessType
+ Network access type.
+*/
+// TODO: enumerator comments
+/*!
+ \var PSetNetworkWrapper::AccessTypeGsm
+*/
+/*!
+ \var PSetNetworkWrapper::AccessTypeWcdma
+*/
+
+/*!
+ \struct PSetNetworkWrapper::NetworkInfo
+ Encapsulates information about network.
+*/
+// TODO: struct member commenting
+
+/*! void PSetNetworkWrapper::networkAccessModeGot(
+ PSetNetworkWrapper::NetworkAccessMode mode)
+
+ This signal is emitted when the current network access mode query has been
+ completed.
+*/
+
+/*!
+ PSetNetworkWrapper::PSetNetworkWrapper
+ */
+PSetNetworkWrapper::PSetNetworkWrapper(
+ CPsetContainer &psetContainer, QObject *parent)
+ :
+ QObject(parent),
+ m_privateImpl(new PSetNetworkWrapperPrivate(*this, psetContainer))
+{
+ DPRINT << ": IN";
+
+ Q_CHECK_PTR(m_privateImpl);
+
+ DPRINT << ": OUT";
+}
+
+/*!
+ PSetNetworkWrapper::~PSetNetworkWrapper
+ */
+PSetNetworkWrapper::~PSetNetworkWrapper()
+{
+ DPRINT << ": IN";
+
+ delete m_privateImpl;
+
+ DPRINT << ": OUT";
+}
+
+/*!
+ Puts network retrieve results into array.
+*/
+void PSetNetworkWrapper::getAvailableNetworks()
+{
+ DPRINT;
+
+ m_privateImpl->getAvailableNetworks();
+}
+
+/*!
+ Returns current network selection mode.
+
+ \param aMode Network selection mode.
+ \return Error code.
+*/
+PSetNetworkWrapper::ErrorCode PSetNetworkWrapper::getNetworkSelectionMode(
+ PSetNetworkWrapper::NetworkSelectionMode& mode) const
+{
+ DPRINT;
+
+ return m_privateImpl->getNetworkSelectionMode(mode);
+}
+
+/*!
+ Selects network, also for selecting automatic/manual mode.
+ \param aInfo Network information.
+*/
+void PSetNetworkWrapper::selectNetwork(
+ const PSetNetworkWrapper::NetworkInfo& info)
+{
+ DPRINT;
+
+ m_privateImpl->selectNetwork(info);
+}
+
+/*!
+ Cancels ongoing request if any.
+*/
+void PSetNetworkWrapper::cancelRequest()
+{
+ DPRINT;
+
+ m_privateImpl->cancelRequest();
+}
+
+/*!
+ Starts to query network access mode. Result is informed with a
+ networkAccessModeGot() signal.
+*/
+void PSetNetworkWrapper::getNetworkAccessMode() const
+{
+ DPRINT;
+
+ m_privateImpl->getNetworkAccessMode();
+}
+
+/*!
+ Sets network access mode.
+ \param mode Network access mode.
+ \return ErrorCode.
+*/
+void PSetNetworkWrapper::setNetworkAccessMode(
+ PSetNetworkWrapper::NetworkAccessMode mode)
+{
+ DPRINT;
+
+ m_privateImpl->setNetworkAccessMode(mode);
+}
+
+// End of File.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper_p.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,446 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include <rmmcustomapi.h>
+#include <PsetContainer.h>
+#include <PsetNetwork.h>
+#include <gsmerror.h>
+#include "psetnetworkwrapper_p.h"
+#include "logging.h"
+#include "psetnetworkinfoconverter.h"
+
+/*!
+ \class PSetNetworkWrapperPrivate
+ \brief Private implementation for network wrapper.
+*/
+
+/*!
+ PSetNetworkWrapperPrivate::PSetNetworkWrapperPrivate
+ */
+PSetNetworkWrapperPrivate::PSetNetworkWrapperPrivate(
+ PSetNetworkWrapper &owner,
+ CPsetContainer &psetContainer)
+ :
+ m_owner(owner),
+ m_psetNetwork(NULL),
+ m_psetNetworkMode(NULL)
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(
+ m_psetNetwork.reset(psetContainer.CreateNetworkObjectL(*this)));
+ m_psetNetwork->SetNetworkModeObserver(*this);
+ m_psetNetwork->SetNetSAObserver(*this);
+ QT_TRAP_THROWING(
+ m_psetNetworkMode.reset(psetContainer.CreateNetworkModeObjectL(*this)));
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetNetworkWrapperPrivate::~PSetNetworkWrapperPrivate
+ */
+PSetNetworkWrapperPrivate::~PSetNetworkWrapperPrivate()
+{
+ DPRINT << ": IN ";
+
+ while (!m_networkInfoList.isEmpty()) {
+ DPRINT << " delete : " << m_networkInfoList.takeFirst()->m_longName;
+ delete m_networkInfoList.takeFirst();
+ }
+ m_networkInfoList.clear();
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetNetworkWrapperPrivate::getAvailableNetworks.
+*/
+void PSetNetworkWrapperPrivate::getAvailableNetworks()
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(m_psetNetwork->GetAvailableNetworksL());
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetNetworkWrapperPrivate::getNetworkSelectionMode
+*/
+PSetNetworkWrapper::ErrorCode
+ PSetNetworkWrapperPrivate::getNetworkSelectionMode(
+ PSetNetworkWrapper::NetworkSelectionMode& mode) const
+{
+ DPRINT;
+
+ MPsetNetworkSelect::TSelectMode selectMode =
+ MPsetNetworkSelect::ENetSelectModeAutomatic;
+ int result = m_psetNetwork->GetNetworkSelectMode(selectMode);
+ mode = NetworkInfoConverter::ConvertToQtType(selectMode);
+
+ return ConvertToQtErrorCode(result);
+}
+
+/*!
+ PSetNetworkWrapperPrivate::selectNetwork.
+ */
+void PSetNetworkWrapperPrivate::selectNetwork(
+ const PSetNetworkWrapper::NetworkInfo& info)
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(m_psetNetwork->SelectNetworkL(
+ NetworkInfoConverter::ConvertToSymbianType(info)));
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetNetworkWrapperPrivate::cancelRequest
+*/
+void PSetNetworkWrapperPrivate::cancelRequest()
+{
+ DPRINT;
+
+ m_psetNetwork->CancelProcess();
+}
+
+/*!
+ PSetNetworkWrapperPrivate::getNetworkAccessMode
+*/
+void PSetNetworkWrapperPrivate::getNetworkAccessMode() const
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(
+ m_psetNetwork->GetCurrentNetworkModeSelectionL());
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetNetworkWrapperPrivate::setNetworkAccessMode
+*/
+void PSetNetworkWrapperPrivate::setNetworkAccessMode(
+ PSetNetworkWrapper::NetworkAccessMode mode)
+{
+ DPRINT << ": IN ";
+
+ RMmCustomAPI::TNetworkModeCaps modeCaps =
+ RMmCustomAPI::KCapsNetworkModeDual;
+ switch (mode) {
+ case PSetNetworkWrapper::AccessModeDual:
+ modeCaps = RMmCustomAPI::KCapsNetworkModeDual;
+ break;
+ case PSetNetworkWrapper::AccessModeUmts:
+ modeCaps = RMmCustomAPI::KCapsNetworkModeUmts;
+ break;
+ case PSetNetworkWrapper::AccessModeGsm:
+ modeCaps = RMmCustomAPI::KCapsNetworkModeGsm;
+ break;
+ default:
+ Q_ASSERT_X(false, "switch default", "unknown enumerator");
+ }
+
+ QT_TRAP_THROWING(m_psetNetwork->SetNetworkModeSelectionL(
+ reinterpret_cast<TUint32&>(modeCaps)));
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ From MPsetNetworkInfoObserver.
+ \see MPsetNetworkInfoObserver.
+*/
+void PSetNetworkWrapperPrivate::HandleNetworkInfoReceivedL(
+ const CNetworkInfoArray* aInfoArray,
+ const TInt aResult)
+{
+ DPRINT << ": IN ";
+
+ Q_UNUSED(aResult);
+ __ASSERT_DEBUG(NULL != aInfoArray, User::Leave(KErrArgument));
+
+ // delete qlist
+ while (!m_networkInfoList.isEmpty()) {
+ DPRINT << " delete : " << m_networkInfoList.takeFirst()->m_longName;
+ delete m_networkInfoList.takeFirst();
+ }
+ m_networkInfoList.clear();
+
+ const int itemsCount = aInfoArray->Count();
+
+ //then insert found networks
+ for(int i = 0; i < itemsCount; i++)
+ {
+ PSetNetworkWrapper::NetworkInfo *info = new PSetNetworkWrapper::NetworkInfo;
+
+ info->m_id.m_countryCode = QString::fromUtf16(
+ aInfoArray->At(i).iId.iCountryCode.Ptr(),
+ aInfoArray->At(i).iId.iCountryCode.Length());
+ info->m_id.m_networkCode = QString::fromUtf16(
+ aInfoArray->At(i).iId.iNetworkCode.Ptr(),
+ aInfoArray->At(i).iId.iNetworkCode.Length());
+ info->m_status =
+ static_cast<PSetNetworkWrapper::NetworkStatus>(
+ aInfoArray->At(i).iStatus);
+ info->m_mode =
+ static_cast<PSetNetworkWrapper::NetworkSelectionMode>(
+ aInfoArray->At(i).iMode);
+ info->m_access =
+ static_cast<PSetNetworkWrapper::NetworkAccessType>(
+ aInfoArray->At(i).iAccess);
+ info->m_shortName =
+ QString::fromUtf16(
+ aInfoArray->At(i).iShortName.Ptr(),
+ aInfoArray->At(i).iShortName.Length());
+ info->m_longName =
+ QString::fromUtf16(
+ aInfoArray->At(i).iLongName.Ptr(),
+ aInfoArray->At(i).iLongName.Length());
+
+ m_networkInfoList.append(info);
+ }
+
+ emit m_owner.availableNetworksGot(m_networkInfoList);
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ From MPsetNetworkInfoObserver.
+ \see MPsetNetworkInfoObserver.
+*/
+void PSetNetworkWrapperPrivate::HandleCurrentNetworkInfoL(
+ const MPsetNetworkSelect::TCurrentNetworkInfo& aCurrentInfo,
+ const TInt aResult)
+{
+ DPRINT;
+
+ Q_UNUSED(aCurrentInfo);
+ Q_UNUSED(aResult);
+}
+
+/*!
+ From MPsetNetworkInfoObserver.
+ \see MPsetNetworkInfoObserver.
+*/
+void PSetNetworkWrapperPrivate::HandleNetworkChangedL(
+ const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo,
+ const MPsetNetworkSelect::TCurrentNetworkStatus aStatus,
+ const TInt aResult)
+{
+ DPRINT;
+
+ Q_UNUSED(aCurrentInfo);
+ Q_UNUSED(aStatus);
+ Q_UNUSED(aResult);
+}
+
+/*!
+ From MPsetNetworkInfoObserver.
+ \see MPsetNetworkInfoObserver.
+*/
+void PSetNetworkWrapperPrivate::HandleNetworkChangedL(
+ const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo,
+ const RMobilePhone::TMobilePhoneRegistrationStatus& aStatus,
+ const TInt aResult)
+{
+ DPRINT << ": IN ";
+
+ Q_UNUSED(aResult);
+
+ PSetNetworkWrapper::NetworkInfo info;
+ info.m_id.m_countryCode = QString::fromUtf16(
+ aCurrentInfo.iId.iCountryCode.Ptr(),
+ aCurrentInfo.iId.iCountryCode.Length());
+ info.m_id.m_networkCode = QString::fromUtf16(
+ aCurrentInfo.iId.iNetworkCode.Ptr(),
+ aCurrentInfo.iId.iNetworkCode.Length());
+ info.m_status =
+ static_cast<PSetNetworkWrapper::NetworkStatus>(
+ aCurrentInfo.iStatus);
+ info.m_mode =
+ static_cast<PSetNetworkWrapper::NetworkSelectionMode>(
+ aCurrentInfo.iMode);
+ info.m_access =
+ static_cast<PSetNetworkWrapper::NetworkAccessType>(
+ aCurrentInfo.iAccess);
+ info.m_shortName =
+ QString::fromUtf16(
+ aCurrentInfo.iShortName.Ptr(),
+ aCurrentInfo.iShortName.Length());
+ info.m_longName =
+ QString::fromUtf16(
+ aCurrentInfo.iLongName.Ptr(),
+ aCurrentInfo.iLongName.Length());
+
+ PSetNetworkWrapper::RegistrationStatus status;
+ switch (aStatus){
+ case RMobilePhone::ERegisteredOnHomeNetwork:
+ status = PSetNetworkWrapper::RegisteredOnHomeNetwork;
+ break;
+ case RMobilePhone::ERegisteredRoaming:
+ status = PSetNetworkWrapper::RegisteredRoaming;
+ break;
+ }
+
+ emit m_owner.networkChanged(info, status);
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ From MPsetNetworkInfoObserver.
+ \see MPsetNetworkInfoObserver.
+*/
+void PSetNetworkWrapperPrivate::HandleSearchingNetworksL(
+ MPsetNetworkInfoObserver::TServiceRequest aRequest)
+{
+ DPRINT << ": IN ";
+
+ PSetNetworkWrapper::RequestType type =
+ static_cast<PSetNetworkWrapper::RequestType>(aRequest);
+ emit m_owner.searchingNetworks(type);
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ From MPsetNetworkInfoObserver.
+ \see MPsetNetworkInfoObserver.
+*/
+void PSetNetworkWrapperPrivate::HandleRequestingSelectedNetworkL(
+ TBool aOngoing)
+{
+ DPRINT << ": IN ";
+
+ emit m_owner.requestingSelectedNetwork(
+ static_cast<bool>(aOngoing));
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ From MPsetNetworkInfoObserver.
+ \see MPsetNetworkInfoObserver.
+*/
+void PSetNetworkWrapperPrivate::HandleCallActivatedL()
+{
+ DPRINT;
+}
+
+/*!
+ From MPsetNetworkInfoObserver.
+ \see MPsetNetworkInfoObserver.
+*/
+void PSetNetworkWrapperPrivate::HandleNetworkErrorL(
+ const MPsetNetworkInfoObserver::TServiceRequest aRequest,
+ const TInt aError)
+{
+ DPRINT << ": IN ";
+
+ PSetNetworkWrapper::ErrorCode error;
+ switch(aError) {
+ case KErrGsmNetCauseCallActive:
+ error = PSetNetworkWrapper::ErrCauseCallActive;
+ break;
+ case KErrGsm0707NoNetworkService:
+ error = PSetNetworkWrapper::ErrNoNetworkService;
+ break;
+ case KErrGsmOfflineOpNotAllowed:
+ error = PSetNetworkWrapper::ErrOfflineOpNotAllowed;
+ break;
+ default:
+ error = PSetNetworkWrapper::ErrNoNetworkAccess;
+ break;
+ }
+
+ emit m_owner.networkReqestFailed(
+ error, static_cast<PSetNetworkWrapper::RequestType>(aRequest));
+}
+
+/*!
+ From MPsetNetworkInfoObserver.
+ \see MPsetNetworkInfoObserver.
+*/
+void PSetNetworkWrapperPrivate::HandleNetworkSystemModeEventsL(
+ const MPsetNetworkModeObserver::TServiceRequest aRequest,
+ const TUint32 aNetworkModeCaps)
+{
+ DPRINT;
+
+ switch (aRequest) {
+ case MPsetNetworkModeObserver::EServiceRequestNone:
+ // TODO: what to do with this kind of event
+ break;
+ case MPsetNetworkModeObserver::EServiceRequestSetSelectedNetworkMode:
+ // TODO: implement this
+ break;
+ case MPsetNetworkModeObserver::EServiceRequestGetCurrentNetworkMode: {
+ PSetNetworkWrapper::NetworkAccessMode mode =
+ PSetNetworkWrapper::AccessModeDual;
+ if (aNetworkModeCaps & RMmCustomAPI::KCapsNetworkModeDual) {
+ mode = PSetNetworkWrapper::AccessModeDual;
+ } else if
+ (aNetworkModeCaps & RMmCustomAPI::KCapsNetworkModeUmts) {
+ mode = PSetNetworkWrapper::AccessModeUmts;
+ } else if
+ (aNetworkModeCaps & RMmCustomAPI::KCapsNetworkModeGsm) {
+ mode = PSetNetworkWrapper::AccessModeGsm;
+ } else {
+ Q_ASSERT(false);
+ }
+ QT_TRYCATCH_LEAVING(
+ emit m_owner.networkAccessModeGot(static_cast<int>(mode));
+ )
+
+ }
+ break;
+ default:
+ Q_ASSERT_X(false, "switch default", "unknown enumerator");
+ }
+}
+
+/*!
+ From MPsetNetworkInfoObserver.
+ \see MPsetNetworkInfoObserver.
+*/
+void PSetNetworkWrapperPrivate::HandleNetworkErrorL(
+ const MPsetNetworkModeObserver::TServiceRequest aRequest,
+ const TInt aError)
+{
+ DPRINT;
+
+ Q_UNUSED(aRequest);
+ Q_UNUSED(aError);
+}
+
+/*!
+ PSetNetworkWrapperPrivate::ConvertToQtErrorCode
+*/
+PSetNetworkWrapper::ErrorCode PSetNetworkWrapperPrivate::ConvertToQtErrorCode(
+ TInt symbianErrorCode) const
+{
+ // TODO: do proper conversion for error codes
+ if (KErrNone == symbianErrorCode) {
+ return PSetNetworkWrapper::ErrNoError;
+ } else {
+ return PSetNetworkWrapper::ErrGeneral;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetnetworkwrapper_p.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,126 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef PSETNETWORKWRAPPERPRIVATE_H
+#define PSETNETWORKWRAPPERPRIVATE_H
+
+#include <mpsetnetworkinfoobs.h>
+#include <mpsetnetworkmodeobs.h>
+#include <MPsetNetworkSelect.h>
+#include <QList>
+#include "psetnetworkwrapper.h"
+
+class PSetNetworkWrapper;
+class CPsetContainer;
+class CPsetNetwork;
+
+class PSetNetworkWrapperPrivate
+ :
+ public MPsetNetworkInfoObserver,
+ public MPsetNetworkModeObserver
+{
+public:
+
+ PSetNetworkWrapperPrivate(
+ PSetNetworkWrapper &owner,
+ CPsetContainer &psetContainer);
+
+ virtual ~PSetNetworkWrapperPrivate();
+
+public:
+
+ void getAvailableNetworks();
+
+ PSetNetworkWrapper::ErrorCode getNetworkSelectionMode(
+ PSetNetworkWrapper::NetworkSelectionMode& mode) const;
+
+ void selectNetwork(
+ const PSetNetworkWrapper::NetworkInfo& info);
+
+ void cancelRequest();
+
+public:
+
+ void getNetworkAccessMode() const;
+
+ void setNetworkAccessMode(PSetNetworkWrapper::NetworkAccessMode mode);
+
+public: // From MPsetNetworkInfoObserver
+
+ void HandleNetworkInfoReceivedL(
+ const CNetworkInfoArray* aInfoArray,
+ const TInt aResult );
+
+ void HandleCurrentNetworkInfoL(
+ const MPsetNetworkSelect::TCurrentNetworkInfo& aCurrentInfo,
+ const TInt aResult );
+
+ void HandleNetworkChangedL(
+ const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo,
+ const MPsetNetworkSelect::TCurrentNetworkStatus aStatus,
+ const TInt aResult );
+
+ void HandleNetworkChangedL(
+ const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo,
+ const RMobilePhone::TMobilePhoneRegistrationStatus& aStatus,
+ const TInt aResult );
+
+ void HandleSearchingNetworksL(
+ MPsetNetworkInfoObserver::TServiceRequest aRequest );
+
+ void HandleRequestingSelectedNetworkL(
+ TBool aOngoing );
+
+ void HandleCallActivatedL();
+
+ void HandleNetworkErrorL(
+ const MPsetNetworkInfoObserver::TServiceRequest aRequest,
+ const TInt aError );
+
+public: // From MPsetNetworkModeObserver
+
+ void HandleNetworkSystemModeEventsL(
+ const MPsetNetworkModeObserver::TServiceRequest aRequest,
+ const TUint32 aNetworkModeCaps );
+
+ void HandleNetworkErrorL(
+ const MPsetNetworkModeObserver::TServiceRequest aRequest,
+ const TInt aError );
+
+private:
+
+ PSetNetworkWrapper::ErrorCode ConvertToQtErrorCode(
+ TInt symbianErrorCode) const;
+
+private:
+
+ /*! Owner. */
+ PSetNetworkWrapper &m_owner;
+
+ // TODO: better comments
+ /*! Own. Network object used to observe network information. */
+ QScopedPointer<CPsetNetwork> m_psetNetwork;
+
+ /*! Own. Network object used to observe network mode changes. */
+ QScopedPointer<CPsetNetwork> m_psetNetworkMode;
+
+ QList<PSetNetworkWrapper::NetworkInfo*> m_networkInfoList;
+
+
+};
+
+#endif // PSETNETWORKWRAPPERPRIVATE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,123 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+
+#include <PsetContainer.h>
+#include "psetwrapper.h"
+#include "psetcliwrapper.h"
+#include "psetcallwaitingwrapper.h"
+#include "psetcalldivertingwrapper.h"
+#include "psetnetworkwrapper.h"
+#include "logging.h"
+
+/*!
+ PSetWrapper::PSetWrapper
+ */
+PSetWrapper::PSetWrapper(QObject *parent) :
+ QObject(parent),
+ m_psetContainer(NULL),
+ m_wrapperCli(NULL),
+ m_callWaitingWrapper(NULL),
+ m_callDivertingWrapper(NULL),
+ m_networkWrapper(NULL)
+{
+ DPRINT << ": IN ";
+
+ QT_TRAP_THROWING(m_psetContainer = CPsetContainer::NewL());
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetWrapper::~PSetWrapper
+ */
+PSetWrapper::~PSetWrapper()
+{
+ DPRINT << ": IN ";
+
+ delete m_wrapperCli;
+ delete m_callWaitingWrapper;
+ delete m_callDivertingWrapper;
+ delete m_networkWrapper;
+ delete m_psetContainer;
+
+ DPRINT << ": OUT ";
+}
+
+/*!
+ PSetWrapper::cliWrapper
+ */
+PSetCliWrapper& PSetWrapper::cliWrapper()
+{
+ DPRINT;
+
+ if (!m_wrapperCli) {
+ m_wrapperCli = new PSetCliWrapper(*m_psetContainer, this);
+ Q_CHECK_PTR(m_wrapperCli);
+ }
+
+ return *m_wrapperCli;
+}
+
+/*!
+ PSetWrapper::callWaitingWrapper
+ */
+PSetCallWaitingWrapper& PSetWrapper::callWaitingWrapper()
+{
+ DPRINT;
+
+ if (!m_callWaitingWrapper) {
+ m_callWaitingWrapper =
+ new PSetCallWaitingWrapper(*m_psetContainer, this);
+ Q_CHECK_PTR(m_callWaitingWrapper);
+ }
+
+ return *m_callWaitingWrapper;
+}
+
+/*!
+ PSetWrapper::callDivertingWrapper
+ */
+PSetCallDivertingWrapper& PSetWrapper::callDivertingWrapper()
+{
+ DPRINT;
+
+ if (!m_callDivertingWrapper) {
+ m_callDivertingWrapper =
+ new PSetCallDivertingWrapper(*m_psetContainer, this);
+ Q_CHECK_PTR(m_callDivertingWrapper);
+ }
+
+ return *m_callDivertingWrapper;
+}
+
+/*!
+ PSetWrapper::networkWrapper
+ */
+PSetNetworkWrapper& PSetWrapper::networkWrapper()
+{
+ DPRINT;
+
+ if (!m_networkWrapper) {
+ m_networkWrapper = new PSetNetworkWrapper(*m_psetContainer, this);
+ Q_CHECK_PTR(m_networkWrapper);
+ }
+
+ return *m_networkWrapper;
+}
+
+// End of File.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/src/psetwrapper_s.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,263 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+
+#include "psetwrapper.h"
+#include "psetcliwrapper.h"
+#include "psetcallwaitingwrapper.h"
+#include "psetcalldivertingwrapper.h"
+#include "psetnetworkwrapper.h"
+#include "logging.h"
+
+
+PSetWrapper::PSetWrapper(QObject *parent):
+ QObject(parent),
+ m_wrapperCli(NULL),
+ m_callWaitingWrapper(NULL),
+ m_callDivertingWrapper(NULL),
+ m_networkWrapper(NULL)
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+PSetWrapper::~PSetWrapper()
+{
+ DPRINT << "DUMMY WRAPPER";
+
+ delete m_wrapperCli;
+ delete m_callWaitingWrapper;
+ delete m_callDivertingWrapper;
+ delete m_networkWrapper;
+
+}
+
+PSetCliWrapper& PSetWrapper::cliWrapper()
+{
+ DPRINT << "DUMMY WRAPPER";
+
+ if( !m_wrapperCli ){
+ m_wrapperCli = new PSetCliWrapper(*m_psetContainer, this);
+ }
+
+ return *m_wrapperCli;
+}
+
+
+PSetCallWaitingWrapper& PSetWrapper::callWaitingWrapper()
+{
+ DPRINT << "DUMMY WRAPPER";
+
+ if( !m_callWaitingWrapper ){
+ m_callWaitingWrapper = new PSetCallWaitingWrapper(*m_psetContainer, this);
+ }
+
+ return *m_callWaitingWrapper;
+}
+
+
+PSetCallDivertingWrapper& PSetWrapper::callDivertingWrapper()
+{
+ DPRINT << "DUMMY WRAPPER";
+
+ if( !m_callWaitingWrapper ){
+ m_callDivertingWrapper = new PSetCallDivertingWrapper(*m_psetContainer, this);
+ }
+
+ return *m_callDivertingWrapper;
+}
+
+PSetNetworkWrapper& PSetWrapper::networkWrapper()
+{
+ DPRINT << "DUMMY WRAPPER";
+
+ if (!m_networkWrapper) {
+ m_networkWrapper = new PSetNetworkWrapper(*m_psetContainer, this);
+ }
+
+ return *m_networkWrapper;
+}
+
+class PSetCliWrapperPrivate {
+ PSetCliWrapperPrivate(){}
+};
+
+PSetCliWrapper::PSetCliWrapper( CPsetContainer &psetContainer,
+ QObject *parent):
+ QObject(parent), m_privateImpl(NULL)
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+PSetCliWrapper::~PSetCliWrapper()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+// -------- Wrapper interface --------- //
+void PSetCliWrapper::getColpMode()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetCliWrapper::getClipMode()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetCliWrapper::getClirMode()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetCliWrapper::getColrMode()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetCliWrapper::getCnap()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetCliWrapper::cancelAll()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+class PSetCallWaitingWrapperPrivate {
+ PSetCallWaitingWrapperPrivate(){}
+};
+
+PSetCallWaitingWrapper::PSetCallWaitingWrapper(
+ CPsetContainer &psetContainer,
+ QObject *parent) : QObject(parent), m_privateImpl(NULL)
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+PSetCallWaitingWrapper::~PSetCallWaitingWrapper()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+// -------- Wrapper interface --------- //
+void PSetCallWaitingWrapper::setCallWaiting( PsCallWaitingCommand aSetting,
+ int aBasicServiceGroup )
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetCallWaitingWrapper::getCallWaitingStatus()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetCallWaitingWrapper::cancelProcess()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+PSetCallDivertingWrapper::PSetCallDivertingWrapper(
+ CPsetContainer &psetContainer, QObject *parent) :
+ QObject(parent), m_DefaultNumberListCDes(NULL)
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+PSetCallDivertingWrapper::~PSetCallDivertingWrapper()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+// -------- Wrapper interface --------- //
+
+void PSetCallDivertingWrapper::setCallDiverting(
+ PSCallDivertingCommand& aSetting, int aBasicServiceGroup)
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetCallDivertingWrapper::getCallDivertingStatus(
+ const PsServiceGroup aServiceGroup, const PsCallDivertingCondition aCondition,
+ int aBsc)
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetCallDivertingWrapper::cancelProcess()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetCallDivertingWrapper::getDefaultNumbers(QStringList &aDefNumbers)
+{
+ DPRINT << "DUMMY WRAPPER";
+ aDefNumbers = m_DefaultnumberListQSList;
+}
+
+void PSetCallDivertingWrapper::setNewDefaultNumber(QString aNumber)
+{
+ DPRINT << "DUMMY WRAPPER";
+ m_DefaultnumberListQSList.append(aNumber);
+}
+
+PSetNetworkWrapper::PSetNetworkWrapper(
+ CPsetContainer &psetContainer, QObject *parent)
+ : QObject(parent)
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+PSetNetworkWrapper::~PSetNetworkWrapper()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetNetworkWrapper::getNetworkAccessMode() const
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetNetworkWrapper::setNetworkAccessMode(
+ PSetNetworkWrapper::NetworkAccessMode mode)
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetNetworkWrapper::getAvailableNetworks()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+PSetNetworkWrapper::ErrorCode PSetNetworkWrapper::getNetworkSelectionMode(
+ PSetNetworkWrapper::NetworkSelectionMode& mode) const
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetNetworkWrapper::selectNetwork(
+ const PSetNetworkWrapper::NetworkInfo& info)
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+void PSetNetworkWrapper::cancelRequest()
+{
+ DPRINT << "DUMMY WRAPPER";
+}
+
+// End of File.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/common/qtestmains60.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,40 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef QTESTMAINS60
+#define QTESTMAINS60
+
+#define QTEST_MAIN_S60(TestObject) \
+int main(int argc, char *argv[]) \
+{ \
+char *new_argv[3]; \
+QCoreApplication app(argc, argv); \
+\
+QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; \
+QByteArray bytes = str.toAscii(); \
+\
+char arg1[] = "-o"; \
+\
+new_argv[0] = argv[0]; \
+new_argv[1] = arg1; \
+new_argv[2] = bytes.data(); \
+\
+TestObject tc; \
+return QTest::qExec(&tc, 3, new_argv); \
+}
+
+#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/common/testutilities.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,251 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <QByteArray>
+#include "testutilities.h"
+
+/*!
+ Replaces global new operator for utilizing binary. Enables OOM
+ simulation and memory leak detection.
+
+ Note that creation of CBase derived Symbian classes
+ are not tracked, because CBase overloads new operator.
+ */
+void* operator new(std::size_t sz) throw(std::bad_alloc)
+{
+ return MemoryAllocator::alloc(sz);
+}
+
+/*!
+ Replaces global delete operator for utilizing binary. Enables OOM
+ simulation and memory leak detection.
+ */
+void operator delete(void* memoryAddr) throw()
+{
+ return MemoryAllocator::free(memoryAddr);
+}
+
+void* operator new(std::size_t sz, const std::nothrow_t&) throw()
+{
+ return qMalloc(sz);
+}
+
+void operator delete(void* memoryAddress, const std::nothrow_t&) throw()
+{
+ if (NULL != memoryAddress) {
+ qFree(memoryAddress);
+ }
+}
+
+bool MemoryAllocator::m_isOomSimulationEnabled = false;
+int MemoryAllocator::m_numOfAllocsSinceLastFail = 0;
+int MemoryAllocator::m_allocFailIndex = 1;
+QList<void*> MemoryAllocator::m_allocList;
+
+/*!
+ MemoryAllocator::enableOomSimulation
+ */
+void MemoryAllocator::enableOomSimulation()
+{
+ m_isOomSimulationEnabled = true;
+ m_allocFailIndex = 1;
+ m_numOfAllocsSinceLastFail = 0;
+}
+
+/*!
+ MemoryAllocator::disableOomSimulation
+ */
+void MemoryAllocator::disableOomSimulation()
+{
+ m_isOomSimulationEnabled = false;
+}
+
+/*!
+ MemoryAllocator::isOomSimulationEnabled
+ */
+bool MemoryAllocator::isOomSimulationEnabled()
+{
+ return m_isOomSimulationEnabled;
+}
+
+/*!
+ MemoryAllocator::currentAllocFailIndex
+ */
+int MemoryAllocator::currentAllocFailIndex()
+{
+ return m_allocFailIndex;
+}
+
+/*!
+ MemoryAllocator::alloc
+ */
+void* MemoryAllocator::alloc(std::size_t sz)
+{
+ if (isOomSimulationEnabled()) {
+ m_numOfAllocsSinceLastFail++;
+ if (m_allocFailIndex == m_numOfAllocsSinceLastFail) {
+ m_allocFailIndex++;
+ m_numOfAllocsSinceLastFail = 0;
+#ifdef QT_NO_EXCEPTIONS
+ return NULL;
+#else
+ throw std::bad_alloc();
+#endif
+ }
+ }
+
+ void *allocatedMemoryAddr = qMalloc(sz);
+ m_allocList.append(allocatedMemoryAddr);
+ return allocatedMemoryAddr;
+}
+
+/*!
+ MemoryAllocator::free
+ */
+void MemoryAllocator::free(void *memoryAddress)
+{
+ if (memoryAddress) {
+ int index = m_allocList.indexOf(memoryAddress);
+ if (-1 != index) {
+ m_allocList.removeAt(index);
+ }
+ qFree(memoryAddress);
+ }
+}
+
+/*!
+ MemoryAllocator::verifyMemoryAllocations
+ */
+void MemoryAllocator::verifyMemoryAllocations()
+{
+ int numOfUnfreedCells = m_allocList.count();
+ if (0 != numOfUnfreedCells) {
+ for ( int i = 0; i < numOfUnfreedCells; i++) {
+ qDebug("UNFREED CELL: %x", reinterpret_cast<int>(m_allocList.at(i)));
+ }
+
+ m_allocList.clear();
+ throw std::bad_alloc();
+ }
+
+ m_allocList.clear();
+}
+
+
+/*!
+ OomTestExecuter::runTest
+ */
+void OomTestExecuter::runTest(
+ QObject &testObject, const char *testMethod)
+{
+ qDebug() << "OomTestExecuter::runTest : IN :" << testMethod;
+
+ MemoryAllocator::enableOomSimulation();
+
+ bool exceptionCaught = false;
+ do {
+ exceptionCaught = false;
+ int currentAllocFailIndex = MemoryAllocator::currentAllocFailIndex();
+
+ try {
+ try {
+ QMetaObject::invokeMethod(
+ &testObject, "init", Qt::DirectConnection);
+ QMetaObject::invokeMethod(
+ &testObject, testMethod, Qt::DirectConnection);
+ } catch (const std::bad_alloc &ex) {
+ exceptionCaught = true;
+ QMetaObject::invokeMethod(
+ &testObject, "cleanup", Qt::DirectConnection);
+ }
+ // TODO: for some reason bad_alloc exception is corrupted to
+ // unknown exception and nested catch block is needed to be able to
+ // handle situation. One level catch does not work for some reason.
+ } catch (...) {
+ exceptionCaught = true;
+ QMetaObject::invokeMethod(
+ &testObject, "cleanup", Qt::DirectConnection);
+ if (currentAllocFailIndex == MemoryAllocator::currentAllocFailIndex()) {
+ qDebug() << "OomTestExecuter::runTest, ERROR: unexpected exception!";
+ throw;
+ }
+ }
+ } while(exceptionCaught);
+
+ QMetaObject::invokeMethod(&testObject, "cleanup", Qt::DirectConnection);
+ MemoryAllocator::disableOomSimulation();
+ qDebug() << "OomTestExecuter::runTest : OUT :" << testMethod;
+}
+
+/*!
+ OomTestExecuter::runAllTests
+ */
+void OomTestExecuter::runAllTests(
+ QObject &testObject, const char *callingTestMethod)
+{
+ const QMetaObject *metaObject = testObject.metaObject();
+
+ int methodCount = metaObject->methodCount();
+ for (int i = 0; i < methodCount; ++i) {
+ QMetaMethod slotMethodCandidate = metaObject->method(i);
+ if (!isValidSlot(slotMethodCandidate)) {
+ continue;
+ }
+
+ QByteArray slotMethodName(slotMethodCandidate.signature());
+ // remove parentheses
+ slotMethodName = slotMethodName.left(slotMethodName.length() - 2);
+
+ // Prevent from infinite loop and do not execute test method, which
+ // has called runAllTests.
+ if (slotMethodName != callingTestMethod) {
+ runTest(testObject, slotMethodName);
+ }
+ }
+}
+
+/*!
+ OomTestExecuter::isValidSlot
+ */
+bool OomTestExecuter::isValidSlot(const QMetaMethod &sl)
+{
+ if ((sl.access() != QMetaMethod::Private) || !sl.parameterTypes().isEmpty()
+ || qstrlen(sl.typeName()) || (sl.methodType() != QMetaMethod::Slot)) {
+ return false;
+ }
+
+ const char *sig = sl.signature();
+ int len = qstrlen(sig);
+ if (len < 2) {
+ return false;
+ }
+
+ if (sig[len - 2] != '(' || sig[len - 1] != ')') {
+ return false;
+ }
+
+ if (len > 7 && strcmp(sig + (len - 7), "_data()") == 0) {
+ return false;
+ }
+
+ if ((strcmp(sig, "initTestCase()") == 0) || (strcmp(sig, "cleanupTestCase()") == 0)
+ || (strcmp(sig, "cleanup()") == 0) || (strcmp(sig, "init()") == 0)) {
+ return false;
+ }
+
+ return true;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/common/testutilities.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,159 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef TESTUTILITIES_H
+#define TESTUTILITIES_H
+
+#include <qobject.h>
+#include <qglobal.h>
+#include <qlist.h>
+#include <qmetaobject.h>
+#include <QDebug>
+
+/*! Provides services for OOM simulation and memory leak detection. */
+class MemoryAllocator : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ /*! Activates OOM simulation. */
+ static void enableOomSimulation();
+
+ /*! Disables OOM simulation. */
+ static void disableOomSimulation();
+
+ /*! Checks whether OOM simulation is active. */
+ static bool isOomSimulationEnabled();
+
+ /*! Returns current alloc fail index. */
+ static int currentAllocFailIndex();
+
+ /*! Allocates memory. */
+ static void* alloc(std::size_t sz);
+
+ /*! Frees allocated memory. */
+ static void free(void *memoryAddress);
+
+ /*! Checks that all memory allocated through this allocator is freed. */
+ static void verifyMemoryAllocations();
+
+private:
+
+ static bool m_isOomSimulationEnabled;
+ static int m_numOfAllocsSinceLastFail;
+ static int m_allocFailIndex;
+ static QList<void*> m_allocList;
+};
+
+/*! Provides services to run QTest cases with OOM simulation. */
+class OomTestExecuter : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ /*! Runs specified test case with OOM simulation. */
+ template <typename CLASS>
+ static void runTest(CLASS& testObject, void(CLASS::*testMethod)())
+ {
+ MemoryAllocator::enableOomSimulation();
+
+ bool exceptionCaught = false;
+ do {
+ exceptionCaught = false;
+ int currentAllocFailIndex =
+ MemoryAllocator::currentAllocFailIndex();
+
+ try {
+ try {
+ QMetaObject::invokeMethod(
+ &testObject, "init", Qt::DirectConnection);
+ (testObject.*testMethod)();
+ } catch (const std::bad_alloc &ex) {
+ exceptionCaught = true;
+ QMetaObject::invokeMethod(
+ &testObject, "cleanup", Qt::DirectConnection);
+ }
+ // TODO: for some reason bad_alloc exception is corrupted to
+ // unknown exception and nested catch block is needed to be able to
+ // handle situation. One level try-catch does not work for some reason.
+ } catch (...) {
+ exceptionCaught = true;
+ QMetaObject::invokeMethod(
+ &testObject, "cleanup", Qt::DirectConnection);
+ if (currentAllocFailIndex == MemoryAllocator::currentAllocFailIndex()) {
+ qDebug() << "OomTestExecuter::runTest, ERROR: unexpected exception!";
+ throw;
+ }
+ }
+ } while(exceptionCaught);
+
+ QMetaObject::invokeMethod(&testObject, "cleanup", Qt::DirectConnection);
+ MemoryAllocator::disableOomSimulation();
+ }
+
+ /*! Runs specified test case with OOM simulation. */
+ static void runTest(
+ QObject &testObject,
+ const char *testMethod);
+
+ /*! Runs all test cases in given QTest object with OOM simulation. */
+ static void runAllTests(
+ QObject &testObject,
+ const char *callingTestMethod);
+
+private:
+
+ static bool isValidSlot(const QMetaMethod &sl);
+};
+
+#define EXPECT_EXCEPTION(statements) \
+{ \
+ bool exceptionDetected = false; \
+ try { \
+ statements \
+ } catch (...) { \
+ exceptionDetected = true; \
+ } \
+ QVERIFY(true == exceptionDetected); \
+}
+
+#define QTEST_MAIN_S60(TestObject) \
+int main(int argc, char *argv[]) \
+{ \
+ char *new_argv[3]; \
+ QCoreApplication app(argc, argv); \
+ \
+ QString str = "C:\\data\\" + QFileInfo(QCoreApplication::applicationFilePath()).baseName() + ".log"; \
+ QByteArray bytes = str.toAscii(); \
+ \
+ char arg1[] = "-o"; \
+ \
+ new_argv[0] = argv[0]; \
+ new_argv[1] = arg1; \
+ new_argv[2] = bytes.data(); \
+ \
+ TestObject tc; \
+ int result = QTest::qExec(&tc, 3, new_argv); \
+ \
+ MemoryAllocator::verifyMemoryAllocations(); \
+ \
+ return result;\
+}
+
+#endif // TESTUTILITIES_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cphcltemergencycall.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,155 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <smcmockclassincludes.h>
+#include <MPhCltEmergencyCallObserver.h>
+#include "mock_cphcltemergencycall.h"
+
+TBool CPhCltEmergencyCallMock::iSimulateEmergencyNumberMatch = EFalse;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CPhCltEmergencyCall::CPhCltEmergencyCall
+// C++ constructor.
+// -----------------------------------------------------------------------------
+//
+CPhCltEmergencyCall::CPhCltEmergencyCall(
+ MPhCltEmergencyCallObserver* aObserver )
+ : CActive( EPriorityStandard ), iObserver( aObserver )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhCltEmergencyCall::CPhCltEmergencyCall
+// -----------------------------------------------------------------------------
+//
+CPhCltEmergencyCall* CPhCltEmergencyCall::NewL(
+ MPhCltEmergencyCallObserver* aObserver )
+ {
+ return CPhCltEmergencyCallMock::NewL( aObserver );
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhCltEmergencyCallMock::CPhCltEmergencyCallMock
+// C++ constructor.
+// -----------------------------------------------------------------------------
+//
+CPhCltEmergencyCallMock::CPhCltEmergencyCallMock(
+ MPhCltEmergencyCallObserver * aObserver )
+ : CPhCltEmergencyCall( aObserver )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhCltEmergencyCallMock::NewL
+// -----------------------------------------------------------------------------
+//
+CPhCltEmergencyCallMock * CPhCltEmergencyCallMock::NewL(
+ MPhCltEmergencyCallObserver * aObserver )
+ {
+ SMC_MOCK_NEWL1( CPhCltEmergencyCallMock *, MPhCltEmergencyCallObserver *, aObserver )
+
+ CPhCltEmergencyCallMock* self = new( ELeave ) CPhCltEmergencyCallMock( aObserver );
+ CleanupStack::PushL( self );
+ //self->ConstructL()
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhCltEmergencyCallMock::IsEmergencyPhoneNumber
+// -----------------------------------------------------------------------------
+//
+TInt CPhCltEmergencyCallMock::IsEmergencyPhoneNumber(
+ const TDesC & aNumber,
+ TBool & aIsEmergencyNumber )
+ {
+ SMC_MOCK_METHOD2( TInt, const TDesC &, aNumber,
+ TBool &, aIsEmergencyNumber )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhCltEmergencyCallMock::FindEmergencyPhoneNumber
+// -----------------------------------------------------------------------------
+//
+TInt CPhCltEmergencyCallMock::FindEmergencyPhoneNumber(
+ TDes & aNumber,
+ TBool & aIsEmergencyNumber )
+ {
+ SMC_MOCK_METHOD2( TInt, TDes &, aNumber,
+ TBool &, aIsEmergencyNumber )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhCltEmergencyCallMock::DialEmergencyCallL
+// -----------------------------------------------------------------------------
+//
+void CPhCltEmergencyCallMock::DialEmergencyCallL(
+ const TDesC & aNumber )
+ {
+ SMC_MOCK_METHOD1( void, const TDesC &, aNumber )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhCltEmergencyCallMock::IsEmergencyPhoneNumber
+// -----------------------------------------------------------------------------
+//
+TInt CPhCltEmergencyCallMock::IsEmergencyPhoneNumber(
+ const TDesC & aNumber,
+ TDes & aMatchedEmergencyNumber,
+ TBool & aIsEmergencyNumber )
+ {
+ if (iSimulateEmergencyNumberMatch) {
+ aIsEmergencyNumber = ETrue;
+ }
+
+ SMC_MOCK_METHOD3( TInt, const TDesC &, aNumber,
+ TDes &, aMatchedEmergencyNumber,
+ TBool &, aIsEmergencyNumber )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhCltEmergencyCallMock::RunL
+// Declaration needed due to vftable references.
+// -----------------------------------------------------------------------------
+//
+void CPhCltEmergencyCallMock::RunL()
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhCltEmergencyCallMock::DoCancel
+// Declaration needed due to vftable references.
+// -----------------------------------------------------------------------------
+//
+void CPhCltEmergencyCallMock::DoCancel()
+ {
+
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cphcltemergencycall.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,144 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef CPHCLTEMERGENCYCALLMOCK_H
+#define CPHCLTEMERGENCYCALLMOCK_H
+
+#include <e32base.h>
+#include <CPhCltEmergencyCall.h>
+
+// FORWARD DECLARATIONS
+class MPhCltEmergencyCallObserver;
+
+// CLASS DECLARATION
+/**
+* Phone Client Emergency Call Api for emergency number query
+* and emergency dialing.
+*
+* @lib phoneclient.lib
+* @since SeriesS60_3.2
+*/
+class CPhCltEmergencyCallMock : public CPhCltEmergencyCall
+ {
+ public:
+ static TBool iSimulateEmergencyNumberMatch;
+
+ public: // Constructors and destructor
+
+ /**
+ * Create an instance that implements the interface.
+ *
+ * @param aObserver It is the observer for the instance.
+ * @return Returns the created instance.
+ */
+ static CPhCltEmergencyCallMock* NewL(
+ MPhCltEmergencyCallObserver* aObserver );
+
+ public: // New functions
+
+ /**
+ * Returns information whether the number specified was an emergency number.
+ *
+ * @param aNumber Number to be queried. aNumber might contain prefix (SS code)
+ * and/or postfix (DTMF part).
+ * The aNumber parameter should be a buffer and the
+ * clients are provided with a typedef called
+ * TPhCltEmergencyNumber.
+ *
+ * @param aIsEmergencyNumber If ETrue, then the aNumber
+ * parameter included emergency number.
+ * @return Returns error code of the success of the operation.
+ */
+ TInt IsEmergencyPhoneNumber( const TDesC& aNumber,
+ TBool& aIsEmergencyNumber );
+
+ /**
+ * Method can be used to check if the number specified contains
+ * a valid emergency number in the end of the number.
+ *
+ * @param aNumber Number to be queried, matched emergency number
+ * is returned in this parameter.
+ * The aNumber parameter should be a buffer and the
+ * clients are provided with a typedef called
+ * TPhCltTelephoneNumber.
+ *
+ * @param aIsEmergencyNumber If ETrue, then the aNumber parameter
+ * was emergency number.
+ * @return Returns error code of the success of the operation.
+ */
+ TInt FindEmergencyPhoneNumber( TDes& aNumber,
+ TBool& aIsEmergencyNumber );
+
+ /**
+ * Initiates an emergency call.
+ *
+ * @param aNumber Emergency number to be dialed.
+ * The aNumber parameter should be a buffer and the
+ * clients are provided with a typedef called
+ * TPhCltEmergencyNumber.
+ *
+ * If the aNumber parameter supplies an "empty" buffer
+ * the call is created either dialing the default emergency
+ * phone number or use the SET UP EMERGENCY request
+ * that does not contain a dialling number.
+ *
+ * Leaves with KErrArgument, if parameter aNumber was
+ * not an emergency number.
+ *
+ * @pre IsActive() returns EFalse, otherwise leaves with KErrInUse.
+ */
+ void DialEmergencyCallL( const TDesC& aNumber );
+
+ /**
+ * Returns information whether the number specified was an emergency
+ * number and also returns the plain emergency number.
+ *
+ * @param aNumber Number to be queried.aNumber might contain prefix (SS code)
+ * and/or postfix (DTMF part).
+ * The aNumber parameter should be a buffer and the
+ * clients are provided with a typedef called
+ * TPhCltEmergencyNumber.
+ *
+ * @param aMatchedEmergencyNumber Matched emergencynumber without prefix or
+ * postfix is returned in this parameter. The aMatchedEmergencyNumber
+ * parameter should be a buffer and the clients are
+ * provided with atypedef called TPhCltEmergencyNumber.
+ *
+ * @param aIsEmergencyNumber If ETrue, then the aNumber
+ * parameter included emergency number.
+ *
+ * @return Returns error code of the success of the operation.
+ */
+ TInt IsEmergencyPhoneNumber( const TDesC& aNumber,
+ TDes& aMatchedEmergencyNumber, TBool& aIsEmergencyNumber );
+
+ protected:
+
+ /**
+ * C++ constructor.
+ */
+ CPhCltEmergencyCallMock( MPhCltEmergencyCallObserver* aObserver );
+
+ void RunL();
+
+ void DoCancel();
+
+ };
+
+#endif // CPHCLTEMERGENCYCALLMOCK_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cvoicemailbox.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,246 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <QDebug>
+#include <smcmockclassincludes.h>
+#include <cvoicemailbox.h>
+#include <cvoicemailboxentry.h>
+#include <mvoicemailboxobserver.h>
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// TVoiceMailboxParams::TVoiceMailboxParams
+// -----------------------------------------------------------------------------
+//
+TVoiceMailboxParams::TVoiceMailboxParams( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// TVoiceMailboxParams::Version
+// -----------------------------------------------------------------------------
+//
+TInt TVoiceMailboxParams::Version( )
+ {
+ SMC_MOCK_METHOD0( TInt )
+ }
+
+
+// -----------------------------------------------------------------------------
+// TVoiceMailboxParams::TVoiceMailboxParams
+// -----------------------------------------------------------------------------
+//
+TVoiceMailboxParams::TVoiceMailboxParams(
+ const CVoiceMailboxEntry & aEntry )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::CVoiceMailbox
+// -----------------------------------------------------------------------------
+//
+CVoiceMailbox::CVoiceMailbox( )
+ //:
+ //CBase( /**/ )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CVoiceMailbox::ConstructL( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::NewL
+// -----------------------------------------------------------------------------
+//
+CVoiceMailbox * CVoiceMailbox::NewL( )
+ {
+ SMC_MOCK_NEWL0( CVoiceMailbox * )
+
+ CVoiceMailbox* self = new( ELeave ) CVoiceMailbox;
+ CleanupStack::PushL( self );
+ //self->ConstructL()
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::NewLC
+// -----------------------------------------------------------------------------
+//
+CVoiceMailbox * CVoiceMailbox::NewLC( )
+ {
+ SMC_MOCK_NEWLC0( CVoiceMailbox * )
+
+ CVoiceMailbox* self = new( ELeave ) CVoiceMailbox;
+ CleanupStack::PushL( self );
+ //self->ConstructL()
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::~CVoiceMailbox
+// -----------------------------------------------------------------------------
+//
+CVoiceMailbox::~CVoiceMailbox( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::GetStoredEntry
+// -----------------------------------------------------------------------------
+//
+TInt CVoiceMailbox::GetStoredEntry(
+ const TVoiceMailboxParams & aParams,
+ CVoiceMailboxEntry * & aEntry ) const
+ {
+
+ CVoiceMailboxEntry* vmbxEntry = NULL;
+ vmbxEntry = CVoiceMailboxEntry::NewL();
+ vmbxEntry->SetServiceId( KVmbxServiceVoice );
+ vmbxEntry->SetVoiceMailboxType( EVmbxVoice );
+ vmbxEntry->SetVmbxAlsLineType( EVmbxAlsLine1 );
+ aEntry = vmbxEntry;
+ SMC_MOCK_METHOD2( TInt, const TVoiceMailboxParams &, aParams,
+ CVoiceMailboxEntry *, aEntry )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::SaveEntry
+// -----------------------------------------------------------------------------
+//
+TInt CVoiceMailbox::SaveEntry(
+ const CVoiceMailboxEntry & aEntry )
+ {
+ SMC_MOCK_METHOD1( TInt, const CVoiceMailboxEntry &, aEntry )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::QueryNewEntry
+// -----------------------------------------------------------------------------
+//
+TInt CVoiceMailbox::QueryNewEntry(
+ const TVoiceMailboxParams & aParams,
+ CVoiceMailboxEntry * & aEntry )
+ {
+ SMC_MOCK_METHOD2( TInt, const TVoiceMailboxParams &, aParams,
+ CVoiceMailboxEntry *, aEntry )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::QueryChangeEntry
+// -----------------------------------------------------------------------------
+//
+TInt CVoiceMailbox::QueryChangeEntry(
+ const TVoiceMailboxParams & aParams,
+ CVoiceMailboxEntry * & aEntry )
+ {
+ SMC_MOCK_METHOD2( TInt, const TVoiceMailboxParams &, aParams,
+ CVoiceMailboxEntry *, aEntry )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::QueryVmbxType
+// -----------------------------------------------------------------------------
+//
+TInt CVoiceMailbox::QueryVmbxType(
+ TVoiceMailboxParams & aParams )
+ {
+ SMC_MOCK_METHOD1( TInt, TVoiceMailboxParams &, aParams )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::NotifyVmbxNumberChangeL
+// -----------------------------------------------------------------------------
+//
+void CVoiceMailbox::NotifyVmbxNumberChangeL(
+ MVoiceMailboxObserver & aObserver,
+ const TBool aNotifyOnActiveLineOnly )
+ {
+ SMC_MOCK_METHOD2( void, MVoiceMailboxObserver &, aObserver,
+ const TBool, aNotifyOnActiveLineOnly )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::NotifyVmbxNumberChangeCancel
+// -----------------------------------------------------------------------------
+//
+void CVoiceMailbox::NotifyVmbxNumberChangeCancel( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::CheckConfiguration
+// -----------------------------------------------------------------------------
+//
+TBool CVoiceMailbox::CheckConfiguration(
+ const TVoiceMailboxParams & aParams,
+ const TInt aFlags )
+ {
+ SMC_MOCK_METHOD2( TBool, const TVoiceMailboxParams &, aParams,
+ const TInt, aFlags )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::GetServiceIds
+// -----------------------------------------------------------------------------
+//
+TInt CVoiceMailbox::GetServiceIds(
+ RIdArray & aProfileIds ) const
+ {
+ SMC_MOCK_METHOD1( TInt, RIdArray &, aProfileIds )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailbox::SaveProvisionedEntry
+// -----------------------------------------------------------------------------
+//
+TInt CVoiceMailbox::SaveProvisionedEntry(
+ const CVoiceMailboxEntry & aEntry )
+ {
+ SMC_MOCK_METHOD1( TInt, const CVoiceMailboxEntry &, aEntry )
+ }
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_cvoicemailboxentry.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,248 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <QDebug>
+#include <smcmockclassincludes.h>
+#include "cvoicemailboxentry.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::CVoiceMailboxEntry
+// -----------------------------------------------------------------------------
+//
+CVoiceMailboxEntry::CVoiceMailboxEntry( )
+ //:
+ //CBase( /**/ )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CVoiceMailboxEntry::ConstructL( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::NewL
+// -----------------------------------------------------------------------------
+//
+CVoiceMailboxEntry * CVoiceMailboxEntry::NewL( )
+ {
+ SMC_MOCK_NEWL0( CVoiceMailboxEntry * )
+
+ CVoiceMailboxEntry* self = new( ELeave ) CVoiceMailboxEntry;
+ CleanupStack::PushL( self );
+ //self->ConstructL()
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::NewLC
+// -----------------------------------------------------------------------------
+//
+CVoiceMailboxEntry * CVoiceMailboxEntry::NewLC( )
+ {
+ SMC_MOCK_NEWLC0( CVoiceMailboxEntry * )
+
+ CVoiceMailboxEntry* self = new( ELeave ) CVoiceMailboxEntry;
+ CleanupStack::PushL( self );
+ //self->ConstructL()
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::~CVoiceMailboxEntry
+// -----------------------------------------------------------------------------
+//
+CVoiceMailboxEntry::~CVoiceMailboxEntry( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::ServiceId
+// -----------------------------------------------------------------------------
+//
+TServiceId CVoiceMailboxEntry::ServiceId( ) const
+ {
+ SMC_MOCK_METHOD0( TServiceId )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetServiceId
+// -----------------------------------------------------------------------------
+//
+void CVoiceMailboxEntry::SetServiceId(
+ const TServiceId & aVmbxServiceId )
+ {
+ SMC_MOCK_METHOD1( void, const TServiceId &, aVmbxServiceId )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::VoiceMailboxType
+// -----------------------------------------------------------------------------
+//
+TVmbxType CVoiceMailboxEntry::VoiceMailboxType( ) const
+ {
+ SMC_MOCK_METHOD0( TVmbxType )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetVoiceMailboxType
+// -----------------------------------------------------------------------------
+//
+void CVoiceMailboxEntry::SetVoiceMailboxType(
+ const TVmbxType & aVmbxType )
+ {
+ SMC_MOCK_METHOD1( void, const TVmbxType &, aVmbxType )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::VmbxAlsLineType
+// -----------------------------------------------------------------------------
+//
+TVmbxAlsLineType CVoiceMailboxEntry::VmbxAlsLineType( ) const
+ {
+ SMC_MOCK_METHOD0( TVmbxAlsLineType )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetVmbxAlsLineType
+// -----------------------------------------------------------------------------
+//
+void CVoiceMailboxEntry::SetVmbxAlsLineType(
+ const TVmbxAlsLineType & aLine )
+ {
+ SMC_MOCK_METHOD1( void, const TVmbxAlsLineType &, aLine )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::GetVmbxNumber
+// -----------------------------------------------------------------------------
+//
+TInt CVoiceMailboxEntry::GetVmbxNumber(
+ TPtrC & aVmbxNumber ) const
+ {
+// _LIT(vmbxNumber, "1234");
+// TPtrC vmbxNumber( _LIT("12345" ));
+// aVmbxNumber = vmbxNumber;
+ SMC_MOCK_METHOD1( TInt, TPtrC &, aVmbxNumber )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetVmbxNumber
+// -----------------------------------------------------------------------------
+//
+TInt CVoiceMailboxEntry::SetVmbxNumber(
+ const TDesC & aVmbxNumber )
+ {
+ SMC_MOCK_METHOD1( TInt, const TDesC &, aVmbxNumber )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::GetBrandId
+// -----------------------------------------------------------------------------
+//
+TInt CVoiceMailboxEntry::GetBrandId(
+ TPtrC8 & aBrandId ) const
+ {
+ SMC_MOCK_METHOD1( TInt, TPtrC8 &, aBrandId )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetBrandId
+// -----------------------------------------------------------------------------
+//
+TInt CVoiceMailboxEntry::SetBrandId(
+ const TDesC8 & aBrandId )
+ {
+ SMC_MOCK_METHOD1( TInt, const TDesC8 &, aBrandId )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::GetVmbxName
+// -----------------------------------------------------------------------------
+//
+TInt CVoiceMailboxEntry::GetVmbxName(
+ TPtrC & aVmbxName ) const
+ {
+ SMC_MOCK_METHOD1( TInt, TPtrC &, aVmbxName )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetVmbxName
+// -----------------------------------------------------------------------------
+//
+TInt CVoiceMailboxEntry::SetVmbxName(
+ const TDesC & aVmbxName )
+ {
+ SMC_MOCK_METHOD1( TInt, const TDesC &, aVmbxName )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::UsingMemoryLocation
+// -----------------------------------------------------------------------------
+//
+TVmbxMemoryLocation CVoiceMailboxEntry::UsingMemoryLocation( ) const
+ {
+ SMC_MOCK_METHOD0( TVmbxMemoryLocation )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::Reset
+// -----------------------------------------------------------------------------
+//
+void CVoiceMailboxEntry::Reset( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetUsingMemoryLocation
+// -----------------------------------------------------------------------------
+//
+void CVoiceMailboxEntry::SetUsingMemoryLocation(
+ const TVmbxMemoryLocation & aType )
+ {
+ SMC_MOCK_METHOD1( void, const TVmbxMemoryLocation &, aType )
+ }
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcalldiverting.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,255 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <smcmockclassincludes.h>
+#include <etelmm.h>
+#include <e32math.h>
+#include <e32svr.h>
+#include <badesca.h>
+#include <centralrepository.h>
+#include <SettingsInternalCRKeys.h>
+#include <MPsetRequestObs.h>
+#include <MPsetDivertObs.h>
+#include "PsetCallDiverting.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::CPsetCallDiverting
+// -----------------------------------------------------------------------------
+//
+CPsetCallDiverting::CPsetCallDiverting(
+ RMobilePhone & aPhone ) : iPhone(aPhone)
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CPsetCallDiverting::ConstructL(
+ MPsetDivertObserver & /*aObserver*/ )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::NewL
+// -----------------------------------------------------------------------------
+//
+CPsetCallDiverting * CPsetCallDiverting::NewL(
+ MPsetDivertObserver & aObserver,
+ RMobilePhone & aPhone )
+ {
+ SMC_MOCK_NEWL2( CPsetCallDiverting *, MPsetDivertObserver &, aObserver,
+ RMobilePhone &, aPhone )
+
+ CPsetCallDiverting* self = new( ELeave ) CPsetCallDiverting( aPhone );
+ CleanupStack::PushL( self );
+ //self->ConstructL()
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::~CPsetCallDiverting
+// -----------------------------------------------------------------------------
+//
+CPsetCallDiverting::~CPsetCallDiverting( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::SetDivertingL
+// -----------------------------------------------------------------------------
+//
+void CPsetCallDiverting::SetDivertingL(
+ const TCallDivertSetting & aDivert,
+ TBasicServiceGroups aBsc,
+ TBool aVmbx )
+ {
+ SMC_MOCK_METHOD3( void, const TCallDivertSetting &, aDivert,
+ TBasicServiceGroups, aBsc,
+ TBool, aVmbx )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::GetDivertingStatusL
+// -----------------------------------------------------------------------------
+//
+void CPsetCallDiverting::GetDivertingStatusL(
+ const TServiceGroup aServiceGroup,
+ const TCallDivertingCondition aCondition,
+ TBasicServiceGroups aBsc )
+ {
+ SMC_MOCK_METHOD3( void, const TServiceGroup, aServiceGroup,
+ const TCallDivertingCondition, aCondition,
+ TBasicServiceGroups, aBsc )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::CancelCurrentRequest
+// -----------------------------------------------------------------------------
+//
+TInt CPsetCallDiverting::CancelCurrentRequest( )
+ {
+ SMC_MOCK_METHOD0( TInt )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::GetTimerValueL
+// -----------------------------------------------------------------------------
+//
+TInt CPsetCallDiverting::GetTimerValueL( )
+ {
+ SMC_MOCK_METHOD0( TInt )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::SetTimerValueL
+// -----------------------------------------------------------------------------
+//
+TInt CPsetCallDiverting::SetTimerValueL(
+ const TInt & aIndex )
+ {
+ SMC_MOCK_METHOD1( TInt, const TInt &, aIndex )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::GetDefaultNumbersL
+// -----------------------------------------------------------------------------
+//
+TInt CPsetCallDiverting::GetDefaultNumbersL(
+ CDesC16ArrayFlat & aDefNumbers )
+ {
+ _LIT( KNumber1,"111111" );
+ _LIT( KNumber2,"222222" );
+
+ aDefNumbers.AppendL(KNumber1());
+ aDefNumbers.AppendL(KNumber2());
+
+ SMC_MOCK_METHOD1( TInt, CDesC16ArrayFlat &, aDefNumbers )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::SetNewDefaultNumberL
+// -----------------------------------------------------------------------------
+//
+TInt CPsetCallDiverting::SetNewDefaultNumberL(
+ TDes & aNumber )
+ {
+ SMC_MOCK_METHOD1( TInt, TDes &, aNumber )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::SwapDefaultNumberL
+// -----------------------------------------------------------------------------
+//
+void CPsetCallDiverting::SwapDefaultNumberL(
+ const TInt & aLocation )
+ {
+ SMC_MOCK_METHOD1( void, const TInt &, aLocation )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::SetUsedDataNumberL
+// -----------------------------------------------------------------------------
+//
+TInt CPsetCallDiverting::SetUsedDataNumberL(
+ TTelNumber & aNumber )
+ {
+ SMC_MOCK_METHOD1( TInt, TTelNumber &, aNumber )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::SetUsedFaxNumberL
+// -----------------------------------------------------------------------------
+//
+TInt CPsetCallDiverting::SetUsedFaxNumberL(
+ TTelNumber & aNumber )
+ {
+ SMC_MOCK_METHOD1( TInt, TTelNumber &, aNumber )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::GetUsedFaxNumberLC
+// -----------------------------------------------------------------------------
+//
+HBufC * CPsetCallDiverting::GetUsedFaxNumberLC( )
+ {
+ SMC_MOCK_METHOD0( HBufC * )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::GetUsedDataNumberLC
+// -----------------------------------------------------------------------------
+//
+HBufC * CPsetCallDiverting::GetUsedDataNumberLC( )
+ {
+ SMC_MOCK_METHOD0( HBufC * )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::SetRequestObserver
+// -----------------------------------------------------------------------------
+//
+void CPsetCallDiverting::SetRequestObserver(
+ MPsetRequestObserver * aObs )
+ {
+ SMC_MOCK_METHOD1( void, MPsetRequestObserver *, aObs )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::VoiceMailQueryL
+// -----------------------------------------------------------------------------
+//
+void CPsetCallDiverting::VoiceMailQueryL(
+ TDes & aTelNumber )
+ {
+ SMC_MOCK_METHOD1( void, TDes &, aTelNumber )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallDiverting::VideoMailQueryL
+// -----------------------------------------------------------------------------
+//
+void CPsetCallDiverting::VideoMailQueryL(
+ TDes & aTelNumber )
+ {
+ SMC_MOCK_METHOD1( void, TDes &, aTelNumber )
+ }
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcalldivertingwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,116 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#include <QtGlobal>
+#include <QDebug>
+#include <smcmockclassincludes.h>
+#include "psetcalldivertingwrapper.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// PSetCallDivertingWrapper::PSetCallDivertingWrapper
+// -----------------------------------------------------------------------------
+//
+PSetCallDivertingWrapper::PSetCallDivertingWrapper(
+ CPsetContainer & /*psetContainer*/,
+ QObject * parent )
+ :
+ QObject(parent)
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCallDivertingWrapper::~PSetCallDivertingWrapper
+// -----------------------------------------------------------------------------
+//
+PSetCallDivertingWrapper::~PSetCallDivertingWrapper( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCallDivertingWrapper::setCallDiverting
+// -----------------------------------------------------------------------------
+//
+int PSetCallDivertingWrapper::setCallDiverting(
+ PSCallDivertingCommand & aSetting,
+ int aBasicServiceGroup )
+ {
+ SMC_MOCK_METHOD2( int, PSCallDivertingCommand &, aSetting,
+ int, aBasicServiceGroup )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCallDivertingWrapper::getCallDivertingStatus
+// -----------------------------------------------------------------------------
+//
+void PSetCallDivertingWrapper::getCallDivertingStatus(
+ const PsServiceGroup aServiceGroup,
+ const PsCallDivertingCondition aCondition,
+ int aBsc )
+ {
+ SMC_MOCK_METHOD3( void, int/*const PsServiceGroup*/, static_cast<int>(aServiceGroup),
+ const PsCallDivertingCondition, aCondition,
+ int, aBsc )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCallDivertingWrapper::cancelProcess
+// -----------------------------------------------------------------------------
+//
+void PSetCallDivertingWrapper::cancelProcess( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCallDivertingWrapper::getDefaultNumbers
+// -----------------------------------------------------------------------------
+//
+void PSetCallDivertingWrapper::getDefaultNumbers(
+ QStringList & aDefNumbers )
+ {
+ SMC_MOCK_METHOD1( void, QStringList &, aDefNumbers )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCallDivertingWrapper::setNewDefaultNumber
+// -----------------------------------------------------------------------------
+//
+void PSetCallDivertingWrapper::setNewDefaultNumber(
+ QString aNumber )
+ {
+ SMC_MOCK_METHOD1( void, QString, aNumber )
+ }
+
+// -----------------------------------------------------------------------------
+// PSetCallDivertingWrapper::getVoiceMailBoxNumber
+// -----------------------------------------------------------------------------
+//
+void PSetCallDivertingWrapper::getVoiceMailBoxNumber(
+ QString & aNumber )
+ {
+ SMC_MOCK_METHOD1( void, QString & , aNumber )
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcallwaiting.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,150 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <smcmockclassincludes.h>
+#include <MPsetRequestObs.h>
+#include "PsetCallWaiting.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CPsetCallWaiting::CPsetCallWaiting
+// -----------------------------------------------------------------------------
+//
+CPsetCallWaiting::CPsetCallWaiting(
+ RMobilePhone & aPhone )
+ :
+ CActive( EPriorityStandard ),
+ iPhone(aPhone)
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallWaiting::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CPsetCallWaiting::ConstructL(
+ MPsetCallWaitingObserver & /*aObserver*/ )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallWaiting::NewL
+// -----------------------------------------------------------------------------
+//
+CPsetCallWaiting * CPsetCallWaiting::NewL(
+ RMobilePhone & aPhone,
+ MPsetCallWaitingObserver & aObserver )
+ {
+ SMC_MOCK_NEWL2( CPsetCallWaiting *, RMobilePhone &, aPhone,
+ MPsetCallWaitingObserver &, aObserver )
+
+ CPsetCallWaiting* self = new( ELeave ) CPsetCallWaiting(aPhone);
+ CleanupStack::PushL( self );
+ //self->ConstructL()
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallWaiting::~CPsetCallWaiting
+// -----------------------------------------------------------------------------
+//
+CPsetCallWaiting::~CPsetCallWaiting( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallWaiting::SetCallWaitingL
+// -----------------------------------------------------------------------------
+//
+void CPsetCallWaiting::SetCallWaitingL(
+ TSetCallWaiting aSetting,
+ TBasicServiceGroups aBsc )
+ {
+ SMC_MOCK_METHOD2( void, TSetCallWaiting, aSetting,
+ TBasicServiceGroups, aBsc )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallWaiting::GetCallWaitingStatusL
+// -----------------------------------------------------------------------------
+//
+void CPsetCallWaiting::GetCallWaitingStatusL( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallWaiting::CancelProcess
+// -----------------------------------------------------------------------------
+//
+TInt CPsetCallWaiting::CancelProcess( )
+ {
+ SMC_MOCK_METHOD0( TInt )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallWaiting::SetRequestObserver
+// -----------------------------------------------------------------------------
+//
+void CPsetCallWaiting::SetRequestObserver(
+ MPsetRequestObserver * aObs )
+ {
+ SMC_MOCK_METHOD1( void, MPsetRequestObserver *, aObs )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCallWaiting::PhoneSettingChanged
+// -----------------------------------------------------------------------------
+//
+void CPsetCallWaiting::PhoneSettingChanged(
+ TSSSettingsSetting aSetting,
+ TInt aNewValue )
+ {
+ SMC_MOCK_METHOD2( void, TSSSettingsSetting, aSetting,
+ TInt, aNewValue )
+ }
+
+// -----------------------------------------------------------------------------
+// CPsetCallWaiting::RunL
+// -----------------------------------------------------------------------------
+//
+void CPsetCallWaiting::RunL()
+{
+
+}
+
+// -----------------------------------------------------------------------------
+// CPsetCallWaiting::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CPsetCallWaiting::DoCancel()
+{
+
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcallwaitingwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#include <QtGlobal>
+#include <QDebug>
+#include <smcmockclassincludes.h>
+#include "psetcallwaitingwrapper.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+class PSetCallWaitingWrapperPrivate
+{
+public:
+ PSetCallWaitingWrapperPrivate() {}
+};
+
+// -----------------------------------------------------------------------------
+// PSetCallWaitingWrapper::PSetCallWaitingWrapper
+// -----------------------------------------------------------------------------
+//
+PSetCallWaitingWrapper::PSetCallWaitingWrapper(
+ CPsetContainer & /*psetContainer*/,
+ QObject * parent )
+ :
+ QObject(parent)
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCallWaitingWrapper::~PSetCallWaitingWrapper
+// -----------------------------------------------------------------------------
+//
+PSetCallWaitingWrapper::~PSetCallWaitingWrapper( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCallWaitingWrapper::setCallWaiting
+// -----------------------------------------------------------------------------
+//
+void PSetCallWaitingWrapper::setCallWaiting(
+ PsCallWaitingCommand aSetting,
+ int aBasicServiceGroup )
+ {
+ SMC_MOCK_METHOD2( void, PsCallWaitingCommand, aSetting,
+ int, aBasicServiceGroup )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCallWaitingWrapper::getCallWaitingStatus
+// -----------------------------------------------------------------------------
+//
+void PSetCallWaitingWrapper::getCallWaitingStatus( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCallWaitingWrapper::cancelProcess
+// -----------------------------------------------------------------------------
+//
+void PSetCallWaitingWrapper::cancelProcess( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcli.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,152 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#include <smcmockclassincludes.h>
+#include <MPsetRequestObs.h>
+#include "PsetCli.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CPsetCli::CPsetCli
+// -----------------------------------------------------------------------------
+//
+CPsetCli::CPsetCli(
+ RMobilePhone & aPhone )
+ :
+ CActive( EPriorityStandard ),
+ iPhone( aPhone )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCli::NewL
+// -----------------------------------------------------------------------------
+//
+CPsetCli * CPsetCli::NewL(
+ RMobilePhone & aPhone,
+ MPsetCliObserver & aObserver )
+ {
+ SMC_MOCK_NEWL2( CPsetCli *, RMobilePhone &, aPhone,
+ MPsetCliObserver &, aObserver )
+
+ CPsetCli* self = new( ELeave ) CPsetCli(aPhone);
+ CleanupStack::PushL( self );
+ //self->ConstructL()
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCli::~CPsetCli
+// -----------------------------------------------------------------------------
+//
+CPsetCli::~CPsetCli( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCli::GetColpModeL
+// -----------------------------------------------------------------------------
+//
+void CPsetCli::GetColpModeL( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCli::GetClipModeL
+// -----------------------------------------------------------------------------
+//
+void CPsetCli::GetClipModeL( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCli::GetClirModeL
+// -----------------------------------------------------------------------------
+//
+void CPsetCli::GetClirModeL( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCli::GetColrModeL
+// -----------------------------------------------------------------------------
+//
+void CPsetCli::GetColrModeL( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCli::CancelAll
+// -----------------------------------------------------------------------------
+//
+void CPsetCli::CancelAll( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCli::GetCnapL
+// -----------------------------------------------------------------------------
+//
+void CPsetCli::GetCnapL( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetCli::SetRequestObserver
+// -----------------------------------------------------------------------------
+//
+void CPsetCli::SetRequestObserver(
+ MPsetRequestObserver * aObs )
+ {
+ SMC_MOCK_METHOD1( void, MPsetRequestObserver *, aObs )
+ }
+
+// -----------------------------------------------------------------------------
+// CPsetCli::RunL
+// -----------------------------------------------------------------------------
+//
+void CPsetCli::RunL()
+ {
+
+ }
+
+// -----------------------------------------------------------------------------
+// CPsetCli::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CPsetCli::DoCancel()
+ {
+
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcliwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,111 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#include <QtGlobal>
+#include <QDebug>
+#include <smcmockclassincludes.h>
+#include "psetcliwrapper.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+class PSetCliWrapperPrivate
+{
+public:
+ PSetCliWrapperPrivate() {}
+};
+
+
+// -----------------------------------------------------------------------------
+// PSetCliWrapper::PSetCliWrapper
+// -----------------------------------------------------------------------------
+//
+PSetCliWrapper::PSetCliWrapper(
+ CPsetContainer & /*psetContainer*/,
+ QObject * parent )
+ :
+ QObject(parent)
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCliWrapper::~PSetCliWrapper
+// -----------------------------------------------------------------------------
+//
+PSetCliWrapper::~PSetCliWrapper( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCliWrapper::getColpMode
+// -----------------------------------------------------------------------------
+//
+void PSetCliWrapper::getColpMode( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCliWrapper::getClipMode
+// -----------------------------------------------------------------------------
+//
+void PSetCliWrapper::getClipMode( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCliWrapper::getClirMode
+// -----------------------------------------------------------------------------
+//
+void PSetCliWrapper::getClirMode( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCliWrapper::getColrMode
+// -----------------------------------------------------------------------------
+//
+void PSetCliWrapper::getColrMode( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCliWrapper::getCnap
+// -----------------------------------------------------------------------------
+//
+void PSetCliWrapper::getCnap( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetCliWrapper::cancelAll
+// -----------------------------------------------------------------------------
+//
+void PSetCliWrapper::cancelAll( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetcontainer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,135 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <smcmockclassincludes.h>
+#include <mmtsy_names.h>
+#include <MPsetDivertObs.h>
+#include "PsetContainer.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CPsetContainer::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CPsetContainer::ConstructL( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetContainer::NewL
+// -----------------------------------------------------------------------------
+//
+CPsetContainer * CPsetContainer::NewL( )
+ {
+ SMC_MOCK_NEWL0( CPsetContainer * )
+
+ CPsetContainer* self = new( ELeave ) CPsetContainer;
+ CleanupStack::PushL( self );
+ //self->ConstructL()
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetContainer::~CPsetContainer
+// -----------------------------------------------------------------------------
+//
+CPsetContainer::~CPsetContainer( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetContainer::CreateCWObjectL
+// -----------------------------------------------------------------------------
+//
+CPsetCallWaiting * CPsetContainer::CreateCWObjectL(
+ MPsetCallWaitingObserver & aObserver )
+ {
+ SMC_MOCK_METHOD1( CPsetCallWaiting *, MPsetCallWaitingObserver &, aObserver )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetContainer::CreateCFObjectL
+// -----------------------------------------------------------------------------
+//
+CPsetCallDiverting * CPsetContainer::CreateCFObjectL(
+ MPsetDivertObserver & aObserver )
+ {
+ SMC_MOCK_METHOD1( CPsetCallDiverting *, MPsetDivertObserver &, aObserver )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetContainer::CreateCliObjectL
+// -----------------------------------------------------------------------------
+//
+CPsetCli * CPsetContainer::CreateCliObjectL(
+ MPsetCliObserver & aObserver )
+ {
+ SMC_MOCK_METHOD1( CPsetCli *, MPsetCliObserver &, aObserver )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetContainer::CreateCBObjectL
+// -----------------------------------------------------------------------------
+//
+CPsetCallBarring * CPsetContainer::CreateCBObjectL(
+ MPsetBarringObserver & aObserver )
+ {
+ SMC_MOCK_METHOD1( CPsetCallBarring *, MPsetBarringObserver &, aObserver )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetContainer::CreateNetworkObjectL
+// -----------------------------------------------------------------------------
+//
+CPsetNetwork * CPsetContainer::CreateNetworkObjectL(
+ MPsetNetworkInfoObserver & aObserver )
+ {
+ SMC_MOCK_METHOD1( CPsetNetwork *, MPsetNetworkInfoObserver &, aObserver )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetContainer::CreateRefreshHandlerL
+// -----------------------------------------------------------------------------
+//
+CPSetRefreshHandler * CPsetContainer::CreateRefreshHandlerL( )
+ {
+ SMC_MOCK_METHOD0( CPSetRefreshHandler * )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetContainer::CreateNetworkModeObjectL
+// -----------------------------------------------------------------------------
+//
+CPsetNetwork * CPsetContainer::CreateNetworkModeObjectL(
+ MPsetNetworkModeObserver & aModeObserver )
+ {
+ SMC_MOCK_METHOD1( CPsetNetwork *, MPsetNetworkModeObserver &, aModeObserver )
+ }
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetnetwork.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,246 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <etelmm.h>
+#include <mmretrieve.h>
+#include <RmmCustomApi.h>
+
+#include <e32svr.h>
+#include <smcmockclassincludes.h>
+#include "PsetNetwork.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::CPsetNetwork
+// -----------------------------------------------------------------------------
+//
+CPsetNetwork::CPsetNetwork(
+ RMobilePhone & aPhone )
+ :
+ CActive(EPriorityStandard),
+ iPhone(aPhone)
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::ConstructL
+// -----------------------------------------------------------------------------
+//
+void CPsetNetwork::ConstructL(
+ MPsetNetworkInfoObserver & /*aObserver*/ )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::NewL
+// -----------------------------------------------------------------------------
+//
+CPsetNetwork * CPsetNetwork::NewL(
+ RMobilePhone & aPhone,
+ MPsetNetworkInfoObserver & aObserver )
+ {
+ SMC_MOCK_NEWL2( CPsetNetwork *, RMobilePhone &, aPhone,
+ MPsetNetworkInfoObserver &, aObserver )
+
+ CPsetNetwork* self = new ( ELeave ) CPsetNetwork( aPhone );
+ CleanupStack::PushL( self );
+ //self->ConstructL()
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::NewL
+// -----------------------------------------------------------------------------
+//
+CPsetNetwork * CPsetNetwork::NewL(
+ RMobilePhone & aPhone,
+ MPsetNetworkModeObserver & aObserver )
+ {
+ SMC_MOCK_NEWL2( CPsetNetwork *, RMobilePhone &, aPhone,
+ MPsetNetworkModeObserver &, aObserver )
+
+ CPsetNetwork* self = new ( ELeave ) CPsetNetwork( aPhone );
+ CleanupStack::PushL( self );
+ //self->ConstructL()
+ CleanupStack::Pop( self );
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::~CPsetNetwork
+// -----------------------------------------------------------------------------
+//
+CPsetNetwork::~CPsetNetwork( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::GetAvailableNetworksL
+// -----------------------------------------------------------------------------
+//
+void CPsetNetwork::GetAvailableNetworksL( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::GetCurrentNetworkInfo
+// -----------------------------------------------------------------------------
+//
+TInt CPsetNetwork::GetCurrentNetworkInfo(
+ TCurrentNetworkInfo & aInfo )
+ {
+ SMC_MOCK_METHOD1( TInt, TCurrentNetworkInfo &, aInfo )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::GetNetworkSelectMode
+// -----------------------------------------------------------------------------
+//
+TInt CPsetNetwork::GetNetworkSelectMode(
+ TSelectMode & aMode )
+ {
+ SMC_MOCK_METHOD1( TInt, TSelectMode &, aMode )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::SelectNetworkL
+// -----------------------------------------------------------------------------
+//
+void CPsetNetwork::SelectNetworkL(
+ const TNetworkInfo & aInfo )
+ {
+ SMC_MOCK_METHOD1( void, const TNetworkInfo &, aInfo )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::CancelProcess
+// -----------------------------------------------------------------------------
+//
+void CPsetNetwork::CancelProcess( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::SetNetworkModeSelectionL
+// -----------------------------------------------------------------------------
+//
+void CPsetNetwork::SetNetworkModeSelectionL(
+ TUint32 & aNetworkMode )
+ {
+ // Reference parameter is not really used to return some value so do not
+ // save it as a reference to the symbianmock, because test will fail
+ // if stack-based parameter is saved as a reference.
+ SMC_MOCK_METHOD1( void, TUint32/* &*/, aNetworkMode )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::GetCurrentNetworkModeSelectionL
+// -----------------------------------------------------------------------------
+//
+void CPsetNetwork::GetCurrentNetworkModeSelectionL( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::IsCallActive
+// -----------------------------------------------------------------------------
+//
+TInt CPsetNetwork::IsCallActive( )
+ {
+ SMC_MOCK_METHOD0( TInt )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::IsGPRSConnected
+// -----------------------------------------------------------------------------
+//
+TInt CPsetNetwork::IsGPRSConnected( )
+ {
+ SMC_MOCK_METHOD0( TInt )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::ResetNetworkSearch
+// -----------------------------------------------------------------------------
+//
+TInt CPsetNetwork::ResetNetworkSearch( )
+ {
+ SMC_MOCK_METHOD0( TInt )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::SetNetSAObserver
+// -----------------------------------------------------------------------------
+//
+void CPsetNetwork::SetNetSAObserver(
+ MPsetNetworkInfoObserver & aObserver )
+ {
+ SMC_MOCK_METHOD1( void, MPsetNetworkInfoObserver &, aObserver )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::SetNetworkModeObserver
+// -----------------------------------------------------------------------------
+//
+void CPsetNetwork::SetNetworkModeObserver(
+ MPsetNetworkModeObserver & aObserver )
+ {
+ SMC_MOCK_METHOD1( void, MPsetNetworkModeObserver &, aObserver )
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CPsetNetwork::DoCancel()
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPsetNetwork::RunL
+// -----------------------------------------------------------------------------
+//
+void CPsetNetwork::RunL()
+ {
+
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/mocks/mock_psetnetworkwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#include <QtGlobal>
+#include <QDebug>
+#include <smcmockclassincludes.h>
+#include "psetnetworkwrapper.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// PSetNetworkWrapper::PSetNetworkWrapper
+// -----------------------------------------------------------------------------
+//
+PSetNetworkWrapper::PSetNetworkWrapper(
+ CPsetContainer & /*psetContainer*/,
+ QObject * parent )
+ :
+ QObject(parent)
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetNetworkWrapper::~PSetNetworkWrapper
+// -----------------------------------------------------------------------------
+//
+PSetNetworkWrapper::~PSetNetworkWrapper( )
+ {
+
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetNetworkWrapper::getAvailableNetworks
+// -----------------------------------------------------------------------------
+//
+void PSetNetworkWrapper::getAvailableNetworks( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetNetworkWrapper::getNetworkSelectionMode
+// -----------------------------------------------------------------------------
+//
+PSetNetworkWrapper::ErrorCode PSetNetworkWrapper::getNetworkSelectionMode(
+ PSetNetworkWrapper::NetworkSelectionMode & mode ) const
+ {
+ SMC_MOCK_METHOD1( ErrorCode, PSetNetworkWrapper::NetworkSelectionMode &, mode )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetNetworkWrapper::selectNetwork
+// -----------------------------------------------------------------------------
+//
+void PSetNetworkWrapper::selectNetwork(
+ const PSetNetworkWrapper::NetworkInfo & networkInfo )
+ {
+ SMC_MOCK_METHOD1( void, const PSetNetworkWrapper::NetworkInfo &, networkInfo )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetNetworkWrapper::cancelRequest
+// -----------------------------------------------------------------------------
+//
+void PSetNetworkWrapper::cancelRequest( )
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetNetworkWrapper::getNetworkAccessMode
+// -----------------------------------------------------------------------------
+//
+void PSetNetworkWrapper::getNetworkAccessMode( ) const
+ {
+ SMC_MOCK_METHOD0( void )
+ }
+
+
+// -----------------------------------------------------------------------------
+// PSetNetworkWrapper::setNetworkAccessMode
+// -----------------------------------------------------------------------------
+//
+void PSetNetworkWrapper::setNetworkAccessMode(
+ PSetNetworkWrapper::NetworkAccessMode mode )
+ {
+ SMC_MOCK_METHOD1( void, PSetNetworkWrapper::NetworkAccessMode, mode )
+ }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/run_auto_tests_qt.bat Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,187 @@
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+
+@echo off
+setlocal
+goto :startup
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function DEFAULT
+::
+:: Modify this function
+:: - TESTED_SRC can be changed to match tested code.
+:: Specifies path from testcode group directory to
+:: tested code
+:: - Add test directories to be runned
+:: ie. "call :build ut_projectdirectory" or use
+:: "for /f %%a in ('dir /b ut_*') do call :build %%a"
+:: which compiles, instruments and runs all test directories
+:: starting with "ut_".
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:DEFAULT
+set TESTED_SRC=..\..\src\*
+
+for /f %%a in ('dir /b ut_*') do call :build %%a
+if [%DOMODULESTESTS%] EQU [TRUE] (
+for /f %%a in ('dir /b mt_*') do call :build %%a
+)
+
+call :finish
+goto :END
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function STARTUP
+::
+:: Initializing script
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:STARTUP
+
+set BUILDTESTS=TRUE
+set RUNTESTS=TRUE
+set INSTRUMENT=TRUE
+set REMOVEINSTRUMENT=TRUE
+set DOMODULESTESTS=TRUE
+set ABLD_CALL=abld build winscw udeb -keepgoing
+set PATH_TO_DLL=\epoc32\release\winscw\udeb
+set PATH_TO_COVERAGE_DATA=\coverage_data
+
+if not exist %PATH_TO_COVERAGE_DATA% (
+mkdir %PATH_TO_COVERAGE_DATA%
+)
+
+if [%1] EQU [] ( goto default )
+
+call :%1
+call :%2
+call :%3
+call :%4
+call :%5
+echo Running tests = %RUNTESTS%
+echo Instrumenting tests = %INSTRUMENT%
+goto default
+
+:/NOCLEANUP
+set REMOVEINSTRUMENT=FALSE
+goto end
+
+:/NORUN
+set RUNTESTS=FALSE
+set REMOVEINSTRUMENT=FALSE
+goto end
+
+:/NOINSTRUMENT
+set INSTRUMENT=FALSE
+goto end
+
+:/NOBUILD
+set BUILDTESTS=FALSE
+goto end
+
+:/ONLYUNITTESTS
+set DOMODULESTESTS=FALSE
+goto end
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function FINISH
+::
+:: Finishes run_auto_tests.bat
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:FINISH
+
+if [%RUNTESTS%] EQU [TRUE] (
+call :runtests
+)
+
+if [%INSTRUMENT%] EQU [TRUE] (
+call :calculatecoverage
+)
+
+if [%REMOVEINSTRUMENT%] EQU [TRUE] (
+call :removecoverage
+)
+goto end
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function BUILD
+:: param directory
+::
+:: builds test from given directory
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:BUILD
+setlocal
+if [%BUILDTESTS%] EQU [FALSE] ( goto end )
+echo Building %1
+if not exist %1 (
+echo %1 Not found!
+goto end
+)
+
+pushd .
+call cd %1
+call qmake
+call bldmake bldfiles
+call abld clean winscw udeb
+if [%INSTRUMENT%] EQU [TRUE] (
+call ctcwrap -n %PATH_TO_COVERAGE_DATA%\%1 -i d -C "EXCLUDE=*" -C "NO_EXCLUDE=%TESTED_SRC%" %ABLD_CALL%
+) else (
+call %ABLD_CALL%
+)
+
+popd
+endlocal
+goto end
+
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function RUNTESTS
+::
+:: NOTE! Function assumes that test binary is named according to test directory.
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:RUNTESTS
+echo Running tests
+for /f %%a in ('dir /b ut_*') do call %PATH_TO_DLL%\%%a.exe -dtextshell --
+goto end
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function CALCULATECOVERAGE
+::
+:: Calculates test coverage. Generates html
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:CALCULATECOVERAGE
+echo Calculating coverage
+ctcpost %PATH_TO_COVERAGE_DATA%\*.sym | ctcmerge -i - -o profile.txt
+call ctc2html -t 70 -i profile.txt -o \coverage_result -nsb
+goto end
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function REMOVECOVERAGE
+::
+:: Removes data from coverage directory
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:REMOVECOVERAGE
+echo Removing deleting coverage data
+call del %PATH_TO_COVERAGE_DATA%\*.sym
+call del %PATH_TO_COVERAGE_DATA%\*.dat
+call del profile.txt
+goto end
+
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:: function END
+::
+:: Prints done
+::::::::::::::::::::::::::::::::::::::::::::::::::::::
+:END
+echo Done!
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcalldivertingwrapper/ut_psetcalldivertingwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,646 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <PsetContainer.h>
+#include <PsetCallDiverting.h>
+#include <MPsetDivertObs.h>
+#include "ut_psetcalldivertingwrapper.h"
+#include "mock_cphcltemergencycall.h"
+#include "testutilities.h"
+#define private public
+#include "psetcalldivertingwrapper.h"
+#include "psetcalldivertingwrapper_p.h"
+
+class DivertObserver : public MPsetDivertObserver
+{
+ void HandleDivertingChangedL(
+ const TCallDivertSetting& aSetting, TBool aPlural)
+ {
+ Q_UNUSED(aSetting);
+ Q_UNUSED(aPlural);
+ }
+
+ void HandleDivertingStatusL(CMobilePhoneCFList& aSetting, TBool aPlural)
+ {
+ Q_UNUSED(aSetting);
+ Q_UNUSED(aPlural);
+ }
+
+ void HandleDivertingErrorL(TInt aReason)
+ {
+ Q_UNUSED(aReason);
+ }
+
+ void HandleCFRequestingL(TBool aOngoing,
+ TBool aInterrupted)
+ {
+ Q_UNUSED(aOngoing);
+ Q_UNUSED(aInterrupted);
+ }
+
+ void SetEngineContact(MPsetCallDiverting* aDivertEngine)
+ {
+ Q_UNUSED(aDivertEngine);
+ }
+};
+
+/*!
+ UT_PSetCallDivertingWrapper::UT_PSetWrapperCallDiverting
+ */
+UT_PSetCallDivertingWrapper::UT_PSetCallDivertingWrapper()
+ : mWrapper(NULL), mSetContainerMock(NULL)
+{
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::~UT_PSetWrapperCallDiverting
+ */
+UT_PSetCallDivertingWrapper::~UT_PSetCallDivertingWrapper()
+{
+ delete mWrapper;
+ delete mSetContainerMock;
+ mPsetCallDivertingMock = NULL;
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::init
+ */
+void UT_PSetCallDivertingWrapper::init()
+{
+ initialize();
+ CPhCltEmergencyCallMock::iSimulateEmergencyNumberMatch = false;
+
+ mSetContainerMock = new CPsetContainer();
+
+ RMobilePhone dummyHandle;
+ DivertObserver dummyObsever;
+ QT_TRAP_THROWING(mPsetCallDivertingMock
+ = CPsetCallDiverting::NewL(dummyObsever, dummyHandle));
+ expect("CPsetContainer::CreateCFObjectL").returns(mPsetCallDivertingMock);
+
+ // Wrapper takes ownership of callDivertingMock during construction.
+ // Mock must be deleted here if exception happens during construction.
+ QScopedPointer<CPsetCallDiverting> divertingMockPtr(mPsetCallDivertingMock);
+ mWrapper = new PSetCallDivertingWrapper(*mSetContainerMock, NULL);
+ divertingMockPtr.take();
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::cleanup
+ */
+void UT_PSetCallDivertingWrapper::cleanup()
+{
+ reset();
+
+ delete mWrapper;
+ mWrapper = NULL;
+ delete mSetContainerMock;
+ mSetContainerMock = NULL;
+ mPsetCallDivertingMock = NULL;
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_setCallDivertingWithValidParameters
+ */
+void UT_PSetCallDivertingWrapper::t_setCallDivertingWithValidParameters()
+{
+ PSCallDivertingCommand divertingCmd;
+ divertingCmd.iCondition = DivertConditionUnconditional;
+ divertingCmd.iSetting = RegisterDiverting;
+ divertingCmd.iStatus = DivertingStatusUnknown;
+ divertingCmd.iServiceGroup = ServiceGroupVoice;
+ divertingCmd.iNumber = "1234567890";
+ divertingCmd.iNoReplyTimer = 0;
+
+ TCallDivertSetting expectedParam;
+ expectedParam.iCondition = EDivertConditionUnconditional;
+ expectedParam.iSetting = ERegisterDiverting;
+ expectedParam.iStatus = EDivertingStatusUnknown;
+ expectedParam.iServiceGroup = EServiceGroupVoice;
+ expectedParam.iNumber
+ = TPtrC16(reinterpret_cast<const TUint16*>(divertingCmd.iNumber.utf16()));
+ expectedParam.iNoReplyTimer
+ = static_cast<TInt>(divertingCmd.iNoReplyTimer);
+ TBool isVmbx = EFalse;
+ expect("CPsetCallDiverting::SetDivertingL").
+ with(expectedParam, ETelephony, isVmbx);
+
+ mWrapper->setCallDiverting(divertingCmd, ETelephony);
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_setCallDivertingWithInvalidNumber
+ */
+void UT_PSetCallDivertingWrapper::t_setCallDivertingWithInvalidNumber()
+{
+ PSCallDivertingCommand divertingCmd;
+ divertingCmd.iCondition = DivertConditionUnconditional;
+ divertingCmd.iSetting = RegisterDiverting;
+ divertingCmd.iStatus = DivertingStatusUnknown;
+ divertingCmd.iServiceGroup = ServiceGroupVoice;
+ divertingCmd.iNoReplyTimer = 0;
+
+ expect("CPsetCallDiverting::SetDivertingL").times(0);
+
+ // DTMF digits "*#pw" are not allowed characters
+ divertingCmd.iNumber = "*";
+ int result = mWrapper->setCallDiverting(divertingCmd, ETelephony);
+ QVERIFY(result == KErrGsmSSUnknownAlphabet);
+ divertingCmd.iNumber = "#";
+ result = mWrapper->setCallDiverting(divertingCmd, ETelephony);
+ QVERIFY(result == KErrGsmSSUnknownAlphabet);
+ divertingCmd.iNumber = "p";
+ result = mWrapper->setCallDiverting(divertingCmd, ETelephony);
+ QVERIFY(result == KErrGsmSSUnknownAlphabet);
+ divertingCmd.iNumber = "w";
+ result = mWrapper->setCallDiverting(divertingCmd, ETelephony);
+ QVERIFY(result == KErrGsmSSUnknownAlphabet);
+
+ // plus allowed only in the beginning of the number
+ divertingCmd.iNumber = "++";
+ result = mWrapper->setCallDiverting(divertingCmd, ETelephony);
+ QVERIFY(result == KErrGsmSSUnknownAlphabet);
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_setCallDivertingWithEmergencyNumber
+ */
+void UT_PSetCallDivertingWrapper::t_setCallDivertingWithEmergencyNumber()
+{
+ PSCallDivertingCommand divertingCmd;
+ divertingCmd.iCondition = DivertConditionUnconditional;
+ divertingCmd.iSetting = RegisterDiverting;
+ divertingCmd.iStatus = DivertingStatusUnknown;
+ divertingCmd.iServiceGroup = ServiceGroupVoice;
+ divertingCmd.iNumber = "112";
+ divertingCmd.iNoReplyTimer = 0;
+
+ expect("CPsetCallDiverting::SetDivertingL").times(0);
+ CPhCltEmergencyCallMock::iSimulateEmergencyNumberMatch = ETrue;
+ expect("CPhCltEmergencyCallMock::IsEmergencyPhoneNumber").returns(KErrNone);
+
+ int result = mWrapper->setCallDiverting(divertingCmd, ETelephony);
+ QVERIFY(result == KErrGsmSSIllegalOperation);
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_setCallDivertingException
+ */
+void UT_PSetCallDivertingWrapper::t_setCallDivertingException()
+{
+ PSCallDivertingCommand divertingCmd;
+ divertingCmd.iCondition = DivertConditionUnconditional;
+ divertingCmd.iSetting = RegisterDiverting;
+ divertingCmd.iStatus = DivertingStatusUnknown;
+ divertingCmd.iServiceGroup = ServiceGroupVoice;
+ divertingCmd.iNumber = "1234567890";
+ divertingCmd.iNoReplyTimer = 0;
+
+ expect("CPsetCallDiverting::SetDivertingL").
+ willOnce(invokeWithoutArguments(this, &simulateLeaveOnMockMethodCallL));
+
+ EXPECT_EXCEPTION(
+ mWrapper->setCallDiverting(divertingCmd, ETelephony);
+ )
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_getCallDivertingStatus
+ */
+void UT_PSetCallDivertingWrapper::t_getCallDivertingStatus()
+{
+ expect("CPsetCallDiverting::GetDivertingStatusL").
+ with(EServiceGroupVoice, EDivertConditionUnconditional, ETelephony);
+
+ mWrapper->getCallDivertingStatus(
+ ServiceGroupVoice, DivertConditionUnconditional, ETelephony);
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_getCallDivertingStatusException
+ */
+void UT_PSetCallDivertingWrapper::t_getCallDivertingStatusException()
+{
+ expect("CPsetCallDiverting::GetDivertingStatusL").
+ with(EServiceGroupVoice, EDivertConditionUnconditional, ETelephony).
+ willOnce(invokeWithoutArguments(this, &simulateLeaveOnMockMethodCallL));
+
+ EXPECT_EXCEPTION(
+ mWrapper->getCallDivertingStatus(
+ ServiceGroupVoice, DivertConditionUnconditional, ETelephony);
+ )
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_cancelProcess
+ */
+void UT_PSetCallDivertingWrapper::t_cancelProcess()
+{
+ expect("CPsetCallDiverting::CancelCurrentRequest");
+
+ mWrapper->cancelProcess();
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_getDefaultNumbers
+ */
+void UT_PSetCallDivertingWrapper::t_getDefaultNumbers()
+{
+ expect("CPsetCallDiverting::GetDefaultNumbersL").times(1);
+
+ QStringList defNumbers;
+ mWrapper->getDefaultNumbers(defNumbers);
+
+ // 2 numbers added in mock_psetcalldiverting.cpp
+ QVERIFY(2 == defNumbers.count());
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_getDefaultNumbersException
+ */
+void UT_PSetCallDivertingWrapper::t_getDefaultNumbersException()
+{
+ expect("CPsetCallDiverting::GetDefaultNumbersL").
+ willOnce(invokeWithoutArguments(this, &simulateLeaveOnMockMethodCallL));
+
+ QStringList defNumbers;
+ EXPECT_EXCEPTION(
+ mWrapper->getDefaultNumbers(defNumbers);
+ )
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_setNewDefaultNumber
+ */
+void UT_PSetCallDivertingWrapper::t_setNewDefaultNumber()
+{
+ expect("CPsetCallDiverting::SetNewDefaultNumberL").times(1);
+ expect("CPsetCallDiverting::SwapDefaultNumberL").times(0);
+
+ // number not added in mock_psetcalldiverting.cpp
+ QString defNumber = "444444";
+ mWrapper->setNewDefaultNumber(defNumber);
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_getVoiceMailBoxNumber
+ */
+void UT_PSetCallDivertingWrapper::t_getVoiceMailBoxNumber()
+{
+ // Fail case
+ expect("CVoiceMailbox::GetStoredEntry").returns(-2).times(1);
+
+ QString defNumber;
+ mWrapper->getVoiceMailBoxNumber(defNumber);
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_getVoiceMailBoxNumber2
+ */
+void UT_PSetCallDivertingWrapper::t_getVoiceMailBoxNumber2()
+{
+ expect("CVoiceMailbox::GetStoredEntry").times(1);
+ expect("CVoiceMailboxEntry::GetVmbxNumber").returns(-1).times(1);
+
+ QString defNumber;
+ mWrapper->getVoiceMailBoxNumber(defNumber);
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_swapDefaultNumber
+ */
+void UT_PSetCallDivertingWrapper::t_swapDefaultNumber()
+{
+ expect("CPsetCallDiverting::SetNewDefaultNumberL").times(0);
+ expect("CPsetCallDiverting::SwapDefaultNumberL").times(1);
+
+ // same number added in mock_psetcalldiverting.cpp
+ QString defNumber = "222222";
+ mWrapper->setNewDefaultNumber(defNumber);
+
+ QVERIFY(true == verify());
+}
+
+
+Q_DECLARE_METATYPE(PSCallDivertingCommand)
+/*!
+ UT_PSetCallDivertingWrapper::t_handleDivertingChanged
+ */
+void UT_PSetCallDivertingWrapper::t_handleDivertingChanged()
+{
+ qRegisterMetaType<PSCallDivertingCommand>("PSCallDivertingCommand");
+ QSignalSpy spy(mWrapper,
+ SIGNAL(handleDivertingChanged(const PSCallDivertingCommand&, bool)));
+
+ TCallDivertSetting setting;
+ setting.iCondition = EDivertConditionUnconditional;
+ setting.iSetting = EActivateDiverting;
+ setting.iStatus = EDivertingStatusUnknown;
+ setting.iServiceGroup = EServiceGroupAllTeleservices;
+ setting.iNumber = KNullDesC();
+ TBool plural = ETrue;
+ QT_TRAP_THROWING(
+ mWrapper->m_Priv->HandleDivertingChangedL(setting, plural));
+
+ setting.iCondition = EDivertConditionBusy;
+ setting.iStatus = EDivertingStatusActive;
+ setting.iServiceGroup = EServiceGroupVoice;
+ QT_TRAP_THROWING(
+ mWrapper->m_Priv->HandleDivertingChangedL(setting, plural));
+ setting.iCondition = EDivertConditionNoReply;
+ setting.iStatus = EDivertingStatusInactive;
+ setting.iServiceGroup = EServiceGroupData;
+ QT_TRAP_THROWING(
+ mWrapper->m_Priv->HandleDivertingChangedL(setting, plural));
+ setting.iCondition = EDivertConditionNotReachable;
+ setting.iStatus = EDivertingStatusNotRegistered;
+ setting.iServiceGroup = EServiceGroupFax;
+ QT_TRAP_THROWING(
+ mWrapper->m_Priv->HandleDivertingChangedL(setting, plural));
+ setting.iCondition = EDivertConditionAllCalls;
+ setting.iStatus = EDivertingStatusNotProvisioned;
+ setting.iServiceGroup = EServiceGroupFax;
+ QT_TRAP_THROWING(
+ mWrapper->m_Priv->HandleDivertingChangedL(setting, plural));
+ setting.iCondition = EDivertConditionAllConditionalCases;
+ QT_TRAP_THROWING(
+ mWrapper->m_Priv->HandleDivertingChangedL(setting, plural));
+
+ QCOMPARE(spy.count(), 6);
+ PSCallDivertingCommand actualCmd =
+ qvariant_cast<PSCallDivertingCommand>(spy.at(0).at(0));
+ QVERIFY(actualCmd.iCondition == DivertConditionUnconditional);
+ QVERIFY(actualCmd.iSetting == ActivateDiverting);
+ QVERIFY(actualCmd.iStatus == DivertingStatusUnknown);
+ QVERIFY(actualCmd.iServiceGroup == ServiceGroupAllTeleservices);
+ QVERIFY(actualCmd.iNumber == QString::fromUtf16(setting.iNumber.Ptr(),
+ setting.iNumber.Length()));
+ QVERIFY(spy.at(0).at(1).toBool() == true);
+
+ actualCmd = qvariant_cast<PSCallDivertingCommand>(spy.at(1).at(0));
+ QVERIFY(actualCmd.iCondition == DivertConditionBusy);
+ QVERIFY(actualCmd.iStatus == DivertingStatusActive);
+ QVERIFY(actualCmd.iServiceGroup == ServiceGroupVoice);
+ actualCmd = qvariant_cast<PSCallDivertingCommand>(spy.at(2).at(0));
+ QVERIFY(actualCmd.iCondition == DivertConditionNoReply);
+ QVERIFY(actualCmd.iStatus == DivertingStatusInactive);
+ QVERIFY(actualCmd.iServiceGroup == ServiceGroupData);
+ actualCmd = qvariant_cast<PSCallDivertingCommand>(spy.at(3).at(0));
+ QVERIFY(actualCmd.iCondition == DivertConditionNotReachable);
+ QVERIFY(actualCmd.iStatus == DivertingStatusNotRegistered);
+ QVERIFY(actualCmd.iServiceGroup == ServiceGroupFax);
+ actualCmd = qvariant_cast<PSCallDivertingCommand>(spy.at(4).at(0));
+ QVERIFY(actualCmd.iCondition == DivertConditionAllCalls);
+ QVERIFY(actualCmd.iStatus == DivertingStatusNotProvisioned);
+ QVERIFY(actualCmd.iServiceGroup == ServiceGroupFax);
+ actualCmd = qvariant_cast<PSCallDivertingCommand>(spy.at(5).at(0));
+ QVERIFY(actualCmd.iCondition == DivertConditionAllConditionalCases);
+
+ QVERIFY(true == verify());
+}
+
+
+/*!
+ UT_PSetCallDivertingWrapper::t_handleDivertingStatus
+ */
+void UT_PSetCallDivertingWrapper::t_handleDivertingStatus()
+{
+ qRegisterMetaType<QList<PSCallDivertingStatus*> >("QList<PSCallDivertingStatus*>&");
+ QSignalSpy spy(mWrapper,
+ SIGNAL(handleDivertingStatus(QList<PSCallDivertingStatus*>&, bool)));
+
+ // With empty list
+ CMobilePhoneCFList* cfList = NULL;
+ QT_TRAP_THROWING(cfList = CMobilePhoneCFList::NewL());
+ QScopedPointer<CMobilePhoneCFList> cfListDeleter(cfList);
+ TBool plural = ETrue;
+ QT_TRAP_THROWING(
+ mWrapper->m_Priv->HandleDivertingStatusL(*cfList, plural));
+
+ QCOMPARE(spy.count(), 1);
+ QVERIFY(spy.at(0).at(1).toBool() == true);
+ spy.clear();
+
+ // With list entry
+ RMobilePhone::TMobilePhoneCFInfoEntryV1 entry;
+ entry.iStatus = RMobilePhone::ECallForwardingStatusNotProvisioned;
+ entry.iCondition = RMobilePhone::ECallForwardingAllConditionalCases;
+ cfList->AddEntryL(entry);
+ QT_TRAP_THROWING(
+ mWrapper->m_Priv->HandleDivertingStatusL(*cfList, plural));
+
+ QCOMPARE(spy.count(), 1);
+ QList<PSCallDivertingStatus*> result =
+ *reinterpret_cast<const QList<PSCallDivertingStatus*> *>(spy.at(0).at(0).constData());
+
+ QVERIFY(result.at(0)->iStatus == DivertingStatusNotProvisioned);
+ QVERIFY(result.at(0)->iCondition == DivertConditionAllConditionalCases);
+ QVERIFY(spy.at(0).at(1).toBool() == true);
+ spy.clear();
+
+ // With list, two entries
+ delete cfList;
+ QT_TRAP_THROWING(cfList = CMobilePhoneCFList::NewL());
+ entry.iStatus = RMobilePhone::ECallForwardingStatusNotActive;
+ entry.iCondition = RMobilePhone::ECallForwardingBusy;
+ cfList->AddEntryL(entry); // Takes copy
+
+ RMobilePhone::TMobilePhoneCFInfoEntryV1 entry2;
+ entry2.iStatus = RMobilePhone::ECallForwardingStatusActive;
+ entry2.iCondition = RMobilePhone::ECallForwardingUnconditional;
+ cfList->AddEntryL(entry2);
+ QT_TRAP_THROWING(
+ mWrapper->m_Priv->HandleDivertingStatusL(*cfList, plural));
+
+ QCOMPARE(spy.count(), 1);
+ result = *reinterpret_cast<const QList<PSCallDivertingStatus*> *>(spy.at(0).at(0).constData());
+ QVERIFY(result.at(0)->iStatus == DivertingStatusInactive);
+ QVERIFY(result.at(0)->iCondition == DivertConditionBusy);
+
+ QVERIFY(result.at(1)->iStatus == DivertingStatusActive);
+ QVERIFY(result.at(1)->iCondition == DivertConditionUnconditional);
+ QVERIFY(spy.at(0).at(1).toBool() == true);
+ spy.clear();
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_handleDivertingError
+ */
+void UT_PSetCallDivertingWrapper::t_handleDivertingError()
+{
+ QSignalSpy spy(mWrapper, SIGNAL(handleDivertingError(int)));
+
+ QT_TRAP_THROWING(mWrapper->m_Priv->HandleDivertingErrorL(KErrGeneral));
+
+ QCOMPARE(spy.count(), 1);
+ QVERIFY(spy.at(0).at(0).toInt() == KErrGeneral);
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_handleCFRequesting
+ */
+void UT_PSetCallDivertingWrapper::t_handleCFRequesting()
+{
+ QSignalSpy spy(mWrapper, SIGNAL(handleCFRequesting(bool, bool)));
+
+ TBool ongoing = ETrue;
+ TBool interrupted = ETrue;
+ QT_TRAP_THROWING(
+ mWrapper->m_Priv->HandleCFRequestingL(ongoing, interrupted));
+
+ QCOMPARE(spy.count(), 1);
+ QVERIFY(spy.at(0).at(0).toBool() == true);
+ QVERIFY(spy.at(0).at(1).toBool() == true);
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_setEngineContact
+ TODO: dummy test because no implementation for the method currently.
+ */
+void UT_PSetCallDivertingWrapper::t_setEngineContact()
+{
+ mWrapper->m_Priv->SetEngineContact(mPsetCallDivertingMock);
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_handleEmergencyDial
+ TODO: dummy test because no implementation for the method currently.
+ */
+void UT_PSetCallDivertingWrapper::t_handleEmergencyDial()
+{
+ QT_TRAP_THROWING(mWrapper->m_Priv->HandleEmergencyDialL(KErrNone));
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_convertPsCallDivertingCondition
+ */
+void UT_PSetCallDivertingWrapper::t_convertPsCallDivertingCondition()
+{
+ QVERIFY(EDivertConditionUnconditional ==
+ mWrapper->m_Priv->convert(DivertConditionUnknown));
+ QVERIFY(EDivertConditionUnconditional ==
+ mWrapper->m_Priv->convert(DivertConditionUnconditional));
+ QVERIFY(EDivertConditionBusy ==
+ mWrapper->m_Priv->convert(DivertConditionBusy));
+ QVERIFY(EDivertConditionNoReply ==
+ mWrapper->m_Priv->convert(DivertConditionNoReply));
+ QVERIFY(EDivertConditionNotReachable ==
+ mWrapper->m_Priv->convert(DivertConditionNotReachable));
+ QVERIFY(EDivertConditionAllCalls ==
+ mWrapper->m_Priv->convert(DivertConditionAllCalls));
+ QVERIFY(EDivertConditionAllConditionalCases ==
+ mWrapper->m_Priv->convert(DivertConditionAllConditionalCases));
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_convertPsCallDivertingStatus
+ */
+void UT_PSetCallDivertingWrapper::t_convertPsCallDivertingStatus()
+{
+ QVERIFY(EDivertingStatusActive ==
+ mWrapper->m_Priv->convert(DivertingStatusActive));
+ QVERIFY(EDivertingStatusInactive ==
+ mWrapper->m_Priv->convert(DivertingStatusInactive));
+ QVERIFY(EDivertingStatusNotRegistered ==
+ mWrapper->m_Priv->convert(DivertingStatusNotRegistered));
+ QVERIFY(EDivertingStatusNotProvisioned ==
+ mWrapper->m_Priv->convert(DivertingStatusNotProvisioned));
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_convertPsCallDivertingSetting
+ */
+void UT_PSetCallDivertingWrapper::t_convertPsCallDivertingSetting()
+{
+ QVERIFY(EActivateDiverting ==
+ mWrapper->m_Priv->convert(ActivateDiverting));
+ QVERIFY(ECancelDiverting ==
+ mWrapper->m_Priv->convert(CancelDiverting));
+ QVERIFY(ERegisterDiverting ==
+ mWrapper->m_Priv->convert(RegisterDiverting));
+ QVERIFY(EEraseDiverting ==
+ mWrapper->m_Priv->convert(EraseDiverting));
+ QVERIFY(ECheckStatus ==
+ mWrapper->m_Priv->convert(CheckStatus));
+ const int invalidEnumeration = -1;
+ QVERIFY(ECheckStatus == mWrapper->m_Priv->convert(
+ static_cast<PsCallDivertingSetting>(invalidEnumeration)));
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::t_exceptionSafety
+ TODO: tests using signalspy fail in alloc failure mode because
+ QList<QVariant> is not exception safe in QT 4.6.0.
+ */
+void UT_PSetCallDivertingWrapper::t_exceptionSafety()
+{
+ cleanup();
+
+ OomTestExecuter::runTest(*this, &t_setCallDivertingWithValidParameters);
+ //OomTestExecuter::runTest(*this, &t_setCallDivertingWithInvalidNumber);
+ //OomTestExecuter::runTest(*this, &t_setCallDivertingWithEmergencyNumber);
+ OomTestExecuter::runTest(*this, &t_setCallDivertingException);
+ OomTestExecuter::runTest(*this, &t_getCallDivertingStatus);
+ OomTestExecuter::runTest(*this, &t_getCallDivertingStatusException);
+ OomTestExecuter::runTest(*this, &t_cancelProcess);
+ OomTestExecuter::runTest(*this, &t_getDefaultNumbers);
+ OomTestExecuter::runTest(*this, &t_getDefaultNumbersException);
+ OomTestExecuter::runTest(*this, &t_setNewDefaultNumber);
+ OomTestExecuter::runTest(*this, &t_swapDefaultNumber);
+ //OomTestExecuter::runTest(*this, &t_handleDivertingChanged);
+ //OomTestExecuter::runTest(*this, &t_handleDivertingStatus);
+ //OomTestExecuter::runTest(*this, &t_handleDivertingError);
+ //OomTestExecuter::runTest(*this, &t_handleCFRequesting);
+ OomTestExecuter::runTest(*this, &t_setEngineContact);
+ OomTestExecuter::runTest(*this, &t_handleEmergencyDial);
+ OomTestExecuter::runTest(*this, &t_convertPsCallDivertingCondition);
+ OomTestExecuter::runTest(*this, &t_convertPsCallDivertingStatus);
+ OomTestExecuter::runTest(*this, &t_convertPsCallDivertingSetting);
+}
+
+/*!
+ UT_PSetCallDivertingWrapper::simulateLeaveOnMockMethodCallL
+ */
+void UT_PSetCallDivertingWrapper::simulateLeaveOnMockMethodCallL()
+{
+ User::Leave(KErrGeneral);
+}
+
+QTEST_MAIN_S60(UT_PSetCallDivertingWrapper)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcalldivertingwrapper/ut_psetcalldivertingwrapper.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,80 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef UT_PSETCALLDIVERTINGWRAPPER_H
+#define UT_PSETCALLDIVERTINGWRAPPER_H
+
+#include <QtTest/QtTest>
+#include <mockservice.h>
+
+class PSetCallDivertingWrapper;
+class CPsetContainer;
+class CPsetCallDiverting;
+
+class UT_PSetCallDivertingWrapper : public QObject, MockService
+{
+ Q_OBJECT
+
+public:
+ UT_PSetCallDivertingWrapper();
+ ~UT_PSetCallDivertingWrapper();
+
+private slots:
+
+ void init();
+ void cleanup();
+
+ void t_setCallDivertingWithValidParameters();
+ void t_setCallDivertingWithInvalidNumber();
+ void t_setCallDivertingWithEmergencyNumber();
+ void t_setCallDivertingException();
+
+ void t_getCallDivertingStatus();
+ void t_getCallDivertingStatusException();
+ void t_cancelProcess();
+
+ void t_getDefaultNumbers();
+ void t_getDefaultNumbersException();
+ void t_setNewDefaultNumber();
+ void t_getVoiceMailBoxNumber();
+ void t_getVoiceMailBoxNumber2();
+ void t_swapDefaultNumber();
+
+ // tests for private implementation
+ void t_handleDivertingChanged();
+ void t_handleDivertingStatus();
+ void t_handleDivertingError();
+ void t_handleCFRequesting();
+ void t_setEngineContact();
+ void t_handleEmergencyDial();
+
+ void t_convertPsCallDivertingCondition();
+ void t_convertPsCallDivertingStatus();
+ void t_convertPsCallDivertingSetting();
+ void t_exceptionSafety();
+
+private:
+
+ void simulateLeaveOnMockMethodCallL();
+
+private:
+ PSetCallDivertingWrapper *mWrapper;
+ CPsetContainer *mSetContainerMock;
+ CPsetCallDiverting *mPsetCallDivertingMock;
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcalldivertingwrapper/ut_psetcalldivertingwrapper.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,53 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: Project file for building unit test component
+#
+#
+
+CONFIG += qtestlib release
+TEMPLATE = app
+TARGET =
+DEPENDPATH += . ../../src/
+INCLUDEPATH += . ../common
+DEFINES += BUILD_PSETWRAPPER
+DEFINES += QT_NO_DEBUG_STREAM
+
+QT -= gui
+QT += testlib
+
+symbian: {
+ CONFIG += no_icon
+ INCLUDEPATH += /epoc32/include/mw/QtTest \
+ /epoc32/include/platform/mw \
+ /epoc32/include/mw/qt
+ LIBS += -lmocklib -lsymbianmock -letelmm -letel -lbafl -lvmbxengine
+}
+
+# test code
+HEADERS += ut_psetcalldivertingwrapper.h
+HEADERS += ../common/testutilities.h
+SOURCES += ut_psetcalldivertingwrapper.cpp
+SOURCES += ../common/testutilities.cpp
+
+# code to be tested
+HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcalldivertingwrapper.h
+SOURCES += ../../src/psetcalldivertingwrapper.cpp \
+ ../../src/psetcalldivertingwrapper_p.cpp
+
+# mocks needed for testing
+SOURCES += ../mocks/mock_psetcontainer.cpp \
+ ../mocks/mock_cphcltemergencycall.cpp \
+ ../mocks/mock_psetcalldiverting.cpp \
+ ../mocks/mock_cvoicemailbox.cpp \
+ ../mocks/mock_cvoicemailboxentry.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallwaitingwrapper/ut_psetcallwaitingwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,331 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <etelmm.h>
+#include <PsetContainer.h>
+#include <MPsetCallWaitingObs.h>
+#include "ut_psetcallwaitingwrapper.h"
+#include "testutilities.h"
+#define private public
+#include "psetcallwaitingwrapper.h"
+#include "psetcallwaitingwrapper_p.h"
+
+class WaitingObserver : public MPsetCallWaitingObserver
+{
+ void HandleCallWaitingGetStatusL(
+ const MPsetCallWaiting::TGetCallWaitingStatus aStatus,
+ TUint8 aBsc[KPSetNumberOfBsc])
+ {
+ Q_UNUSED(aStatus);
+ Q_UNUSED(aBsc);
+ }
+
+ void HandleCallWaitingChangedL(
+ const MPsetCallWaiting::TSetCallWaiting aSetting,
+ const TInt aResult)
+ {
+ Q_UNUSED(aSetting);
+ Q_UNUSED(aResult);
+ }
+
+ void HandleCWRequestingL(
+ TBool aOngoing,
+ TBool aInterrupted)
+ {
+ Q_UNUSED(aOngoing);
+ Q_UNUSED(aInterrupted);
+ }
+
+ void HandleCWErrorL(
+ TInt aReason)
+ {
+ Q_UNUSED(aReason);
+ }
+
+ void SetEngineContact(
+ MPsetCallWaiting& aEngineContact)
+ {
+ Q_UNUSED(aEngineContact);
+ }
+};
+
+/*!
+ UT_PSetCallWaitingWrapper::UT_PSetCallWaitingWrapper
+ */
+UT_PSetCallWaitingWrapper::UT_PSetCallWaitingWrapper()
+ :
+ m_numOfLeaveSimulations(0),
+ m_psetContainerMock(NULL),
+ m_psetCallWaitingMock(NULL),
+ m_wrapper(NULL)
+{
+}
+
+/*!
+ UT_PSetCallWaitingWrapper::~UT_PSetCallWaitingWrapper
+ */
+UT_PSetCallWaitingWrapper::~UT_PSetCallWaitingWrapper()
+{
+ delete m_psetContainerMock;
+ m_psetCallWaitingMock = NULL;
+ delete m_wrapper;
+}
+
+/*!
+ UT_PSetCallWaitingWrapper::init
+ */
+void UT_PSetCallWaitingWrapper::init()
+{
+ initialize();
+ m_numOfLeaveSimulations = 0;
+
+ m_psetContainerMock = new CPsetContainer();
+
+ RMobilePhone dummyHandle;
+ WaitingObserver dummyObserver;
+ QT_TRAP_THROWING(m_psetCallWaitingMock =
+ CPsetCallWaiting::NewL(dummyHandle, dummyObserver));
+ expect("CPsetContainer::CreateCWObjectL").returns(m_psetCallWaitingMock);
+
+ // wrapper takes ownership of callDivertingMock during successful
+ // construction
+ QScopedPointer<CPsetCallWaiting> callWaitingMockPtr(m_psetCallWaitingMock);
+ m_wrapper = new PSetCallWaitingWrapper(*m_psetContainerMock, NULL);
+ callWaitingMockPtr.take();
+}
+
+/*!
+ UT_PSetCallWaitingWrapper::cleanup
+ */
+void UT_PSetCallWaitingWrapper::cleanup()
+{
+ reset();
+
+ delete m_psetContainerMock;
+ m_psetContainerMock = NULL;
+ m_psetCallWaitingMock = NULL;
+ delete m_wrapper;
+ m_wrapper = NULL;
+}
+
+/*!
+ UT_PSetCallWaitingWrapper::t_setCallWaiting
+ */
+void UT_PSetCallWaitingWrapper::t_setCallWaiting()
+{
+ TBasicServiceGroups basicServiceGroup = EAllTele;
+ expect("CPsetCallWaiting::SetCallWaitingL").
+ with(MPsetCallWaiting::EActivateCallWaiting, basicServiceGroup);
+ expect("CPsetCallWaiting::SetCallWaitingL").
+ with(MPsetCallWaiting::EDeactivateCallWaiting, basicServiceGroup);
+
+ int invalidEnumeration = -1;
+ expect("CPsetCallWaiting::SetCallWaitingL").
+ with(static_cast<MPsetCallWaiting::TSetCallWaiting>(invalidEnumeration), basicServiceGroup).
+ willOnce(invokeWithoutArguments(this, &SimulateLeaveAtMockMethodCallL));
+
+ m_wrapper->setCallWaiting(
+ PSetCallWaitingWrapper::ActivateCallWaiting,
+ basicServiceGroup);
+ m_wrapper->setCallWaiting(
+ PSetCallWaitingWrapper::DeactivateCallWaiting,
+ basicServiceGroup);
+ EXPECT_EXCEPTION(
+ m_wrapper->setCallWaiting(
+ static_cast<PSetCallWaitingWrapper::PsCallWaitingCommand>(invalidEnumeration),
+ basicServiceGroup);
+ )
+
+ QVERIFY(1 == m_numOfLeaveSimulations);
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallWaitingWrapper::t_getCallWaitingStatus
+ */
+void UT_PSetCallWaitingWrapper::t_getCallWaitingStatus()
+{
+ expect("CPsetCallWaiting::GetCallWaitingStatusL").
+ willOnce(invoke(this, &SimulateLeaveAtMockMethodCallL));
+
+ EXPECT_EXCEPTION(
+ m_wrapper->getCallWaitingStatus();
+ )
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallWaitingWrapper::t_cancelProcess
+ */
+void UT_PSetCallWaitingWrapper::t_cancelProcess()
+{
+ expect("CPsetCallWaiting::CancelProcess");
+
+ m_wrapper->cancelProcess();
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCallWaitingWrapper::t_handleCallWaitingGetStatus
+ */
+Q_DECLARE_METATYPE(PSetCallWaitingWrapper::PsCallWaitingStatus)
+Q_DECLARE_METATYPE(QList<unsigned char>)
+void UT_PSetCallWaitingWrapper::t_handleCallWaitingGetStatus()
+{
+ qRegisterMetaType<PSetCallWaitingWrapper::PsCallWaitingStatus>
+ ("PSetCallWaitingWrapper::PsCallWaitingStatus");
+ qRegisterMetaType<QList<unsigned char> >("QList<unsigned char>");
+ QSignalSpy spy(m_wrapper, SIGNAL(handleCallWaitingGetStatus(
+ PSetCallWaitingWrapper::PsCallWaitingStatus, const QList<unsigned char> &)));
+
+ MPsetCallWaiting::TGetCallWaitingStatus status =
+ MPsetCallWaiting::EStatusActive;
+ TUint8 bscList[KPSetNumberOfBsc];
+ bscList[0] = EAllTele;
+ bscList[1] = KPSetUnusedValue;
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleCallWaitingGetStatusL(status, bscList));
+ status = MPsetCallWaiting::EStatusDisabled;
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleCallWaitingGetStatusL(status, bscList));
+ status = MPsetCallWaiting::EStatusNotAvailable;
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleCallWaitingGetStatusL(status, bscList));
+ status = MPsetCallWaiting::EStatusNotProvisioned;
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleCallWaitingGetStatusL(status, bscList));
+ status = MPsetCallWaiting::EStatusUnknown;
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleCallWaitingGetStatusL(status, bscList));
+
+ const int expectedNumOfSignalEmissions = 5;
+ QCOMPARE(spy.count(), expectedNumOfSignalEmissions);
+ const QList<QVariant> &arguments = spy.at(0);
+ QVERIFY(PSetCallWaitingWrapper::StatusActive ==
+ arguments.at(0).value<PSetCallWaitingWrapper::PsCallWaitingStatus>());
+ QVERIFY(EAllTele == arguments.at(1).value<QList<unsigned char> >()[0]);
+ QVERIFY(PSetCallWaitingWrapper::StatusDisabled ==
+ spy.at(1).at(0).value<PSetCallWaitingWrapper::PsCallWaitingStatus>());
+ QVERIFY(EAllTele == spy.at(1).at(1).value<QList<unsigned char> >()[0]);
+ QVERIFY(PSetCallWaitingWrapper::StatusNotAvailable ==
+ spy.at(2).at(0).value<PSetCallWaitingWrapper::PsCallWaitingStatus>());
+ QVERIFY(EAllTele == spy.at(2).at(1).value<QList<unsigned char> >()[0]);
+ QVERIFY(PSetCallWaitingWrapper::StatusNotProvisioned ==
+ spy.at(3).at(0).value<PSetCallWaitingWrapper::PsCallWaitingStatus>());
+ QVERIFY(EAllTele == spy.at(3).at(1).value<QList<unsigned char> >()[0]);
+ QVERIFY(PSetCallWaitingWrapper::StatusUnknown ==
+ spy.at(4).at(0).value<PSetCallWaitingWrapper::PsCallWaitingStatus>());
+ QVERIFY(EAllTele == spy.at(4).at(1).value<QList<unsigned char> >()[0]);
+}
+
+/*!
+ UT_PSetCallWaitingWrapper::t_handleCallWaitingChanged
+ */
+Q_DECLARE_METATYPE(PSetCallWaitingWrapper::PsCallWaitingCommand)
+void UT_PSetCallWaitingWrapper::t_handleCallWaitingChanged()
+{
+ qRegisterMetaType<PSetCallWaitingWrapper::PsCallWaitingCommand>
+ ("PSetCallWaitingWrapper::PsCallWaitingCommand");
+ QSignalSpy spy(m_wrapper, SIGNAL(handleCallWaitingChanged(
+ PSetCallWaitingWrapper::PsCallWaitingCommand, int)));
+
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleCallWaitingChangedL(
+ MPsetCallWaiting::EActivateCallWaiting, KErrNone));
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleCallWaitingChangedL(
+ MPsetCallWaiting::EDeactivateCallWaiting, KErrNone));
+
+ const int expectedNumOfSignalEmissions = 2;
+ QCOMPARE(spy.count(), expectedNumOfSignalEmissions);
+ QVERIFY(PSetCallWaitingWrapper::ActivateCallWaiting ==
+ spy.at(0).at(0).value<PSetCallWaitingWrapper::PsCallWaitingCommand>());
+ QVERIFY(KErrNone == spy.at(0).at(1).toInt());
+ QVERIFY(PSetCallWaitingWrapper::DeactivateCallWaiting ==
+ spy.at(1).at(0).value<PSetCallWaitingWrapper::PsCallWaitingCommand>());
+ QVERIFY(KErrNone == spy.at(1).at(1).toInt());
+}
+
+/*!
+ UT_PSetCallWaitingWrapper::t_handleCallWaitingRequesting
+ */
+void UT_PSetCallWaitingWrapper::t_handleCallWaitingRequesting()
+{
+ QSignalSpy spy(m_wrapper,
+ SIGNAL(handleCallWaitingRequesting(bool, bool)));
+
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleCWRequestingL(ETrue, ETrue));
+
+ QCOMPARE(spy.count(), 1);
+ const QList<QVariant> &arguments = spy.at(0);
+ QVERIFY(true == arguments.at(0).toBool());
+ QVERIFY(true == arguments.at(1).toBool());
+}
+
+/*!
+ UT_PSetCallWaitingWrapper::t_handleCallWaitingError
+ */
+void UT_PSetCallWaitingWrapper::t_handleCallWaitingError()
+{
+ QSignalSpy spy(m_wrapper, SIGNAL(handleCallWaitingError(int)));
+
+ QT_TRAP_THROWING(m_wrapper->m_privateImpl->HandleCWErrorL(KErrGeneral));
+
+ QCOMPARE(spy.count(), 1);
+ const QList<QVariant> &arguments = spy.at(0);
+ QVERIFY(KErrGeneral == arguments.at(0).toInt());
+}
+
+/*!
+ UT_PSetCallWaitingWrapper::t_setEngineContact
+ */
+void UT_PSetCallWaitingWrapper::t_setEngineContact()
+{
+ // dummy test as no real implementation for the method currently
+ m_wrapper->m_privateImpl->SetEngineContact(
+ reinterpret_cast<MPsetCallWaiting&>(*this));
+}
+
+/*!
+ UT_PSetCallWaitingWrapper::t_exceptionSafety
+ TODO: tests using signalspy fail in alloc failure mode because
+ QList<QVariant> is not exception safe in QT 4.6.0.
+ */
+void UT_PSetCallWaitingWrapper::t_exceptionSafety()
+{
+ cleanup();
+
+ OomTestExecuter::runTest(*this, &t_setCallWaiting);
+ OomTestExecuter::runTest(*this, &t_getCallWaitingStatus);
+ OomTestExecuter::runTest(*this, &t_cancelProcess);
+ //OomTestExecuter::runTest(*this, &t_handleCallWaitingGetStatus);
+ //OomTestExecuter::runTest(*this, &t_handleCallWaitingChanged);
+ //OomTestExecuter::runTest(*this, &t_handleCallWaitingRequesting);
+ //OomTestExecuter::runTest(*this, &t_handleCallWaitingError);
+ OomTestExecuter::runTest(*this, &t_setEngineContact);
+}
+
+void UT_PSetCallWaitingWrapper::SimulateLeaveAtMockMethodCallL()
+{
+ m_numOfLeaveSimulations++;
+ User::Leave( KErrGeneral );
+}
+
+QTEST_MAIN_S60(UT_PSetCallWaitingWrapper)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallwaitingwrapper/ut_psetcallwaitingwrapper.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef UT_PSETCALLWAITINGWRAPPER_H
+#define UT_PSETCALLWAITINGWRAPPER_H
+
+#include <QtTest/QtTest>
+#include <mockservice.h>
+
+class CPsetContainer;
+class CPsetCallWaiting;
+class PSetCallWaitingWrapper;
+
+class UT_PSetCallWaitingWrapper : public QObject, public MockService
+{
+ Q_OBJECT
+
+public:
+
+ UT_PSetCallWaitingWrapper();
+ ~UT_PSetCallWaitingWrapper();
+
+private slots:
+
+ void init();
+ void cleanup();
+
+ void t_setCallWaiting();
+ void t_getCallWaitingStatus();
+ void t_cancelProcess();
+
+ // signal emitting/private implementation tests
+ void t_handleCallWaitingGetStatus();
+ void t_handleCallWaitingChanged();
+ void t_handleCallWaitingRequesting();
+ void t_handleCallWaitingError();
+ void t_setEngineContact();
+
+ void t_exceptionSafety();
+
+private:
+
+ void SimulateLeaveAtMockMethodCallL();
+
+private:
+
+ int m_numOfLeaveSimulations;
+ CPsetContainer *m_psetContainerMock;
+ CPsetCallWaiting *m_psetCallWaitingMock;
+ PSetCallWaitingWrapper* m_wrapper;
+};
+
+#endif // UT_PSETCALLWAITINGWRAPPER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcallwaitingwrapper/ut_psetcallwaitingwrapper.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,51 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: Project file for building unit test component
+#
+#
+
+CONFIG += qtestlib release
+TEMPLATE = app
+TARGET =
+DEPENDPATH += . ../../src/
+INCLUDEPATH += . ../../../ ../common
+DEFINES += BUILD_PSETWRAPPER
+
+MOC_DIR = .
+
+QT -= gui
+QT += testlib
+
+symbian: {
+ CONFIG += no_icon
+ INCLUDEPATH += /epoc32/include/mw/QtTest \
+ /epoc32/include/platform/mw \
+ /epoc32/include/mw/qt
+ LIBS += -lmocklib -lsymbianmock -letelmm -letel -lbafl -lcustomapi
+}
+
+# test code
+HEADERS += ut_psetcallwaitingwrapper.h
+HEADERS += ../common/testutilities.h
+SOURCES += ut_psetcallwaitingwrapper.cpp
+SOURCES += ../common/testutilities.cpp
+
+# code to be tested
+HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcallwaitingwrapper.h
+SOURCES += ../../src/psetcallwaitingwrapper.cpp \
+ ../../src/psetcallwaitingwrapper_p.cpp
+
+# mocks needed for testing
+SOURCES += ../mocks/mock_psetcontainer.cpp \
+ ../mocks/mock_psetcallwaiting.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcliwrapper/ut_psetcliwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,353 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <PsetContainer.h>
+#include <MPsetCliObserver.h>
+#include <psetwrappertypes.h>
+#include <PsetCli.h>
+#include <PsuiConstants.h>
+#include "ut_psetcliwrapper.h"
+#include "testutilities.h"
+#define private public
+#include "psetcliwrapper.h"
+#include "psetcliwrapper_p.h"
+
+class CliObserver : public MPsetCliObserver
+{
+ void SetEngineContact( MPsetCli* aEngine )
+ {
+ Q_UNUSED(aEngine);
+ }
+
+ void HandleCliRequestingL( TBool aOngoing,
+ TBool aInterrupted )
+ {
+ Q_UNUSED(aOngoing);
+ Q_UNUSED(aInterrupted);
+ }
+
+ void CliInformationL( TPsuiCli aType )
+ {
+ Q_UNUSED(aType);
+ }
+
+ void HandleCliStatusL( TUint8 aBsc[KPSetNumberOfBsc], TPsuiCli aMode )
+ {
+ Q_UNUSED(aBsc);
+ Q_UNUSED(aMode);
+ }
+
+ void HandleCnapStatusL( TInt aStatus )
+ {
+ Q_UNUSED(aStatus);
+ }
+
+ void HandleCliErrorL( TInt aError )
+ {
+ Q_UNUSED(aError);
+ }
+};
+
+/*!
+ UT_PSetCliWrapper::UT_PSetCliWrapper
+ */
+UT_PSetCliWrapper::UT_PSetCliWrapper()
+ :
+ m_numOfLeaveSimulations(0),
+ m_psetContainerMock(NULL),
+ m_wrapper(NULL),
+ m_cliMock(NULL)
+{
+}
+
+/*!
+ UT_PSetCliWrapper::~UT_PSetCliWrapper
+ */
+UT_PSetCliWrapper::~UT_PSetCliWrapper()
+{
+ delete m_psetContainerMock;
+ delete m_wrapper;
+ m_cliMock = NULL;
+}
+
+/*!
+ UT_PSetCliWrapper::init
+ */
+void UT_PSetCliWrapper::init()
+{
+ initialize();
+
+ m_numOfLeaveSimulations = 0;
+ m_psetContainerMock = new CPsetContainer();
+
+ RMobilePhone dummyHandle;
+ CliObserver dummyObserver;
+ QT_TRAP_THROWING(m_cliMock =
+ CPsetCli::NewL(dummyHandle, dummyObserver));
+ expect("CPsetContainer::CreateCliObjectL").returns(m_cliMock);
+ // wrapper takes ownership of callDivertingMock during successfull
+ // construction.
+ QScopedPointer<CPsetCli> cliMockPtr(m_cliMock);
+ m_wrapper = new PSetCliWrapper(*m_psetContainerMock, NULL);
+ cliMockPtr.take();
+}
+
+/*!
+ UT_PSetCliWrapper::cleanup
+ */
+void UT_PSetCliWrapper::cleanup()
+{
+ reset();
+
+ delete m_psetContainerMock;
+ m_psetContainerMock = NULL;
+ delete m_wrapper;
+ m_wrapper = NULL;
+ m_cliMock = NULL;
+}
+
+/*!
+ UT_PSetCliWrapper::t_getColpMode
+ */
+void UT_PSetCliWrapper::t_getColpMode()
+{
+ expect("CPsetCli::GetColpModeL").
+ willOnce(invokeWithoutArguments(this, &SimulateLeaveAtMockMethodCallL));
+
+ EXPECT_EXCEPTION(
+ m_wrapper->getColpMode();
+ )
+
+ QVERIFY(1 == m_numOfLeaveSimulations);
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCliWrapper::t_getClipMode
+ */
+void UT_PSetCliWrapper::t_getClipMode()
+{
+ expect("CPsetCli::GetClipModeL").
+ willOnce(invokeWithoutArguments(this, &SimulateLeaveAtMockMethodCallL));
+
+ EXPECT_EXCEPTION(
+ m_wrapper->getClipMode();
+ )
+
+ QVERIFY(1 == m_numOfLeaveSimulations);
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCliWrapper::t_getClirMode
+ */
+void UT_PSetCliWrapper::t_getClirMode()
+{
+ expect("CPsetCli::GetClirModeL").
+ willOnce(invokeWithoutArguments(this, &SimulateLeaveAtMockMethodCallL));
+
+ EXPECT_EXCEPTION(
+ m_wrapper->getClirMode();
+ )
+
+ QVERIFY(1 == m_numOfLeaveSimulations);
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCliWrapper::t_getColrMode
+ */
+void UT_PSetCliWrapper::t_getColrMode()
+{
+ expect("CPsetCli::GetColrModeL").
+ willOnce(invokeWithoutArguments(this, &SimulateLeaveAtMockMethodCallL));
+
+ EXPECT_EXCEPTION(
+ m_wrapper->getColrMode();
+ )
+
+ QVERIFY(1 == m_numOfLeaveSimulations);
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCliWrapper::t_getCnap
+ */
+void UT_PSetCliWrapper::t_getCnap()
+{
+ expect("CPsetCli::GetCnapL").
+ willOnce(invokeWithoutArguments(this, &SimulateLeaveAtMockMethodCallL));
+
+ EXPECT_EXCEPTION(
+ m_wrapper->getCnap();
+ )
+
+ QVERIFY(1 == m_numOfLeaveSimulations);
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetCliWrapper::t_cancelAll
+ */
+void UT_PSetCliWrapper::t_cancelAll()
+{
+ expect("CPsetCli::CancelAll");
+
+ m_wrapper->cancelAll();
+
+ QVERIFY(true == verify());
+}
+
+
+/*!
+ UT_PSetCliWrapper::t_handleCliRequesting
+ */
+void UT_PSetCliWrapper::t_handleCliRequesting()
+{
+ QSignalSpy spy(m_wrapper, SIGNAL(handleCliRequesting(bool, bool)));
+
+ TBool isOngoing = ETrue;
+ TBool isInterrupted = ETrue;
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleCliRequestingL(isOngoing, isInterrupted));
+
+ const int expectednumOfSignalEmissions = 1;
+ const int expectedNumOfSignalArguments = 2;
+ QCOMPARE(spy.count(), expectednumOfSignalEmissions);
+ const QList<QVariant> &arguments = spy.at(0);
+ QVERIFY(expectedNumOfSignalArguments == arguments.count());
+ QVERIFY(ETrue == arguments.at(0).toBool());
+ QVERIFY(ETrue == arguments.at(1).toBool());
+}
+
+/*!
+ UT_PSetCliWrapper::t_cliInformation
+ */
+Q_DECLARE_METATYPE(PsCallLineIdentity)
+void UT_PSetCliWrapper::t_cliInformation()
+{
+ qRegisterMetaType<PsCallLineIdentity>("PsCallLineIdentity");
+ QSignalSpy spy(m_wrapper, SIGNAL(cliInformation(PsCallLineIdentity)));
+
+ QT_TRAP_THROWING(m_wrapper->m_privateImpl->CliInformationL(EPsuiClirOn));
+
+ const int expectednumOfSignalEmissions = 1;
+ const int expectedNumOfSignalArguments = 1;
+ QCOMPARE(spy.count(), expectednumOfSignalEmissions);
+ const QList<QVariant> &arguments = spy.at(0);
+ QVERIFY(expectedNumOfSignalArguments == arguments.count());
+ QVERIFY(ClirOn == arguments.at(0).value<PsCallLineIdentity>());
+}
+
+/*!
+ UT_PSetCliWrapper::t_handleCliStatus
+ */
+Q_DECLARE_METATYPE(unsigned char *)
+void UT_PSetCliWrapper::t_handleCliStatus()
+{
+ qRegisterMetaType<unsigned char *>("unsigned char *");
+ QSignalSpy spy(m_wrapper,
+ SIGNAL(handleCliStatus(unsigned char *, int, PsCallLineIdentity)));
+
+ TUint8 bscList[KPSetNumberOfBsc] = { EAllTele };
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleCliStatusL(bscList, EPsuiClirOn));
+
+ const int expectednumOfSignalEmissions = 1;
+ const int expectedNumOfSignalArguments = 3;
+ QCOMPARE(spy.count(), expectednumOfSignalEmissions);
+ const QList<QVariant> &arguments = spy.at(0);
+ QVERIFY(expectedNumOfSignalArguments == arguments.count());
+ QVERIFY(EAllTele == arguments.at(0).value<unsigned char *>()[0]);
+ QVERIFY(KPSetNumberOfBsc == arguments.at(1).toInt());
+ QVERIFY(ClirOn == arguments.at(2).value<PsCallLineIdentity>());
+}
+
+/*!
+ UT_PSetCliWrapper::t_handleCnapStatus
+ */
+void UT_PSetCliWrapper::t_handleCnapStatus()
+{
+ QSignalSpy spy(m_wrapper, SIGNAL(handleCnapStatus(int)));
+
+ const int status = 1;
+ QT_TRAP_THROWING(m_wrapper->m_privateImpl->HandleCnapStatusL(status));
+
+ const int expectednumOfSignalEmissions = 1;
+ const int expectedNumOfSignalArguments = 1;
+ QCOMPARE(spy.count(), expectednumOfSignalEmissions);
+ const QList<QVariant> &arguments = spy.at(0);
+ QVERIFY(expectedNumOfSignalArguments == arguments.count());
+ QVERIFY(status == arguments.at(0).toInt());
+}
+
+/*!
+ UT_PSetCliWrapper::t_handleCliError
+ */
+void UT_PSetCliWrapper::t_handleCliError()
+{
+ QSignalSpy spy(m_wrapper, SIGNAL(handleCliError(int)));
+
+ const int expectedErrorCode = KErrGeneral;
+ QT_TRAP_THROWING(m_wrapper->m_privateImpl->HandleCliErrorL(expectedErrorCode));
+
+ const int expectednumOfSignalEmissions = 1;
+ const int expectedNumOfSignalArguments = 1;
+ QCOMPARE(spy.count(), expectednumOfSignalEmissions);
+ const QList<QVariant> &arguments = spy.at(0);
+ QVERIFY(expectedNumOfSignalArguments == arguments.count());
+ QVERIFY(expectedErrorCode == arguments.at(0).toInt());
+}
+
+/*!
+ UT_PSetCliWrapper::t_setEngineContact
+ */
+void UT_PSetCliWrapper::t_setEngineContact()
+{
+ // dummy test as no real implementation for the method currently
+ m_wrapper->m_privateImpl->SetEngineContact(NULL);
+}
+
+/*!
+ UT_PSetCliWrapper::t_exceptionSafety
+ */
+void UT_PSetCliWrapper::t_exceptionSafety()
+{
+ cleanup();
+
+ OomTestExecuter::runTest(*this, &t_getColpMode);
+ OomTestExecuter::runTest(*this, &t_getClipMode);
+ OomTestExecuter::runTest(*this, &t_getClirMode);
+ OomTestExecuter::runTest(*this, &t_getColrMode);
+ OomTestExecuter::runTest(*this, &t_getCnap);
+ OomTestExecuter::runTest(*this, &t_cancelAll);
+
+// OomTestExecuter::runTest(*this, &t_handleCliRequesting);
+// OomTestExecuter::runTest(*this, &t_cliInformation);
+// OomTestExecuter::runTest(*this, &t_handleCliStatus);
+// OomTestExecuter::runTest(*this, &t_handleCnapStatus);
+// OomTestExecuter::runTest(*this, &t_handleCliError);
+// OomTestExecuter::runTest(*this, &t_setEngineContact);
+}
+
+void UT_PSetCliWrapper::SimulateLeaveAtMockMethodCallL()
+{
+ m_numOfLeaveSimulations++;
+ User::Leave( KErrGeneral );
+}
+
+QTEST_MAIN_S60(UT_PSetCliWrapper)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcliwrapper/ut_psetcliwrapper.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef UT_PSETCLIWRAPPER_H
+#define UT_PSETCLIWRAPPER_H
+
+#include <QtTest/QtTest>
+#include <mockservice.h>
+
+class CPsetContainer;
+class PSetCliWrapper;
+class CPsetCli;
+
+class UT_PSetCliWrapper : public QObject, public MockService
+{
+ Q_OBJECT
+
+public:
+
+ UT_PSetCliWrapper();
+ ~UT_PSetCliWrapper();
+
+private slots:
+
+ void init();
+ void cleanup();
+
+ void t_getColpMode();
+ void t_getClipMode();
+ void t_getClirMode();
+ void t_getColrMode();
+ void t_getCnap();
+ void t_cancelAll();
+
+ // signal emitting/private implementation tests
+ void t_handleCliRequesting();
+ void t_cliInformation();
+ void t_handleCliStatus();
+ void t_handleCnapStatus();
+ void t_handleCliError();
+ void t_setEngineContact();
+
+ void t_exceptionSafety();
+
+private:
+
+ void SimulateLeaveAtMockMethodCallL();
+
+private:
+
+ int m_numOfLeaveSimulations;
+ CPsetContainer *m_psetContainerMock;
+ CPsetCli* m_cliMock;
+ PSetCliWrapper* m_wrapper;
+};
+
+#endif // UT_PSETCLIWRAPPER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetcliwrapper/ut_psetcliwrapper.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,51 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: Project file for building unit test component
+#
+#
+
+CONFIG += qtestlib release
+TEMPLATE = app
+TARGET =
+DEPENDPATH += . ../../src/
+INCLUDEPATH += . ../../../ ../common
+DEFINES += BUILD_PSETWRAPPER
+
+MOC_DIR = .
+
+QT -= gui
+QT += testlib
+
+symbian: {
+ CONFIG += no_icon
+ INCLUDEPATH += /epoc32/include/mw/QtTest \
+ /epoc32/include/platform/mw \
+ /epoc32/include/mw/qt
+ LIBS += -lmocklib -lsymbianmock -letelmm -letel -lbafl -lcustomapi
+}
+
+# test code
+HEADERS += ut_psetcliwrapper.h
+HEADERS += ../common/testutilities.h
+SOURCES += ut_psetcliwrapper.cpp
+SOURCES += ../common/testutilities.cpp
+
+# code to be tested
+HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcliwrapper.h
+SOURCES += ../../src/psetcliwrapper.cpp \
+ ../../src/psetcliwrapper_p.cpp
+
+# mocks needed for testing
+SOURCES += ../mocks/mock_psetcontainer.cpp \
+ ../mocks/mock_psetcli.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkinfoconverter/ut_psetnetworkinfoconverter.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,178 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include "ut_psetnetworkinfoconverter.h"
+#include "psetnetworkinfoconverter.h"
+#include "qtestmains60.h"
+
+
+/*!
+ UT_PSetNetworkInfoConverter::UT_PSetNetworkInfoConverter
+ */
+UT_PSetNetworkInfoConverter::UT_PSetNetworkInfoConverter()
+{
+}
+
+/*!
+ UT_PSetNetworkInfoConverter::~UT_PSetNetworkInfoConverter
+ */
+UT_PSetNetworkInfoConverter::~UT_PSetNetworkInfoConverter()
+{
+
+}
+
+/*!
+ UT_PSetNetworkInfoConverter::init
+ */
+void UT_PSetNetworkInfoConverter::init()
+{
+ initialize();
+}
+
+/*!
+ UT_PSetNetworkInfoConverter::cleanup
+ */
+void UT_PSetNetworkInfoConverter::cleanup()
+{
+ reset();
+}
+
+/*!
+ UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkInfo
+ */
+void UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkInfo()
+{
+ _LIT(KCountryCode, "1234"); // country code max length is 4
+ _LIT(KNetworkCode, "12345678"); // network code max length is 8
+ PSetNetworkWrapper::NetworkId networkId =
+ {
+ QString::fromUtf16(KCountryCode().Ptr(), KCountryCode().Length()),
+ QString::fromUtf16(KNetworkCode().Ptr(), KNetworkCode().Length()),
+ };
+
+ _LIT(KShortName, "shortNameMaxLength20");
+ _LIT(KLongName, "longNameMaxLengthIs30LikeThis_");
+ PSetNetworkWrapper::NetworkInfo info =
+ {
+ networkId,
+ PSetNetworkWrapper::StatusUnknown,
+ PSetNetworkWrapper::SelectionModeManual,
+ PSetNetworkWrapper::AccessTypeGsm,
+ QString::fromUtf16(KShortName().Ptr(), KShortName().Length()),
+ QString::fromUtf16(KLongName().Ptr(), KLongName().Length()),
+ };
+
+ MPsetNetworkSelect::TNetworkInfo convertedInfo =
+ NetworkInfoConverter::ConvertToSymbianType(info);
+
+ QVERIFY(convertedInfo.iId.iCountryCode == KCountryCode());
+ QVERIFY(convertedInfo.iId.iNetworkCode == KNetworkCode());
+ QVERIFY(convertedInfo.iStatus == MPsetNetworkSelect::ENetStatUnknown);
+ QVERIFY(convertedInfo.iMode == MPsetNetworkSelect::ENetSelectModeManual);
+ QVERIFY(convertedInfo.iAccess == MPsetNetworkSelect::ENetNetworkGSM);
+ QVERIFY(convertedInfo.iShortName == KShortName());
+ QVERIFY(convertedInfo.iLongName == KLongName());
+}
+
+/*!
+ UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkId
+ */
+void UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkId()
+{
+ _LIT(KCountryCode, "1234");
+ _LIT(KNetworkCode, "12345678");
+ PSetNetworkWrapper::NetworkId networkId =
+ {
+ QString::fromUtf16(KCountryCode().Ptr(), KCountryCode().Length()),
+ QString::fromUtf16(KNetworkCode().Ptr(), KNetworkCode().Length()),
+ };
+
+ MPsetNetworkSelect::TNetworkId convertedType =
+ NetworkInfoConverter::ConvertToSymbianType(networkId);
+ QVERIFY(convertedType.iCountryCode == KCountryCode());
+ QVERIFY(convertedType.iNetworkCode == KNetworkCode());
+}
+
+/*!
+ UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkStatus
+ */
+void UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkStatus()
+{
+ MPsetNetworkSelect::TNetworkStatus convertedType =
+ NetworkInfoConverter::ConvertToSymbianType(
+ PSetNetworkWrapper::StatusUnknown);
+ QVERIFY(MPsetNetworkSelect::ENetStatUnknown == convertedType);
+
+ convertedType = NetworkInfoConverter::ConvertToSymbianType(
+ PSetNetworkWrapper::StatusAvailable);
+ QVERIFY(MPsetNetworkSelect::ENetStatAvailable == convertedType);
+
+ convertedType = NetworkInfoConverter::ConvertToSymbianType(
+ PSetNetworkWrapper::StatusCurrent);
+ QVERIFY(MPsetNetworkSelect::ENetStatCurrent == convertedType);
+
+ convertedType = NetworkInfoConverter::ConvertToSymbianType(
+ PSetNetworkWrapper::StatusForbidden);
+ QVERIFY(MPsetNetworkSelect::ENetStatForbidden == convertedType);
+}
+
+/*!
+ UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkSelectionMode
+ */
+void UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkSelectionMode()
+{
+ MPsetNetworkSelect::TSelectMode convertedType =
+ NetworkInfoConverter::ConvertToSymbianType(
+ PSetNetworkWrapper::SelectionModeAutomatic);
+ QVERIFY(MPsetNetworkSelect::ENetSelectModeAutomatic == convertedType);
+
+ convertedType = NetworkInfoConverter::ConvertToSymbianType(
+ PSetNetworkWrapper::SelectionModeManual);
+ QVERIFY(MPsetNetworkSelect::ENetSelectModeManual == convertedType);
+}
+
+/*!
+ UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkAccessType
+ */
+void UT_PSetNetworkInfoConverter::t_convertToSymbianTypeNetworkAccessType()
+{
+ MPsetNetworkSelect::TNetworkAccess convertedType =
+ NetworkInfoConverter::ConvertToSymbianType(
+ PSetNetworkWrapper::AccessTypeGsm);
+ QVERIFY(MPsetNetworkSelect::ENetNetworkGSM == convertedType);
+
+ convertedType = NetworkInfoConverter::ConvertToSymbianType(
+ PSetNetworkWrapper::AccessTypeWcdma);
+ QVERIFY(MPsetNetworkSelect::ENetNetworkWCDMA == convertedType);
+}
+
+/*!
+ UT_PSetNetworkInfoConverter::t_convertToQtTypeNetworkSelectionMode
+ */
+void UT_PSetNetworkInfoConverter::t_convertToQtTypeNetworkSelectionMode()
+{
+ PSetNetworkWrapper::NetworkSelectionMode convertedType =
+ NetworkInfoConverter::ConvertToQtType(
+ MPsetNetworkSelect::ENetSelectModeAutomatic);
+ QVERIFY(PSetNetworkWrapper::SelectionModeAutomatic == convertedType);
+
+ convertedType = NetworkInfoConverter::ConvertToQtType(
+ MPsetNetworkSelect::ENetSelectModeManual);
+ QVERIFY(PSetNetworkWrapper::SelectionModeManual == convertedType);
+}
+
+QTEST_MAIN_S60(UT_PSetNetworkInfoConverter)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkinfoconverter/ut_psetnetworkinfoconverter.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef UT_PSETNETWORKINFOCONVERTER_H
+#define UT_PSETNETWORKINFOCONVERTER_H
+
+#include <QtTest/QtTest>
+#include <mockservice.h>
+
+
+class UT_PSetNetworkInfoConverter : public QObject, public MockService
+{
+ Q_OBJECT
+
+public:
+ UT_PSetNetworkInfoConverter();
+ ~UT_PSetNetworkInfoConverter();
+
+private slots:
+
+ void init();
+ void cleanup();
+
+ void t_convertToSymbianTypeNetworkInfo();
+ void t_convertToSymbianTypeNetworkId();
+ void t_convertToSymbianTypeNetworkStatus();
+ void t_convertToSymbianTypeNetworkSelectionMode();
+ void t_convertToSymbianTypeNetworkAccessType();
+ void t_convertToQtTypeNetworkSelectionMode();
+};
+
+#endif // UT_PSETNETWORKINFOCONVERTER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkinfoconverter/ut_psetnetworkinfoconverter.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,43 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: Project file for building unit test component
+#
+#
+
+CONFIG += qtestlib release
+TEMPLATE = app
+TARGET =
+DEPENDPATH += . ../../src/
+INCLUDEPATH += . ../common
+DEFINES += BUILD_PSETWRAPPER
+
+QT -= gui
+QT += testlib
+
+symbian: {
+ CONFIG += no_icon
+ INCLUDEPATH += /epoc32/include/mw/QtTest \
+ /epoc32/include/platform/mw \
+ /epoc32/include/mw/qt
+ LIBS += -lmocklib -lsymbianmock -letelmm -letel -lbafl -lcustomapi
+}
+
+# test code
+HEADERS += ut_psetnetworkinfoconverter.h
+SOURCES += ut_psetnetworkinfoconverter.cpp
+
+# code to be tested
+HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h
+HEADERS += ../../src/psetnetworkinfoconverter.h
+SOURCES += ../../src/psetnetworkinfoconverter.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,418 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <PsetContainer.h>
+#include <MPsetNetworkInfoObs.h>
+#include "ut_psetnetworkwrapper.h"
+#include "testutilities.h"
+#define private public
+#include "psetnetworkwrapper.h"
+#include "psetnetworkwrapper_p.h"
+
+class NetworkInfoObserver : public MPsetNetworkInfoObserver
+{
+
+ void HandleNetworkInfoReceivedL(
+ const CNetworkInfoArray* aInfoArray,
+ const TInt aResult)
+ {
+ Q_UNUSED(aInfoArray);
+ Q_UNUSED(aResult);
+ }
+
+ void HandleCurrentNetworkInfoL(
+ const MPsetNetworkSelect::TCurrentNetworkInfo& aCurrentInfo,
+ const TInt aResult)
+ {
+ Q_UNUSED(aCurrentInfo);
+ Q_UNUSED(aResult);
+ }
+
+ void HandleNetworkChangedL(
+ const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo,
+ const MPsetNetworkSelect::TCurrentNetworkStatus aStatus,
+ const TInt aResult)
+ {
+ Q_UNUSED(aCurrentInfo);
+ Q_UNUSED(aStatus);
+ Q_UNUSED(aResult);
+ }
+
+ void HandleNetworkChangedL(
+ const MPsetNetworkSelect::TNetworkInfo& aCurrentInfo,
+ const RMobilePhone::TMobilePhoneRegistrationStatus& aStatus,
+ const TInt aResult)
+ {
+ Q_UNUSED(aCurrentInfo);
+ Q_UNUSED(aStatus);
+ Q_UNUSED(aResult);
+ }
+
+ void HandleSearchingNetworksL(
+ TServiceRequest aRequest)
+ {
+ Q_UNUSED(aRequest);
+ }
+
+ void HandleRequestingSelectedNetworkL(
+ TBool aOngoing)
+ {
+ Q_UNUSED(aOngoing);
+ }
+
+ void HandleCallActivatedL()
+ {
+
+ }
+
+ void HandleNetworkErrorL(
+ const MPsetNetworkInfoObserver::TServiceRequest aRequest,
+ const TInt aError)
+ {
+ Q_UNUSED(aRequest);
+ Q_UNUSED(aError);
+ }
+};
+
+/*!
+ UT_PSetNetworkWrapper::UT_PSetNetworkWrapper
+ */
+UT_PSetNetworkWrapper::UT_PSetNetworkWrapper()
+ :
+ m_wrapper(NULL),
+ m_psetContainerMock(NULL),
+ m_psetNetworkMock(NULL),
+ m_psetNetworkModeMock(NULL)
+{
+}
+
+/*!
+ UT_PSetNetworkWrapper::~UT_PSetNetworkWrapper
+ */
+UT_PSetNetworkWrapper::~UT_PSetNetworkWrapper()
+{
+ delete m_wrapper;
+ delete m_psetContainerMock;
+ m_psetNetworkMock = NULL;
+ m_psetNetworkModeMock = NULL;
+}
+
+/*!
+ UT_PSetNetworkWrapper::init
+ */
+void UT_PSetNetworkWrapper::init()
+{
+ initialize();
+
+ m_psetContainerMock = new CPsetContainer();
+
+ RMobilePhone dummyHandle;
+ NetworkInfoObserver dummyObserver;
+ QT_TRAP_THROWING(m_psetNetworkMock =
+ CPsetNetwork::NewL(dummyHandle, dummyObserver));
+ QT_TRAP_THROWING(m_psetNetworkModeMock =
+ CPsetNetwork::NewL(dummyHandle, dummyObserver));
+
+ expect("CPsetContainer::CreateNetworkObjectL").returns(m_psetNetworkMock);
+ expect("CPsetContainer::CreateNetworkModeObjectL").
+ returns(m_psetNetworkModeMock);
+
+ // wrapper takes ownership of networkmocks during successfull
+ // construction
+ QScopedPointer<CPsetNetwork> networkMockPtr(m_psetNetworkMock);
+ QScopedPointer<CPsetNetwork> networkModeMockPtr(m_psetNetworkModeMock);
+ m_wrapper = new PSetNetworkWrapper(*m_psetContainerMock, NULL);
+ networkMockPtr.take();
+ networkModeMockPtr.take();
+}
+
+/*!
+ UT_PSetNetworkWrapper::cleanup
+ */
+void UT_PSetNetworkWrapper::cleanup()
+{
+ reset();
+
+ delete m_wrapper;
+ m_wrapper = NULL;
+ delete m_psetContainerMock;
+ m_psetContainerMock = NULL;
+ m_psetNetworkMock = NULL;
+ m_psetNetworkModeMock = NULL;
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_getAvailableNetworks
+ */
+void UT_PSetNetworkWrapper::t_getAvailableNetworks()
+{
+ expect("CPsetNetwork::GetAvailableNetworksL");
+
+ m_wrapper->getAvailableNetworks();
+
+ QVERIFY(true == verify());
+}
+
+
+/*!
+ UT_PSetNetworkWrapper::t_getNetworkSelectionMode
+ */
+void UT_PSetNetworkWrapper::t_getNetworkSelectionMode()
+{
+ expect("CPsetNetwork::GetNetworkSelectMode")/*.
+ with(MPsetNetworkSelect::ENetSelectModeManual)*/.
+ returns(KErrNone);
+ expect("CPsetNetwork::GetNetworkSelectMode")/*.
+ with(MPsetNetworkSelect::ENetSelectModeAutomatic)*/.
+ returns(KErrGeneral);
+
+ PSetNetworkWrapper::NetworkSelectionMode selectionModeManual =
+ PSetNetworkWrapper::SelectionModeManual;
+ PSetNetworkWrapper::NetworkSelectionMode selectionModeAutomatic =
+ PSetNetworkWrapper::SelectionModeAutomatic;
+ m_wrapper->getNetworkSelectionMode(selectionModeManual);
+ m_wrapper->getNetworkSelectionMode(selectionModeAutomatic);
+
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_selectNetwork
+ */
+void UT_PSetNetworkWrapper::t_selectNetwork()
+{
+ expect("CPsetNetwork::SelectNetworkL");
+
+ PSetNetworkWrapper::NetworkInfo info;
+ m_wrapper->selectNetwork(info);
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_cancelRequest
+ */
+void UT_PSetNetworkWrapper::t_cancelRequest()
+{
+ expect("CPsetNetwork::CancelProcess");
+
+ m_wrapper->cancelRequest();
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_getNetworkAccessMode
+ */
+void UT_PSetNetworkWrapper::t_getNetworkAccessMode()
+{
+ expect("CPsetNetwork::GetCurrentNetworkModeSelectionL");
+
+ m_wrapper->getNetworkAccessMode();
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_setNetworkAccessMode
+ */
+void UT_PSetNetworkWrapper::t_setNetworkAccessMode()
+{
+ expect("CPsetNetwork::SetNetworkModeSelectionL").
+ with(RMmCustomAPI::KCapsNetworkModeDual);
+ expect("CPsetNetwork::SetNetworkModeSelectionL").
+ with(RMmCustomAPI::KCapsNetworkModeUmts);
+ expect("CPsetNetwork::SetNetworkModeSelectionL").
+ with(RMmCustomAPI::KCapsNetworkModeGsm);
+
+ m_wrapper->setNetworkAccessMode(PSetNetworkWrapper::AccessModeDual);
+ m_wrapper->setNetworkAccessMode(PSetNetworkWrapper::AccessModeUmts);
+ m_wrapper->setNetworkAccessMode(PSetNetworkWrapper::AccessModeGsm);
+
+ const int invalidMode = -1;
+ m_wrapper->setNetworkAccessMode(
+ reinterpret_cast<const PSetNetworkWrapper::NetworkAccessMode&>
+ (invalidMode));
+
+ QVERIFY(true == verify());
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_handleNetworkInfoReceived
+ */
+void UT_PSetNetworkWrapper::t_handleNetworkInfoReceived()
+{
+ CNetworkInfoArray* infos = NULL;
+
+ TRAPD(result, m_wrapper->m_privateImpl->
+ HandleNetworkInfoReceivedL(infos, KErrNone));
+ QVERIFY(KErrArgument == result);
+
+ infos = reinterpret_cast<CNetworkInfoArray*>(this);
+ TRAP(result, m_wrapper->m_privateImpl->
+ HandleNetworkInfoReceivedL(infos, KErrNone));
+ QVERIFY(KErrNone == result);
+}
+
+
+/*!
+ UT_PSetNetworkWrapper::t_handleCurrentNetworkInfo
+ */
+void UT_PSetNetworkWrapper::t_handleCurrentNetworkInfo()
+{
+ MPsetNetworkSelect::TCurrentNetworkInfo networkInfo;
+ QT_TRAP_THROWING(m_wrapper->m_privateImpl->
+ HandleCurrentNetworkInfoL(networkInfo, KErrNone));
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_handleNetworkChangedWithNetworkStatus
+ */
+void UT_PSetNetworkWrapper::t_handleNetworkChangedWithNetworkStatus()
+{
+ MPsetNetworkSelect::TNetworkInfo networkInfo;
+ MPsetNetworkSelect::TCurrentNetworkStatus networkStatus =
+ MPsetNetworkSelect::ENotRegisteredNotSearching;
+ QT_TRAP_THROWING(m_wrapper->m_privateImpl->
+ HandleNetworkChangedL(networkInfo, networkStatus, KErrNone));
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_handleNetworkChangedWithPhoneRegistrationStatus
+ */
+void UT_PSetNetworkWrapper::t_handleNetworkChangedWithPhoneRegistrationStatus()
+{
+ MPsetNetworkSelect::TNetworkInfo networkInfo;
+ RMobilePhone::TMobilePhoneRegistrationStatus registrationStatus;
+ QT_TRAP_THROWING(m_wrapper->m_privateImpl->
+ HandleNetworkChangedL(networkInfo, registrationStatus, KErrNone));
+}
+
+
+/*!
+ UT_PSetNetworkWrapper::t_handleSearchingNetworks
+ */
+void UT_PSetNetworkWrapper::t_handleSearchingNetworks()
+{
+ MPsetNetworkInfoObserver::TServiceRequest request =
+ MPsetNetworkInfoObserver::EServiceRequestNone;
+ QT_TRAP_THROWING(m_wrapper->m_privateImpl->
+ HandleSearchingNetworksL(request));
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_handleRequestingSelectedNetwork
+ */
+void UT_PSetNetworkWrapper::t_handleRequestingSelectedNetwork()
+{
+ QT_TRAP_THROWING(m_wrapper->m_privateImpl->
+ HandleRequestingSelectedNetworkL(EFalse));
+ QT_TRAP_THROWING(m_wrapper->m_privateImpl->
+ HandleRequestingSelectedNetworkL(ETrue));
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_handleCallActivated
+ */
+void UT_PSetNetworkWrapper::t_handleCallActivated()
+{
+ QT_TRAP_THROWING(m_wrapper->m_privateImpl->HandleCallActivatedL());
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_handleNetworkErrorFromInfoObserver
+ */
+void UT_PSetNetworkWrapper::t_handleNetworkErrorFromInfoObserver()
+{
+ MPsetNetworkInfoObserver::TServiceRequest request =
+ MPsetNetworkInfoObserver::EServiceRequestNone;
+ QT_TRAP_THROWING(m_wrapper->m_privateImpl->
+ HandleNetworkErrorL(request, KErrNone));
+}
+
+
+/*!
+ UT_PSetNetworkWrapper::t_handleNetworkSystemModeEvents
+ */
+Q_DECLARE_METATYPE(PSetNetworkWrapper::NetworkAccessMode)
+void UT_PSetNetworkWrapper::t_handleNetworkSystemModeEvents()
+{
+ qRegisterMetaType<PSetNetworkWrapper::NetworkAccessMode>
+ ("PSetNetworkWrapper::NetworkAccessMode");
+ QSignalSpy spy(m_wrapper,
+ SIGNAL(networkAccessModeGot(PSetNetworkWrapper::NetworkAccessMode)));
+
+ MPsetNetworkModeObserver::TServiceRequest serviceRequest =
+ MPsetNetworkModeObserver::EServiceRequestGetCurrentNetworkMode;
+ RMmCustomAPI::TNetworkModeCaps modeCaps =
+ RMmCustomAPI::KCapsNetworkModeDual;
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleNetworkSystemModeEventsL(
+ serviceRequest, modeCaps));
+ modeCaps =RMmCustomAPI::KCapsNetworkModeUmts;
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleNetworkSystemModeEventsL(
+ serviceRequest, modeCaps));
+ modeCaps = RMmCustomAPI::KCapsNetworkModeGsm;
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleNetworkSystemModeEventsL(
+ serviceRequest, modeCaps));
+
+ QCOMPARE(spy.count(), 3);
+ const QList<QVariant> &arguments0 = spy.at(0);
+ QVERIFY(PSetNetworkWrapper::AccessModeDual
+ == arguments0.at(0).value<PSetNetworkWrapper::NetworkAccessMode>());
+ const QList<QVariant> &arguments1 = spy.at(1);
+ QVERIFY(PSetNetworkWrapper::AccessModeUmts
+ == arguments1.at(0).value<PSetNetworkWrapper::NetworkAccessMode>());
+ const QList<QVariant> &arguments2 = spy.at(2);
+ QVERIFY(PSetNetworkWrapper::AccessModeGsm
+ == arguments2.at(0).value<PSetNetworkWrapper::NetworkAccessMode>());
+
+ // TODO: test skeleton for switch cases not yet implemented
+ serviceRequest = MPsetNetworkModeObserver::EServiceRequestNone;
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleNetworkSystemModeEventsL(
+ serviceRequest, modeCaps));
+ serviceRequest =
+ MPsetNetworkModeObserver::EServiceRequestSetSelectedNetworkMode;
+ QT_TRAP_THROWING(
+ m_wrapper->m_privateImpl->HandleNetworkSystemModeEventsL(
+ serviceRequest, modeCaps));
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_handleNetworkErrorFromModeObserver
+ */
+void UT_PSetNetworkWrapper::t_handleNetworkErrorFromModeObserver()
+{
+ MPsetNetworkModeObserver::TServiceRequest request =
+ MPsetNetworkModeObserver::EServiceRequestNone;
+ QT_TRAP_THROWING(m_wrapper->m_privateImpl->
+ HandleNetworkErrorL(request, KErrNone));
+}
+
+/*!
+ UT_PSetNetworkWrapper::t_exceptionSafety
+ */
+void UT_PSetNetworkWrapper::t_exceptionSafety()
+{
+ OomTestExecuter::runAllTests(*this, "t_exceptionSafety");
+}
+
+QTEST_MAIN_S60(UT_PSetNetworkWrapper)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,73 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef UT_PSETCALLDIVERTINGWRAPPER_H
+#define UT_PSETCALLDIVERTINGWRAPPER_H
+
+#include <QtTest/QtTest>
+#include <mockservice.h>
+
+class PSetNetworkWrapper;
+class CPsetContainer;
+class CPsetNetwork;
+
+class UT_PSetNetworkWrapper : public QObject, public MockService
+{
+ Q_OBJECT
+
+public:
+ UT_PSetNetworkWrapper();
+ ~UT_PSetNetworkWrapper();
+
+private slots:
+
+ void init();
+ void cleanup();
+
+ void t_getAvailableNetworks();
+ void t_getNetworkSelectionMode();
+ void t_selectNetwork();
+ void t_cancelRequest();
+
+ void t_getNetworkAccessMode();
+ void t_setNetworkAccessMode();
+
+ // private implementation tests
+ // tests for MPsetNetworkInfoObserver functionality
+ void t_handleNetworkInfoReceived();
+ void t_handleCurrentNetworkInfo();
+ void t_handleNetworkChangedWithNetworkStatus();
+ void t_handleNetworkChangedWithPhoneRegistrationStatus();
+ void t_handleSearchingNetworks();
+ void t_handleRequestingSelectedNetwork();
+ void t_handleCallActivated();
+ void t_handleNetworkErrorFromInfoObserver();
+
+ // tests for MPsetNetworkModeObserver functionality
+ void t_handleNetworkSystemModeEvents();
+ void t_handleNetworkErrorFromModeObserver();
+
+ void t_exceptionSafety();
+
+private:
+ PSetNetworkWrapper *m_wrapper;
+ CPsetContainer *m_psetContainerMock;
+ CPsetNetwork *m_psetNetworkMock;
+ CPsetNetwork *m_psetNetworkModeMock;
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetnetworkwrapper/ut_psetnetworkwrapper.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,50 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: Project file for building unit test component
+#
+#
+
+CONFIG += qtestlib release
+TEMPLATE = app
+TARGET =
+DEPENDPATH += . ../../src/
+INCLUDEPATH += . ../common
+DEFINES += BUILD_PSETWRAPPER
+
+QT -= gui
+QT += testlib
+
+symbian: {
+ CONFIG += no_icon
+ INCLUDEPATH += /epoc32/include/mw/QtTest \
+ /epoc32/include/platform/mw \
+ /epoc32/include/mw/qt
+ LIBS += -lmocklib -lsymbianmock -letelmm -letel -lbafl -lcustomapi
+}
+
+# test code
+HEADERS += ut_psetnetworkwrapper.h
+HEADERS += ../common/testutilities.h
+SOURCES += ut_psetnetworkwrapper.cpp
+SOURCES += ../common/testutilities.cpp
+
+# code to be tested
+HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h
+SOURCES += ../../src/psetnetworkwrapper.cpp \
+ ../../src/psetnetworkwrapper_p.cpp \
+ ../../src/psetnetworkinfoconverter.cpp
+
+# mocks needed for testing
+SOURCES += ../mocks/mock_psetcontainer.cpp \
+ ../mocks/mock_psetnetwork.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetwrapper/ut_psetwrapper.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,117 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <QList>
+#include <PsetContainer.h>
+#include "ut_psetwrapper.h"
+#include "psetwrapper.h"
+#include "testutilities.h"
+
+/*!
+ UT_PSetWrapper::UT_PSetWrapper
+ */
+UT_PSetWrapper::UT_PSetWrapper()
+ :
+ m_setWrapper(NULL),
+ m_psetContainerMock(NULL)
+{
+}
+
+/*!
+ UT_PSetWrapper::~UT_PSetWrapper
+ */
+UT_PSetWrapper::~UT_PSetWrapper()
+{
+ delete m_setWrapper;
+ delete m_psetContainerMock;
+}
+
+/*!
+ UT_PSetWrapper::init
+ */
+void UT_PSetWrapper::init()
+{
+ initialize();
+
+ m_setWrapper = new PSetWrapper();
+ m_psetContainerMock = new CPsetContainer();
+}
+
+/*!
+ UT_PSetWrapper::cleanup
+ */
+void UT_PSetWrapper::cleanup()
+{
+ reset();
+
+ delete m_setWrapper;
+ m_setWrapper = NULL;
+ delete m_psetContainerMock;
+ m_psetContainerMock = NULL;
+}
+
+/*!
+ UT_PSetWrapper::t_cliWrapper
+ */
+void UT_PSetWrapper::t_cliWrapper()
+{
+ PSetCliWrapper *wrapper = NULL;
+ wrapper = &m_setWrapper->cliWrapper();
+ QVERIFY(wrapper == &m_setWrapper->cliWrapper());
+}
+
+/*!
+ UT_PSetWrapper::t_callWaitingWrapper
+ */
+void UT_PSetWrapper::t_callWaitingWrapper()
+{
+ PSetCallWaitingWrapper *wrapper = NULL;
+ wrapper = &m_setWrapper->callWaitingWrapper();
+ QVERIFY(wrapper == &m_setWrapper->callWaitingWrapper());
+}
+
+/*!
+ UT_PSetWrapper::t_callDivertingWrapper
+ */
+void UT_PSetWrapper::t_callDivertingWrapper()
+{
+ PSetCallDivertingWrapper *wrapper = NULL;
+ wrapper = &m_setWrapper->callDivertingWrapper();
+ QVERIFY(wrapper == &m_setWrapper->callDivertingWrapper());
+}
+
+/*!
+ UT_PSetWrapper::t_networkWrapper
+ */
+void UT_PSetWrapper::t_networkWrapper()
+{
+ PSetNetworkWrapper *wrapper = NULL;
+ wrapper = &m_setWrapper->networkWrapper();
+ QVERIFY(wrapper == &m_setWrapper->networkWrapper());
+}
+
+/*!
+ UT_PSetWrapper::t_exceptionSafety
+ */
+void UT_PSetWrapper::t_exceptionSafety()
+{
+ cleanup();
+
+ OomTestExecuter::runAllTests(*this, "t_exceptionSafety");
+}
+
+QTEST_MAIN_S60(UT_PSetWrapper)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetwrapper/ut_psetwrapper.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef UT_PSETWRAPPER_H
+#define UT_PSETWRAPPER_H
+
+#include <QtTest/QtTest>
+#include <mockservice.h>
+
+class CPsetContainer;
+class PSetWrapper;
+
+class UT_PSetWrapper : public QObject, public MockService
+{
+ Q_OBJECT
+
+public:
+
+ UT_PSetWrapper();
+ ~UT_PSetWrapper();
+
+private slots:
+
+ void init();
+ void cleanup();
+
+ void t_cliWrapper();
+ void t_callWaitingWrapper();
+ void t_callDivertingWrapper();
+ void t_networkWrapper();
+ void t_exceptionSafety();
+
+private:
+
+ PSetWrapper* m_setWrapper;
+ CPsetContainer *m_psetContainerMock;
+};
+
+#endif // UT_PSETWRAPPER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/cellular/telephonysettings/xqbindings/psetwrapper/tsrc/ut_psetwrapper/ut_psetwrapper.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,57 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: Project file for building unit test component
+#
+#
+
+CONFIG += qtestlib release
+TEMPLATE = app
+TARGET =
+DEPENDPATH += . ../../src/
+INCLUDEPATH += . ../../../ ../common
+DEFINES += BUILD_PSETWRAPPER
+
+MOC_DIR = .
+
+QT -= gui
+QT += testlib
+
+symbian: {
+ CONFIG += no_icon
+ INCLUDEPATH += /epoc32/include/mw/QtTest \
+ /epoc32/include/platform/mw \
+ /epoc32/include/mw/qt
+ LIBS += -lmocklib -lsymbianmock -letelmm -letel -lbafl -lcustomapi
+}
+
+# test code
+HEADERS += ut_psetwrapper.h
+HEADERS += ../common/testutilities.h
+SOURCES += ut_psetwrapper.cpp
+SOURCES += ../common/testutilities.cpp
+
+# code to be tested
+HEADERS += ../../../../../../phonesrv_plat/phone_settings_api/inc/psetwrapper.h \
+ ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcalldivertingwrapper.h \
+ ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcallwaitingwrapper.h \
+ ../../../../../../phonesrv_plat/phone_settings_api/inc/psetcliwrapper.h \
+ ../../../../../../phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h
+SOURCES += ../../src/psetwrapper.cpp
+
+# mocks needed for testing
+SOURCES += ../mocks/mock_psetcontainer.cpp \
+ ../mocks/mock_psetnetworkwrapper.cpp \
+ ../mocks/mock_psetcliwrapper.cpp \
+ ../mocks/mock_psetcallwaitingwrapper.cpp \
+ ../mocks/mock_psetcalldivertingwrapper.cpp
--- a/convergedcallengine/callprovider/group/callprovider.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/callprovider/group/callprovider.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -31,7 +31,7 @@
SOURCE cccpcallparameters.cpp
USERINCLUDE ../inc
-SYSTEMINCLUDE ../../../inc
+SYSTEMINCLUDE ../../../inc
MW_LAYER_SYSTEMINCLUDE
LIBRARY euser.lib
--- a/convergedcallengine/cce/group/cce.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/group/cce.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -42,10 +42,10 @@
SOURCE ccceobserverasynchroniser.cpp
SOURCE cccespsettingshandler.cpp
SOURCE cccecallparameters.cpp
-SOURCE cccecallinfomediator.cpp
-SOURCE cccecallinfomediatorupdater.cpp
+SOURCE cccecallinfomediator.cpp
+SOURCE cccecallinfomediatorupdater.cpp
SOURCE cccecallinfoconverter.cpp
-SOURCE tccecallindex.cpp
+SOURCE tccecallindex.cpp
USERINCLUDE ../inc
USERINCLUDE ../api
--- a/convergedcallengine/cce/inc/cccecall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/inc/cccecall.h Fri Mar 19 09:40:14 2010 +0200
@@ -98,13 +98,13 @@
class TStateTransition
{
public:
- TStateTransition()
- {
- iState = CCPCall::EStateIdle;
- iInband = EFalse;
- }
+ TStateTransition()
+ {
+ iState = CCPCall::EStateIdle;
+ iInband = EFalse;
+ }
- CCPCall::TCallState iState;
+ CCPCall::TCallState iState;
TBool iInband;
};
public:
@@ -262,7 +262,7 @@
TInt Release();
/** @see MCCECall::ReplaceActive */
- TInt ReplaceActive();
+ TInt ReplaceActive();
/** @see MCCECall::Hold */
TInt Hold();
--- a/convergedcallengine/cce/inc/cccecallcontainer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/inc/cccecallcontainer.h Fri Mar 19 09:40:14 2010 +0200
@@ -302,7 +302,7 @@
* @param aLifeTimeInfo Life time info.
* @return Get succeeded ot not.
*/
- TBool GetLifeTime( TDes8& aLifeTimeInfo );
+ TBool GetLifeTime( TDes8& aLifeTimeInfo );
/**
* Get CS specific misc info from CS plugin.
@@ -310,17 +310,17 @@
* @param aCSInfo CS info.
* @return Get succeeded ot not.
*/
- TBool GetCSInfo( CSInfo& aCSInfo );
-
- /**
+ TBool GetCSInfo( CSInfo& aCSInfo );
+
+ /**
* Stop airtime duration timer
*
* @since S60 v3.2
* @param aCall CCCECall is used for checking call type
*/
void AirTimeDurationStop( CCCECall* aCall ) const;
-
- /**
+
+ /**
* Switch Air Duration timer, is needed for handover
*
* Stop current timer and starts another one. New timer is initialized
@@ -331,7 +331,7 @@
* timer switching
*/
void AirTimeDurationSwap(const CCPCall::TCallType aNewCallType);
-
+
/**
* Start airtime duration timer
*
--- a/convergedcallengine/cce/inc/cccecallinfomediatorupdater.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/inc/cccecallinfomediatorupdater.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CCCECALLINFOMEDIATORUPDATER_H
#include <e32base.h>
-#include <MediatorCommandResponder.h>
+#include <MediatorCommandResponder.h>
class MCCECallInfoMediator;
class MCCECallArray;
--- a/convergedcallengine/cce/inc/ccceconferencecall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/inc/ccceconferencecall.h Fri Mar 19 09:40:14 2010 +0200
@@ -112,18 +112,18 @@
/** @see MCCEConferenceCall::HangUp */
TInt HangUp();
- /** @see MCCECall::CallDuration */
- TTimeIntervalSeconds CallDuration() const;
+ /** @see MCCECall::CallDuration */
+ TTimeIntervalSeconds CallDuration() const;
/** @see MCCECall::Parameters */
- const CCCPCallParameters& Parameters() const;
+ const CCCPCallParameters& Parameters() const;
private:
// from base class MCCEConferenceCall
- /** @see MCCEConferenceCall::Release */
+ /** @see MCCEConferenceCall::Release */
TInt Release();
/** @see MCCEConferenceCall::ServiceId */
--- a/convergedcallengine/cce/inc/cccedurationtimer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/inc/cccedurationtimer.h Fri Mar 19 09:40:14 2010 +0200
@@ -63,7 +63,7 @@
*
* @since S60 v3.2
*/
- void SetConferenceObserver( MCCEConferenceCallObserver* aObserver );
+ void SetConferenceObserver( MCCEConferenceCallObserver* aObserver );
/**
* Start timer.
@@ -78,7 +78,7 @@
* @since S60 v3.2
*/
void Start(TInt aBeatsOffset);
-
+
/**
* Restart air duration timer from the given value
*
@@ -86,7 +86,7 @@
* @param aBeatsOffset innitial timer value
*/
void RestartAirTimeDuration(TInt aBeatsOffset);
-
+
/**
* Start timer
*
@@ -158,11 +158,11 @@
* If this is NULL, timer is used to AirTime duration.
*/
MCCECallObserver* iObserver;
-
+
/**
* Conference call duration observer.
*/
- MCCEConferenceCallObserver* iConferenceCallObserver;
+ MCCEConferenceCallObserver* iConferenceCallObserver;
/**
* Timer
--- a/convergedcallengine/cce/inc/ccceemergencycall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/inc/ccceemergencycall.h Fri Mar 19 09:40:14 2010 +0200
@@ -165,13 +165,13 @@
class TStateTransition
{
public:
- TStateTransition()
- {
- iState = CCPCall::EStateIdle;
- iInband = EFalse;
- }
-
- CCPCall::TCallState iState;
+ TStateTransition()
+ {
+ iState = CCPCall::EStateIdle;
+ iInband = EFalse;
+ }
+
+ CCPCall::TCallState iState;
TBool iInband;
};
/**
--- a/convergedcallengine/cce/inc/ccceextension.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/inc/ccceextension.h Fri Mar 19 09:40:14 2010 +0200
@@ -70,42 +70,42 @@
/** @see MCCEExtensionInterface::RequestCommand */
TInt RequestCommand( TUint32 aServiceID,
- TInt aRequestId,
+ TInt aRequestId,
TDesC8& aData );
/** @see MCCEExtensionInterface::CancelRequest */
TInt CancelRequest( TUint32 aServiceID,
- TInt aRequestId );
+ TInt aRequestId );
- //from MCCPExtensionObserver
+ //from MCCPExtensionObserver
/** @see MCCEExtensionObserver::HandleExtensionEvents */
void HandleExtensionEvents( TUint32 aServiceId,
- TInt aEvent,
- TInt aStatus );
+ TInt aEvent,
+ TInt aStatus );
private:
void ConstructL();
- /**
- *
- */
+ /**
+ *
+ */
CCCEExtension( CCCEPluginManager& aPluginManager );
- /**
- * Get plug-in pointer that relates to service-id.
- */
- CConvergedCallProvider* GetExtIfPlugin( TUint32 aServiceid );
+ /**
+ * Get plug-in pointer that relates to service-id.
+ */
+ CConvergedCallProvider* GetExtIfPlugin( TUint32 aServiceid );
- /**
- * Plug-in manager.
- */
+ /**
+ * Plug-in manager.
+ */
CCCEPluginManager& iPluginManager;
- /**
- * Extension observer
- */
+ /**
+ * Extension observer
+ */
MCCEExtensionObserver* iMCCEExtensionObserver;
};
--- a/convergedcallengine/cce/inc/ccceobserverasynchroniser.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/inc/ccceobserverasynchroniser.h Fri Mar 19 09:40:14 2010 +0200
@@ -104,7 +104,7 @@
/**
* From MCCEObserver
*/
- void DataPortName( TName& aPortName );
+ void DataPortName( TName& aPortName );
/**
* From MCCEObserver
@@ -114,30 +114,30 @@
/**
* From MCCESsObserver
*/
- void BarringEventOccurred( const MCCESsObserver::TCCESsBarringEvent aBarringEvent );
-
+ void BarringEventOccurred( const MCCESsObserver::TCCESsBarringEvent aBarringEvent );
+
/**
* From MCCESsObserver
*/
- void CLIEventOccurred( const MCCESsObserver::TCCESsCLIEvent aCallLineEvent );
-
+ void CLIEventOccurred( const MCCESsObserver::TCCESsCLIEvent aCallLineEvent );
+
/**
* From MCCESsObserver
*/
- void CallForwardEventOccurred(
- const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent,
- const TDesC& aRemoteAddress );
+ void CallForwardEventOccurred(
+ const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent,
+ const TDesC& aRemoteAddress );
/**
* From MCCESsObserver
*/
- void CallCugEventOccurred( const MCCESsObserver::TCCESsCugEvent aCugEvent );
+ void CallCugEventOccurred( const MCCESsObserver::TCCESsCugEvent aCugEvent );
/**
* From MCCESsObserver
*/
- void NotifyCurrentActiveALSLine( TInt aLine );
+ void NotifyCurrentActiveALSLine( TInt aLine );
/**
* From MCCEConferenceCallObserver
@@ -164,22 +164,22 @@
*/
void ErrorOccurred( TCCPConferenceCallError aError );
- /**
+ /**
* From MCCEConferenceCallObserver
*/
- void CallDurationChanged( const TTimeIntervalSeconds aDuration );
+ void CallDurationChanged( const TTimeIntervalSeconds aDuration );
/**
* From MCCEDtmfObserver
- */
- void HandleDTMFEvent( const MCCEDtmfObserver::TCCEDtmfEvent aEvent,
+ */
+ void HandleDTMFEvent( const MCCEDtmfObserver::TCCEDtmfEvent aEvent,
const TInt aError,
const TChar aTone );
/**
* From MCCEExtensionObserver
*/
void HandleExtensionEvents( TUint32 aServiceId,
- TInt aEvent,
+ TInt aEvent,
TInt aStatus );
private:
--- a/convergedcallengine/cce/inc/ccceplugin.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/inc/ccceplugin.h Fri Mar 19 09:40:14 2010 +0200
@@ -154,11 +154,11 @@
void MoCallCreated( MCCPCall& aCall );
/** @see MCCPCSObserver::DataPortName */
- void DataPortName( TName& aPortName );
+ void DataPortName( TName& aPortName );
- /** @see MCCPCSObserver::ConferenceCallCreated */
- void ConferenceCallCreated( MCCPConferenceCall& aConferenceCall );
-
+ /** @see MCCPCSObserver::ConferenceCallCreated */
+ void ConferenceCallCreated( MCCPConferenceCall& aConferenceCall );
+
// from base class MCCPObserver
/** @see MCCPObserver::ErrorOccurred */
@@ -176,20 +176,20 @@
// from base class MCCPObserver
/** @see MCCPSsObserver::BarringEventOccurred */
- void BarringEventOccurred( const MCCPSsObserver::TCCPSsBarringEvent aBarringEvent );
-
+ void BarringEventOccurred( const MCCPSsObserver::TCCPSsBarringEvent aBarringEvent );
+
/** @see MCCPSsObserver::CLIEventOccurred */
- void CLIEventOccurred( const MCCPSsObserver::TCCPSsCLIEvent aCallLineEvent );
-
+ void CLIEventOccurred( const MCCPSsObserver::TCCPSsCLIEvent aCallLineEvent );
+
/** @see MCCPSsObserver::CallForwardEventOccurred */
- void CallForwardEventOccurred( const MCCPSsObserver::TCCPSsCallForwardEvent aCallForwardEvent,
+ void CallForwardEventOccurred( const MCCPSsObserver::TCCPSsCallForwardEvent aCallForwardEvent,
const TDesC& aRemoteAddress );
/** @see MCCPSsObserver::CallCugEventOccurred */
- void CallCugEventOccurred( const MCCPSsObserver::TCCPSsCugEvent aCugEvent );
-
- /** @see MCCPSsObserver::NotifyCurrentActiveALSLine */
- void NotifyCurrentActiveALSLine( TInt aLine );
+ void CallCugEventOccurred( const MCCPSsObserver::TCCPSsCugEvent aCugEvent );
+
+ /** @see MCCPSsObserver::NotifyCurrentActiveALSLine */
+ void NotifyCurrentActiveALSLine( TInt aLine );
private:
/** Constructor */
@@ -233,7 +233,7 @@
* Reference to dead observer
* This will be informed when plugin crashes
*/
- MCCPPluginDeathObserver& iDeathObserver;
+ MCCPPluginDeathObserver& iDeathObserver;
/**
* Use handle to ecom plugin.
--- a/convergedcallengine/cce/inc/cccepluginmanager.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/inc/cccepluginmanager.h Fri Mar 19 09:40:14 2010 +0200
@@ -56,9 +56,9 @@
* @param aCallContainer Reference to call container
* @param aTransferController Reference to transfer controller
*/
- static CCCEPluginManager* NewL(
- CCCECallContainer& aCallContainer,
- CCCETransferController& aTransferController );
+ static CCCEPluginManager* NewL(
+ CCCECallContainer& aCallContainer,
+ CCCETransferController& aTransferController );
/**
* Destructor.
@@ -165,9 +165,9 @@
// from base class MCCPPluginDeathObserver
/** @see MCCPPluginDeathObserver::CCPPluginDiedEvent */
- void CCPPluginDiedEvent(TUid aPluginId, TInt aDeathType, TInt aReason);
-
- /** @see MCCPPluginDeathObserver::CCPPluginInitialisationFailed */
+ void CCPPluginDiedEvent(TUid aPluginId, TInt aDeathType, TInt aReason);
+
+ /** @see MCCPPluginDeathObserver::CCPPluginInitialisationFailed */
void CCPPluginInitialisationFailed(TUid aPluginUid, TInt aError);
// from base class CActive
@@ -177,14 +177,14 @@
*
* @since S60 v3.2
*/
- void RunL();
+ void RunL();
/**
* Cancels incoming call monitor
*
* @since S60 v3.2
*/
- void DoCancel();
+ void DoCancel();
private:
@@ -235,12 +235,12 @@
private:
/** Constructor */
- CCCEPluginManager(
- CCCECallContainer& aCallContainer,
- CCCETransferController& aTransferController );
+ CCCEPluginManager(
+ CCCECallContainer& aCallContainer,
+ CCCETransferController& aTransferController );
/** Leaving stuff in constructor */
- void ConstructL();
+ void ConstructL();
private:
--- a/convergedcallengine/cce/inc/cccetransfercontroller.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/inc/cccetransfercontroller.h Fri Mar 19 09:40:14 2010 +0200
@@ -72,7 +72,7 @@
* An error has occurred concerning a specific call.
* @since S60 3.2
* @param aError Error code.
- * @param aCall Current MCCPCall.
+ * @param aCall Current MCCPCall.
* @return none
*/
void ErrorOccurred( const TCCPError aError, MCCPCall* aCall );
@@ -90,7 +90,7 @@
* The state of the call has changed.
* @since S60 3.2
* @param aState Call state.
- * @param aCall Current MCCPCall.
+ * @param aCall Current MCCPCall.
* @return none
*/
void CallStateChangedWithInband( TCCPCallState aState, MCCPCall* aCall );
@@ -99,7 +99,7 @@
* An event has occurred concerning a specific call.
* @since S60 3.2
* @param aEvent Occurred event.
- * @param aCall Current MCCPCall.
+ * @param aCall Current MCCPCall.
* @return none
*/
void CallEventOccurred( const MCCPCallObserver::TCCPCallEvent aEvent,
@@ -111,7 +111,7 @@
* Notifies changed call capabilities
* @since S60 3.2
* @param aCaps New capabilities for the call
- * @param aCall Current MCCPCall.
+ * @param aCall Current MCCPCall.
* @return none
*/
void CallCapsChanged( const TUint32 aCapsFlags, MCCPCall* aCall );
--- a/convergedcallengine/cce/src/ccce.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/src/ccce.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -247,7 +247,7 @@
// -----------------------------------------------------------------------------
//
EXPORT_C TBool CCCE::GetLifeTime( TDes8& aLifeTimeInfo )
- {
+ {
CCELOGSTRING("CCCE::GetLifeTime()");
return iCallContainer->GetLifeTime(aLifeTimeInfo);
}
@@ -257,9 +257,9 @@
// -----------------------------------------------------------------------------
//
EXPORT_C TBool CCCE::GetCSInfo( CSInfo& aCSInfo )
- {
+ {
CCELOGSTRING("CCCE::GetCSInfo()");
return iCallContainer->GetCSInfo(aCSInfo);
- }
+ }
--- a/convergedcallengine/cce/src/cccecall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/src/cccecall.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -86,7 +86,7 @@
delete iCCEDurationTimer;
delete iObserver;
delete iCallParameters;
- FeatureManager::UnInitializeLib();
+ FeatureManager::UnInitializeLib();
}
// ---------------------------------------------------------------------------
@@ -2117,7 +2117,7 @@
break;
/** Remote party info target meaning has changed */
case ECCPNotifyRemotePartyInfoChange:
- {
+ {
//Ho occurred, call type has changed
if ( FeatureManager::FeatureSupported( KFeatureIdFfVoiceCallContinuity ) )
{
@@ -2130,8 +2130,8 @@
iCallContainer.AirTimeDurationSwap(
iCall->Parameters().CallType() );
iObserver->CallEventOccurred( MCCECallObserver::ECCENotifyRemotePartyInfoChange );
- }
- break;
+ }
+ break;
/** Call secure status cannot be determined */
case ECCPSecureNotSpecified:
iObserver->CallEventOccurred( MCCECallObserver::ECCESecureNotSpecified );
--- a/convergedcallengine/cce/src/cccecallcontainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/src/cccecallcontainer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -61,7 +61,7 @@
//
void CCCECallContainer::ConstructL()
{
- FeatureManager::InitializeLibL();
+ FeatureManager::InitializeLibL();
iCallStateMediator = CCCECallInfoMediator::NewL( *this );
CreateCallDataArraysL();
@@ -170,7 +170,7 @@
//
void CCCECallContainer::AirTimeDurationSwap(
const CCPCall::TCallType aNewCallType)
- {
+ {
CCELOGSTRING("CCCECallContainer::AirTimeDurationSwap(): IN");
CCCECall* call = NULL;
@@ -191,29 +191,29 @@
}
if( 1 == calls )
- {
- // After handover we will have only one active call
- // If we have more or less, timer swapping will not happend
- if (aNewCallType == CCPCall::ECallTypePS )
- {
- CCELOGSTRING2("CCCECallContainer::AirTimeDurationSwap(): CS Stops, PS restarts from %d",
- iCSDuration->NumberOfBeats() );
- iCSDuration->Stop();
- iPSDuration->RestartAirTimeDuration(iCSDuration->NumberOfBeats());
- iCSDuration->Reset();
- }
- else
- {
- CCELOGSTRING2("CCCECallContainer::AirTimeDurationSwap(): PS Stops, CS restarts from %d",
- iPSDuration->NumberOfBeats() );
- iPSDuration->Stop();
- iCSDuration->RestartAirTimeDuration(iPSDuration->NumberOfBeats());
- iPSDuration->Reset();
- }
- }
+ {
+ // After handover we will have only one active call
+ // If we have more or less, timer swapping will not happend
+ if (aNewCallType == CCPCall::ECallTypePS )
+ {
+ CCELOGSTRING2("CCCECallContainer::AirTimeDurationSwap(): CS Stops, PS restarts from %d",
+ iCSDuration->NumberOfBeats() );
+ iCSDuration->Stop();
+ iPSDuration->RestartAirTimeDuration(iCSDuration->NumberOfBeats());
+ iCSDuration->Reset();
+ }
+ else
+ {
+ CCELOGSTRING2("CCCECallContainer::AirTimeDurationSwap(): PS Stops, CS restarts from %d",
+ iPSDuration->NumberOfBeats() );
+ iPSDuration->Stop();
+ iCSDuration->RestartAirTimeDuration(iPSDuration->NumberOfBeats());
+ iPSDuration->Reset();
+ }
+ }
CCELOGSTRING("CCCECallContainer::AirTimeDurationSwap(): OUT");
- }
-
+ }
+
// ---------------------------------------------------------------------------
// AirTimeDurationStop()
// ---------------------------------------------------------------------------
@@ -294,7 +294,7 @@
call = GetCall( i );
if ( call->State() == CCPCall::EStateConnected ||
call->State() == CCPCall::EStateHold )
- {
+ {
if ( IsCsPlugin( call, EFalse ) )
{
csCalls++;
@@ -985,8 +985,8 @@
// Do nothing when there is only cscalls
if ( IsCsPlugin( aCall, ETrue ) )
- {
-
+ {
+
break;
}
@@ -1288,24 +1288,24 @@
// -----------------------------------------------------------------------------
//
TBool CCCECallContainer::GetLifeTime( TDes8& aLifeTimeInfo )
- {
+ {
CCELOGSTRING("CCCE::GetLifeTime()");
- CConvergedCallProvider* plugin = NULL;
-
+ CConvergedCallProvider* plugin = NULL;
+
TRAP_IGNORE( plugin = iPluginManager->GetPluginL(KCSServiceId));
if( plugin )
- {
- plugin->GetLifeTime(aLifeTimeInfo);
- }
- else
- {
- CCELOGSTRING("CCCE::GetLifeTime() - CS plugin not found!");
- return EFalse;
- }
+ {
+ plugin->GetLifeTime(aLifeTimeInfo);
+ }
+ else
+ {
+ CCELOGSTRING("CCCE::GetLifeTime() - CS plugin not found!");
+ return EFalse;
+ }
- return ETrue;
+ return ETrue;
}
// -----------------------------------------------------------------------------
@@ -1313,26 +1313,26 @@
// -----------------------------------------------------------------------------
//
TBool CCCECallContainer::GetCSInfo( CSInfo& aCSInfo )
- {
+ {
CCELOGSTRING("CCCE::GetCSInfo()");
- CConvergedCallProvider* plugin = NULL;
-
- TRAP_IGNORE( plugin = iPluginManager->GetPluginL(KCSServiceId));
+ CConvergedCallProvider* plugin = NULL;
+
+ TRAP_IGNORE( plugin = iPluginManager->GetPluginL(KCSServiceId));
if( plugin )
- {
- plugin->GetCSInfo(aCSInfo);
- }
- else
- {
- CCELOGSTRING("CCCE::GetCSInfo() - CS plugin not found!");
- return EFalse;
- }
+ {
+ plugin->GetCSInfo(aCSInfo);
+ }
+ else
+ {
+ CCELOGSTRING("CCCE::GetCSInfo() - CS plugin not found!");
+ return EFalse;
+ }
- return ETrue;
- }
+ return ETrue;
+ }
// ---------------------------------------------------------------------------
// CCCECallContainer::IsCsPlugin
--- a/convergedcallengine/cce/src/cccecallinfomediator.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/src/cccecallinfomediator.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,10 +18,10 @@
#include "cccecallinfomediator.h"
-#include <MediatorDomainUIDs.h>
+#include <MediatorDomainUIDs.h>
#include <callinformation.h>
-#include <MediatorCommandResponder.h>
-#include <MediatorEventProvider.h>
+#include <MediatorCommandResponder.h>
+#include <MediatorEventProvider.h>
#include "cccecallinfomediatorupdater.h"
#include "cccecallinfoconverter.h"
--- a/convergedcallengine/cce/src/cccecallinfomediatorupdater.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/src/cccecallinfomediatorupdater.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
#include "cccecallinfomediatorupdater.h"
#include <callinformation.h>
-#include <MediatorDomainUIDs.h>
+#include <MediatorDomainUIDs.h>
#include "mccecallinfomediator.h"
#include "cccecall.h"
--- a/convergedcallengine/cce/src/cccecallparameters.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/src/cccecallparameters.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -90,18 +90,18 @@
// -----------------------------------------------------------------------------
//
void CCCECallParameters::SetLineType(CCCECallParameters::TCCELineType aLineType)
- {
- iLineType = aLineType;
- }
+ {
+ iLineType = aLineType;
+ }
// -----------------------------------------------------------------------------
// Gets the line type of the call.
// -----------------------------------------------------------------------------
//
CCCECallParameters::TCCELineType CCCECallParameters::LineType() const
- {
- return iLineType;
- }
+ {
+ return iLineType;
+ }
// -----------------------------------------------------------------------------
// Sets the service id identifying the service provider of the call.
@@ -109,71 +109,71 @@
//
void CCCECallParameters::SetUUSId(TBuf<KCCPUUSIdSize> aUUSId)
{
- iUUSId = aUUSId;
- }
+ iUUSId = aUUSId;
+ }
// -----------------------------------------------------------------------------
// Gets the UUS id of the call.
// -----------------------------------------------------------------------------
//
TBuf<KCCPUUSIdSize> CCCECallParameters::UUSId() const
- {
- return iUUSId;
- }
+ {
+ return iUUSId;
+ }
// -----------------------------------------------------------------------------
// Sets the bearer of the call.
// -----------------------------------------------------------------------------
//
void CCCECallParameters::SetBearer(TBuf8<KCCEBearerMaxSize> aBearer)
- {
- iBearer = aBearer;
- }
+ {
+ iBearer = aBearer;
+ }
// -----------------------------------------------------------------------------
// Gets the bearer of the call.
// -----------------------------------------------------------------------------
//
TBuf8<KCCEBearerMaxSize> CCCECallParameters::Bearer() const
- {
- return iBearer;
- }
+ {
+ return iBearer;
+ }
// -----------------------------------------------------------------------------
// Sets the sub address of the dialled phone number.
// -----------------------------------------------------------------------------
//
void CCCECallParameters::SetSubAddress(TBuf<KCCESubAddressMaxSize> aSubAddress)
- {
- iSubAddress = aSubAddress;
- }
+ {
+ iSubAddress = aSubAddress;
+ }
// -----------------------------------------------------------------------------
// Gets the sub address of the dialled phone number.
// -----------------------------------------------------------------------------
//
TBuf<KCCESubAddressMaxSize> CCCECallParameters::SubAddress() const
- {
- return iSubAddress;
- }
+ {
+ return iSubAddress;
+ }
// -----------------------------------------------------------------------------
// Sets the origin of the call.
// -----------------------------------------------------------------------------
//
void CCCECallParameters::SetOrigin(CCCECallParameters::TCCECallOrigin aCallOrigin)
- {
- iOrigin = aCallOrigin;
- }
+ {
+ iOrigin = aCallOrigin;
+ }
// -----------------------------------------------------------------------------
// Gets the origin of the call.
// -----------------------------------------------------------------------------
//
CCCECallParameters::TCCECallOrigin CCCECallParameters::Origin() const
- {
- return iOrigin;
- }
+ {
+ return iOrigin;
+ }
--- a/convergedcallengine/cce/src/ccceconferencecall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/src/ccceconferencecall.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -194,7 +194,7 @@
iConferenceCall = iPluginManager.GetPluginL(
call->ImplementationUid() )->NewConferenceL( ServiceId(), *this );
-
+
if(iConferenceCall)
{
iConferenceCall->AddCallL( &call->GetCCPCall() );
@@ -631,8 +631,8 @@
// ---------------------------------------------------------------------------
//
TTimeIntervalSeconds CCCEConferenceCall::CallDuration() const
- {
+ {
return iCCEDurationTimer->NumberOfBeats();
- }
+ }
// End of file
--- a/convergedcallengine/cce/src/cccedtmf.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/src/cccedtmf.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -70,9 +70,9 @@
{
CCELOGSTRING("CCCEDtmf::~CCCEDtmf");
- while( iObservers.Count() )
- {
- CCELOGSTRING("CCCEDtmf::~CCCEDtmf: There are dtmf observers in the array. Should be removed before dtor!");
+ while( iObservers.Count() )
+ {
+ CCELOGSTRING("CCCEDtmf::~CCCEDtmf: There are dtmf observers in the array. Should be removed before dtor!");
iObservers.Remove ( 0 );
iObservers.Compress();
}
@@ -248,7 +248,7 @@
else
{
// already added, ignore
- CCELOGSTRING("CCCEDtmf::AddObserverL. Observer to be added already existed. Operation ignored!");
+ CCELOGSTRING("CCCEDtmf::AddObserverL. Observer to be added already existed. Operation ignored!");
}
}
@@ -259,17 +259,17 @@
TInt CCCEDtmf::RemoveObserver( const MCCEDtmfObserver& aObserver )
{
CCELOGSTRING("CCCEDtmf::RemoveObserver");
- TInt index = iObservers.Find( &aObserver );
+ TInt index = iObservers.Find( &aObserver );
if( index!=KErrNotFound )
{
iObservers.Remove ( index );
iObservers.Compress();
}
- else
- {
- return KErrNotFound;
- }
+ else
+ {
+ return KErrNotFound;
+ }
return KErrNone;
}
@@ -289,11 +289,11 @@
MCCEDtmfObserver::TCCEDtmfEvent event = (MCCEDtmfObserver::TCCEDtmfEvent)(aEvent);
- for( TInt i=0; i<iObservers.Count(); i++ )
- {
- // notify all observers
- const_cast<MCCEDtmfObserver*>(iObservers[i])->HandleDTMFEvent( event,
- aError,
- aTone );
+ for( TInt i=0; i<iObservers.Count(); i++ )
+ {
+ // notify all observers
+ const_cast<MCCEDtmfObserver*>(iObservers[i])->HandleDTMFEvent( event,
+ aError,
+ aTone );
}
}
--- a/convergedcallengine/cce/src/cccedurationtimer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/src/cccedurationtimer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -145,7 +145,7 @@
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
-//
+//
void CCCEDurationTimer::RestartAirTimeDuration(TInt aBeatsOffset)
{
//Check if active
@@ -161,7 +161,7 @@
iAirTimeDuration = ETrue;
}
}
-
+
// -----------------------------------------------------------------------------
// CCCEDurationTimer::StartAirTimeDuration
// if timer is not already active
@@ -199,7 +199,7 @@
//
TDateTime CCCEDurationTimer::StartTime()
{
- return iStartTime.DateTime();
+ return iStartTime.DateTime();
}
// -----------------------------------------------------------------------------
--- a/convergedcallengine/cce/src/ccceextension.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/src/ccceextension.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -90,11 +90,11 @@
// given is used.
if( !iMCCEExtensionObserver )
- {
- return KErrNotFound;
- }
-
- iMCCEExtensionObserver = NULL;
+ {
+ return KErrNotFound;
+ }
+
+ iMCCEExtensionObserver = NULL;
return KErrNone;
}
@@ -103,27 +103,27 @@
// -----------------------------------------------------------------------------
//
TInt CCCEExtension::RequestCommand( TUint32 aServiceId,
- TInt aRequestId,
- TDesC8& aData )
+ TInt aRequestId,
+ TDesC8& aData )
{
CCELOGSTRING3("CCCEExtension::RequestCommand(): Service id=%d Request id=%d", aServiceId, aRequestId );
- CConvergedCallProvider* plugin = GetExtIfPlugin(aServiceId);
+ CConvergedCallProvider* plugin = GetExtIfPlugin(aServiceId);
- if( !plugin )
- {
- CCELOGSTRING("CCCEExtension::RequestCommand(): Plug-in for service-id was not found. Returning KErrNotFound" );
- return KErrNotFound;
- }
+ if( !plugin )
+ {
+ CCELOGSTRING("CCCEExtension::RequestCommand(): Plug-in for service-id was not found. Returning KErrNotFound" );
+ return KErrNotFound;
+ }
MCCPExtensionProvider* extif = NULL;
- TRAPD( err, extif = plugin->ExtensionProviderL(*this) );
+ TRAPD( err, extif = plugin->ExtensionProviderL(*this) );
- if( err!=KErrNone )
- {
- CCELOGSTRING2("CCCEExtension::RequestCommand(): Plug-in was found, but extension interface get failed with error=%d", err );
- return err;
- }
+ if( err!=KErrNone )
+ {
+ CCELOGSTRING2("CCCEExtension::RequestCommand(): Plug-in was found, but extension interface get failed with error=%d", err );
+ return err;
+ }
if( extif )
{
@@ -131,7 +131,7 @@
}
else
{
- CCELOGSTRING("CCCEExtension::RequestCommand() Plug-in extension interface was found, but extensions are not supported. Returning KErrNotSupported" );
+ CCELOGSTRING("CCCEExtension::RequestCommand() Plug-in extension interface was found, but extensions are not supported. Returning KErrNotSupported" );
return KErrNotSupported;
}
@@ -143,34 +143,34 @@
// -----------------------------------------------------------------------------
//
TInt CCCEExtension::CancelRequest( TUint32 aServiceId,
- TInt aRequestId )
+ TInt aRequestId )
{
CCELOGSTRING3("CCCEExtension::CancelRequest(): Service id=%d Request id=%d", aServiceId, aRequestId );
- CConvergedCallProvider* plugin = GetExtIfPlugin(aServiceId);
+ CConvergedCallProvider* plugin = GetExtIfPlugin(aServiceId);
- if( !plugin )
- {
- CCELOGSTRING("CCCEExtension::CancelRequest(): Plug-in for service-id was not found. Returning KErrNotFound" );
- return KErrNotFound;
- }
+ if( !plugin )
+ {
+ CCELOGSTRING("CCCEExtension::CancelRequest(): Plug-in for service-id was not found. Returning KErrNotFound" );
+ return KErrNotFound;
+ }
MCCPExtensionProvider* extif = NULL;
- TRAPD( err, extif = plugin->ExtensionProviderL(*this) );
+ TRAPD( err, extif = plugin->ExtensionProviderL(*this) );
- if( err!=KErrNone )
- {
- CCELOGSTRING2("CCCEExtension::CancelRequest(): Plug-in was found, but extension interface get failed with error=%d", err );
- return err;
- }
-
+ if( err!=KErrNone )
+ {
+ CCELOGSTRING2("CCCEExtension::CancelRequest(): Plug-in was found, but extension interface get failed with error=%d", err );
+ return err;
+ }
+
if( extif )
{
extif->CancelRequest(aRequestId);
}
else
{
- CCELOGSTRING("CCCEExtension::CancelRequest() Plug-in extension interface was found, but extensions are not supported. Returning KErrNotSupported" );
+ CCELOGSTRING("CCCEExtension::CancelRequest() Plug-in extension interface was found, but extensions are not supported. Returning KErrNotSupported" );
return KErrNotSupported;
}
@@ -182,20 +182,20 @@
// -----------------------------------------------------------------------------
//
void CCCEExtension::HandleExtensionEvents( TUint32 aServiceId,
- TInt aEvent,
+ TInt aEvent,
TInt aStatus )
{
CCELOGSTRING3("CCCEExtension::HandleExtensionEvents(): Service id=%d Event=%d", aServiceId, aEvent );
CCELOGSTRING2("CCCEExtension::HandleExtensionEvents(): Status=%d", aStatus );
if( iMCCEExtensionObserver )
- {
- iMCCEExtensionObserver->HandleExtensionEvents(aServiceId,aEvent,aStatus);
- }
- else
- {
- CCELOGSTRING("CCCEExtension::HandleExtensionEvents(): No observer was set, ignoring no event was notified!" );
- }
+ {
+ iMCCEExtensionObserver->HandleExtensionEvents(aServiceId,aEvent,aStatus);
+ }
+ else
+ {
+ CCELOGSTRING("CCCEExtension::HandleExtensionEvents(): No observer was set, ignoring no event was notified!" );
+ }
}
// -----------------------------------------------------------------------------
@@ -208,7 +208,7 @@
TRAP_IGNORE( provider = iPluginManager.GetPluginL( aServiceId ) );
- return provider;
+ return provider;
}
--- a/convergedcallengine/cce/src/ccceobserverasynchroniser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/src/ccceobserverasynchroniser.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -171,7 +171,7 @@
CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: EDataPortName");
if (iCCEObserver)
{
- iCCEObserver->DataPortName( iEvents[0].iTName );
+ iCCEObserver->DataPortName( iEvents[0].iTName );
}
break;
}
@@ -213,14 +213,14 @@
if (iCCESsObserver)
{
if( iEvents[0].iDescriptor )
- {
- iCCESsObserver->CallForwardEventOccurred(
- (MCCESsObserver::TCCESsCallForwardEvent)iEvents[0].iInt1, *iEvents[0].iDescriptor );
+ {
+ iCCESsObserver->CallForwardEventOccurred(
+ (MCCESsObserver::TCCESsCallForwardEvent)iEvents[0].iInt1, *iEvents[0].iDescriptor );
}
else
- {
- CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: ECallForwardEventOccurred, descr is NULL!");
- }
+ {
+ CCELOGSTRING( "CCCEObserverAsynchroniser::RunL() Event: ECallForwardEventOccurred, descr is NULL!");
+ }
}
break;
}
@@ -373,13 +373,13 @@
// MCCEObserver DataPortName
// -----------------------------------------------------------------------------
void CCCEObserverAsynchroniser::DataPortName( TName& aPortName )
- {
+ {
CCELOGSTRING( "CCCEObserverAsynchroniser::DataPortName");
TEventStorage event;
event.iEventType = EDataPortName;
event.iTName = aPortName;
AddEvent(event);
- }
+ }
// -----------------------------------------------------------------------------
// MCCEObserver ConferenceCallCreated
@@ -404,7 +404,7 @@
event.iInt1 = aBarringEvent;
AddEvent(event);
}
-
+
// -----------------------------------------------------------------------------
// MCCESsObserver CLIEventOccurred
// -----------------------------------------------------------------------------
@@ -417,13 +417,13 @@
AddEvent(event);
}
-
+
// -----------------------------------------------------------------------------
// MCCESsObserver CallForwardEventOccurred
// -----------------------------------------------------------------------------
void CCCEObserverAsynchroniser::CallForwardEventOccurred(
- const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent,
- const TDesC& aRemoteAddress )
+ const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent,
+ const TDesC& aRemoteAddress )
{
CCELOGSTRING( "CCCEObserverAsynchroniser::CallForwardEventOccurred");
TEventStorage event;
@@ -528,7 +528,7 @@
// -----------------------------------------------------------------------------
// MCCEDtmfObserver HandleDTMFEvent
-// -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
void CCCEObserverAsynchroniser::HandleDTMFEvent( const MCCEDtmfObserver::TCCEDtmfEvent aEvent,
const TInt aError,
const TChar aTone )
@@ -546,7 +546,7 @@
// MCCEExtensionObserver HandleExtensionEvents
// -----------------------------------------------------------------------------
void CCCEObserverAsynchroniser::HandleExtensionEvents( TUint32 aServiceId,
- TInt aEvent,
+ TInt aEvent,
TInt aStatus )
{
CCELOGSTRING( "CCCEObserverAsynchroniser::HandleExtensionEvents");
--- a/convergedcallengine/cce/src/ccceplugin.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/src/ccceplugin.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -250,10 +250,10 @@
// ---------------------------------------------------------------------------
//
void CCCEPlugin::DataPortName( TName& aPortName )
- {
- CCELOGSTRING( "CCCEPlugin::DataPortName" );
- iObserver.DataPortName( aPortName );
- }
+ {
+ CCELOGSTRING( "CCCEPlugin::DataPortName" );
+ iObserver.DataPortName( aPortName );
+ }
// ---------------------------------------------------------------------------
// From class MCCPCSObserver
@@ -559,7 +559,7 @@
CCELOGSTRING( "CCCEPlugin::BarringEventOccurred:OUT" );
}
-
+
// ---------------------------------------------------------------------------
// CCCEPlugin::CLIEventOccurred
@@ -571,18 +571,18 @@
if( iCallContainer.SsObserver() )
{
- // one to one mapping at the moment can be casted directly, change if mapping gets out of sync
+ // one to one mapping at the moment can be casted directly, change if mapping gets out of sync
iCallContainer.SsObserver()->CLIEventOccurred(
- (MCCESsObserver::TCCESsCLIEvent)aCallLineEvent );
+ (MCCESsObserver::TCCESsCLIEvent)aCallLineEvent );
}
- else
- {
- CCELOGSTRING( "CCCEPlugin::CLIEventOccurred: Event ignored no observer is set!" );
- }
+ else
+ {
+ CCELOGSTRING( "CCCEPlugin::CLIEventOccurred: Event ignored no observer is set!" );
+ }
CCELOGSTRING( "CCCEPlugin::CLIEventOccurred:OUT" );
}
-
+
// ---------------------------------------------------------------------------
// CCCEPlugin::BarringEventOccurred
@@ -596,15 +596,15 @@
if( iCallContainer.SsObserver() )
{
- // one to one mapping at the moment can be casted directly, change if mapping gets out of sync
+ // one to one mapping at the moment can be casted directly, change if mapping gets out of sync
iCallContainer.SsObserver()->CallForwardEventOccurred(
- (MCCESsObserver::TCCESsCallForwardEvent)aCallForwardEvent,
- aRemoteAddress );
+ (MCCESsObserver::TCCESsCallForwardEvent)aCallForwardEvent,
+ aRemoteAddress );
}
- else
- {
- CCELOGSTRING( "CCCEPlugin::CallForwardEventOccurred: Event ignored no observer is set!" );
- }
+ else
+ {
+ CCELOGSTRING( "CCCEPlugin::CallForwardEventOccurred: Event ignored no observer is set!" );
+ }
CCELOGSTRING( "CCCEPlugin::CallForwardEventOccurred:OUT" );
@@ -621,14 +621,14 @@
if( iCallContainer.SsObserver() )
{
- // one to one mapping at the moment can be casted directly, change if mapping gets out of sync
+ // one to one mapping at the moment can be casted directly, change if mapping gets out of sync
iCallContainer.SsObserver()->CallCugEventOccurred(
(MCCESsObserver::TCCESsCugEvent)aCugEvent );
}
- else
- {
- CCELOGSTRING( "CCCEPlugin::CallCugEventOccurred: Event ignored no observer is set!" );
- }
+ else
+ {
+ CCELOGSTRING( "CCCEPlugin::CallCugEventOccurred: Event ignored no observer is set!" );
+ }
CCELOGSTRING( "CCCEPlugin::CallCugEventOccurred:OUT" );
}
@@ -645,10 +645,10 @@
{
iCallContainer.SsObserver()->NotifyCurrentActiveALSLine(aLine);
}
- else
- {
- CCELOGSTRING( "CCCEPlugin::NotifyCurrentActiveALSLine: Event ignored no observer is set!" );
- }
+ else
+ {
+ CCELOGSTRING( "CCCEPlugin::NotifyCurrentActiveALSLine: Event ignored no observer is set!" );
+ }
CCELOGSTRING( "CCCEPlugin::NotifyCurrentActiveALSLine():OUT" );
}
--- a/convergedcallengine/cce/src/cccepluginmanager.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cce/src/cccepluginmanager.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -73,10 +73,10 @@
#if 0
// capabilities still todo here
- static _LIT_SECURITY_POLICY_PASS( KAllowAllPolicy );
- static _LIT_SECURITY_POLICY_C2( KICMPolicy,
- ECapabilityNetworkControl,
- ECapabilityWriteDeviceData);
+ static _LIT_SECURITY_POLICY_PASS( KAllowAllPolicy );
+ static _LIT_SECURITY_POLICY_C2( KICMPolicy,
+ ECapabilityNetworkControl,
+ ECapabilityWriteDeviceData);
// define first property to be integer type
--- a/convergedcallengine/cenrepdatabase/group/cenrepdatabase.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cenrepdatabase/group/cenrepdatabase.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -33,7 +33,9 @@
USERINCLUDE ../inc
-APP_LAYER_SYSTEMINCLUDE
+// <-- QT PHONE START -->
+MW_LAYER_SYSTEMINCLUDE
+// <-- QT PHONE END -->
LIBRARY euser.lib
LIBRARY centralrepository.lib
--- a/convergedcallengine/cenrepdatabase/src/cenrepdatabaseutil.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/cenrepdatabase/src/cenrepdatabaseutil.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -144,16 +144,16 @@
CENREPDATABASELOG( "CCenRepDatabaseUtil::BeginTransactionL - IN" );
iSemaphore.Wait();
- TCleanupItem cleanup( CCenRepDatabaseUtil::ReleaseSemaphore, this );
- CleanupStack::PushL( cleanup );
+ TCleanupItem cleanup( CCenRepDatabaseUtil::ReleaseSemaphore, this );
+ CleanupStack::PushL( cleanup );
User::LeaveIfError(
iRepository->StartTransaction( CRepository::EReadWriteTransaction ) );
- iRepository->CleanupRollbackTransactionPushL(); // if leave happens,
- // only roll back, no delete
-
- CENREPDATABASELOG( "CCenRepDatabaseUtil::BeginTransactionL - OUT" );
+ iRepository->CleanupRollbackTransactionPushL(); // if leave happens,
+ // only roll back, no delete
+
+ CENREPDATABASELOG( "CCenRepDatabaseUtil::BeginTransactionL - OUT" );
}
// ---------------------------------------------------------------------------
@@ -164,15 +164,15 @@
{
CENREPDATABASELOG( "CCenRepDatabaseUtil::CommitTransaction - IN" );
- TUint32 temp;
-
- TInt retval = iRepository->CommitTransaction( temp );
-
- iSemaphore.Signal();
+ TUint32 temp;
+
+ TInt retval = iRepository->CommitTransaction( temp );
+
+ iSemaphore.Signal();
- CleanupStack::Pop( 2 ); // semaphore and repository
-
- CENREPDATABASELOG( "CCenRepDatabaseUtil::CommitTransaction - OUT" );
+ CleanupStack::Pop( 2 ); // semaphore and repository
+
+ CENREPDATABASELOG( "CCenRepDatabaseUtil::CommitTransaction - OUT" );
return retval;
}
@@ -185,12 +185,12 @@
{
CENREPDATABASELOG( "CCenRepDatabaseUtil::RollbackTransaction - IN" );
- CleanupStack::Pop( 2 ); // rollback transaction item and semaphore
+ CleanupStack::Pop( 2 ); // rollback transaction item and semaphore
- iRepository->RollbackTransaction();
- iSemaphore.Signal();
-
- CENREPDATABASELOG( "CCenRepDatabaseUtil::RollbackTransaction - OUT" );
+ iRepository->RollbackTransaction();
+ iSemaphore.Signal();
+
+ CENREPDATABASELOG( "CCenRepDatabaseUtil::RollbackTransaction - OUT" );
}
// ---------------------------------------------------------------------------
@@ -600,28 +600,28 @@
// ---------------------------------------------------------------------------
//
void CCenRepDatabaseUtil::ReleaseSemaphore( TAny* aPtr )
- {
- CENREPDATABASELOG( "CCenRepDatabaseUtil::ReleaseSemaphore - IN" );
-
- ASSERT ( aPtr );
- CCenRepDatabaseUtil* utils = static_cast<CCenRepDatabaseUtil*>( aPtr );
- utils->DoReleaseSemaphore();
-
- CENREPDATABASELOG( "CCenRepDatabaseUtil::ReleaseSemaphore - OUT" );
- }
+ {
+ CENREPDATABASELOG( "CCenRepDatabaseUtil::ReleaseSemaphore - IN" );
+
+ ASSERT ( aPtr );
+ CCenRepDatabaseUtil* utils = static_cast<CCenRepDatabaseUtil*>( aPtr );
+ utils->DoReleaseSemaphore();
+
+ CENREPDATABASELOG( "CCenRepDatabaseUtil::ReleaseSemaphore - OUT" );
+ }
// ---------------------------------------------------------------------------
// Release semaphore
// ---------------------------------------------------------------------------
//
void CCenRepDatabaseUtil::DoReleaseSemaphore()
- {
- CENREPDATABASELOG( "CCenRepDatabaseUtil::DoReleaseSemaphore - IN" );
-
- iSemaphore.Signal();
-
- CENREPDATABASELOG( "CCenRepDatabaseUtil::DoReleaseSemaphore - OUT" );
- }
+ {
+ CENREPDATABASELOG( "CCenRepDatabaseUtil::DoReleaseSemaphore - IN" );
+
+ iSemaphore.Signal();
+
+ CENREPDATABASELOG( "CCenRepDatabaseUtil::DoReleaseSemaphore - OUT" );
+ }
// ---------------------------------------------------------------------------
// Set value of key or create a new one.
@@ -713,9 +713,9 @@
}
}
else
- {
- User::Leave( err );
- }
+ {
+ User::Leave( err );
+ }
CleanupStack::PopAndDestroy( &keys );
@@ -777,8 +777,8 @@
TBool& aOk )
{
RIpAppPropArray allArray;
- TCleanupItem cleanup( CCenRepDatabaseUtil::CleanupPointerArray, &allArray );
- CleanupStack::PushL( cleanup );
+ TCleanupItem cleanup( CCenRepDatabaseUtil::CleanupPointerArray, &allArray );
+ CleanupStack::PushL( cleanup );
TInt err = FindEntryL( aEntryId, allArray );
if( err == KErrNone )
@@ -823,10 +823,10 @@
// ---------------------------------------------------------------------------
//
void CCenRepDatabaseUtil::CleanupPointerArray( TAny* aPointer )
- {
- RIpAppPropArray* array = static_cast<RIpAppPropArray*>( aPointer );
- array->ResetAndDestroy();
- }
+ {
+ RIpAppPropArray* array = static_cast<RIpAppPropArray*>( aPointer );
+ array->ResetAndDestroy();
+ }
--- a/convergedcallengine/csplugin/data/102828e3.rss Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-* Copyright (c) 1028 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource definitions for CS Plugin
-*
-*/
-
-
-#include "ecom/registryinfo.rh"
-
-// -----------------------------------------------------------------------------
-//
-// CS Plugin ecom resource file.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE REGISTRY_INFO theInfo
- {
- // csplugin.dll UID
- dll_uid = 0x102828E3;
- interfaces =
- {
- INTERFACE_INFO
- {
- // CCP interface UID
- interface_uid = 0x10282588;
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- // CS Plug-in implementation UID
- implementation_uid = 0x102828E5;
- version_no = 1;
- display_name = "CS Plug-in";
- default_data = "";
- // Note : opaque_data MUST have @ least a single byte of data
- // in this instance it is an empty string.
- opaque_data = " ";
- }
- // Place additional interface implementations here
- };
- }
- // Place additional interfaces here
- };
- }
-// End of File
--- a/convergedcallengine/csplugin/data/csplugin_stub.pkg Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: For packing csplugin stub.
-;
-; csplugin_stub.pkg
-
-; Languages
-&EN
-
-; Header
-#{"csplugin"},(0x102828E3),1,0,0,TYPE=SA
-
-;Localised Vendor name
-%{"Nokia"}
-
-;Unique Vendor name
-:"Nokia"
-
-; Target
-
-""-"z:\sys\bin\csplugin.dll"
-""-"z:\resource\plugins\csplugin.rsc"
\ No newline at end of file
Binary file convergedcallengine/csplugin/data/csplugin_stub.sis has changed
--- a/convergedcallengine/csplugin/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project CS Call Plugin
-*
-*/
-
-#include <platform_paths.hrh>
-
-// specifies the platforms this component needs to be built
-PRJ_PLATFORMS
-DEFAULT
-
-
-// Specify the source file followed by its destination here
-PRJ_EXPORTS
-../data/csplugin_stub.sis /epoc32/data/z/system/install/csplugin_stub.sis
-
-// IBY files
-#if defined(CORE_MW_LAYER_IBY_EXPORT_PATH)
-../rom/csplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(csplugin.iby)
-#endif
-
-// Specify the .mmp files required for building the important component
-// releasables.
-PRJ_MMPFILES
-csplugin.mmp
-
-
-//PRJ_TESTMMPFILES
-//../internal/test/group/mt_cconvergedcallprovider.mmp
--- a/convergedcallengine/csplugin/group/csplugin.mmp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project CS Plugin
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET csplugin.dll
-TARGETTYPE PLUGIN
-
-// 271067363 0x102828E3 CS Call Plugin ECom DLL UID
-// 271067364 0x102828E4 CS Call Plugin ECom Interface UID
-// 271067365 0x102828E5 CS Call Plugin ECom Implementation UID
-
-// ECOM Dll recognition UID followed by the unique UID for this dll
-UID 0x10009D8D 0x102828E3
-
-CAPABILITY CAP_ECOM_PLUGIN NetworkControl NetworkServices ReadDeviceData
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../src
-SOURCE csprovider.cpp
-SOURCE cspproxy.cpp
-SOURCE cspcall.cpp
-SOURCE cspvoicecall.cpp
-SOURCE rcsplinecontainer.cpp
-SOURCE cspetelcalleventmonitor.cpp
-SOURCE cspetelcallstatusmonitor.cpp
-SOURCE cspcallinfomonitor.cpp
-SOURCE cspetelincomingcallmonitor.cpp
-SOURCE cspetelcallrequester.cpp
-SOURCE cspetelcallcapsmonitor.cpp
-SOURCE cspetelconferencecallrequester.cpp
-SOURCE cspdtmfprovider.cpp
-SOURCE cspeteldtmfmonitor.cpp
-SOURCE cspeteldtmfstopmonitor.cpp
-SOURCE cspconferencecall.cpp
-SOURCE cspetelconferencestatusmonitor.cpp
-SOURCE cspetelconferenceeventmonitor.cpp
-SOURCE cspetelconferencecapsmonitor.cpp
-SOURCE csptransferprovider.cpp
-SOURCE cspservicesettingshandler.cpp
-SOURCE cspvideocall.cpp
-SOURCE cspetelvideocallcapsmonitor.cpp
-SOURCE cspforwardprovider.cpp
-SOURCE cspvideocallconnectionhandler.cpp
-SOURCE cspcalladdedhandler.cpp
-SOURCE cspcallarray.cpp
-SOURCE csppanic.cpp
-SOURCE cspaudiohandler.cpp
-SOURCE csppubsublistener.cpp
-SOURCE cspcenreplistener.cpp
-SOURCE cspetelcallwaitingrequester.cpp
-SOURCE cspsupplementaryservicesmonitor.cpp
-SOURCE cspcipheringstatusmonitor.cpp
-SOURCE cspsssettingshandler.cpp
-SOURCE cspuuimessagesender.cpp
-SOURCE cspuuimonitor.cpp
-SOURCE tcspskypeidparser.cpp
-SOURCE cspdevsound.cpp
-SOURCE cspmicrophone.cpp
-SOURCE cspspeaker.cpp
-SOURCE cspaudiostreams.cpp
-SOURCE csptimer.cpp
-SOURCE cspcallcommandhandler.cpp
-SOURCE cspremotealertingtonelistener.cpp
-SOURCE cspetellinestatusmonitor.cpp
-SOURCE cspclientvideocall.cpp
-SOURCE cspclientvoicecall.cpp
-
-// user include paths
-USERINCLUDE ../inc
-
-// APP_LAYER_SYSTEMINCLUDE is needed for
-// telmicmutestatuspskeys.h telincallvolcntrlcrkeys.h
-// MW_LAYER_SYSTEMINCLUDE would be preferred
-APP_LAYER_SYSTEMINCLUDE
-
-SYSTEMINCLUDE /epoc32/include/ecom
-SYSTEMINCLUDE /epoc32/include/mmf/server
-SYSTEMINCLUDE /epoc32/include/mmf/common
-SYSTEMINCLUDE /epoc32/include/mda/client
-
-SOURCEPATH ../data
-START RESOURCE 102828e3.rss
-TARGET csplugin.rsc
-END
-
-LIBRARY bafl.lib
-LIBRARY euser.lib
-LIBRARY ecom.lib
-LIBRARY etelmm.lib
-LIBRARY etel.lib
-LIBRARY customapi.lib
-LIBRARY esock.lib
-LIBRARY serviceprovidersettings.lib // Reading service id and related
-LIBRARY featmgr.lib
-LIBRARY mmfdevsound.lib
-LIBRARY centralrepository.lib
-LIBRARY sssettings.lib
-LIBRARY telephonyaudiorouting.lib callprovider.lib cce.lib
-DEBUGLIBRARY flogger.lib
--- a/convergedcallengine/csplugin/group/csplugin_UID_.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: UID for csplugin
-*
-*/
-// Makmake-generated uid source file
-#include <e32cmn.h>
-#pragma data_seg(".SYMBIAN")
-__EMULATOR_IMAGE_HEADER2(0x10000079,0x10009d8d,0x102828e3,EPriorityForeground,0x000ffffeu,0x00000000u,0x102828e3,0x101fb657,0x00010000,0)
-#pragma data_seg()
--- a/convergedcallengine/csplugin/inc/cspaudiohandler.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,199 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPAudioHandler
-*
-*/
-
-
-#ifndef CSPAUDIOHANDLER_H
-#define CSPAUDIOHANDLER_H
-
-#include <e32base.h>
-#include <sounddevice.h>
-
-#include "mcsppubsubobserver.h"
-#include "mcspcenrepobserver.h"
-
-
-class CSPPubSubListener;
-class CSPCenRepListener;
-class CSPAudioStreams;
-
-/**
-* Handles call adding from calls not done by the plugin.
-*
-*/
-class CSPAudioHandler: public CBase,
- public MCSPPubSubObserver,
- public MCSPCenRepObserver,
- public MDevSoundObserver
- {
-
- public: //Constructors and descructor
-
- /**
- * Two-phased constructing for the monitor.
- *
- * @param aObserver the observer for getting notification
- * @param aLine the line to monitor
- * @param aLineId line identifier
- */
- static CSPAudioHandler* NewL( );
-
- /**
- * C++ default destructor.
- */
- virtual ~CSPAudioHandler( );
-
- /**
- * Start audio streams.
- */
- void Start();
-
- /**
- * Stop audio streams.
- */
- void Stop();
-
- /**
- * From base class MCSPPubSubObserver.
- * Handler for changed event.
- * @param aUid uid of setting
- * @param aKey id of setting
- * @param aStatus status of completed AO operation
- */
- virtual void HandleNotifyPSL( const TUid aUid, const TInt& aKey,
- const TRequestStatus& aStatus );
-
- /**
- * From base class MCSPCenRepObserver.
- * Handler for changed event.
- * @param aUid uid of setting
- * @param aVal value
- */
- virtual void CSPAudioHandler::HandleNotifyCenRepL(
- const TUid aUid,
- const TUint32 aKey,
- TInt aVal );
-
- protected: //From DevSound
-
- /**
- * Handles DevDound initialization completion event.
- * @param aError. KErrNone if successful. Other values are possible
- * indicating a problem initializing CMMFDevSound object.
- */
- void InitializeComplete( TInt aError );
-
- /**
- * Handles CMMFDevSound object's data request event.
- * @param aBuffer. Buffer to be filled
- */
- void BufferToBeFilled( CMMFBuffer* aBuffer );
-
- /**
- * Handles play completion or cancel event.
- * @param aError. The status of playback
- */
- void PlayError( TInt aError );
-
- /**
- * Not Supported
- */
- void ToneFinished( TInt aError );
-
- /**
- * Not supported.
- */
- void BufferToBeEmptied( CMMFBuffer* aBuffer );
-
- /**
- * Not supported.
- */
- void RecordError( TInt aError );
-
- /**
- * Not supported.
- */
- void ConvertError( TInt aError );
-
- /**
- * Not supported.
- */
- void DeviceMessage( TUid aMessageType, const TDesC8& aMsg );
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- */
- void RunL();
-
- /**
- * From CActive
- * Catches errors if RunL leaves
- * @param aError error code
- * @return error code
- */
- TInt RunError( TInt aError );
-
- /**
- * From CActive
- * Cancels the monitor
- */
- void DoCancel();
-
- private:
- /**
- * C++ default constructor
- * @param aObserver the observer for status change (incoming call)
- * @param aLine the line associated with the call
- * @param aLineId line identifier
- */
- CSPAudioHandler( );
-
- /**
- * Constructs the monitor in the second phase.
- */
- void ConstructL();
-
- private: // data
-
- /**
- * Mute listening from Publish&Subscribe.
- */
- CSPPubSubListener* iMuteListener;
-
- /**
- * Incall loudspeaker listening from Central Repository.
- */
- CSPCenRepListener* iIncallLoudspeakerVolumeListener;
-
- /**
- * Incall ear volume listening from Central Repository.
- */
- CSPCenRepListener* iIncallEarVolumeListener;
-
- /**
- * Audio streams handler.
- */
- CSPAudioStreams* iAudioStreams;
-
- /**
- * Call count
- */
- TInt iCallCount;
- };
-
-#endif // CSPAUDIOHANDLER_H
--- a/convergedcallengine/csplugin/inc/cspaudiostreams.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Starts and stops audio streams.
-*
-*/
-
-
-#ifndef CSPAUDIOSTREAMS_H
-#define CSPAUDIOSTREAMS_H
-
-
-#include <e32base.h>
-#include <TelephonyAudioRouting.h>
-#include "MTelephonyAudioRoutingObserver.h"
-#include "mcspdevsoundobserver.h"
-#include "mcsptimerobserver.h"
-
-class MCSPDevSoundFactory;
-class CSPTimer;
-class CSPMicrophone;
-class CSPSpeaker;
-class MCSPAudioStreamObserver;
-class CSPTimer;
-
-
-/**
- * Starts and stops audio streams.
- * If the activation fails then there is a retry timer which
- * will try the activation later.
- */
-NONSHARABLE_CLASS( CSPAudioStreams ) :
- public CBase,
- public MCSPDevSoundObserver,
- public MCSPTimerObserver,
- public MTelephonyAudioRoutingObserver
- {
-
-public:
-
- /**
- * Two-phased constructing.
- */
- static CSPAudioStreams* NewL( );
-
- /**
- * Two-phased constructing.
- */
- static CSPAudioStreams* NewLC( );
-
- /**
- * C++ default destructor.
- */
- virtual ~CSPAudioStreams();
-
- /**
- * Starts audio streams ie inits mic and speaker.
- */
- void StartStreams();
-
- /**
- * Stops audio streams ie shuts down mic and speaker.
- */
- void StopStreams();
-
- /**
- * Sets volume for ear.
- */
- void VolumeChangedEar( TInt aVolume );
-
- /**
- * Sets volume for loudspeaker.
- */
- void VolumeChangedLoudspeaker( TInt aVolume );
-
- /**
- * Stores volume levels.
- */
- void StoreVolumes(TInt aVolumeEar, TInt aVolumeLoudspeaker);
-
- /**
- * Set unmuted.
- */
- void SetUnmuted();
-
- /**
- * Set muted.
- */
- void SetMuted();
-
- /**
- * Gives access to CSPMicrophone instance. Ownership not given.
- * @return MCSPMic instance.
- */
- CSPMicrophone& Mic() const;
-
- /**
- * Gives access to CSPSpeaker instance. Ownership not given.
- * @return MCSPSpeaker instance.
- */
- CSPSpeaker& Speaker() const;
-
- /**
- * Set observer for audio stream events.
- * @param aObserver
- */
- void SetAudioStreamObserver( MCSPAudioStreamObserver& aObserver );
-
-// from base class MCSPDevSoundObserver
-
- /**
- * From MCSPDevSoundObserver
- * Notification that Mic has been activated successfully
- */
- void MicActivatedSuccessfully();
-
- /**
- * From MCSPDevSoundObserver
- * Notification that speaker has been activated successfully
- */
- void SpeakerActivatedSuccessfully();
-
- /**
- * From MCSPDevSoundObserver
- * Notification that Mic initialisation failed.
- */
- void MicActivationFailed();
-
- /**
- * From MCSPDevSoundObserver
- * Notification that Speaker activation failed.
- */
- void SpeakerActivationFailed();
-
-// from base class MCSPTimerObserver
-
- /**
- * From MCSPTimerObserver.
- * Notify from CSPTimer that timeout passed.
- */
- void TimerEvent();
-
-protected: // Functions from base classes
-
-// from base class MTelephonyAudioRoutingObserver
-
- /**
- * @see MTelephonyAudioRoutingObserver.
- */
- void AvailableOutputsChanged( CTelephonyAudioRouting& aTelephonyAudioRouting );
-
- /**
- * @see MTelephonyAudioRoutingObserver.
- */
- void OutputChanged( CTelephonyAudioRouting& aTelephonyAudioRouting);
-
- /**
- * @see MTelephonyAudioRoutingObserver.
- */
- void SetOutputComplete( CTelephonyAudioRouting& aTelephonyAudioRouting, TInt aError);
-
-private:
-
- /**
- * C++ default constructor.
- */
- CSPAudioStreams( );
-
- void ConstructL( );
-
- static TInt TimerCallBack( TAny* aThisPtr );
-
- void AudioStreamsStarted();
-
- void StartTimer();
-
- void StartMicAndSpeaker();
-
- TBool IsMicAndSpeakerStarted();
-
- void ApplyVolume(TInt aVolumeEar, TInt aVolumeLoudspeaker);
-
-private: // data
-
- /**
- * Mic.
- * own.
- */
- CSPMicrophone* iMic;
-
- /**
- * Speaker.
- * Own.
- */
- CSPSpeaker* iSpeaker;
-
- /**
- * Timer for retrying the activation of streams (mic & speaker) if
- * there was a failure in activation.
- * Own.
- */
- CSPTimer* iTimer;
-
- /**
- * Timeout value used with timer. Timeout value doubles every retry to
- * activate the streams.
- */
- TInt iTimeout;
-
- /**
- * Audio output for checking if loadspeaker or ear volume should be used.
- * Own.
- */
- CTelephonyAudioRouting* iAudioRouting;
-
- /**
- * Observer for stream events.
- * Not own.
- */
- MCSPAudioStreamObserver* iStreamObserver;
-
- /**
- * Ear volume.
- */
- TInt iVolumeEar;
-
- /**
- * Loudspeaker volume.
- */
- TInt iVolumeLoudspeaker;
-
- };
-
-#endif // CSPAUDIOSTREAMS_H
--- a/convergedcallengine/csplugin/inc/cspcall.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,787 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: CSPCall for CS Call Plug-in
-*
-*/
-
-
-
-#ifndef CSPCALL_H
-#define CSPCALL_H
-
-#include <mccpcscall.h>
-#include <mccpcallobserver.h>
-#include <mccptransferobserver.h>
-#include <mccpforwardobserver.h>
-#include <etel.h>
-#include <etelmm.h>
-#include <cccecallparameters.h>
-
-#include "cspconsts.h"
-#include "cspetelcallrequester.h" // For the requester and TRequestType
-#include "mcspcallobserver.h"
-#include "mcspcallerrorobserver.h"
-#include "mcspuusmessageobserver.h"
-#include "mcspcallcommandhandling.h"
-
-
-class MCCPForwardProvider;
-class CSPForwardProvider;
-class CSPTransferProvider;
-class RMobileCall;
-class CSPEtelCallStatusMonitor;
-class CSPEtelCallEventMonitor;
-class CSPCallInfoMonitor;
-class CSPEtelCallCapsMonitor;
-class CSPTransferProvider;
-class CSPEtelCallCapsMonitor;
-class CSPAudioHandler;
-class MCSPCommonInfo;
-class CSPUUIMonitor;
-class CSPUUIMessageSender;
-
-
-/**
-* Call class for CS Call Plug-in. Implements the API defined by CCP in classes
-* MCCPCall and MCCPCSCall
-*
-* @lib csplugin.dll
-*/
-class CSPCall : public CBase,
- public MCCPCSCall,
- public MCSPCallObserver,
- public MCSPCallErrorObserver,
- public MCSPUUSMessageObserver,
- public MCCPCallCommandHandling
- {
- public:
- /*
- * C++ default destructor
- */
- virtual ~CSPCall( );
-
- /**
- * ETel call name accessor.
- * @return system wide error code
- */
- void CallName( TName& aCallName );
-
- /**
- * Sets the audio handler for the call.
- * @param aHandler audio handler
- */
- void SetAudioHandler( CSPAudioHandler* aHandler );
-
- /**
- * Security setting change notification.
- * @param aValue new value
- */
- void SecuritySettingChanged( TInt aValue );
-
- /**
- * Remote alerting tone status changed notification.
- * @param aNewStatus New remote alerting tone status.
- */
- void RemoteAlertingToneStatusChanged(
- RMmCustomAPI::TRemoteAlertingToneStatus aNewStatus );
-
- /**
- * Set iDontReportTerm flag value to ETrue.
- */
- void DontReportTerminationError();
-
-// from base class MCSPCallObserver
-
- /**
- * Updates the call event for observers.
- * @param aEvent the event to be notified
- */
- virtual void NotifyForwardEventOccurred(
- MCCPForwardObserver::TCCPForwardEvent aEvent );
-
- /**
- * Updates the state change and forwards the state for observer.
- * @param aState new state (ETel) of the call
- */
- virtual void NotifyCallStateChangedETel(
- RMobileCall::TMobileCallStatus aState );
-
- /**
- * Updates the call event for observers.
- * @param aEvent the event to be notified
- */
- virtual void NotifyCallEventOccurred(
- MCCPCallObserver::TCCPCallEvent aEvent );
-
- /**
- * Updates the transfer event for observers.
- * @param aEvent the event to be notified
- */
- virtual void NotifyTransferCallEventOccurred(
- MCCPTransferObserver::TCCPTransferEvent aEvent );
-
- /**
- * Notifies changed call capabilities.
- * @param aCapsFlags new capability flags
- */
-
- virtual void CallCapsChanged( const TUint32 aCapsFlags );
-
-// from base class MCSPCallErrorObserver
-
- /**
- * From MCSPCallErrorObserver
- * Dial request failed notification.
- * @param aErrorCode request failing error code
- */
- void DialRequestFailed( TInt aErrorCode );
-
- /**
- * From MCSPCallErrorObserver
- * Emergency dial request failed notification.
- * @param aErrorCode request failing error code
- */
- void EmergencyDialRequestFailed( TInt aErrorCode );
-
- /**
- * From MCSPCallErrorObserver
- * Notifies about error situation for CCE.
- */
- virtual void NotifyErrorOccurred( TCCPError aError );
-
-// from base class MCSPUUSMessageObserver
-
- /**
- * From MCSPUUSMessageObserver
- * UUS message received notification.
- */
- void UUSMessageReceived( TDesC& aMessage );
-
-// from base class MCCPCSCall
-
- /**
- * From MCCPCSCall
- * Returns call information
- * @param aCallInfo TMobileCallInfoV3
- * @return KErrNone if succesfull
- * otherwise another system wide error code
- */
- virtual TInt GetMobileCallInfo( TDes8& aCallInfo ) const;
-
- /**
- * From MCCPCSCall
- * Gets the calls data call capabilities
- * @param aCaps TMobileCallDataCapsV1
- * @return KErrNone if the function member was successful,
- * KErrNotSupported if call doesn't support circuit switched data
- * KErrNotFound if this call is not a data call
- */
- virtual TInt GetMobileDataCallCaps( TDes8& aCaps ) const;
-
-// from base class MCCPCall
-
- /**
- * From MCCPCall
- * Answers to an incoming call.
- * @return system wide error code
- */
- virtual TInt Answer();
-
- /**
- * From MCCPCall
- * Rejects an incoming call.
- * @return system wide error code
- */
- virtual TInt Reject();
-
- /**
- * From MCCPCall
- * Reguests plug-in to queue the call.
- * @return system wide error code
- */
- virtual TInt Queue();
-
- /**
- * From MCCPCall
- * Starts dialing to remote party
- * @return system wide error code
- */
- virtual TInt Dial();
-
- /**
- * From MCCPCSCall
- * Starts dialing to recipient
- * @param aCallParams Call parameters used
- * by the TSY (TCallParamsPckg)
- * @return system wide error code
- */
- TInt Dial( const TDesC8& aCallParams );
-
- /**
- * From MCCPCall
- * Call is ringning
- * @return system wide error code
- */
- virtual TInt Ringing();
-
- /**
- * From MCCPCall
- * Ends an ongoing call.
- * @return system wide error code
- */
- virtual TInt HangUp();
-
- /**
- * From MCCPCall
- * Cancels the ongoing request
- * @return system wide error code
- */
- virtual TInt Cancel();
-
- /**
- * From MCCPCall
- * Puts the specified call on hold.
- * @return system wide error code
- */
- virtual TInt Hold();
-
- /**
- * From MCCPCall
- * Resumes the call.
- * @return system wide error code
- */
- virtual TInt Resume();
-
- /**
- * From MCCPCall
- * Swaps a connected call to its opposite state either active or on hold
- * @return system wide error code
- */
- virtual TInt Swap();
-
- /**
- * From MCCPCall
- * Returns the remote party of the call.
- * @return remote party address,
- */
- const TDesC& RemoteParty() const;
-
- /**
- * From MCCPCall
- * Returns the remote party name of the call.
- * @return remote party name
- */
- const TDesC& RemotePartyName();
-
- /**
- * From MCCPCall
- * Dialled party.
- * @return dialled party name
- */
- const TDesC& DialledParty() const;
-
- /**
- * From MCCPCall
- * Return boolean value if the incoming call is forwarded or not.
- * @return ETrue if call is forwarded, else EFalse
- */
- virtual TBool IsCallForwarded() const;
-
- /**
- * From MCCPCall
- * Returns boolean value if the call is mobile originated or not.
- * @return ETrue if call is mobile originated, otherwise EFalse
- */
- virtual TBool IsMobileOriginated() const;
-
- /**
- * From MCCPCall
- * Returns the state of the call.
- * @return TCCPCallState The current state of the call
- */
- virtual MCCPCallObserver::TCCPCallState State() const;
-
- /**
- * From MCCPCall
- * Returns TUid of the plug-in used for this call
- * @return TUid Implementation UID of the Plug-In
- */
- virtual TUid Uid() const;
-
- /**
- * From MCCPCall
- * Returns call control caps for this call
- * @return call capability information
- */
- virtual MCCPCallObserver::TCCPCallControlCaps Caps( ) const;
-
- /**
- * From MCCPCall
- * Get call's secure status.
- * @return TBool ETrue if security is enabled, else EFalse.
- */
- virtual TBool IsSecured() const;
-
- /**
- * From MCCPCall
- * Get call's secure specified status.
- * @return TBool ETrue if secure specified
- */
- virtual TBool SecureSpecified() const;
-
- /**
- * From MCCPCall
- * Set call parameters.
- * @param aNewParams New call paramater information.
- */
- virtual void SetParameters( const CCCPCallParameters& aNewParams );
-
- /**
- * From MCCPCall
- * Cet call parameters.
- * @return Current call paramater information.
- */
- virtual const CCCPCallParameters& Parameters() const;
-
- /**
- * From MCCPCall
- * Get Forward provider
- * @param aObserver - observer class for forward events
- * @return Pointer to MCCPForwardProvider if succesfull, NULL if not available
- * @leave on error case system error code
- */
- virtual MCCPForwardProvider* ForwardProviderL( const MCCPForwardObserver& aObserver );
-
- /**
- * From MCCPCall
- * Get Call transfer provider
- * @param aObserver - observer class for transfer events
- * @return Pointer to MCCPTransferProvider if succesfull, NULL if not available
- * @leave on error case system error code
- */
- virtual MCCPTransferProvider* TransferProviderL( const MCCPTransferObserver& aObserver );
-
- /**
- * From MCCPCall
- * Adds a new observer for MCCECall object. Called in MT call case. In MO
- * case observer will be given at call construction.
- * Plug-in dependent feature if duplicates or more than one observers
- * are allowed or not. Currently CCE will set only one observer.
- * @param aObserver Observer
- * @leave system error if observer adding fails
- */
- virtual void AddObserverL( const MCCPCallObserver& aObserver );
-
- /**
- * From MCCPCall
- * Remove an observer.
- * @param aObserver Observer
- * @return KErrNone if removed succesfully. KErrNotFound if observer was not found.
- * Any other system error depending on the error.
- */
- virtual TInt RemoveObserver( const MCCPCallObserver& aObserver );
-
- /**
- * From MCCPCall
- * Returns the inband tone associated to an error condition or a state transition of a call.
- * See defenition for TCCPTone.
- * @since S60 3.2
- * @param None.
- * @return TCCPTone Used tone.
- */
- TCCPTone Tone() const;
-
-// from base class MCCPCSCall
-
- /**
- * From MCCPCSCall
- * Indicates that FDN check is not used for dial.
- */
- virtual void NoFDNCheck( );
-
- /**
- * From MCCPCSCall
- * Log dialed number. SAT related, check if dialed number is to be logged or not.
- * @since S60 5.0
- * @param None
- * @return Log dialed number or not.
- */
- virtual TBool LogDialedNumber() const;
-
-// from base class MCCPCallCommandHandling
-
- /**
- * Perform answer command.
- * @return system wide error code
- */
- TInt PerformAnswerRequest();
-
- /**
- * Perform dial command.
- * @return system wide error code
- */
- TInt PerformDialRequest();
-
- protected:
-
- /**
- * Starts dialing to recipient.
- * Bypasses FDN check according to aFdnCheck.
- * @param aFdnCheck True if FDN checking is used
- * @return system wide error code
- */
- virtual TInt DialFdnCond( TBool aFdnCheck ) = 0;
-
- protected:
-
- /**
- * C++ default constructor.
- *
- * @param aLine line of the call
- * @param aMobileOriginated is call mobile originated
- * @param aName contains call name (mobile terminated) or phone number (mobile originated)
- * @param aCommonInfo reference to common info interface
- * @param aIsEmergencyCall is emergency call
- */
- CSPCall( RMobileLine& aLine,
- TBool aMobileOriginated,
- const TDesC& aName,
- MCSPCommonInfo& aCommonInfo,
- TBool aIsEmergencyCall );
-
- /*
- * Constructing 2nd phase.
- * @param aParams call parameters
- */
- virtual void ConstructL( const CCCECallParameters& aParams );
-
- /*
- * Notifies the ringing state to observers.
- */
- virtual void NotifyRingingState();
-
- /**
- * Mapping ETel state to CCP state.
- * @param aEtelState an ETel state
- * @return corresponding CCP state
- */
- MCCPCallObserver::TCCPCallState
- CSPCall::CCPStateFromETelState(
- RMobileCall::TMobileCallStatus aEtelState );
-
- /**
- * From MCSPCallObserver
- * Updates the state change including inband tones
- * played by network and forwards the state for observer.
- * @param aState new state of the call
- */
- virtual void NotifyCallStateChangedWithInband(
- MCCPCallObserver::TCCPCallState aState );
-
- /**
- * Updates the state change
- * and forwards the state for observer.
- * @param aState new state of the call
- */
- virtual void NotifyCallStateChanged(
- MCCPCallObserver::TCCPCallState aState );
-
- /**
- * From MCSPCallObserver
- * Notify that remote party info has changed.
- * @param aRemotePartyName new remote party name
- * @param aRemotePartyNumber new remote party number
- */
- virtual void NotifyRemotePartyInfoChanged(
- const TDesC& aRemotePartyName,
- const TDesC& aRemotePartyNumber );
-
- /**
- * Open call handle.
- * Opens a new call handle for MO call
- * and an existing handle for MT call.
- */
- virtual void OpenCallHandleL();
-
- /**
- * Update call info data including call name,
- * remote name and number data.
- */
- virtual void UpdateCallInfo();
-
- /**
- * Implementation for UpdateCallInfo().
- */
- virtual void UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo );
-
- /**
- * Set call origin to CCCECallParameters.
- */
- virtual void UpdateCallOrigin( RMobileCall::TMobileCallInfoV7 aCallInfo );
-
- /**
- * Reads information from cenrep.
- * @param aUid CR Uid
- * @param aKey CR key
- * @param aVal value of key, output
- */
- void ReadRepositoryL( TUid aUid, TUint aKey, TInt& aVal);
-
- /**
- * Check and notify call termination error.
- */
- void CheckAndNotifyTerminationError();
-
- /**
- * Error from iExitCode.
- */
- TInt ExitCodeError() const;
-
- /**
- * Update call name number info.
- * @param aCallInfo RMobileCall::TMobileCallInfoV3
- * @param aCallCreatedByMonitor, set:
- * EFalse for calls added by plugin owner
- * ETrue for calls added by ETel status monitor
- */
- void UpdateCallNameNumberInfo(
- RMobileCall::TMobileCallInfoV3& aCallInfo,
- TBool aCallAddedByMonitor );
-
- /**
- * Open new call.
- * New call is opened when the plugin owner adds the new
- * call (compare to OpenExistingCall where call is added by
- * ETel monitor).
- */
- void OpenNewCall();
-
- /**
- * Open existing call.
- * Existing call is opened if one of the ETel
- * monitors (incoming call monitor or line status monitor)
- * has added the call and no new call needs to be
- * opened.
- * @param aName name of the existing call
- */
- void OpenExistingCallL( const TDesC& aName );
-
- private:
-
- /**
- * Create call handlers for call requests and for
- * monitoring call events.
- */
- void CreateCallHandlersL();
-
- /**
- * Update call state from ETel
- * @return system wide error code
- */
- int UpdateCallState();
-
- /**
- * Sends a remote party info changed notification
- * if the remote party number has changed.
- */
- void NotifyRemotePartyNumberChanged();
-
- private:
-
- enum TCSPCallAudioStatus {
- ECSPCallAudioStatusInactive,
- ECSPCallAudioStatusActive
- };
-
- protected:
-
- /**
- * CCP Call Observer array.
- */
- RPointerArray<MCCPCallObserver> iObservers;
-
- /**
- * Actual ETel call handle.
- */
- RMobileCall iCall;
-
- /**
- * ETel line
- */
- RMobileLine& iLine;
-
- /**
- * Determines if the call direction is either MO (ETrue) or MT (EFalse)
- */
- TBool iMobileOriginated;
-
- /**
- * Name information of the call.
- *
- * Name information is stored during CSPCall construction
- * and assigned to iCallName (MT or client call) or
- * iRemotePartyNumber (MO call) afterwards.
- */
- TBuf<KCSPPhoneNumberMaxLength> iName;
-
- /**
- * Remote party name of the call.
- */
- TBuf<KCSPPhoneNumberMaxLength> iRemotePartyNumber;
-
- /**
- * Remote party name of the call.
- */
- TBuf<KCSPCallingNameMaxLength> iRemotePartyName;
-
- /**
- * Dialled party of the call.
- */
- TBuf<KCSPPhoneNumberMaxLength> iDialledParty;
-
- /**
- * Call name for MT call.
- */
- TName iCallName;
-
- /**
- * Call parameters.
- */
- CCCECallParameters* iParams;
-
- /**
- * Call state in CCP format
- */
- MCCPCallObserver::TCCPCallState iCallState;
-
- /**
- * Capability flags.
- */
- TUint32 iCapsFlags;
-
- /**
- * Call status monitor
- */
- CSPEtelCallStatusMonitor* iCallStatusMonitor;
-
- /**
- * Call event monitor
- */
- CSPEtelCallEventMonitor* iCallEventMonitor;
-
- /**
- * Call info monitor
- */
- CSPCallInfoMonitor* iCallInfoMonitor;
-
- /**
- * Makes the asynchronic requests for various purposes.
- */
- CSPEtelCallRequester* iRequester;
-
- /**
- * Dial completion code.
- */
- TInt iDialCompletionCode;
-
- /**
- * Common information for calls.
- */
- MCSPCommonInfo& iCommonInfo;
-
- /**
- * Call termination error notification has been sent.
- */
- TBool iTerminationErrorNotified;
-
- /**
- * Emergency call.
- */
- TBool iIsEmergencyCall;
-
- private:
-
- /**
- * Transfer provider.
- * Own.
- */
- CSPTransferProvider* iTransferProvider;
-
- /**
- * Forward provider. No actual implementation.
- * Own.
- */
- CSPForwardProvider* iForwardProvider;
-
- /**
- * Audio dev sound handler.
- * Not own.
- */
- CSPAudioHandler* iAudioHandler;
-
- /**
- * FDN check usage status. Default is on. (ETrue)
- */
- TBool iFdnCheck;
-
- /**
- * Monitors call capabilities from ETel.
- * Own.
- */
- CSPEtelCallCapsMonitor* iCallCapsMonitor;
-
- /*
- * UUS monitor
- */
- CSPUUIMonitor* iUUIMonitor;
-
- /*
- * UUS sender
- */
- CSPUUIMessageSender* iUUIMessageSender;
-
- /**
- * Data for parsed skype id.
- * Own.
- */
- HBufC* iSkypeId;
-
- /**
- * Audio stop requested status. The flag prevents double audio stop.
- * Stop is executed in Disconnecting state and Idle state
- * if previous state has been DisconnectingWithInband.
- * Audio start status.
- */
- TCSPCallAudioStatus iAudioStatus;
-
- /**
- * Defines whether to report KErrGsmCCNormalUnspecified
- * and KErrGsmCCCallRejected.
- */
- TBool iDontReportTerm;
-
- /**
- * User to user information. Sended to network before dial.
- * Own.
- */
- HBufC* iUserToUserInformation;
-
- friend class UT_CSPCall;
- friend class MT_CConvergedCallProvider;
-
-
- };
-
-
-#endif // CSPCALL_H
--- a/convergedcallengine/csplugin/inc/cspcalladdedhandler.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPCallAddedHandler
-*
-*/
-
-
-#ifndef CSPCALLADDEDHANDLER_H
-#define CSPCALLADDEDHANDLER_H
-
-#include <e32base.h>
-#include <etelmm.h>
-#include "rcsplinecontainer.h"
-#include "mcsplinestatusobserver.h" // For MCSPLineStatusObserver
-
-class CSPCall;
-class CSPCallArray;
-class CSProvider;
-class MCCPCSObserver;
-class RCSPLineContainer;
-class CSPEtelLineStatusMonitor;
-class CSPEtelCallWaitingRequester;
-class MCSPCommonInfo;
-class CSPAudioHandler;
-
-/**
-* Handles call adding from calls not done by the plugin.
-*
-* @lib csplugin.dll
-*/
-NONSHARABLE_CLASS(CSPCallAddedHandler): public CBase,
- public MCSPLineStatusObserver
- {
-
- public: //Constructors and descructor
-
- /**
- * Two-phased constructing for the monitor.
- *
- * @param aObserver the observer for getting notification
- * @param aLine the line to monitor
- * @param aLineId line identifier
- */
- static CSPCallAddedHandler* NewL(
- const MCCPCSObserver& aObserver,
- RCSPLineContainer& aLineContainer,
- CSPCallArray& aCallArray,
- MCSPCommonInfo& aCommonInfo,
- CSPAudioHandler& aAudioHandler );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPCallAddedHandler( );
-
-
-// from base class MCSPLineStatusMonitor
-
- /**
- * Handles line status change notifications
- * @param aLine the line to monitor
- * @param aLineId line identifier
- * @param aLineStatus
- */
- void LineStatusChanged( RMobileLine& aLine,
- RCSPLineContainer::TCSPLineId aLineId,
- RMobileCall::TMobileCallStatus& aLineStatus );
-
- protected: // From CActive
-
- /**
- * From CActive
- * RunL
- */
- void RunL();
-
- /**
- * From CActive
- * Catches errors if RunL leaves
- * @param aError error code
- * @return error code
- */
- TInt RunError( TInt aError );
-
- /**
- * From CActive
- * Cancels the monitor
- */
- void DoCancel();
-
- private:
-
- /**
- * C++ default constructor
- * @param aObserver the observer for status change (incoming call)
- * @param aLine the line associated with the call
- * @param aLineId line identifier
- */
- CSPCallAddedHandler( const MCCPCSObserver& aObserver,
- RCSPLineContainer& aLineContainer,
- CSPCallArray& aCallArray,
- MCSPCommonInfo& aCommonInfo,
- CSPAudioHandler& aAudioHandler );
-
- /**
- * Constructs the monitor in the second phase.
- */
- void ConstructL();
-
- /**
- * Handles call creation
- * @param aLine the line to monitor
- * @param aCallName the call name
- * @param aLineId line identifier
- */
- void CallAdded( RMobileLine& aLine,
- TName aCallName,
- RCSPLineContainer::TCSPLineId aLineId );
-
- private: // data
-
- /**
- * Line container.
- */
- RCSPLineContainer& iLineContainer;
-
- /**
- * Notifications observer.
- */
- const MCCPCSObserver& iObserver;
-
- /**
- * Line status monitors.
- */
- CSPEtelLineStatusMonitor* iVoiceLineMonitor;
- CSPEtelLineStatusMonitor* iDataLineMonitor;
- CSPEtelLineStatusMonitor* iAuxLineMonitor;
-
- /**
- * Array of calls.
- */
- CSPCallArray& iCallArray;
-
- /**
- * Common info handle.
- */
- MCSPCommonInfo& iCommonInfo;
-
- /**
- * Audio Handler reference.
- */
- CSPAudioHandler& iAudioHandler;
- };
-
-#endif // CSPCALLADDEDHANDLER_H
--- a/convergedcallengine/csplugin/inc/cspcallarray.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPCallArray
-*
-*/
-
-
-#ifndef CSPCALLARRAY_H
-#define CSPCALLARRAY_H
-
-#include <e32base.h>
-
-#include "mcspcallinformation.h"
-
-class CSPCall;
-
-/**
-* Handles call adding from calls not done by the plugin.
-*
-* @lib csplugin.dll
-*/
-class CSPCallArray: public CBase,
- public MCSPCallInformation
- {
-
- public: //Constructors and descructor
-
- /**
- * Two-phased constructing for the array.
- *
- */
- static CSPCallArray* NewL( );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPCallArray( );
-
- /**
- * Remove call from array
- * @param aCall call to be removed
- * @return result of removal
- */
- TInt Add( CSPCall* aCall );
-
- /**
- * Remove call from array
- * @param aCall call to be removed
- * @return result of removal
- */
- TInt Remove( CSPCall* aCall );
-
- /**
- * Get call count.
- */
- TInt GetCallCount( );
-
- /**
- * Get call by index.
- */
- CSPCall* Get( TInt aIndex );
-
-// from base class MCSPCallInformation
-
- /**
- * From MCSPCallInformation
- * Finds call pointer specified by call name.
- * @param aCallName
- * @return corresponding call pointer or NULL if not found.
- */
- CSPCall* FindCall( const TName& aCallName );
-
- private:
- /**
- * C++ default constructor
- * @param aObserver the observer for status change (incoming call)
- * @param aLine the line associated with the call
- * @param aLineId line identifier
- */
- CSPCallArray( );
-
- private: // data
-
- /**
- * Pointer array of call objects.
- */
- RPointerArray<CSPCall> iCallArray;
-
- };
-
-#endif // CSPCALLARRAY_H
--- a/convergedcallengine/csplugin/inc/cspcallcommandhandler.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPCallCommandHandler
-*
-*/
-
-
-#ifndef CSPCALLCOMMANDHANDLER_H
-#define CSPCALLCOMMANDHANDLER_H
-
-#include <e32base.h>
-
-#include "mcspcallinformation.h"
-
-class CSPCall;
-class MCCPCallCommandHandling;
-
-/**
-* Handles call adding from calls not done by the plugin.
-*
-* @lib csplugin.dll
-*/
-enum TCSPPendingCallCommand {
- ECSPNone,
- ECSPAnswerCall,
- ECSPDialCall
- };
-
-class CSPCallCommandHandler: public CBase
- {
-
- public: //Constructors and descructor
-
- /**
- * Two-phased constructing for the array.
- */
- static CSPCallCommandHandler* NewL();
-
- /**
- * C++ default destructor
- */
- virtual ~CSPCallCommandHandler( );
-
- /**
- * Indicates active hangup command.
- * @param aCall MT call
- * @return system wide error code
- */
- TInt IndicateActiveHangup( MCCPCallCommandHandling& aCall );
-
- /**
- * Indicates hangup command complete.
- * @param aCall MT call
- * @return system wide error code
- */
- TInt IndicateHangupComplete( MCCPCallCommandHandling& aCall );
-
- /**
- * Indicates active hangup command.
- * @param aCall MT call
- * @return system wide error code
- */
- TInt IndicateDialRequest( MCCPCallCommandHandling& aCall );
-
- /**
- * Indicates active hangup command.
- * @param aCall MT call
- * @return system wide error code
- */
- TInt IndicateAnswerRequest( MCCPCallCommandHandling& aCall );
-
-
- private:
- /**
- * C++ default constructor
- */
- CSPCallCommandHandler();
-
- private: // data
-
- /**
- * Active hangup array.
- */
- RPointerArray<MCCPCallCommandHandling> iActiveHangupArray;
-
- /**
- * Pending command.
- */
- TCSPPendingCallCommand iPendingCommand;
-
- /**
- * Pending call command object.
- * Not own
- */
- MCCPCallCommandHandling* iPendingCall;
-
- };
-
-#endif // CSPCALLCOMMANDHANDLER_H
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspcallinfomonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Monitors changes in remote party info
-* (RMobileCall::TMobileCallRemotePartyInfoV1)
-* Interface :
-*
-*/
-
-
-#ifndef CSPCALLINFOMONITOR_H
-#define CSPCALLINFOMONITOR_H
-
-// INCLUDES
-#include <etelmm.h>
-#include "mcspcallobserver.h"
-
-// FORWARD DECLARATIONS
-
-class CSPCallData;
-class CSPPhoneData;
-class RMobileCall;
-
-// CLASS DEFINITIONS
-
-/** Monitors changes in remote party info.
-* This class monitors remote party info changes in ETel's call objects.
-* @since 3.1
-*/
-NONSHARABLE_CLASS( CSPCallInfoMonitor ): public CActive
- {
- public:
- /**
- * Two-phased constructor
- * @param aObserver Call info change observer
- * @param aCall This is the call to be monitored
- */
- static CSPCallInfoMonitor* NewL(
- MCSPCallObserver& aObserver, RMobileCall &aCall );
-
- /** D'tor. */
- ~CSPCallInfoMonitor();
-
- public:
- /**
- * Starts monitoring.
- */
- void StartMonitoring( );
-
- private:
- /** Prohibited. */
- CSPCallInfoMonitor& operator=( const CSPCallInfoMonitor& );
-
- /**
- * C++ Constructor
- * @param aObserver aObserver Call info change observer
- * @param aCall This is the call to be monitored.
- */
- CSPCallInfoMonitor( MCSPCallObserver& aObserver,
- RMobileCall &aCall );
-
-
- private: // from CActive
- /** @see CActive::RunL() */
- void RunL();
-
- /** @see CActive::DoCancel() */
- void DoCancel();
-
-
-
- private:
-
- /**
- * Observer for info change.
- */
- MCSPCallObserver& iObserver;
-
- /**
- * Pointer to Call object.
- * Not own.
- */
- RMobileCall& iCall;
-
- /**
- * Remote party info.
- */
- RMobileCall::TMobileCallRemotePartyInfoV1 iRemotePartyInfo;
-
- /**
- * packaged remote party info.
- */
- RMobileCall::TMobileCallRemotePartyInfoV1Pckg iRemotePartyInfoPckg;
- };
-
-#endif // CSPCALLINFOMONITOR_H
-
-// End of File
--- a/convergedcallengine/csplugin/inc/cspcenreplistener.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains the header of CenRep Listener class.
-*
-*/
-
-
-#ifndef CSPCENREPLISTENER_H
-#define CSPCENREPLISTENER_H
-
-// INCLUDE FILES
-#include <e32base.h>
-
-// Forward declarations
-class CRepository;
-class MCSPCenRepObserver;
-
-// BASE CLASS
-
-// CLASS DECLARATION
-
-/**
-* CSPCenRepListener manages getting notification on CenRep key changes.
-*/
-class CSPCenRepListener : public CActive
- {
- public:
-
- /**
- * Two-phased construction.
- *
- * @param aUid cenrep Uid
- * @param aKey key to be listened
- * @param aObserver observer for key change.
- * @return instance of the class
- */
- static CSPCenRepListener* NewL( TUid aUid, TUint32 aKey,
- MCSPCenRepObserver* aObserver );
-
- /**
- * Destructor.
- */
- virtual ~CSPCenRepListener();
-
- public:
-
- /**
- * Gets the current value of the monitored setting
- * @param aValue the current value of the monitored setting
- * @return TInt Symbian OS error code from central repository
- */
- TInt Get( TInt& aValue );
-
-
- protected: // From CActive
-
- void DoCancel();
- TInt RunError( TInt aError );
- void RunL();
-
- private:
-
- /**
- * Constructor
- * @param aUid cenrep Uid
- * @param aKey key to be listened
- * @param aObserver observer for key change.
- */
- CSPCenRepListener( TUid aUid, TUint32 aKey,
- MCSPCenRepObserver* aObserver );
-
-
- /**
- * Private constructing.
- */
- void ConstructL();
-
- /**
- * Submits a notification request
- */
- void SubmitNotifyRequestL();
-
-
- private: // Owned by this object
-
- /**
- * UID of CR key.
- */
- TUid iUid;
-
- /**
- * Repository access.
- * Own.
- */
- CRepository* iRepository;
-
- /**
- * Identification number of the monitored setting.
- */
- TUint32 iMonitorSetting;
-
- MCSPCenRepObserver* iObserver;
-};
-
-#endif // CSPCENREPLISTENER_H
--- a/convergedcallengine/csplugin/inc/cspcipheringstatusmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPCipheringStatusMonitor
-*
-*/
-
-
-#ifndef CSPCIPHERINGSTATUSMONITOR_H
-#define CSPCIPHERINGSTATUSMONITOR_H
-
-// INCLUDES
-#include <e32base.h>
-#include <etelmm.h>
-
-#include "cspconsts.h"
-
-
-// FORWARD DECLARATIONS
-class RMmCustomAPI;
-class MCSPSecuritySettingObserver;
-
-// CLASS DECLARATION
-
-
-class CSPCipheringStatusMonitor : public CActive
- {
- public: //Constructors and descructor
-
- /**
- * C++ default constructor
- */
- CSPCipheringStatusMonitor( RMmCustomAPI& aMmCustom,
- MCSPSecuritySettingObserver& aObs );
-
- /**
- * Destructor.
- */
- ~CSPCipheringStatusMonitor();
-
- public:
-
- static CSPCipheringStatusMonitor* NewL( RMmCustomAPI& aMmCustom,
- MCSPSecuritySettingObserver& aObs );
-
- /**
- * Starts monitoring the CW notifications
- */
- void StartMonitoring();
-
- /**
- * Network security status.
- * @return secured status
- */
- TBool NetworkSecurityStatus() const;
-
- /**
- * Secure specified.
- * @return secure specified status
- */
- TBool SecureSpecified() const;
-
- protected: // From CActive
-
- /**
- * Cancels asyncronous request(s).
- */
- void DoCancel();
-
- /**
- * Informs object that asyncronous request is ready.
- */
- void RunL();
-
- private: // data
-
- /**
- * Ciphering info
- */
- RMmCustomAPI::TCipheringInfo iCipheringInfo;
-
- /**
- * CustomAPI handle
- */
- RMmCustomAPI& iMmCustom;
-
- /**
- * Security setting observer.
- */
- MCSPSecuritySettingObserver &iObserver;
-
- /**
- * indicates if ciphering status was retreived for the first time
- */
- TBool iIsInitialised;
-
- /**
- * Call secure status.
- */
- TBool iCallsSecured;
-
- /**
- * Call secure specified status.
- */
- TBool iSecureSpecified;
-
- };
-
-#endif // CSPCIPHERINGSTATUSMONITOR_H
-
-// End of File
--- a/convergedcallengine/csplugin/inc/cspclientvideocall.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements CSPClientVideoCall for CS Call Plug-in
-*
-*/
-
-
-#ifndef CSPCLIENTVIDEOCALL_H
-#define CSPCLIENTVIDEOCALL_H
-
-#include <mccpcscall.h>
-#include <mccpcallobserver.h>
-#include <etel.h>
-#include <etelmm.h>
-#include <cccecallparameters.h>
-
-#include "cspvideocall.h"
-#include "cspconsts.h"
-#include "mcspcallobserver.h"
-#include "mcspcallerrorobserver.h"
-
-
-/**
-* Call class for CS Call Plug-in. Implements the API defined by CCP in classes
-* MCCPCall and MCCPCSCall
-*
-* @lib csplugin.dll
-* @since S60 v5.0
-*/
-class CSPClientVideoCall : public CSPVideoCall
- {
-
- public:
-
- /*
- * Creates a new CSPClientVideoCall object.
- * @since S60 5.0
- * @param aName dialled number (MT) or call name (MO)
- * @param aLine line for opening the call
- * @param aParams call parameters
- * @param aCommonInfo common information for call,
- * @return pointer to created call object
- */
- static CSPClientVideoCall* NewL( const TDesC& aName,
- RMobileLine& aLine,
- const CCCECallParameters& aParams,
- MCSPCommonInfo& aCommonInfo );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPClientVideoCall( );
-
-// from base class CSPVideoCall
-
- /**
- * From CSPCall
- * Updates the state change and forwards the state for observer.
- * @param aState new state of the call
- */
- void NotifyCallStateChanged( MCCPCallObserver::TCCPCallState aState );
-
- /**
- * From CSPCall
- * Updates the state change and forwards the state for observer.
- * @param aState new state of the call
- */
- void NotifyCallStateChangedWithInband( MCCPCallObserver::TCCPCallState aState );
-
- private:
-
- /*
- * C++ default constructor
- * @param aLine open line ready for use
- * @param aServiceId service ID
- * @param aCallType type of call
- * @param aLineType type of line (primary/aux)
- * @param aMobileOriginated true if MO, false if MT
- * @param aName call name (MT) or recipient (MO)
- * @param aExtMoCall is externally created MO call
- */
- CSPClientVideoCall( RMobileLine& aLine,
- const TDesC& aName,
- MCSPCommonInfo& aCommonInfo );
-
- /*
- * Constructing 2nd phase.
- * @since S60 3.2
- */
- void ConstructL( const CCCECallParameters& aParams );
-
- /*
- * Indicate client call.
- * Indication is done in Dialling state and can be done only once
- */
- void IndicateClientCall();
-
- /**
- * Open call handle.
- * Opens an existing handle for client call.
- */
- void OpenCallHandleL();
-
- /**
- * Update call info.
- */
- void UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo );
-
- private: // Data
-
- /**
- * Defines whether client call has been already indicated for this call
- * when Dialling state is entered.
- */
- TBool iClientCallIndicated;
-
- };
-
-
-#endif // CSPCLIENTVIDEOCALL_H
--- a/convergedcallengine/csplugin/inc/cspclientvoicecall.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements CSPClientVoiceCall for CS Call Plug-in
-*
-*/
-
-
-#ifndef CSPCLIENTVOICECALL_H
-#define CSPCLIENTVOICECALL_H
-
-#include "cspvoicecall.h"
-
-/**
-* Client voice call class for CS Call Plug-in.
-*
-* @lib csplugin.dll
-*/
-class CSPClientVoiceCall : public CSPVoiceCall
- {
-
- public:
-
- /*
- * Creates a new CSPClientVoiceCall object.
- * @since S60 5.0
- * @param aName dialled number (MT) or call name (MO)
- * @param aLine line for opening the call
- * @param aParams call parameters
- * @param aCommonInfo common information for call,
- * @return pointer to created call object
- */
- static CSPClientVoiceCall* NewL( const TDesC& aName,
- RMobileLine& aLine,
- const CCCECallParameters& aParams,
- MCSPCommonInfo& aCommonInfo );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPClientVoiceCall( );
-
- // from base class CSPVoiceCall
-
- /**
- * From CSPVoiceCall
- * Updates the state change and forwards the state for observer.
- * @param aState new state of the call
- */
- void NotifyCallStateChanged( MCCPCallObserver::TCCPCallState aState );
-
- /**
- * From CSPVoiceCall
- * Updates the state change and forwards the state for observer.
- * @param aState new state of the call
- */
- void NotifyCallStateChangedWithInband( MCCPCallObserver::TCCPCallState aState );
-
- private:
-
- /*
- * Voice call constructor.
- * @param aLine open line ready for use
- * @param aName remote party or call name depending on direction
- * @param aCommonInfo reference to common info interface
- */
- CSPClientVoiceCall( RMobileLine& aLine,
- const TDesC& aName,
- MCSPCommonInfo& aCommonInfo );
-
- /*
- * Constructing 2nd phase.
- */
- void ConstructL( const CCCECallParameters& aParams );
-
- /*
- * Indicate client call.
- * Indication is done in Dialling state and can be done only once
- */
- void IndicateClientCall();
-
- /**
- * Open call handle.
- * Opens an existing handle for client call.
- */
- void OpenCallHandleL();
-
- /**
- * Update call info.
- */
- void UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo );
-
- private: // Data
-
- /**
- * Defines whether client call has been already indicated for this call
- * when Dialling state is entered.
- */
- TBool iClientCallIndicated;
-
- };
-
-
-#endif // CSPCLIENTVOICECALL_H
--- a/convergedcallengine/csplugin/inc/cspconferencecall.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,316 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements CSPConferenceCall for CS Call Plug-in
-*
-*/
-
-
-
-#ifndef CSPCONFERENCECALL_H
-#define CSPCONFERENCECALL_H
-
-#include <mccpconferencecall.h>
-#include <mccpconferencecallobserver.h>
-#include <mccpcallobserver.h>
-#include <mccpcscall.h>
-#include <etel.h>
-#include <etelmm.h>
-
-#include "mcspconferencestatusobserver.h"
-#include "cspconsts.h"
-#include "cspetelconferencecallrequester.h" // For the requester and TConferenceRequestType
-
-
-class MCCPForwardProvider;
-class MCCPTransferProvider;
-class MCCPObserver;
-class MCSPCallInformation;
-class CSPConferenceCallObserver;
-class RMobileConferenceCall;
-class CSPEtelConferenceStatusMonitor;
-class CSPEtelConferenceEventMonitor;
-class CSPEtelConferenceCapsMonitor;
-
-
-/**
-* Call class for CS Call Plug-in. Implements the API defined by CCP in classes
-* MCCPCall and MCCPCSCall
-*
-* @lib csplugin.dll
-*/
-class CSPConferenceCall : public CBase,
- public MCCPConferenceCall,
- public MCSPConferenceStatusObserver
- {
-
- public:
- /*
- * Creates a new CSPConferenceCall object.
- * @param aPhone reference to phone object
- * @return pointer to created call object
- * @param aServiceId the service id
- */
- static CSPConferenceCall* NewL(
- RMobilePhone& aPhone,
- MCSPCallInformation& aCallInfo,
- TUint32 aServiceId );
-
- /*
- * C++ default destructor
- */
- virtual ~CSPConferenceCall( );
-
- /**
- * Getter for observer
- * @return observer for CS calls.
- */
- MCCPCallObserver* Observer() const;
-
- /**
- * Notifies call specific event to observers.
- * @param aEvent conference event that was occurred
- * @param aCallName the name of the related call object
- */
- void NotifyEvent(
- MCCPConferenceCallObserver::TCCPConferenceCallEvent aEvent,
- TName& aCallName );
-
- /**
- * Notifies non-'call specific' event to observers.
- * @param aEvent conference event that was occurred,
- */
- void NotifyEvent(
- MCCPConferenceCallObserver::TCCPConferenceCallEvent aEvent );
-
- /**
- * Notifies about conference call request related errors.
- */
- void NotifyConferenceError( TCCPConferenceCallError aErr );
-
- /**
- * Handles caps change.
- * @param aNewCaps new caps
- */
- void ConferenceCapsChanged( TUint32 aNewCaps );
-
-// from base class MCSPConferenceStatusObserver
-
- /**
- * From MCSPConferenceStatusObserver.
- * Notifies event to observers.
- * @param aStatus new status of the conference call
- */
- void NotifyStateChange(
- MCSPConferenceStatusObserver::TCSPConferenceState aStatus );
-
-// from base class MCCPConferenceCall
-
- /**
- * From MCCPConferenceCall.
- * Adds new call to conference call.
- * @param aCall Call to be added to conference
- * @return Leaves in case of an error.
- * KErrArgument, KErrNoMemory
- */
- void AddCallL( MCCPCall* aCall );
-
- /**
- * From MCCPConferenceCall.
- * Removes call from conference call.
- * @param aCall Call to be removed from conference
- * @return In error case leaves.
- * KErrArgument, KErrNotFound
- */
- void RemoveCallL( MCCPCall* aCall );
-
- /**
- * From MCCPConferenceCall.
- * Returns number of calls in conference call.
- * @param aCallCount Number of calls in conference.
- * @return KErrNone if succesfull, otherwise system wide error code.
- */
- TInt CallCount( ) const;
-
- /**
- * From MCCPConferenceCall.
- * Switch to a private call with one call from conference call.
- * @param aCall Call to be removed from conference
- * @return In error case leaves.
- * KErrArgument, KErrNotFound
- */
- void GoOneToOneL( MCCPCall& aCall );
-
- /**
- * Adds current calls (1 hold + connected )
- * to part of conference
- * @leave In case of an error system wide error code
- */
- void CurrentCallsToConferenceL();
-
- /**
- * From MCCPConferenceCall
- * Returns serviceId
- * @since S60 3.2
- * @return TUint32 ServiceId
- */
- TUint32 ServiceId() const;
-
- /**
- * From MCCPConferencCall
- * Ends an ongoing call.
- * @since S60 3.2
- */
- TInt HangUp();
-
- /**
- * From MCCPConferenceCall
- * Puts the specified call on hold.
- * @since S60 3.2
- */
- TInt Hold();
-
- /**
- * From MCCPConferenceCall
- * Resumes the call.
- * @since S60 3.2
- */
- TInt Resume();
-
- /**
- * From MCCPConferenceCall
- * Swaps a connected call to its opposite state either active or on hold
- * @since S60 3.2
- */
- TInt Swap();
-
- /**
- * Adds a new observer for the conference call object.
- * @since S60 3.2
- * @param aObserver the conference observer to be added
- */
- void AddObserverL( const MCCPConferenceCallObserver& aObserver );
-
- /**
- * Removes an observer.
- * @since S60 3.2
- * @param aObserver the observer to be removed
- * @return system wide error code
- */
- TInt RemoveObserver( const MCCPConferenceCallObserver& aObserver );
-
- /**
- * Get conference participants.
- * @since S60 5.0
- * @param aCallArray array where participating calls are stored
- * @return system wide error code
- */
- TInt GetCallArray( RPointerArray<MCCPCall>& aCallArray );
-
- private:
-
- /*
- * C++ default constructor
- * @param aPhone handle to the ETel Phone
- * @param aCallInfo call information
- * @param aServiceId service id
- */
- CSPConferenceCall( RMobilePhone& aPhone,
- MCSPCallInformation& aCallInfo,
- TUint32 aServiceId );
-
- /*
- * Constructing 2nd phase.
- * @since S60 3.2
- * @param aObserver the CCP call observer,
- */
- void ConstructL( );
-
- /**
- * Get conference state from ETel.
- * @since S60 5.0
- * @param aState param for storing conference call state
- * @return system wide error code
- */
- TInt GetConferenceCallState(
- MCCPConferenceCallObserver::TCCPConferenceCallState& aState );
-
- private:
-
- /**
- * Call status monitor.
- * Own.
- */
- CSPEtelConferenceStatusMonitor* iCallStatusMonitor;
-
- /**
- * Call event monitor.
- * Own.
- */
- CSPEtelConferenceEventMonitor* iCallEventMonitor;
-
- /**
- * Call caps monitor.
- * Own.
- */
- CSPEtelConferenceCapsMonitor* iCallCapsMonitor;
-
- /**
- * ETel call object
- */
- RMobileConferenceCall iCall;
-
- /**
- * ETel phone
- */
- RMobilePhone& iPhone;
-
- /**
- * Conference call state.
- */
- MCCPConferenceCallObserver::TCCPConferenceCallState iCallState;
-
- /**
- * Makes the asynchronic requests for various purposes.
- */
- CSPEtelConferenceCallRequester* iRequester;
-
- /**
- * Observer array for conference states, events and errors.
- */
- RPointerArray<MCCPConferenceCallObserver> iObservers;
-
- /**
- * Call count for adding call.
- */
- TInt iCallCountForAddCall;
-
- /**
- * Call Information for resolving call pointers from
- * the call names.
- */
- MCSPCallInformation& iCallInfo;
-
- /**
- * Service ID
- */
- TUint32 iServiceId;
-
- /**
- * Call name of a last call added to this conference..
- */
- TName iAddedCallName;
-
- };
-
-#endif // CSPCONFERENCECALL_H
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspconsts.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Constants for CSP
-*
-*/
-
-
-
-#ifndef CCSPCONSTS_H
-#define CCSPCONSTS_H
-
-_LIT( KCSPName,"CSP" );
-
-
-//The length of a pause created during dialling by the comma character (',') measured in seconds.
-const TUint KCSPDefaultInterval = 2;
-
-// The boolean indicating the autoreadial is on or off
-const TBool KCSPDefaultAutoRedial = EFalse;
-
-/**
-* Required for notifying Incoming Call Monitor.
-*/
-const TInt KCSPImplementationUidInt = 0x102828E5;
-
-/**
-* Implementation uid of CS Plugin.
-*/
-const TUid KCSPImplementationUid = { KCSPImplementationUidInt };
-
-/**
-* Number of message slots in RTelServer
-*/
-const TInt KNbrOfMessageSlots = 128;
-
-const TInt KCSPPhoneNumberMaxLength = 100;
-
-const TInt KCSPCallingNameMaxLength = 80;
-
-#endif // CCSPCONSTS_H
--- a/convergedcallengine/csplugin/inc/cspdevsound.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Wrapper for CMMFDevSound
-*
-*/
-
-#ifndef CSPDEVSOUND_H
-#define CSPDEVSOUND_H
-
-#include <sounddevice.h>
-
-class MCSPDevSoundObserver;
-
-/**
- * Wrapper for CMMFDevSound
- *
- */
-NONSHARABLE_CLASS( CSPDevSound ):
- public CBase,
- public MDevSoundObserver
- {
-public:
-
- /**
- * Destructor.
- */
- virtual ~CSPDevSound();
-
- /**
- * Activates the dev sound stream. MCSPDevSoundObserver methods are called
- * when activation goes ok or fails. If the stream is already active or
- * activating then nothing is done.
- */
- virtual void Activate();
-
- /**
- * Deactivates the devsound stream. If stream is not active or
- * activation is not ongoing then nothing is done.
- */
- virtual void Deactivate();
-
- /**
- * Indicates that activation is ongoing,
- * but the result of the activation is still unknown.
- * @return ETrue - activation ongoing, EFalse - activation not ongoing.
- */
- TBool IsActivationOngoing() const;
-
- /**
- * Determines wether the devsound stream is active or not.
- * @return ETrue - Stream is active, EFalse - Stream not active.
- */
- TBool IsActive() const;
-
- CMMFDevSound& DevSound();
-
-// from base class MDevSoundObserver
-
- /**
- * From MDevSoundObserver
- * Empty implementation
- */
- void InitializeComplete( TInt aError );
-
- /**
- * From MDevSoundObserver
- * Empty implementation
- */
- void BufferToBeFilled( CMMFBuffer* aBuffer );
-
- /**
- * From MDevSoundObserver
- * Empty implementation
- */
- void PlayError( TInt aError );
-
- /**
- * From MDevSoundObserver
- * Empty implementation
- */
- void ToneFinished( TInt aError );
-
- /**
- * From MDevSoundObserver
- * Empty implementation
- */
- void BufferToBeEmptied( CMMFBuffer* aBuffer );
-
- /**
- * From MDevSoundObserver
- * Empty implementation
- */
- void RecordError( TInt aError );
-
- /**
- * From MDevSoundObserver
- * Empty implementation
- */
- void ConvertError( TInt aError );
-
- /**
- * From MDevSoundObserver
- * Empty implementation
- */
- void DeviceMessage( TUid aMessageType, const TDesC8& aMsg );
-
-protected:
-
- CSPDevSound( MCSPDevSoundObserver& aObserver );
-
- void ConstructL(
- TMMFState aMode, TUint aAudioPreference, TUint aAudioPriority );
-
-private:
-
- /**
- * Derived class has to activate the stream here.
- */
- virtual void DoActivateL() = 0;
-
-protected: // Data
-
- /**
- * Indication if device is activated. Derived class has to update this.
- */
- TBool iActive;
-
- /**
- * Indication if activation is ongoing.
- * Derived class has to update this.
- */
- TBool iActivationOngoing;
-
- /**
- * Devsound instance
- * Own.
- */
- CMMFDevSound* iDevSound;
-
- /**
- * Observer for successfull activation.
- * Not own.
- */
- MCSPDevSoundObserver& iObserver;
-
- /**
- * Audio priority settings for Devsound.
- */
- TMMFPrioritySettings iPrioritySettings;
-
-
- };
-
-#endif // CSPDEVSOUND_H
--- a/convergedcallengine/csplugin/inc/cspdtmfprovider.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,191 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header of CSPDTMFProvider which provides DTMF functionality.
-*
-*/
-
-
-#ifndef CSPDTMFPROVIDER_H
-#define CSPDTMFPROVIDER_H
-
-
-#include <e32base.h>
-#include <mccpdtmfprovider.h>
-#include <mccpdtmfobserver.h>
-
-
-class RMobilePhone;
-class CSPEtelDtmfMonitor;
-class CSPEtelDtmfStopMonitor;
-class RMmCustomAPI;
-
-/**
-* Makes asynchronic request to ETel interface according to given request type.
-* Provides canceling via CActive::Cancel().
-*
-*/
-class CSPDTMFProvider: public CActive,
- public MCCPDTMFProvider
- {
-
- public:
-
- /**
- * Two phased constructing of the DTMF provider instance.
- * @param aPhone mobile phone handle
- * @param aMmCustom custom API handle for special DTMF event
- * monitoring.
- * @return the DTMF provider instance
- */
- static CSPDTMFProvider* NewL( RMobilePhone& aPhone,
- RMmCustomAPI& aMmCustom );
-
-
- /**
- * C++ default destructor
- */
- virtual ~CSPDTMFProvider( );
-
- /**
- * HandleDTMFEvents.
- * @since S60 3.2
- * @param aEvent Event type
- * @param aError Error code
- * @param aTone Character
- */
- void NotifyDTMFEvent( const MCCPDTMFObserver::TCCPDtmfEvent aEvent,
- const TInt aError,
- const TChar aTone );
-
-
-// from base class MCCPDTMFProvider
- /**
- * Cancels asynchronous DTMF string sending.
- * @return KErrNone if succesfull, otherwise another system wide error code
- */
- TInt CancelDtmfStringSending();
-
- /**
- * Starts the transmission of a single DTMF tone across a
- * connected and active call.
- * @param aTone Tone to be played.
- * @return KErrNone if succesfull, otherwise another system wide error code
- */
- TInt StartDtmfTone( const TChar aTone );
-
- /**
- * Stops playing current DTMF tone.
- * @return KErrNone if succesfull, otherwise another system wide error code
- */
- TInt StopDtmfTone();
-
- /**
- * Plays DTMF string.
- * @param aString String to be played.
- * @return KErrNone if succesfull, otherwise another system wide error code
- * KErrArgument if the specified string contains illegal DTMF characters
- */
- TInt SendDtmfToneString( const TDesC& aString );
-
- /**
- * Continue or cancel sending DTMF string which was stopped with 'w'-character
- * in string.
- * @param aContinue ETrue if sending of the DTMF string should continue,
- * EFalse if the rest of the DTMF string is to be discarded.
- * @return KErrNone if succesfull, otherwise another system wide error code
- */
- TInt ContinueDtmfStringSending( const TBool aContinue );
-
- /**
- * Add an observer for DTMF related events.
- * Plug-in dependent feature if duplicates or more than one observers
- * are allowed or not. Currently CCE will set only one observer.
- * @since S60 v3.2
- * @param aObserver Observer
- * @leave system error if observer adding fails
- */
- void AddObserverL( const MCCPDTMFObserver& aObserver );
-
- /**
- * Remove an observer.
- * @since S60 v3.2
- * @param aObserver Observer
- * @return KErrNone if removed succesfully. KErrNotFound if observer was not found.
- * Any other system error depending on the error.
- */
- TInt RemoveObserver( const MCCPDTMFObserver& aObserver );
-
-// from base class CActive
- protected:
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
-
- private:
- /**
- * Constructs the requester.
- *
- * @param aPhone handle to ETel phone
- * @param aMmCustom custom API handle
- */
- CSPDTMFProvider( RMobilePhone& aPhone, RMmCustomAPI& aMmCustom );
-
- /**
- * Constructing the provider in the second phase.
- */
- void ConstructL();
-
- private: // data
-
- /**
- * DTMF event observer.
- */
- RPointerArray<MCCPDTMFObserver> iObservers;
-
- /**
- * ETel phone handle for DTMF functionality.
- */
- RMobilePhone& iPhone;
-
- /**
- * Monitor for DTMF events and changes.
- * Own.
- */
- CSPEtelDtmfMonitor* iMonitor;
-
- /**
- * Monitor for DTMF stopping.
- * Own.
- */
- CSPEtelDtmfStopMonitor* iStopMonitor;
-
- /**
- * Custom API reference.
- */
- RMmCustomAPI& iMmCustom;
-
- };
-
-#endif // CSPDTMFPROVIDER
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspetelcallcapsmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPEtelCallCapsMonitor
-*
-*/
-
-
-#ifndef CSPETELCALLCAPSMONITOR_H
-#define CSPETELCALLCAPSMONITOR_H
-
-#include <e32base.h>
-#include <etelmm.h>
-
-
-class MCSPCallObserver;
-
-
-/**
-* Monitors single ETel RMobileCall for call capss.
-*
-* This monitor is applied only for listening incoming calls, i.e.
-* line capabilites are not monitored.
-*
-* @lib csplugin.dll
-* @since S60 v3.2
-*/
-class CSPEtelCallCapsMonitor: public CActive
- {
-
- public: //Constructors and descructor
-
-
- /**
- * Two-phased constructing for the monitor.
- *
- * @param aObserver the observer for getting notification
- * @param aCall the line to monitor
- */
- static CSPEtelCallCapsMonitor* NewL(
- MCSPCallObserver& aObserver,
- RMobileCall& aCall );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPEtelCallCapsMonitor( );
-
- /**
- * Start monitoring call capss
- * @since S60 3.2
- */
- void StartMonitoring();
-
- /**
- * Fetches call control caps.
- * @return call control caps flags.
- */
- TUint32 FetchCallControlCapsL();
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
- private:
- /**
- * C++ default constructor
- * @param aObserver the observer for status change (incoming call)
- * @param aCall the line associated with the call
- */
- CSPEtelCallCapsMonitor( MCSPCallObserver& aObserver,
- RMobileCall& aCall );
-
- /**
- * Constructs the monitor in the second phase.
- */
- void ConstructL();
-
-
- private: // data
- /**
- * Forwards caps change.
- */
- MCSPCallObserver& iObserver;
-
- /**
- * Call that is being observed.
- */
- RMobileCall& iCall;
-
- /**
- * Call capabilities.
- */
- RMobileCall::TMobileCallCapsV1 iCaps;
- RMobileCall::TMobileCallCapsV1Pckg iCapsPckg;
-
-
-
- };
-
-#endif // CSPETELCALLCAPSMONITOR_H
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspetelcalleventmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Monitors call events from ETel
-*
-*/
-
-
-#ifndef CSPETELCALLEVENTMONITOR_H
-#define CSPETELCALLEVENTMONITOR_H
-
-#include <e32base.h>
-#include <etelmm.h>
-
-class CSPCall;
-class MCCPCallObserver;
-class MCSPCallObserver;
-
-class CSPEtelCallEventMonitor
- : public CActive
- {
- public: //Constructors and descructor
-
- /**
- * Two-phased constructing for the monitor.
- * @param aObserver the observer for events
- * @param aCall actual object of the monitoring
- */
- static CSPEtelCallEventMonitor* NewL( MCSPCallObserver& aObserver,
- RMobileCall& aCall );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPEtelCallEventMonitor( );
-
- /**
- * Start monitoring call events
- */
- void StartMonitoring();
-
- protected: // From CActive
-
- /**
- * From CActive
- * RunL
- */
- void RunL();
-
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
-
- private:
-
- /**
- * C++ constructor for the monitor.
- * @param aObserver observers events
- * @param aCall actual object of the monitoring
- */
- CSPEtelCallEventMonitor( MCSPCallObserver& aObserver,
- RMobileCall& aCall );
-
-
- private: // data
-
- /**
- * Observer for call events.
- */
- MCSPCallObserver& iObserver;
-
- /**
- * ETel call which this monitors
- */
- RMobileCall& iCall;
-
- /**
- * Pointer for recovering from a situation where CCE releases call
- * during observer-call sequence.
- */
- TBool* iDestrPtr;
-
-
- protected:
- /**
- * Call event
- */
- RMobileCall::TMobileCallEvent iCallEvent;
-
- };
-
-#endif // CSPETELCALLEVENTMONITOR_H
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspetelcallrequester.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Delivers asynchronous requests to ETel
-*
-*/
-
-
-#ifndef CSPETELCALLREQUESTER_H
-#define CSPETELCALLREQUESTER_H
-
-
-#include <e32base.h>
-#include <etelmm.h>
-#include <rmmcustomapi.h>
-#include <ccpdefs.h>
-
-class MCSPCallErrorObserver;
-
-/**
-* Makes asynchronic request to ETel interface according to given request type.
-* Provides canceling via CActive::Cancel().
-*
-*/
-class CSPEtelCallRequester
- : public CActive
- {
-
- public:
- /**
- * Supported request types.
- */
- enum TRequestType {
- ERequestTypeNone,
- ERequestTypeDial,
- ERequestTypeAnswer,
- ERequestTypeHangup,
- ERequestTypeHold,
- ERequestTypeResume,
- ERequestTypeGoOneToOne,
- ERequestTypeSwap,
- ERequestTypeDialEmergency
- };
-
- /**
- * Constructs the requester via two phase.
- *
- * @param aObserver the observer for request errors
- * @param aCall ETel RMobileCall reference that is the object
- * of the request.
- */
- static CSPEtelCallRequester* NewL( MCSPCallErrorObserver& aObserver,
- RMobileCall& aCall );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPEtelCallRequester( );
-
- /**
- * Makes the request. Note that ERequestTypeDial is made with a
- * separate MakeDialRequest function.
- *
- * @since S60 3.2
- * @param aRequest type of request
- * @return KErrNone if request was sent successfully.
- * KErrNotSupported if the given request is not supported
- * KErrArgument if the specified request is not known.
- * KErrUnknown if unspecified error (should not happen)
- */
- TInt MakeRequest( TRequestType aRequest );
-
- /**
- * Cancels the request.
- *
- * @since S60 3.2
- * @param aRequest type of request
- * @return KErrNone if request was sent successfully.
- * KErrNotSupported if the given request is not supported
- * KErrArgument if the specified request is not known.
- * KErrUnknown if unspecified error (should not happen)
- */
- TInt CancelRequest( TRequestType aRequest );
-
-
- /**
- * Makes a dial request.
- * @since S60 3.2
- * @param aCallParamsPckg call parametrs
- * @param aRemoteParty phone number
- * @return KErrNone if successful, else error code
- */
- TInt MakeDialRequest(
- const TDesC8& aCallParams,
- TDesC& aRemoteParty );
-
- /**
- * Makes a dial request without FDN check.
- * @since S60 3.2
- * @param aCallParamsPckg call parametrs
- * @param aRemoteParty phone number
- * @return KErrNone if successful, else error code
- */
- TInt MakeDialNoFdnCheckRequest(
- const TDesC8& aCallParams,
- TDesC& aRemoteParty );
-
-
- /**
- * Makes a answer request.
- * @since S60 3.2
- * @param aCallParams call parametrs
- * @return KErrNone if successful, else error code
- */
- TInt MakeAnswerRequest(
- const TDesC8& aCallParams );
-
- /**
- * Makes emergency request.
- * @param aRecipient emengency number
- * @return error code
- */
- TInt MakeDialEmergencyRequest(
- const RMobileENStore::TEmergencyNumber& aRecipient );
-
- /**
- * Mapping between ETel and CCP errors.
- * @param aErrorCode ETel error code
- * @return CCP error code
- */
- TCCPError MapError( TInt aErrorCode );
-
- /**
- * Getter for the active request.
- * @return request.
- */
- TRequestType Request();
-
- /**
- * Cancel dial (applies both emergency and normal calls)
- * @return result of cancel (system wide error code)
- */
- TInt CSPEtelCallRequester::DialCancel();
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
-
- private:
-
- /**
- * Constructs the requester.
- *
- * @param aObserver the observer for request errors
- * @param aCall ETel RMobileCall reference that is the object
- * of the request.
- */
- CSPEtelCallRequester( MCSPCallErrorObserver& aObserver,
- RMobileCall& aCall );
-
-
- private: // data
- /**
- * Observer for request errors.
- */
- MCSPCallErrorObserver& iObserver;
-
- /**
- * ETel call which this monitors
- */
- RMobileCall& iCall;
-
- /**
- * Type of request.
- */
- TRequestType iRequestType;
-
- };
-
-#endif // CSPETELCALLREQUESTER_H
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspetelcallstatusmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Monitors call status changes from ETel
-*
-*/
-
-
-#ifndef CSPETELCALLSTATUSMONITOR_H
-#define CSPETELCALLSTATUSMONITOR_H
-
-#include <e32base.h>
-#include <etelmm.h>
-
-class MCSPCallObserver;
-
-
-NONSHARABLE_CLASS(CSPEtelCallStatusMonitor) : public CActive
- {
- public: //Constructors and descructor
-
- /**
- * Two-phased constructing for the monitor.
- * @param aObserver observer for call status changes
- * @param aCall actual object of the monitoring
- */
- static CSPEtelCallStatusMonitor* NewL( MCSPCallObserver& aObserver,
- RMobileCall& aCall );
-
- /**
- * Destructor of the monitor which cancels ongoing monitoring.
- */
- virtual ~CSPEtelCallStatusMonitor( );
-
- /**
- * Start monitoring call events
- * @since S60 3.2
- */
- void StartMonitoring();
-
- /**
- * State of call.
- * @return ETel state
- */
- RMobileCall::TMobileCallStatus State();
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
-
- private:
-
- /**
- * C++ constructor for the monitor.
- * @param aObserver observer for status changes
- * @param aCall actual object of the monitoring
- */
- CSPEtelCallStatusMonitor( MCSPCallObserver& aObserver, RMobileCall& aCall );
-
- private: // data
- /**
- * Observer for state changes.
- */
- MCSPCallObserver& iObserver;
-
- /**
- * ETel call which this monitors
- */
- RMobileCall& iCall;
-
- /**
- * Pointer for recovering from a situation where CCE releases call
- * during observer-call sequence.
- */
- TBool* iDestrPtr;
-
- protected:
- /**
- * ETel call status
- */
- RMobileCall::TMobileCallStatus iCallStatus;
-
- };
-
-#endif // CSPETELCALLSTATUSMONITOR_H
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspetelcallwaitingrequester.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Fetches call waiting status from ETel
-*
-*/
-
-
-#ifndef CSPETELCALLWAITINGREQUESTER_H
-#define CSPETELCALLWAITINGREQUESTER_H
-
-
-#include <e32base.h>
-#include <mccpcscall.h>
-#include <mccecall.h>
-#include <etelmm.h>
-
-class RMobilePhone;
-class CRetrieveMobilePhoneCWList;
-
-/**
-* Makes asynchronic request to ETel interface according to given request type.
-* Provides canceling via CActive::Cancel().
-*
-*/
-class CSPEtelCallWaitingRequester
- : public CActive
- {
-
- public:
-
- /**
- * Constructs the requester via two phase.
- *
- * @param aPhone mobile phone reference needed for reading cw setting
- * @return requester object
- */
- static CSPEtelCallWaitingRequester* NewL( RMobilePhone& aPhone );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPEtelCallWaitingRequester( );
-
- /**
- * Makes the request. Note that ERequestTypeDial is made with a
- * separate MakeDialRequest function.
- *
- * @since S60 3.2
- * @param aRequest type of request
- * @return ETrue if active, EFalse if not
- */
- void GetCallWaitingL( const CCCECallParameters& iParams,
- TBool& aCallWaitingStatus );
-
-
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
-
- private:
-
- /**
- * Requester can be inactive (from boot to first Cw request),
- * requesting value from network
- * (with first MT call that gets Queue-request from CCE),
- * or monitoring (after first request).
- */
- enum ECSPCwRequesterMode {
- ECwRequesterInactive,
- ECwRequesterGetStarted,
- ECwRequesterMonitoring
- };
-
- private:
-
- /**
- * Constructor.
- * @param aPhone mobile phone reference needed for reading cw setting
- *
- */
- CSPEtelCallWaitingRequester::CSPEtelCallWaitingRequester(RMobilePhone& aPhone);
-
- /**
- * Constructs the requester.
- *
- * @param aPhone phone reference
- */
- void CSPEtelCallWaitingRequester::ConstructL();
-
- /**
- * Starts monitoring call waiting setting.
- */
- void StartMonitoring();
-
- /**
- * Returns the call waiting status from call waiting status list by linetype.
- */
- void GetCallWaitingStatusByLineType( const CCCECallParameters& iParams,
- TBool& aCallWaitingStatus );
-
-
- private: // data
-
- /**
- * List of call waiting settings.
- * Own.
- */
- CRetrieveMobilePhoneCWList* iList;
-
- /**
- * Making the asynchronous request synchronous.
- */
- CActiveSchedulerWait iWait;
-
- /**
- * Phone handle for listening cw status changes.
- */
- RMobilePhone& iPhone;
-
- /**
- * Cw status descriptor for reading changed cw status.
- */
- TPckgBuf<RMobilePhone::TMobilePhoneCWInfoEntryV1> iDesCwStatus;
-
- /**
- * Current mode according to the enumeration.
- */
- ECSPCwRequesterMode iMode;
-
- /**
- * Actual call waiting status for primary line: On/Off = True/False.
- */
- TBool iPrimaryLineCwStatus;
-
- /**
- * Actual call waiting status for aux line: On/Off = True/False.
- */
- TBool iAuxLineCwStatus;
- };
-
-#endif // CSPETELCALLWAITINGREQUESTER_H
--- a/convergedcallengine/csplugin/inc/cspetelconferencecallrequester.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,143 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Delivers asynchronous requests to ETel
-*
-*/
-
-
-#ifndef CSPETELCONFERENCECALLREQUESTER_H
-#define CSPETELCONFERENCECALLREQUESTER_H
-
-
-#include <e32base.h>
-#include <etelmm.h>
-#include <rmmcustomapi.h>
-
-class CSPCall;
-class MCCPCallObserver;
-class CSPConferenceCall;
-
-/**
-* Makes asynchronic request to ETel interface according to given request type.
-* Provides canceling via CActive::Cancel().
-*
-*/
-class CSPEtelConferenceCallRequester
- : public CActive
- {
-
- public:
- /**
- * Supported request types.
- */
- enum TConferenceRequestType {
- EConferenceRequestTypeAddCall,
- EConferenceRequestTypeHangup,
- EConferenceRequestTypeHold,
- EConferenceRequestTypeResume,
- EConferenceRequestTypeCreateConference,
- EConferenceRequestTypeSwap
- };
-
- /**
- * Constructs the requester via two phase.
- *
- * @param aOwner the owner for the requester
- * @param aCall ETel RMobileCall reference that is the object
- * of the request.
- */
- static CSPEtelConferenceCallRequester* NewL(
- CSPConferenceCall& aOwner,
- RMobileConferenceCall& aCall );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPEtelConferenceCallRequester( );
-
- /**
- * Makes the request. Note that ERequestTypeDial is made with a
- * separate MakeDialRequest function.
- *
- * @since S60 3.2
- * @param aRequest type of request
- * @return KErrNone if request was sent successfully.
- * KErrNotSupported if the given request is not supported
- * KErrArgument if the specified request is not known.
- * KErrUnknown if unspecified error (should not happen)
- */
- TInt MakeRequest( TConferenceRequestType aRequest );
-
-
- /**
- * Makes a dial request.
- * @since S60 3.2
- * @param aCallName call name to be added
- * @return KErrNone if successful, else error code
- */
- TInt MakeAddCallRequest( const TName& aCallName );
-
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
-
- private:
-
- /**
- * Constructs the requester.
- *
- * @param aOwner the owner for the requester
- * @param aCall ETel RMobileCall reference that is the object
- * of the request.
- */
- CSPEtelConferenceCallRequester( CSPConferenceCall& aOwner,
- RMobileConferenceCall& aCall );
-
- /**
- * Constructing in the second phase.
- */
- void ConstructL();
-
- private: // data
- /**
- * Call object which owns this monitor
- */
- CSPConferenceCall& iOwner;
-
- /**
- * ETel call which this monitors
- */
- RMobileConferenceCall& iCall;
-
- /**
- * Type of request.
- */
- TConferenceRequestType iRequestType;
-
- };
-
-#endif // CSPETELCONFERENCECALLREQUESTER_H
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspetelconferencecapsmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,121 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPEtelConferenceCapsMonitor
-*
-*/
-
-
-#ifndef CSPETELCONFERENCECAPSMONITOR_H
-#define CSPETELCONFERENCECAPSMONITOR_H
-
-#include <e32base.h>
-#include <etelmm.h>
-
-
-class CSPConferenceCall;
-
-
-/**
-* Monitors single ETel RMobileConferenceCall for conference call capss.
-*
-* This monitor is applied only for listening incoming calls, i.e.
-* line capabilites are not monitored.
-*
-* @lib csplugin.dll
-* @since S60 v3.2
-*/
-class CSPEtelConferenceCapsMonitor: public CActive
- {
-
- public: //Constructors and descructor
-
-
- /**
- * Two-phased constructing for the monitor.
- *
- * @param aOwner the observer for getting notification
- * @param aCall the line to monitor
- */
- static CSPEtelConferenceCapsMonitor* NewL(
- CSPConferenceCall& aOwner,
- RMobileConferenceCall& aCall );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPEtelConferenceCapsMonitor( );
-
- /**
- * Start monitoring call capss
- * @since S60 3.2
- */
- void StartMonitoring();
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
- private:
- /**
- * C++ default constructor
- * @param aOwner the observer for status change (incoming call)
- * @param aCall the line associated with the call
- */
- CSPEtelConferenceCapsMonitor( CSPConferenceCall& aOwner,
- RMobileConferenceCall& aCall );
-
- /**
- * Constructs the monitor in the second phase.
- */
- void ConstructL();
-
-
- private: // data
- /**
- * Forwards capss.
- */
- CSPConferenceCall& iOwner;
-
- /**
- * Conference call that is being observed.
- */
- RMobileConferenceCall& iCall;
-
- /**
- * Caps received.
- */
- TUint32 iCaps;
-
- /**
- * Pointer for recovering from a situation where CCE releases call
- * during observer-call sequence.
- */
- TBool* iDestrPtr;
-
-
- };
-
-#endif // CSPETELCONFERENCECAPSMONITOR_H
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspetelconferenceeventmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPEtelConferenceEventMonitor
-*
-*/
-
-
-#ifndef CSPETELCONFERENCEEVENTMONITOR_H
-#define CSPETELCONFERENCEEVENTMONITOR_H
-
-#include <e32base.h>
-#include <etelmm.h>
-
-
-class CSPCall;
-class CSPConferenceCall;
-
-
-/**
-* Monitors single ETel RMobileConferenceCall for conference call events.
-*
-* This monitor is applied only for listening incoming calls, i.e.
-* line capabilites are not monitored.
-*
-* @lib csplugin.dll
-* @since S60 v3.2
-*/
-class CSPEtelConferenceEventMonitor: public CActive
- {
-
- public: //Constructors and descructor
-
-
- /**
- * Two-phased constructing for the monitor.
- *
- * @param aOwner the observer for getting notification
- * @param aPhone the line to monitor
- */
- static CSPEtelConferenceEventMonitor* NewL(
- CSPConferenceCall& aOwner,
- RMobileConferenceCall& aPhone );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPEtelConferenceEventMonitor( );
-
- /**
- * Start monitoring call events
- * @since S60 3.2
- */
- void StartMonitoring();
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
- private:
- /**
- * C++ default constructor
- * @param aOwner the observer for status change (incoming call)
- * @param aPhone the line associated with the call
- */
- CSPEtelConferenceEventMonitor( CSPConferenceCall& aOwner,
- RMobileConferenceCall& aPhone );
-
- /**
- * Constructs the monitor in the second phase.
- */
- void ConstructL();
-
-
- private: // data
- /**
- * Forwards events.
- */
- CSPConferenceCall& iOwner;
-
- /**
- * Phone that is being observed for incoming call.
- */
- RMobileConferenceCall& iCall;
-
- /**
- * Event received.
- */
- RMobileConferenceCall::TMobileConferenceEvent iEvent;
-
- /**
- * The call name related to the event.
- */
- TName iCallName;
-
- /**
- * Pointer for recovering from a situation where CCE releases call
- * during observer-call sequence.
- */
- TBool* iDestrPtr;
-
- };
-
-#endif // CSPETELCONFERENCEEVENTMONITOR_H
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspetelconferencestatusmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPEtelConferenceStatusMonitor
-*
-*/
-
-
-#ifndef CSPETELCONFERENCECALLSTATUSMONITOR_H
-#define CSPETELCONFERENCECALLSTATUSMONITOR_H
-
-#include <e32base.h>
-#include <etelmm.h>
-
-
-class MCSPConferenceStatusObserver;
-
-/**
-* Monitors single ETel RMobileConferenceCall for conference call statuss.
-*
-* This monitor is applied only for listening incoming calls, i.e.
-* line capabilites are not monitored.
-*
-* @lib csplugin.dll
-* @since S60 v3.2
-*/
-NONSHARABLE_CLASS(CSPEtelConferenceStatusMonitor): public CActive
- {
-
- public: //Constructors and descructor
-
- /**
- * Two-phased constructing for the monitor.
- *
- * @param aObserver the observer for getting notification
- * @param aPhone the line to monitor
- */
- static CSPEtelConferenceStatusMonitor* NewL(
- MCSPConferenceStatusObserver& aObserver,
- RMobileConferenceCall& aPhone );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPEtelConferenceStatusMonitor( );
-
- /**
- * Start monitoring call statuss
- * @since S60 3.2
- */
- void StartMonitoring();
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
- private:
-
- /**
- * C++ default constructor
- * @param aObserver the observer for status change (incoming call)
- * @param aPhone the line associated with the call
- */
- CSPEtelConferenceStatusMonitor( MCSPConferenceStatusObserver& aObserver,
- RMobileConferenceCall& aPhone );
-
- /**
- * Constructs the monitor in the second phase.
- */
- void ConstructL();
-
-
- private: // data
- /**
- * Owner.
- */
- MCSPConferenceStatusObserver& iOwner;
-
- /**
- * Phone that is being observed for incoming call.
- */
- RMobileConferenceCall& iCall;
-
- /**
- * Status received.
- */
- RMobileConferenceCall::TMobileConferenceStatus iConferenceStatus;
-
- /**
- * Pointer for recovering from a situation where CCE releases call
- * during observer-call sequence.
- */
- TBool* iDestrPtr;
-
- };
-
-#endif // CSPETELCONFERENCECALLSTATUSMONITOR_H
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspeteldtmfmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPEtelDtmfMonitor
-*
-*/
-
-
-#ifndef CSPETELDTMFMONITOR_H
-#define CSPETELDTMFMONITOR_H
-
-#include <e32base.h>
-#include <etelmm.h>
-#include <rmmcustomapi.h>
-
-
-class CSPCall;
-class CSPDTMFProvider;
-
-
-
-/**
-* Monitors ETel for DTMF events.
-*
-* This monitor is applied only for listening incoming calls, i.e.
-* line capabilites are not monitored.
-*
-* @lib csplugin.dll
-* @since S60 v3.2
-*/
-class CSPEtelDtmfMonitor: public CActive
- {
-
- public: //Constructors and descructor
-
-
- /**
- * Two-phased constructing for the monitor.
- *
- * @param aObserver the observer for getting notification
- * @param aMmCustom Custom API handle
- */
- static CSPEtelDtmfMonitor* NewL(
- CSPDTMFProvider& aObserver,
- RMmCustomAPI& aMmCustom );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPEtelDtmfMonitor( );
-
- /**
- * Start monitoring call events
- * @since S60 3.2
- */
- void StartMonitoring();
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
- private:
- /**
- * C++ default constructor
- * @param aObserver the observer for status change (incoming call)
- * @param aMmCustom Custom API handle
- */
- CSPEtelDtmfMonitor( CSPDTMFProvider& aObserver,
- RMmCustomAPI& aMmCustom );
-
- private: // data
- /**
- * Forwards events.
- */
- CSPDTMFProvider& iObserver;
-
- /**
- * Event data. Updated when event occurs.
- */
- RMmCustomAPI::TDtmfInfo iEventData;
-
- /**
- * Custom API reference.
- */
- RMmCustomAPI& iMmCustom;
-
- };
-
-#endif // CSPETELDTMFMONITOR_H
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspeteldtmfstopmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPEtelDtmfStopMonitor
-*
-*/
-
-
-#ifndef CSPETELDTMFSTOPMONITOR_H
-#define CSPETELDTMFSTOPMONITOR_H
-
-#include <e32base.h>
-#include <etelmm.h>
-
-
-class CSPCall;
-class CSPDTMFProvider;
-
-
-/**
-* Monitors single ETel RMobilePhone for DTMF events.
-*
-* This monitor is applied only for listening incoming calls, i.e.
-* line capabilites are not monitored.
-*
-* @lib csplugin.dll
-* @since S60 v3.2
-*/
-class CSPEtelDtmfStopMonitor: public CActive
- {
-
- public: //Constructors and descructor
-
-
- /**
- * Two-phased constructing for the monitor.
- *
- * @param aObserver the observer for getting notification
- * @param aPhone the line to monitor
- */
- static CSPEtelDtmfStopMonitor* NewL(
- CSPDTMFProvider& aObserver,
- RMobilePhone& aPhone );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPEtelDtmfStopMonitor( );
-
- /**
- * Start monitoring call events
- * @since S60 3.2
- */
- void StartMonitoring();
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
- private:
- /**
- * C++ default constructor
- * @param aObserver the observer for status change (incoming call)
- * @param aPhone the line associated with the call
- */
- CSPEtelDtmfStopMonitor( CSPDTMFProvider& aObserver,
- RMobilePhone& aPhone );
-
-
- private: // data
- /**
- * Forwards events.
- */
- CSPDTMFProvider& iObserver;
-
- /**
- * Phone that is being observed for incoming call.
- */
- RMobilePhone& iPhone;
-
- /**
- * Event received.
- */
- RMobilePhone::TMobilePhoneDTMFEvent iEventData;
-
- };
-
-#endif // CSPETELDTMFSTOPMONITOR_H
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspetelincomingcallmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPEtelIncomingCallMonitor
-*
-*/
-
-
-#ifndef CSPETELINCOMINGCALLMONITOR_H
-#define CSPETELINCOMINGCALLMONITOR_H
-
-#include <e32base.h>
-#include <etelmm.h>
-
-#include "mcspincomingcallobserver.h"
-#include "rcsplinecontainer.h"
-
-class CSPCall;
-class MCCPCallObserver;
-
-
-
-/**
-* Monitors single ETel RMobileLine for incoming calls.
-*
-* This monitor is applied only for listening incoming calls, i.e.
-* line capabilites are not monitored.
-*
-* @lib csplugin.dll
-* @since S60 v3.2
-*/
-class CSPEtelIncomingCallMonitor: public CActive
- {
-
- public: //Constructors and descructor
-
- /**
- * Two-phased constructing for the monitor.
- *
- * @param aObserver the observer for getting notification
- * @param aLine the line to monitor
- * @param aLineId line identifier
- */
- static CSPEtelIncomingCallMonitor* NewL(
- MCSPIncomingCallObserver& aObserver,
- RMobileLine& aLine,
- RCSPLineContainer::TCSPLineId aLineId );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPEtelIncomingCallMonitor( );
-
- /**
- * Start monitoring call events
- * @since S60 3.2
- */
- void StartMonitoring();
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
- private:
- /**
- * C++ default constructor
- * @param aObserver the observer for status change (incoming call)
- * @param aLine the line associated with the call
- * @param aLineId line identifier
- */
- CSPEtelIncomingCallMonitor( MCSPIncomingCallObserver& aObserver,
- RMobileLine& aLine,
- RCSPLineContainer::TCSPLineId aLineId );
-
- private: // data
- /**
- * Forwards the incoming call information.
- */
- MCSPIncomingCallObserver& iIncomingCallObserver;
-
- /**
- * Incoming call name received from ETel.
- */
- TName iCallName;
-
- /**
- * Line that is being observed for incoming call.
- */
- RMobileLine& iLine;
-
- /**
- * Line identifier / type.
- */
- RCSPLineContainer::TCSPLineId iLineId;
- };
-
-#endif // CSPETELINCOMINGCALLMONITOR_H
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspetellinestatusmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPEtelLineStatusMonitor
-*
-*/
-
-
-#ifndef CSPETELLINESTATUSMONITOR_H_
-#define CSPETELLINESTATUSMONITOR_H_
-
-#include <e32base.h>
-#include <etelmm.h>
-#include "rcsplinecontainer.h"
-
-class MCSPLineStatusObserver;
-
-/**
-* Monitors single ETel RMobileLine for calls.
-*
-* This monitor is applied only for listening line status changes
-*
-* @lib csplugin.dll
-* @since S60 5.0
-*/
-NONSHARABLE_CLASS(CSPEtelLineStatusMonitor): public CActive
- {
-
- public: //Constructors and descructor
-
- /**
- * Two-phased constructing for the monitor.
- *
- * @param aObserver the observer for getting notification
- * @param aLine the line to monitor
- * @param aLineId line identifier
- */
- static CSPEtelLineStatusMonitor* NewL(
- MCSPLineStatusObserver& aObserver,
- RMobileLine& aLine,
- RCSPLineContainer::TCSPLineId aLineId );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPEtelLineStatusMonitor( );
-
- /**
- * Start monitoring call events
- * @since S60 5.0
- */
- void StartMonitoring();
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- * @since S60 5.0
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 5.0
- */
- void DoCancel();
-
- private:
-
- /**
- * C++ default constructor
- * @param aObserver the observer for status change
- * @param aLine the line associated with the call
- * @param aLineId line identifier
- */
- CSPEtelLineStatusMonitor( MCSPLineStatusObserver& aObserver,
- RMobileLine& aLine,
- RCSPLineContainer::TCSPLineId aLineId );
-
- private: // data
-
- /**
- * Line status from ETel.
- */
- RMobileCall::TMobileCallStatus iLineStatus;
-
- /**
- * Line that is being observed for status changes.
- */
- RMobileLine& iLine;
-
- /**
- * Line identifier / type.
- */
- RCSPLineContainer::TCSPLineId iLineId;
-
- /**
- * Line status notifications observer.
- */
- MCSPLineStatusObserver& iObserver;
-
- };
-
-#endif /*CSPETELLINESTATUSMONITOR_H_*/
--- a/convergedcallengine/csplugin/inc/cspetelvideocallcapsmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CSPEtelCallCapsMonitor
-*
-*/
-
-
-#ifndef CSPETELDATACALLCAPSMONITOR_H
-#define CSPETELDATACALLCAPSMONITOR_H
-
-#include <e32base.h>
-#include <etelmm.h>
-
-
-class CSPVideoCall;
-
-
-/**
-* Monitors single ETel RMobileCall for call capss.
-*
-* This monitor is applied only for listening incoming calls, i.e.
-* line capabilites are not monitored.
-*
-* @lib csplugin.dll
-* @since S60 v3.2
-*/
-class CSPEtelVideoCallCapsMonitor: public CActive
- {
-
- public: //Constructors and descructor
-
-
- /**
- * Two-phased constructing for the monitor.
- *
- * @param aOwner the observer for getting notification
- * @param aCall the line to monitor
- */
- static CSPEtelVideoCallCapsMonitor* NewL(
- CSPVideoCall& aOwner,
- RMobileCall& aCall );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPEtelVideoCallCapsMonitor( );
-
- /**
- * Start monitoring call capss
- * @since S60 3.2
- */
- void StartMonitoring();
-
- /**
- * Getter for fetching mobile data call caps.
- */
- TInt GetMobileDataCallCaps( TDes8& aCaps ) const;
-
- /**
- * Gets protocol caps.
- * @return protocol caps
- */
- TUint GetProtocolCaps();
-
- /**
- * Updates protocol caps for call
- * @since S60 5.0
- */
- void UpdateProtocolCaps();
-
- protected: // From CActive
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
- private:
- /**
- * C++ default constructor
- * @param aOwner the observer for status change (incoming call)
- * @param aCall the line associated with the call
- */
- CSPEtelVideoCallCapsMonitor( CSPVideoCall& aOwner,
- RMobileCall& aCall );
-
- /**
- * Constructs the monitor in the second phase.
- */
- void ConstructL();
-
-
- private: // data
- /**
- * Forwards capss.
- */
- CSPVideoCall& iOwner;
-
- /**
- * Call that is being observed.
- */
- RMobileCall& iCall;
-
- /**
- * Call capabilities.
- */
- RMobileCall::TMobileCallDataCapsV1 iDataCallCaps;
- RMobileCall::TMobileCallDataCapsV1Pckg iDataCallCapsPckg;
-
- };
-
-#endif // CSPETELDATACALLCAPSMONITOR_H
--- a/convergedcallengine/csplugin/inc/cspforwardprovider.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header of CSPForwardProvider which provides methods and
-* functionality to handle call forwarding
-*
-*/
-
-
-#ifndef CSPFORWARDPROVIDER_H
-#define CSPFORWARDPROVIDER_H
-
-#include <e32base.h>
-#include <mccpforwardprovider.h>
-#include <mccpforwardobserver.h>
-
-/**
-* Call forward methods.
-* MCCPCallObserver is used for errors, statuses, notifications etc
-*
-* @since S60 3.2
-*/
-class CSPForwardProvider : public CBase,
- public MCCPForwardProvider
- {
-
- public:
- /**
- * Two phased constructing of the forward provider instance.
- * @return the Forward provider instance
- */
- static CSPForwardProvider* NewL();
-
- /**
- * Destructs the forward provider.
- * @since S60 3.2
- */
- virtual ~CSPForwardProvider();
-
- /**
- * Updates the call event for observers.
- * @param aEvent the event to be notified
- */
- void NotifyForwardEventOccurred(
- MCCPForwardObserver::TCCPForwardEvent aEvent );
-
-// from base class MCCPForwardProvider
-
- /**
- * Returns pointer to array containing addresses to forward the call to.
- * Index zero contains the first address. If there are no addresses available
- * returns an empty array.
- * @return Reference to array containing addresses
- * @leave KErrNotReady call is not in forwarding state
- * @leave KErrNotSupported if call is not mobile originated
- * @leave system error code
- * @pre Call state is MCCPCallObserver::ECCPStateForwarding and call type is MO
- * @pre Call MCCPForwardObserver::ECCPMultipleChoices event is received
- */
- virtual const CDesC8Array& GetForwardAddressChoicesL();
-
- /**
- * Forward call to address at given index.
- * @param aIndex Index of address where the call is to be forwarded. Address is
- * found in the array received from GetForwardAddressChoicesL. Index starts from zero.
- * @leave KErrArgument Index is not in array
- * @leave KErrNotReady Call is not in forwarding state
- * @leave KErrNotSupported If call is not mobile originated
- * @pre Call state is MCCPCallObserver::ECCPStateForwarding and call type is MO
- * @pre Call MCCPForwardObserver::ECCPMultipleChoices event is received
- */
- virtual void ForwardToAddressL( const TInt aIndex );
-
- /**
- * Add an observer for forward related events.
- * Currently CCE will set only one observer.
- * @since S60 v3.2
- * @param aObserver Observer
- * @leave system error if observer adding fails
- */
- virtual void AddObserverL( const MCCPForwardObserver& aObserver );
-
- /**
- * Remove an observer.
- * @since S60 v3.2
- * @param aObserver Observer
- * @return KErrNone if removed succesfully.
- * @return KErrNotFound if observer was not found.
- */
- virtual TInt RemoveObserver( const MCCPForwardObserver& aObserver );
-
- private:
-
- /**
- * Constructs the provider
- *
- */
- CSPForwardProvider( );
-
- /**
- * Constructing 2nd phase.
- */
- void ConstructL();
-
- private: // data
-
- /**
- * DTMF event observer.
- */
- RPointerArray<MCCPForwardObserver> iObservers;
-
- CDesC8Array* iEmptyArray;
-
-
-};
-
-#endif CSPFORWARDPROVIDER_H
--- a/convergedcallengine/csplugin/inc/csplogger.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Provides macros for logging
-*
-*/
-
-
-
-#ifndef __CSPLOGGER_H__
-#define __CSPLOGGER_H__
-
-// INCLUDES
-#include <e32def.h>
-
-/*
------------------------------------------------------------------------------
-
- USER LOG SELECTION
-
------------------------------------------------------------------------------
-*/
-
-inline TUint CSPLOGMASK()
- {
- return 0x8fffffff; // This is default mask value.
- } // User can change mask value to get different king of logging.
-
-#ifndef _DEBUG
-
-/***************************
-* Logging method variants:
-* 0 = No logging
-* 1 = Flogger
-* 2 = RDebug
-***************************/
-
-#define CSP_LOGGING_METHOD 0 // UREL BUILD
-
-#else
-
-#ifdef __WINS__
-#define CSP_LOGGING_METHOD 2 // UDEB BUILD, WINS
-#else
-#define CSP_LOGGING_METHOD 2 // UDEB BUILD, HW
-#endif // __WINS__
-
-#endif // _DEBUG
-
-
-// Next is for backward compatibility
-#if CSP_LOGGING_METHOD > 0
-#define CSP_LOGGING_ENABLED
-#define TF_LOGGING_ENABLED
-#endif
-
-
-/*
------------------------------------------------------------------------------
-
- LOGGING OPTIONS
-
------------------------------------------------------------------------------
-*/
-
-#define CSPOBJECT 0x00000001 // Construction and destruction
-
-#define CSPERROR 0x00000002 // Error that can be handled. Describe reason for error situation.
-#define CSPPANIC 0x00000004 // Critical error: Panic.
-
-
-#define CSPREQIN 0x00000040 // Public interface methods
-#define CSPREQOUT 0x00000080 // Set outgoing request
-#define CSPREQEND 0x00000100 // Complete request
-
-#define CSPINT 0x00000200 // Internal activity
-
-#define CSPMSTATE 0x00000400 // Component state changes
-
-#define CSPGENERAL 0x00000800 // For deprecated TFLOGxxx-macros and for temporary usage
-
-
-/*
------------------------------------------------------------------------------
-
- LOG SETTINGS
-
------------------------------------------------------------------------------
-*/
-
-#if CSP_LOGGING_METHOD == 1 // Flogger
-
-#include <flogger.h>
-_LIT(KTfLogFolder,"CSP");
-_LIT(KTfLogFile,"CSPLOG.TXT");
-
-#elif CSP_LOGGING_METHOD == 2 // RDebug
-
-#include <e32svr.h>
-
-#endif
-
-
-/*
------------------------------------------------------------------------------
-
- LOGGING MACROs
-
- USE THESE MACROS IN YOUR CODE !
-
------------------------------------------------------------------------------
-*/
-#define MESSAGE(A) _L(A)
-
-#if CSP_LOGGING_METHOD == 1 // Flogger
-
-#define CSPLOGTEXT(Type,AAA) { \
- if((CSPLOGMASK()&(Type))==(Type)) \
- { \
- RFileLogger::Write(KTfLogFolder(),KTfLogFile(), \
- EFileLoggingModeAppend, AAA); \
- } \
- }
-#define CSPLOGSTRING(Type,AAA) { \
- if((CSPLOGMASK()&(Type))==(Type)) \
- { \
- _LIT(tempLogDes,AAA); \
- RFileLogger::Write(KTfLogFolder(),KTfLogFile(), \
- EFileLoggingModeAppend,tempLogDes()); \
- } \
- }
-#define CSPLOGSTRING2(Type,AAA,BBB) { \
- if((CSPLOGMASK()&(Type))==(Type)) \
- { \
- _LIT(tempLogDes,AAA); \
- RFileLogger::WriteFormat(KTfLogFolder(),KTfLogFile(), \
- EFileLoggingModeAppend, \
- TRefByValue<const TDesC>(tempLogDes()),BBB); \
- } \
- }
-#define CSPLOGSTRING3(Type,AAA,BBB,CCC) { \
- if((CSPLOGMASK()&(Type))==(Type)) \
- { \
- _LIT(tempLogDes,AAA); \
- RFileLogger::WriteFormat(KTfLogFolder(),KTfLogFile(), \
- EFileLoggingModeAppend, \
- TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); \
- } \
- }
-#define CSPLOGSTRING4(Type,AAA,BBB,CCC,DDD) { \
- if((CSPLOGMASK()&(Type))==(Type)) \
- { \
- _LIT(tempLogDes,AAA); \
- RFileLogger::WriteFormat(KTfLogFolder(), \
- KTfLogFile(),EFileLoggingModeAppend, \
- TRefByValue<const TDesC>(tempLogDes()), \
- BBB,CCC,DDD); \
- } \
- }
-
-#elif CSP_LOGGING_METHOD == 2 // RDebug
-
-#define CSPLOGTEXT(Type,AAA) { \
- if((CSPLOGMASK()&(Type))==(Type)) RDebug::Print(AAA); \
- }
-#define CSPLOGSTRING(Type,AAA) { \
- if((CSPLOGMASK()&(Type))== \
- (Type)) RDebug::Print(_L(AAA)); \
- }
-#define CSPLOGSTRING2(Type,AAA,BBB) { \
- if((CSPLOGMASK()&(Type))== \
- (Type)) RDebug::Print(_L(AAA),BBB); \
- }
-#define CSPLOGSTRING3(Type,AAA,BBB,CCC) { \
- if((CSPLOGMASK()&(Type))== \
- (Type)) RDebug::Print(_L(AAA),BBB,CCC); \
- }
-#define CSPLOGSTRING4(Type,AAA,BBB,CCC,DDD) { \
- if((CSPLOGMASK()&(Type))== \
- (Type)) RDebug::Print(_L(AAA),BBB,CCC,DDD); \
- }
-
-#else // CSP_LOGGING_METHOD == 0 or invalid
-
-#define CSPLOGTEXT(Type,AAA) // Example: TFLOGTEXT(CSPMESOUT, own_desc)
-#define CSPLOGSTRING(Type,AAA) // Example: TFLOGSTRING(CSPMESIN, "Test")
-#define CSPLOGSTRING2(Type,AAA,BBB) // Example: TFLOGSTRING(CSPMESINT, "Test %i", aValue)
-#define CSPLOGSTRING3(Type,AAA,BBB,CCC) // Example: TFLOGSTRING(CSPMESOUT, "Test %i %i", aValue1, aValue2)
-#define CSPLOGSTRING4(Type,AAA,BBB,CCC,DDD) // Example: TFLOGSTRING(CSPMESOUT, "Test %i %i %i", aValue1, aValue2, aValue3)
-
-#endif // CSP_LOGGING_METHOD
-
-
-/*
------------------------------------------------------------------------------
-
- DEPRECATED LOGGING MACROs
-
- DON'T USE THESE MACROS IN YOUR CODE ANYMORE!
-
------------------------------------------------------------------------------
-*/
-
-#define TFLOGTEXT(AAA) CSPLOGTEXT(CSPGENERAL,AAA);
-#define TFLOGSTRING(AAA) CSPLOGSTRING(CSPGENERAL,AAA);
-#define TFLOGSTRING2(AAA,BBB) CSPLOGSTRING2(CSPGENERAL,AAA,BBB);
-#define TFLOGSTRING3(AAA,BBB,CCC) CSPLOGSTRING3(CSPGENERAL,AAA,BBB,CCC);
-#define TFLOGSTRING4(AAA,BBB,CCC,DDD) CSPLOGSTRING4(CSPGENERAL,AAA,BBB,CCC,DDD);
-
-#endif // CSPLOGGER_H
--- a/convergedcallengine/csplugin/inc/cspmicrophone.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Mic stream to DevSound.
-*
-*/
-
-
-#ifndef CSPMICROPHONE_H
-#define CSPMICROPHONE_H
-
-#include "cspdevsound.h"
-
-/**
- * Provides mic functionality.
- *
- */
-NONSHARABLE_CLASS( CSPMicrophone ): public CSPDevSound
- {
-
-public:
-
- static CSPMicrophone* NewL( MCSPDevSoundObserver& aObserver );
-
- virtual ~CSPMicrophone();
-
- /**
- * Determines mic mute state.
- *
- *
- * @return ETrue - mic is muted, EFalse - mic is not muted.
- */
- TBool IsMuted();
-
- /**
- * Set mic muted.
- *
- *
- */
- void SetMuted();
-
- /**
- * Set mic unmuted.
- *
- *
- */
- void SetUnmuted();
-
-// from base class MDevSoundObserver
-
- /**
- * From MDevSoundObserver
- * Notification from Devsound that stream (mic) is
- * activated successfully.
- *
- *
- */
- void BufferToBeEmptied( CMMFBuffer* aBuffer );
-
- /**
- * From MDevSoundObserver
- * Notification from devsound that downstream(mic) activation
- * feiled.
- *
- *
- */
- void RecordError( TInt aError );
-
-private:
-
-// from base class MCSPDevSound
-
- /**
- * From MCSPDevSound.
- * Tries to activate the mic stream.
- *
- *
- */
- void DoActivateL();
-
-protected:
-
- CSPMicrophone( MCSPDevSoundObserver& aObserver );
-
- void ConstructL();
-
- };
-
-#endif // CSPMICROPHONE_H
--- a/convergedcallengine/csplugin/inc/csppanic.pan Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains panic enumerations
-*
-*/
-
-
-#ifndef CSPPANIC_PAN
-#define CSPPANIC_PAN
-
-// INCLUDES
-#include <e32def.h>
-#include <e32cmn.h>
-
-// CONSTANTS
-
-// CSPlugin panic text
-_LIT( KCSPPanic, "CSPlugin Panic!" );
-
- enum TCSPPanic
- {
- ECSPPanicAccessingDataOnIncompleteRequest = 1,
- ECSPPanicAllSettingsDataObjectsAlreadyInUse = 2,
- ECSPPanicBadHandle = 3,
- ECSPPanicCallDataNull = 4,
- ECSPPanicCallIndexOutOfRange = 5,
- ECSPPanicConferenceIndexOutOfRange = 6,
- ECSPPanicDebugDangerousMove = 7,
- ECSPPanicIllegalCommand = 8,
- ECSPPanicIndexOutOfRange = 9,
- ECSPPanicInvalidCommand = 10,
- ECSPPanicInvalidHandle = 11,
- ECSPPanicInvalidMode = 12,
- ECSPPanicInvalidRequest = 13,
- ECSPPanicInvalidRequestId = 14,
- ECSPPanicInvalidState = 15,
- ECSPPanicLineNotFound = 16,
- ECSPPanicNoCallInState = 17,
- ECSPPanicNoCallOrLine = 18,
- ECSPPanicNoConferenceCall = 19,
- ECSPPanicNoErrorCodeInSuccessfulRequest = 20,
- ECSPPanicNoEtel = 21,
- ECSPPanicNoFreeCalls = 22,
- ECSPPanicNoObserver = 23,
- ECSPPanicNoPhoneServer = 24,
- ECSPPanicNoRepository = 25,
- ECSPPanicNotCompleted = 26,
- ECSPPanicNullPointer = 27,
- ECSPPanicObserverAlreadySet = 28,
- ECSPPanicRepositoryAlreadyActive = 29,
- ECSPPanicPropertyAlreadyActive = 30,
- ECSPPanicSplitWithoutConference = 31,
- ECSPPanicUIHasBeenLeaved = 32,
- ECSPPanicVideoLibraryNotFound = 33,
- ECSPPanicInvalidIncomingCallMonitor = 34,
- ECSPPanicInvalidCallAddedMonitor = 35,
- ECSPPanicInvalidCallEventMonitor = 36,
- ECSPPanicExternalDataIdOutOfRange = 37,
- ECSPPanicCallIsAlreadyAddedToConference = 38,
- ECSPPanicInvalidParameter = 39,
- ECSPPanicDataConnectionInitError = 40,
- ECSPPanicTimerAlreadyActive = 41,
-
- ECSPPanicMaximum = 100
- };
-
-// MACROS
-// None.
-
-// DATA TYPES
-// None.
-
-// FUNCTION PROTOTYPES
-// None.
-
-// FORWARD DECLARATIONS
-// None.
-
-// CLASS DECLARATION
-// None.
-
-GLREF_C void Panic( TCSPPanic aPanic );
-
-#endif
--- a/convergedcallengine/csplugin/inc/csppubsublistener.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,130 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class CCSPPubSubListener
-*
-*/
-
-
-#ifndef CSPPUBSUBLISTENER_H
-#define CSPPUBSUBLISTENER_H
-
-// INCLUDES
-#include <e32base.h>
-#include <e32std.h>
-#include <e32property.h>
-
-// FORWARD DECLARATIONS
-class MCSPPubSubObserver;
-
-// CLASS DECLARATION
-
-/**
-* RProperty poller.
-*
-* @lib videoteleng.lib
-* @since Series 60 2.8
-*/
-NONSHARABLE_CLASS( CSPPubSubListener ) : public CActive
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- * @param aUid the Uid to use
- * @param aKey item's key
- * @param aObserver callback interface for notification
- * @return instance of CSPPubSubListener
- */
- static CSPPubSubListener* NewL( const TUid aUid, const TInt aKey,
- MCSPPubSubObserver* aObserver );
-
- /**
- * Destructor.
- */
- virtual ~CSPPubSubListener();
-
- public: // New functions.
-
- /**
- * Gets integer value from P & S.
- * @param aVal a value in return
- * @return error code
- */
- TInt Get( TInt& aVal );
-
- /**
- * Gets 8 bit string value from P&S.
- * @param aVal a value in return
- * @return error code
- */
- TInt Get( TDes8& aVal );
-
- /**
- * Gets 16 bit descriptor value from P&S.
- * @param aVal a value in return
- * @return error code
- */
- TInt Get( TDes16& aVal );
-
- private: // New functions.
-
- /**
- * Starts the listening (RunL).
- */
- void StartListening();
-
- private: // From CActive.
-
- /** @see CActive::RunL */
- virtual void RunL();
-
- /** @see CActive::Cancel */
- virtual void DoCancel();
-
- /** @see CActive::RunError */
- virtual TInt RunError( TInt aError );
-
- private:
-
- /**
- * Constructor of the listener.
- * @param aUid the Uid to use
- * @param aKey item's key
- * @param aObserver callback interface for notification
- */
- CSPPubSubListener( const TUid aUid, TInt aKey,
- MCSPPubSubObserver* aObserver );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- private: // Data
-
- /** UID of the monitored item. */
- TUid iUid;
-
- /** ID of the monitored item. */
- TInt iId;
-
- /** Property to subscribe to. */
- RProperty iProperty;
-
- /** Observer for PS notifications. */
- MCSPPubSubObserver* iObserver;
- };
-
-#endif // CVTENGPUBSUBSGSETTINGS_H
-// End of File
--- a/convergedcallengine/csplugin/inc/cspremotealertingtonelistener.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +0,0 @@
-/*
-* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Listens remote alerting tone status changes
-*
-*/
-
-
-#ifndef CSPREMOTEALERTINGTONELISTENER_H
-#define CSPREMOTEALERTINGTONELISTENER_H
-
-#include <e32base.h>
-#include <rmmcustomapi.h>
-
-class MCSPRemoteAlertingToneObserver;
-
-/**
- * Listens remote alerting tone changes.
- *
- * @lib CSPlugin.lib
- * @since S60 v5.0
- */
-NONSHARABLE_CLASS( CSPRemoteAlertingToneListener ) : public CActive
- {
-public:
-
- /**
- * Two-phased constructor.
- * @param aCustomAPI Connected custom API instance.
- * @param aObserver Observer of the remote alerting tone chnages.
- */
- static CSPRemoteAlertingToneListener* NewL(
- RMmCustomAPI& aCustomAPI,
- MCSPRemoteAlertingToneObserver& aObserver );
-
-
- /**
- * Destructor.
- */
- virtual ~CSPRemoteAlertingToneListener();
-
- /**
- * Starts listening remote alerting tone changes. Observer is notified
- * when change occurs. Listening stops when Cancel is called or listening
- * instance is deleted.
- *
- * @since S60 v5.0
- */
- void StartListening();
-
-protected:
-
-// from base class CActive
-
- void DoCancel();
-
- void RunL();
-
-private:
-
- CSPRemoteAlertingToneListener(
- RMmCustomAPI& aCustomAPI,
- MCSPRemoteAlertingToneObserver& aObserver );
-
-private: // data
-
- /**
- * For listening changes in remote alerting tone status.
- * Not own.
- */
- RMmCustomAPI& iCustomAPI;
-
- /**
- * Status of the remote alerting tone.
- */
- RMmCustomAPI::TRemoteAlertingToneStatus iRATStatus;
-
- /**
- * Change observer.
- */
- MCSPRemoteAlertingToneObserver& iObserver;
-
- };
-
-#endif // CSPREMOTEALERTINGTONELISTENER_H
--- a/convergedcallengine/csplugin/inc/csprovider.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,601 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Main class for CS Call Plug-in
-*
-*/
-
-
-
-#ifndef CSPROVIDER_H
-#define CSPROVIDER_H
-
-#include <e32base.h>
-#include <cconvergedcallprovider.h>
-#include <mccpcsobserver.h>
-#include <mccpdtmfprovider.h>
-#include <mccpcscall.h>
-#include <mccecall.h>
-
-#include "mcspincomingcallobserver.h"
-#include "mcspsecuritysettingobserver.h"
-#include "mcspcommoninfo.h"
-#include "mcsppubsubobserver.h"
-#include "mcspremotealertingtoneobserver.h"
-#include "mcspconferencestatusobserver.h"
-
-
-// FORWARD DECLARATIONS
-class CSPEtelIncomingCallMonitor;
-class CSPDTMFProvider;
-class CSPServiceSettingsHandler;
-class CSPEtelCallAddedMonitor;
-class CSPConferenceCall;
-class CSPCallArray;
-class CSPAudioHandler;
-class CSPEtelCallWaitingRequester;
-class CSPSupplementaryServicesMonitor;
-class MCCPSsObserver;
-class CSPCipheringStatusMonitor;
-class CSPSsSettingsHandler;
-class CSPCallAddedHandler;
-class CSPPubSubListener;
-class CSPCallCommandHandler;
-class CSPRemoteAlertingToneListener;
-class CSPEtelConferenceStatusMonitor;
-
-/**
-* Main class for using CS Call Plug-in. Implements the CCP API.
-*
-* @lib csplugin.dll
-* @since S60 v3.2
-*/
-class CSProvider : public CConvergedCallProvider,
- public MCSPIncomingCallObserver,
- public MCSPCommonInfo,
- public MCSPSecuritySettingObserver,
- public MCSPPubSubObserver,
- public MCSPRemoteAlertingToneObserver,
- public MCSPConferenceStatusObserver
-{
- public:
-
- /**
- * Two-phased constructor.
- * @return new instance of the class
- */
- static CSProvider* NewL();
-
- /**
- * C++ default destructor
- */
- virtual ~CSProvider();
-
- /**
- * Notification of SS event.
- * @param aSsTypeAndMode SS type and SS mode
- * @param aSsInfo SS info
- */
- void NotifySsEvent( RMmCustomAPI::TSsTypeAndMode& aSsTypeAndMode,
- RMmCustomAPI::TSsInfo& aSsInfo );
-
-
-// from base class CConvergedCallProvider
-
- /**
- * Initializes plug-in. All required parameters must be passed
- * with this function in order to use services.
- * Simplifies pluging construct removing need to pass parameters
- * to ECom interface
- * @since S60 3.2
- * @param aAppUID Application UID of Telephony application
- * @param aObserver general observer
- * @param aSsObserver observer for events related to supplementary
- * services.
- */
- void InitializeL( const MCCPObserver& aObserver,
- const MCCPSsObserver& aSsObserver );
-
- /**
- * Creates a new call and checks secure status from profile.
- * @since S60 3.2
- * @param aServiceId service id
- * @param aRemoteParty Recipients address/number
- * @param aObserver Observer
- * @return MCCPMoCall
- */
- MCCPCall* NewCallL( const CCCPCallParameters& aCallParameters,
- const TDesC& aRemoteParty,
- const MCCPCallObserver& aObserver );
-
-
- /**
- * From CConvergedCallProvider
- * Releases all bindings to call and deletes it.
- * This will be called by CCE to free all the resources reserved for the call.
- * After this call CCE will not access the call object anymore and observer
- * for the class must not be used in plug-in.
- * This operation must always succeed. If plug-in decides to pre-allocate the
- * call object it can choose to do so, but plug-in has to make sure call is
- * returned to the state it was before calling CConvergedCallProvider::NewCallL.
- * @param aCalltoRemove Call to remove.
- * @return KErrNone or KErrNotFound if removed call is not found.
- * @pre None, can always be called.
- * @post Plug-in must quarantee all resources for the call will be cleaned up.
- * and plug-in must not call observer after this call!
- * @since S60 3.2
- */
- virtual TInt ReleaseCall( MCCPCall& aCalltoRemove );
-
- /**
- * From CConvergedCallProvider
- * Creates a new Emergency call and add user-agent header.
- * @since S60 3.2
- * @param aServiceId service id
- * @param aAddress address of emergency call
- * @param aObserver Observer
- * @return MCCPEmergencyCall
- */
- MCCPEmergencyCall* NewEmergencyCallL(
- const TUint32 aServiceId,
- const TDesC& aAddress,
- const MCCPCallObserver& aObserver );
-
- /**
- * From CConvergedCallProvider.
- * Releases all bindings to call and deletes it.
- * This must be called to free all the resources reserved for the call.
- * After this call CCE must not be access the call object anymore and observer
- * for the class must not be used in plug-in.
- * This operation mustways succeed. If plug-in decides to pre-allocate the
- * call object it can choose to do so, but client has to be sure call is
- * cleared from the plug-in and all resuorces are returned to the state before calling
- * CConvergedCallProvider::NewEmergencyCallL.
- * @param aCalltoRemove Call to remove.
- * @return KErrNone or KErrNotFound if removed call is not found.
- * @pre None, can always be called.
- * @post Plug-in must quarantee all resources for the call will be cleaned up. Call must not
- * be referenced anymore from CCE and plug-in must not call observer after this call!
- * @since S60 3.2
- */
- TInt ReleaseEmergencyCall( MCCPEmergencyCall& aCalltoRemove );
-
- /**
- * From CConvergedCallProvider
- * Creates a new conference call.
- * @since S60 3.2
- * @param aServiceId service id
- * @param aObserver Observer
- * @return MCCPConferenceCall
- */
- MCCPConferenceCall* NewConferenceL( const TUint32 aServiceId,
- const MCCPConferenceCallObserver& aObserver );
-
- /**
- * From CConvergedCallProvider
- * Releases all bindings to conference call. CCE will call this after receiving
- * MCCPConferenceCallObserver::ECCPConferenceIdle from plug-in or when it itself
- * wants to release the call. In normal sequence called from CCE after HangUp is completed.
- * @param aCalltoRemove Call to remove.
- * @return KErrNone or KErrNotFound if removed call is not found.
- * @pre None, can always be called.
- * @post Plug-in must quarantee all resources for the call will be cleaned up. Call must not
- * be referenced anymore from CCE and plug-in must not call observer after this call!
- * @since S60 3.2
- */
- TInt ReleaseConferenceCall( MCCPConferenceCall& aCalltoRemove );
-
- /**
- * Returns Uid of plug-in which is on use.
- * @since S60 3.2
- * @return Uid of plug-in
- */
- const TUid& Uid() const;
-
- /**
- * Get Plug-In capabilities
- * @since S60 3.2
- * @return caps
- */
- TUint32 Caps( ) const;
-
- /**
- * Get DTMF provider
- * @since S60 3.2
- * @return Pointer to MCCPDTMFProvider if succesfull,
- * NULL if not available
- */
- MCCPDTMFProvider* DTMFProviderL( const MCCPDTMFObserver& aObserver );
-
- /**
- * Get extension provider
- * @since S60 3.2
- * @return Pointer to MCCPExtensionProvider if succesfull,
- * NULL if not available
- */
- MCCPExtensionProvider* ExtensionProviderL(
- const MCCPExtensionObserver& aObserver );
-
- /**
- * This method gets the lifetime of the MS. The lifetime information
- * includes the manufacturing date of the MS and the total amount of airtime use,
- * from the manufacturing date until the call to this method. Calling this method
- * does not reset any data. This is used only CS, other plug-ins may ignore this method.
- * @since S60 3.2
- * @param aLifeTimeInfo Life time information
- * @return none
- */
- TBool GetLifeTime( TDes8& aLifeTimeInfo );
-
- /**
- * This method gets serial number from MS. The CSInfo includes
- * the serial number.
- * @since S60 5.0
- * @param aCSInfo CS specific information from MS.
- * @return Get succeeded or not.
- */
- TBool GetCSInfo( CSInfo& aCSInfo );
-
-// from base class MCSPIncomingCallObserver
-
- /**
- * From MCSPIncomingCallObserver.
- * Informs incoming call.
- *
- * @since S60 3.2
- * @param aLine the line that corresponds to the call
- * @param aCallName the name of call
- * @param aLineId line identifier for the call
- */
- void IncomingCallArrived( RMobileLine& aLine, TName aCallName,
- RCSPLineContainer::TCSPLineId aLineId );
-
-// from base class MCSPCommonInfo
-
- /**
- * From MCSPCommonInfo
- * Makes the request. Note that ERequestTypeDial is made with a
- * separate MakeDialRequest function.
- *
- * @since S60 3.2
- * @param aRequest type of request
- * @return ETrue if active, EFalse if not
- */
- void GetCallWaitingL( const CCCECallParameters& iParams,
- TBool& aCallWaitingStatus );
-
- /**
- * From MCSPCommonInfo
- * Diagnostic error fetching.
- * @param aCallName name of call related to error
- * @return diagnostic error code
- */
- TInt GetDiagnosticError( TName& aCallName );
-
- /**
- * From MCSPCommonInfo
- *
- * Network security status
- *
- * @since Series60_4.0
- * @return true if security enabled
- */
- TBool NetworkSecurityStatus() const;
-
- /**
- * From MCSPCommonInfo
- * Secure specified status.
- * @since Series60_5.0
- * @return true if secure specified
- */
- TBool SecureSpecified() const;
-
- /**
- * From MCSPCommonInfo
- * Remote alerting tone status.
- * @return tone status for remote alerting tone playing
- */
- RMmCustomAPI::TRemoteAlertingToneStatus GetRemoteAlertingToneStatus();
-
- /**
- * From MCSPCommonInfo
- * Initializes with current settings.
- * @param aParams call params
- */
- void InitializeCallParameters( RMobileCall::TMobileCallParamsV7& aParams );
-
- /**
- * From MCSPCommonInfo
- * Initializes with current data call settings.
- * @param aParams call params
- */
- void InitializeDataCallParameters( RMobileCall::TMobileHscsdCallParamsV1& aParams );
-
- /**
- * From MCPSCommonInfo
- * @param aCall client call to be indicated
- */
- void IndicateClientCall( MCCPCSCall* aCall );
-
- /**
- * Indicates incoming call for CCE.
- * @param aCall incoming call
- */
- TInt IndicateIncomingCall( MCCPCSCall* aCall );
-
- /**
- * Notify data port name about a loaned data port.
- * @param aDataPortName port name
- */
- void NotifyDataPortName( TName& aDataPortName );
-
- /**
- * Indicates active hangup command.
- * @param aCall MT call
- * @return system wide error code
- */
- TInt IndicateActiveHangup( MCCPCallCommandHandling& aCall );
-
- /**
- * Indicates hangup command complete.
- * @param aCall MT call
- * @return system wide error code
- */
- TInt IndicateHangupComplete( MCCPCallCommandHandling& aCall );
-
- /**
- * Indicates active hangup command.
- * @param aCall MT call
- * @return system wide error code
- */
- TInt IndicateDialRequest( MCCPCallCommandHandling& aCall );
-
- /**
- * Indicates active hangup command.
- * @param aCall MT call
- * @return system wide error code
- */
- TInt IndicateAnswerRequest( MCCPCallCommandHandling& aCall );
-
- /**
- * Don't report termination error
- * @since Series60_5.0
- * @return system wide error code
- */
- TInt DontReportTerminationError();
-
-// From base class MCSPSecuritySettingObserver
-
- /**
- * From MCSPSecuritySettingObserver
- * Notifies about changed security status.
- * @param aValue
- */
- void SecuritySettingChanged( TInt aValue );
-
-// From base class MCSPPubSubObserver
-
- /**
- * Handler for changed event.
- * @param aUid uid of setting
- * @param aKey id of setting
- * @param aStatus status of completed AO operation
- */
- void HandleNotifyPSL( const TUid aUid, const TInt& aKey,
- const TRequestStatus& aStatus );
-
-// From base class MCSPRemoteAlertingToneObserver
-
- /**
- * From MCSPRemoteAlertingToneObserver
- * @see MCSPRemoteAlertingToneObserver
- */
- void RemoteAlertingToneStatusChanged(
- RMmCustomAPI::TRemoteAlertingToneStatus aNewStatus );
-
-// From base class MCSPConferenceStatusObserver
-
- /**
- * From MCSPConferenceStatusObserver.
- * Notifies event to observers.
- * @param aStatus new status of the conference call
- */
- void NotifyStateChange(
- MCSPConferenceStatusObserver::TCSPConferenceState aStatus );
-
- private:
-
- /**
- * C++ default constructor
- */
- CSProvider();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Creates connections to ETel.
- */
- void CreateEtelConnectionsL();
-
- /**
- * Handles diverting and barring notifications.
- * @param aAddr address
- * @param aSsTypeAndMode ss type and mode struct
- */
- void HandleDivertOrBarring(TDesC& addr,
- RMmCustomAPI::TSsTypeAndMode& aSsTypeAndMode);
-
- /**
- * Handles SIM status
- */
- void HandleSIMStatusL();
-
- // data
- private:
-
- /**
- * Implementation UID
- */
- TUid iImplementationUid;
-
- /**
- * ETel connection
- */
- RTelServer iServer;
-
- /**
- * Mobile phone handle.
- */
- RMobilePhone iMobilePhone;
-
- /**
- * Mobile conference call handle.
- */
- RMobileConferenceCall iMobileConferenceCall;
-
- /**
- * Observer for provider level functionality.
- * Not own.
- */
- MCCPCSObserver* iCCPObserver;
-
- /**
- * Observer for SS events.
- * Not own.
- */
- MCCPSsObserver* iSsObserver;
-
- /**
- * DTMF provider.
- * Own.
- */
- CSPDTMFProvider* iDTMFProvider;
-
- /**
- * Monitors line for incoming calls.
- * Own.
- */
- CSPEtelIncomingCallMonitor* iIncomingVoiceCallMonitor;
-
- /**
- * Monitors line for incoming data/video calls.
- * Own.
- */
- CSPEtelIncomingCallMonitor* iIncomingDataCallMonitor;
-
- /**
- * Monitors line for incoming calls from aux line
- * Own.
- */
- CSPEtelIncomingCallMonitor* iIncomingAuxCallMonitor;
-
- /**
- * Call array.
- * Own.
- */
- CSPCallArray* iCallArray;
-
- /**
- * Custom API handle for custom functionality.
- */
- RMmCustomAPI iMmCustom;
-
- /**
- * Line container.
- */
- RCSPLineContainer iLineContainer;
-
- /**
- * Service settings handler for reading
- * service id and name information.
- * Own.
- */
- CSPServiceSettingsHandler* iServiceHandler;
-
- /**
- * Initialisation status.
- */
- TBool iInitialized;
-
- /**
- * Call added monitor.
- * Own.
- */
- CSPCallAddedHandler* iCallAddedHandler;
-
- /**
- * Service ID.
- */
- TUint32 iServiceId;
-
- /**
- * Dev sound handler.
- * Own.
- */
- CSPAudioHandler* iAudioHandler;
-
- /**
- * Call waiting requester.
- * Own.
- */
- CSPEtelCallWaitingRequester* iCwRequester;
-
- /**
- * Supplementary service related event monitor.
- * Own.
- */
- CSPSupplementaryServicesMonitor* iSsMonitor;
-
- /**
- * Ciphering (network security level On/Off) setting monitor.
- */
- CSPCipheringStatusMonitor* iCipheringStatusMonitor;
-
- /**
- * SS Settings handler for reading ALS line and ALS supported status.
- */
- CSPSsSettingsHandler* iSsSettingsHandler;
-
- /**
- * Sim status listener.
- * Own.
- */
- CSPPubSubListener* iSimStatusListener;
-
- /**
- * CallCommandHandler.
- * Own.
- */
- CSPCallCommandHandler* iCallCommandHandler;
-
- /**
- * Remote Alerting Tone listener.
- */
- CSPRemoteAlertingToneListener* iRemoteAlertingToneListener;
-
- /**
- * Monitor for conference status changes.
- * Own.
- */
- CSPEtelConferenceStatusMonitor* iConferenceStatusMonitor;
-
- /**
- * Keep track of conference existence.
- */
- CSPConferenceCall* iConferenceCall;
-};
-
-#endif // CSPROVIDER_H
--- a/convergedcallengine/csplugin/inc/cspservicesettingshandler.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header of CSPServiceSettingsHandler
-*
-*/
-
-
-#ifndef CSPSERVICESETTINGSHANDLER_H
-#define CSPSERVICESETTINGSHANDLER_H
-
-#include <e32base.h>
-
-#include "rcsplinecontainer.h"
-
-/**
-* Makes asynchronic request to ETel interface according to given request type.
-* Provides canceling via CActive::Cancel().
-*
-*/
-class CSPServiceSettingsHandler: public CBase
- {
- public:
-
- /**
- * Two phased constructing of the DTMF provider instance.
- * @return the instance to service settings handler
- */
- static CSPServiceSettingsHandler* NewL( );
-
-
- /**
- * C++ default destructor
- */
- virtual ~CSPServiceSettingsHandler( );
-
- /**
- * Find service ID by name.
- * @since S60 3.2
- * @param aName the name of service
- * @param aServiceId service ID
- */
- void FindByNameL( const TDesC& aName, TUint32& aServiceId );
-
- /**
- * Find CS service ID.
- * @param aServiceId the service id as output
- * @return error code if read was not succesfull
- */
- TInt ReadCSServiceId( TUint32& aServiceId );
-
-
-
- private:
- /**
- * Constructs the requester.
- *
- */
- CSPServiceSettingsHandler( );
-
- /**
- * Constructing the provider in the second phase.
- */
- void ConstructL();
-
- private: // data
-
-
-
- };
-
-#endif // CSPSERVICESETTINGSHANDLER
\ No newline at end of file
--- a/convergedcallengine/csplugin/inc/cspspeaker.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Provides speaker functionality
-*
-*/
-
-
-#ifndef CSPSPEAKER_H
-#define CSPSPEAKER_H
-
-#include "cspdevsound.h"
-
-class MCSPDevSoundObserver;
-
-/**
- * Provides speaker functionality.
- *
- */
-NONSHARABLE_CLASS( CSPSpeaker ): public CSPDevSound
- {
-
-public:
-
- static CSPSpeaker* NewL( MCSPDevSoundObserver& aObserver );
-
- virtual ~CSPSpeaker();
-
- /**
- * Sets volume.
- * @param aVolume Volume.
- */
- void SetVolume( TInt aVolume );
-
- /**
- * Gets volume.
- * @return Current volume.
- */
- TInt Volume();
-
-// from base class MDevSoundObserver
-
- /**
- * From MDevSoundObserver.
- * Indication from devsound that stream (speaker) has been activated
- * successfully.
- */
- void BufferToBeFilled( CMMFBuffer* /*aBuffer*/ );
-
- /**
- * From MDevSoundObserver.
- * Indication from devsound that activation of stream( speaker)
- * failed.
- */
- void PlayError( TInt aErrorCode );
-
-private:
-
- /**
- * From CSPDevSound.
- * Tries to activate the mic stream.
- */
- void DoActivateL();
-
-protected:
-
- CSPSpeaker( MCSPDevSoundObserver& aObserver );
-
- void ConstructL();
-
- };
-
-#endif // CSPSPEAKER_H
--- a/convergedcallengine/csplugin/inc/cspsssettingshandler.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains the header file of the class
-* CSPSsSettingsHandler.
-*
-*/
-
-
-
-#ifndef CSPSSSETTINGSHANDLER_H
-#define CSPSSSETTINGSHANDLER_H
-
-// INCLUDES
-#include <e32base.h>
-#include <MSSSettingsObserver.h>
-
-
-// FORWARD DECLARATIONS
-class MCCPSsObserver;
-
-// CLASS DECLARATION
-
-/**
-* CSPSsSettingsHandler observer SSSettings changes
-*
-* @lib phoneenginegsm
-* @since Series_60 4.0
-*/
-class CSPSsSettingsHandler : public CBase,
- public MSSSettingsObserver
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CSPSsSettingsHandler* NewL( const MCCPSsObserver& aObserver );
-
- /**
- * Destructor.
- */
- virtual ~CSPSsSettingsHandler( );
-
- public: // New functions
-
- /**
- * GetALSLineL
- * @param aALSLine, Als line information to be updated
- */
- void GetALSLineL( RMobilePhone::TMobilePhoneALSLine& aALSLine );
-
- /**
- * SetALSLineL
- * @param aALSLine, Als line information to set
- */
- void SetALSLineL( RMobilePhone::TMobilePhoneALSLine& aALSLine );
-
- /**
- * GetClirL
- * @param aClir, Clir information to be updated
- */
- void GetClirL( RMobileCall::TMobileCallIdRestriction& aClir );
-
- /**
- * GetCugL
- * @param aCugIndex, CUG index
- */
- void GetCugL( TInt& aCugIndex );
-
- /**
- * GetDefaultCugL
- * Get CUG default value.
- */
- void GetDefaultCugL(TInt& aDefCug );
-
- /**
- * IsValueValidCugIndex
- * Is CUG index in allowed range.
- */
- TBool IsValueValidCugIndex( const TInt& aValue ) const;
-
- public: // Functions from MSSSettingsObserver
-
- /*
- * Observer functoin
- * @param aSetting Current setting
- * @param aNewValue New value for the setting
- */
- virtual void PhoneSettingChanged(
- TSSSettingsSetting aSetting,
- TInt aNewValue );
-
- private:
-
- /**
- * Constructor.
- */
- CSPSsSettingsHandler( const MCCPSsObserver& aObserver );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Call register Als notify after idle callback
- */
- void RegisterAfterIdle();
-
- /**
- * CIdle CallBack method
- */
- static TInt CIdleCallBack( TAny* aAny );
-
- /**
- * Register to notify ALS line changed
- */
- void Register();
-
- private: // Data
-
- /**
- * MCCPSsObserver is used to send message to the CCE/phone.
- */
- MCCPSsObserver& iObserver;
- //Pointer to instance of Settings
- RSSSettings iSSSettings;
- // Idle object to register ALS notify.
- CIdle* iRegisterAlsNofify;
-
- };
-
-#endif // CSPSSSETTINGSHANDLER_H
--- a/convergedcallengine/csplugin/inc/cspsupplementaryservicesmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains the header file of the
-* CSPSupplementaryServicesMonitor object.
-*
-*/
-
-
-#ifndef CSPSUPPLEMENTARYSERVICESMONITOR_H
-#define CSPSUPPLEMENTARYSERVICESMONITOR_H
-
-
-//INCLUDES
-#include <e32base.h>
-#include <rmmcustomapi.h>
-
-
-// FORWARD DECLARATIONS
-class CSProvider;
-
-// CLASS DECLARATION
-
-/**
-* Monitors Supplementary Services
-*
-* @lib CallHandling.lib
-* @since Series60_4.0
-*/
-class CSPSupplementaryServicesMonitor: public CActive
- {
- public: //Constructors and descructor
-
- /**
- * C++ default constructor.
- */
- CSPSupplementaryServicesMonitor(
- CSProvider& aOwner,
- RMmCustomAPI& aCustomAPI );
-
- /**
- * Destructor.
- */
- virtual ~CSPSupplementaryServicesMonitor();
-
- public: //New functions
-
- /**
- * Starts monitoring new calls
- * @since Series60_4.0
- * @param None.
- * @return None.
- */
- void StartMonitoring();
-
- protected: // From CActive
-
- /**
- * Cancels asyncronous request(s).
- * @since Series60_4.0
- * @param None.
- * @return None.
- */
- void DoCancel();
-
- /**
- * Informs object that asyncronous request is ready.
- * @since Series60_4.0
- * @param None.
- * @return None.
- */
- void RunL();
-
- private:
-
- /** Owner of this object */
- CSProvider& iOwner;
- /** Subsession to custom api */
- RMmCustomAPI& iCustomAPI;
- /** Suplementary Services Type And Mode */
- RMmCustomAPI::TSsTypeAndMode iSsTypeAndMode;
- /** Suplementary Services info */
- RMmCustomAPI::TSsInfo iSsInfo;
- };
-
-#endif // CSPSUPPLEMENTARYSERVICESMONITOR_H
--- a/convergedcallengine/csplugin/inc/csptimer.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Timer service
-*
-*/
-
-
-#ifndef CSPTIMER_H
-#define CSPTIMER_H
-
-#include <e32base.h>
-
-class MCSPTimerObserver;
-
-/**
- * Timer service.
- *
- * @lib PhoneEngine.lib
- * @since S60 v3.1
- */
-NONSHARABLE_CLASS( CSPTimer ) : protected CTimer
- {
-public:
-
- static CSPTimer* NewL();
-
- static CSPTimer* NewLC();
-
- virtual ~CSPTimer();
-
- /**
- * Request for notify after aTimeout.
- * After timeout has passed observer is called. Panics
- * if there is notify already ongoing ie IsNotifyOngoing
- * returns ETrue.
- *
- *
- * @param aTimeout Time out in microseconds.
- * @param aTimerObserver Observer for notify.
- */
- virtual void NotifyAfter( TInt aTimeout,
- MCSPTimerObserver& aTimerObserver );
-
- /**
- * Cancels the outstanding notify request. After
- * this call notify is no longer ongoing ie IsNotifyOngoing
- * return EFalse.
- *
- *
- */
- virtual void CancelNotify();
-
- /**
- * Determines if there is notify ongoing.
- *
- *
- * @return ETrue - notify is ongoing, EFalse - notify is not ongoing.
- */
- virtual TBool IsNotifyOngoing();
-
-protected:
-
-// from base class CActive
-
- /**
- * From CActive
- * Called when timer timeout is up.
- *
- *
- */
- void RunL();
-
- CSPTimer();
-
- void ConstructL();
-
-protected: // data
-
- /**
- * Observer for notify service.
- * Not own.
- */
- MCSPTimerObserver* iObserver;
-
- };
-
-#endif // CSPTIMER_H
--- a/convergedcallengine/csplugin/inc/csptransferprovider.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,200 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header of CSPTransferProvider which provides methods and
-* functionality to handle call transfering
-*
-*/
-
-
-#ifndef CSPTRANSFERPROVIDER_H
-#define CSPTRANSFERPROVIDER_H
-
-#include <e32base.h>
-#include <mccptransferprovider.h>
-#include <mccptransferobserver.h>
-
-class RMobileCall;
-class MCSPCallErrorObserver;
-class MCSPCommonInfo;
-
-/**
-* Call transfer methods.
-* MCCPCallObserver is used for errors, statuses, notifications etc
-*
-* @since S60 3.2
-*/
-class CSPTransferProvider : public CActive,
- public MCCPTransferProvider
- {
-
- public:
- /**
- * Two phased constructing of the transfer provider instance.
- * @param aCall mobile call handle
- * @return the Transfer provider instance
- */
- static CSPTransferProvider* NewL( RMobileCall& aCall,
- MCSPCallErrorObserver& aErrorObserver,
- MCSPCommonInfo& aCommonInfo );
-
- /**
- * Destructs the transfer provider.
- * @since S60 3.2
- */
- virtual ~CSPTransferProvider();
-
- public:
-
- // from base class MCCPTransferProvider
- /**
- * Attended transfer to given call recipient.
- * There exist a call between A-B and A-C. A wants to transfer the call
- * to B-C. A itself will not be inline in case the transfer is made
- * succesfully.In above case C will be the aTransferTargetCall. B is
- * the recipient of the current call between A-B - called on A's call
- * object transfer provider. The A-B call is on hold (optional).
- *
- * @param aTransferTargetCall Target receiver of the transferred call.
- * In this case there exist a call.
- * @return In case of an immediate error returns system error code,
- * if request has been started returns KErrNone.
- * Actual request result indication comes via observer class
- */
- TInt AttendedTransfer( MCCPCall& aTransferTargetCall );
-
- /**
- * Attended transfer to given address. There does not need to be
- * a current call between the given transfer target.
- * @param aTransferTarget Transfer target address
- * @return In case of an immediate error returns system error code,
- * if request has been started returns KErrNone.
- * Actual request result indication comes via observer class
- */
- TInt AttendedTransfer( const TDesC& aTransferTarget );
-
- /**
- * Unattended transfer. Call is requested to be transferred to given
- * address. After ECCPRemoteTransferring event current call will be
- * disconnected and no transfer status is checked from the operation.
- * @param aTransferTarget Address of the target
- * @return In case of an immediate error returns system error code,
- * if request has been started returns KErrNone.
- * Actual request result indication comes via observer class
- */
- TInt UnattendedTransfer( const TDesC& aTransferTarget );
-
- /**
- * Accept incoming call transfer request from the call remote party.
- * @param aAccept ETrue - accept transfer,
- * EFalse do not accept transfer request.
- * @return In case of an immediate error returns system error code,
- * if request has been started returns KErrNone.
- * Actual request result indication comes via observer class
- */
- TInt AcceptTransfer( const TBool aAccept );
-
- /**
- * When the other end of the call has requested call transfer to
- * third party it is notified to
- * CCPCallCall::EventOccurred(ECCPRemoteTransferring).
- * The new recipient of the call can be fetched via this method.
- * @return New recipient for the call after transfer
- */
- const TDesC& TransferTarget() const;
-
- /**
- * Add an observer for transfer related events.
- * Plug-in dependent feature if duplicates or more than one observers
- * are allowed or not. Currently CCE will set only one observer.
- * @since S60 v3.2
- * @param aObserver Observer
- * @leave system error if observer adding fails
- */
- void AddObserverL( const MCCPTransferObserver& aObserver );
-
- /**
- * Remove an observer.
- * @since S60 v3.2
- * @param aObserver Observer
- * @return KErrNone if removed succesfully
- * KErrNotFound if observer was not found.
- * Any other system error depending on the error.
- */
- TInt RemoveObserver( const MCCPTransferObserver& aObserver );
-
- /**
- * A transfer event has occurred concerning a specific call.
- * @since S60 3.2
- * @param aEvent Occurred event.
- */
- void TransferEventOccurred(
- const MCCPTransferObserver::TCCPTransferEvent aEvent );
-
- // from base class CActive
- protected:
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
- private:
- /**
- * Constructs the provider
- *
- * @param aCall handle mobile call
- */
- CSPTransferProvider( RMobileCall& aCall,
- MCSPCallErrorObserver& aErrorObserver,
- MCSPCommonInfo& aCommonInfo );
-
- /**
- * Constructing 2nd phase.
- */
- void ConstructL();
-
- private: // data
-
- /**
- * DTMF event observer.
- */
- RPointerArray<MCCPTransferObserver> iObservers;
-
- /**
- * Etel call object
- */
- RMobileCall& iCall;
-
- /**
- * Error observer;
- */
- MCSPCallErrorObserver& iErrorObserver;
-
- /**
- * Common information for calls.
- */
- MCSPCommonInfo& iCommonInfo;
-
-
-};
-
-#endif CSPTRANSFERPROVIDER_H
--- a/convergedcallengine/csplugin/inc/cspuuimessagesender.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Sends UUI message.
-*
-*/
-
-
-#ifndef CSPUUIMESSAGESENDER_H
-#define CSPUUIMESSAGESENDER_H
-
-#include <e32base.h>
-#include <etelmm.h>
-
-/**
- * Sends user to user information messages.
- *
- * @lib PhoneEngine.lib
- * @since S60 v3.2
- */
-NONSHARABLE_CLASS( CSPUUIMessageSender ) : public CActive
- {
-
-public:
-
- static CSPUUIMessageSender* NewL(
- RMobileCall& aCall );
-
- virtual ~CSPUUIMessageSender();
-
- /**
- * Sends user to user information.
- *
- * @since S60 v3.2
- * @param aMessage UUI message to be sent.
- */
- void SendUUIMessage( const TDesC& aMessage );
-
-// from base class CActive
-
-protected:
-
- /**
- * From CActive.
- *
- * Cancels active request.
- * @since S60 v3.2
- */
- void DoCancel();
-
- /**
- * From CActive.
- *
- * Callback to indicate completion
- * of request.
- * @since S60 v3.2
- */
- void RunL();
-
-private:
-
- CSPUUIMessageSender(
- RMobileCall& aCall );
-
- void ConstructL();
-
-private: // data
-
- /**
- * Call, which the UUI is sent to.
- * Not own.
- */
- RMobileCall& iCall;
-
- /**
- * Request.
- */
- RMobileCall::TMobileCallUUSRequestV1 iUUSRequest;
-
- /**
- * Request package.
- */
- RMobileCall::TMobileCallUUSRequestV1Pckg iUUSRequestPckg;
- };
-
-#endif // CSPUUIMESSAGESENDER_H
--- a/convergedcallengine/csplugin/inc/cspuuimonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Monitor UUI messages.
-*
-*/
-
-
-#ifndef CSPUUIMONITOR_H
-#define CSPUUIMONITOR_H
-
-#include <e32base.h>
-#include <etelmm.h>
-
-class MCSPUUSMessageObserver;
-
-/**
- * Monitors UUI messages.
- *
- * @lib PhoneEngine.lib
- * @since S60 v3.2
- */
-NONSHARABLE_CLASS( CSPUUIMonitor ) : public CActive
- {
-public:
-
- static CSPUUIMonitor* NewL(RMobileCall& aCall,
- MCSPUUSMessageObserver& aUUIHandler );
-
- virtual ~CSPUUIMonitor();
-
- /**
- * Starts monitoring the UUI messages
- *
- * @since S60 v3.2
- */
- void StartMonitor();
-
-protected:
-
-// from base class CActive
-
- /**
- * From CActive
- * Cancels the outstanding request
- *
- * @since S60 v3.2
- */
- void DoCancel();
-
- /**
- * From CActive
- * Handles request completion
- *
- * @since S60 v3.2
- */
- void RunL();
-
-private:
-
- CSPUUIMonitor(RMobileCall& aCall,
- MCSPUUSMessageObserver& aUUIHandler );
-
- void ConstructL();
-
-private: // data
-
- /**
- * Etel call.
- * Not own.
- */
- RMobileCall& iCall;
-
- /**
- * UUI data.
- */
- RMobileCall::TMobileCallUUI iUUI;
-
-
- /**
- * UUI message observer;
- */
- MCSPUUSMessageObserver& iObserver;
-
- };
-
-#endif // CSPUUIMONITOR_H
--- a/convergedcallengine/csplugin/inc/cspvideocall.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,231 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements CSPVideoCall for CS Call Plug-in
-*
-*/
-
-
-
-#ifndef CSPVIDEOCALL_H
-#define CSPVIDEOCALL_H
-
-#include <mccpcscall.h>
-#include <mccpcallobserver.h>
-#include <etel.h>
-#include <etelmm.h>
-#include <cccecallparameters.h>
-
-#include "cspcall.h"
-#include "cspconsts.h"
-#include "mcspcallobserver.h"
-#include "mcspcallerrorobserver.h"
-#include "cspvideocallconnectionhandler.h"
-
-
-class MCCPObserver;
-class RMobileCall;
-class CSPEtelCallStatusMonitor;
-class CSPEtelCallEventMonitor;
-class CSPEtelVideoCallCapsMonitor;
-class CSPEtelCallWaitingRequester;
-
-/**
-* Call class for CS Call Plug-in. Implements the API defined by CCP in classes
-* MCCPCall and MCCPCSCall
-*
-* @lib csplugin.dll
-* @since S60 v3.2
-*/
-class CSPVideoCall : public CSPCall
- {
-
- public:
- /*
- * Creates a new CSPVideoCall object.
- * @since S60 3.2
- * @param aName dialled number (MT) or call name (MO)
- * @param aLine line for opening the call
- * @param aMobileOriginated direction of call
- * @param aParams call parameters
- * @param aCommonInfo common information for call,
- * @return pointer to created call object
- */
- static CSPVideoCall* NewL( const TDesC& aName,
- RMobileLine& aLine,
- TBool aMobileOriginated,
- const CCCECallParameters& aParams,
- MCSPCommonInfo& aCommonInfo );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPVideoCall( );
-
- /**
- * Informs about ready data connection.
- * @aPortName name of data port
- */
- void ConnectionReady( TName aDataPortName );
-
- /**
- * Error occurred when establishing connection.
- * @param aErr error value
- */
- void ConnectionEstablishingFailed(TInt aErr);
-
- /**
- * Notification about data call caps change.
- * @param aCaps new caps
- */
- void DataCallCapsChanged( RMobileCall::TMobileCallDataCapsV1& aCaps );
-
- /**
- * Selects call type video or voice depending of available procotol
- * capabilities
- * @return Call type video or voice
- */
- CCPCall::TCallType SelectCallTypeFromProtocolCaps();
-
-// from base class CSPCall
-
- /**
- * From CSPCall
- * Updates the state change and forwards the state for observer.
- * @param aState new state of the call
- */
- virtual void NotifyCallStateChanged( MCCPCallObserver::TCCPCallState aState );
-
- /**
- * From CSPCall
- * Updates the state change and forwards the state for observer.
- * @param aState new state of the call
- */
- virtual void NotifyCallStateChangedWithInband( MCCPCallObserver::TCCPCallState aState );
-
- /**
- * From MCCPCSCall
- * Starts dialing to recipient without FDN check.
- * @param aCallParams Call parameters used by the TSY (TCallParamsPckg)
- * @return system wide error code
- */
- TInt DialNoFdnCheck( const TDesC8& aCallParams );
-
- /**
- * From CSPCall
- * Switch in the alternating call mode of an alternating call
- * @since S60 3.2
- */
- TInt SwitchAlternatingCall();
-
- /**
- * From MCCPCSCall
- * Gets the calls data call capabilities
- * @since S60 3.2
- * @param aCaps TMobileCallDataCapsV1
- * @return KErrNone if the function member was successful,
- * KErrNotSupported if call doesn't support circuit switched data
- * KErrNotFound if this call is not a data call
- */
- virtual TInt GetMobileDataCallCaps( TDes8& aCaps ) const;
-
- /**
- * From MCCPCall
- * Get call's secure status.
- * @since S60 3.2
- * @return TBool ETrue if security is enabled, else EFalse.
- */
- TBool IsSecured() const;
-
- protected:
-
- /*
- * C++ default constructor
- * @param aLine open line ready for use
- * @param aMobileOriginated true if MO, false if MT
- * @param aName call name (MT) or recipient (MO)
- * @param aCommonInfo reference to common info interface
- */
- CSPVideoCall( RMobileLine& aLine,
- TBool aMobileOriginated,
- const TDesC& aName,
- MCSPCommonInfo& aCommonInfo );
-
- /*
- * Constructing 2nd phase.
- * @since S60 3.2
- */
- void ConstructL( const CCCECallParameters& aParams );
-
- private:
-
- /**
- * Sets default call params.
- */
- void SetDefaultCallParameters();
-
- /**
- * Sets default video call params
- */
- void SetVideoCallParameters();
-
- /**
- * Branches dial requests according
- * to FDN check flag.
- * @aFdnCheck ETrue if FDN is checked
- */
- TInt DialFdnCond( TBool aFdnCheck );
-
- private:
-
- /**
- * Data call caps monitor
- * Own.
- */
- CSPEtelVideoCallCapsMonitor* iVideoCallCapsMonitor;
-
- /**
- * Call parameters.
- */
- RMobileCall::TMobileHscsdCallParamsV1 iDataCallParams;
-
- /**
- * Call parameters package.
- */
- RMobileCall::TMobileHscsdCallParamsV1Pckg iDataCallParamsPckg;
-
- /**
- * Air Interface User Rate
- */
- RMobileCall::TMobileCallAiur iAirInterfaceUserRate;
-
- /**
- * Current received time slots
- */
- TInt iCurrentTimeSlots;
-
- /**
- * Connection functionality
- * Own.
- */
- CSPVideoCallConnectionHandler* iConnectionHandler;
-
- /**
- * Next call state
- */
- MCCPCallObserver::TCCPCallState iNextCallState;
-
- };
-
-
-#endif // CSPVIDEOCALL_H
--- a/convergedcallengine/csplugin/inc/cspvideocallconnectionhandler.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Delivers asynchronous requests to ETel
-*
-*/
-
-
-#ifndef CSPVIDEOCALLCONNECTIONHANDLER_H
-#define CSPVIDEOCALLCONNECTIONHANDLER_H
-
-
-#include <e32base.h>
-#include <etelmm.h>
-#include <rmmcustomapi.h>
-#include <es_sock.h>
-#include <es_enum.h>
-
-class CSPVideoCall;
-
-/**
-* Handles data call connection specific requests.
-* Provides canceling via CActive::Cancel().
-*
-*/
-class CSPVideoCallConnectionHandler : public CActive
- {
-
- public:
-
- /**
- * Constructs the requester via two phase.
- *
- * @param aObserver the observer for request errors
- * @param aCall ETel RMobileCall reference that is the object
- * of the request.
- */
- static CSPVideoCallConnectionHandler* NewL( CSPVideoCall& aObserver,
- RMobileCall& aCall );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPVideoCallConnectionHandler( );
-
- /**
- * Initializes connection including data port loaning.
- * @since S60 3.2
- * @return KErrNone if successful, else error code
- */
- TInt InitializeConnection( );
-
- /**
- * Releases connection including data port loaning.
- * @since S60 3.2
- * @return KErrNone if successful, else error code
- */
- TInt ReleaseConnection( );
-
- /**
- * Connection initialized.
- * @since S60 3.2
- * @return connection initialized status
- */
- TBool ConnectionInitialized( );
-
- protected: // From CActive
-
- /**
- * From CActive
- * RunL
- * @since S60 3.2
- */
- void RunL();
-
- /**
- * From CActive
- * Cancels the monitor
- * @since S60 3.2
- */
- void DoCancel();
-
- private:
-
- /**
- * Constructs the connection handler.
- *
- * @param aObserver the observer for request errors
- * @param aCall ETel RMobileCall reference that is the object
- * of the request.
- */
- CSPVideoCallConnectionHandler( CSPVideoCall& aObserver,
- RMobileCall& aCall );
-
- /**
- * Constructing in the second phase.
- */
- void ConstructL();
-
- /**
- * Create socket connection.
- */
- TInt CreateSocketConnection();
-
- /**
- * Loan data port.
- * Initiates asynchronous request to loan dataport.
- */
- TInt LoanDataPort();
-
- /**
- * Close socket connection.
- */
- void CloseConnection();
-
-
- private: // data
- /**
- * Observer for request errors.
- */
- CSPVideoCall& iObserver;
-
- /**
- * ETel call which this monitors
- */
- RMobileCall& iCall;
-
- /**
- * Comm port info.
- */
- RCall::TCommPort iCommPort;
-
- /**
- * Connection reference
- */
- RConnection iConnection;
-
- /**
- * Tells if socket connection has been initialized
- */
- TBool iConnectionInitialized;
-
- /**
- * Socket Server handle.
- */
- RSocketServ iSocketServer;
-
- };
-
-#endif // CSPVIDEOCALLCONNECTIONHANDLER_H
--- a/convergedcallengine/csplugin/inc/cspvoicecall.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements CSPVoiceCall for CS Call Plug-in
-*
-*/
-
-
-#ifndef CSPVOICECALL_H
-#define CSPVOICECALL_H
-
-
-#include <mccpemergencycall.h> // For MCCPEmergencyCall
-
-#include "cspcall.h" // For CSPCall
-
-
-class MCCPForwardProvider;
-class MCCPObserver;
-class RMobileCall;
-class CSPEtelCallStatusMonitor;
-class CSPEtelCallEventMonitor;
-class CSPEtelCallWaitingRequester;
-
-/**
-* Call class for CS Call Plug-in. Implements the API defined by CCP in classes
-* MCCPCall and MCCPCSCall
-*
-* @lib csplugin.dll
-*/
-class CSPVoiceCall : public CSPCall,
- public MCCPEmergencyCall
- {
-
- public:
- /*
- * Creates a new CSPVoiceCall object for MO or MT call.
- * @param aName dialled number (MO) or call name (MT)
- * @param aLine line for opening the call
- * @param aMobileOriginated direction of call
- * @param aParams call parameters
- * @param aCommonInfo common info interface
- * @param aIsEmergency is emergency call
- * @return pointer to created call object
- */
- static CSPVoiceCall* NewL( const TDesC& aName,
- RMobileLine& aLine,
- TBool aMobileOriginated,
- const CCCECallParameters& aParams,
- MCSPCommonInfo& aCommonInfo,
- TBool aIsEmergency );
-
- /**
- * C++ default destructor
- */
- virtual ~CSPVoiceCall();
-
- /**
- * Goes one-to-one from conference.
- * @return system wide error code
- */
- TInt GoOneToOne();
-
-// from base class CSPCall
-
- /**
- * From MCCPCSCall
- * Switch in the alternating call mode of an alternating call
- * @return system wide error code
- */
- TInt SwitchAlternatingCall();
-
- /**
- * From MCCPCall
- * Answer call.
- * @return system wide error code
- */
- TInt Answer();
-
- /**
- * Ends an ongoing call.
- * @return KErrNone If request was started succesfully.
- * @return KErrAlreadyExists If call is already in idle state.
- */
- TInt HangUp();
-
- /**
- * From MCCPCall
- * Cancels the ongoing dial request
- * @return system wide error code
- */
- TInt Cancel();
-
-// from base class MCCPEmergencyCall
-
- /**
- * Dials an emergency call.
- * @param aRecipient Emergency call address suggested to be used.
- * Can be given also in CConvergedCallProvider::NewEmergencyCallL.
- * Plug-in will use given address and/or its own known one.
- * Preferred address usage order:
- * 1) Plug-in own emergency address
- * 2) Address given in Dial
- * 3) Address given in CConvergedCallProvider::NewEmergencyCallL.
- * @return KErrNone if request was started succesfully.
- * @return KErrNotReady If call is not in idle state.
- * @return KErrNotSupported Emergency call is not supported.
- */
- TInt Dial( const TDesC& aEmergencyNumber);
-
- protected:
-
- /*
- * Voice call constructor.
- * @param aLine open line ready for use
- * @param aServiceId service ID
- * @param aCallType type of call (voice/video/data/fax)
- * @param aLineType primary/aux line type
- * @param aMobileOriginated direction of call
- * @param aName remote party or call name depending on direction
- * @param aExtMoCall true in case of externally created MO call
- * @param aIsEmergency is emergency call flag
- * @param aBearer bearer capabilities for SAT
- * @param aSubAddress sub adrress for SAT
- * @param aOrigin call origin (i.e. SAT or Phone)
- */
- CSPVoiceCall( RMobileLine& aLine,
- TBool aMobileOriginated,
- const TDesC& aName,
- MCSPCommonInfo& aCommonInfo,
- TBool aIsEmergency );
-
- /*
- * Constructing 2nd phase.
- */
- void ConstructL( const CCCECallParameters& aParams );
-
- /**
- * Set default call parameters to be used in dial.
- */
- void SetDefaultCallParameters();
-
- /**
- * From CSPCall.
- * Starts dialing to recipient.
- * Bypasses FDN check according to aFdnCheck.
- * @param aFdnCheck True if FDN checking is used
- * @return system wide error code
- */
- TInt DialFdnCond( TBool aFdnCheck );
-
- protected: // Data
-
- /**
- * Call parametrs.
- */
- RMobileCall::TMobileCallParamsV7 iCallParams;
-
- /**
- * Package of call paremeters.
- */
- RMobileCall::TMobileCallParamsV7Pckg iCallParamsPckg;
-
- /**
- * Stores the emergency number.
- */
- RMobileENStore::TEmergencyNumber iEmergencyNumber;
-
- friend class UT_CSPVoiceCall;
-
- };
-
-
-#endif // CSPVOICECALL_H
--- a/convergedcallengine/csplugin/inc/mcspaudiostreamobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Observer interface for getting information on audio streams.
-*
-*/
-
-
-#ifndef MCSPAUDIOSTREAMOBSERVER_H
-#define MCSPAUDIOSTREAMOBSERVER_H
-
-/**
- * Observer interface for getting information of audio streams.
- *
- */
-NONSHARABLE_CLASS( MCSPAudioStreamObserver )
- {
-
-public:
-
- /**
- * Indication that audio streams has been started.
- *
- */
- virtual void AudioStreamsStarted() = 0;
-
- /**
- * Indication that audio streams will be closed.
- *
- * Client can do operations affected to streams from this method,
- * but after this method the streams will be closed.
- *
- */
- virtual void AudioStreamsGoingToStop() = 0;
-
- };
-
-
-#endif // MCSPAUDIOSTREAMOBSERVER_H
--- a/convergedcallengine/csplugin/inc/mcspcalladdedobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for MCSPCallAddedObserver class
-*
-*/
-
-
-
-#ifndef MCSPCALLADDEDOBSERVER_H
-#define MCSPCALLADDEDOBSERVER_H
-
-//INCLUDES
-#include <etelmm.h>
-
-#include "rcsplinecontainer.h"
-
-// CLASS DECLARATION
-
-/**
-* Virtual interface for monitoring incoming call.
-*
-* @since S60 3.2
-*/
-class MCSPCallAddedObserver
- {
- public:
-
- /**
- * Informs about added call.
- * @since S60 3.2
- * @param aLine the line that corresponds to the call
- * @param aCallName the name of the call
- */
- virtual void CallAdded( RMobileLine& aLine,
- TName aCallName,
- RCSPLineContainer::TCSPLineId aLineId ) = 0;
-
-
- };
-
-#endif // MINCOMINGCALLOBSERVER_H
-
-//End of file
--- a/convergedcallengine/csplugin/inc/mcspcallcommandhandling.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class mcspcallcommandhandling
-*
-*/
-
-
-
-#ifndef MCSPCALLCOMMANDHANDLING_H
-#define MCSPCALLCOMMANDHANDLING_H
-
-// INCLUDES
-#include <e32std.h>
-
-class CSPCall;
-
-// CLASS DECLARATION
-
-
-/**
-* Observer interface for call command handling
-*
-*/
-class MCCPCallCommandHandling
- {
- public: // New functions
-
- /**
- * Perform answer command.
- * @return system wide error code
- */
- virtual TInt PerformAnswerRequest() = 0;
-
- /**
- * Perform dial command.
- * @return system wide error code
- */
- virtual TInt PerformDialRequest() = 0;
-
- };
-
-#endif // MCSPCALLCOMMANDHANDLING_H
-
-// End of File
--- a/convergedcallengine/csplugin/inc/mcspcallerrorobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for MCSPCallErrorObserver class for
-* observing errors related to call requests, e.g. dialling.
-*
-*/
-
-
-
-#ifndef MCSPCALLERROROBSERVER_H
-#define MCSPCALLERROROBSERVER_H
-
-//INCLUDES
-#include <ccpdefs.h>
-
-
-
-// CLASS DECLARATION
-
-/**
-* Interface for monitoring incoming call.
-*
-* @since S60 3.2
-*/
-class MCSPCallErrorObserver
- {
- public:
-
- /**
- * Informs about failed dial.
- * @param aErrorCode
- */
- virtual void DialRequestFailed( TInt aErrorCode ) = 0;
-
- /**
- * Informs about failed emergency dial.
- * @param aErrorCode
- */
- virtual void EmergencyDialRequestFailed( TInt aErrorCode ) = 0;
-
- /**
- * Informs about erroneous request.
- * @since S60 3.2
- * @param aError request related to the error.
- */
- virtual void NotifyErrorOccurred( TCCPError aErr ) = 0;
-
-
-
- };
-
-#endif // MINCOMINGCALLOBSERVER_H
-
-//End of file
--- a/convergedcallengine/csplugin/inc/mcspcallinformation.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for MCSPCallInformation class
-*
-*/
-
-
-
-#ifndef MCSPCALLINFORMATION_H
-#define MCSPCALLINFORMATION_H
-
-//INCLUDES
-#include <etelmm.h>
-
-// FORWARD DECLARATIONS
-class CSPCall;
-
-// CLASS DECLARATION
-
-/**
-* Interface for browsing calls.
-*
-*/
-class MCSPCallInformation
- {
- public:
-
- /**
- * Finds call based on the name.
- * @param aCallName call name (etel)
- * @return call object or NULL if not found.
- */
- virtual CSPCall* FindCall( const TName& aCallName ) = 0;
-
- };
-
-#endif // MINCOMINGCALLOBSERVER_H
-
-//End of file
--- a/convergedcallengine/csplugin/inc/mcspcallobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for MCSPCallObserver class for
-* observing errors related to call requests, e.g. dialling.
-*
-*/
-
-
-
-#ifndef MCSPCALLOBSERVER_H
-#define MCSPCALLOBSERVER_H
-
-//INCLUDES
-#include <etelmm.h>
-
-#include <mccpcallobserver.h>
-#include <mccptransferobserver.h>
-#include <mccpforwardobserver.h>
-#include <mccpconferencecallobserver.h>
-
-
-
-// CLASS DECLARATION
-
-/**
-* Interface for monitoring incoming call.
-*
-* @since S60 3.2
-*/
-class MCSPCallObserver
- {
- public:
-
- /**
- * Informs about occurred event.
- * @since S60 3.2
- * @param aEvent occurred event
- */
- virtual void NotifyCallEventOccurred(
- MCCPCallObserver::TCCPCallEvent aEvent ) = 0;
-
- /**
- * Updates the state change and forwards the state for observer.
- * @param aState new state (ETel) of the call
- */
- virtual void NotifyCallStateChangedETel(
- RMobileCall::TMobileCallStatus aState ) = 0;
-
- /**
- * Informs about changed state that includes inband tones.
- * @since S60 3.2
- * @param aState the new state
- */
- virtual void NotifyCallStateChangedWithInband(
- MCCPCallObserver::TCCPCallState aState ) = 0;
-
- /**
- * Informs about occurred transfer related event.
- * @since S60 3.2
- * @param aEvent occurred transfer event
- */
- virtual void NotifyTransferCallEventOccurred(
- const MCCPTransferObserver::TCCPTransferEvent aEvent ) = 0;
-
-
- /**
- * Updates the call event for observers.
- * @param aEvent the event to be notified
- */
- virtual void NotifyForwardEventOccurred(
- MCCPForwardObserver::TCCPForwardEvent aEvent ) = 0;
-
-
- /**
- * Updates changed call capability information.
- * @param aCapsFlags new caps flags
- */
- virtual void CallCapsChanged( const TUint32 aCapsFlags ) = 0;
-
- /**
- * Notify that remote party info has changed.
- * @param aRemotePartyName new remote party name
- * @param aRemotePartyNumber new remote party number
- *
- */
- virtual void NotifyRemotePartyInfoChanged(
- const TDesC& aRemotePartyName,
- const TDesC& aRemotePartyNumber
- ) = 0;
-
-
- };
-
-#endif // MINCOMINGCALLOBSERVER_H
-
-//End of file
--- a/convergedcallengine/csplugin/inc/mcspcenrepobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class MCSPCenRepObserver
-*
-*/
-
-
-
-#ifndef MCSPCENREPOBSERVER_H
-#define MCSPCENREPOBSERVER_H
-
-// INCLUDES
-#include <e32std.h>
-
-// CLASS DECLARATION
-
-/**
-* Observer interface for indicating P&S changes
-*
-*/
-class MCSPCenRepObserver
- {
- public: // New functions
-
- /**
- * Handler for changed event.
- * @param aUid uid of setting
- * @param aKey the changed key
- * @param aVal value
- */
- virtual void HandleNotifyCenRepL( const TUid aUid,
- const TUint32 aKey,
- TInt aVal) = 0;
- };
-
-#endif // MCSPCENREPOBSERVER_H
-
-// End of File
--- a/convergedcallengine/csplugin/inc/mcspcommoninfo.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class MCSPCommonInfo
-*
-*/
-
-
-
-#ifndef MCSPCOMMONINFO_H
-#define MCSPCOMMONINFO_H
-
-// INCLUDES
-#include <e32std.h>
-#include <etelmm.h> // for ciphering status
-#include <rmmcustomapi.h>
-#include <mccpcall.h> // For CCCPCallParameters
-#include <mccecall.h>
-
-
-class CSPCall;
-class MCCPCallCommandHandling;
-class MCCPCSCall;
-
-// CLASS DECLARATION
-
-
-/**
-* Observer interface for indicating P&S changes
-*
-*/
-class MCSPCommonInfo
- {
- public: // New functions
-
- /**
- * Makes the request. Note that ERequestTypeDial is made with a
- * separate MakeDialRequest function.
- *
- * @param aRequest type of request
- * @return ETrue if active, EFalse if not
- */
- virtual void GetCallWaitingL( const CCCECallParameters& iParams,
- TBool& aCallWaitingStatus ) = 0;
-
- /**
- * Diagnostic error fetching.
- * @param aCallName name of call
- * @return diagnostic error code
- */
- virtual TInt GetDiagnosticError( TName& aCallName ) = 0;
-
-
- /**
- * Network security status.
- * @since Series60_4.0
- * @return true if calls use secured connection
- */
- virtual TBool NetworkSecurityStatus() const = 0;
-
-
- /**
- * Remote alerting tone playing status.
- * @return tone status (tone type/not played)
- */
- virtual RMmCustomAPI::TRemoteAlertingToneStatus GetRemoteAlertingToneStatus() = 0;
-
- /**
- * Initializes with current settings.
- * @param aParams call params
- */
- virtual void InitializeCallParameters( RMobileCall::TMobileCallParamsV7& aParams ) = 0;
-
- /**
- * Initializes with current settings.
- * @param aParams call params
- */
- virtual void InitializeDataCallParameters(
- RMobileCall::TMobileHscsdCallParamsV1& aParams ) = 0;
-
- /**
- * Indicates that client call has been created.
- * @param aCall client call pointer
- */
- virtual void IndicateClientCall( MCCPCSCall* aCall ) = 0;
-
- /**
- * Indicates incoming call.
- * @param aCall MT call
- * @return system wide error code
- */
- virtual TInt IndicateIncomingCall( MCCPCSCall* aCall ) = 0;
-
- /**
- * Notify data port name of a loaned data port.
- * @param aDataPort
- */
- virtual void NotifyDataPortName( TName& aDataPortName ) = 0;
-
- /**
- * Indicates active hangup command.
- * @param aCall MT call
- * @return system wide error code
- */
- virtual TInt IndicateActiveHangup( MCCPCallCommandHandling& aCall ) = 0;
-
- /**
- * Indicates hangup command complete.
- * @param aCall MT call
- * @return system wide error code
- */
- virtual TInt IndicateHangupComplete( MCCPCallCommandHandling& aCall ) = 0;
-
- /**
- * Indicates dial command.
- * @param aCall MT call
- * @return system wide error code
- */
- virtual TInt IndicateDialRequest( MCCPCallCommandHandling& aCall ) = 0;
-
- /**
- * Indicates answer command.
- * @param aCall MT call
- * @return system wide error code
- */
- virtual TInt IndicateAnswerRequest( MCCPCallCommandHandling& aCall ) = 0;
-
- /**
- * Secure specified status.
- * @since Series60_5.0
- * @return ETrue if specified
- */
- virtual TBool SecureSpecified() const = 0;
-
- /**
- * Don't report termination error
- * @since Series60_5.0
- * @return system wide error code
- */
- virtual TInt DontReportTerminationError() = 0;
-
- };
-
-#endif // MCSPCOMMONINFO_H
-
-// End of File
--- a/convergedcallengine/csplugin/inc/mcspconferencestatusobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for MCSPConferenceStatusObserver class
-*
-*/
-
-
-
-#ifndef MCSPCONFERENCESTATUSOBSERVER_H
-#define MCSPCONFERENCESTATUSOBSERVER_H
-
-
-// CLASS DECLARATION
-
-/**
-* Virtual interface for monitoring conference status.
-*
-* @since S60 5.0
-*/
-NONSHARABLE_CLASS(MCSPConferenceStatusObserver)
- {
- public:
-
- /* Security setting event value */
- enum TCSPConferenceState
- {
- /** The conference call is in the idle state. */
- ECSPConferenceIdle,
- /** The conference call is in the active, connected state. */
- ECSPConferenceActive,
- /** The conference call is in the held, connected state. */
- ECSPConferenceHold,
- };
-
- /**
- * Informs conference call state change.
- * @since S60 5.0
- */
- virtual void NotifyStateChange(
- MCSPConferenceStatusObserver::TCSPConferenceState aStatus ) = 0;
-
- };
-
-#endif // MCSPCONFERENCESTATUSOBSERVER_H
--- a/convergedcallengine/csplugin/inc/mcspdevsoundobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Observer for audio stream start up.
-*
-*/
-
-
-#ifndef MCSPDEVSOUNDOBSERVER_H
-#define MCSPDEVSOUNDOBSERVER_H
-
-/**
- * Observer interface for knowing when audio streams have been
- * successfully ramped up.
- *
- */
-class MCSPDevSoundObserver
- {
-
-public:
-
- /**
- * Notification that Mic has been activated successfully
- *
- */
- virtual void MicActivatedSuccessfully() = 0;
-
- /**
- * Notification that speaker has been activated successfully
- *
- */
- virtual void SpeakerActivatedSuccessfully() = 0;
-
- /**
- * Notification that Mic initialisation failed.
- *
- */
- virtual void MicActivationFailed() = 0;
-
- /**
- * Notification that Speaker activation failed.
- *
- */
- virtual void SpeakerActivationFailed() = 0;
-
- };
-
-
-#endif // MCSPDEVSOUNDOBSERVER_H
--- a/convergedcallengine/csplugin/inc/mcspincomingcallobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for MCSPIncomingCallObserver class
-*
-*/
-
-
-
-#ifndef MCSPINCOMINGCALLOBSERVER_H
-#define MCSPINCOMINGCALLOBSERVER_H
-
-//INCLUDES
-#include <etelmm.h>
-
-#include "rcsplinecontainer.h"
-
-// CLASS DECLARATION
-
-/**
-* Virtual interface for monitoring incoming call.
-*
-* @since S60 3.2
-*/
-class MCSPIncomingCallObserver
- {
- public:
-
- /**
- * Informs incoming call.
- * @since S60 3.2
- * @param aLine the line that corresponds to the call
- * @param aCallName the name of the call
- */
- virtual void IncomingCallArrived( RMobileLine& aLine,
- TName aCallName,
- RCSPLineContainer::TCSPLineId aLineId ) = 0;
-
-
- };
-
-#endif // MINCOMINGCALLOBSERVER_H
-
-//End of file
--- a/convergedcallengine/csplugin/inc/mcsplinestatusobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for MCSPLineStatusObserver class
-*
-*/
-
-
-
-#ifndef MCSPLINESTATUSOBSERVER_H
-#define MCSPLINESTATUSOBSERVER_H
-
-//INCLUDES
-#include <etelmm.h>
-#include "rcsplinecontainer.h"
-
-// CLASS DECLARATION
-
-/**
-* Virtual interface for monitoring line status changes.
-*
-* @since S60 5.0
-*/
-NONSHARABLE_CLASS(MCSPLineStatusObserver)
- {
- public:
-
- /**
- * Informs about line status changes.
- * @since S60 5.0
- * @param aLine the line that is monitored for events
- * @param aLineId the line id
- * @param aCallStatus the line status
- */
- virtual void LineStatusChanged( RMobileLine& aLine,
- RCSPLineContainer::TCSPLineId aLineId,
- RMobileCall::TMobileCallStatus& aCallStatus ) = 0;
-
- };
-
-#endif // MCSPLINESTATUSOBSERVER_H
-
-//End of file
--- a/convergedcallengine/csplugin/inc/mcsppubsubobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Declarations for class MCSPPubSubObserver
-*
-*/
-
-
-
-#ifndef MCSPPUBSUBOBSERVER_H
-#define MCSPPUBSUBOBSERVER_H
-
-// INCLUDES
-#include <e32std.h>
-
-// CLASS DECLARATION
-
-/**
-* Observer interface for indicating P&S changes
-*
-*/
-class MCSPPubSubObserver
- {
- public: // New functions
-
- /**
- * Handler for changed event.
- * @param aUid uid of setting
- * @param aKey id of setting
- * @param aStatus status of completed AO operation
- */
- virtual void HandleNotifyPSL( const TUid aUid, const TInt& aKey,
- const TRequestStatus& aStatus ) = 0;
- };
-
-#endif // MCSPPUBSUBOBSERVER_H
-
-// End of File
--- a/convergedcallengine/csplugin/inc/mcspremotealertingtoneobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-/*
-* Copyright (c) Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Observer for remote alerting tone change.
-*
-*/
-
-
-#ifndef MCSPREMOTEALERTINGTONEOBSERVER_H
-#define MCSPREMOTEALERTINGTONEOBSERVER_H
-
-#include <e32std.h>
-#include <rmmcustomapi.h>
-
-/**
- * Observer for remote alerting tone status changes.
- *
- * @lib CSPlugin
- * @since S60 v5.0
- */
-NONSHARABLE_CLASS( MCSPRemoteAlertingToneObserver )
- {
-
-public:
-
- /**
- * Notification of remote alerting tone status change.
- *
- * @since S60 v5.0
- * @param aNewStatus New remote alerting tone status.
- */
- virtual void RemoteAlertingToneStatusChanged(
- RMmCustomAPI::TRemoteAlertingToneStatus aNewStatus ) = 0;
-
- };
-
-
-#endif // MCSPREMOTEALERTINGTONEOBSERVER_H
--- a/convergedcallengine/csplugin/inc/mcspsecuritysettingobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Interface for observing security setting.
-*
-*/
-
-
-
-#ifndef MCSPSECURITYSETTINGOBSERVER_H_
-#define MCSPSECURITYSETTINGOBSERVER_H_
-
-/**
-* Virtual interface for monitoring call ownership.
-*
-* @since S60 3.2
-*/
-class MCSPSecuritySettingObserver
- {
- public:
-
- /* Security setting event value */
- enum TCSPSecuritySettingEvent
- {
- ESecureCall,
- ENotSecureCall,
- ESecureNotSpecified
- };
-
- public:
-
- /**
- * SecuritySettingChanged.
- * @param aValue
- * @since S60 3.2
- */
- virtual void SecuritySettingChanged( TInt aValue ) = 0;
-
- };
-
-#endif /*MCSPSECURITYSETTINGOBSERVER_H_*/
--- a/convergedcallengine/csplugin/inc/mcsptimerobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Observer interface for getting notifes from CSPTimer
-*
-*/
-
-
-#ifndef MCSPTIMEROBSERVER_H
-#define MCSPTIMEROBSERVER_H
-
-/**
- * Observer for CSPTimer events.
- *
- */
-class MCSPTimerObserver
- {
-
-public:
-
- /**
- * Timer request has completed.
- *
- * @since S60 v3.1
- */
- virtual void TimerEvent() = 0;
-
- };
-
-
-#endif // MCSPTIMEROBSERVER_H
--- a/convergedcallengine/csplugin/inc/mcspuusmessageobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for MCSPUUSMessageObserver class
-*
-*/
-
-
-
-#ifndef MCSPUUSMESSAGEOBSERVER_H
-#define MCSPUUSMESSAGEOBSERVER_H
-
-//INCLUDES
-
-// CLASS DECLARATION
-
-/**
-* Observer interface for indicating User to User Signalling
-*
-* @since S60 3.2
-*/
-class MCSPUUSMessageObserver
- {
- public:
-
- /**
- * Informs UUS message
- * @since S60 3.2
- * @param aMessage
- */
- virtual void UUSMessageReceived( TDesC& aMessage ) = 0;
- };
-
-#endif // MCSPUUSMESSAGEOBSERVER_H
-
-//End of file
--- a/convergedcallengine/csplugin/inc/rcsplinecontainer.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,127 +0,0 @@
-/*
-* Copyright (c) 2002-2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Encapsulates all of the lines required by the CS Plugin.
-*
-*/
-
-
-#ifndef RCSPLINECONTAINER_H
-#define RCSPLINECONTAINER_H
-
-// INCLUDES
-
-#include <etelmm.h> // ETel
-#include <mccpcscall.h>
-#include <mccecall.h>
-
-// CLASS DEFINITIONS
-
-/**
-* Encapsulates all of the lines required by the phone
-* engine.
-*
-* @lib phoneengine.lib
-* @since 1.2
-*/
-NONSHARABLE_CLASS(RCSPLineContainer)
- {
- public:
-
- enum TCSPLineId {
- ECSPLineSpeech = 0,
- ECSPLineAuxSpeech,
- ECSPLineData,
- ECSPLineFax
- };
-
- public: // Constructors
-
- // Default c++ constructor
- RCSPLineContainer();
-
- public: // new functions
- /**
- * Open voice, aux, data and fax lines.
- * @since 3.2
- * @param aPhone open lines on this phone
- * @return Returns an error only if the primary
- * line cannot be opened, otherwise KErrNone.
- */
- TInt Open( RMobilePhone& aPhone,
- TUint32 aServiceId );
-
-
- /**
- * @since 3.2
- * Close the lines. Frees all resources owned by
- * this container.
- */
- void Close();
-
- /**
- * Access a specific line
- * @since 1.2
- * @param aLine The type of line to return
- * @returns The line specified
- */
- RMobileLine& LineByType( TCSPLineId aLine );
-
- /**
- * Returns whether the specified line is open
- * @since 3.2
- * @param aLine line to check
- * @return ETrue if specified line is open.
- */
- TBool LineIsOpen( TCSPLineId aLine );
-
- /**
- * Resolve call information.
- * @param aLineId line id (input)
- * @param aServiceId service id (output)
- * @param aCallType call type (output)
- * @param aLineType line type (output)
- */
- TInt ResolveCallInfo( RCSPLineContainer::TCSPLineId aLineId,
- TUint32& aServiceId,
- CCPCall::TCallType& aCallType,
- CCCECallParameters::TCCELineType& aLineType ) const;
-
- /**
- * Resolves line id based on call parameters.
- * @param aCallParameters
- * @return line id
- */
- RCSPLineContainer::TCSPLineId ResolveLineIdL(
- const CCCECallParameters& aCallParameters ) const;
-
-
- private:
-
- // Prohibit copy constructor if not deriving from CBase.
- RCSPLineContainer( RCSPLineContainer& );
- // Prohibit assigment operator if not deriving from CBase.
- RCSPLineContainer& operator=( const RCSPLineContainer& );
-
- private:
- RMobileLine iPrimaryLine;
- RMobileLine iAls2Line;
- RMobileLine iDataLine;
- RMobileLine iFaxLine;
-
- TUint32 iServiceId;
- };
-
-#endif // RCSPLINECONTAINER_H
-
-// End of File
--- a/convergedcallengine/csplugin/inc/tcspskypeidparser.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Parses Skype id from UUI message.
-*
-*/
-
-
-#ifndef TCSPSKYPEIDPARSER_H
-#define TCSPSKYPEIDPARSER_H
-
-#include <e32std.h>
-
-/**
- * Skype id parser.
- *
- * @lib phoneengine.lib
- * @since S60 v3.2
- */
-class TCSPSkypeIdParser
- {
-public:
-
- TCSPSkypeIdParser();
-
- /**
- * Creates right size buffer to be used with parse method.
- *
- * @since S60 v3.2
- * @return Buffer. Ownership given to caller.
- */
- static HBufC* CreateSkypeIdBufferL();
-
-
- /**
- * Parses Skype if from UUI message.
- *
- * @since S60 v3.2
- * @param aUUIMessage Message.
- * @param aSkypeId Parser skype id is appended here.
- * @return Error code. KErrNotSupported if data is not understood by
- * parser.
- */
- TInt Parse( const TDesC& aUUIMessage, TDes& aSkypeId );
-
-
-private: // data
-
- };
-
-#endif // CSPSKYPEIDPARSER_H
--- a/convergedcallengine/csplugin/rom/csplugin.iby Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Image description file for project ?myapp
-*
-*/
-
-
-#ifndef CSPLUGIN_IBY
-#define CSPLUGIN_IBY
-
-ECOM_PLUGIN( csplugin.dll, 102828E3.rsc )
-data=ZSYSTEM\install\csplugin_stub.sis System\Install\csplugin_stub.sis
-
-#endif // CSPLUGIN_IBY
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspaudiohandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,283 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements the class CSPAudioHandler
-*
-*/
-
-
-#include "cspaudiohandler.h"
-
-#include <telmicmutestatuspskeys.h>
-#include <telincallvolcntrlcrkeys.h>
-#include <PSVariables.h>
-#include <AudioPreference.h>
-
-#include "cspaudiostreams.h"
-#include "csppubsublistener.h"
-#include "cspcenreplistener.h"
-#include "csplogger.h"
-
-
-// ---------------------------------------------------------------------------
-// CSPAudioHandler::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPAudioHandler* CSPAudioHandler::NewL( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPAudioHandler::NewL()" );
- CSPAudioHandler* self = new ( ELeave ) CSPAudioHandler( );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// ---------------------------------------------------------------------------
-//
-CSPAudioHandler::~CSPAudioHandler( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPAudioHandler::~CSPAudioHandler()" );
- delete iMuteListener;
- delete iIncallLoudspeakerVolumeListener;
- delete iIncallEarVolumeListener;
- delete iAudioStreams;
- }
-
-// ---------------------------------------------------------------------------
-// CSPAudioHandler::Start
-// ---------------------------------------------------------------------------
-//
-void CSPAudioHandler::Start()
- {
- iCallCount++;
- CSPLOGSTRING2( CSPINT, "CSPAudioHandler::Start callcount: %d", iCallCount );
-
- if ( iCallCount == 1 )
- {
- iAudioStreams->StartStreams();
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPAudioHandler::Stop
-// ---------------------------------------------------------------------------
-//
-void CSPAudioHandler::Stop()
- {
- CSPLOGSTRING2( CSPINT, "CSPAudioHandler::Stop callcount: %d", iCallCount );
- if ( iCallCount == 1 )
- {
- iAudioStreams->StopStreams();
- iCallCount--;
- }
- else if ( iCallCount > 1 )
- {
- iCallCount--;
- }
- }
-
-// ---------------------------------------------------------------------------
-// From MCSPPubSubObserver
-// CSPAudioHandler::HandleNotifyPSL
-// ---------------------------------------------------------------------------
-//
-void CSPAudioHandler::HandleNotifyPSL( const TUid /*aUid*/, const TInt& /*aKey*/,
- const TRequestStatus& /*aStatus*/ )
- {
- TInt muteVal;
- TInt err = iMuteListener->Get( muteVal );
- if ( err == KErrNone && muteVal == EPSTelMicMuteOn )
- {
- CSPLOGSTRING2( CSPINT,
- "CSPAudioHandler::HandleNotifyPSL_MUTE %d", muteVal);
- #if !defined(__WINSCW__)
- iAudioStreams->SetMuted();
- #endif //__WINSCW__
- }
- else if ( err == KErrNone )
- {
- CSPLOGSTRING2( CSPINT,
- "CSPAudioHandler::HandleNotifyPSL_UNMUTE %d", muteVal);
- #if !defined(__WINSCW__)
- // Change when gain is really changed
- iAudioStreams->SetUnmuted();
- #endif //__WINSCW__
- }
- }
-
-// ---------------------------------------------------------------------------
-// From MCSPCenRepObserver
-// CSPAudioHandler::HandleNotifyCenRepL
-// ---------------------------------------------------------------------------
-//
-void CSPAudioHandler::HandleNotifyCenRepL( const TUid /*aUid*/,
- const TUint32 aKey,
- TInt aVal )
- {
- if ( aKey == KTelIncallLoudspeakerVolume )
- {
- CSPLOGSTRING( CSPINT, "CSPAudioHandler::HandleNotifyCenRepL IncallLoudspeaker" );
- iAudioStreams->VolumeChangedLoudspeaker( aVal );
- }
- else if ( aKey == KTelIncallEarVolume )
- {
- CSPLOGSTRING( CSPINT, "CSPAudioHandler::HandleNotifyCenRepL IncallEar" );
- iAudioStreams->VolumeChangedEar( aVal );
- }
- else
- {
- CSPLOGSTRING( CSPINT, "CSPAudioHandler::HandleNotifyCenRepL UNKNOWN" );
- }
- }
-
-// ---------------------------------------------------------
-// CSPAudioHandler::InitializeComplete
-//
-// Handles DevSound initialisation callback
-// ---------------------------------------------------------
-//
-void CSPAudioHandler::InitializeComplete( TInt aError )
- {
- if ( KErrNone != aError )
- {
- // If initialisation failed, volume can not be adjusted
- CSPLOGSTRING2( CSPERROR,
- "CSPAudioHandler::InitializeComplete Error:%d", aError );
- }
- else
- {
- CSPLOGSTRING( CSPINT,
- "CSPAudioHandler::InitializeComplete");
- }
- }
-
-// ---------------------------------------------------------
-// CSPAudioHandler::BufferToBeFilled
-// ---------------------------------------------------------
-//
-void CSPAudioHandler::BufferToBeFilled( CMMFBuffer* /*aBuffer*/ )
- {
- }
-
-// ---------------------------------------------------------
-// CSPAudioHandler::BufferToBeEmptied()
-// Not supported
-// ---------------------------------------------------------
-//
-void CSPAudioHandler::BufferToBeEmptied( CMMFBuffer* /*aBuffer*/ )
- {
- }
-
-// ---------------------------------------------------------
-// CSPAudioHandler::PlayError
-// Not supported
-// ---------------------------------------------------------
-//
-void CSPAudioHandler::PlayError( TInt /*aError*/ )
- {
- }
-
-// ---------------------------------------------------------
-// CSPAudioHandler::RecordError
-// Not supported
-// ---------------------------------------------------------
-//
-void CSPAudioHandler::RecordError( TInt /*aError*/ )
- {
- }
-
-// ---------------------------------------------------------
-// CSPAudioHandler::ConvertError
-// Not supported
-// ---------------------------------------------------------
-//
-void CSPAudioHandler::ConvertError( TInt /*aError*/ )
- {
- }
-
-// ---------------------------------------------------------
-// CSPAudioHandler::DeviceMessage
-// Not supported
-// ---------------------------------------------------------
-//
-void CSPAudioHandler::DeviceMessage( TUid /*aMessageType*/, const TDesC8& /*aMsg*/ )
- {
- }
-
-// ---------------------------------------------------------
-// CSPAudioHandler::ToneFinished
-// Not supported
-// ---------------------------------------------------------
-//
-void CSPAudioHandler::ToneFinished( TInt /*aError*/ )
- {
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor.
-// ---------------------------------------------------------------------------
-//
-CSPAudioHandler::CSPAudioHandler( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPAudioHandler::CSPAudioHandler()" );
- iCallCount = 0; // Active calls count
- }
-
-// ---------------------------------------------------------------------------
-// Second phase construction.
-// ---------------------------------------------------------------------------
-//
-void CSPAudioHandler::ConstructL()
- {
- RProperty::TType type( RProperty::EInt );
- TSecurityPolicy readPolicy( ECapability_None );
- TSecurityPolicy writePolicy( ECapabilityWriteDeviceData );
-
- RProperty::Define( KPSUidTelMicrophoneMuteStatus,
- KTelMicrophoneMuteState,
- type,
- readPolicy,
- writePolicy );
-
- iMuteListener = CSPPubSubListener::NewL(
- KPSUidTelMicrophoneMuteStatus,
- KTelMicrophoneMuteState,
- this );
-
- iIncallLoudspeakerVolumeListener = CSPCenRepListener::NewL( KCRUidInCallVolume,
- KTelIncallLoudspeakerVolume, this );
-
- iIncallEarVolumeListener = CSPCenRepListener::NewL( KCRUidInCallVolume,
- KTelIncallEarVolume, this );
-
- iAudioStreams = CSPAudioStreams::NewL();
-
- // Initialize audio volumes
- TInt volEar;
- TInt volLoud;
-
- TInt volGetRes = iIncallEarVolumeListener->Get( volEar );
- CSPLOGSTRING3(CSPINT, "CSPAudioHandler::ConstructL() ear %d %d", volGetRes, volEar );
- volGetRes = iIncallLoudspeakerVolumeListener->Get( volLoud );
- CSPLOGSTRING3(CSPINT, "CSPAudioHandler::ConstructL() loudspkr %d %d", volGetRes, volLoud );
-
- iAudioStreams->StoreVolumes( volEar, volLoud );
- }
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspaudiostreams.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,419 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Starts and stops audio streams.
-*
-*/
-
-
-#include "cspaudiostreams.h"
-#include "cspmicrophone.h"
-#include "cspspeaker.h"
-#include "csplogger.h"
-#include "mcspaudiostreamobserver.h"
-#include "csptimer.h"
-
-#include <TelephonyAudioRouting.h>
-
-/**
-* Timeout initial value.
-*/
-const TInt KTimeoutInitial = 200000; // 0.2s
-
-/**
-* Double the timeout for every retry.
-*/
-const TInt KTimeoutMultiplier = 2;
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Static constructor
-// ---------------------------------------------------------------------------
-//
-CSPAudioStreams* CSPAudioStreams::NewL( )
- {
- CSPAudioStreams* self =
- CSPAudioStreams::NewLC();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Static constructor
-// ---------------------------------------------------------------------------
-//
-CSPAudioStreams* CSPAudioStreams::NewLC( )
- {
- CSPAudioStreams* self = new( ELeave ) CSPAudioStreams( );
- CleanupStack::PushL( self );
- self->ConstructL( );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CSPAudioStreams::~CSPAudioStreams()
- {
- if (iTimer)
- {
- iTimer->CancelNotify();
- delete iTimer;
- }
-
- delete iSpeaker;
- delete iMic;
- delete iAudioRouting;
- }
-
-// ---------------------------------------------------------------------------
-// Sets observer for audio stream.
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::SetAudioStreamObserver(
- MCSPAudioStreamObserver& aObserver )
- {
- iStreamObserver = &aObserver;
- }
-
-// ---------------------------------------------------------------------------
-// Gives access to mic
-// ---------------------------------------------------------------------------
-//
-CSPMicrophone& CSPAudioStreams::Mic() const
- {
- return *iMic;
- }
-
-// ---------------------------------------------------------------------------
-// Gives access to speaker
-// ---------------------------------------------------------------------------
-//
-CSPSpeaker& CSPAudioStreams::Speaker() const
- {
- return *iSpeaker;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCSPAudioStream
-// Activates mic and speaker.
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::StartStreams()
- {
- CSPLOGSTRING(CSPINT, "CSPAudioStreams::StartStreams");
-
- if( !IsMicAndSpeakerStarted() )
- {
- StartMicAndSpeaker();
-
- if( iStreamObserver )
- {
- iStreamObserver->AudioStreamsStarted();
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class MCSPAudioStream
-// Deactivates mic and speaker if the streams are active or they are
-// activating.
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::StopStreams()
- {
- CSPLOGSTRING(CSPINT, "CSPAudioStreams::StopStreams");
-
- if( IsMicAndSpeakerStarted() )
- {
- CSPLOGSTRING(CSPINT, "CSPAudioStreams::StopStreams Stopping");
- iTimer->CancelNotify();
- iTimeout = KTimeoutInitial;
- if( iStreamObserver )
- {
- iStreamObserver->AudioStreamsGoingToStop();
- }
- iMic->Deactivate();
- iSpeaker->Deactivate();
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPAudioStreams::VolumeChangedEar
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::VolumeChangedEar(TInt aVolume)
- {
- CSPLOGSTRING2(CSPINT, "CSPAudioStreams::SetVolume %d", aVolume);
- iVolumeEar = aVolume;
- iSpeaker->SetVolume( aVolume );
- }
-
-// ---------------------------------------------------------------------------
-// CSPAudioStreams::VolumeChangedLoudspeaker
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::VolumeChangedLoudspeaker(TInt aVolume)
- {
- CSPLOGSTRING2(CSPINT, "CSPAudioStreams::SetVolume %d", aVolume);
- iVolumeLoudspeaker = aVolume;
- iSpeaker->SetVolume( aVolume );
- }
-
-// ---------------------------------------------------------------------------
-// CSPAudioStreams::StoreVolumes
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::StoreVolumes(TInt aVolumeEar, TInt aVolumeLoudspeaker )
- {
- iVolumeEar = aVolumeEar;
- iVolumeLoudspeaker = aVolumeLoudspeaker;
- }
-
-// ---------------------------------------------------------------------------
-// CSPAudioStreams::ApplyVolume
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::ApplyVolume(TInt aVolumeEar, TInt aVolumeLoudspeaker )
- {
- CTelephonyAudioRouting::TAudioOutput current = iAudioRouting->Output();
- if ( current == CTelephonyAudioRouting::ELoudspeaker )
- {
- CSPLOGSTRING( CSPINT, "CSPAudioStreams::ApplyVolume Loudspeaker Active: SetVolume" );
- iSpeaker->SetVolume( aVolumeLoudspeaker );
- }
- // else: ear volume should be used
- else if ( current == CTelephonyAudioRouting::EHandset )
- {
- CSPLOGSTRING( CSPINT, "CSPAudioStreams::ApplyVolume Ear Active: SetVolume" );
- iSpeaker->SetVolume( aVolumeEar );
- }
- else
- {
- CSPLOGSTRING2( CSPINT, "CSPAudioStreams::ApplyVolume UNKNOWN AUDIO OUTPUT MODE %d", current );
- // No volume setting
- iSpeaker->SetVolume( aVolumeEar );
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPAudioStreams::SetMuted
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::SetMuted()
- {
- iMic->SetMuted();
- }
-
-// ---------------------------------------------------------------------------
-// CSPAudioStreams::SetUnmuted
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::SetUnmuted()
- {
- iMic->SetUnmuted();
- }
-
-// ---------------------------------------------------------------------------
-// From class MCSPAudioStreamObserver
-// If speaker is already active then the streams are active.
-// If speker is not active and it is not activating then speaker then
-// activation has failed and start retry timer.
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::MicActivatedSuccessfully()
- {
- CSPLOGSTRING(CSPINT, "CSPAudioStreams::MicActivatedSuccessfully" );
- if( iSpeaker->IsActive() )
- {
- // Mic and speaker are active.
- AudioStreamsStarted();
- }
- else if( !iSpeaker->IsActivationOngoing() )
- {
- // Start retry timer for activating speaker again
- StartTimer();
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class MCSPAudioStreamObserver
-// If mic is already active then streams are active.
-// If mic is not active and it is not activating then mic activation has
-// failed and start retry timer.
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::SpeakerActivatedSuccessfully()
- {
- CSPLOGSTRING(CSPINT, "CSPAudioStreams::SpeakerActivatedSuccessfully" );
- if( iMic->IsActive() )
- {
- // Mic and speaker are active.
- AudioStreamsStarted();
- }
- else if( !iMic->IsActivationOngoing() )
- {
- // Start retry timer for activating mic again.
- StartTimer();
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class MCSPAudioStreamObserver
-// Starts timer for trying activation again.
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::MicActivationFailed()
- {
- CSPLOGSTRING(CSPINT, "CSPAudioStreams::MicActivationFailed" );
-
- // Dont start timer until speaker has stopped activation.
- if( !iSpeaker->IsActivationOngoing() )
- {
- StartTimer();
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class MCSPAudioStreamObserver
-// Starts timer for trying activation again.
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::SpeakerActivationFailed()
- {
- CSPLOGSTRING(CSPINT, "PE.AudioStreams::SpeakerActivationFailed" );
-
- // Dont start timer until mic has stopped activation.
- if( !iMic->IsActivationOngoing() )
- {
- StartTimer();
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class MCSPTimerObserver
-// Notify from CSPTimer that timeout passed. Try to start mic and
-// speaker again.
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::TimerEvent()
- {
- CSPLOGSTRING(CSPINT, "CSPAudioStreams.TimerEvent" );
- iTimeout *= KTimeoutMultiplier;
- StartMicAndSpeaker();
- }
-
-// -----------------------------------------------------------------------------
-// CTSEAudioRouteObserver::AvailableOutputsChanged
-// -----------------------------------------------------------------------------
-//
-void CSPAudioStreams::AvailableOutputsChanged(
- CTelephonyAudioRouting& /*aTelephonyAudioRouting*/ )
- {
- CSPLOGSTRING(CSPINT, "CSPAudioStreams::AvailableOutputsChanged" );
- }
-
-// -----------------------------------------------------------------------------
-// CTSEAudioRouteObserver::OutputChanged
-// -----------------------------------------------------------------------------
-//
-void CSPAudioStreams::OutputChanged(
- CTelephonyAudioRouting& /*aTelephonyAudioRouting*/ )
- {
- CSPLOGSTRING(CSPINT, "CSPAudioStreams::OutputChanged" );
- ApplyVolume(iVolumeEar, iVolumeLoudspeaker);
- }
-
-// -----------------------------------------------------------------------------
-// CSPAudioStreams::SetOutputComplete
-// -----------------------------------------------------------------------------
-//
-void CSPAudioStreams::SetOutputComplete( CTelephonyAudioRouting& /*aTelephonyAudioRouting*/,
- TInt /*aError*/ )
- {
- }
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CSPAudioStreams::CSPAudioStreams( ): iTimeout(KTimeoutInitial)
- {
- }
-
-// ---------------------------------------------------------------------------
-// Second phase constructor
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::ConstructL( )
- {
- CSPLOGSTRING(CSPINT, "CSPAudioStreams::ConstructL");
-
- iTimer = CSPTimer::NewL();
- iMic = CSPMicrophone::NewL( *this );
- iSpeaker = CSPSpeaker::NewL( *this );
-
- #if !defined(__WINSCW__)
- iAudioRouting = CTelephonyAudioRouting::NewL( *this );
- #endif //__WINSCW__
- }
-
-// ---------------------------------------------------------------------------
-// Resets timer
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::AudioStreamsStarted()
- {
- CSPLOGSTRING(CSPINT, "CSPAudioStreams::AudioStreamsStarted" );
- iTimeout = KTimeoutInitial;
- iTimer->CancelNotify();
- }
-
-// ---------------------------------------------------------------------------
-// Starts timer
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::StartTimer()
- {
- CSPLOGSTRING(CSPINT, "CSPAudioStreams::StartTimer" );
- iTimer->NotifyAfter( iTimeout, *this );
- }
-
-// ---------------------------------------------------------------------------
-// Starts mic and speaker
-// ---------------------------------------------------------------------------
-//
-void CSPAudioStreams::StartMicAndSpeaker()
- {
- // if speaker and mic is active then activation does not
- // cause any actions.
- iSpeaker->Activate();
- iMic->Activate();
- }
-
-// ---------------------------------------------------------------------------
-// Indicated if mic and speaker are started or starting up.
-// ---------------------------------------------------------------------------
-//
-TBool CSPAudioStreams::IsMicAndSpeakerStarted()
- {
- TBool areStreamsActive( iSpeaker->IsActive() && iMic->IsActive() );
- TBool areStreamsActivating( iMic->IsActivationOngoing() ||
- iSpeaker->IsActivationOngoing() || iTimer->IsNotifyOngoing() );
-
- return areStreamsActive || areStreamsActivating;
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspcall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1955 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements class CSPCall which provides call functionality
-*
-*/
-
-
-#include <etelmm.h>
-#include <etel.h>
-#include <centralrepository.h>
-#include <settingsinternalcrkeys.h>
-#include <ccpdefs.h>
-#include <gsmerror.h>
-#include <etelsat.h>
-#include <cccpcallparameters.h>
-
-#include "cspcall.h"
-#include "cspetelcallrequester.h"
-#include "cspetelcalleventmonitor.h"
-#include "cspcallinfomonitor.h"
-#include "cspetelcallstatusmonitor.h"
-#include "cspetelcallcapsmonitor.h"
-#include "csptransferprovider.h"
-#include "cspforwardprovider.h"
-#include "csplogger.h"
-#include "csppanic.pan"
-#include "cspconsts.h"
-#include "cspaudiohandler.h"
-#include "mcspcommoninfo.h"
-#include "mcspsecuritysettingobserver.h"
-#include "tcspskypeidparser.h"
-#include "cspuuimonitor.h"
-#include "cspuuimessagesender.h"
-
-const TInt KTimesToSplitValue = 16;
-
-
-// ---------------------------------------------------------------------------
-// CSPCall::~CSPCall
-// ---------------------------------------------------------------------------
-//
-CSPCall::~CSPCall()
- {
- CSPLOGSTRING(CSPOBJECT, "CSPCall::~CSPCall <");
-
- delete iParams;
- iCommonInfo.IndicateHangupComplete( *this );
-
- if ( iAudioHandler
- && iAudioStatus == ECSPCallAudioStatusActive )
- {
- iAudioStatus = ECSPCallAudioStatusInactive;
- iAudioHandler->Stop();
- }
-
- delete iUserToUserInformation;
- delete iRequester;
- delete iCallEventMonitor;
- delete iCallStatusMonitor;
- delete iCallCapsMonitor;
- delete iCallInfoMonitor;
- delete iForwardProvider;
- delete iTransferProvider;
- delete iUUIMonitor;
- delete iUUIMessageSender;
- delete iSkypeId;
-
- iObservers.Close();
- if ( iCall.SubSessionHandle() )
- {
- iCall.Close();
- }
-
- CSPLOGSTRING(CSPOBJECT, "CSPCall::~CSPCall >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::SetAudioHandler
-// ---------------------------------------------------------------------------
-//
-void CSPCall::SetAudioHandler( CSPAudioHandler* aHandler )
- {
- CSPLOGSTRING2(CSPINT, "CSPCall::SetAudioHandler handler: %x", aHandler);
- iAudioHandler = aHandler;
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::SecuritySettingChanged
-// ---------------------------------------------------------------------------
-//
-void CSPCall::SecuritySettingChanged( TInt aValue )
- {
- switch ( aValue )
- {
- case MCSPSecuritySettingObserver::ESecureCall:
- {
- CSPLOGSTRING(CSPINT,
- "CSPCall::SecuritySettingChanged Sending 'secure call' event");
- NotifyCallEventOccurred( MCCPCallObserver::ECCPSecureCall );
- break;
- }
- case MCSPSecuritySettingObserver::ENotSecureCall:
- {
- CSPLOGSTRING(CSPINT,
- "CSPCall::SecuritySettingChanged Sending 'not secure call' event");
- NotifyCallEventOccurred( MCCPCallObserver::ECCPNotSecureCall );
- break;
- }
- case MCSPSecuritySettingObserver::ESecureNotSpecified:
- {
- CSPLOGSTRING(CSPINT,
- "CSPCall::SecuritySettingChanged Sending SecureNotSpecified");
- NotifyCallEventOccurred( MCCPCallObserver::ECCPSecureNotSpecified );
- break;
- }
-
- default:
- {
- CSPLOGSTRING(CSPERROR, "CSPCall::SecuritySettingChanged, \
- unknown event");
- break;
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::RemoteAlertingToneStatusChanged
-// Sends EarlyMediaStarted event to observer if network has started to
-// play remote alerting tone. There is only one known use case: Network
-// starts playing alerting tone during connecting state.
-//
-// This RemoteAlertingToneStatusChanged is called for every call,
-// so it is calls responsibility to determine if the
-// observer should be notified.
-// ---------------------------------------------------------------------------
-//
-void CSPCall::RemoteAlertingToneStatusChanged(
- RMmCustomAPI::TRemoteAlertingToneStatus aNewStatus )
- {
- CSPLOGSTRING2(CSPINT,
- "CSPCall::RemoteAlertingToneStatusChanged new status: %d", aNewStatus );
-
- if ( aNewStatus == RMmCustomAPI::EUiStopTone ||
- aNewStatus == RMmCustomAPI::EUiNoTone ) // NW tells us to stop playing
- {
- // Connecting is only state where network starts playing the tone.
- if ( iCallState == MCCPCallObserver::ECCPStateConnecting )
- {
- NotifyCallEventOccurred(
- MCCPCallObserver::ECCCSPEarlyMediaStarted );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::NotifyCallStateChangedETel
-// Notifies observers about state changes
-// ---------------------------------------------------------------------------
-//
-void CSPCall::NotifyCallStateChangedETel( RMobileCall::TMobileCallStatus aState )
- {
- CSPLOGSTRING3(CSPINT,
- "CSPCall::NotifyCallStateChangedETel < state: %d this: %x",
- aState, this );
- switch ( aState )
- {
- /*
- Cannot receive any mapping call statuses from ETel to following
- optional states:
-
- ECCPStateForwarding MO call is being forwarded at receiver end
- ECCPStateQueued Call is queued locally.
-
- The commented observer calls are for CS specific call states.
- */
-
- // Indicates that the call is idle or unknown.
- case RMobileCall::EStatusIdle:
- case RMobileCall::EStatusUnknown:
- {
- CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Idle");
-
- // If audio still active
- if ( iAudioStatus == ECSPCallAudioStatusActive
- && iAudioHandler
- && iParams->CallType() == CCPCall::ECallTypeCSVoice )
- {
- iAudioStatus = ECSPCallAudioStatusInactive;
- iAudioHandler->Stop();
- }
-
- // Notify error in case not going through disconnecting
- if ( iCallState != MCCPCallObserver::ECCPStateDisconnecting
- && !iTerminationErrorNotified )
- {
- CheckAndNotifyTerminationError();
- }
-
- NotifyCallStateChanged( MCCPCallObserver::ECCPStateIdle );
- iCommonInfo.IndicateHangupComplete( *this );
- break;
- }
- // The call is dialling.
- case RMobileCall::EStatusDialling:
- CSPLOGSTRING(CSPINT, "CSPCall callstate Dialling");
- {
- if ( iAudioHandler && iParams->CallType() == CCPCall:: ECallTypeCSVoice )
- {
- iAudioStatus = ECSPCallAudioStatusActive;
- iAudioHandler->Start();
- }
-
- iDontReportTerm = EFalse;
- NotifyCallStateChanged( MCCPCallObserver::ECCPStateDialling );
- break;
- }
- //Indicates that the MT call is ringing but not answered yet by
- // the local user
- case RMobileCall::EStatusRinging:
- {
- CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Ringing");
- NotifyCallStateChanged( MCCPCallObserver::ECCPStateRinging );
- break;
- }
- // Indicates that the local user has answered the MT call but
- // the network has not acknowledged the call connection yet.
- case RMobileCall::EStatusAnswering:
- {
- CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Answering");
-
- if ( !iMobileOriginated
- && iAudioHandler
- && iAudioStatus == ECSPCallAudioStatusInactive
- && iParams->CallType() == CCPCall::ECallTypeCSVoice )
- {
- iAudioStatus = ECSPCallAudioStatusActive;
- iAudioHandler->Start();
- }
-
- NotifyCallStateChanged( MCCPCallObserver::ECCPStateAnswering );
- break;
- }
- // MO Call: the network notifies to the MS that the remote party
- // is now ringing.
- case RMobileCall::EStatusConnecting:
- {
- CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETelConnecting");
- RMmCustomAPI::TRemoteAlertingToneStatus tone =
- iCommonInfo.GetRemoteAlertingToneStatus();
- if ( tone == RMmCustomAPI::EUiNoTone ||
- tone == RMmCustomAPI::EUiStopTone )
- {
- NotifyCallStateChangedWithInband( MCCPCallObserver::ECCPStateConnecting );
- }
- else
- {
- NotifyCallStateChanged( MCCPCallObserver::ECCPStateConnecting );
- }
- break;
- }
- // Indicates that call is connected and active.
- case RMobileCall::EStatusConnected:
- {
- CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Connected");
-
- iDontReportTerm = ETrue;
- NotifyCallStateChanged( MCCPCallObserver::ECCPStateConnected );
-
- // Agreement with TSY is that the
- // COLP number is available in connected state.
- NotifyRemotePartyNumberChanged();
- break;
- }
- // Indicates that call is disconnecting. (Same as RCall::HangingUp)
- case RMobileCall::EStatusDisconnecting:
- {
- CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Disconnecting");
-
- if ( !iTerminationErrorNotified )
- {
- CheckAndNotifyTerminationError();
- }
-
- NotifyCallStateChanged( MCCPCallObserver::ECCPStateDisconnecting );
- break;
- }
- // Indicates that the call is disconnecting with inband data
- // (to enable the network to send an audio tone), signifying
- // that the call is not to be released until user terminates call
- case RMobileCall::EStatusDisconnectingWithInband:
- {
- CSPLOGSTRING(CSPINT,
- "CSPCall::NotifyCallStateChangedETel DisconnectingWithInband");
-
- if ( !iTerminationErrorNotified )
- {
- CheckAndNotifyTerminationError();
- }
-
- NotifyCallStateChangedWithInband(
- MCCPCallObserver::ECCPStateDisconnecting );
- break;
- }
- // Indicates that the call is connected but on hold.
- case RMobileCall::EStatusHold:
- {
- CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Hold");
- NotifyCallStateChanged( MCCPCallObserver::ECCPStateHold );
- break;
- }
- case RMobileCall::EStatusTransferring:
- {
- CSPLOGSTRING(CSPINT, "CSPCall::NotifyCallStateChangedETel Transferring");
- NotifyCallStateChanged( MCCPCallObserver::ECCPStateTransferring );
- break;
- }
-
- // Indicates that call is undergoing temporary channel loss
- // and it may or may not be reconnected.
- case RMobileCall::EStatusReconnectPending: // fall through
- //Indicates that the call is the non-active half of an alternating
- // call. This call is waiting for its active half or the remote
- // end to switch alternating call mode.
- case RMobileCall::EStatusWaitingAlternatingCallSwitch: // fall through
- case RMobileCall::EStatusTransferAlerting:
- {
- CSPLOGSTRING2(CSPINT,
- "CSPCall::NotifyCallStateChangedETel no special handling for state %d",
- aState);
- break;
- }
-
- default:
- {
- CSPLOGSTRING(CSPERROR,
- "CSPCall::NotifyCallStateChangedETel callstate UNKNOWN");
- break;
- }
- }
- CSPLOGSTRING(CSPREQIN, "CSPCall::NotifyCallStateChangedETel >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::NotifyCallEventOccurred
-// Notifies observers about call events
-// ---------------------------------------------------------------------------
-//
-void CSPCall::NotifyCallEventOccurred(
- MCCPCallObserver::TCCPCallEvent aEvent )
- {
- CSPLOGSTRING2(CSPINT,
- "CSPCall::NotifyCallEventOccurred < event: %d", aEvent);
-
- TInt obsCount = iObservers.Count();
- for ( TInt i = 0; i < obsCount; i++ )
- {
- CSPLOGSTRING2(CSPINT, "CSPCall::NotifyCallEventOccurred obs=%d",i);
- MCCPCallObserver *obs = iObservers[i];
- if ( obs )
- {
- obs->CallEventOccurred( aEvent, this );
- }
-
- CSPLOGSTRING2(CSPINT, "CSPCall::NotifyCallEventOccurred ok obs=%d",i);
- }
-
- CSPLOGSTRING2(CSPINT, "CSPCall::NotifyCallEventOccurred > event: %d", aEvent);
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::NotifyTransferCallEventOccurred
-// Forward notification of transfer event to it's provider
-// ---------------------------------------------------------------------------
-//
-void CSPCall::NotifyTransferCallEventOccurred(
- MCCPTransferObserver::TCCPTransferEvent aEvent )
- {
- CSPLOGSTRING2(CSPINT, "CSPCall::NotifyTransferCallEventOccurred %d", aEvent);
- // forward the method call to CSPTransferProvider object
- iTransferProvider->TransferEventOccurred( aEvent );
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::NotifyForwardEventOccurred
-// Notifies observers about call events
-// ---------------------------------------------------------------------------
-//
-void CSPCall::NotifyForwardEventOccurred(
- MCCPForwardObserver::TCCPForwardEvent aEvent )
- {
- CSPLOGSTRING2(CSPINT, "CSPCall::NotifyForwardEventOccurred %d", aEvent);
- iForwardProvider->NotifyForwardEventOccurred( aEvent );
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::CallName
-// Get call name
-// ---------------------------------------------------------------------------
-//
-void CSPCall::CallName( TName& aCallName )
- {
- CSPLOGSTRING(CSPINT, "CSPCall::CallName");
- aCallName.Zero();
- aCallName.Append( iCallName );
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::DialRequestFailed
-// Handles situations when dial fails
-// ---------------------------------------------------------------------------
-//
-void CSPCall::DialRequestFailed( TInt aErrorCode )
- {
- CSPLOGSTRING(CSPERROR, "CSPCall::DialRequestFailed");
- iDialCompletionCode = aErrorCode;
-
- // If state has not changed
- // ( e.g. in case of dial could not be initiated by network problem)
- if ( iCallStatusMonitor->State() ==
- RMobileCall::RMobileCall::EStatusUnknown )
- {
- NotifyErrorOccurred( iRequester->MapError( aErrorCode ) );
-
- // Force release since otherwise call remains unreleased
- CSPLOGSTRING(CSPERROR, "CSPCall::DialRequestFailed() Force Idle");
- NotifyCallStateChanged( MCCPCallObserver::ECCPStateIdle );
- }
-
- // If dial request has completed after notifying disconnecting state
- else if ( iCallState == MCCPCallObserver::ECCPStateDisconnecting
- && !iTerminationErrorNotified )
- {
- CheckAndNotifyTerminationError();
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::EmergencyDialRequestFailed
-// Handles situations when emergency dial fails
-// ---------------------------------------------------------------------------
-//
-void CSPCall::EmergencyDialRequestFailed( TInt /*aErrorCode*/ )
- {
- CSPLOGSTRING(CSPERROR, "CSPCall::EmergencyDialRequestFailed");
-
- // Always same error code for CCE
- NotifyErrorOccurred( ECCPEmergencyFailed );
-
- // Mark that exit code will not be used
- iTerminationErrorNotified = ETrue;
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::NotifyErrorOccurred
-// Notifies observers about errors
-// ---------------------------------------------------------------------------
-//
-void CSPCall::NotifyErrorOccurred( TCCPError aError )
- {
- CSPLOGSTRING2(CSPERROR, "CSPCall::NotifyErrorOccurred err %d", aError );
-
- TInt obsCount = iObservers.Count();
- for ( TInt i = 0; i < obsCount; i++ )
- {
- MCCPCallObserver *obs = iObservers[i];
- if ( obs )
- {
- obs->ErrorOccurred( aError, this );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::CallCapsChanged
-// Notifies observers about new capabilities.
-// ---------------------------------------------------------------------------
-//
-void CSPCall::CallCapsChanged( const TUint32 aCapsFlags )
- {
- CSPLOGSTRING2(CSPERROR, "CSPCall::CallCapsChanged %b", aCapsFlags );
- iCapsFlags = aCapsFlags;
- TInt obsCount = iObservers.Count();
- for ( TInt i = 0; i < obsCount; i++ )
- {
- MCCPCallObserver *obs = iObservers[i];
- if ( obs )
- {
- obs->CallCapsChanged( aCapsFlags, this );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCSCall
-// CSPCall::GetMobileCallInfo
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::GetMobileCallInfo( TDes8& aCallInfo ) const
- {
- CSPLOGSTRING(CSPINT, "CSPCall::GetMobileCallInfo");
- return iCall.GetMobileCallInfo( aCallInfo );
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCSCall
-// CSPCall::GetMobileDataCallCaps
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::GetMobileDataCallCaps( TDes8& /*aCaps*/ ) const
- {
- CSPLOGSTRING(CSPERROR,
- "CSPCall::GetMobileDataCallCaps ERROR, Not supported");
- return KErrNotSupported;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::Dial
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::Dial()
- {
- CSPLOGSTRING( CSPREQIN, "CSPCall::Dial" );
- // Parameters not given, must create empty descriptor.
- TBuf8<1> params;
- return Dial(params);
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::RemoteParty
-// ---------------------------------------------------------------------------
-//
-const TDesC& CSPCall::RemoteParty() const
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::RemoteParty");
- return iRemotePartyNumber;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::RemotePartyName
-// ---------------------------------------------------------------------------
-//
-const TDesC& CSPCall::RemotePartyName()
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::RemotePartyName");
- return iRemotePartyName;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::DialledParty
-// ---------------------------------------------------------------------------
-//
-const TDesC& CSPCall::DialledParty() const
- {
- CSPLOGSTRING2(CSPREQIN, "CSPCall::DialledParty %S", &iRemotePartyNumber);
- return iRemotePartyNumber;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::Answer
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::Answer()
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::Answer <");
- TInt ret( KErrNone );
-
- if ( iCallState == MCCPCallObserver::ECCPStateRinging
- || iCallState == MCCPCallObserver::ECCPStateQueued )
- {
- if( iMobileOriginated )
- {
- ret = KErrGeneral;
- }
- else if( iCallState != MCCPCallObserver::ECCPStateRinging &&
- iCallState != MCCPCallObserver::ECCPStateQueued )
- {
- ret = KErrAccessDenied;
- }
- else
- {
- ret = iCommonInfo.IndicateAnswerRequest( *this );
- }
- }
- else
- {
- // Not correct state for answer
- ret = KErrNotReady;
- }
-
- CSPLOGSTRING2(CSPREQIN, "CSPCall::Answer > ret %d", ret);
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCallCommandHandling
-// CSPCall::PerformAnswerRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::PerformAnswerRequest()
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::PerformAnswerRequest");
-
- TInt ret = iRequester->MakeRequest( CSPEtelCallRequester::ERequestTypeAnswer );
- CSPLOGSTRING3(CSPINT,
- "CSPCall::Answer request performed, call state %d ret: %d", iCallState, ret);
-
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::Reject
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::Reject()
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::Reject <");
- TInt ret;
- if ( iCallState == MCCPCallObserver::ECCPStateRinging
- || iCallState == MCCPCallObserver::ECCPStateQueued
- || iCallState == MCCPCallObserver::ECCPStateAnswering )
- {
- CSPLOGSTRING( CSPREQIN, "CSPCall::Reject 2" );
- ret = HangUp();
- }
- else
- {
- ret = KErrNotReady;
- }
- CSPLOGSTRING2(CSPREQIN, "CSPCall::Reject > ret: %d", ret );
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::Queue
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::Queue()
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::Queue");
- TBool callWaitingState;
- iDontReportTerm = ETrue;
-
- TRAPD( res, iCommonInfo.GetCallWaitingL( *iParams, callWaitingState ) );
- if( res == KErrNone )
- {
- if ( callWaitingState )
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::Queue Call Waiting On");
- iCallState = MCCPCallObserver::ECCPStateQueued;
-
- // Notify Queued state
- TInt obsCount = iObservers.Count ( );
- for (TInt i = 0; i < obsCount; i++ )
- {
- MCCPCallObserver *obs = iObservers[i];
- if ( obs )
- {
- obs->CallStateChanged ( iCallState, this );
- }
- }
- CSPLOGSTRING(CSPOBJECT, "CSPCall::Queue ok");
-
- return KErrNone;
- }
- else
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::Queue Call Waiting Off");
- }
- }
- else
- {
- CSPLOGSTRING2(CSPERROR,
- "CSPCall::Queue Error %d with CR. Call Waiting Off",
- res);
- }
-
- return KErrNotSupported;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::Ringing
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::Ringing()
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::Ringing");
- iDontReportTerm = ETrue;
-
- // Ringing state is accepted because MT-call goes to ringing
- // state in the beginning based on ETel state maching.
- if ( iCallState == MCCPCallObserver::ECCPStateIdle ||
- iCallState == MCCPCallObserver::ECCPStateRinging )
- {
- NotifyRingingState();
- return KErrNone;
- }
- else if ( iCallState == MCCPCallObserver::ECCPStateAnswering )
- {
- // Do nothing if already in Answering state (autoanswer).
- return KErrNone;
- }
-
- return KErrNotReady;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::HangUp
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::HangUp()
- {
- CSPLOGSTRING2(CSPREQIN, "CSPCall::HangUp this: %x", this);
- TInt ret( KErrNone );
-
- CSPEtelCallRequester::TRequestType req = iRequester->Request();
- if ( req == CSPEtelCallRequester::ERequestTypeDial ||
- ( req == CSPEtelCallRequester::ERequestTypeDialEmergency ) )
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 1: Cancel ongoing dial");
- ret = iRequester->DialCancel();
- CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp Canceled");
- }
- else if ( req == CSPEtelCallRequester::ERequestTypeHangup )
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 2");
- ret = KErrAlreadyExists;
- }
- else if ( req == CSPEtelCallRequester::ERequestTypeNone
- && iCallState != MCCPCallObserver::ECCPStateIdle )
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 3");
- ret = iRequester->MakeRequest( CSPEtelCallRequester::ERequestTypeHangup );
- iCommonInfo.IndicateActiveHangup( *this );
- }
- else if ( req == CSPEtelCallRequester::ERequestTypeNone )
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 4");
- ret = KErrAlreadyExists;
- }
- else
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::HangUp 5");
- // Request pending, must be canceled
- iRequester->Cancel();
- ret = iRequester->MakeRequest( CSPEtelCallRequester::ERequestTypeHangup );
- iCommonInfo.IndicateActiveHangup( *this );
- }
-
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::Cancel
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::Cancel()
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::Cancel");
- return HangUp();
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::Hold
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::Hold()
- {
- CSPLOGSTRING2(CSPREQIN, "CSPCall::Hold this: %x", this);
- TInt ret;
-
- if ( iCallState == MCCPCallObserver::ECCPStateConnected )
- {
- CSPLOGSTRING(CSPREQOUT, "CSPCall::Hold make request");
-
- // Set call on hold
- ret = iRequester->MakeRequest(
- CSPEtelCallRequester::ERequestTypeHold );
- if ( ret != KErrNone )
- {
- CSPLOGSTRING2(CSPERROR,
- "CSPCall::Hold ERROR: %d", ret);
- }
- }
- else if ( iCallState == MCCPCallObserver::ECCPStateHold )
- {
- CSPLOGSTRING(CSPERROR, "CSPCall::Hold : already held");
- ret = KErrAlreadyExists;
- }
- else
- {
- CSPLOGSTRING(CSPERROR, "CSPCall::Hold not allowed");
- ret = KErrNotReady;
- }
-
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::Resume
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::Resume()
- {
- CSPLOGSTRING2(CSPREQIN, "CSPCall::Resume this: %x", this);
- TInt ret;
-
- if ( iCallState == MCCPCallObserver::ECCPStateHold )
- {
- CSPLOGSTRING(CSPREQOUT, "CSPCall::Resume request");
-
- ret = iRequester->MakeRequest(
- CSPEtelCallRequester::ERequestTypeResume );
- if ( KErrNone != ret )
- {
- CSPLOGSTRING2(CSPERROR, "CSPCall::Resume ERROR %d", ret);
- }
- }
- else if ( iCallState == MCCPCallObserver::ECCPStateConnected )
- {
- CSPLOGSTRING(CSPERROR, "CSPCall::Resume already connected" );
- ret = KErrAlreadyExists;
- }
- else
- {
- CSPLOGSTRING(CSPERROR, "CSPCall::Resume not held state" );
- ret = KErrNotReady;
- }
-
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::Swap
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::Swap()
- {
- CSPLOGSTRING2(CSPREQIN, "CSPCall::Swap this: %x", this);
- TInt ret;
- if ( iCallState == MCCPCallObserver::ECCPStateConnected
- || iCallState == MCCPCallObserver::ECCPStateHold )
- {
- ret = iRequester->MakeRequest( CSPEtelCallRequester::ERequestTypeSwap );
- if ( ret )
- {
- CSPLOGSTRING2( CSPERROR, "CSPCall::Swap Error %d", ret );
- }
- }
- else
- {
- ret = KErrNotReady;
- }
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::IsMobileOriginated
-// ---------------------------------------------------------------------------
-//
-TBool CSPCall::IsMobileOriginated() const
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::IsMobileOriginated");
- return iMobileOriginated;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::State
-// ---------------------------------------------------------------------------
-//
-MCCPCallObserver::TCCPCallState CSPCall::State() const
- {
- CSPLOGSTRING2(CSPREQIN, "CSPCall::State %d", iCallState);
- return iCallState;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::Uid
-// ---------------------------------------------------------------------------
-//
-TUid CSPCall::Uid() const
- {
- CSPLOGSTRING2(CSPREQIN, "CSPCall::Uid %d", KCSPImplementationUid);
- return KCSPImplementationUid;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::Caps
-// ---------------------------------------------------------------------------
-//
-MCCPCallObserver::TCCPCallControlCaps CSPCall::Caps( ) const
- {
- CSPLOGSTRING2(CSPREQIN, "CSPCall::Caps %b", iCapsFlags );
- return (MCCPCallObserver::TCCPCallControlCaps) iCapsFlags;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::SetParameters
-// ---------------------------------------------------------------------------
-//
-void CSPCall::SetParameters( const CCCPCallParameters& /*aNewParams*/ )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPCall::SetParameters ERROR Can't set params");
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::Parameters
-// ---------------------------------------------------------------------------
-//
-const CCCPCallParameters& CSPCall::Parameters() const
- {
- CSPLOGSTRING(CSPINT, "CSPCall::Parameters");
- return *iParams;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::TransferProvider
-// ---------------------------------------------------------------------------
-//
-MCCPTransferProvider* CSPCall::TransferProviderL(const MCCPTransferObserver&
- aObserver )
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::TransferProvider");
- iTransferProvider->AddObserverL( aObserver );
- return iTransferProvider;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::ForwardProvider
-// ---------------------------------------------------------------------------
-//
-MCCPForwardProvider* CSPCall::ForwardProviderL(
- const MCCPForwardObserver& aObserver )
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::ForwardProvider");
- iForwardProvider->AddObserverL( aObserver );
- return iForwardProvider;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::AddObserverL
-// ---------------------------------------------------------------------------
-//
-void CSPCall::AddObserverL( const MCCPCallObserver& aObserver )
- {
- CSPLOGSTRING2(CSPREQIN, "CSPCall::AddObserverL %x", &aObserver);
- if ( iObservers.Find( &aObserver ) == KErrNotFound )
- {
- iObservers.AppendL( &aObserver );
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// Removes observer.
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::RemoveObserver( const MCCPCallObserver& aObserver )
- {
- CSPLOGSTRING2(CSPREQIN, "CSPCall::RemoveObserver %x", &aObserver);
-
- TInt found = iObservers.Find( &aObserver );
- if ( found != KErrNotFound )
- {
- iObservers.Remove( found );
- return KErrNone;
- }
-
- return found;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::IsCallForwarded
-// ---------------------------------------------------------------------------
-//
-TBool CSPCall::IsCallForwarded( ) const
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::IsCallForwarded <");
- TBool ret( EFalse );
- TInt err( KErrNone );
- RMobileCall::TMobileCallInfoV3 callInfo;
- RMobileCall::TMobileCallInfoV3Pckg pck( callInfo );
- err = iCall.GetMobileCallInfo( pck );
- if (err == KErrNone )
- {
- ret = callInfo.iForwarded;
- }
-
- CSPLOGSTRING2(CSPREQIN,
- "CSPCall::IsCallForwarded > forwarder: %d", ret );
-
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::IsSecured
-// ---------------------------------------------------------------------------
-//
-TBool CSPCall::IsSecured( ) const
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::IsSecured");
- return iCommonInfo.NetworkSecurityStatus();
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::SecureSpecified
-// ---------------------------------------------------------------------------
-//
-TBool CSPCall::SecureSpecified( ) const
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::SecureSpecified");
- return iCommonInfo.SecureSpecified();
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::Tone
-// ---------------------------------------------------------------------------
-//
-TCCPTone CSPCall::Tone() const
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::Tone <");
- TCCPTone tone( ECCPNoSoundSequence );
-
- if ( iCallState == MCCPCallObserver::ECCPStateConnecting )
- {
- RMmCustomAPI::TRemoteAlertingToneStatus ts = iCommonInfo.GetRemoteAlertingToneStatus();
-
- if (ts == RMmCustomAPI::EUiRbtTone )
- {
- tone = ECCPRemoteAlerting;
- }
- else if ( ts == RMmCustomAPI::EUiStopTone )
- {
- tone = ECCPNoSoundSequence;
- }
- else
- {
- // No tone
- tone = ECCPNoSoundSequence;
- }
- }
- else
- {
- // Handle disconnecting tones
- TInt callDisconnectingError = ExitCodeError();
- CSPLOGSTRING2(CSPINT, "CSPCall::Tone exit code err: %d", callDisconnectingError);
-
- switch( callDisconnectingError )
- {
- case KErrNone:
- // GSM: DIAL TONE (optional) - not used in Nokia phones
- CSPLOGSTRING(CSPERROR, "CSPCall::Tone: No sound");
- break;
- case KErrGsmCCUserBusy:
- // GSM: SUBSCRIBER BUSY
- tone = ECCPToneUserBusy;
- CSPLOGSTRING(CSPINT, "CSPCall::Tone: Subscriber Busy");
- break;
- // Fall through
- case KErrGsmCCNumberChanged:
- case KErrGsmCCResponseToStatusEnquiry:
- case KErrGsmCCNormalUnspecified:
- // GSM: NONE, Nokia phones: radio path not available
- tone = ECCPToneRadioPathNotAvailable;
- CSPLOGSTRING(CSPINT, "CSPCall::Tone: RadioPathNotAvailable");
- break;
- case KErrGsmCCNoChannelAvailable:
- case KErrGsmCCTemporaryFailure:
- case KErrGsmCCSwitchingEquipmentCongestion:
- case KErrGsmCCRequestedChannelNotAvailable:
- case KErrGsmCCQualityOfServiceNotAvailable:
- case KErrGsmCCBearerCapabilityNotCurrentlyAvailable:
- // GSM: CONGESTION
- tone = ECCPToneCongestion;
- CSPLOGSTRING(CSPINT, "CSPCall::Tone: Congestion");
- break;
- case KErrGsmCCUnassignedNumber:
- case KErrGsmCCNoRouteToDestination:
- case KErrGsmCCChannelUnacceptable:
- case KErrGsmCCOperatorDeterminedBarring:
- case KErrGsmCCUserNotResponding:
- case KErrGsmCCUserAlertingNoAnswer:
- case KErrGsmCCCallRejected:
- case KErrGsmCCNonSelectedUserClearing:
- case KErrGsmCCDestinationOutOfOrder:
- case KErrGsmCCInvalidNumberFormat:
- case KErrGsmCCFacilityRejected:
- case KErrGsmCCNetworkOutOfOrder:
- case KErrGsmCCAccessInformationDiscarded:
- case KErrGsmCCResourceNotAvailable:
- case KErrGsmCCRequestedFacilityNotSubscribed:
- case KErrGsmCCIncomingCallsBarredInCug:
- case KErrGsmCCBearerCapabilityNotAuthorised:
- case KErrGsmCCServiceNotAvailable:
- case KErrGsmCCBearerServiceNotImplemented:
- case KErrGsmCCChannelTypeNotImplemented:
- case KErrGsmCCAcmGreaterThanAcmMax:
- case KErrGsmCCRequestedFacilityNotImplemented:
- case KErrGsmCCOnlyRestrictedDigitalInformationBCAvailable:
- case KErrGsmCCServiceNotImplemented:
- case KErrGsmCCInvalidCallReferenceValue:
- case KErrGsmCCChannelDoesNotExist:
- case KErrGsmCCSuspendedCallExistsButCallIdentityDoesNotWork:
- case KErrGsmCCCallIdentityInUse:
- case KErrGsmCCNoCallSuspended:
- case KErrGsmCCRequestedCallIdentityAlreadyCleared:
- case KErrGsmCCUserNotInCug:
- case KErrGsmCCIncompatibleDestination:
- case KErrGsmCCInvalidTransitNetworkSelection:
- case KErrGsmCCIncompatibleSegmentedMessage:
- case KErrGsmCCSemanticallyIncorrectMessage:
- case KErrGsmCCInvalidMandatoryInformation:
- case KErrGsmCCNonExistentMessageType:
- case KErrGsmCCIncompatibleMessageInProtocolState:
- case KErrGsmCCNonExistentInformationElement:
- case KErrGsmCCConditionalIEError:
- case KErrGsmCCIncompatibleMessageInCallState:
- case KErrGsmCCRecoveryOnTimerExpiry:
- case KErrGsmCCUnspecifiedProtocolError:
- case KErrGsmCCUnspecifiedInterworkingError:
- // GSM: SPECIAL INFORMATION
- tone = ECCPToneSpecialInformation;
- CSPLOGSTRING(CSPINT, "CSPCall::Tone: Special Information");
- break;
- default:
- CSPLOGSTRING(CSPERROR, "CSPCall::Tone: ERROR not found");
- break;
- }
- }
-
- CSPLOGSTRING2(CSPREQIN, "CSPCall::Tone > tone: %d", tone);
- return tone;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCSCall
-// CSPCall::NoFdnCheck
-// ---------------------------------------------------------------------------
-//
-void CSPCall::NoFDNCheck( )
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::NoFDNCheck");
- iFdnCheck = EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::LogDialedNumber
-// ---------------------------------------------------------------------------
-//
-TBool CSPCall::LogDialedNumber() const
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::LogDialedNumber true");
- return ETrue;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCSCall
-// CSPCall::Dial
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::Dial( const TDesC8& /*aCallParams*/ )
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::Dial");
- return iCommonInfo.IndicateDialRequest( *this );
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCallCommandHandling
-// CSPCall::PerformDialRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::PerformDialRequest()
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::PerformDialRequest");
- iDialCompletionCode = KErrNone;
- iTerminationErrorNotified = EFalse;
-
- // Send the User to User Information.
- if( iUserToUserInformation->Length() )
- {
- iUUIMessageSender->SendUUIMessage( *iUserToUserInformation );
- }
-
- return DialFdnCond( iFdnCheck );
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::CSPCall
-// ---------------------------------------------------------------------------
-//
-CSPCall::CSPCall( RMobileLine& aLine,
- TBool aMobileOriginated,
- const TDesC& aName,
- MCSPCommonInfo& aCommonInfo,
- TBool aIsEmergencyCall ) :
- iLine( aLine ),
- iMobileOriginated( aMobileOriginated ),
- iName( aName ),
- iCommonInfo( aCommonInfo ),
- iTerminationErrorNotified( EFalse ),
- iIsEmergencyCall( aIsEmergencyCall),
- iFdnCheck(ETrue),
- iAudioStatus( ECSPCallAudioStatusInactive )
-
- {
- CSPLOGSTRING(CSPOBJECT, "CSPCall::CSPCall");
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::ConstructL
-// Constructing CSPCall in 2nd phase
-// ---------------------------------------------------------------------------
-//
-void CSPCall::ConstructL( const CCCECallParameters& aParams )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPCall::ConstructL <");
-
- // Create cloned copy of call parameters
- iParams = static_cast<CCCECallParameters*>( aParams.CloneL() );
-
- // Open call handle
- OpenCallHandleL();
-
- // Update call info
- UpdateCallInfo();
-
- // Update call state from ETel
- UpdateCallState();
-
- // Create call handlers for call related requests
- // and for monitoring call related events
- CreateCallHandlersL();
-
- CSPLOGSTRING(CSPOBJECT, "CSPCall::ConstructL >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::OpenCallHandleL
-// Open call handle, calls either OpenNewCallL or OpenExistingCallL depending
-// of the call direction and if the call is a client call
-// ---------------------------------------------------------------------------
-//
-void CSPCall::OpenCallHandleL()
- {
- CSPLOGSTRING(CSPINT, "CSPCall::OpenCallHandleL <");
-
- if ( iMobileOriginated )
- {
- // There is no existing call on line, open new call
- OpenNewCall();
- }
- else
- {
- // Mobile terminated call on line, open existing call
- OpenExistingCallL( iName );
- }
-
- CSPLOGSTRING(CSPINT, "CSPCall::OpenCallHandleL >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::UpdateCallInfoL
-// Update call info including remote party name and number data
-// ---------------------------------------------------------------------------
-//
-void CSPCall::UpdateCallInfo()
- {
- CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfo <");
- RMobileCall::TMobileCallInfoV7 callInfo;
- RMobileCall::TMobileCallInfoV7Pckg pck( callInfo );
- TInt err = iCall.GetMobileCallInfo( pck );
-
- UpdateCallInfoImpl( callInfo );
-
- CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfo >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::UpdateCallInfoImpl
-// Implementation for UpdateCallInfo().
-// ---------------------------------------------------------------------------
-//
-void CSPCall::UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo )
- {
- CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfoImpl <");
-
- if ( iMobileOriginated )
- {
- // Call wasn't added by ETel monitor, update info accordingly
- UpdateCallNameNumberInfo( aCallInfo, EFalse );
- }
- else
- {
- // Call was added by ETel monitor, update info accordingly
- UpdateCallNameNumberInfo( aCallInfo, ETrue );
- }
-
-
- CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfoImpl >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::UpdateCallOrigin
-// Set call origin to CCCECallParameters.
-// ---------------------------------------------------------------------------
-//
-void CSPCall::UpdateCallOrigin( RMobileCall::TMobileCallInfoV7 aCallInfo )
- {
- CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallOrigin <");
-
- if ( iMobileOriginated )
- {
- if ( RMobileCall::EOriginatorSIM == aCallInfo.iCallParamOrigin )
- {
- iParams->SetOrigin(CCCECallParameters::ECCECallOriginSAT);
- }
- }
- CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallOrigin >");
- }
-
-
-
-// ---------------------------------------------------------------------------
-// CSPCall::UpdateCallStateL
-//
-// ---------------------------------------------------------------------------
-//
-int CSPCall::UpdateCallState()
- {
- CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallState <");
- TInt err( KErrNone );
-
- // Update call state from ETel
- RMobileCall::TMobileCallStatus etelState;
- err = iCall.GetMobileCallStatus( etelState );
- if ( KErrNone == err )
- {
- iCallState = CCPStateFromETelState( etelState );
- }
- CSPLOGSTRING2(CSPINT, "CSPCall::UpdateCallState > res %d", err);
-
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::NotifyRemotePartyNumberChanged
-//
-// ---------------------------------------------------------------------------
-//
-void CSPCall::NotifyRemotePartyNumberChanged()
- {
- CSPLOGSTRING(CSPINT, "CSPCall::NotifyRemotePartyNumberChanged <");
-
- // If COLP number is different from original dialled number
- // it is available in connected state of a MO call.
- // TSY does not send notification so number must be fetched.
- if ( IsMobileOriginated() )
- {
- RMobileCall::TMobileCallInfoV3 callInfo;
- RMobileCall::TMobileCallInfoV3Pckg callInfoPckg( callInfo );
-
- GetMobileCallInfo( callInfoPckg );
- callInfo = callInfoPckg();
-
-
- if ( callInfo.iRemoteParty.iRemoteNumber.iTelNumber.Length() )
- {
- NotifyRemotePartyInfoChanged( KNullDesC(),
- callInfo.iRemoteParty.iRemoteNumber.iTelNumber);
- }
- }
- }
-
-
-// ---------------------------------------------------------------------------
-// CSPCall::CreateCallHandlersL
-// Create call handlers for call related requests and call monitoring
-// ---------------------------------------------------------------------------
-//
-void CSPCall::CreateCallHandlersL()
- {
- CSPLOGSTRING(CSPINT, "CSPCall::CreateCallHandlersL <");
-
- iRequester = CSPEtelCallRequester::NewL( *this, iCall );
-
- iCallEventMonitor = CSPEtelCallEventMonitor::NewL( *this, iCall );
- iCallEventMonitor->StartMonitoring();
- iCallStatusMonitor = CSPEtelCallStatusMonitor::NewL( *this, iCall );
- iCallStatusMonitor->StartMonitoring();
-
- iCallCapsMonitor = CSPEtelCallCapsMonitor::NewL( *this, iCall );
- iCallCapsMonitor->StartMonitoring();
- iCapsFlags = iCallCapsMonitor->FetchCallControlCapsL();
-
- iCallInfoMonitor = CSPCallInfoMonitor::NewL( *this, iCall );
- iCallInfoMonitor->StartMonitoring();
-
- // Start UUI monitor and create message sender
- iSkypeId = TCSPSkypeIdParser::CreateSkypeIdBufferL();
- iUUIMonitor = CSPUUIMonitor::NewL( iCall,*this );
- iUUIMonitor->StartMonitor();
- iUUIMessageSender = CSPUUIMessageSender::NewL( iCall );
- iUserToUserInformation = iParams->UUSId().AllocL();
-
- // Transfer provider
- iTransferProvider = CSPTransferProvider::NewL( iCall, *this, iCommonInfo );
-
- // Forward provider
- iForwardProvider = CSPForwardProvider::NewL();
-
- CSPLOGSTRING(CSPINT, "CSPCall::CreateCallHandlersL >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::NotifyRingingState
-// Gets to ringing state
-// ---------------------------------------------------------------------------
-//
-void CSPCall::NotifyRingingState( )
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::NotifyRingingState");
- iCallState = MCCPCallObserver::ECCPStateRinging;
-
- TInt obsCount = iObservers.Count ( );
- for (TInt i = 0; i < obsCount; i++ )
- {
- MCCPCallObserver *obs = iObservers[i];
- if ( obs )
- {
- obs->CallStateChanged ( iCallState, this );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::CCPStateFromETelState
-// Simple mapping between state enumerations.
-// ---------------------------------------------------------------------------
-//
-MCCPCallObserver::TCCPCallState CSPCall::CCPStateFromETelState(
- RMobileCall::TMobileCallStatus aEtelState )
- {
- MCCPCallObserver::TCCPCallState ret = MCCPCallObserver::ECCPStateIdle;
- switch ( aEtelState )
- {
- case RMobileCall::EStatusUnknown:
- {
- CSPLOGSTRING( CSPREQIN,
- "CSPCall::State > RMobileCall::Unknown" );
- ret = MCCPCallObserver::ECCPStateIdle;
- break;
- }
- case RMobileCall::EStatusIdle:
- {
- CSPLOGSTRING( CSPREQIN,
- "CSPCall::State > RMobileCall::EStatusIdle" );
- ret = MCCPCallObserver::ECCPStateIdle;
- break;
- }
- case RMobileCall::EStatusRinging:
- {
- CSPLOGSTRING( CSPREQIN,
- "CSPCall::State > RMobileCall::EStatusRinging" );
- ret = MCCPCallObserver::ECCPStateRinging;
- break;
- }
- // Map the following to connecting status
- case RMobileCall::EStatusDialling:
- {
- CSPLOGSTRING( CSPREQIN, "CSPCall::State > \
- RMobileCall::EStatusDialling" );
- ret = MCCPCallObserver::ECCPStateDialling;
- break;
- }
- case RMobileCall::EStatusConnecting:
- {
- CSPLOGSTRING( CSPREQIN, "CSPCall::State > \
- RMobileCall::Connecting" );
- ret = MCCPCallObserver::ECCPStateConnecting;
- break;
- }
- case RMobileCall::EStatusAnswering:
- {
- CSPLOGSTRING( CSPREQIN, "CSPCall::State > \
- RMobileCall::Answering" );
- ret = MCCPCallObserver::ECCPStateAnswering;
- break;
- }
- // Call is connected and active.
- case RMobileCall::EStatusConnected:
- {
- CSPLOGSTRING( CSPREQIN,
- "CSPCall::State > RMobileCall::EStatusConnected" );
- ret = MCCPCallObserver::ECCPStateConnected;
- break;
- }
- case RMobileCall::EStatusDisconnectingWithInband:
- case RMobileCall::EStatusDisconnecting:
- {
- CSPLOGSTRING( CSPREQIN,
- "CSPCall::State > RMobileCall::EStatusDisconnecting/Inband?");
- ret = MCCPCallObserver::ECCPStateDisconnecting;
- break;
- }
- case RMobileCall::EStatusReconnectPending:
- {
- CSPLOGSTRING( CSPREQIN,
- "CSPCall::State > RMobileCall::EStatusHangingUp" );
- ret = MCCPCallObserver::ECCPStateDisconnecting;
- break;
- }
- case RMobileCall::EStatusHold:
- {
- CSPLOGSTRING( CSPREQIN,
- "CSPCall::State > RMobileCall::EStatusHold" );
- ret = MCCPCallObserver::ECCPStateHold;
- break;
- }
- case RMobileCall::EStatusWaitingAlternatingCallSwitch:
- {
- // This state is not used in real life.
- CSPLOGSTRING( CSPREQIN,
- "CSPCall::State > RMobileCall::EStatusWaitingAlternatingCallSwitch" );
- ret = MCCPCallObserver::ECCPStateConnected;
- break;
- }
- case RMobileCall::EStatusTransferring:
- {
- CSPLOGSTRING( CSPREQIN,
- "CSPCall::State > RMobileCall::EStatusHold" );
- ret = MCCPCallObserver::ECCPStateTransferring;
- break;
- }
- case RMobileCall::EStatusTransferAlerting:
- {
- CSPLOGSTRING( CSPREQIN,
- "CSPCall::State > RMobileCall::EStatusHold" );
- ret = MCCPCallObserver::ECCPStateTransferring;
- break;
- }
- default:
- {
- CSPLOGSTRING( CSPREQIN,
- "CSPCall::CCPStateFromETelState unhandled state ");
- }
- }
-
- CSPLOGSTRING3(CSPINT,
- "CSPCall::CCPStateFromETelState ETel: %d CCP: %d", aEtelState, ret);
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::NotifyCallStateChanged
-// Notifies observers about state changes
-// ---------------------------------------------------------------------------
-//
-void CSPCall::NotifyCallStateChanged( MCCPCallObserver::TCCPCallState aState )
- {
- CSPLOGSTRING3(CSPINT,
- "CSPCall::NotifyCallStateChanged < state: %d this: %x",
- aState, this );
-
- iCallState = aState;
- TBool notifyObservers( ETrue );
-
- if ( !iMobileOriginated && MCCPCallObserver::ECCPStateRinging == aState )
- {
- CSPLOGSTRING2(CSPINT, "CSPCall::No notify on ringing MT", aState);
- notifyObservers = EFalse;
- }
-
- if ( notifyObservers )
- {
- TInt obsCount = iObservers.Count();
- for ( TInt i = 0; i < obsCount; i++ )
- {
- MCCPCallObserver *obs = iObservers[i];
- if ( obs )
- {
- obs->CallStateChanged( aState, this );
- }
- }
- }
-
- CSPLOGSTRING3(CSPINT,
- "CSPCall::NotifyCallStateChanged > state: %d this: %x",
- aState, this );
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::NotifyCallStateChangedWithInband
-// Notifies observers about state changes
-// ---------------------------------------------------------------------------
-//
-void CSPCall::NotifyCallStateChangedWithInband(
- MCCPCallObserver::TCCPCallState aState )
- {
- CSPLOGSTRING3(CSPINT,
- "CSPCall::NotifyCallStateChangedWithInBand < state: %d this: %x",
- aState, this );
-
- iCallState = aState;
-
- if ( !iMobileOriginated && MCCPCallObserver::ECCPStateRinging == aState )
- {
- CSPLOGSTRING2(CSPINT, "CSPCall::No notify on ringing MT", aState);
- }
- else
- {
- TInt obsCount = iObservers.Count();
- for ( TInt i = 0; i < obsCount; i++ )
- {
- MCCPCallObserver *obs = iObservers[i];
- if ( obs )
- {
- obs->CallStateChangedWithInband( aState, this );
- }
- }
- }
- CSPLOGSTRING3(CSPINT,
- "CSPCall::NotifyCallStateChangedWithInband > state: %d this: %x",
- aState, this);
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::ReadRepositoryL
-// Reads the given information from Central Repository.
-// ---------------------------------------------------------------------------
-//
-void CSPCall::ReadRepositoryL( TUid aUid, TUint aKey, TInt& aVal)
- {
- CSPLOGSTRING(CSPINT, "CSPCall::ReadRepositoryL");
-
- CRepository* cr = CRepository::NewL( aUid );
- TInt err = cr->Get( aKey, aVal );
- delete cr;
- User::LeaveIfError( err );
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::CheckAndNotifyTerminationError
-// Reads error code from ETel.
-// ---------------------------------------------------------------------------
-//
-void CSPCall::CheckAndNotifyTerminationError()
- {
- CSPLOGSTRING2(CSPINT,
- "CSPCall::CheckAndNotifyTerminationError dial completion code: %d",
- iDialCompletionCode);
-
- // Emergency error handling is separated into CSPEtelCallRequester
- if ( !iIsEmergencyCall )
- {
- TInt termErr = ExitCodeError();
- CSPLOGSTRING2(CSPINT,
- "CSPCall::CheckAndNotifyTerminationError exit code error: %d",
- termErr);
-
- if ( termErr == KErrNone )
- {
- // Handle KErrGsmCCUnassignedNumber correctly
- // because the value is not stored in exit code.
- termErr = iDialCompletionCode;
- CSPLOGSTRING(CSPINT,
- "CSPCall::CheckAndNotifyTerminationError use dial completion code");
- }
-
- if ( termErr == KErrGsmRRPreEmptiveRelease )
- {
- // Error KErrGsmRRPreEmptiveRelease occurs when there is active call
- // and user make emergency call, can be ignored.
- CSPLOGSTRING3(
- CSPERROR,
- "CSPCall::CheckAndNotifyTerminationError preemptive release, ignore: %d",
- termErr,
- this );
- }
- else if ( iDontReportTerm
- && ( termErr == KErrGsmCCNormalUnspecified
- || termErr == KErrGsmCCCallRejected ) )
- {
- // Not an error, since this happens on normal
- // call termination situation after connected call.
- CSPLOGSTRING3(CSPERROR,
- "CSPCall::CheckAndNotifyTerminationError DISCARD this: %x err: %d",
- this,
- termErr);
- }
- else if ( termErr )
- {
- TCCPError ccpErr(ECCPErrorNone);
-
- // Only a couple of error codes can have diagnostic information.
- // aDiagnostic ought to be undefined in other situatios,
- // but at least in this way we can really guarantee it.
- if ( termErr == KErrGsmCCFacilityRejected ||
- termErr == KErrGsmCCRequestedFacilityNotSubscribed ||
- termErr == KErrGsmCCIncomingCallsBarredInCug ||
- termErr == KErrGsmCCRequestedFacilityNotImplemented ||
- termErr == KErrGsmCCUserNotInCug )
- {
- TName name;
- CallName( name );
- TInt diagErr = iCommonInfo.GetDiagnosticError( name );
- ccpErr = iRequester->MapError( diagErr );
-
- // Finally use exit code if diagnostic did not contain
- // any useful information.
- if ( ccpErr == ECCPRequestFailure )
- {
- ccpErr = iRequester->MapError( termErr );
- }
- }
- else
- {
- ccpErr = iRequester->MapError( termErr );
- }
-
- NotifyErrorOccurred( ccpErr );
- iTerminationErrorNotified = ETrue;
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::ExitCodeError
-// Reads error code from ETel call info's iExitCode.
-// ---------------------------------------------------------------------------
-//
-TInt CSPCall::ExitCodeError() const
- {
- CSPLOGSTRING2(CSPINT, "CSPCall::ExitCodeError < this: %x",
- this );
- TInt callError;
- RMobileCall::TMobileCallInfoV3 callInfo;
- RMobileCall::TMobileCallInfoV3Pckg pck( callInfo );
- TInt getErr = iCall.GetMobileCallInfo( pck );
- // Is there value in higher 16 bits
- if ( KErrNone == getErr && (callInfo.iExitCode & 0xFFFF0000) )
- {
- CSPLOGSTRING2(CSPINT, "CSPCall::ExitCodeError callInfo.iExitCode %d",
- callInfo.iExitCode );
- callError = ( callInfo.iExitCode >> KTimesToSplitValue );
-
- if ( callError > KErrEtelGsmBase )
- // Not in valid exteded range
- {
- // Ignore invalid extented code
- if ( ( callInfo.iExitCode & 0x0000FFFF ) == KErrNone )
- // core error is zero
- {
- callError = KErrNone;
- }
- else
- {
- callError = ( ( callInfo.iExitCode & 0x0000FFFF )
- | 0xFFFF0000 );
- }
- }
- }
- // Higher and lower 16 bits are zero
- else if ( !( callInfo.iExitCode & 0xFFFFFFFF ) )
- {
- callError = KErrNone;
- }
- else
- {
- // No extended error, expand value to full range
- callError = ( callInfo.iExitCode | 0xFFFF0000 );
- }
-
- CSPLOGSTRING2(CSPINT, "CSPCall::ExitCodeError > err: %d", callError);
-
- return callError;
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::UUSMessageReceived
-// ---------------------------------------------------------------------------
-//
- void CSPCall::UUSMessageReceived( TDesC& aMessage )
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::UUSMessageReceived");
- TCSPSkypeIdParser parser;
-
- TPtr ptr = iSkypeId->Des();
- ptr.Zero();
- const TInt error( parser.Parse( aMessage, ptr ) );
-
- if ( !error )
- {
- iRemotePartyName = ptr;
- NotifyCallEventOccurred( MCCPCallObserver::ECCPNotifyRemotePartyInfoChange );
- }
- CSPLOGSTRING2(CSPINT, "CSPCall::UUSMessageReceived err: %d", error );
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::NotifyRemotePartyInfoChanged
-// ---------------------------------------------------------------------------
-//
-void CSPCall::NotifyRemotePartyInfoChanged( const TDesC& aRemotePartyName,
- const TDesC& aRemotePartyNumber )
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::NotifyRemotePartyInfoChanged");
-
- if ( aRemotePartyName.Length() )
- {
- iRemotePartyName = aRemotePartyName;
- }
-
- if ( aRemotePartyNumber.Length() )
- {
- iRemotePartyNumber = aRemotePartyNumber;
- }
-
- NotifyCallEventOccurred( MCCPCallObserver::ECCPNotifyRemotePartyInfoChange );
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::DontReportTerminationError
-// ---------------------------------------------------------------------------
-//
-void CSPCall::DontReportTerminationError()
- {
- CSPLOGSTRING(CSPREQIN, "CSPCall::DontReportTerminationError");
- iDontReportTerm = ETrue;
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::UpdateCallNameNumberInfo
-// Update call info including remote party name and number data
-// ---------------------------------------------------------------------------
-//
-void CSPCall::UpdateCallNameNumberInfo(
- RMobileCall::TMobileCallInfoV3& aCallInfo,
- TBool aCallAddedByMonitor )
- {
- CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallNameNumberInfo <");
-
- iCallName.Zero();
- iRemotePartyNumber.Zero();
- iRemotePartyName.Zero();
-
- if ( aCallAddedByMonitor )
- {
- CSPLOGSTRING(CSPINT,
- "CSPCall::UpdateCallNameNumberInfo call added by monitor");
-
- // If call was created by ETel line status or incoming call monitor
- // the call name is already known, only remote party info is fetched from
- // call info
- iCallName.Append( iName );
- iRemotePartyName.Append( aCallInfo.iRemoteParty.iCallingName );
- iRemotePartyNumber.Append( aCallInfo.iRemoteParty.iRemoteNumber.iTelNumber );
- }
- else
- {
- CSPLOGSTRING(CSPINT,
- "CSPCall::UpdateCallNameNumberInfo call added by plugin owner");
-
- // The call was not created by monitor and the remote number is already known,
- // fetch only call name from call info
- iCallName.Append( aCallInfo.iCallName );
- iRemotePartyNumber.Append( iName );
- }
-
- CSPLOGSTRING2(CSPINT,
- "CSPCall::UpdateCallNameNumberInfo iCallName: %S", &iCallName );
- CSPLOGSTRING2(CSPINT,
- "CSPCall::UpdateCallNameNumberInfo iRemotePartyNumber: %S", &iRemotePartyNumber );
- CSPLOGSTRING2(CSPINT,
- "CSPCall::UpdateCallNameNumberInfo iRemotePartyName: %S", &iRemotePartyName );
-
- CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallNameNumberInfo >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::OpenNewCall
-// Open new call
-// ---------------------------------------------------------------------------
-//
-void CSPCall::OpenNewCall()
- {
- CSPLOGSTRING(CSPINT, "CSPCall::OpenNewCall <");
-
- // Open new call
- __ASSERT_ALWAYS( iCall.OpenNewCall( iLine ) == KErrNone,
- Panic( ECSPPanicNoEtel ) );
-
- CSPLOGSTRING(CSPINT, "CSPCall::OpenNewCall >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::OpenExistingCallL
-// Open existing call
-// ---------------------------------------------------------------------------
-//
-void CSPCall::OpenExistingCallL( const TDesC& aName )
- {
- CSPLOGSTRING2(CSPINT,
- "CSPCall::OpenExistingCallL < aName: %S", &aName);
-
- // Open existing call with given name from current line
- TInt err = iCall.OpenExistingCall( iLine, aName );
-
- if ( KErrNone != err )
- {
- CSPLOGSTRING2(CSPERROR,
- "CSPCall::OpenCallHandleL OpenExistingCall error: %d, leaving", err);
- User::Leave( err );
- }
-
- CSPLOGSTRING(CSPINT, "CSPCall::OpenExistingCallL >");
- }
-
-// End of File
-
--- a/convergedcallengine/csplugin/src/cspcalladdedhandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,262 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements the class CSPCallAddedHandler
-*
-*/
-
-
-#include "cspcalladdedhandler.h"
-
-#include <etelmm.h>
-#include <mccpcsobserver.h>
-
-#include "cspcallarray.h"
-#include "cspetellinestatusmonitor.h"
-#include "mcsplinestatusobserver.h"
-#include "rcsplinecontainer.h"
-#include "csplogger.h"
-#include "cspclientvoicecall.h"
-#include "cspclientvideocall.h"
-#include "rcsplinecontainer.h"
-#include "mcspcommoninfo.h"
-#include "cspconsts.h"
-
-
-// ---------------------------------------------------------------------------
-// CSPCallAddedHandler::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPCallAddedHandler* CSPCallAddedHandler::NewL(
- const MCCPCSObserver& aObserver,
- RCSPLineContainer& aLineContainer,
- CSPCallArray& aCallArray,
- MCSPCommonInfo& aCommonInfo,
- CSPAudioHandler& aAudioHandler )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPCallAddedHandler::NewL()" );
- CSPCallAddedHandler* self = new ( ELeave ) CSPCallAddedHandler(
- aObserver, aLineContainer,
- aCallArray, aCommonInfo,
- aAudioHandler );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// ---------------------------------------------------------------------------
-//
-CSPCallAddedHandler::~CSPCallAddedHandler( )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPCallAddedHandler::~CSPCallAddedHandler" );
- delete iAuxLineMonitor;
- delete iVoiceLineMonitor;
- delete iDataLineMonitor;
- }
-
-// ---------------------------------------------------------------------------
-// CSPCallAddedHandler::CallAdded
-// ---------------------------------------------------------------------------
-//
-void CSPCallAddedHandler::CallAdded( RMobileLine& aLine,
- TName aCallName,
- RCSPLineContainer::TCSPLineId aLineId )
- {
- CSPLOGSTRING2(CSPINT,
- "CSPCallAddedHandler::CallAdded line: %d", aLineId);
- CSPLOGSTRING2(CSPINT,
- "CSPCallAddedHandler::CallAdded call name: %S", &aCallName);
-
- // Find call by name
- if ( !iCallArray.FindCall( aCallName ) )
- {
- TInt err( KErrNone );
-
- // Resolve call type
- TUint32 serviceId( 0 );
- CCPCall::TCallType callType;
- CCCECallParameters::TCCELineType lineType;
-
- iLineContainer.ResolveCallInfo( aLineId, serviceId, callType, lineType );
-
- CSPCall* call = NULL;
- CCCECallParameters* callParameters = NULL;
-
- TRAP_IGNORE( callParameters = CCCECallParameters::NewL() );
- if ( callParameters )
- {
- callParameters->SetServiceId(serviceId);
- callParameters->SetCallType(callType);
- callParameters->SetLineType(lineType);
-
- CSPLOGSTRING2(CSPINT,
- "CSPCallAddedHandler::CallAdded call type: %d", callType );
-
- if ( callType == CCPCall::ECallTypeCSVoice )
- {
- TRAP( err, call = CSPClientVoiceCall::NewL( aCallName,
- aLine, *callParameters,
- iCommonInfo ));
- }
- else if ( callType == CCPCall::ECallTypeVideo )
- {
- CSPLOGSTRING(CSPINT,
- "CSPCallAddedHandler::CallAdded creating video call");
- TRAP( err, call = CSPClientVideoCall::NewL( aCallName,
- aLine, *callParameters,
- iCommonInfo ));
- }
-
- delete callParameters;
- callParameters = NULL;
- }
-
- CSPLOGSTRING2(CSPINT,
- "CSPCallAddedHandler::CallAdded Client call creation res %d", err );
-
- if ( call )
- {
- // Set audio handler for DevSound
- call->SetAudioHandler( &iAudioHandler );
-
- MCCPCallObserver::TCCPCallState callState = call->State();
- CSPLOGSTRING2(CSPINT,
- "CSPCallAddedHandler::CallAdded call state: %d", callState );
-
- if ( callState == MCCPCallObserver::ECCPStateDialling )
- {
- CSPLOGSTRING(CSPINT,
- "CSPCallAddedHandler::CallAdded add Dialling call" );
-
- iCallArray.Add( call );
-
- CSPLOGSTRING(CSPINT,
- "CSPCallAddedHandler::CallAdded notifying dialling state" );
-
- call->NotifyCallStateChangedETel( RMobileCall::EStatusDialling );
- }
- else if ( callState == MCCPCallObserver::ECCPStateConnecting ||
- callState == MCCPCallObserver::ECCPStateConnected )
- {
- CSPLOGSTRING(CSPINT,
- "CSPCallAddedHandler::CallAdded add Connecting/Connected call" );
- iCallArray.Add( call );
- iCommonInfo.IndicateClientCall( call );
- }
- else
- {
- CSPLOGSTRING(CSPERROR,
- "CSPCallAddedHandler::CallAdded ignore call" );
- delete call;
- }
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPCallAddedHandler::LineStatusChanged
-// ---------------------------------------------------------------------------
-//
-void CSPCallAddedHandler::LineStatusChanged( RMobileLine& aLine,
- RCSPLineContainer::TCSPLineId aLineId,
- RMobileCall::TMobileCallStatus& aLineStatus )
- {
- CSPLOGSTRING2(CSPINT,
- "CSPCallAddedHandler::LineStatusChanged line: %d", aLineId );
- CSPLOGSTRING2(CSPINT,
- "CSPCallAddedHandler::LineStatusChanged line status: %d",
- aLineStatus );
-
- if ( aLineStatus == RMobileCall::EStatusDialling )
- {
- TInt err(KErrNone);
- RLine::TLineInfo lineInfo;
- err = aLine.GetInfo( lineInfo );
- TName callName;
-
- if ( err == KErrNone )
- {
- callName = lineInfo.iNameOfLastCallAdded;
- CallAdded( aLine, callName, aLineId);
- }
- else
- {
- CSPLOGSTRING2(CSPERROR,
- "CSPCallAddedHandler::LineStatusChanged get info err:%d",
- err);
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor.
-// ---------------------------------------------------------------------------
-//
-CSPCallAddedHandler::CSPCallAddedHandler(
- const MCCPCSObserver& aObserver,
- RCSPLineContainer& aLineContainer,
- CSPCallArray& aCallArray,
- MCSPCommonInfo& aCommonInfo,
- CSPAudioHandler& aAudioHandler ) :
- iLineContainer( aLineContainer ),
- iObserver( aObserver ),
- iCallArray( aCallArray ),
- iCommonInfo( aCommonInfo ),
- iAudioHandler( aAudioHandler )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPCallAddedHandler::CSPCallAddedHandler");
- }
-
-// ---------------------------------------------------------------------------
-// Second phase construction.
-// ---------------------------------------------------------------------------
-//
-void CSPCallAddedHandler::ConstructL()
- {
- CSPLOGSTRING(CSPOBJECT, "CSPCallAddedHandler::ConstructL <");
-
- if ( iLineContainer.LineIsOpen( RCSPLineContainer::ECSPLineSpeech ) )
- {
- RMobileLine& line = iLineContainer.LineByType(
- RCSPLineContainer::ECSPLineSpeech );
- iVoiceLineMonitor = CSPEtelLineStatusMonitor::NewL( *this, line,
- RCSPLineContainer::ECSPLineSpeech );
- iVoiceLineMonitor->StartMonitoring();
- }
- // This is for videocalls
- if ( iLineContainer.LineIsOpen( RCSPLineContainer::ECSPLineData ) )
- {
- RMobileLine& line = iLineContainer.LineByType(
- RCSPLineContainer::ECSPLineData );
-
- iDataLineMonitor = CSPEtelLineStatusMonitor::NewL( *this, line,
- RCSPLineContainer::ECSPLineData );
- iDataLineMonitor->StartMonitoring();
- }
-
- if ( iLineContainer.LineIsOpen( RCSPLineContainer::ECSPLineAuxSpeech ) )
- {
- RMobileLine& line = iLineContainer.LineByType(
- RCSPLineContainer::ECSPLineAuxSpeech );
- iAuxLineMonitor = CSPEtelLineStatusMonitor::NewL( *this, line,
- RCSPLineContainer::ECSPLineAuxSpeech );
- iAuxLineMonitor->StartMonitoring();
- }
-
- CSPLOGSTRING(CSPOBJECT, "CSPCallAddedHandler::ConstructL >");
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspcallarray.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements the class CSPCallArray
-*
-*/
-
-
-#include <etelmm.h>
-
-#include "cspcallarray.h"
-#include "csplogger.h"
-#include "cspcall.h"
-#include "cspconsts.h"
-
-
-// ---------------------------------------------------------------------------
-// CSPCallArray::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPCallArray* CSPCallArray::NewL( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPCallArray::NewL()" );
- CSPCallArray* self = new ( ELeave ) CSPCallArray( );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructs the array including remaining calls.
-// ---------------------------------------------------------------------------
-//
-CSPCallArray::~CSPCallArray( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPCallArray::~CSPCallArray()" );
- TInt callCount = iCallArray.Count();
- CSPLOGSTRING2(CSPOBJECT, "CSPCallArray::~CSPCallArray() calls %d", callCount);
-
- for (TInt callIndex = 0; callIndex < callCount; callIndex++)
- {
- CSPCall* call = iCallArray[ callIndex ];
- delete call;
- }
-
- iCallArray.Reset();
- iCallArray.Close();
- }
-
-// ---------------------------------------------------------------------------
-// From MCSPCallInformation
-// Iterates through call objects finding the call matching the given name.
-// ---------------------------------------------------------------------------
-//
-CSPCall* CSPCallArray::FindCall( const TName& aCallName )
- {
- CSPLOGSTRING(CSPINT, "CSPCallArray::FindCall()");
-
- TInt callCount = iCallArray.Count();
- for (TInt callIndex = 0; callIndex < callCount; callIndex++)
- {
-
- CSPCall* call = iCallArray[ callIndex ];
- if ( call )
- {
- TName currentCallName;
- call->CallName( currentCallName );
- if ( currentCallName.Compare( aCallName ) == 0 )
- {
- CSPLOGSTRING(CSPINT, "CSPCallArray::FindCall() OK");
- return call;
- }
- }
- }
-
- CSPLOGSTRING(CSPINT, "CSPCallArray::FindCall() NOT FOUND");
- return NULL;
- }
-
-// ---------------------------------------------------------------------------
-// CSPCallArray::Add
-// ---------------------------------------------------------------------------
-//
-TInt CSPCallArray::Add(CSPCall* aCall )
- {
- CSPLOGSTRING(CSPINT, "CSPCallArray::Add()");
- return iCallArray.Append( aCall );
- }
-
-// ---------------------------------------------------------------------------
-// CSPCallArray::Remove
-// ---------------------------------------------------------------------------
-//
-TInt CSPCallArray::Remove(CSPCall* aCall )
- {
- CSPLOGSTRING(CSPINT, "CSPCallArray::Remove()");
- TInt index = iCallArray.Find( aCall );
- if ( index != KErrNotFound )
- {
- iCallArray.Remove( index );
- return KErrNone;
- }
- CSPLOGSTRING(CSPINT, "CSPCallArray::Remove() NOT FOUND");
- return KErrNotFound;
- }
-
-// ---------------------------------------------------------------------------
-// CSPCallArray::GetCallCount
-// ---------------------------------------------------------------------------
-//
-TInt CSPCallArray::GetCallCount( )
- {
- return iCallArray.Count();
- }
-
-// ---------------------------------------------------------------------------
-// CSPCallArray::Get
-// ---------------------------------------------------------------------------
-//
-CSPCall* CSPCallArray::Get( TInt aIndex )
- {
- return iCallArray[aIndex];
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor.
-// ---------------------------------------------------------------------------
-//
-CSPCallArray::CSPCallArray()
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPCallArray::CSPCallArray()" );
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspcallcommandhandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,193 +0,0 @@
-/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements the class CSPCallCommandHandler
-*
-*/
-
-
-#include "cspcallcommandhandler.h"
-#include "mcspcallcommandhandling.h"
-#include "csplogger.h"
-
-// ---------------------------------------------------------------------------
-// CSPCallCommandHandler::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPCallCommandHandler* CSPCallCommandHandler::NewL()
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPCallCommandHandler::NewL()" );
- CSPCallCommandHandler* self = new ( ELeave ) CSPCallCommandHandler();
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructs the array including remaining calls.
-// ---------------------------------------------------------------------------
-//
-CSPCallCommandHandler::~CSPCallCommandHandler()
- {
- iActiveHangupArray.Reset();
- iActiveHangupArray.Close();
- CSPLOGSTRING(CSPOBJECT,
- "CSPCallCommandHandler::~CSPCallCommandHandler");
- }
-
-// ---------------------------------------------------------------------------
-// CSPCallCommandHandler::IndicateActiveHangup
-// ---------------------------------------------------------------------------
-//
-TInt CSPCallCommandHandler::IndicateActiveHangup( MCCPCallCommandHandling& aCall )
- {
- TInt err = iActiveHangupArray.Find( &aCall );
- if ( err == KErrNotFound )
- {
- err = iActiveHangupArray.Append( &aCall );
- CSPLOGSTRING2(
- CSPINT,
- "CSPCallCommandHandler::IndicateActiveHangup append error: %d",
- err );
- }
- else
- {
- CSPLOGSTRING(
- CSPINT,
- "CSPCallCommandHandler::IndicateActiveHangup call already added");
- }
- CSPLOGSTRING2(
- CSPINT,
- "CSPCallCommandHandler::IndicateActiveHangup active hangup count: %d",
- iActiveHangupArray.Count());
-
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// CSPCallCommandHandler::CSPCallCommandHandler::IndicateHangupComplete
-// ---------------------------------------------------------------------------
-//
-TInt CSPCallCommandHandler::IndicateHangupComplete( MCCPCallCommandHandling& aCall )
- {
- TInt index = iActiveHangupArray.Find( &aCall );
- if ( index != KErrNotFound )
- {
- iActiveHangupArray.Remove( index );
- CSPLOGSTRING(CSPINT,
- "CSPCallCommandHandler::IndicateHangupComplete remove");
- }
-
- if( !iActiveHangupArray.Count() && iPendingCall )
- {
- if( iPendingCommand == ECSPAnswerCall )
- {
- CSPLOGSTRING(CSPINT,
- "CSPCallCommandHandler::IndicateHangupComplete perform answer request");
- iPendingCall->PerformAnswerRequest();
- iPendingCommand = ECSPNone;
- iPendingCall = NULL;
- }
- else if( iPendingCommand == ECSPDialCall )
- {
- CSPLOGSTRING(CSPINT,
- "CSPCallCommandHandler::IndicateHangupComplete perform dial request");
- iPendingCall->PerformDialRequest();
- iPendingCommand = ECSPNone;
- iPendingCall = NULL;
- }
- }
-
- CSPLOGSTRING2(CSPINT,
- "CSPCallCommandHandler::IndicateHangupComplete active hangup count: %d",
- iActiveHangupArray.Count());
-
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// CSPCallCommandHandler::IndicateDialRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSPCallCommandHandler::IndicateDialRequest( MCCPCallCommandHandling& aCall )
-
- {
- CSPLOGSTRING(CSPINT,
- "CSPCallCommandHandler::IndicateDialRequest");
- TInt ret( KErrNone );
-
- if( !iActiveHangupArray.Count() )
- {
- CSPLOGSTRING(CSPINT,
- "CSPCallCommandHandler::IndicateDialRequest dial");
- aCall.PerformDialRequest();
- }
- else if( !iPendingCall && iPendingCommand == ECSPNone )
- {
- CSPLOGSTRING(CSPINT,
- "CSPCallCommandHandler::IndicateDialRequest delay dialing");
- iPendingCall = &aCall;
- iPendingCommand = ECSPDialCall;
- }
- else
- {
- CSPLOGSTRING(CSPINT,
- "CSPCallCommandHandler::IndicateDialRequest ERROR already exists");
- ret = KErrAlreadyExists;
- }
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// CSPCallCommandHandler::IndicateAnswerRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSPCallCommandHandler::IndicateAnswerRequest( MCCPCallCommandHandling& aCall )
-
- {
- CSPLOGSTRING(CSPINT, "CSPCallCommandHandler::IndicateAnswerRequest" );
-
- TInt ret( KErrNone );
-
- if( !iActiveHangupArray.Count() )
- {
- CSPLOGSTRING(CSPINT,
- "CSPCallCommandHandler::IndicateAnswerRequest answer");
- aCall.PerformAnswerRequest();
- }
- else if( !iPendingCall && iPendingCommand == ECSPNone )
- {
- CSPLOGSTRING(CSPINT,
- "CSPCallCommandHandler::IndicateAnswerRequest delay answering");
- iPendingCall = &aCall;
- iPendingCommand = ECSPAnswerCall;
- }
- else
- {
- CSPLOGSTRING(CSPINT,
- "CSPCallCommandHandler::IndicateAnswerRequest ERROR already exists");
- ret = KErrAlreadyExists;
- }
-
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor.
-// ---------------------------------------------------------------------------
-//
-CSPCallCommandHandler::CSPCallCommandHandler()
- {
- CSPLOGSTRING(CSPOBJECT, "CSPCallCommandHandler::CSPCallCommandHandler");
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspcallinfomonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,156 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Monitors changes in remote party info.
-* Interface :
-*
-*/
-
-
-
-// INCLUDE FILES
-
-#include "cspcallinfomonitor.h"
-#include "mcspcallobserver.h"
-#include "csppanic.pan"
-#include "csplogger.h" //Debug
-
-
-// ============================ MEMBER FUNCTIONS =============================
-
-//----------------------------------------------------------------------------
-// CSPCallInfoMonitor::NewL()
-//
-// 1st phase constructor
-//----------------------------------------------------------------------------
-//
-CSPCallInfoMonitor* CSPCallInfoMonitor::NewL
- ( MCSPCallObserver& aObserver,
- RMobileCall& aCall )
- {
- CSPCallInfoMonitor* self = new (ELeave) CSPCallInfoMonitor( aObserver,
- aCall );
- return self;
- }
-
-//----------------------------------------------------------------------------
-// CSPCallInfoMonitor::~CSPCallInfoMonitor()
-//
-// d'tor.
-//----------------------------------------------------------------------------
-//
-CSPCallInfoMonitor::~CSPCallInfoMonitor()
- {
- Cancel();
- CSPLOGSTRING( CSPINT, "CSP: CSPCallInfoMonitor::~CSPCallInfoMonitor" );
- }
-
-//----------------------------------------------------------------------------
-// CSPCallInfoMonitor::StartMonitor()
-//
-// Starts monitoring.
-//----------------------------------------------------------------------------
-//
-void CSPCallInfoMonitor::StartMonitoring()
- {
- // error ignored (starting notification doesn't leave)
- if (!IsActive())
- {
- iCall.NotifyRemotePartyInfoChange(
- iStatus,
- iRemotePartyInfoPckg );
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPCallInfoMonitor::StartMonitoring: Already active" );
-
- }
- }
-
-//----------------------------------------------------------------------------
-// CSPCallInfoMonitor::RunL()
-//
-// Handling of the status changes.
-//----------------------------------------------------------------------------
-//
-void CSPCallInfoMonitor::RunL()
- {
- CSPLOGSTRING2( CSPINT,
- "CSP: CSPCallInfoMonitor::RunL iStatus: %d", iStatus.Int() );
-
- RMobileCall::TMobileCallRemoteIdentityStatus idStatus =
- iRemotePartyInfo.iRemoteIdStatus;
- CSPLOGSTRING2( CSPINT,
- "CSP: CSPCallInfoMonitor::RunL id status: %d", idStatus );
-
- switch ( iStatus.Int() )
- {
- case KErrNone:
- {
- if ( idStatus == RMobileCall::ERemoteIdentityAvailable)
- {
- iObserver.NotifyRemotePartyInfoChanged(
- iRemotePartyInfo.iCallingName,
- KNullDesC());
- }
- else
- {
- CSPLOGSTRING2( CSPERROR,
- "CSP: CSPCallInfoMonitor::RunL DISCARD: %d", idStatus );
- }
- break;
- }
- default:
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPCallInfoMonitor::RunL error" );
- break;
- }
-
- if ( KErrNotSupported != iStatus.Int() )
- {
- StartMonitoring();
- }
- }
-
-//----------------------------------------------------------------------------
-// CSPCallInfoMonitor::DoCancel()
-//
-// Implementation of cancel.
-//----------------------------------------------------------------------------
-//
-void CSPCallInfoMonitor::DoCancel()
- {
- CSPLOGSTRING( CSPINT, "CSP: CSPCallInfoMonitor::DoCancel" );
-
- iCall.CancelAsyncRequest( EMobileCallNotifyRemotePartyInfoChange );
- }
-
-//----------------------------------------------------------------------------
-// CSPCallInfoMonitor::CSPCallInfoMonitor()
-//
-// constructor.
-//----------------------------------------------------------------------------
-//
-CSPCallInfoMonitor::CSPCallInfoMonitor( MCSPCallObserver &aObserver,
- RMobileCall& aCall ) :
- CActive( EPriorityStandard ),
- iObserver( aObserver ),
- iCall( aCall ),
- iRemotePartyInfoPckg( iRemotePartyInfo )
- {
- CActiveScheduler::Add( this );
- }
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspcenreplistener.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Central Repository listening
-*
-*/
-
-
-// INCLUDE FILES
-#include "cspcenreplistener.h"
-#include <centralrepository.h>
-#include "csppanic.pan"
-#include "mcspcenrepobserver.h"
-#include "csplogger.h"
-
-
-// -----------------------------------------------------------------------------
-// CSPCenRepListener::CSPCenRepListener
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CSPCenRepListener* CSPCenRepListener::NewL(
- TUid aUid,
- TUint32 aMonitorSetting,
- MCSPCenRepObserver* aObserver
- )
- {
- CSPLOGSTRING( CSPINT, "CSPCenRepListener::NewL" )
- CSPCenRepListener* self = new( ELeave )
- CSPCenRepListener( aUid, aMonitorSetting, aObserver );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop();
- return self;
- }
-
-
-// Destructor
-CSPCenRepListener::~CSPCenRepListener()
- {
- Cancel();
- delete iRepository;
- }
-
-
-// -----------------------------------------------------------------------------
-// CSPCenRepListener::Get
-// -----------------------------------------------------------------------------
-//
-TInt CSPCenRepListener::Get( TInt& aValue )
- {
- return ( iRepository->Get( iMonitorSetting, aValue ) );
- }
-
-
-// -----------------------------------------------------------------------------
-// CSPCenRepListener::DoCancel
-// -----------------------------------------------------------------------------
-//
-void CSPCenRepListener::DoCancel()
- {
- __ASSERT_DEBUG( iRepository, Panic( ECSPPanicNoRepository ) );
- iRepository->NotifyCancel( iMonitorSetting );
- }
-
-
-// -----------------------------------------------------------------------------
-// CSPCenRepListener::RunError
-// -----------------------------------------------------------------------------
-//
-TInt CSPCenRepListener::RunError(
- #ifdef _DEBUG
- TInt aError // Log the leavecode from RunL
- #else
- TInt /*aError*/
- #endif
- )
- {
- #ifdef _DEBUG
- CSPLOGSTRING2( CSPERROR, "CSPCenRepListener::RunError %d", aError );
- #endif
- return ( KErrNone );
- }
-
-
-// -----------------------------------------------------------------------------
-// CSPCenRepListener::RunL
-// -----------------------------------------------------------------------------
-//
-void CSPCenRepListener::RunL()
- {
- CSPLOGSTRING( CSPINT, "CSPCenRepListener::RunL");
-
- // Don't resubmit the request on error
- // Central repositry completes notifications with id of setting
- // so check only that value of iStatus is negative
- User::LeaveIfError( iStatus.Int() < KErrNone );
- SubmitNotifyRequestL();
-
- TInt volume;
- // The loudspeaker volume has changed in repository.
- // Retrieve the current volume from repository.
- User::LeaveIfError( Get( volume ) );
-
- CSPLOGSTRING2( CSPINT, "CSPCenRepListener::RunL vol %d", volume);
- iObserver->HandleNotifyCenRepL( iUid, iMonitorSetting, volume );
- }
-
-
-// -----------------------------------------------------------------------------
-// CSPCenRepListener::CSPCenRepListener
-// -----------------------------------------------------------------------------
-//
-CSPCenRepListener::CSPCenRepListener(
- TUid aUid,
- TUint32 aMonitorSetting,
- MCSPCenRepObserver* aObserver
- ) : CActive( EPriorityStandard ),
- iUid( aUid ),
- iMonitorSetting( aMonitorSetting ),
- iObserver( aObserver )
- {
- CSPLOGSTRING( CSPINT, "CSPCenRepListener::CSPCenRepListener, start");
- CActiveScheduler::Add( this );
-
- CSPLOGSTRING( CSPINT, "CSPCenRepListener::CSPCenRepListener, complete");
- }
-
-
-// -----------------------------------------------------------------------------
-// CSPCenRepListener::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CSPCenRepListener::ConstructL()
- {
- // Create repository instance
- iRepository = CRepository::NewL( iUid );
- // Start monitoring
- SubmitNotifyRequestL();
- }
-
-
-// -----------------------------------------------------------------------------
-// CSPCenRepListener::SubmitNotifyRequestL
-// -----------------------------------------------------------------------------
-//
-void CSPCenRepListener::SubmitNotifyRequestL()
- {
- CSPLOGSTRING( CSPINT, "CSPCenRepListener::SubmitNotifyRequestL");
- __ASSERT_DEBUG( iRepository, Panic( ECSPPanicNoRepository ) );
- __ASSERT_DEBUG( !IsActive(), Panic( ECSPPanicRepositoryAlreadyActive ) );
- iRepository->NotifyRequest( iMonitorSetting, iStatus );
- SetActive();
- CSPLOGSTRING( CSPINT, "CSPCenRepListener::SubmitNotifyRequestL, complete");
- }
-
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspcipheringstatusmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Contains the implementation of class
-* CSPCipheringStatusMonitor.
-*
-*/
-
-
-// INCLUDE FILES
-#include <rmmcustomapi.h>
-#include "cspcipheringstatusmonitor.h"
-#include "csplogger.h"
-#include "mcspsecuritysettingobserver.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CSPCipheringStatusMonitor::CSPCipheringStatusMonitor(
- RMmCustomAPI& aMmCustom, MCSPSecuritySettingObserver& aObs )
- : CActive( EPriorityStandard ),
- iMmCustom( aMmCustom ),
- iObserver( aObs ),
- iIsInitialised( EFalse ),
- iCallsSecured( EFalse ),
- iSecureSpecified( ETrue )
- {
- CActiveScheduler::Add( this );
- }
-
-// Destructor
-CSPCipheringStatusMonitor::~CSPCipheringStatusMonitor()
- {
- Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// CSPCipheringStatusMonitor::NewL
-// ---------------------------------------------------------------------------
-//
-CSPCipheringStatusMonitor* CSPCipheringStatusMonitor::NewL(
- RMmCustomAPI& aMmCustom, MCSPSecuritySettingObserver& aObs )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPCipheringStatusMonitor::NewL()" );
- CSPCipheringStatusMonitor* self = new ( ELeave ) CSPCipheringStatusMonitor(
- aMmCustom, aObs );
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CSPCipheringStatusMonitor::StartMonitoring
-// Starts ciphering status monitoring
-// -----------------------------------------------------------------------------
-//
-void CSPCipheringStatusMonitor::StartMonitoring()
- {
- if ( !IsActive() )
- {
- if ( !iIsInitialised )
- {
- // Monitor not initialized, get the initial ciphering status
- iMmCustom.GetCipheringInfo( iStatus, iCipheringInfo );
- }
- else
- {
- // Monitor already initialized, monitor changes
- iMmCustom.NotifyCipheringInfoChange( iStatus, iCipheringInfo );
- }
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPINT,
- "CSP: CSPCipheringStatusMonitor::StartMonitoring: \
- not done, already active");
- }
- }
-
-// -----------------------------------------------------------------------------
-// CSPCipheringStatusMonitor::DoCancel
-// Cancels active object requests
-// Method calls CancelAsyncRequest from the CustomaEtel object
-// -----------------------------------------------------------------------------
-//
-void CSPCipheringStatusMonitor::DoCancel()
- {
- CSPLOGSTRING( CSPINT, "CSP: CSPCipheringStatusMonitor::DoCancel" );
-
- if ( IsActive() )
- {
- if( iIsInitialised )
- {
- iMmCustom.CancelAsyncRequest( ECustomNotifyCipheringInfoChangeIPC );
- }
- else
- {
- iMmCustom.CancelAsyncRequest( ECustomGetCipheringInfoIPC );
- }
- }
- }
-
-// -----------------------------------------------------------------------------
-// CPESupplementaryServicesMonitor::RunL
-// Method gets notification from etel that asyncronous request is completed.
-// Method sends possible messages to the owner object and
-// Method makes a new issue request to the CustomEtel.
-// -----------------------------------------------------------------------------
-//
-void CSPCipheringStatusMonitor::RunL()
- {
- CSPLOGSTRING2(CSPINT,
- "CSP: CSPCipheringStatusMonitor::RunL: iStatus: %d", iStatus.Int() );
-
- if ( iStatus == KErrNone )
- {
- TBool secureSpecifiedChanged = iSecureSpecified != iCipheringInfo.iIndStatus;
-
- // Notify only on secure specified status changes
- if ( secureSpecifiedChanged )
- {
- // Is set when secure indicator showing is allowed.
- iSecureSpecified = iCipheringInfo.iIndStatus;
-
- if ( !iSecureSpecified )
- {
- iObserver.SecuritySettingChanged(
- MCSPSecuritySettingObserver::ESecureNotSpecified );
- }
- }
-
- TBool callsSecuredChanged = ( iCallsSecured != iCipheringInfo.iCiphStatus );
-
- // Notify secure status changes only when secure has been specified
- if ( iSecureSpecified && callsSecuredChanged )
- {
- iCallsSecured = iCipheringInfo.iCiphStatus;
-
- if ( iCallsSecured )
- {
- iObserver.SecuritySettingChanged( MCSPSecuritySettingObserver::ESecureCall );
- }
- else
- {
- iObserver.SecuritySettingChanged( MCSPSecuritySettingObserver::ENotSecureCall );
- }
- }
-
- iIsInitialised = ETrue;
- StartMonitoring();
- }
- else
- {
- CSPLOGSTRING( CSPINT,
- "CSPCipheringStatusMonitor::RunL: Ciphering Off MONITOR OFF" );
- }
-
- if ( iStatus == KErrNotFound && !iIsInitialised )
- {
- // Network was not ready while fetching ciphering info
- iIsInitialised = ETrue;
- StartMonitoring();
- CSPLOGSTRING( CSPINT,
- "CALL: CSPCipheringStatusMonitor::RunL: StartMonitoring()" );
- }
- }
-
-// -----------------------------------------------------------------------------
-// CSPCipheringStatusMonitor::NetworkSecurityStatus
-// Network security status.
-// -----------------------------------------------------------------------------
-//
-TBool CSPCipheringStatusMonitor::NetworkSecurityStatus() const
- {
- return iCallsSecured;
- }
-
-// -----------------------------------------------------------------------------
-// CSPCipheringStatusMonitor::SecureSpecified
-// Secure specified status.
-// -----------------------------------------------------------------------------
-//
-TBool CSPCipheringStatusMonitor::SecureSpecified() const
- {
- return iSecureSpecified;
- }
-
-// End of File
-
--- a/convergedcallengine/csplugin/src/cspclientvideocall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,201 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements class CSPClientVideoCall which provides client video call
-* functionality
-*
-*/
-
-
-#include <etelmm.h>
-#include <etel.h>
-#include <mccpcallobserver.h>
-#include <rmmcustomapi.h>
-
-#include "cspclientvideocall.h"
-#include "csplogger.h"
-#include "csppanic.pan"
-#include "cspconsts.h"
-#include "mcspcommoninfo.h"
-
-
-// ---------------------------------------------------------------------------
-// CSPClientVideoCall::NewL Two phased construction.
-// ---------------------------------------------------------------------------
-//
-CSPClientVideoCall* CSPClientVideoCall::NewL( const TDesC& aName,
- RMobileLine& aLine,
- const CCCECallParameters& aParams,
- MCSPCommonInfo& aCommonInfo )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::NewL <<");
-
- CSPClientVideoCall* self = new (ELeave) CSPClientVideoCall( aLine,
- aName, aCommonInfo );
- CleanupStack::PushL( self );
- self->ConstructL( aParams );
- CleanupStack::Pop( self );
- CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::NewL >>");
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVideoCall::~CSPClientVideoCall
-// ---------------------------------------------------------------------------
-//
-CSPClientVideoCall::~CSPClientVideoCall()
- {
- CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::~CSPClientVideoCall");
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVideoCall::NotifyCallStateChanged
-// Notifies observers about state changes
-// ---------------------------------------------------------------------------
-//
-void CSPClientVideoCall::NotifyCallStateChanged(
- MCCPCallObserver::TCCPCallState aState )
- {
- CSPLOGSTRING2(CSPINT,
- "CSPClientVideoCall::NotifyCallStateChanged state: %d",
- aState);
-
- // Client call type is not valid before Dialling state
- if ( aState == MCCPCallObserver::ECCPStateDialling )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::NotifyCallStateChanged\
- updating call type");
-
- CCPCall::TCallType callType = SelectCallTypeFromProtocolCaps();
- iParams->SetCallType( callType );
-
- // Indicate client call to observer in Dialling state
- IndicateClientCall();
- }
-
- CSPVideoCall::NotifyCallStateChanged( aState );
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVideoCall::NotifyCallStateChangedWithInband
-// Notifies observers about state changes
-// ---------------------------------------------------------------------------
-//
-void CSPClientVideoCall::NotifyCallStateChangedWithInband(
- MCCPCallObserver::TCCPCallState aState )
- {
- CSPLOGSTRING2(CSPINT,
- "CSPClientVideoCall::NotifyCallStateChangedWithInband %d", aState);
-
- // Client call type info is not available before Dialling phase
- if ( aState == MCCPCallObserver::ECCPStateDialling )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::NotifyCallStateChanged\
- updating call type");
-
- CCPCall::TCallType callType = SelectCallTypeFromProtocolCaps();
- iParams->SetCallType( callType );
-
- // Indicate client call to observer in Dialling state
- IndicateClientCall();
- }
-
- CSPVideoCall::NotifyCallStateChangedWithInband( aState );
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVideoCall::CSPClientVideoCall
-// ---------------------------------------------------------------------------
-//
-CSPClientVideoCall::CSPClientVideoCall( RMobileLine& aLine,
- const TDesC& aName,
- MCSPCommonInfo& aCommonInfo ) :
- CSPVideoCall( aLine, ETrue, aName,
- aCommonInfo )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::CSPClientVideoCall");
- // Set client call flag(s)
- iClientCallIndicated = EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVideoCall::ConstructL
-// Constructing CSPClientVideoCall for MT call.
-// ---------------------------------------------------------------------------
-//
-void CSPClientVideoCall::ConstructL( const CCCECallParameters& aParams )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::ConstructL <");
- CSPVideoCall::ConstructL( aParams );
- CSPLOGSTRING(CSPOBJECT, "CSPClientVideoCall::ConstructL >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVideoCall::IndicateClientCall
-// Indicate dialling if needed
-// ---------------------------------------------------------------------------
-//
-void CSPClientVideoCall::IndicateClientCall()
- {
- // Can be done only once for each call and possible duplicate
- // notifies are blocked
- if ( !iClientCallIndicated )
- {
- iClientCallIndicated = ETrue;
-
- CSPLOGSTRING(CSPINT,
- "CSPClientVideoCall::IndicateClientCall IndicateClientCall")
-
- iCommonInfo.IndicateClientCall( this );
-
- CSPLOGSTRING(CSPINT,
- "CSPClientVideoCall::IndicateClientCall IndicateClientCall completed")
- }
- else
- {
- CSPLOGSTRING(CSPERROR,
- "CSPClientVideoCall::IndicateClientCall already indicated")
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVideoCall::OpenCallHandleL
-// ---------------------------------------------------------------------------
-//
-void CSPClientVideoCall::OpenCallHandleL()
- {
- CSPLOGSTRING(CSPINT, "CSPClientVideoCall::OpenCallHandleL <");
-
- // Client call, open existing call handle
- OpenExistingCallL( iName );
-
- CSPLOGSTRING(CSPINT, "CSPClientVideoCall::OpenCallHandleL >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVideoCall::UpdateCallInfoImpl
-// Update call info including remote party name and number data
-// ---------------------------------------------------------------------------
-//
-void CSPClientVideoCall::UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo )
- {
- CSPLOGSTRING(CSPINT, "CSPClientVideoCall::UpdateCallInfoImpl <");
-
- // Call was added by ETel monitor, update info accordingly
- UpdateCallNameNumberInfo( aCallInfo, ETrue );
- UpdateCallOrigin( aCallInfo );
-
- CSPLOGSTRING(CSPINT, "CSPClientVideoCall::UpdateCallInfoImpl >");
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspclientvoicecall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements class CSPClientVoiceCall which provides call functionality
-*
-*/
-
-
-#include <etelmm.h>
-#include <etel.h>
-#include <mccpcallobserver.h>
-#include <cccecallparameters.h>
-
-#include "cspclientvoicecall.h"
-#include "csplogger.h"
-#include "csppanic.pan"
-#include "cspconsts.h"
-#include "mcspcommoninfo.h"
-
-
-// ---------------------------------------------------------------------------
-// CSPClientVoiceCall::NewL Two phased construction.
-// ---------------------------------------------------------------------------
-//
-CSPClientVoiceCall* CSPClientVoiceCall::NewL( const TDesC& aName,
- RMobileLine& aLine,
- const CCCECallParameters& aParams,
- MCSPCommonInfo& aCommonInfo )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPClientVoiceCall::NewL <");
-
- CSPClientVoiceCall* self = new ( ELeave ) CSPClientVoiceCall( aLine,
- aName,
- aCommonInfo );
- CleanupStack::PushL( self );
- self->ConstructL( aParams );
- CleanupStack::Pop( self );
- CSPLOGSTRING(CSPOBJECT, "CSPClientVoiceCall::NewL >");
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVoiceCall::~CSPClientVoiceCall
-// ---------------------------------------------------------------------------
-//
-CSPClientVoiceCall::~CSPClientVoiceCall()
- {
- CSPLOGSTRING(CSPOBJECT, "CSPClientVoiceCall::~CSPClientVoiceCall");
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVoiceCall::CSPClientVoiceCall
-// ---------------------------------------------------------------------------
-//
-CSPClientVoiceCall::CSPClientVoiceCall( RMobileLine& aLine,
- const TDesC& aName,
- MCSPCommonInfo& aCommonInfo ):
- CSPVoiceCall( aLine,
- ETrue, aName,
- aCommonInfo, EFalse )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPClientVoiceCall::CSPClientVoiceCall");
-
- // Set client call flag(s)
- iClientCallIndicated = EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVoiceCall::ConstructL
-// Constructing CSPClientVoiceCall for MT call.
-// ---------------------------------------------------------------------------
-//
-void CSPClientVoiceCall::ConstructL( const CCCECallParameters& aParams )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPClientVoiceCall::ConstructL <");
- CSPVoiceCall::ConstructL( aParams );
- CSPLOGSTRING(CSPOBJECT, "CSPClientVoiceCall::ConstructL >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVoiceCall::NotifyCallStateChanged
-// Notifies observers about state changes
-// ---------------------------------------------------------------------------
-//
-void CSPClientVoiceCall::NotifyCallStateChanged(
- MCCPCallObserver::TCCPCallState aState )
- {
- CSPLOGSTRING2(CSPINT,
- "CSPClientVoiceCall::NotifyCallStateChanged state: %d",
- aState);
-
- // Client call is indicated during dialling state
- if ( aState == MCCPCallObserver::ECCPStateDialling )
- {
- IndicateClientCall();
- }
-
- CSPVoiceCall::NotifyCallStateChanged( aState );
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVoiceCall::NotifyCallStateChangedWithInband
-// Notifies observers about state changes
-// ---------------------------------------------------------------------------
-//
-void CSPClientVoiceCall::NotifyCallStateChangedWithInband(
- MCCPCallObserver::TCCPCallState aState )
- {
- CSPLOGSTRING2(CSPINT,
- "CSPClientVoiceCall::NotifyCallStateChangedWithInband state: %d",
- aState);
-
- // Client call is indicated during dialling state
- if ( aState == MCCPCallObserver::ECCPStateDialling )
- {
- IndicateClientCall();
- }
-
- CSPVoiceCall::NotifyCallStateChangedWithInband( aState );
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVoiceCall::IndicateClientCall
-// Indicate dialling if needed
-// ---------------------------------------------------------------------------
-//
-void CSPClientVoiceCall::IndicateClientCall()
- {
- // Can be done only once for each call and possible duplicate
- // notifies are blocked
- if ( !iClientCallIndicated )
- {
- iClientCallIndicated = ETrue;
-
- CSPLOGSTRING(CSPINT,
- "CSPClientVoiceCall::IndicateClientCall indicate client call")
-
- iCommonInfo.IndicateClientCall( this );
-
- CSPLOGSTRING(CSPINT,
- "CSPClientVoiceCall::IndicateClientCall IndicateClientCall completed")
- }
- else
- {
- CSPLOGSTRING(CSPERROR,
- "CSPClientVoiceCall::IndicateClientCall already indicated")
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVoiceCall::OpenCallHandleL
-// ---------------------------------------------------------------------------
-//
-void CSPClientVoiceCall::OpenCallHandleL()
- {
- CSPLOGSTRING(CSPINT, "CSPClientVoiceCall::OpenCallHandleL <");
-
- // Client call, open existing call handle
- OpenExistingCallL( iName );
-
- CSPLOGSTRING(CSPINT, "CSPClientVoiceCall::OpenCallHandleL >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPClientVoiceCall::UpdateCallInfoImpl
-// Update call info including remote party name and number data
-// ---------------------------------------------------------------------------
-//
-void CSPClientVoiceCall::UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo )
- {
- CSPLOGSTRING(CSPINT, "CSPClientVoiceCall::UpdateCallInfoImpl <");
-
- // Call was added by ETel monitor, update info accordingly
- UpdateCallNameNumberInfo( aCallInfo, ETrue );
- UpdateCallOrigin( aCallInfo );
-
- CSPLOGSTRING(CSPINT, "CSPClientVoiceCall::UpdateCallInfoImpl >");
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspconferencecall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,623 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements class CSPConferenceCall which provides call functionality
-*
-*/
-
-
-
-#include <etelmm.h>
-#include <etel.h>
-#include <mccpcall.h>
-
-#include "cspconferencecall.h"
-#include "cspvoicecall.h"
-#include "cspetelconferencecallrequester.h"
-#include "cspetelconferenceeventmonitor.h"
-#include "cspetelconferencestatusmonitor.h"
-#include "cspetelconferencecapsmonitor.h"
-#include "mcspcallinformation.h"
-#include "csplogger.h"
-#include "csppanic.pan"
-#include "cspconsts.h"
-
-
-// ---------------------------------------------------------------------------
-// CSPConferenceCall::NewL
-// ---------------------------------------------------------------------------
-//
-CSPConferenceCall* CSPConferenceCall::NewL(
- RMobilePhone& aPhone,
- MCSPCallInformation& aCallInfo,
- TUint32 aServiceId )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::NewL()");
-
- CSPConferenceCall* self = new ( ELeave ) CSPConferenceCall( aPhone,
- aCallInfo, aServiceId );
- CleanupStack::PushL( self );
- self->ConstructL( );
- CleanupStack::Pop( self );
- CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::NewL() end");
- return self;
- }
-
-// --------------------------------------------------------ß-------------------
-// CSPConferenceCall::~CSPConferenceCall
-// ---------------------------------------------------------------------------
-//
-CSPConferenceCall::~CSPConferenceCall()
- {
- CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::~CSPConferenceCall() start");
- iObservers.Close();
-
- delete iCallStatusMonitor;
- delete iCallEventMonitor;
- delete iCallCapsMonitor;
- delete iRequester;
- iCall.Close();
-
- CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::~CSPConferenceCall() end");
- }
-
-// ---------------------------------------------------------------------------
-// CSPConferenceCall::NotifyEvent
-// Conference event forwarding.
-// This way Added, Removed and Split events are notified.
-// ---------------------------------------------------------------------------
-//
-void CSPConferenceCall::NotifyEvent(
- MCCPConferenceCallObserver::TCCPConferenceCallEvent aEvent,
- TName& aCallName )
- {
- CSPLOGSTRING2( CSPINT, "CSPConferenceCall::NotifyEvent < %d", aEvent );
-
- CSPCall* call = iCallInfo.FindCall( aCallName );
- TInt count = iObservers.Count();
- for ( TInt i = 0; i < count; i++ )
- {
- MCCPConferenceCallObserver *obs = iObservers[i];
- if ( obs )
- {
- obs->ConferenceCallEventOccurred( aEvent, call );
- }
- }
- CSPLOGSTRING2( CSPINT, "CSPConferenceCall::NotifyEvent > %d", aEvent );
- }
-
-// ---------------------------------------------------------------------------
-// CSPConferenceCall::NotifyEvent
-// Conference event forwarding in case of Terminated, Built or Swapped events.
-// These events are not call specific.
-// ---------------------------------------------------------------------------
-//
-void CSPConferenceCall::NotifyEvent(
- MCCPConferenceCallObserver::TCCPConferenceCallEvent aEvent )
- {
- CSPLOGSTRING2( CSPINT, "CSPConferenceCall::NotifyEvent < %d", aEvent );
-
- TInt count = iObservers.Count();
- for ( TInt i = 0; i < count; i++ )
- {
- MCCPConferenceCallObserver *obs = iObservers[i];
- if ( obs )
- {
- obs->ConferenceCallEventOccurred( aEvent, NULL );
- }
- }
-
- CSPLOGSTRING2( CSPINT, "CSPConferenceCall::NotifyEvent > %d", aEvent );
- }
-
-// ---------------------------------------------------------------------------
-// CSPConferenceCall::NotifyStateChanged
-// Conference state change forwarding
-// ---------------------------------------------------------------------------
-//
-void CSPConferenceCall::NotifyStateChange(
- MCSPConferenceStatusObserver::TCSPConferenceState aStatus )
- {
- CSPLOGSTRING3( CSPINT, "CSPConferenceCall::NotifyStateChange %d this: %x", aStatus,
- this );
- iCallState = static_cast<MCCPConferenceCallObserver::TCCPConferenceCallState>(aStatus);
- if ( aStatus == MCSPConferenceStatusObserver::ECSPConferenceIdle )
- {
- iCallCountForAddCall = 0;
- }
- else
- {
- if ( iCallCountForAddCall == 1 )
- {
- iCallCountForAddCall++;
- }
- }
-
- TInt count = iObservers.Count();
- for ( TInt i = 0; i < count; i++ )
- {
- MCCPConferenceCallObserver *obs = iObservers[i];
- if ( obs )
- {
- obs->ConferenceCallStateChanged(
- static_cast<MCCPConferenceCallObserver::TCCPConferenceCallState>(aStatus) );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPConferenceCall::ConferenceCapsChanged
-// ---------------------------------------------------------------------------
-//
-void CSPConferenceCall::ConferenceCapsChanged( TUint32 aCaps )
- {
- CSPLOGSTRING2( CSPINT, "CSPConferenceCall::ConferenceCapsChanged %b", aCaps );
-
- TInt count = iObservers.Count();
- for ( TInt i = 0; i < count; i++ )
- {
- MCCPConferenceCallObserver *obs = iObservers[i];
- if ( obs )
- {
- obs->ConferenceCallCapsChanged(
- (MCCPConferenceCallObserver::TCCPConferenceCallCaps) aCaps );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPConferenceCall::NotifyConferenceError
-// ---------------------------------------------------------------------------
-//
-void CSPConferenceCall::NotifyConferenceError( TCCPConferenceCallError aErr )
- {
- CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::NotifyConferenceError < %d", aErr );
-
- TInt count = iObservers.Count();
- for ( TInt i = 0; i < count; i++ )
- {
- MCCPConferenceCallObserver *obs = iObservers[i];
- if ( obs )
- {
- obs->ErrorOccurred( aErr );
- }
- }
-
- CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::NotifyConferenceError > %d", aErr );
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPConferenceCall
-// CSPConferenceCall::AddCall
-// ---------------------------------------------------------------------------
-//
-void CSPConferenceCall::AddCallL( MCCPCall* aCall )
- {
- CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::AddCallL " );
-
- TInt err(KErrNone);
-
- if ( aCall )
- {
- iCallCountForAddCall++;
- CSPLOGSTRING2( CSPINT, "CSPConferenceCall::AddCallL calls added %d",
- iCallCountForAddCall );
-
- if ( iCallCountForAddCall < 2 )
- {
- CSPLOGSTRING2( CSPINT,
- "CSPConferenceCall::AddCallL DO NOTHING SINCE CALL COUNT IS %d", iCallCountForAddCall );
- }
- else if ( iCallCountForAddCall == 2 )
- {
- err = iRequester->MakeRequest(
- CSPEtelConferenceCallRequester::
- EConferenceRequestTypeCreateConference );
- }
- else if ( iCallCountForAddCall > 2 )
- {
- CSPLOGSTRING( CSPINT, "CSPConferenceCall::AddCall cast call");
- CSPCall* cspCall = static_cast< CSPCall* > ( aCall );
-
- iAddedCallName.Zero();
- cspCall->CallName( iAddedCallName );
- CSPLOGSTRING2( CSPINT, "CSPConferenceCall::AddCall n=%S", &iAddedCallName );
- err = iRequester->MakeAddCallRequest( iAddedCallName );
- CSPLOGSTRING2( CSPINT,
- "CSPConferenceCall::AddCallL result %d", err);
- }
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSPConferenceCall::AddCallL Invalid argument, call NULL" );
-
- err = KErrArgument;
- }
-
- CSPLOGSTRING2( CSPINT, "CSPConferenceCall::AddCallL returning %d", err);
-
- User::LeaveIfError( err );
-
- CSPLOGSTRING( CSPINT, "CSPConferenceCall::AddCallL OK" );
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPConferenceCall
-// CSPConferenceCall::RemoveCallL
-// ---------------------------------------------------------------------------
-//
-void CSPConferenceCall::RemoveCallL( MCCPCall* aCall )
- {
- CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::RemoveCallL " );
- if ( aCall )
- {
- User::LeaveIfError( aCall->HangUp() );
- CSPLOGSTRING( CSPINT, "CSPConferenceCall::RemoveCallL Hangup request sent" );
- }
- else
- {
- CSPLOGSTRING( CSPERROR, "CSPConferenceCall::RemoveCallL Invalid argument" );
- User::Leave( KErrArgument );
- }
-
- CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::RemoveCallL end" );
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPConferenceCall
-// CSPConferenceCall::CallCount
-// ---------------------------------------------------------------------------
-//
-TInt CSPConferenceCall::CallCount( ) const
- {
- CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::CallCount" );
- TInt callCount(0);
- TInt err = iCall.EnumerateCalls( callCount );
- CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::CallCount end" );
- return callCount;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPConferenceCall
-// CSPConferenceCall::GoOneToOneL
-// ---------------------------------------------------------------------------
-//
-void CSPConferenceCall::GoOneToOneL( MCCPCall& aCall )
- {
- CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::GoOneToOneL " );
-
- if ( aCall.Parameters().CallType() == CCPCall::ECallTypeCSVoice )
- {
- CSPVoiceCall& voiceCall = static_cast< CSPVoiceCall& > ( aCall );
- TInt err = voiceCall.GoOneToOne();
- CSPLOGSTRING2( CSPREQIN, "CSPConferenceCall::GoOneToOneL Request %d",
- err );
- User::LeaveIfError( err );
- }
- else
- {
- CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::GoOneToOneL ERROR NOT VOICE CALL" );
- User::Leave( KErrNotSupported );
- }
- CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::GoOneToOneL end" );
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPConferenceCall
-// CSPConferenceCall::ServiceId
-// ---------------------------------------------------------------------------
-//
-TUint32 CSPConferenceCall::ServiceId() const
- {
- CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::ServiceId " );
- return iServiceId;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPConferenceCall::HangUp
-// ---------------------------------------------------------------------------
-//
-TInt CSPConferenceCall::HangUp()
- {
- CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::HangUp " );
- TInt err(KErrNone);
-
- err = iRequester->MakeRequest(
- CSPEtelConferenceCallRequester::EConferenceRequestTypeHangup );
- if ( err )
- {
- CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::HangUp error %d", err );
- }
-
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPConferenceCall::Hold
-// ---------------------------------------------------------------------------
-//
-TInt CSPConferenceCall::Hold()
- {
- CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::Hold call" );
-
- TInt err( KErrNone );
-
- if ( iCallState == MCCPConferenceCallObserver::ECCPConferenceActive )
- {
- CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::Hold > RMobileConferenceCall::Hold" );
-
- err = iRequester->MakeRequest(
- CSPEtelConferenceCallRequester::EConferenceRequestTypeHold );
- if ( err != KErrNone )
- {
- CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::Hold error: %d",
- err );
- }
- }
- else
- {
- CSPLOGSTRING2( CSPERROR,
- "CSPConferenceCall::Hold : invalid state %d",
- iCallState );
- err = KErrNotReady;
- }
-
-
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPConferenceCall::Resume
-// ---------------------------------------------------------------------------
-//
-TInt CSPConferenceCall::Resume()
- {
- CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::Resume " );
-
- TInt err( KErrNone );
-
- if ( iCallState == MCCPConferenceCallObserver::ECCPConferenceHold )
- {
- CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::Resume " );
- err = iRequester->MakeRequest(
- CSPEtelConferenceCallRequester::EConferenceRequestTypeResume );
- if ( KErrNone != err )
- {
- CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::Resume Error %d",
- err );
- }
-
- }
- else
- {
- CSPLOGSTRING2( CSPERROR,
- "CSPConferenceCall::Resume : invalid state %d",
- iCallState );
- err = KErrNotReady;
- }
-
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPConferenceCall::Swap
-// ---------------------------------------------------------------------------
-//
-TInt CSPConferenceCall::Swap()
- {
- CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::Swap " );
- TInt err(KErrNone);
-
- if ( iCallState == MCCPConferenceCallObserver::ECCPConferenceActive
- || iCallState == MCCPConferenceCallObserver::ECCPConferenceHold )
- {
- err = iRequester->MakeRequest(
- CSPEtelConferenceCallRequester::EConferenceRequestTypeSwap );
- if ( err != KErrNone )
- {
- CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::Swap Request error: %d", err );
- }
- }
- else
- {
- err = KErrNotReady;
- CSPLOGSTRING2( CSPERROR,
- "CSPConferenceCall::Swap Invalid state %d",
- iCallState );
- }
-
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPConferenceCall
-// CSPConferenceCall::CurrentCallsToConferenceL
-// ---------------------------------------------------------------------------
-//
-void CSPConferenceCall::CurrentCallsToConferenceL()
- {
- CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::CurrentCallsToConferenceL " );
- iRequester->MakeRequest(
- CSPEtelConferenceCallRequester::EConferenceRequestTypeCreateConference );
- CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::CurrentCallsToConferenceL end" );
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPConferenceCall
-// CSPConferenceCall::GetCallArray
-// ---------------------------------------------------------------------------
-//
-TInt CSPConferenceCall::GetCallArray( RPointerArray<MCCPCall>& aCallArray )
- {
- CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::GetCallArray" );
- // Reset array in case
- aCallArray.Reset();
- TInt err( KErrNone );
-
- RMobileCall::TMobileCallInfoV3 callInfo;
- RMobileCall::TMobileCallInfoV3Pckg callInfoPck( callInfo );
-
- TInt callCount = CallCount();
- CSPCall* call;
-
- // Resolve call objects that are part of the conference
- for ( int i = 0; i < callCount; i++ )
- {
- err = iCall.GetMobileCallInfo( i, callInfoPck );
-
- if ( KErrNone == err )
- {
- // Find call by call name
- call = iCallInfo.FindCall( callInfo.iCallName);
- if ( call )
- {
- err = aCallArray.Append( call );
- }
- else
- {
- err = KErrNotFound;
- }
- }
- CSPLOGSTRING2( CSPERROR, "CSPConferenceCall::GetCallArray err: %d", err );
- }
-
- CSPLOGSTRING( CSPREQOUT, "CSPConferenceCall::GetCallArray end");
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// Adds observer.
-// ---------------------------------------------------------------------------
-//
-void CSPConferenceCall::AddObserverL( const MCCPConferenceCallObserver& aObserver )
- {
- if ( iObservers.Find( &aObserver ) == KErrNotFound )
- {
- iObservers.Append( &aObserver );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Removes given observer.
-// ---------------------------------------------------------------------------
-//
-TInt CSPConferenceCall::RemoveObserver( const MCCPConferenceCallObserver& aObserver )
- {
- CSPLOGSTRING( CSPREQIN, "CSPConferenceCall::RemoveObserver " );
- TInt found = iObservers.Find( &aObserver );
- if ( found != KErrNotFound )
- {
- iObservers.Remove( found );
- return KErrNone;
- }
-
- return found;
- }
-
-// ---------------------------------------------------------------------------
-// CSPConferenceCall::GetConferenceCallState
-// ---------------------------------------------------------------------------
-//
-TInt CSPConferenceCall::GetConferenceCallState(
- MCCPConferenceCallObserver::TCCPConferenceCallState& aState )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::GetConferenceCallState()");
- RMobileConferenceCall::TMobileConferenceStatus status;
- TInt err = iCall.GetConferenceStatus( status );
-
- switch( status )
- {
- case RMobileConferenceCall::EConferenceIdle:
- {
- aState = MCCPConferenceCallObserver::ECCPConferenceIdle;
- break;
- }
- case RMobileConferenceCall::EConferenceActive:
- {
- aState = MCCPConferenceCallObserver::ECCPConferenceActive;
- break;
- }
- case RMobileConferenceCall::EConferenceHold:
- {
- aState = MCCPConferenceCallObserver::ECCPConferenceHold;
- break;
- }
- default:
- break;
- }
-
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// CSPConferenceCall::CSPConferenceCall
-// ---------------------------------------------------------------------------
-//
-CSPConferenceCall::CSPConferenceCall( RMobilePhone& aPhone,
- MCSPCallInformation& aCallInfo,
- TUint32 aServiceId ) :
- iPhone( aPhone ),
- iRequester( NULL ),
- iCallInfo( aCallInfo ),
- iServiceId( aServiceId )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::CSPConferenceCall()");
- }
-
-// ---------------------------------------------------------------------------
-// CSPConferenceCall::ConstructL
-// Constructing CSPConferenceCall for MT call.
-// ---------------------------------------------------------------------------
-//
-void CSPConferenceCall::ConstructL( )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::ConstructL() start");
- User::LeaveIfError( iCall.Open(iPhone) );
-
- iCall.EnumerateCalls( iCallCountForAddCall );
- CSPLOGSTRING2(CSPERROR, "CSPConferenceCall::Initialize() Call count : %d",
- iCallCountForAddCall );
-
- MCCPConferenceCallObserver::TCCPConferenceCallState conferenceState;
- TInt err = GetConferenceCallState( conferenceState );
-
- if ( KErrNone == err )
- {
- iCallState = conferenceState;
- CSPLOGSTRING2(CSPINT, "CSPConferenceCall::Initialize() State : %d", iCallState );
- }
- else
- {
- iCallState = MCCPConferenceCallObserver::ECCPConferenceIdle;
- CSPLOGSTRING2(CSPERROR,
- "CSPConferenceCall::Initialize() state fetching error %d", err );
- }
-
- // Start Etel monitors
- iCallEventMonitor = CSPEtelConferenceEventMonitor::NewL( *this, iCall );
- iCallEventMonitor->StartMonitoring();
- iCallStatusMonitor = CSPEtelConferenceStatusMonitor::NewL( *this, iCall );
- iCallStatusMonitor->StartMonitoring();
- iCallCapsMonitor = CSPEtelConferenceCapsMonitor::NewL( *this, iCall );
- iCallCapsMonitor->StartMonitoring();
-
- iRequester = CSPEtelConferenceCallRequester::NewL( *this, iCall );
- CSPLOGSTRING(CSPOBJECT, "CSPConferenceCall::ConstructL() end");
- }
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspdevsound.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,209 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Wrapper for CMMFDevSound
-*
-*/
-
-
-#include "cspdevsound.h"
-#include "csplogger.h"
-#include "mcspdevsoundobserver.h"
-
-#include <AudioPreference.h>
-#include <S60FourCC.h>
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// CSPDevSound
-// ---------------------------------------------------------------------------
-//
-CSPDevSound::CSPDevSound( MCSPDevSoundObserver& aObserver ) :
- iObserver( aObserver )
- {
- }
-
-// ---------------------------------------------------------------------------
-// ConstructL
-// ---------------------------------------------------------------------------
-//
-void CSPDevSound::ConstructL(
- TMMFState aMode,
- TUint aAudioPreference,
- TUint aAudioPriority )
- {
- CSPLOGSTRING( CSPINT, "CSPDevSound::ConstructL; Entry" );
-
- TFourCC modemFourCC;
- modemFourCC.Set(KS60FourCCCodeModem);
-
- iDevSound = CMMFDevSound::NewL();
-#ifndef __WINSCW__
- iDevSound->InitializeL( *this, modemFourCC, aMode );
-#endif
- iPrioritySettings.iPriority = aAudioPriority;
- iPrioritySettings.iPref =
- static_cast<TMdaPriorityPreference>( aAudioPreference );
- iPrioritySettings.iState = aMode;
- CSPLOGSTRING( CSPINT, "CSPDevSound::ConstructL; Exit" );
- }
-
-// ---------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
-// ---------------------------------------------------------------------------
-//
-CSPDevSound::~CSPDevSound()
- {
- delete iDevSound;
- }
-
-// ---------------------------------------------------------------------------
-// Tries to activate the audio stream if not active or activating
-// ---------------------------------------------------------------------------
-//
-void CSPDevSound::Activate()
- {
- CSPLOGSTRING( CSPINT, "CSPDevSound::Activate" );
- if( !IsActive() && !IsActivationOngoing() )
- {
- iActivationOngoing = ETrue;
- TInt err = KErrNone;
- TRAP( err, DoActivateL() );
- CSPLOGSTRING2( CSPINT, "CSPDevSound::Activate %d", err );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Deactivates the audio device.
-// ---------------------------------------------------------------------------
-//
-void CSPDevSound::Deactivate()
- {
- CSPLOGSTRING( CSPINT, "CSPDevSound::Deactivate" );
- if( IsActive() || IsActivationOngoing() )
- {
- CSPLOGSTRING( CSPINT, "CSPDevSound::Deactivate Stopping" );
- iDevSound->Stop();
- iActive = EFalse;
- iActivationOngoing = EFalse;
- }
- }
-
-// ---------------------------------------------------------------------------
-// ActivationOngoing
-// ---------------------------------------------------------------------------
-//
-TBool CSPDevSound::IsActivationOngoing() const
- {
- return iActivationOngoing;
- }
-
-// ---------------------------------------------------------------------------
-// IsActive
-// ---------------------------------------------------------------------------
-//
-TBool CSPDevSound::IsActive() const
- {
- return iActive;
- }
-
-CMMFDevSound& CSPDevSound::DevSound()
- {
- return *iDevSound;
- }
-
-// ---------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
-// ---------------------------------------------------------------------------
-//
-void CSPDevSound::InitializeComplete( TInt aError )
- {
- CSPLOGSTRING( CSPINT, "CSPDevSound::InitializeComplete" );
- if( aError == KErrNone )
- {
- iDevSound->SetPrioritySettings( iPrioritySettings );
-
- }
-
- }
-
-// ---------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
-// ---------------------------------------------------------------------------
-//
-void CSPDevSound::BufferToBeFilled( CMMFBuffer* /*aBuffer*/ )
- {
- }
-
-// ---------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
-// ---------------------------------------------------------------------------
-//
-void CSPDevSound::PlayError( TInt /*aError*/ )
- {
- }
-
-// ---------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
-// ---------------------------------------------------------------------------
-//
-void CSPDevSound::ToneFinished( TInt /*aError*/ )
- {
- }
-
-// ---------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
-// ---------------------------------------------------------------------------
-//
-void CSPDevSound::BufferToBeEmptied( CMMFBuffer* /*aBuffer*/ )
- {
- }
-
-// ---------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
-// ---------------------------------------------------------------------------
-//
-void CSPDevSound::RecordError( TInt /*aError*/ )
- {
- }
-
-// ---------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
-// ---------------------------------------------------------------------------
-//
-void CSPDevSound::ConvertError( TInt /*aError*/ )
- {
- }
-
-// ---------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Not implemented
-// ---------------------------------------------------------------------------
-//
-void CSPDevSound::DeviceMessage(
- TUid /*aMessageType*/,
- const TDesC8& /*aMsg*/ )
- {
- }
-
-// End of File
-
--- a/convergedcallengine/csplugin/src/cspdtmfprovider.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,261 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Contains the implementation of class CSPDTMFProvider
-*
-*/
-
-
-#include <etelmm.h>
-#include <mccpdtmfprovider.h>
-#include <mccpdtmfobserver.h>
-#include <rmmcustomapi.h>
-
-#include "cspdtmfprovider.h"
-#include "csplogger.h"
-#include "cspeteldtmfmonitor.h"
-#include "cspeteldtmfstopmonitor.h"
-
-CSPDTMFProvider* CSPDTMFProvider::NewL( RMobilePhone& aPhone,
- RMmCustomAPI& aMmCustom )
- {
- CSPDTMFProvider* self = new ( ELeave ) CSPDTMFProvider( aPhone,
- aMmCustom );
- CleanupStack::PushL( self );
- self->ConstructL( );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor of the object.
-// ---------------------------------------------------------------------------
-//
-CSPDTMFProvider::~CSPDTMFProvider( )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPDTMFProvider::~CSPDTMFProvider()" );
- Cancel();
- iObservers.Close();
- delete iMonitor;
- delete iStopMonitor;
- }
-
-// ---------------------------------------------------------------------------
-// Notifies observers about a DTMF event
-// ---------------------------------------------------------------------------
-//
-void CSPDTMFProvider::NotifyDTMFEvent( const MCCPDTMFObserver::TCCPDtmfEvent aEvent,
- const TInt aError,
- const TChar aTone )
- {
- CSPLOGSTRING2(CSPINT, "CSPDTMFProvider::NotifyDTMFEvent %d", aEvent );
- for ( TInt i = 0; i < iObservers.Count(); i++ )
- {
- MCCPDTMFObserver *obs = iObservers[i];
- if ( obs )
- {
- iObservers[i]->HandleDTMFEvent( aEvent, aError, aTone );
- }
- }
- }
-
-
-// ---------------------------------------------------------------------------
-// Cancel DTMF string sending
-// ---------------------------------------------------------------------------
-//
-TInt CSPDTMFProvider::CancelDtmfStringSending()
- {
- CSPLOGSTRING(CSPREQIN, "CSPDTMFProvider::CancelDtmfStringSending" );
- if ( IsActive() )
- {
- Cancel();
- }
- else
- {
- return KErrAlreadyExists; // Is not active
- }
-
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// Starts DTMF string sending
-// ---------------------------------------------------------------------------
-//
-TInt CSPDTMFProvider::StartDtmfTone( const TChar aTone )
- {
- CSPLOGSTRING(CSPREQIN, "CSPDTMFProvider::StartDtmfTone" );
- TInt ret(KErrAlreadyExists);
- if (!IsActive())
- {
- ret = iPhone.StartDTMFTone( aTone );
- }
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// Stop DTMF tone
-// ---------------------------------------------------------------------------
-//
-TInt CSPDTMFProvider::StopDtmfTone()
- {
- CSPLOGSTRING(CSPREQIN, "CSPDTMFProvider::StopDtmfTone" );
- TInt ret(KErrAlreadyExists);
- if (!IsActive())
- {
- ret = iPhone.StopDTMFTone();
- }
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// Send DTMF string
-// ---------------------------------------------------------------------------
-//
-TInt CSPDTMFProvider::SendDtmfToneString( const TDesC& aString )
- {
- CSPLOGSTRING(CSPREQIN, "CSPDTMFProvider::SendDtmfToneString" );
- TInt ret = KErrInUse;
-
- if ( !IsActive() )
- {
- iPhone.SendDTMFTones( iStatus, aString );
- SetActive();
- ret = KErrNone;
- }
-
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// Continue DTMF string sending
-// ---------------------------------------------------------------------------
-//
-TInt CSPDTMFProvider::ContinueDtmfStringSending( const TBool aContinue )
- {
- CSPLOGSTRING(CSPREQIN, "CSPDTMFProvider::ContinueDtmfStringSending" );
- return iPhone.ContinueDTMFStringSending( aContinue );
- }
-
-// ---------------------------------------------------------------------------
-// Adds observer.
-// ---------------------------------------------------------------------------
-//
-void CSPDTMFProvider::AddObserverL( const MCCPDTMFObserver& aObserver )
- {
- if ( iObservers.Find( &aObserver ) == KErrNotFound )
- {
- iObservers.Append( &aObserver );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Removes given observer.
-// ---------------------------------------------------------------------------
-//
-TInt CSPDTMFProvider::RemoveObserver( const MCCPDTMFObserver& aObserver )
- {
- TInt ret = KErrNotFound;
-
- TInt found = iObservers.Find( &aObserver );
- if ( found != KErrNotFound )
- {
- iObservers.Remove( found );
- ret = KErrNone;
- }
-
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// From CActive.
-// Handles request completion.
-// ---------------------------------------------------------------------------
-//
-void CSPDTMFProvider::RunL()
- {
- CSPLOGSTRING2( CSPREQIN,
- "CSPDTMFProvider::RunL: status: %d", iStatus.Int() );
-
- if ( iStatus == KErrNone )
- {
- MCCPDTMFObserver::TCCPDtmfEvent event =
- MCCPDTMFObserver::ECCPDtmfStringSendingCompleted;
- NotifyDTMFEvent( event, KErrNone, NULL );
- }
- else
- {
- TInt error = iStatus.Int();
- if ( error != KErrCancel )
- {
- MCCPDTMFObserver::TCCPDtmfEvent event =
- MCCPDTMFObserver::ECCPDtmfStringSendingCompleted;
- NotifyDTMFEvent( event, error, NULL );
- }
- else
- {
- // Cancel is not notified
- CSPLOGSTRING( CSPREQEND, "CSPDTMFProvider::RunL Cancel." );
- }
- }
-
- CSPLOGSTRING( CSPREQEND, "CSPDTMFProvider::RunL End of RunL." );
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Canceling functionality.
-// ---------------------------------------------------------------------------
-//
-void CSPDTMFProvider::DoCancel()
- {
- if ( iStatus == KRequestPending )
- {
- CSPLOGSTRING( CSPINT,
- "CSPDTMFProvider::DoCancel Canceling pending request.." );
- iPhone.CancelAsyncRequest( EMobilePhoneSendDTMFTones );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the requester.
-// ---------------------------------------------------------------------------
-//
-CSPDTMFProvider::CSPDTMFProvider( RMobilePhone& aPhone,
- RMmCustomAPI& aMmCustom ):
- CActive( EPriorityStandard ),
- iPhone( aPhone ),
- iMmCustom( aMmCustom )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPDTMFProvider::CSPDTMFProvider()" );
- CActiveScheduler::Add( this );
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the requester in the second phase.
-// ---------------------------------------------------------------------------
-//
-void CSPDTMFProvider::ConstructL( )
- {
- if ( !iPhone.SubSessionHandle() || !iMmCustom.SubSessionHandle() )
- {
- User::Leave( KErrArgument );
- }
- iMonitor = CSPEtelDtmfMonitor::NewL( *this, iMmCustom );
- iMonitor->StartMonitoring();
- iStopMonitor = CSPEtelDtmfStopMonitor::NewL( *this, iPhone );
- iStopMonitor->StartMonitoring();
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspetelcallcapsmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of class CSPEtelCallCapsMonitor which
-* monitors call status changes from ETel and notifies observer
-* according to call status change.
-*
-*/
-
-
-#include "cspetelcallcapsmonitor.h"
-
-#include <mccpcallobserver.h>
-
-#include "mcspcallobserver.h"
-#include "csplogger.h"
-
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor in two phase.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallCapsMonitor* CSPEtelCallCapsMonitor::NewL(
- MCSPCallObserver& aObserver,
- RMobileCall& aCall )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelCallCapsMonitor::NewL()" );
- CSPEtelCallCapsMonitor* self =
- new ( ELeave ) CSPEtelCallCapsMonitor(
- aObserver, aCall );
- return self;
- }
-
-
-// ---------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallCapsMonitor::~CSPEtelCallCapsMonitor( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelCallCapsMonitor::~CSPEtelCallCapsMonitor()" );
- Cancel();
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelCallCapsMonitor::~CSPEtelCallCapsMonitor() ok" );
-
- }
-
-
-// ---------------------------------------------------------------------------
-// Starts the monitoring.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallCapsMonitor::StartMonitoring()
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelCallCapsMonitor::StartMonitoring()" );
-
-
- if ( !IsActive() )
- {
- CSPLOGSTRING( CSPREQOUT,
- "CSPEtelCallCapsMonitor::StartMonitoring: Request \
- RMobilePhone::NotifyCapsChange" );
- iCall.NotifyMobileCallCapsChange( iStatus, iCapsPckg );
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSPEtelCallCapsMonitor::StartMonitoring: Already active" );
- }
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Handles call status notifying.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallCapsMonitor::RunL()
- {
- CSPLOGSTRING2( CSPREQEND,
- "CSPEtelCallCapsMonitor::RunL: status: %d", iStatus.Int() );
-
- if ( iStatus == KErrNone )
- {
- TUint32 capsFlags = iCaps.iCallControlCaps;
-
- iObserver.CallCapsChanged( capsFlags );
- StartMonitoring();
- }
-
- }
-
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Canceling functionality.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallCapsMonitor::DoCancel()
- {
- iCall.CancelAsyncRequest( EMobileCallNotifyMobileCallCapsChange );
- }
-
-
-
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor..
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallCapsMonitor::CSPEtelCallCapsMonitor( MCSPCallObserver& aObserver,
- RMobileCall& aCall ) :
- CActive( EPriorityStandard ),
- iObserver( aObserver ),
- iCall ( aCall ),
- iCapsPckg( iCaps )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelCallCapsMonitor::CSPEtelCallCapsMonitor()" );
- CActiveScheduler::Add( this );
- }
-
-
-TUint32 CSPEtelCallCapsMonitor::FetchCallControlCapsL()
- {
- TInt err = iCall.GetMobileCallCaps( iCapsPckg );
- User::LeaveIfError( err );
- return iCaps.iCallControlCaps;
- }
-
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspetelcalleventmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,291 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of class CSPEtelCallEventMonitor which
-* monitors call events from ETel and notifies observer
-* accordingly.
-*
-*/
-
-
-#include <mccptransferobserver.h>
-#include <mccpforwardobserver.h>
-#include <mccpconferencecallobserver.h>
-
-#include "cspetelcalleventmonitor.h"
-#include "csplogger.h"
-#include "cspcall.h"
-
-
-
-// ---------------------------------------------------------------------------
-// CSPEtelCallEventMonitor::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallEventMonitor* CSPEtelCallEventMonitor::NewL( MCSPCallObserver& aObserver,
- RMobileCall& aCall )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelCallEventMonitor::NewL()" );
- CSPEtelCallEventMonitor* self = new ( ELeave ) CSPEtelCallEventMonitor(
- aObserver, aCall );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallEventMonitor::~CSPEtelCallEventMonitor( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelCallEventMonitor::~CSPEtelCallEventMonitor()" );
- Cancel();
-
- if ( iDestrPtr )
- {
- *iDestrPtr = ETrue;
- iDestrPtr = NULL;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Starts the monitoring.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallEventMonitor::StartMonitoring()
- {
- CSPLOGSTRING( CSPINT, "CSPEtelCallEventMonitor::StartMonitoring" );
-
- if ( !IsActive() )
- {
- CSPLOGSTRING( CSPREQOUT,
- "CSP: CSPEtelCallEventMonitor::StartMonitoring: \
- Request RMobilePhone::NotifyCallEvent" );
- iCall.NotifyCallEvent( iStatus, iCallEvent );
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPEtelCallEventMonitor::StartMonitoring: Already active" );
- }
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Handles event notifying.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallEventMonitor::RunL()
- {
- CSPLOGSTRING( CSPINT, "CSPEtelCallEventMonitor::RunL")
-
- // Survive from monitor destruction during observing sequence
- TBool destroyed = EFalse;
- iDestrPtr = &destroyed;
-
- if ( iStatus == KErrNone )
- {
- switch ( iCallEvent )
- {
- // The call has been terminated by the remote party.
- case RMobileCall::ERemoteTerminated:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Remotely terminated" );
- iObserver.NotifyCallEventOccurred(
- MCCPCallObserver::ECCPRemoteTerminated );
- break;
- }
- // The call has been placed on hold as a result of a local action
- case RMobileCall::ELocalHold:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Locally held" );
- iObserver.NotifyCallEventOccurred(
- MCCPCallObserver::ECCPLocalHold );
- break;
- }
-
- // The call has been resumed as a result of a local action.
- case RMobileCall::ELocalResume:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Locally resumed" );
- iObserver.NotifyCallEventOccurred(
- MCCPCallObserver::ECCPLocalResume );
- break;
- }
- // The call has been deflected to another remote party as a result
- // of a local action.
- case RMobileCall::ELocalDeflectCall:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Locally deflected" );
- iObserver.NotifyTransferCallEventOccurred(
- MCCPTransferObserver::ECCPLocalTransfer );
- break;
- }
- // The call has been transferred to another remote party as a
- // result of a local action.
- case RMobileCall::ELocalTransfer:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Locally transfered" );
- iObserver.NotifyTransferCallEventOccurred(
- MCCPTransferObserver::ECCPLocalTransfer );
- break;
- }
- // The call has been placed on hold by the remote connected party
- case RMobileCall::ERemoteHold:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Remotely held" );
- iObserver.NotifyCallEventOccurred(
- MCCPCallObserver::ECCPRemoteHold );
- break;
- }
- // The call has been resumed by the remote connected party.
- case RMobileCall::ERemoteResume:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Remotely resumed" );
- iObserver.NotifyCallEventOccurred(
- MCCPCallObserver::ECCPRemoteResume );
- break;
- }
- // The call has been joined by the remote connected party to other
- // call(s) to create/add to a conference call.
- case RMobileCall::ERemoteConferenceCreate:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Remotely created \
- conference" );
-
- iObserver.NotifyCallEventOccurred(
- MCCPCallObserver::ECCPRemoteConferenceCreate );
-
- break;
- }
- case RMobileCall::ERemoteTransferring:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Remotely created \
- conference" );
- iObserver.NotifyTransferCallEventOccurred(
- MCCPTransferObserver::ECCPRemoteTransferring );
- break;
- }
- case RMobileCall::ERemoteTransferAlerting:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Remotely created \
- conference" );
- iObserver.NotifyTransferCallEventOccurred(
- MCCPTransferObserver::ECCPRemoteTransferAlerting );
- break;
- }
- // The outgoing call has been barred by the remote party
- case RMobileCall::ERemoteBarred:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Remotely barred" );
- iObserver.NotifyCallEventOccurred(
- MCCPCallObserver::ECCPRemoteBarred );
- break;
- }
-
- // The call is being forwarded by the remote party.
- case RMobileCall::ERemoteForwarding:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Remotely forwarded" );
- iObserver.NotifyForwardEventOccurred(
- MCCPForwardObserver::ECCPRemoteForwarding );
- break;
- }
-
- // The call is waiting at the remote end.
- case RMobileCall::ERemoteWaiting:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Remotely waiting" );
- iObserver.NotifyCallEventOccurred(
- MCCPCallObserver::ECCPRemoteWaiting );
- break;
- }
-
- // The outgoing call has been barred by the local party.
- case RMobileCall::ELocalBarred:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Locally barred" );
- iObserver.NotifyCallEventOccurred(
- MCCPCallObserver::ECCPLocalBarred );
- break;
- }
-
- default:
- {
- CSPLOGSTRING2( CSPINT,
- "CSP CSPEtelCallEventMonitor::RunL: Unspecified/protocol \
- specific call event: %d", iCallEvent );
- break;
- }
- }
- }
-
- if ( !destroyed )
- {
- // In case instance has not been deleted, pointer must be cleared.
- iDestrPtr = NULL;
- if ( iStatus == KErrNone )
- {
- StartMonitoring();
- }
- }
- else
- {
- // already destroyed, do not touch members.
- }
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Request canceling.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallEventMonitor::DoCancel()
- {
- CSPLOGSTRING( CSPINT, "CSPEtelCallEventMonitor::DoCancel" );
- iCall.CancelAsyncRequest( EMobileCallNotifyCallEvent );
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallEventMonitor::CSPEtelCallEventMonitor( MCSPCallObserver& aObserver,
- RMobileCall& aCall ) :
- CActive( EPriorityStandard ),
- iObserver( aObserver ),
- iCall ( aCall )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelCallEventMonitor::CSPEtelCallEventMonitor()" );
- CActiveScheduler::Add( this );
- }
-
-// End of File
-
--- a/convergedcallengine/csplugin/src/cspetelcallrequester.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,929 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Contains the implementation of class CSPEtelCallRequester
-*
-*/
-
-#include "cspetelcallrequester.h"
-
-#include <exterror.h>
-#include <gsmerror.h>
-#include <etelmmerr.h>
-#include <etelsat.h>
-
-#include "mcspcallerrorobserver.h"
-#include "csplogger.h"
-
-
-// ---------------------------------------------------------------------------
-// Constructs the requester via two phased constructing.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallRequester* CSPEtelCallRequester::NewL(
- MCSPCallErrorObserver& aObserver,
- RMobileCall& aCall )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPEtelCallRequester::NewL()" );
- CSPEtelCallRequester* self = new ( ELeave ) CSPEtelCallRequester(
- aObserver, aCall );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor of the object.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallRequester::~CSPEtelCallRequester( )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPEtelCallRequester::~CSPEtelCallRequester()" );
- CSPLOGSTRING2(CSPINT, "CSPEtelCallRequester:: type: %d", iRequestType );
- Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelCallRequester::MakeDialRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSPEtelCallRequester::MakeDialRequest(
- const TDesC8& aCallParams,
- TDesC& aRecipient )
- {
- CSPLOGSTRING(CSPINT, "CSPEtelCallRequester::MakeDialRequest" );
- iRequestType = ERequestTypeDial;
-
- if ( !IsActive() )
- {
- iCall.Dial( iStatus, aCallParams, aRecipient );
- SetActive();
- }
- else
- {
- return KErrInUse;
- }
-
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelCallRequester::MakeDialNoFdnCheckRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSPEtelCallRequester::MakeDialNoFdnCheckRequest(
- const TDesC8& aCallParams,
- TDesC& aRecipient )
- {
- CSPLOGSTRING(CSPINT, "CSPEtelCallRequester::MakeDialNoFdnCheckRequest" );
- iRequestType = ERequestTypeDial;
-
- if ( !IsActive() )
- {
- iCall.DialNoFdnCheck( iStatus, aCallParams, aRecipient );
- SetActive();
- }
- else
- {
- return KErrInUse;
- }
-
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelCallRequester::MakeAnswerRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSPEtelCallRequester::MakeAnswerRequest(
- const TDesC8& aCallParams )
- {
- CSPLOGSTRING(CSPINT, "CSPEtelCallRequester::MakeAnswerRequest" );
- if ( !IsActive() )
- {
- iRequestType = ERequestTypeAnswer;
- iCall.AnswerIncomingCall( iStatus, aCallParams );
- SetActive();
- }
- else
- {
- return KErrInUse;
- }
-
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelCallRequester::MakeDialEmergencyRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSPEtelCallRequester::MakeDialEmergencyRequest(
- const RMobileENStore::TEmergencyNumber& aRecipient )
- {
- CSPLOGSTRING(CSPINT, "CSPEtelCallRequester::MakeDialEmergencyRequest" );
- Cancel();
-
- iRequestType = ERequestTypeDialEmergency;
- iCall.DialEmergencyCall( iStatus, aRecipient );
- SetActive();
-
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelCallRequester::MakeRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSPEtelCallRequester::MakeRequest( TRequestType aRequest )
- {
- TInt result = KErrUnknown;
-
- if ( !IsActive() )
- {
- if ( aRequest != ERequestTypeDial
- && aRequest != ERequestTypeDialEmergency )
- {
- iRequestType = aRequest;
- }
- CSPLOGSTRING2( CSPREQOUT,
- "CSP: CSPEtelCallRequester::MakeRequest %d", iRequestType );
- switch ( aRequest )
- {
- case ERequestTypeDial:
- {
- // Requested through MakeDialRequest as a special case because
- // of the parameters.
- result = KErrNotSupported;
- break;
- }
- case ERequestTypeDialEmergency:
- {
- // Requested through MakeDialEmergencyRequest as a special case because
- // of the parameters.
- result = KErrNotSupported;
- break;
- }
- case ERequestTypeAnswer:
- {
- iCall.AnswerIncomingCall( iStatus );
- result = KErrNone;
- SetActive();
- break;
- }
- case ERequestTypeHangup:
- {
- iCall.HangUp( iStatus );
- SetActive();
- result = KErrNone;
- break;
- }
- case ERequestTypeHold:
- {
- iCall.Hold( iStatus );
- SetActive();
- result = KErrNone;
- break;
- }
- case ERequestTypeResume:
- {
- iCall.Resume( iStatus );
- SetActive();
- result = KErrNone;
- break;
- }
- case ERequestTypeGoOneToOne:
- {
- iCall.GoOneToOne( iStatus );
- SetActive();
- result = KErrNone;
- break;
- }
- case ERequestTypeSwap:
- {
- iCall.Swap( iStatus );
- SetActive();
- result = KErrNone;
- break;
- }
-
- default:
- {
- CSPLOGSTRING2( CSPERROR,
- "CSP: CSPEtelCallRequester::MakeRequest: Unspecified \
- request type: %d", iRequestType );
- result = KErrArgument;
- }
- }
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPEtelCallRequester::MakeRequest: Already active" );
- result = KErrInUse;
- }
-
- return result;
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelCallRequester::CancelRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSPEtelCallRequester::CancelRequest( TRequestType aRequest )
- {
- TInt result(KErrNone);
- if ( iRequestType == aRequest )
- {
- Cancel();
- }
- else
- {
- CSPLOGSTRING3( CSPERROR, "CSPEtelCallRequester::CancelRequest: No such active, current is %d, param=%d", iRequestType, aRequest );
- result = KErrNotReady;
- }
- return result;
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// CSPEtelCallRequester::RunL
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallRequester::RunL()
- {
- CSPLOGSTRING2( CSPREQEND, "CSPEtelCallRequester::RunL: status: %d", iStatus.Int() );
-
- TRequestType endedRequest = iRequestType;
- iRequestType = ERequestTypeNone;
- if ( iStatus == KErrNone )
- {
-
- switch ( endedRequest )
- {
- case ERequestTypeDial:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: Dial request OK" );
- break;
- }
- case ERequestTypeAnswer:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: Answer request OK" );
- break;
- }
- case ERequestTypeHangup:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: Hangup request OK" );
- break;
- }
- case ERequestTypeHold:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: Hold request OK" );
- break;
- }
- case ERequestTypeResume:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: Resume request OK" );
- break;
- }
- case ERequestTypeGoOneToOne:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: GoOneToOne request OK" );
- break;
- }
- case ERequestTypeSwap:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: Swap request OK" );
- break;
- }
- case ERequestTypeDialEmergency:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: DialEmergency request OK" );
- break;
- }
- default:
- {
- CSPLOGSTRING2( CSPERROR,
- "CSP CSPEtelCallRequester::RunL: Unspecified request \
- type: %d", iRequestType );
- break;
- }
- }
- }
- else
- {
- // Error situations
- TInt err = iStatus.Int();
- CSPLOGSTRING2( CSPERROR, "CSP CSPEtelCallRequester::RunL: request \
- completed with error: %d", err );
-
- switch ( endedRequest )
- {
- case ERequestTypeDial:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: Dial request" );
- if ( err != KErrCancel )
- {
- iObserver.DialRequestFailed( err );
- return; // In case of Idle state has caused
- // immediate destruction of this object.
- }
- break;
- }
- case ERequestTypeAnswer:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: Answer request" );
- iObserver.NotifyErrorOccurred( ECCPRequestFailure );
- break;
- }
- case ERequestTypeHangup:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: Hangup request" );
- iObserver.NotifyErrorOccurred( ECCPRequestFailure );
- break;
- }
- case ERequestTypeHold:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: Hold request" );
- iObserver.NotifyErrorOccurred( ECCPLocalHoldFail );
-
- break;
- }
- case ERequestTypeResume:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: Resume request" );
- iObserver.NotifyErrorOccurred( ECCPLocalResumeFail );
- break;
- }
- case ERequestTypeGoOneToOne:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: GoOneToOne request" );
- iObserver.NotifyErrorOccurred( ECCPRequestFailure );
- break;
- }
- case ERequestTypeSwap:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelCallRequester::RunL: Swap request" );
- iObserver.NotifyErrorOccurred( ECCPRequestFailure );
- break;
- }
- case ERequestTypeDialEmergency:
- {
- CSPLOGSTRING2( CSPINT,
- "CSP CSPEtelCallRequester: RunL: DialEmergency error: %d",
- err );
-
- if ( err != KErrCancel )
- {
- iObserver.EmergencyDialRequestFailed(err);
- }
-
- break;
- }
-
- default:
- {
- CSPLOGSTRING2( CSPERROR,
- "CSP CSPEtelCallRequester::RunL: Unspecified request \
- type: %d", iRequestType );
- break;
- }
- }
-
- }
- }
-
-
-// ---------------------------------------------------------------------------
-// From CActive
-// CSPEtelCallRequester::DoCancel
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallRequester::DoCancel()
- {
- CSPLOGSTRING( CSPREQOUT, "CSP: CSPEtelCallRequester::DoCancel" );
- TRequestType cancelRequest = iRequestType;
- iRequestType = ERequestTypeNone;
-
- if ( IsActive() )
- {
- CSPLOGSTRING( CSPREQOUT, "CSP: CSPEtelCallRequester::DoCancel IsActive" );
- switch ( cancelRequest )
- {
- case ERequestTypeDial:
- {
- CSPLOGSTRING( CSPREQOUT, "CSPEtelCallRequester::DoCancel DialCancel" );
- iCall.DialCancel();
- CSPLOGSTRING( CSPREQOUT, "CSPEtelCallRequester::DoCancel DialCancel OK" );
- break;
- }
- case ERequestTypeAnswer:
- {
- iCall.AnswerIncomingCallCancel();
- break;
- }
- case ERequestTypeHangup:
- {
- iCall.HangUpCancel();
- break;
- }
- case ERequestTypeHold:
- {
- iCall.CancelAsyncRequest( EMobileCallHold );
- break;
- }
- case ERequestTypeResume:
- {
- iCall.CancelAsyncRequest( EMobileCallResume );
- break;
- }
- case ERequestTypeGoOneToOne:
- {
- iCall.CancelAsyncRequest( EMobileCallGoOneToOne );
- break;
- }
- case ERequestTypeSwap:
- {
- iCall.CancelAsyncRequest( EMobileCallSwap );
- break;
- }
- case ERequestTypeDialEmergency:
- {
- iCall.CancelAsyncRequest( EMobileCallDialEmergencyCall );
- break;
- }
- default:
- {
- CSPLOGSTRING2( CSPERROR, "CSP CSPEtelCallRequester::DoCancel: \
- Unspecified request type: %d", iRequestType );
- }
- }
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPEtelCallRequester::DoCancel: Not active" );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the requester.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallRequester::CSPEtelCallRequester(
- MCSPCallErrorObserver& aObserver,
- RMobileCall& aCall ) :
- CActive( EPriorityStandard ),
- iObserver( aObserver ),
- iCall ( aCall ),
- iRequestType( ERequestTypeNone )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPEtelCallRequester::CSPEtelCallRequester()" );
- CActiveScheduler::Add( this );
- }
-
-// ---------------------------------------------------------------------------
-// Error value mapping.
-// ---------------------------------------------------------------------------
-//
-TCCPError CSPEtelCallRequester::MapError( TInt aErrorCode )
- {
- TCCPError ret = ECCPRequestFailure;
- CSPLOGSTRING2( CSPINT, "CSPEtelCallRequester::MapError %d", aErrorCode);
-
- switch ( aErrorCode )
- {
- case KErrGsmCCUnassignedNumber:
- {
- ret = ECCPErrorNotReached;
- break;
- }
- case KErrGsmCCUserBusy:
- {
- ret = ECCPErrorBusy;
- break;
- }
- case KErrMMEtelCallForbidden:
- case KErrGsmCallInProgress:
- case KErrGsmNumberBarred:
- case KErrGsmNotAllowed:
- case KErrEtelCallNotActive:
- case KErrEtelCallAlreadyActive:
- {
- ret = ECCPErrorNotAllowed;
- break;
- }
- case KErrGsmCCNumberChanged:
- {
- ret = ECCPErrorMovedPermanently;
- break;
- }
- case KErrGsmCCInvalidNumberFormat:
- {
- ret = ECCPErrorInvalidURI;
- break;
- }
- case KErrGsmCCNormalUnspecified:
- {
- ret = ECCPErrorNoAnswerForVideo;
- break;
- }
- case KErrGsmCCTemporaryFailure:
- case KErrGsmCCSwitchingEquipmentCongestion:
- case KErrGsmCCRequestedChannelNotAvailable:
- {
- ret = ECCPErrorNetworkBusy;
- break;
- }
- case KErrGsmCCNetworkOutOfOrder:
- {
- ret = ECCPErrorNetworkOutOfOrder;
- break;
- }
- case KErrGsmCCRequestedFacilityNotSubscribed:
- {
- ret = ECCPErrorCCRequestedFacilityNotSubscribed;
- break;
- }
- case KErrGsmCCInvalidCallReferenceValue:
- {
- ret = ECCPErrorInvalidCallReferenceValue;
- break;
- }
- case KErrGsmCCUserNotInCug:
- {
- ret = ECCPErrorUserNotInCug;
- break;
- }
- case KErrGsmCCIncompatibleDestination:
- {
- // Affects to phone redial handling
- ret = ECCPErrorBadRequest;
- break;
- }
- case KErrGsmCCInvalidTransitNetworkSelection:
- {
- ret = ECCPErrorCCInvalidTransitNetworkSelection;
- break;
- }
- case KErrGsmCCSemanticallyIncorrectMessage:
- case KErrGsmCCConditionalIEError:
- case KErrGsmCCUnspecifiedProtocolError:
- case KErrEtelNoCarrier:
- {
- ret = ECCPErrorConnectionError;
- break;
- }
- case KErrGsmCallServerFail:
- case KErrGsm0707NotFound:
- case KErrGsmCallRejected:
- {
- ret = ECCPErrorRejected;
- break;
- }
- case KErrGeneral:
- {
- ret = ECCPErrorGeneral;
- break;
- }
- case KErrNotSupported:
- {
- ret = ECCPErrorNotSupported;
- break;
- }
- case KErrNoMemory:
- {
- ret = ECCPErrorNoMemory;
- break;
- }
- case KErrInUse:
- {
- ret = ECCPErrorAlreadyInUse;
- break;
- }
- case KErrNotReady:
- {
- ret = ECCPErrorNotReady;
- break;
- }
- case KErrGsmNoService:
- {
- ret = ECCPErrorNoService;
- break;
- }
- case KErrGsmOfflineOpNotAllowed:
- {
- ret = ECCPErrorNotAllowedInOfflineMode;
- break;
- }
- case KErrDiagnosticInfoBarredWithCUG:
- {
- ret = ECCPErrorCUGOutgoingCallsBarred;
- break;
- }
- case KErrDiagnosticInfoBarredNoCUG:
- {
- ret = ECCPErrorCUGNotSelected;
- break;
- }
- case KErrDiagnosticInfoBarredUnknownCUG:
- {
- ret = ECCPErrorCUGIndexUnknown;
- break;
- }
- case KErrDiagnosticInfoBarredIncompatibleCUG:
- {
- ret = ECCPErrorCUGIndexIncompatible;
- break;
- }
- case KErrDiagnosticInfoBarredFailureCUG:
- {
- ret = ECCPErrorCUGCallsFailure;
- break;
- }
- case KErrDiagnosticInfoBarredClirNotSubscribed:
- {
- ret = ECCPErrorCLIRNotSubscribed;
- break;
- }
- case KErrDiagnosticInfoBarredCCBSPossible:
- {
- ret = ECCPErrorCCBSPossible;
- break;
- }
- case KErrDiagnosticInfoBarredCCBSNotPossible:
- {
- ret = ECCPErrorCCBSNotPossible;
- break;
- }
- case KErrGsmCCRequestedFacilityNotImplemented:
- {
- ret = ECCPErrorServiceSettingError;
- break;
- }
- case KErrGsm0707SimNotInserted:
- case KErrGsm0707SIMPuk1Required:
- case KErrGsm0707SimPin1Required:
- case KErrGsm0707SimPin2Required:
- case KErrGsm0707SimFailure:
- case KErrGsm0707PhoneToSimLockRequired:
- case KErrGsm0707SimWrong:
- {
- ret = ECCPErrorAuthenticationFailed;
- break;
- }
- case KErrGsmInvalidFdn:
- {
- ret = ECCPErrorInvalidFDN;
- break;
- }
- case KErrArgument:
- {
- ret = ECCPErrorInvalidPhoneNumber;
- break;
- }
- case KErrGsmCCOperatorDeterminedBarring:
- {
- ret = ECCPErrorNumberBarred;
- break;
- }
- case KErrGsmCCChannelUnacceptable:
- {
- ret = ECCPErrorUnacceptableChannel;
- break;
- }
- case KErrGsmCCAccessInformationDiscarded:
- {
- ret = ECCPErrorAccessInformationDiscarded;
- break;
- }
- case KErrGsmCCQualityOfServiceNotAvailable:
- {
- ret = ECCPErrorQualityOfServiceNotAvailable;
- break;
- }
- case KErrAccessDenied:
- {
- ret = ECCPErrorAccessDenied;
- break;
- }
- case KErrGsmCCNoRouteToDestination:
- {
- ret = ECCPErrorCCNoRouteToDestination;
- break;
- }
- case KErrGsmCCDestinationOutOfOrder:
- {
- ret = ECCPErrorCCDestinationOutOfOrder;
- break;
- }
- case KErrGsmCCResourceNotAvailable:
- {
- ret = ECCPErrorCCResourceNotAvailable;
- break;
- }
- case KErrGsmCCIncompatibleMessageInCallState:
- {
- ret = ECCPErrorCCIncompatibleMessageInCallState;
- break;
- }
- case KErrGsmCCNormalCallClearing:
- {
- ret = ECCPErrorCCNormalCallClearing;
- break;
- }
- case KErrGsmCCUserNotResponding:
- {
- ret = ECCPErrorCCUserNotResponding;
- break;
- }
- case KErrGsmCCUserAlertingNoAnswer:
- {
- ret = ECCPErrorCCUserAlertingNoAnswer;
- break;
- }
- case KErrGsmCCCallRejected:
- {
- ret = ECCPErrorCCCallRejected;
- break;
- }
- case KErrGsmCCPreemption:
- {
- ret = ECCPErrorCCPreemption;
- break;
- }
- case KErrGsmCCFacilityRejected:
- {
- ret = ECCPErrorCCFacilityRejected;
- break;
- }
- case KErrGsmCCResponseToStatusEnquiry:
- {
- ret = ECCPErrorCCResponseToStatusEnquiry;
- break;
- }
- case KErrGsmCCInvalidMandatoryInformation:
- {
- ret = ECCPErrorCCInvalidMandatoryInformation;
- break;
- }
- case KErrGsmCCNonExistentMessageType:
- {
- ret = ECCPErrorCCNonExistentMessageType;
- break;
- }
- case KErrGsmCCIncompatibleMessageInProtocolState:
- {
- ret = ECCPErrorCCIncompatibleMessageInProtocolState;
- break;
- }
- case KErrGsmCCNonExistentInformationElement:
- {
- ret = ECCPErrorCCNonExistentInformationElement;
- break;
- }
- case KErrGsmCCRecoveryOnTimerExpiry:
- {
- ret = ECCPErrorCCRecoveryOnTimerExpiry;
- break;
- }
- case KErrGsmCCNoChannelAvailable:
- {
- ret = ECCPErrorCCNoChannelAvailable;
- break;
- }
- case KErrGsmCCIncomingCallsBarredInCug:
- {
- ret = ECCPErrorCCIncomingCallsBarredInCug;
- break;
- }
- case KErrGsmCCBearerCapabilityNotAuthorised:
- {
- ret = ECCPErrorCCBearerCapabilityNotAuthorised;
- break;
- }
- case KErrGsmCCBearerCapabilityNotCurrentlyAvailable:
- {
- ret = ECCPErrorCCBearerCapabilityNotCurrentlyAvailable;
- break;
- }
- case KErrGsmCCServiceNotAvailable:
- {
- ret = ECCPErrorCCServiceNotAvailable;
- break;
- }
- case KErrGsmCCBearerServiceNotImplemented:
- {
- ret = ECCPErrorCCBearerServiceNotImplemented;
- break;
- }
- case KErrGsmCCOnlyRestrictedDigitalInformationBCAvailable:
- {
- ret = ECCPErrorCCOnlyRestrictedDigitalInformationBCAvailable;
- break;
- }
- case KErrGsmCCServiceNotImplemented:
- {
- ret = ECCPErrorCCOnlyRestrictedDigitalInformationBCAvailable;
- break;
- }
- case KErrGsmCCUnspecifiedInterworkingError:
- {
- ret = ECCPErrorCCUnspecifiedInterworkingError;
- break;
- }
- case KErrGsmNoNumber:
- {
- ret = ECCPErrorInvalidPhoneNumberCancelRedial;
- break;
- }
- case KErrNotFound:
- {
- ret = ECCPErrorNotFound;
- break;
- }
- case KErrTimedOut:
- {
- ret = ECCPErrorTimedOut;
- break;
- }
- case KErrGsmReleaseByUser:
- {
- ret = ECCPErrorReleaseByUserForCancelRedial;
- break;
- }
- case KErrSatControl:
- {
- ret = ECCPErrorSatControl;
- break;
- }
- default:
- {
- // Use the predefined.
- break;
- }
- }
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// Returns the active request.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallRequester::TRequestType CSPEtelCallRequester::Request()
- {
- if ( IsActive() )
- {
- return iRequestType;
- }
-
- return ERequestTypeNone;
- }
-
-// ---------------------------------------------------------------------------
-// Canceling emergency or normal call dial request.
-// ---------------------------------------------------------------------------
-//
-TInt CSPEtelCallRequester::DialCancel()
- {
- TInt ret = KErrNotReady;
- if ( iRequestType == ERequestTypeDialEmergency
- || ( iRequestType == ERequestTypeDial ) )
- {
- ret = CancelRequest( iRequestType );
- }
- else
- {
- CSPLOGSTRING2(CSPINT,
- "CSPEtelCallRequester::DialCancel invalid irequest for dialcancel %d",
- iRequestType);
- }
-
- return ret;
- }
-
-
-// End of File
-
--- a/convergedcallengine/csplugin/src/cspetelcallstatusmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of class CSPEtelCallStatusMonitor which
-* monitors call status changes from ETel and notifies observer
-* according to call status change.
-*
-*/
-
-
-#include <mccpcallobserver.h>
-
-#include "cspetelcallstatusmonitor.h"
-#include "mcspcallobserver.h"
-#include "csplogger.h"
-
-
-
-// ---------------------------------------------------------------------------
-// CSPEtelCallEventMonitor::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallStatusMonitor* CSPEtelCallStatusMonitor::NewL( MCSPCallObserver& aObserver,
- RMobileCall& aCall )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelCallEventMonitor::NewL()" );
- CSPEtelCallStatusMonitor* self = new ( ELeave ) CSPEtelCallStatusMonitor(
- aObserver, aCall );
- return self;
- }
-
-
-// ---------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallStatusMonitor::~CSPEtelCallStatusMonitor( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelCallStatusMonitor::~CSPEtelCallStatusMonitor()" );
- Cancel();
-
- if ( iDestrPtr )
- {
- *iDestrPtr = ETrue;
- iDestrPtr = NULL;
- }
-
- }
-
-
-// ---------------------------------------------------------------------------
-// Starts the monitoring.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallStatusMonitor::StartMonitoring()
- {
- CSPLOGSTRING(CSPINT, "CSPEtelCallStatusMonitor::StartMonitoring()" );
- if ( !IsActive() && iCall.SubSessionHandle() )
- {
- CSPLOGSTRING( CSPREQOUT,
- "CSP: CSPEtelCallStatusMonitor::StartMonitoring: Request \
- RMobilePhone::NotifyMobileCallStatusChange" );
- iCall.NotifyMobileCallStatusChange( iStatus, iCallStatus );
- CSPLOGSTRING( CSPREQOUT, "CSPEtelCallStatusMonitor:: Notify OK" );
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPEtelCallStatusMonitor::StartMonitoring: Already active" );
- }
- }
-
-
-// ---------------------------------------------------------------------------
-// Starts the monitoring.
-// ---------------------------------------------------------------------------
-//
-RMobileCall::TMobileCallStatus CSPEtelCallStatusMonitor::State()
- {
- return iCallStatus;
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Handles call status notifying.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallStatusMonitor::RunL()
- {
- CSPLOGSTRING( CSPINT, "CSPEtelCallStatusMonitor::RunL")
-
- // Survive from monitor destruction during observing sequence
- TBool destroyed = EFalse;
- iDestrPtr = &destroyed;
-
- if ( iStatus == KErrNone )
- {
- iObserver.NotifyCallStateChangedETel( iCallStatus );
- }
-
- if ( !destroyed )
- {
- // In case instance has not been deleted, pointer must be cleared.
- iDestrPtr = NULL;
- if ( iStatus == KErrNone )
- {
- StartMonitoring();
- }
- }
- else
- {
- // already destroyed, do not touch members.
- }
- }
-
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Canceling functionality.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallStatusMonitor::DoCancel()
- {
- CSPLOGSTRING( CSPINT, "CSPEtelCallStatusMonitor::DoCancel" );
- iCall.CancelAsyncRequest( EMobileCallNotifyMobileCallStatusChange );
- }
-
-
-
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor..
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallStatusMonitor::CSPEtelCallStatusMonitor( MCSPCallObserver& aObserver,
- RMobileCall& aCall ) :
- CActive( EPriorityStandard ),
- iObserver( aObserver ),
- iCall ( aCall )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelCallStatusMonitor::CSPEtelCallStatusMonitor()" );
- CActiveScheduler::Add( this );
- }
-
-
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspetelcallwaitingrequester.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,263 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Contains the implementation of class CSPEtelCallWaitingRequester
-*
-*/
-
-
-
-#include "cspetelcallwaitingrequester.h"
-
-#include <mmretrieve.h>
-#include <etelmm.h>
-
-#include "csplogger.h"
-#include "cspconsts.h"
-
-
-// ---------------------------------------------------------------------------
-// Constructs the requester via two phased constructing.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallWaitingRequester* CSPEtelCallWaitingRequester::NewL(
- RMobilePhone& aPhone )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPEtelCallWaitingRequester::NewL()" );
- CSPEtelCallWaitingRequester* self =
- new ( ELeave ) CSPEtelCallWaitingRequester( aPhone );
- CleanupStack::PushL( self );
- self->ConstructL( );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor of the object.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallWaitingRequester::~CSPEtelCallWaitingRequester( )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPEtelCallWaitingRequester::~CSPEtelCallWaitingRequester()" );
- Cancel();
- delete iList;
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelCallWaitingRequester::GetCallWaitingL
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallWaitingRequester::GetCallWaitingL( const CCCECallParameters&
- aParams,
- TBool& aCallWaitingStatus )
- {
- CSPLOGSTRING(CSPINT, "CSPEtelCallWaitingRequester::GetCallWaitingL()" );
-
- if ( iMode == ECwRequesterInactive )
- {
- iMode = ECwRequesterGetStarted;
- iList->Start( iStatus );
- SetActive();
- iWait.Start();
-
- if ( iStatus == -5252 )
- {
- aCallWaitingStatus = ETrue;
- }
- else
- {
- // Get the list of call waiting entries
- CMobilePhoneCWList* cwList = iList->RetrieveListL();
- CleanupStack::PushL(cwList);
-
- TInt count = cwList->Enumerate();
- RMobilePhone::TMobilePhoneCWInfoEntryV1 cwInfo;
-
- aCallWaitingStatus = EFalse; // Default false
- CSPLOGSTRING(CSPINT, "CSPEtelCallWaitingRequester::GetCallWaitingL() iterate" );
- for( TInt i=0; i < count ; i++ )
- {
- cwInfo = cwList->GetEntryL( i );
-
- if ( cwInfo.iStatus == RMobilePhone::ECallWaitingStatusActive )
- {
- if ( cwInfo.iServiceGroup == RMobilePhone::EAuxVoiceService )
- {
- iAuxLineCwStatus = ETrue;
- }
- else
- {
- iPrimaryLineCwStatus = ETrue;
- }
- }
- }
-
- GetCallWaitingStatusByLineType( aParams, aCallWaitingStatus );
-
- CSPLOGSTRING2(CSPINT,
- "CSPEtelCallWaitingRequester::GetCallWaitingL() res:%d",
- aCallWaitingStatus );
- CleanupStack::PopAndDestroy( cwList );
-
- // Initial value has been read from network,
- // now we must keep the setting value up to date.
- StartMonitoring();
- }
- }
-
- else if ( iMode == ECwRequesterMonitoring )
- {
- CSPLOGSTRING(CSPINT, "CSPEtelCallWaitingRequester::GetCallWaitingL() use cached value" );
- GetCallWaitingStatusByLineType( aParams, aCallWaitingStatus );
- }
- else if ( iMode == ECwRequesterGetStarted )
- {
- CSPLOGSTRING(CSPINT, "CSPEtelCallWaitingRequester::GetCallWaitingL() KErrInUse" );
- User::Leave( KErrInUse );
- }
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// CSPEtelCallWaitingRequester::RunL
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallWaitingRequester::RunL()
- {
- CSPLOGSTRING2( CSPREQEND, "CSPEtelCallWaitingRequester::RunL: status: %d",
- iStatus.Int() );
- if ( iWait.IsStarted() )
- {
- iWait.AsyncStop();
- }
- else if ( KErrNone == iStatus.Int() )
- {
- RMobilePhone::TMobilePhoneCWInfoEntryV1 cwInfo = iDesCwStatus();
- switch (cwInfo.iStatus)
- {
- case RMobilePhone::ECallWaitingStatusActive:
- if ( cwInfo.iServiceGroup == RMobilePhone::EAuxVoiceService )
- {
- iAuxLineCwStatus = ETrue;
- }
- else
- {
- iPrimaryLineCwStatus = ETrue;
- }
- break;
- case RMobilePhone::ECallWaitingStatusNotActive:
- if ( cwInfo.iServiceGroup == RMobilePhone::EAuxVoiceService )
- {
- iAuxLineCwStatus = EFalse;
- }
- else
- {
- iPrimaryLineCwStatus = EFalse;
- }
- break;
- default:
- break;
- }
-
- CSPLOGSTRING3(CSPINT,
- "CSPEtelCallWaitingRequester::RunL: service:%d new cw status:%d",
- cwInfo.iServiceGroup, cwInfo.iStatus );
-
- StartMonitoring();
- }
- else
- {
- iMode = ECwRequesterInactive;
- }
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// CSPEtelCallWaitingRequester::DoCancel
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallWaitingRequester::DoCancel()
- {
- CSPLOGSTRING(CSPOBJECT, "CSPEtelCallWaitingRequester::DoCancel()" );
- if ( iMode == ECwRequesterGetStarted )
- {
- iList->Cancel();
- iMode = ECwRequesterInactive;
- }
- else if ( iMode == ECwRequesterMonitoring )
- {
- iPhone.CancelAsyncRequest( EMobilePhoneNotifyCallWaitingStatusChange );
- iMode = ECwRequesterInactive;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the requester.
-// ---------------------------------------------------------------------------
-//
-CSPEtelCallWaitingRequester::CSPEtelCallWaitingRequester(RMobilePhone& aPhone):
- CActive( EPriorityStandard ),
- iPhone( aPhone )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPEtelCallWaitingRequester::CSPEtelCallWaitingRequester()" );
- CActiveScheduler::Add( this );
- iPrimaryLineCwStatus = EFalse;
- iAuxLineCwStatus = EFalse;
- iMode = ECwRequesterInactive;
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelCallWaitingRequester::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallWaitingRequester::ConstructL()
- {
- CSPLOGSTRING(CSPINT, "CSPEtelCallWaitingRequester::ConstructL()" );
- iList = CRetrieveMobilePhoneCWList::NewL(iPhone);
- }
-
-// ---------------------------------------------------------------------------
-// Start listening call waiting status change notifications.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallWaitingRequester::StartMonitoring()
- {
- iPhone.NotifyCallWaitingStatusChange( iStatus, iDesCwStatus );
- SetActive();
- iMode = ECwRequesterMonitoring;
- }
-
-// ---------------------------------------------------------------------------
-// Returns the call waiting status from call waiting status list by linetype.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelCallWaitingRequester::GetCallWaitingStatusByLineType( const CCCECallParameters&
- aParams,
- TBool& aCallWaitingStatus )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPEtelCallWaitingRequester:GetCallWaitingStatusByLineType" );
-
- if ( aParams.LineType() == CCCECallParameters::ECCELineTypePrimary )
- {
- aCallWaitingStatus = iPrimaryLineCwStatus;
- }
- else
- {
- aCallWaitingStatus = iAuxLineCwStatus;
- }
- CSPLOGSTRING3(CSPINT,
- "CSPEtelCallWaitingRequester::GetCallWaitingStatusByLineType: line:%d res:%d",
- aParams.LineType(), aCallWaitingStatus );
- }
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspetelconferencecallrequester.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,375 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Contains the implementation of class
-* CSPEtelConferenceCallRequester.
-*
-*/
-
-
-#include <etelmm.h>
-#include <mccpconferencecallobserver.h>
-
-#include "cspetelconferencecallrequester.h"
-#include "csplogger.h"
-#include "cspconferencecall.h"
-
-
-// ---------------------------------------------------------------------------
-// Constructs the requester via two phased constructing.
-// ---------------------------------------------------------------------------
-//
-CSPEtelConferenceCallRequester* CSPEtelConferenceCallRequester::NewL(
- CSPConferenceCall& aOwner,
- RMobileConferenceCall& aCall )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPEtelConferenceCallRequester::NewL()" );
- CSPEtelConferenceCallRequester* self = new ( ELeave ) CSPEtelConferenceCallRequester(
- aOwner, aCall );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor of the object.
-// ---------------------------------------------------------------------------
-//
-CSPEtelConferenceCallRequester::~CSPEtelConferenceCallRequester( )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPEtelConferenceCallRequester::~CSPEtelConferenceCallRequester()" );
- CSPLOGSTRING2(CSPINT, "CSPEtelConferenceCallRequester:: type: %d", iRequestType );
- Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelConferenceCallRequester::MakeAddCallRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSPEtelConferenceCallRequester::MakeAddCallRequest( const TName& aCallName )
- {
- if ( !IsActive() )
- {
- iRequestType = EConferenceRequestTypeAddCall;
- iCall.AddCall( iStatus, aCallName );
- SetActive();
- }
- else
- {
- return KErrInUse;
- }
-
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelConferenceCallRequester::MakeRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSPEtelConferenceCallRequester::MakeRequest(
- TConferenceRequestType aRequest )
- {
- TInt result = KErrUnknown;
-
- if ( !IsActive() )
- {
- if ( aRequest != EConferenceRequestTypeAddCall )
- {
- iRequestType = aRequest;
- }
-
- CSPLOGSTRING2( CSPREQOUT,
- "CSP: CSPEtelConferenceCallRequester::MakeRequest %d", iRequestType );
- switch ( aRequest )
- {
- case EConferenceRequestTypeAddCall:
- {
- // Requested through EConferenceRequestTypeAddCall as a special case because
- // of the parameters.
- result = KErrNotSupported;
- break;
- }
- case EConferenceRequestTypeHangup:
- {
- iCall.HangUp( iStatus );
- SetActive();
- result = KErrNone;
- break;
- }
- case EConferenceRequestTypeHold:
- {
- iCall.Swap( iStatus );
- SetActive();
- result = KErrNone;
- break;
- }
- case EConferenceRequestTypeResume:
- {
- iCall.Swap( iStatus );
- SetActive();
- result = KErrNone;
- break;
- }
- case EConferenceRequestTypeCreateConference:
- {
- iCall.CreateConference( iStatus );
- SetActive();
- result = KErrNone;
- break;
- }
- case EConferenceRequestTypeSwap:
- {
- iCall.Swap( iStatus );
- SetActive();
- result = KErrNone;
- break;
- }
- default:
- {
- CSPLOGSTRING2( CSPERROR,
- "CSP: CSPEtelConferenceCallRequester::MakeRequest: Unspecified \
- request type: %d", iRequestType );
- result = KErrArgument;
- }
- }
-
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPEtelConferenceCallRequester::MakeRequest: Already active" );
-
- if ( aRequest == EConferenceRequestTypeHangup )
- {
- // First cancel ongoing request.
- Cancel();
-
- iCall.HangUp( iStatus );
- SetActive();
- result = KErrNone;
- }
- else
- {
- result = KErrInUse;
- }
- }
-
- return result;
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelConferenceCallRequester::RunL
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceCallRequester::RunL()
- {
- // from CActive
- CSPLOGSTRING2( CSPREQEND,
- "CSP: CSPEtelConferenceCallRequester::RunL: status: %d", iStatus.Int() );
-
- if ( iStatus == KErrNone )
- {
- switch ( iRequestType )
- {
- case EConferenceRequestTypeAddCall:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelConferenceCallRequester::RunL: Add call request OK" );
- break;
- }
- case EConferenceRequestTypeHangup:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelConferenceCallRequester::RunL: Hangup request OK" );
- break;
- }
- case EConferenceRequestTypeHold:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelConferenceCallRequester::RunL: Hold request OK" );
- break;
- }
- case EConferenceRequestTypeResume:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelConferenceCallRequester::RunL: Resume request OK" );
- break;
- }
- case EConferenceRequestTypeCreateConference:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelConferenceCallRequester::RunL: Conference create request OK" );
- break;
- }
- case EConferenceRequestTypeSwap:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelConferenceCallRequester::RunL: Conference swap request OK" );
- break;
- }
- default:
- {
- CSPLOGSTRING2( CSPERROR,
- "CSP CSPEtelConferenceCallRequester::RunL: Unspecified request \
- type: %d", iRequestType );
- break;
- }
- }
- }
- else
- {
- // Error situations
-
- CSPLOGSTRING2( CSPERROR, "CSP CSPEtelConferenceCallRequester::RunL: request \
- completed with error: %d", iStatus.Int() );
- switch ( iRequestType )
- {
- case EConferenceRequestTypeAddCall:
- {
- CSPLOGSTRING( CSPERROR,
- "CSP CSPEtelConferenceCallRequester::RunL: Add call request" );
- iOwner.NotifyConferenceError(
- ECCPConferenceErrorAddCall );
- break;
- }
- case EConferenceRequestTypeHangup:
- {
- CSPLOGSTRING( CSPERROR,
- "CSP CSPEtelConferenceCallRequester::RunL: Hangup request" );
- iOwner.NotifyConferenceError(
- ECCPConferenceErrorHangUp );
- break;
- }
- case EConferenceRequestTypeHold:
- {
- CSPLOGSTRING( CSPERROR,
- "CSP CSPEtelConferenceCallRequester::RunL: Hold request" );
- iOwner.NotifyConferenceError(
- ECCPConferenceErrorHold );
- break;
- }
- case EConferenceRequestTypeResume:
- {
- CSPLOGSTRING( CSPERROR,
- "CSP CSPEtelConferenceCallRequester::RunL: Resume request err" );
- iOwner.NotifyConferenceError(
- ECCPConferenceErrorResume );
- break;
- }
- case EConferenceRequestTypeCreateConference:
- {
- CSPLOGSTRING( CSPERROR,
- "CSP CSPEtelConferenceCallRequester::RunL: Conference create request" );
- iOwner.NotifyConferenceError(
- ECCPConferenceErrorAddCall );
- break;
- }
- case EConferenceRequestTypeSwap:
- {
- CSPLOGSTRING( CSPERROR,
- "CSP CSPEtelConferenceCallRequester::RunL: Conference swap request" );
- iOwner.NotifyConferenceError(
- ECCPConferenceErrorSwap );
-
- break;
- }
- default:
- {
- CSPLOGSTRING2( CSPERROR,
- "CSP CSPEtelConferenceCallRequester::RunL: Unspecified request \
- type: %d", iRequestType );
- break;
- }
- }
-
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelConferenceCallRequester::DoCancel
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceCallRequester::DoCancel()
- {
- if ( IsActive() )
- {
- CSPLOGSTRING( CSPREQOUT, "CSP: CSPEtelConferenceCallRequester::DoCancel" );
- switch ( iRequestType )
- {
- case EConferenceRequestTypeAddCall:
- {
- iCall.CancelAsyncRequest( EMobileConferenceCallAddCall );
- break;
- }
- case EConferenceRequestTypeHangup:
- {
- iCall.CancelAsyncRequest( EMobileConferenceCallHangUp );
- break;
- }
- case EConferenceRequestTypeHold:
- case EConferenceRequestTypeResume:
- {
- iCall.CancelAsyncRequest( EMobileConferenceCallSwap );
- break;
- }
- case EConferenceRequestTypeCreateConference:
- {
- iCall.CancelAsyncRequest( EMobileConferenceCallCreateConference );
- break;
- }
- case EConferenceRequestTypeSwap:
- {
- iCall.CancelAsyncRequest( EMobileConferenceCallSwap );
- break;
- }
- default:
- {
- CSPLOGSTRING2( CSPERROR, "CSP CSPEtelConferenceCallRequester::DoCancel: \
- Unspecified request type: %d", iRequestType );
- }
- }
-
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPEtelConferenceCallRequester::DoCancel: Already active" );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the requester.
-// ---------------------------------------------------------------------------
-//
-CSPEtelConferenceCallRequester::CSPEtelConferenceCallRequester(
- CSPConferenceCall& aOwner,
- RMobileConferenceCall& aCall ) :
- CActive( EPriorityStandard ),
- iOwner( aOwner ),
- iCall ( aCall )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPEtelConferenceCallRequester::CSPEtelConferenceCallRequester()" );
- CActiveScheduler::Add( this );
- }
-
-// ---------------------------------------------------------------------------
-// Constructing in the second phase.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceCallRequester::ConstructL()
- {
- }
-
-// End of File
-
--- a/convergedcallengine/csplugin/src/cspetelconferencecapsmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,173 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of class CSPEtelConferenceCapsMonitor which
-* monitors call status changes from ETel and notifies observer
-* according to call status change.
-*
-*/
-
-
-#include "cspetelconferencecapsmonitor.h"
-
-#include "cspconferencecall.h"
-#include "csplogger.h"
-
-
-
-// ---------------------------------------------------------------------------
-// CSPEtelConferenceCapsMonitor::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPEtelConferenceCapsMonitor* CSPEtelConferenceCapsMonitor::NewL(
- CSPConferenceCall& aOwner,
- RMobileConferenceCall& aCall )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelConferenceCapsMonitor::NewL()" );
- CSPEtelConferenceCapsMonitor* self =
- new ( ELeave ) CSPEtelConferenceCapsMonitor(
- aOwner, aCall );
- CleanupStack::PushL( self );
- self->ConstructL( );
- CleanupStack::Pop( self );
- return self;
- }
-
-
-// ---------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// ---------------------------------------------------------------------------
-//
-CSPEtelConferenceCapsMonitor::~CSPEtelConferenceCapsMonitor( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelConferenceCapsMonitor::~CSPEtelConferenceCapsMonitor()" );
-
- if ( iDestrPtr )
- {
- *iDestrPtr = ETrue;
- iDestrPtr = NULL;
- }
-
- Cancel();
- }
-
-
-// ---------------------------------------------------------------------------
-// Starts the monitoring.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceCapsMonitor::StartMonitoring()
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelConferenceCapsMonitor::StartMonitoring()" );
-
-
- if ( !IsActive() )
- {
- CSPLOGSTRING( CSPREQOUT,
- "CSP: CSPEtelConferenceCapsMonitor::StartMonitoring: Request \
- RMobilePhone::NotifyCapsChange" );
- iCall.NotifyCapsChange( iStatus, iCaps );
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPEtelConferenceCapsMonitor::StartMonitoring: Already active" );
- }
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Handles call status notifying.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceCapsMonitor::RunL()
- {
- CSPLOGSTRING2( CSPREQEND,
- "CSPEtelConferenceCapsMonitor::RunL: status: %d", iStatus.Int() );
-
- // Survive from monitor destruction during observing sequence
- TBool destroyed = EFalse;
- iDestrPtr = &destroyed;
-
-
- if ( iStatus == KErrNone )
- {
- // Test caps and notify about the iOwner
- iOwner.ConferenceCapsChanged( iCaps );
-
- }
-
- if ( !destroyed )
- {
- // In case instance has not been deleted, it is important to clear
- // iPtr pointer.
- iDestrPtr = NULL;
-
- // ok to modify member variables.
- if ( iStatus == KErrNone )
- {
- StartMonitoring();
- }
- }
- else
- {
- // already destroyed, do not touch members.
- }
-
- }
-
-
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Canceling functionality.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceCapsMonitor::DoCancel()
- {
- iCall.CancelAsyncRequest( EMobileConferenceCallNotifyCapsChange );
- }
-
-
-
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor..
-// ---------------------------------------------------------------------------
-//
-CSPEtelConferenceCapsMonitor::CSPEtelConferenceCapsMonitor( CSPConferenceCall& aOwner,
- RMobileConferenceCall& aCall ) :
- CActive( EPriorityStandard ),
- iOwner( aOwner ),
- iCall ( aCall )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelConferenceCapsMonitor::CSPEtelConferenceCapsMonitor()" );
- CActiveScheduler::Add( this );
- }
-
-// ---------------------------------------------------------------------------
-// Second phase construction.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceCapsMonitor::ConstructL()
- {
- // Implementation not required.
- }
-
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspetelconferenceeventmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,250 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of class CSPEtelConferenceEventMonitor which
-* monitors call events from ETel and notifies observer
-* accordingly.
-*
-*/
-
-
-#include "cspetelconferenceeventmonitor.h"
-
-#include <mccpconferencecallobserver.h>
-
-#include "csplogger.h"
-#include "cspconferencecall.h"
-
-
-
-// ---------------------------------------------------------------------------
-// CSPEtelConferenceEventMonitor::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPEtelConferenceEventMonitor* CSPEtelConferenceEventMonitor::NewL(
- CSPConferenceCall& aOwner,
- RMobileConferenceCall& aCall )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelConferenceEventMonitor::NewL()" );
- CSPEtelConferenceEventMonitor* self =
- new ( ELeave ) CSPEtelConferenceEventMonitor(
- aOwner, aCall );
- CleanupStack::PushL( self );
- self->ConstructL( );
- CleanupStack::Pop( self );
- return self;
- }
-
-
-
-// ---------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// ---------------------------------------------------------------------------
-//
-CSPEtelConferenceEventMonitor::~CSPEtelConferenceEventMonitor( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelConferenceEventMonitor::~CSPEtelConferenceEventMonitor()" );
- Cancel();
-
- if ( iDestrPtr )
- {
- *iDestrPtr = ETrue;
- iDestrPtr = NULL;
- }
-
- }
-
-// ---------------------------------------------------------------------------
-// Starts the monitoring.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceEventMonitor::StartMonitoring()
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelConferenceEventMonitor::StartMonitoring()" );
-
-
- if ( !IsActive() )
- {
- CSPLOGSTRING( CSPREQOUT,
- "CSP: CSPEtelConferenceEventMonitor::StartMonitoring: \
- Request RMobilePhone::NotifyEvent" );
-
- iCall.NotifyConferenceEvent( iStatus, iEvent, iCallName );
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPEtelConferenceEventMonitor::StartMonitoring: Already active" );
- }
- }
-
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Handles event notifying.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceEventMonitor::RunL()
- {
- CSPLOGSTRING2( CSPREQEND,
- "CSPEtelConferenceEventMonitor::RunL: status: %d", iStatus.Int() );
-
- // Survive from monitor destruction during observing sequence
- TBool destroyed = EFalse;
- iDestrPtr = &destroyed;
-
-
- if ( iStatus == KErrNone )
- {
- CSPLOGSTRING2( CSPINT,
- "CSP CSPEtelConferenceEventMonitor::RunL Event related callname = %S",
- &iCallName );
-
- switch ( iEvent )
- {
- case RMobileConferenceCall::EConferenceCallAdded:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelConferenceEventMonitor::RunL: ECCPConferenceCallAdded" );
- iOwner.NotifyEvent(
- MCCPConferenceCallObserver::ECCPConferenceCallAdded,
- iCallName );
-
- break;
- }
- // The call has been placed on hold as a result of a local action
- case RMobileConferenceCall::EConferenceCallRemoved:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelConferenceEventMonitor::RunL: ECCPConferenceCallRemoved" );
- iOwner.NotifyEvent(
- MCCPConferenceCallObserver::ECCPConferenceCallRemoved,
- iCallName );
- break;
- }
-
- // The call has been resumed as a result of a local action.
- case RMobileConferenceCall::EConferenceBuilt:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelConferenceEventMonitor::RunL: ECCPConferenceBuilt" );
- iOwner.NotifyEvent(
- MCCPConferenceCallObserver::ECCPConferenceBuilt );
- break;
- }
-
- case RMobileConferenceCall::EConferenceTerminated:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelConferenceEventMonitor::RunL: ECCPConferenceTerminated" );
- iOwner.NotifyEvent(
- MCCPConferenceCallObserver::ECCPConferenceTerminated );
- break;
- }
-
- case RMobileConferenceCall::EConferenceSwapped:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelConferenceEventMonitor::RunL: ECCPConferenceSwapped" );
- iOwner.NotifyEvent(
- MCCPConferenceCallObserver::ECCPConferenceSwapped );
- break;
- }
-
- case RMobileConferenceCall::EConferenceSplit:
- {
- CSPLOGSTRING( CSPINT,
- "CSP CSPEtelConferenceEventMonitor::RunL: ECCPConferenceSplit" );
- iOwner.NotifyEvent(
- MCCPConferenceCallObserver::ECCPConferenceSplit,
- iCallName );
- break;
- }
-
- default:
- {
- CSPLOGSTRING2( CSPERROR,
- "CSP CSPEtelConferenceEventMonitor::RunL: ERROR Unspecified \
- call event: %d", iEvent );
- break;
- }
-
- }
- }
- else
- {
- CSPLOGSTRING2( CSPERROR,
- "CSP CSPEtelConferenceEventMonitor::RunL err %d", iStatus.Int() );
- }
-
- if ( !destroyed )
- {
- // In case instance has not been deleted, it is important to clear
- // iPtr pointer.
- iDestrPtr = NULL;
-
- // ok to modify member variables.
- if ( iStatus == KErrNone )
- {
- StartMonitoring();
- }
- }
- else
- {
- // already destroyed, do not touch members.
- }
-
- }
-
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Request canceling.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceEventMonitor::DoCancel()
- {
- iCall.CancelAsyncRequest( EMobileConferenceCallNotifyConferenceEvent );
- }
-
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor.
-// ---------------------------------------------------------------------------
-//
-CSPEtelConferenceEventMonitor::CSPEtelConferenceEventMonitor( CSPConferenceCall& aOwner,
- RMobileConferenceCall& aCall ) :
- CActive( EPriorityStandard ),
- iOwner( aOwner ),
- iCall ( aCall )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelConferenceEventMonitor::CSPEtelConferenceEventMonitor()" );
- CActiveScheduler::Add( this );
- }
-
-// ---------------------------------------------------------------------------
-// Second phase construction.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceEventMonitor::ConstructL()
- {
- // Implementation not required.
- }
-
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspetelconferencestatusmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,202 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of class CSPEtelConferenceStatusMonitor which
-* monitors call status changes from ETel and notifies observer
-* according to call status change.
-*
-*/
-
-
-#include "cspetelconferencestatusmonitor.h"
-
-#include <mccpconferencecallobserver.h>
-
-#include "csplogger.h"
-#include "cspconferencecall.h"
-
-
-// ---------------------------------------------------------------------------
-// CSPEtelConferenceStatusMonitor::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPEtelConferenceStatusMonitor* CSPEtelConferenceStatusMonitor::NewL(
- MCSPConferenceStatusObserver& aOwner,
- RMobileConferenceCall& aCall )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPEtelConferenceStatusMonitor::NewL()" );
- CSPEtelConferenceStatusMonitor* self =
- new ( ELeave ) CSPEtelConferenceStatusMonitor(
- aOwner, aCall );
- CleanupStack::PushL( self );
- self->ConstructL( );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// ---------------------------------------------------------------------------
-//
-CSPEtelConferenceStatusMonitor::~CSPEtelConferenceStatusMonitor( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelConferenceStatusMonitor::~CSPEtelConferenceStatusMonitor()" );
- Cancel();
-
- if ( iDestrPtr )
- {
- *iDestrPtr = ETrue;
- iDestrPtr = NULL;
- }
- }
-
-// ---------------------------------------------------------------------------
-// Starts the monitoring.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceStatusMonitor::StartMonitoring()
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelConferenceStatusMonitor::StartMonitoring()" );
- if ( !IsActive() )
- {
- CSPLOGSTRING( CSPREQOUT,
- "CSP: CSPEtelConferenceStatusMonitor::StartMonitoring: Request \
- RMobilePhone::NotifyMobileStatusChange" );
- iCall.NotifyConferenceStatusChange( iStatus, iConferenceStatus );
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPEtelConferenceStatusMonitor::StartMonitoring: Already active" );
- }
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Handles call status notifying.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceStatusMonitor::RunL()
- {
- CSPLOGSTRING2( CSPREQEND,
- "CSPEtelConferenceStatusMonitor::RunL: status: %d", iStatus.Int() );
-
- // Survive from monitor destruction during observing sequence
- TBool destroyed = EFalse;
- iDestrPtr = &destroyed;
-
- if ( iStatus == KErrNone )
- {
- switch ( iConferenceStatus )
- {
-
- case RMobileConferenceCall::EConferenceIdle:
- {
- CSPLOGSTRING( CSPINT, "CSPETelConferenceStatusMonitor IDLE");
- iOwner.NotifyStateChange(
- MCSPConferenceStatusObserver::ECSPConferenceIdle );
- break;
- }
-
- case RMobileConferenceCall::EConferenceActive:
- {
- CSPLOGSTRING( CSPINT, "CSPETelConferenceStatusMonitor ACTIVE");
- iOwner.NotifyStateChange(
- MCSPConferenceStatusObserver::ECSPConferenceActive );
- break;
- }
- case RMobileConferenceCall::EConferenceHold:
- {
- CSPLOGSTRING( CSPINT, "CSPETelConferenceStatusMonitor HOLD");
-
- iOwner.NotifyStateChange(
- MCSPConferenceStatusObserver::ECSPConferenceHold );
-
- break;
- }
-
- default:
- {
- CSPLOGSTRING2( CSPINT,
- "CSP CSPEtelConferenceStatusMonitor::RunL: Unspecified/protocol \
- specific call status: %d", iConferenceStatus );
- break;
- }
- }
-
- }
- else
- {
- CSPLOGSTRING2( CSPERROR,
- "CSP CSPEtelConferenceStatusMonitor::RunL err %d", iStatus.Int() );
- }
-
- if ( !destroyed )
- {
- // In case instance has not been deleted, it is important to clear
- // iPtr pointer.
- iDestrPtr = NULL;
-
- // ok to modify member variables.
- if ( iStatus == KErrNone )
- {
- StartMonitoring();
- }
- }
- else
- {
- // Already destroyed, do not touch members.
- }
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Canceling functionality.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceStatusMonitor::DoCancel()
- {
- iCall.CancelAsyncRequest(
- EMobileConferenceCallNotifyConferenceStatusChange );
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor..
-// ---------------------------------------------------------------------------
-//
-CSPEtelConferenceStatusMonitor::CSPEtelConferenceStatusMonitor(
- MCSPConferenceStatusObserver& aOwner,
- RMobileConferenceCall& aCall ) :
- CActive( EPriorityStandard ),
- iOwner( aOwner ),
- iCall ( aCall )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelConferenceStatusMonitor::CSPEtelConferenceStatusMonitor()" );
- CActiveScheduler::Add( this );
- }
-
-// ---------------------------------------------------------------------------
-// Second phase construction.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelConferenceStatusMonitor::ConstructL()
- {
- // Implementation not required.
- }
-
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspeteldtmfmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements the class CSPEtelDtmfMonitor
-*
-*/
-
-
-
-#include <mccpdtmfobserver.h>
-#include <rmmcustomapi.h>
-#include <gsmerror.h>
-
-#include "cspeteldtmfmonitor.h"
-#include "csplogger.h"
-#include "cspdtmfprovider.h"
-#include "cspconsts.h"
-#include "cspdtmfprovider.h"
-
-
-
-// ---------------------------------------------------------------------------
-// CSPEtelDtmfMonitor::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPEtelDtmfMonitor* CSPEtelDtmfMonitor::NewL(
- CSPDTMFProvider& aObserver,
- RMmCustomAPI& aMmCustom )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelDtmfMonitor::NewL()" );
- CSPEtelDtmfMonitor* self = new ( ELeave ) CSPEtelDtmfMonitor(
- aObserver, aMmCustom );
- return self;
- }
-
-
-// ---------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// ---------------------------------------------------------------------------
-//
-CSPEtelDtmfMonitor::~CSPEtelDtmfMonitor( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelDtmfMonitor::~CSPEtelDtmfMonitor()" );
- Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// Starts the monitor.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelDtmfMonitor::StartMonitoring()
- {
- CSPLOGSTRING(CSPINT,
- "CSPEtelDtmfMonitor::StartMonitoring()" );
-
- if ( !IsActive() )
- {
- CSPLOGSTRING( CSPINT,
- "CSP: CSPEtelDtmfMonitor::StartMonitoring: Request \
- iMmCustom.NotifyDTMFEvent( iStatus, iEventData )" );
- iMmCustom.NotifyDtmfEvent( iStatus, iEventData );
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPEtelDtmfMonitor::StartMonitoring: Already active" );
- }
- }
-// ---------------------------------------------------------------------------
-// From CActive.
-// Handles line status change notifying.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelDtmfMonitor::RunL()
- {
- TInt err = iStatus.Int();
- CSPLOGSTRING2( CSPREQEND,
- "CSPEtelDtmfMonitor::RunL: status: %d", err );
-
- if ( err == KErrNone )
- {
- MCCPDTMFObserver::TCCPDtmfEvent event;
- if ( iEventData.iEvent == RMmCustomAPI::EDtmfStart
- && iEventData.iType == RMmCustomAPI::EDtmfManual )
- {
- event = MCCPDTMFObserver::ECCPDtmfManualStart;
- }
- else if ( iEventData.iEvent == RMmCustomAPI::EDtmfStart
- && iEventData.iType == RMmCustomAPI::EDtmfSequence )
- {
- event = MCCPDTMFObserver::ECCPDtmfSequenceStart;
- }
- else if ( iEventData.iEvent == RMmCustomAPI::EDtmfStop
- && iEventData.iType == RMmCustomAPI::EDtmfManual )
- {
- event = MCCPDTMFObserver::ECCPDtmfManualStop;
- }
- else if ( iEventData.iEvent == RMmCustomAPI::EDtmfStop
- && iEventData.iType == RMmCustomAPI::EDtmfSequence )
- {
- event = MCCPDTMFObserver::ECCPDtmfSequenceStop;
- }
- else if ( iEventData.iEvent == RMmCustomAPI::EDtmfAbort
- && iEventData.iType == RMmCustomAPI::EDtmfManual )
- {
- event = MCCPDTMFObserver::ECCPDtmfManualAbort;
- }
- else if ( iEventData.iEvent == RMmCustomAPI::EDtmfAbort
- && iEventData.iType == RMmCustomAPI::EDtmfSequence )
- {
- event = MCCPDTMFObserver::ECCPDtmfSequenceAbort;
- }
- else
- {
- // Unknown event
- CSPLOGSTRING3( CSPERROR,
- "CSPEtelDtmfMonitor::RunL: Unknown event = %¨d, type = %d",
- iEventData.iEvent, iEventData.iType );
-
- // Refresh and return (no observer notfiying).
- StartMonitoring();
- return;
- }
-
- iObserver.NotifyDTMFEvent( event, err, iEventData.iTone );
- }
- else
- {
- CSPLOGSTRING2( CSPERROR, "CSPEtelDtmfMonitor::RunL: Error \
- from DTMF: %d", err );
- }
-
- // Continue if not in offline mode
- if ( err != KErrGsmOfflineOpNotAllowed && err != KErrCancel
- && err != KErrNotSupported )
- {
- StartMonitoring();
- }
- CSPLOGSTRING( CSPREQEND, "CSPEtelDtmfMonitor::RunL End of RunL." );
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Canceling functionality.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelDtmfMonitor::DoCancel()
- {
- if ( iStatus == KRequestPending )
- {
- CSPLOGSTRING( CSPINT,
- "CSPEtelDtmfMonitor::DoCancel Canceling pending request.." );
- iMmCustom.CancelAsyncRequest( ECustomNotifyDtmfEventIPC );
- }
- }
-
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor.
-// ---------------------------------------------------------------------------
-//
-CSPEtelDtmfMonitor::CSPEtelDtmfMonitor(
- CSPDTMFProvider& aObserver,
- RMmCustomAPI& aMmCustom ) :
- CActive( EPriorityStandard ),
- iObserver( aObserver ),
- iMmCustom( aMmCustom )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelDtmfMonitor::CSPEtelDtmfMonitor()" );
- CActiveScheduler::Add( this );
- }
-
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspeteldtmfstopmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements the class CSPEtelDtmfStopMonitor
-*
-*/
-
-
-
-#include <mccpdtmfobserver.h>
-#include <gsmerror.h>
-
-#include "cspeteldtmfstopmonitor.h"
-#include "csplogger.h"
-#include "cspdtmfprovider.h"
-#include "cspconsts.h"
-#include "cspdtmfprovider.h"
-
-
-// ---------------------------------------------------------------------------
-// CSPEtelDtmfStopMonitor::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPEtelDtmfStopMonitor* CSPEtelDtmfStopMonitor::NewL(
- CSPDTMFProvider& aObserver,
- RMobilePhone& aPhone )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelDtmfStopMonitor::NewL()" );
- CSPEtelDtmfStopMonitor* self = new ( ELeave ) CSPEtelDtmfStopMonitor(
- aObserver, aPhone );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// ---------------------------------------------------------------------------
-//
-CSPEtelDtmfStopMonitor::~CSPEtelDtmfStopMonitor( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelDtmfStopMonitor::~CSPEtelDtmfStopMonitor()" );
- Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// Starts the monitor.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelDtmfStopMonitor::StartMonitoring()
- {
- CSPLOGSTRING(CSPINT, "CSPEtelDtmfStopMonitor::StartMonitoring()" );
-
- if ( !IsActive() )
- {
- CSPLOGSTRING( CSPINT,
- "CSP: CSPEtelDtmfStopMonitor::StartMonitoring: Request \
- iPhone.NotifyStopInDTMFString( iStatus, iEventData )" );
- iPhone.NotifyStopInDTMFString( iStatus );
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPEtelDtmfStopMonitor::StartMonitoring: Already active" );
- }
- }
-// ---------------------------------------------------------------------------
-// From CActive.
-// Handles line status change notifying.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelDtmfStopMonitor::RunL()
- {
- TInt err = iStatus.Int();
- CSPLOGSTRING2( CSPINT,
- "CSPEtelDtmfStopMonitor::RunL: status: %d", err );
-
- if ( err != KErrCancel && err != KErrServerTerminated )
- {
-
- TChar tone = NULL;
- MCCPDTMFObserver::TCCPDtmfEvent event =
- MCCPDTMFObserver::ECCPDtmfStopInDtmfString;
- iObserver.NotifyDTMFEvent( event, err, tone );
- }
- else
- {
- CSPLOGSTRING2( CSPERROR, "CSPEtelDtmfStopMonitor::RunL: Error \
- from RMobilePhone: %d", iStatus.Int() );
- }
-
-
- // Continue if not in offline mode
- if ( err != KErrGsmOfflineOpNotAllowed && err != KErrCancel
- && err != KErrNotSupported )
- {
- StartMonitoring();
- }
- CSPLOGSTRING( CSPREQEND, "CSPEtelDtmfStopMonitor::RunL End of RunL." );
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Canceling functionality.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelDtmfStopMonitor::DoCancel()
- {
- if ( iStatus == KRequestPending )
- {
- CSPLOGSTRING( CSPINT,
- "CSPEtelDtmfStopMonitor::DoCancel Canceling pending request.." );
- iPhone.CancelAsyncRequest( EMobilePhoneNotifyStopInDTMFString );
-
- }
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor.
-// ---------------------------------------------------------------------------
-//
-CSPEtelDtmfStopMonitor::CSPEtelDtmfStopMonitor(
- CSPDTMFProvider& aObserver,
- RMobilePhone& aPhone ) :
- CActive( EPriorityStandard ),
- iObserver( aObserver ),
- iPhone( aPhone )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelDtmfStopMonitor::CSPEtelDtmfStopMonitor()" );
- CActiveScheduler::Add( this );
- }
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspetelincomingcallmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,134 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements the class CSPEtelIncomingCallMonitor
-*
-*/
-
-
-#include "cspetelincomingcallmonitor.h"
-#include "csplogger.h"
-#include "cspcall.h"
-#include "cspconsts.h"
-
-
-// ---------------------------------------------------------------------------
-// CSPEtelIncomingCallMonitor::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPEtelIncomingCallMonitor* CSPEtelIncomingCallMonitor::NewL(
- MCSPIncomingCallObserver& aObserver,
- RMobileLine& aLine,
- RCSPLineContainer::TCSPLineId aLineId )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPEtelIncomingCallMonitor::NewL <");
- CSPEtelIncomingCallMonitor* self = new ( ELeave ) CSPEtelIncomingCallMonitor(
- aObserver, aLine, aLineId );
- CSPLOGSTRING(CSPOBJECT, "CSPEtelIncomingCallMonitor::NewL >");
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// ---------------------------------------------------------------------------
-//
-CSPEtelIncomingCallMonitor::~CSPEtelIncomingCallMonitor( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelIncomingCallMonitor::~CSPEtelIncomingCallMonitor" );
- Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// Starts the monitor.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelIncomingCallMonitor::StartMonitoring()
- {
- CSPLOGSTRING(CSPINT, "CSPEtelIncomingCallMonitor::StartMonitoring");
-
- if ( !IsActive() )
- {
- CSPLOGSTRING( CSPINT,
- "CSPEtelIncomingCallMonitor::StartMonitoring NotifyIncomingCall");
- iCallName.Zero();
- iLine.NotifyIncomingCall( iStatus, iCallName );
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSPEtelIncomingCallMonitor::StartMonitoring Error already active");
- }
- }
-// ---------------------------------------------------------------------------
-// From CActive.
-// Handles line status change notifying.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelIncomingCallMonitor::RunL()
- {
- CSPLOGSTRING(CSPINT, "CSPEtelIncomingCallMonitor::RunL <")
-
- if ( iStatus == KErrNone )
- {
- iIncomingCallObserver.IncomingCallArrived( iLine, iCallName,
- iLineId );
- // Continue monitoring
- StartMonitoring();
- }
- else
- {
- CSPLOGSTRING2( CSPERROR, "CSPEtelIncomingCallMonitor::RunL: Error \
- from RMobileLine: %d", iStatus.Int() );
- }
-
- CSPLOGSTRING(CSPREQEND, "CSPEtelIncomingCallMonitor::RunL >");
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Canceling functionality.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelIncomingCallMonitor::DoCancel()
- {
- CSPLOGSTRING( CSPINT, "CSPEtelIncomingCallMonitor::DoCancel" );
-
- if ( iStatus == KRequestPending )
- {
- CSPLOGSTRING( CSPINT,
- "CSPEtelIncomingCallMonitor::DoCancel Canceling pending request.." );
- iLine.NotifyIncomingCallCancel();
- }
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor.
-// ---------------------------------------------------------------------------
-//
-CSPEtelIncomingCallMonitor::CSPEtelIncomingCallMonitor(
- MCSPIncomingCallObserver& aObserver,
- RMobileLine& aLine,
- RCSPLineContainer::TCSPLineId aLineId ) :
- CActive( EPriorityStandard + 2 ),
- iIncomingCallObserver( aObserver ),
- iLine( aLine ),
- iLineId( aLineId )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelIncomingCallMonitor::CSPEtelIncomingCallMonitor" );
- CActiveScheduler::Add( this );
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspetellinestatusmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements the class CSPEtelLineStatusMonitor
-*
-*/
-
-
-
-#include <etelmm.h>
-
-#include "cspetellinestatusmonitor.h"
-#include "mcsplinestatusobserver.h"
-#include "csplogger.h"
-#include "cspconsts.h"
-
-
-// ---------------------------------------------------------------------------
-// CSPEtelCallAddedMonitor::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPEtelLineStatusMonitor* CSPEtelLineStatusMonitor::NewL(
- MCSPLineStatusObserver& aObserver,
- RMobileLine& aLine,
- RCSPLineContainer::TCSPLineId aLineId )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelLineStatusMonitor::NewL()" );
- CSPEtelLineStatusMonitor* self = new ( ELeave ) CSPEtelLineStatusMonitor(
- aObserver, aLine, aLineId );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// ---------------------------------------------------------------------------
-//
-CSPEtelLineStatusMonitor::~CSPEtelLineStatusMonitor( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelLineStatusMonitor::~CSPEtelLineStatusMonitor()" );
- Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// Starts the monitor.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelLineStatusMonitor::StartMonitoring()
- {
- CSPLOGSTRING(CSPINT, "CSPEtelLineStatusMonitor::StartMonitoring()" );
-
- if ( !IsActive() )
- {
- CSPLOGSTRING( CSPINT,
- "CSP: CSPEtelLineStatusMonitor::StartMonitoring: Request \
- iLine.NotifyStatusChange( iStatus, iLineStatus )" );
-
- iLine.NotifyMobileLineStatusChange( iStatus, iLineStatus );
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPEtelLineStatusMonitor::StartMonitoring: Already active" );
- }
- }
-
-// ---------------------------------------------------------------------------
-// From CActive.
-// Handles line status change notifying.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelLineStatusMonitor::RunL()
- {
- CSPLOGSTRING2( CSPINT, "CSPEtelLineStatusMonitor::RunL: %d", iStatus.Int() );
-
- if ( iStatus == KErrNone )
- {
- CSPLOGSTRING( CSPINT, "CSPEtelLineStatusMonitor::RunL status changed")
- iObserver.LineStatusChanged( iLine, iLineId, iLineStatus );
-
- StartMonitoring();
- }
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Canceling functionality.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelLineStatusMonitor::DoCancel()
- {
- CSPLOGSTRING( CSPINT, "CSPEtelLineStatusMonitor::DoCancel" );
-
- if ( iStatus == KRequestPending )
- {
- CSPLOGSTRING( CSPINT,
- "CSPEtelLineStatusMonitor::DoCancel Canceling pending request" );
- iLine.CancelAsyncRequest( EMobileLineNotifyMobileLineStatusChange );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor.
-// ---------------------------------------------------------------------------
-//
-CSPEtelLineStatusMonitor::CSPEtelLineStatusMonitor(
- MCSPLineStatusObserver& aObserver,
- RMobileLine& aLine,
- RCSPLineContainer::TCSPLineId aLineId ) :
- CActive( EPriorityStandard ),
- iLine( aLine ),
- iLineId( aLineId ),
- iObserver( aObserver )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelLineStatusMonitor::CSPEtelLineStatusMonitor()" );
- CActiveScheduler::Add( this );
- }
-
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspetelvideocallcapsmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of class CSPEtelVideoCallCapsMonitor which
-* monitors call status changes from ETel and notifies observer
-* according to call status change.
-*
-*/
-
-
-#include <mccpcallobserver.h>
-
-#include "cspetelvideocallcapsmonitor.h"
-#include "cspvideocall.h"
-#include "csplogger.h"
-
-
-// ---------------------------------------------------------------------------
-// CSPEtelCallEventMonitor::NewL.
-// ---------------------------------------------------------------------------
-//
-CSPEtelVideoCallCapsMonitor* CSPEtelVideoCallCapsMonitor::NewL(
- CSPVideoCall& aOwner,
- RMobileCall& aCall )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelCallEventMonitor::NewL()" );
- CSPEtelVideoCallCapsMonitor* self =
- new ( ELeave ) CSPEtelVideoCallCapsMonitor(
- aOwner, aCall );
- CleanupStack::PushL( self );
- self->ConstructL( );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructs the object by canceling first ongoing monitoring.
-// ---------------------------------------------------------------------------
-//
-CSPEtelVideoCallCapsMonitor::~CSPEtelVideoCallCapsMonitor( )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelVideoCallCapsMonitor::CSPEtelVideoCallCapsMonitor()" );
- Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// Starts the monitoring.
-// NOTE: This function reads the initial value of data call caps in the
-// beginning so that client can use GetMobileDataCallCaps to get up to date
-// caps information.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelVideoCallCapsMonitor::StartMonitoring()
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelVideoCallCapsMonitor::StartMonitoring()" );
-
- iCall.GetMobileDataCallCaps( iDataCallCapsPckg );
-
- if ( !IsActive() )
- {
- CSPLOGSTRING( CSPREQOUT,
- "CSP: CSPEtelVideoCallCapsMonitor::StartMonitoring: Request \
- RMobilePhone::NotifyCapsChange" );
- iCall.NotifyMobileDataCallCapsChange( iStatus, iDataCallCapsPckg );
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSP: CSPEtelVideoCallCapsMonitor::StartMonitoring: Already active" );
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelVideoCallCapsMonitor::GetMobileDataCallCaps
-// ---------------------------------------------------------------------------
-//
-TInt CSPEtelVideoCallCapsMonitor::GetMobileDataCallCaps( TDes8& aCaps ) const
- {
- CSPLOGSTRING( CSPREQIN, "CSPEtelVideoCallCapsMonitor::GetMobileDataCallCaps" );
- // get data call caps from Etel
- aCaps = iDataCallCapsPckg;
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelVideoCallCapsMonitor::GetProtocolCaps
-// ---------------------------------------------------------------------------
-//
-TUint CSPEtelVideoCallCapsMonitor::GetProtocolCaps()
- {
- iDataCallCaps = iDataCallCapsPckg();
- return iDataCallCaps.iProtocolCaps;
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Handles call status notifying.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelVideoCallCapsMonitor::RunL()
- {
- CSPLOGSTRING2( CSPREQEND,
- "CSPEtelVideoCallCapsMonitor::RunL: status: %d", iStatus.Int() );
-
- if ( iStatus == KErrNone )
- {
- iDataCallCaps = iDataCallCapsPckg();
-
- iOwner.DataCallCapsChanged( iDataCallCaps );
-
- iCall.NotifyMobileDataCallCapsChange( iStatus, iDataCallCapsPckg );
- SetActive();
- }
- }
-
-// ---------------------------------------------------------------------------
-// From CActive
-// Canceling functionality.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelVideoCallCapsMonitor::DoCancel()
- {
- iCall.CancelAsyncRequest( EMobileCallNotifyMobileDataCallCapsChange );
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the monitor..
-// ---------------------------------------------------------------------------
-//
-CSPEtelVideoCallCapsMonitor::CSPEtelVideoCallCapsMonitor( CSPVideoCall& aOwner,
- RMobileCall& aCall ) :
- CActive( EPriorityStandard ),
- iOwner( aOwner ),
- iCall ( aCall ),
- iDataCallCapsPckg( iDataCallCaps )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelVideoCallCapsMonitor::CSPEtelCallCapsMonitor()" );
- CActiveScheduler::Add( this );
- }
-
-// ---------------------------------------------------------------------------
-// Second phase construction.
-// ---------------------------------------------------------------------------
-//
-void CSPEtelVideoCallCapsMonitor::ConstructL()
- {
- // Implementation not required.
- }
-
-// ---------------------------------------------------------------------------
-// CSPEtelVideoCallCapsMonitor::UpdateProtocolCaps
-// ---------------------------------------------------------------------------
-//
-void CSPEtelVideoCallCapsMonitor::UpdateProtocolCaps()
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSPEtelVideoCallCapsMonitor::UpdateProtocolCaps()" );
-
- iCall.GetMobileDataCallCaps( iDataCallCapsPckg );
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspforwardprovider.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Contains the implementation of class CSPForwardProvider
-*
-*/
-
-
-#include <mccpforwardprovider.h>
-#include <mccpforwardobserver.h>
-#include <etelmm.h>
-#include <badesca.h> // CDesC8ArrayFlat
-
-#include "cspforwardprovider.h"
-#include "csplogger.h"
-
-
-// ---------------------------------------------------------------------------
-// Two phased construction
-// ---------------------------------------------------------------------------
-//
-CSPForwardProvider* CSPForwardProvider::NewL ( )
- {
- CSPForwardProvider* self = new ( ELeave ) CSPForwardProvider( );
- CleanupStack::PushL( self );
- self->ConstructL( );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor of the object.
-// ---------------------------------------------------------------------------
-//
-CSPForwardProvider::~CSPForwardProvider()
- {
- delete iEmptyArray;
- iObservers.Close();
- }
-
-// ---------------------------------------------------------------------------
-// CSPCall::NotifyForwardEventOccurred
-// Notifies observers about call events
-// ---------------------------------------------------------------------------
-//
-void CSPForwardProvider::NotifyForwardEventOccurred(
- MCCPForwardObserver::TCCPForwardEvent aEvent )
- {
- CSPLOGSTRING2( CSPREQOUT,
- "CSPForwardProvider::ForwardEventOccurred: event: %d", aEvent );
-
- for ( TInt i = 0; i < iObservers.Count(); i++ )
- {
- MCCPForwardObserver *obs = iObservers[i];
- if ( obs )
- {
- obs->ForwardEventOccurred( aEvent );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// Forward address choice array.
-// ---------------------------------------------------------------------------
-//
-const CDesC8Array& CSPForwardProvider::GetForwardAddressChoicesL()
- {
- return *iEmptyArray;
- }
-
-// ---------------------------------------------------------------------------
-// Forward to address.
-// Not supported.
-// ---------------------------------------------------------------------------
-//
-void CSPForwardProvider::ForwardToAddressL( const TInt /*aIndex*/ )
- {
- User::Leave( KErrNotSupported );
- return;
- }
-
-// ---------------------------------------------------------------------------
-// Adds observer to array
-// ---------------------------------------------------------------------------
-//
-void CSPForwardProvider::AddObserverL( const MCCPForwardObserver& aObserver )
- {
- if ( iObservers.Find( &aObserver ) == KErrNotFound )
- {
- iObservers.Append( &aObserver );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Removes observer from array
-// ---------------------------------------------------------------------------
-//
-TInt CSPForwardProvider::RemoveObserver( const MCCPForwardObserver& aObserver )
- {
- TInt found = iObservers.Find( &aObserver );
- if ( found != KErrNotFound )
- {
- iObservers.Remove( found );
- return KErrNone;
- }
- return found;
- }
-
-// ---------------------------------------------------------------------------
-// Default C++ constructor
-// ---------------------------------------------------------------------------
-//
-CSPForwardProvider::CSPForwardProvider( )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPForwardProvider::CSPForwardProvider()" );
- }
-
-// ---------------------------------------------------------------------------
-// Constructing 2nd phase
-// ---------------------------------------------------------------------------
-//
-void CSPForwardProvider::ConstructL()
- {
- CSPLOGSTRING(CSPOBJECT, "CSPForwardProvider::ConstructL()" );
- iEmptyArray = new (ELeave) CDesC8ArrayFlat( 1 );
- }
-
--- a/convergedcallengine/csplugin/src/cspmicrophone.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Mic stream to DevSound.
-*
-*/
-
-
-#include "cspmicrophone.h"
-#include "csplogger.h"
-#include "mcspdevsoundobserver.h"
-
-#include <AudioPreference.h>
-
-// Mute value
-const TInt KSetMuteToDevSound = 0;
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Static constructor.
-// ---------------------------------------------------------------------------
-//
-CSPMicrophone* CSPMicrophone::NewL(
- MCSPDevSoundObserver& aObserver )
- {
- CSPMicrophone* self = new( ELeave ) CSPMicrophone( aObserver );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CSPMicrophone::~CSPMicrophone()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Gives mic mute state
-// ---------------------------------------------------------------------------
-//
-TBool CSPMicrophone::IsMuted()
- {
- const TInt gain( iDevSound->Gain() );
- TBool isMuted = EFalse;
- if ( !gain )
- {
- // Mute is on
- isMuted = ETrue;
- }
- CSPLOGSTRING( CSPINT, "CSPMicrophone::IsMuted" );
- return isMuted;
- }
-
-// ---------------------------------------------------------------------------
-// Set mic muted.
-// ---------------------------------------------------------------------------
-//
-void CSPMicrophone::SetMuted()
- {
- CSPLOGSTRING( CSPINT, "CSPMicrophone::SetMicMuted" );
- iDevSound->SetGain( KSetMuteToDevSound );
- }
-
-// ---------------------------------------------------------------------------
-// Set mic unmuted
-// ---------------------------------------------------------------------------
-//
-void CSPMicrophone::SetUnmuted()
- {
- CSPLOGSTRING( CSPINT, "CSPMicrophone::SetUnmuted" );
- iDevSound->SetGain( iDevSound->MaxGain() );
- }
-
-// ---------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Activation was successfull.
-// ---------------------------------------------------------------------------
-//
-void CSPMicrophone::BufferToBeEmptied( CMMFBuffer* /*aBuffer*/ )
- {
- CSPLOGSTRING( CSPINT, "CSPMicrophone::BufferToBeEmptied" );
-
- // We dont react to devsound messages unless we are activating.
- if( IsActivationOngoing() )
- {
- iActive = ETrue;
- iActivationOngoing = EFalse;
- iObserver.MicActivatedSuccessfully();
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Activation feiled
-// ---------------------------------------------------------------------------
-//
-void CSPMicrophone::RecordError( TInt aError )
- {
- CSPLOGSTRING( CSPINT, "CSPMicrophone::RecordError" );
-
- // We dont react to devsound messages unless we are activating.
- if( IsActivationOngoing() )
- {
- if( aError == KErrAccessDenied )
- {
- iActivationOngoing = EFalse;
- iObserver.MicActivationFailed();
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class CSPDevSound
-// Tries to activate mic stream. Stream becomes active when BufferToBeFilled
-// gets called.
-// ---------------------------------------------------------------------------
-//
-void CSPMicrophone::DoActivateL()
- {
- iDevSound->RecordInitL();
- }
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CSPMicrophone::CSPMicrophone(
- MCSPDevSoundObserver& aObserver ) :
- CSPDevSound( aObserver )
- {
- }
-
-// ---------------------------------------------------------------------------
-// Second phase constructor
-// ---------------------------------------------------------------------------
-//
-void CSPMicrophone::ConstructL()
- {
- CSPDevSound::ConstructL(
- EMMFStateRecording,
- KAudioPrefCSCallUplink,
- KAudioPriorityCSCallUplink );
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/csppanic.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This module contains the implementation of panic function for
-* for CS-plugin.
-*
-*/
-
-
-// INCLUDE FILES
-#include "csppanic.pan"
-#include "e32std.h"
-
-// EXTERNAL DATA STRUCTURES
-// None.
-
-// EXTERNAL FUNCTION PROTOTYPES
-// None.
-
-// CONSTANTS
-// None.
-
-// MACROS
-// None.
-
-// LOCAL CONSTANTS AND MACROS
-// None.
-
-// MODULE DATA STRUCTURES
-// None.
-
-// LOCAL FUNCTION PROTOTYPES
-// None.
-
-// ==================== LOCAL FUNCTIONS ====================
-
-// -----------------------------------------------------------------------------
-// Panic
-// Creates PhoneEngine panic.
-// Returns: None.
-// -----------------------------------------------------------------------------
-//
-GLDEF_C void Panic( TCSPPanic aPanic )
- {
- User::Panic( KCSPPanic, aPanic );
- }
-
-// ===================== MEMBER FUNCTIONS ==================
-// None.
-
-// ================= OTHER EXPORTED FUNCTIONS ==============
-// None.
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspproxy.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: CSP Ecom proxyfile
-*
-*/
-
-
-
-#include <e32base.h>
-#include <implementationproxy.h>
-
-#include "csprovider.h"
-#include "csplogger.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// TImplementationProxy::ImplementationTable
-// ---------------------------------------------------------------------------
-//
-const TImplementationProxy ImplementationTable[] =
- {
- IMPLEMENTATION_PROXY_ENTRY( 0x102828E5, CSProvider::NewL )
- };
-
-// ---------------------------------------------------------------------------
-// TImplementationProxy::ImplementationGroupProxy
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
- TInt& aTableCount )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPPROXY - A");
- aTableCount =
- sizeof( ImplementationTable ) / sizeof( TImplementationProxy );
- CSPLOGSTRING(CSPOBJECT, "CSPPROXY - B");
- return ImplementationTable;
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/csppubsublistener.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,162 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements the class CSPPubSubListener
-*
-*/
-
-
-#include "csppubsublistener.h"
-#include "mcsppubsubobserver.h"
-#include "csplogger.h"
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// CSPPubSubListener::CSPPubSubListener
-// C++ constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CSPPubSubListener::CSPPubSubListener(
- const TUid aUid, const TInt aKey, MCSPPubSubObserver* aObserver ) :
- CActive( CActive::EPriorityStandard ),
- iUid( aUid ), iId( aKey ), iObserver( aObserver )
- {
- }
-
-// -----------------------------------------------------------------------------
-// CSPPubSubListener::~CSPPubSubListener
-// Destructor.
-// -----------------------------------------------------------------------------
-//
-CSPPubSubListener::~CSPPubSubListener()
- {
- CSPLOGSTRING( CSPINT, "CSPPubSubListener::~CSPPubSubListener" )
- Cancel();
- iProperty.Close();
- }
-
-// -----------------------------------------------------------------------------
-// CSPPubSubListener::RunL
-// From CActive.
-// -----------------------------------------------------------------------------
-//
-void CSPPubSubListener::RunL()
- {
- CSPLOGSTRING( CSPINT, "CSPPubSubListener::RunL" )
- const TRequestStatus status( iStatus );
- StartListening();
- iObserver->HandleNotifyPSL( iUid, iId, status );
- CSPLOGSTRING( CSPINT, "CSPPubSubListener::RunL end" )
- }
-
-// -----------------------------------------------------------------------------
-// CSPPubSubListener::DoCancel
-// From CActive.
-// -----------------------------------------------------------------------------
-//
-void CSPPubSubListener::DoCancel()
- {
- CSPLOGSTRING( CSPINT, "CSPPubSubListener::DoCancel")
- iProperty.Cancel();
- }
-
-// -----------------------------------------------------------------------------
-// CSPPubSubListener::RunError
-// From CActive.
-// -----------------------------------------------------------------------------
-//
-TInt CSPPubSubListener::RunError( TInt /*aError*/ )
- {
- CSPLOGSTRING( CSPINT, "CSPPubSubListener::RunError" )
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CSPPubSubListener::NewL
-// -----------------------------------------------------------------------------
-//
-CSPPubSubListener* CSPPubSubListener::NewL( const TUid aUid,
- const TInt aKey, MCSPPubSubObserver* aObserver )
- {
- CSPLOGSTRING( CSPINT, "CSPPubSubListener::NewL" )
- CSPPubSubListener* self = new( ELeave )
- CSPPubSubListener( aUid, aKey, aObserver );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop();
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// CSPPubSubListener::StartListening
-// -----------------------------------------------------------------------------
-//
-void CSPPubSubListener::StartListening()
- {
- iProperty.Subscribe( iStatus );
- SetActive();
- }
-
-// -----------------------------------------------------------------------------
-// CSPPubSubListener::ConstructL
-// -----------------------------------------------------------------------------
-//
-void CSPPubSubListener::ConstructL()
- {
- if ( iObserver )
- {
- CActiveScheduler::Add( this );
- }
-
- User::LeaveIfError ( iProperty.Attach( iUid, iId, EOwnerThread ) );
-
- if ( iObserver )
- {
- StartListening();
- }
- }
-
-// -----------------------------------------------------------------------------
-// CSPPubSubListener::Get
-// Read integer value.
-// -----------------------------------------------------------------------------
-//
-TInt CSPPubSubListener::Get( TInt& aVal )
- {
- return iProperty.Get( iUid, iId, aVal );
- }
-
-// -----------------------------------------------------------------------------
-// CSPPubSubListener::Get
-// Read binary value.
-// -----------------------------------------------------------------------------
-//
-TInt CSPPubSubListener::Get( TDes8& aVal )
- {
- return iProperty.Get( iUid, iId, aVal );
- }
-
-// -----------------------------------------------------------------------------
-// CSPPubSubListener::Get
-// Read string value.
-// -----------------------------------------------------------------------------
-//
-TInt CSPPubSubListener::Get( TDes16& aVal )
- {
- return iProperty.Get( iUid, iId, aVal );
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspremotealertingtonelistener.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +0,0 @@
-/*
-* Copyright (c) 2008-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Listens remote alerting tone status changes
-*
-*/
-
-
-#include "cspremotealertingtonelistener.h"
-#include "mcspremotealertingtoneobserver.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Default constructor
-// ---------------------------------------------------------------------------
-//
-CSPRemoteAlertingToneListener::CSPRemoteAlertingToneListener(
- RMmCustomAPI& aCustomAPI,
- MCSPRemoteAlertingToneObserver& aObserver ) :
- CActive( CActive::EPriorityStandard ),
- iCustomAPI( aCustomAPI ),
- iObserver( aObserver )
- {
- CActiveScheduler::Add( this );
- }
-
-// ---------------------------------------------------------------------------
-// Static constructor
-// ---------------------------------------------------------------------------
-//
-CSPRemoteAlertingToneListener* CSPRemoteAlertingToneListener::NewL(
- RMmCustomAPI& aCustomAPI,
- MCSPRemoteAlertingToneObserver& aObserver )
- {
- CSPRemoteAlertingToneListener* self =
- new( ELeave ) CSPRemoteAlertingToneListener(
- aCustomAPI, aObserver );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CSPRemoteAlertingToneListener::~CSPRemoteAlertingToneListener()
- {
- Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// Starts listening the remote alerting tone changes, if not already started
-// ---------------------------------------------------------------------------
-//
-void CSPRemoteAlertingToneListener::StartListening()
- {
- if ( !IsActive() )
- {
- iCustomAPI.NotifyRemoteAlertingToneStatusChange( iStatus, iRATStatus );
- SetActive();
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// Cancels the oustanding request.
-// ---------------------------------------------------------------------------
-//
-void CSPRemoteAlertingToneListener::DoCancel()
- {
- iCustomAPI.CancelAsyncRequest(
- ECustomNotifyRemoteAlertingToneStatusChangeIPC );
- }
-
-// ---------------------------------------------------------------------------
-// From class CActive.
-// Starts listening next change and notifies the observer if no errors
-// in request completion.
-// ---------------------------------------------------------------------------
-//
-void CSPRemoteAlertingToneListener::RunL()
- {
- const TInt error( iStatus.Int() );
- if ( error != KErrNotSupported )
- {
- StartListening();
- }
- if ( error == KErrNone )
- {
- iObserver.RemoteAlertingToneStatusChanged( iRATStatus );
- }
- }
--- a/convergedcallengine/csplugin/src/csprovider.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1273 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Main class of CS Call Plug-in
-*
-*/
-
-
-// EXTERNAL INCLUDES
-#include <e32base.h>
-#include <mccpconferencecallobserver.h>
-#include <mmtsy_names.h>
-#include <mccpssobserver.h>
-#include <rmmcustomapi.h>
-#include <startupdomainpskeys.h>
-#include <mccecall.h>
-
-// USER INCLUDES
-#include "csprovider.h"
-#include "cspvoicecall.h"
-#include "cspvideocall.h"
-#include "cspetelincomingcallmonitor.h"
-#include "cspetelconferencestatusmonitor.h"
-#include "cspdtmfprovider.h"
-#include "cspconferencecall.h"
-#include "cspcallarray.h"
-#include "cspservicesettingshandler.h"
-#include "cspaudiohandler.h"
-#include "cspetelcallwaitingrequester.h"
-#include "cspsupplementaryservicesmonitor.h"
-#include "cspcipheringstatusmonitor.h"
-#include "cspsssettingshandler.h"
-#include "cspcalladdedhandler.h"
-#include "csppubsublistener.h"
-#include "cspcallcommandhandler.h"
-#include "cspremotealertingtonelistener.h"
-#include "csppanic.pan"
-#include "csplogger.h"
-#include "cspconsts.h"
-
-const TInt KCSServiceId = 1;
-
-// ---------------------------------------------------------------------------
-// CSProvider::CSProvider
-// ---------------------------------------------------------------------------
-//
-CSProvider::CSProvider(): iImplementationUid( KCSPImplementationUid )
- {
- CSPLOGSTRING(CSPOBJECT, "CSProvider::CSProvider");
- iInitialized = EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::~CSProvider
-// ---------------------------------------------------------------------------
-//
-CSProvider::~CSProvider()
- {
- CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider <");
- delete iCallArray;
-
- if ( iInitialized )
- {
- delete iConferenceStatusMonitor;
- delete iCallCommandHandler;
- delete iRemoteAlertingToneListener;
- delete iSimStatusListener;
- delete iSsSettingsHandler;
- delete iAudioHandler;
- delete iSsMonitor;
- delete iCwRequester;
- delete iServiceHandler;
- delete iIncomingVoiceCallMonitor;
- delete iIncomingDataCallMonitor;
- delete iIncomingAuxCallMonitor;
- delete iCallAddedHandler;
- delete iCipheringStatusMonitor;
- delete iDTMFProvider;
-
- CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider close lines");
- iLineContainer.Close();
- CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider close customapi");
- iMmCustom.Close();
- CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider close conference call");
- iMobileConferenceCall.Close();
- CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider close phone");
- iMobilePhone.Close();
- CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider unload phone");
- iServer.UnloadPhoneModule( KMmTsyModuleName );
- CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider close server session");
- iServer.Close();
- }
-
- CSPLOGSTRING(CSPOBJECT, "CSProvider::~CSProvider >");
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::ConstructL
-// ---------------------------------------------------------------------------
-//
-void CSProvider::ConstructL()
- {
- CSPLOGSTRING(CSPOBJECT, "CSProvider::ConstructL <");
- iCallArray = CSPCallArray::NewL();
- CSPLOGSTRING(CSPOBJECT, "CSProvider::ConstructL >");
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::NewL
-// ---------------------------------------------------------------------------
-//
-CSProvider* CSProvider::NewL()
- {
- CSPLOGSTRING(CSPOBJECT, "CSProvider::NewL() <");
- CSProvider* self = new ( ELeave ) CSProvider();
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- CSPLOGSTRING(CSPOBJECT, "CSProvider::NewL() >");
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::NotifySsEvent
-// ---------------------------------------------------------------------------
-//
-void CSProvider::NotifySsEvent(
- RMmCustomAPI::TSsTypeAndMode& aSsTypeAndMode,
- RMmCustomAPI::TSsInfo& aSsInfo )
- {
- CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent <");
- TBuf<10> addr;
-
- switch( aSsTypeAndMode.iSsType )
- {
- case RMmCustomAPI::ESsAllSs:
- {
- CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent ESsAllSs");
- if( iSsSettingsHandler )
- {
- TInt cugIndex( aSsInfo.iCugIndex );
-
- if ( iSsSettingsHandler->IsValueValidCugIndex( cugIndex ) )
- {
- CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent CallCugEventOccurred");
- iSsObserver->CallCugEventOccurred(
- MCCPSsObserver::ECCPSsShowIncCallGroupIndex );
- }
- else
- {
- CSPLOGSTRING2(CSPERROR,
- "CSProvider::NotifySsEvent err invalid cug index %d", cugIndex );
- }
- }
- break;
- }
-
- case RMmCustomAPI::ESsRegPassword:
- case RMmCustomAPI::ESsClip:
- case RMmCustomAPI::ESsClir:
- case RMmCustomAPI::ESsCnap:
- case RMmCustomAPI::ESsColp:
- case RMmCustomAPI::ESsColr:
- {
- CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent Discarding");
- break;
- }
-
- case RMmCustomAPI::ESsCallWaiting:
- {
- CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent ESsCallWaiting");
- iSsObserver->CallForwardEventOccurred(
- MCCPSsObserver::ESsCallWaiting,
- addr );
- break;
- }
-
- case RMmCustomAPI::ESsAllForwardings:
- case RMmCustomAPI::ESsForwUncond:
- case RMmCustomAPI::ESsForwBusy:
- case RMmCustomAPI::ESsForwNoReply:
- case RMmCustomAPI::ESsForwNoReach:
- case RMmCustomAPI::ESsAllCondForwardings:
- {
- switch( aSsInfo.iForwMode )
- {
- case RMmCustomAPI::ESsIncCallIsForw:
- iSsObserver->CallForwardEventOccurred(
- MCCPSsObserver::ECCPSsIncCallIsForw,
- addr );
- break;
- case RMmCustomAPI::ESsIncCallForwToC:
- iSsObserver->CallForwardEventOccurred(
- MCCPSsObserver::ECCPSsIncCallForwToC,
- addr );
- break;
- case RMmCustomAPI::ESsOutCallForwToC:
- iSsObserver->CallForwardEventOccurred(
- MCCPSsObserver::ECCPSsOutCallForwToC,
- addr );
- break;
- default:
- {
- HandleDivertOrBarring( addr, aSsTypeAndMode );
- break;
- }
- }
- break;
- }
-
- case RMmCustomAPI::ESsAllBarrings:
- case RMmCustomAPI::ESsBarrAllOut:
- case RMmCustomAPI::ESsBarrOutInter:
- case RMmCustomAPI::ESsBarrOutInterExcHome:
- case RMmCustomAPI::ESsOutgoingBarrServ:
- {
- iSsObserver->BarringEventOccurred(
- MCCPSsObserver::ECCPSsOutgoingCallBarred );
- break;
- }
-
- case RMmCustomAPI::ESsBarrAllIn:
- case RMmCustomAPI::ESsBarrAllInRoam:
- case RMmCustomAPI::ESsIncomingBarrServ:
- {
- iSsObserver->BarringEventOccurred(
- MCCPSsObserver::ECCPSsIncomingCallBarred );
- break;
- }
-
- default:
- {
- CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent Unknown SS");
- break;
- }
- }
-
- CSPLOGSTRING(CSPINT, "CSProvider::NotifySsEvent >");
- }
-
-// From CConvergedCallProvider
-// ---------------------------------------------------------------------------
-// CSProvider::InitializeL
-// ---------------------------------------------------------------------------
-//
-void CSProvider::InitializeL( const MCCPObserver& aObserver,
- const MCCPSsObserver& aSsObserver )
- {
- CSPLOGSTRING(CSPOBJECT, "CSProvider::InitializeL <");
- if ( iInitialized )
- {
- CSPLOGSTRING(CSPOBJECT,
- "CSProvider::InitializeL() Error already initialized");
- User::Leave( KErrAlreadyExists );
- }
- iInitialized = ETrue;
-
- CreateEtelConnectionsL();
-
- iServiceHandler = CSPServiceSettingsHandler::NewL();
-
- TInt readErr = iServiceHandler->ReadCSServiceId( iServiceId );
- if ( readErr )
- {
- CSPLOGSTRING(CSPERROR, "CSProvider::InitializeL()\
- ERROR COULD NOT READ SERVICE ID FOR CS-PLUGIN ");
- CSPLOGSTRING(CSPERROR, "CSProvider::InitializeL() \
- Please ensure that SPSettings is initialized corretly! ");
- iServiceId = KCSServiceId;
- }
-
- // Save CCP observer as pointer-type member
- const MCCPCSObserver& obs = static_cast<const MCCPCSObserver&>(aObserver);
- iCCPObserver = const_cast<MCCPCSObserver*>(&obs);
-
- // Save CCP SS observer as pointer-type member
- const MCCPSsObserver& ssObs = static_cast<const MCCPSsObserver&>(aSsObserver);
- iSsObserver = const_cast<MCCPSsObserver*>(&ssObs);
-
- RPhone::TLineInfo lineInfo;
- __ASSERT_ALWAYS( iMobilePhone.GetLineInfo( 0, lineInfo )
- == KErrNone, Panic( ECSPPanicNoEtel ) );
-
- // Open Lines. At least voice line must be opened.
- __ASSERT_ALWAYS( iLineContainer.Open( iMobilePhone, iServiceId ) == KErrNone,
- Panic( ECSPPanicNoEtel ) );
-
- RMobileLine& voiceLine = iLineContainer.LineByType(
- RCSPLineContainer::ECSPLineSpeech );
-
- // Create and start incoming voice call monitor for primary line
- iIncomingVoiceCallMonitor = CSPEtelIncomingCallMonitor::NewL( *this,
- voiceLine,
- RCSPLineContainer::ECSPLineSpeech );
- iIncomingVoiceCallMonitor->StartMonitoring();
-
- // Create and start incoming data call monitor for data line
- RMobileLine& dataLine = iLineContainer.LineByType( RCSPLineContainer::ECSPLineData );
- iIncomingDataCallMonitor = CSPEtelIncomingCallMonitor::NewL( *this, dataLine,
- RCSPLineContainer::ECSPLineData );
- iIncomingDataCallMonitor->StartMonitoring();
-
- // Create and start incoming call monitor for auxilary line
- RMobileLine& auxLine = iLineContainer.LineByType( RCSPLineContainer::ECSPLineAuxSpeech );
- iIncomingAuxCallMonitor = CSPEtelIncomingCallMonitor::NewL( *this, auxLine,
- RCSPLineContainer::ECSPLineAuxSpeech );
- iIncomingAuxCallMonitor->StartMonitoring();
-
- iCwRequester = CSPEtelCallWaitingRequester::NewL( iMobilePhone );
-
- // Start conference call monitor for monitoring external conference creation
- iConferenceStatusMonitor = CSPEtelConferenceStatusMonitor::NewL( *this,
- iMobileConferenceCall );
- iConferenceStatusMonitor->StartMonitoring();
-
- CSPLOGSTRING(CSPOBJECT, "CSProvider::InitializeL create DTMF provider");
- iDTMFProvider = CSPDTMFProvider::NewL( iMobilePhone, iMmCustom );
-
- // Create and start ciphering status monitor
- iCipheringStatusMonitor = CSPCipheringStatusMonitor::NewL( iMmCustom, *this );
- iCipheringStatusMonitor->StartMonitoring();
-
- // Create audio handler
- CSPLOGSTRING(CSPOBJECT, "CSProvider::InitializeL create audio handler");
- iAudioHandler = CSPAudioHandler::NewL();
-
- // Create call added handler for listening ext call creation
- iCallAddedHandler = CSPCallAddedHandler::NewL(
- obs,
- iLineContainer,
- *iCallArray,
- *this,
- *iAudioHandler );
-
- iSimStatusListener = CSPPubSubListener::NewL(
- KPSUidStartup,
- KPSSimStatus,
- this );
-
- HandleSIMStatusL();
-
- iRemoteAlertingToneListener =
- CSPRemoteAlertingToneListener::NewL( iMmCustom, *this );
- iRemoteAlertingToneListener->StartListening();
-
- iCallCommandHandler = CSPCallCommandHandler::NewL();
-
- CSPLOGSTRING(CSPOBJECT, "CSProvider::InitializeL >");
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::NewCallL creates MO call.
-// ---------------------------------------------------------------------------
-//
-MCCPCall* CSProvider::NewCallL( const CCCPCallParameters& aCallParameters,
- const TDesC& aRemoteParty,
- const MCCPCallObserver& aObserver )
- {
- CSPLOGSTRING(CSPREQIN, "CSProvider::NewCallL <");
-
- const CCCECallParameters& parameters =
- reinterpret_cast<const CCCECallParameters&> (aCallParameters);
-
- TUint32 serviceId = aCallParameters.ServiceId();
-
- if ( serviceId != iServiceId )
- {
- CSPLOGSTRING(CSPERROR, "CSProvider::NewCallL ERROR, service id not acceptable!");
- User::Leave( ECCPErrorInvalidPhoneNumber );
- }
-
- RCSPLineContainer::TCSPLineId lineId =
- iLineContainer.ResolveLineIdL( parameters );
-
- RMobileLine& line = iLineContainer.LineByType( lineId );
-
- CSPCall* call = NULL;
-
- if ( RCSPLineContainer::ECSPLineSpeech == lineId ||
- RCSPLineContainer::ECSPLineAuxSpeech == lineId )
- {
- call = CSPVoiceCall::NewL( const_cast<TDesC16&>(aRemoteParty),
- line,
- ETrue,
- parameters,
- *this,
- EFalse );
- CleanupStack::PushL( call );
- }
-
- // Create CSPDataCall object for data/video call
- else if ( RCSPLineContainer::ECSPLineData == lineId )
- {
- call = CSPVideoCall::NewL(
- const_cast<TDesC16&>(aRemoteParty),
- line, ETrue, parameters,
- *this );
- CleanupStack::PushL( call );
- }
- else if ( RCSPLineContainer::ECSPLineFax == lineId )
- {
- CSPLOGSTRING(CSPERROR,
- "CSProvider::NewCallL ERROR FAX is unsupported call type");
- User::Leave( KErrNotSupported );
- }
-
- if ( aRemoteParty.Length() == 0 )
- {
- CSPLOGSTRING(CSPERROR, "CSProvider::NewCallL ERROR: aRemoteParty.Length ==0");
-
- User::Leave( ECCPErrorInvalidPhoneNumber );
- }
-
- call->AddObserverL( aObserver );
- TInt err = iCallArray->Add( call );
- User::LeaveIfError( err );
-
- call->SetAudioHandler( iAudioHandler );
-
- CleanupStack::Pop( call );
-
- CSPLOGSTRING(CSPOBJECT, "CSProvider::NewCallL >");
- return call;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::ReleaseCall
-// ---------------------------------------------------------------------------
-//
-TInt CSProvider::ReleaseCall( MCCPCall& aCall )
- {
- CSPLOGSTRING2(CSPREQIN, "CSProvider::ReleaseCall %d", &aCall);
- CSPCall* call = static_cast<CSPCall*>(&aCall);
- TInt err = iCallArray->Remove( call );
- if ( err == KErrNone )
- {
- delete call;
- }
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::NewEmergencyCallL
-// ---------------------------------------------------------------------------
-//
-MCCPEmergencyCall* CSProvider::NewEmergencyCallL( const TUint32 aServiceId,
- const TDesC& aAddress,
- const MCCPCallObserver& aObserver )
- {
- CSPLOGSTRING(CSPOBJECT, "CSProvider::NewEmergencyCallL <");
-
- RMobileLine& voiceLine = iLineContainer.LineByType(
- RCSPLineContainer::ECSPLineSpeech );
- TBuf8<KCCEBearerMaxSize> emptyBearer;
- TBuf<KCCESubAddressMaxSize> emptySubAddress;
-
- CCCECallParameters* tmpParams = CCCECallParameters::NewL();
- CleanupStack::PushL( tmpParams );
- tmpParams->SetServiceId(aServiceId);
- CSPVoiceCall* call = CSPVoiceCall::NewL( aAddress,
- voiceLine,
- ETrue,
- *tmpParams,
- *this,
- ETrue);
-
- CleanupStack::PopAndDestroy( tmpParams );
- CleanupStack::PushL( call );
-
- call->AddObserverL( aObserver );
- TInt err = iCallArray->Add( call );
- User::LeaveIfError( err );
-
- call->SetAudioHandler( iAudioHandler );
-
- CleanupStack::Pop( call );
-
- CSPLOGSTRING(CSPOBJECT, "CSProvider::NewEmergencyCallL >");
- return call;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::ReleaseEmergencyCall
-// ---------------------------------------------------------------------------
-//
-TInt CSProvider::ReleaseEmergencyCall( MCCPEmergencyCall& aCall )
- {
- CSPLOGSTRING(CSPOBJECT, "CSProvider::ReleaseEmergencyCall");
- CSPVoiceCall* call = static_cast<CSPVoiceCall*>(&aCall);
- iCallArray->Remove( call );
- delete call;
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::NewConferenceL
-// ---------------------------------------------------------------------------
-//
-MCCPConferenceCall* CSProvider::NewConferenceL(
- const TUint32 /*aServiceId*/,
- const MCCPConferenceCallObserver& aObserver )
- {
- CSPLOGSTRING(CSPREQIN, "CSProvider::NewConferenceL <");
- if ( !iConferenceCall )
- {
- iConferenceCall = CSPConferenceCall::NewL(
- iMobilePhone, *iCallArray, iServiceId );
- iConferenceCall->AddObserverL( aObserver );
- }
- else
- {
- CSPLOGSTRING(CSPERROR, "CSProvider::NewConferenceL()\
- Error conference already exists");
- User::Leave( KErrAlreadyExists );
- }
- CSPLOGSTRING(CSPREQOUT, "CSProvider::NewConferenceL >");
- return iConferenceCall;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::ReleaseConferenceCall
-// ---------------------------------------------------------------------------
-//
-TInt CSProvider::ReleaseConferenceCall( MCCPConferenceCall& aCall )
- {
- CSPLOGSTRING(CSPREQIN, "CSProvider::ReleaseConferenceCall");
- TInt ret( KErrNone );
- if ( &aCall == iConferenceCall )
- {
- delete iConferenceCall;
- iConferenceCall = NULL;
- }
- else
- {
- CSPLOGSTRING(CSPERROR,
- "CSProvider::ReleaseConferenceCall Error call not found");
- ret = KErrNotFound;
- }
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::Uid
-// ---------------------------------------------------------------------------
-//
-const TUid& CSProvider::Uid() const
- {
- CSPLOGSTRING2(CSPREQIN, "CSProvider::Uid uid: %d", iImplementationUid);
- return iImplementationUid;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::Caps
-// ---------------------------------------------------------------------------
-//
-TUint32 CSProvider::Caps( ) const
- {
- CSPLOGSTRING(CSPREQIN, "CSProvider::Caps");
- return NULL;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::DTMFProvider
-// ---------------------------------------------------------------------------
-//
-MCCPDTMFProvider* CSProvider::DTMFProviderL(
- const MCCPDTMFObserver& aObserver )
- {
- CSPLOGSTRING2(CSPREQIN,
- "CSProvider::DTMFProvider observer: %x", &aObserver);
- iDTMFProvider->AddObserverL( aObserver );
- CSPLOGSTRING(CSPREQIN, "CSProvider::DTMFProvider observer added");
- return iDTMFProvider;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::ExtensionProvider
-// ---------------------------------------------------------------------------
-//
-MCCPExtensionProvider* CSProvider::ExtensionProviderL(
- const MCCPExtensionObserver& /*aObserver*/)
- {
- CSPLOGSTRING(CSPREQIN, "CSProvider::ExtensionProvider");
- return NULL;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::GetLifeTime
-// ---------------------------------------------------------------------------
-//
-TBool CSProvider::GetLifeTime( TDes8& aLifeTimeInfo )
- {
- CSPLOGSTRING(CSPREQIN, "CSProvider::GetLifeTime");
- TInt err = iMmCustom.GetLifeTime( aLifeTimeInfo );
- if ( err )
- {
- return EFalse;
- }
- return ETrue;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::GetCSInfo
-// ---------------------------------------------------------------------------
-//
-TBool CSProvider::GetCSInfo( CSInfo& aCSInfo )
- {
- CSPLOGSTRING(CSPREQIN, "CSProvider::GetCSInfo");
- if ( iInitialized )
- {
- RMobilePhone::TMobilePhoneIdentityV1 imei;
- TRequestStatus reqStatus( KErrNone );
-
- CSPLOGSTRING(CSPREQOUT,
- "CSProvider::GetCSInfo request get phone id");
- iMobilePhone.GetPhoneId( reqStatus, imei );
- User::WaitForRequest( reqStatus );
- CSPLOGSTRING(CSPREQOUT,
- "CSProvider::GetCSInfo completed get phone id");
-
- if ( reqStatus.Int() != KErrNone )
- {
- imei.iSerialNumber.Zero();
- }
-
- aCSInfo.iSerialNumber = imei.iSerialNumber;
- return reqStatus.Int() == KErrNone;
- }
-
- return iInitialized;
- }
-
-// ---------------------------------------------------------------------------
-// From MCSPIncomingCallObserver
-// CSProvider::IncomingCallArrived
-// ---------------------------------------------------------------------------
-//
-void CSProvider::IncomingCallArrived( RMobileLine& aLine, TName aCallName,
- RCSPLineContainer::TCSPLineId aLineId )
- {
- RMobileLine::TLineInfo lineInfo;
- aLine.GetInfo( lineInfo );
- CSPLOGSTRING2(CSPINT, "CSProvider::IncomingCallArrived < line id %d", aLineId );
- CSPLOGSTRING2(CSPINT, "CSProvider::IncomingCallArrived call name %S", &aCallName );
-
- CSPLOGSTRING2(CSPINT, "CSProvider::IncomingCallArrived answ %S", &lineInfo.iNameOfCallForAnswering );
- CSPLOGSTRING2(CSPINT, "CSProvider::IncomingCallArrived last %S", &lineInfo.iNameOfLastCallAdded );
- CSPLOGSTRING2(CSPINT, "CSProvider::IncomingCallArrived status %d", lineInfo.iStatus );
- CSPLOGSTRING2(CSPINT, "CSProvider::IncomingCallArrived hook %d", lineInfo.iHookStatus );
-
- // Find call by name.
- // In case CallAddedHandler has opened it and added to array,
- // it should not be re-opened.
- if ( !iCallArray->FindCall( aCallName ) )
- {
- TInt err(KErrUnknown);
- TUint32 serviceId( 0 );
- CCPCall::TCallType callType;
- CCCECallParameters::TCCELineType lineType;
- err = iLineContainer.ResolveCallInfo( aLineId, serviceId, callType, lineType );
-
- if ( !err )
- {
- CSPCall* call = NULL;
- TBuf8<KCCEBearerMaxSize> emptyBearer;
- TBuf<KCCESubAddressMaxSize> emptySubAddress;
- CCCECallParameters* callParameters = NULL;
- TRAP_IGNORE( callParameters = CCCECallParameters::NewL() );
- if ( callParameters )
- {
- callParameters->SetServiceId(serviceId);
- callParameters->SetCallType(callType);
- callParameters->SetLineType(lineType);
- callParameters->SetOrigin(CCCECallParameters::ECCECallOriginPhone);
-
- if ( callType == CCPCall::ECallTypeCSVoice )
- {
- TRAP( err, call = CSPVoiceCall::NewL( aCallName,
- aLine,
- EFalse,
- *callParameters,
- *this,
- EFalse ) );
- }
- else if ( callType == CCPCall::ECallTypeVideo )
- {
- TRAP( err, call = CSPVideoCall::NewL( aCallName,
- aLine,
- EFalse,
- *callParameters,
- *this ) );
- }
- else
- {
- CSPLOGSTRING2(CSPERROR,
- "CSProvider::IncomingCallArrived() unknown call type %d", err );
- err = KErrUnknown;
- }
-
- delete callParameters;
- }
-
- if ( call && err == KErrNone )
- {
- TInt appendError = iCallArray->Add( call );
- CSPLOGSTRING2(CSPERROR,
- "CSProvider::IncomingCallArrived Appending call res %d",
- appendError);
-
- // Set audio handler for DevSound.
- call->SetAudioHandler( iAudioHandler );
-
- // Indicate incoming call for observer.
- TInt err = IndicateIncomingCall( call );
-
- if ( KErrNone == err &&
- call->State() == MCCPCallObserver::ECCPStateAnswering )
- {
- // If call has proceeded already to Answering state (autoanswer)
- // a change notification needs to be sent.
- call->NotifyCallStateChangedETel( RMobileCall::EStatusAnswering );
- }
-
- if ( err )
- {
- iCallArray->Remove( call );
- delete call;
- }
-
- CSPLOGSTRING( CSPINT, "CSProvider::IncomingCallArrived Inform CCE OK" );
- }
- else if ( call && err != KErrNone )
- {
- // Delete call, call array removal not needed.
- delete call;
- }
- else
- {
- CSPLOGSTRING2(CSPERROR,
- "CSProvider::IncomingCallArrived Call could not be created %d", err);
- }
- }
- else
- {
- CSPLOGSTRING2(CSPERROR, "CSProvider::IncomingCallArrived ERROR Resolve call info err=%d",
- err);
- }
- }
- CSPLOGSTRING(CSPINT, "CSProvider::IncomingCallArrived >");
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::GetCallWaitingL
-// ---------------------------------------------------------------------------
-//
-void CSProvider::GetCallWaitingL( const CCCECallParameters& aParams,
- TBool& aCallWaitingStatus )
- {
- CSPLOGSTRING(CSPINT, "CSProvider::GetCallWaitingL <");
-
- // If there are already connected or held call: call waiting must be
- // already ON.
- TInt callCount = iCallArray->GetCallCount();
- TInt activeCallCount = 0;
- for (TInt i = 0; i < callCount; i++)
- {
- switch (iCallArray->Get(i)->State())
- {
- case MCCPCallObserver::ECCPStateConnected:
- {
- activeCallCount++;
- break;
- }
- case MCCPCallObserver::ECCPStateHold:
- {
- activeCallCount++;
- break;
- }
- case MCCPCallObserver::ECCPStateAnswering:
- {
- activeCallCount++;
- break;
- }
- }
- }
- if ( activeCallCount > 0 )
- {
- // CW status must be ON, so it is not reasonable to ask it from network
- aCallWaitingStatus = ETrue;
- }
- else
- {
- iCwRequester->GetCallWaitingL( aParams, aCallWaitingStatus );
- }
-
- CSPLOGSTRING(CSPINT, "CSProvider::GetCallWaitingL >");
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::GetDiagnosticError
-// ---------------------------------------------------------------------------
-//
-TInt CSProvider::GetDiagnosticError( TName& aCallName )
- {
- CSPLOGSTRING2(CSPINT,
- "CSProvider::GetDiagnosticError call name %S", &aCallName );
- return iMmCustom.GetDiagnosticInfo( aCallName );
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::NetworkSecurityStatus
-// ---------------------------------------------------------------------------
-//
-TBool CSProvider::NetworkSecurityStatus() const
- {
- CSPLOGSTRING(CSPINT, "CSProvider::NetworkSecurityStatus");
- return iCipheringStatusMonitor->NetworkSecurityStatus();
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::SecureSpecified
-// ---------------------------------------------------------------------------
-//
-TBool CSProvider::SecureSpecified() const
- {
- CSPLOGSTRING(CSPINT, "CSProvider::SecureSpecified");
- return iCipheringStatusMonitor->SecureSpecified();
- }
-
-// ---------------------------------------------------------------------------
-// Remote alerting tone playing status. Error situation is handled as no tone.
-// ---------------------------------------------------------------------------
-//
-RMmCustomAPI::TRemoteAlertingToneStatus CSProvider::GetRemoteAlertingToneStatus()
- {
- RMmCustomAPI::TRemoteAlertingToneStatus status;
- TInt err = iMmCustom.GetRemoteAlertingToneStatus( status );
- if ( err )
- {
- status = RMmCustomAPI::EUiNoTone;
- }
- CSPLOGSTRING2(CSPINT,
- "CSProvider::GetRemoteAlertingToneStatus status: %d", status );
- return status;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::SecuritySettingChanged
-// ---------------------------------------------------------------------------
-//
-void CSProvider::SecuritySettingChanged( TInt aValue )
- {
- CSPLOGSTRING2(CSPINT,
- "CSProvider::SecuritySettingChanged value: %d", aValue);
-
- TInt callCount = iCallArray->GetCallCount();
- for (TInt i = 0; i < callCount; i++)
- {
- iCallArray->Get(i)->SecuritySettingChanged( aValue );
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::CreateEtelConnectionsL
-// ---------------------------------------------------------------------------
-//
-void CSProvider::CreateEtelConnectionsL()
- {
- CSPLOGSTRING(CSPINT, "CSProvider::CreateEtelConnectionsL <");
-
- TInt errorCode( KErrNone );
- TInt phoneCount( 0 );
- RTelServer::TPhoneInfo phoneInfo;
-
- //This method connects the client to the ETel Server.
- //It must be used before any of other functions during a telephony session.
- __ASSERT_ALWAYS( iServer.Connect( KNbrOfMessageSlots )
- == KErrNone, Panic( ECSPPanicNoEtel ) );
-
- //This method loads an ETel TSY module. mmtsy
- errorCode = iServer.LoadPhoneModule( KMmTsyModuleName );
- __ASSERT_ALWAYS(
- errorCode == KErrNone || errorCode == KErrAlreadyExists,
- Panic( ECSPPanicNoEtel ) );
-
- errorCode = iServer.SetExtendedErrorGranularity(
- RTelServer::EErrorExtended );
- __ASSERT_ALWAYS( errorCode == KErrNone, Panic( ECSPPanicNoEtel ) );
-
- errorCode = iServer.SetPriorityClientV2();
- CSPLOGSTRING2(CSPINT, "CSProvider:: Priority client: %d", errorCode );
- if( KErrAlreadyExists == errorCode )
- {
- CSPLOGSTRING(CSPOBJECT, "CSProvider::CreateEtelConnectionsL() Already initialized");
- User::Leave( KErrAlreadyExists );
- }
- //This method retrieves the total number of phones supported by all
- //the currently loaded ETel (TSY) modules.
- errorCode = iServer.EnumeratePhones( phoneCount );
- __ASSERT_ALWAYS( errorCode == KErrNone, Panic( ECSPPanicNoEtel ) );
-
- //This method retrieves information associated with the specified phone
- while ( phoneCount-- )
- {
- errorCode = iServer.GetPhoneInfo( phoneCount, phoneInfo );
- __ASSERT_ALWAYS( errorCode == KErrNone, Panic( ECSPPanicNoEtel ) );
-
- if ( phoneInfo.iName == KMmTsyPhoneName )
- {
- phoneCount = 0;
- }
- }
-
- //This method opens a phone subsession by name,
- //and starts the modem initialisation process.
- errorCode = iMobilePhone.Open( iServer, phoneInfo.iName );
- __ASSERT_ALWAYS( errorCode == KErrNone, Panic( ECSPPanicNoEtel ) );
-
- iMobilePhone.SetEmergencyClient(RPhone::EEmergencyCSVoiceCallRequest);
-
- errorCode = iMobileConferenceCall.Open( iMobilePhone );
- __ASSERT_ALWAYS( errorCode == KErrNone, Panic( ECSPPanicNoEtel ) );
-
- errorCode = iMmCustom.Open( iMobilePhone );
- __ASSERT_ALWAYS( errorCode == KErrNone, Panic( ECSPPanicNoEtel ) );
-
- iSsMonitor = new (ELeave)
- CSPSupplementaryServicesMonitor( *this, iMmCustom );
- iSsMonitor->StartMonitoring();
-
- CSPLOGSTRING(CSPINT, "CSProvider::CreateEtelConnectionsL >");
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::HandleDivertOrBarring
-// Helper method.
-// ---------------------------------------------------------------------------
-//
-void CSProvider::HandleDivertOrBarring(TDesC& addr, RMmCustomAPI::TSsTypeAndMode& aSsTypeAndMode)
- {
- CSPLOGSTRING(CSPINT, "CSProvider::HandleDivertOrBarring <");
- switch ( aSsTypeAndMode.iSsType )
- {
- // MO unconditional diverts
- case RMmCustomAPI::ESsAllForwardings:
- case RMmCustomAPI::ESsForwUncond:
- {
- if( aSsTypeAndMode.iSsMode == RMmCustomAPI::ESsModeActive )
- {
- iSsObserver->CallForwardEventOccurred(
- MCCPSsObserver::ECCPSsForwardUnconditionalModeActive,
- addr );
- }
- else
- {
- iSsObserver->CallForwardEventOccurred(
- MCCPSsObserver::ECCPSsForwardUnconditionalModeNotActive,
- addr );
- }
- break;
- }
-
- // MO conditional diverts
- case RMmCustomAPI::ESsForwBusy:
- case RMmCustomAPI::ESsForwNoReply:
- case RMmCustomAPI::ESsForwNoReach:
- case RMmCustomAPI::ESsAllCondForwardings:
- {
- if( aSsTypeAndMode.iSsMode == RMmCustomAPI::ESsModeActive )
- {
- iSsObserver->CallForwardEventOccurred(
- MCCPSsObserver::ECCPSsForwardConditionallyModeActive,
- addr );
- }
- else
- {
- iSsObserver->CallForwardEventOccurred(
- MCCPSsObserver::ECCPSsForwardConditionallyModeNotActive,
- addr );
- }
- break;
- }
- default:
- {
- // No handling needed
- }
- }
- CSPLOGSTRING(CSPINT, "CSProvider::HandleDivertOrBarring >");
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::InitializeCallParameters
-// Initialises call parameters from SSSettings
-// ---------------------------------------------------------------------------
-//
-void CSProvider::InitializeCallParameters( RMobileCall::TMobileCallParamsV7& aParams )
- {
- CSPLOGSTRING(CSPINT, "CSProvider::InitializeCallParameters <");
- TInt defaultCug(0);
- TInt cug(0);
-
- if( iSsSettingsHandler )
- {
- TRAP_IGNORE(iSsSettingsHandler->GetClirL( aParams.iIdRestrict ));
- TRAP_IGNORE(iSsSettingsHandler->GetDefaultCugL( defaultCug ));
- TRAP_IGNORE(iSsSettingsHandler->GetCugL( cug ));
- }
-
- // This is always set to false thus allowing calls outside groups.
- aParams.iCug.iSuppressOA = EFalse;
-
- if ( cug >= 0 && cug != defaultCug ) // set group
- {
- // Invoke cug.
- aParams.iCug.iCugIndex = cug;
- aParams.iCug.iExplicitInvoke = ETrue;
- aParams.iCug.iSuppressPrefCug = ETrue;
- }
- else if ( cug == -1 ) // -1 supress
- {
- aParams.iCug.iCugIndex = defaultCug;
- aParams.iCug.iExplicitInvoke = ETrue;
- aParams.iCug.iSuppressPrefCug = ETrue;
- }
- else // default cug
- {
- aParams.iCug.iCugIndex = defaultCug;
- aParams.iCug.iExplicitInvoke = EFalse;
- aParams.iCug.iSuppressPrefCug = EFalse;
- }
- CSPLOGSTRING(CSPINT, "CSProvider::InitializeCallParameters >");
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::InitializeDataCallParameters
-// Initialises call parameters from SSSettings
-// ---------------------------------------------------------------------------
-//
-void CSProvider::InitializeDataCallParameters( RMobileCall::TMobileHscsdCallParamsV1& aParams )
- {
- CSPLOGSTRING(CSPINT, "CSProvider::InitializeDataCallParameters <");
- TInt defaultCug(0);
- TInt cug(0);
-
- if( iSsSettingsHandler )
- {
- TRAP_IGNORE(iSsSettingsHandler->GetClirL( aParams.iIdRestrict ));
- TRAP_IGNORE(iSsSettingsHandler->GetDefaultCugL( defaultCug ));
- TRAP_IGNORE(iSsSettingsHandler->GetCugL( cug ));
- }
-
- // This is always set to false thus allowing calls outside groups.
- aParams.iCug.iSuppressOA = EFalse;
-
- if ( cug >= 0 && cug != defaultCug ) // set group
- {
- // Invoke cug.
- aParams.iCug.iCugIndex = cug;
- aParams.iCug.iExplicitInvoke = ETrue;
- aParams.iCug.iSuppressPrefCug = ETrue;
- }
- else if ( cug == -1 ) // -1 supress
- {
- aParams.iCug.iCugIndex = defaultCug;
- aParams.iCug.iExplicitInvoke = ETrue;
- aParams.iCug.iSuppressPrefCug = ETrue;
- }
- else // default cug
- {
- aParams.iCug.iCugIndex = defaultCug;
- aParams.iCug.iExplicitInvoke = EFalse;
- aParams.iCug.iSuppressPrefCug = EFalse;
- }
-
- CSPLOGSTRING(CSPINT, "CSProvider::InitializeDataCallParameters >");
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::IndicateClientCall
-// This fucntion delivers call pointer to be managed by CCE.
-// ---------------------------------------------------------------------------
-//
-void CSProvider::IndicateClientCall( MCCPCSCall* aCall )
- {
- CSPLOGSTRING2(CSPINT, "CSProvider::IndicateClientCall call: %x", aCall);
- iCCPObserver->MoCallCreated( *aCall );
- CSPLOGSTRING(CSPINT, "CSProvider::IndicateClientCall Inform CCE OK");
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::IndicateIncomingCall
-// This fucntion delivers call pointer to be managed by CCE.
-// ---------------------------------------------------------------------------
-//
-TInt CSProvider::IndicateIncomingCall( MCCPCSCall* aCall )
- {
- CSPLOGSTRING2(CSPINT,
- "CSProvider::IncomingCallArrived call: %x, inform CCE", aCall);
- iCCPObserver->IncomingCall( aCall );
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::NotifyDataPortName
-// ---------------------------------------------------------------------------
-//
-void CSProvider::NotifyDataPortName( TName& aDataPortName )
- {
- CSPLOGSTRING2(CSPINT,
- "CSProvider::NotifyDataPortName name: %S", &aDataPortName);
- iCCPObserver->DataPortName( aDataPortName );
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::HandleNotifyPSL
-// From MCSPPubSubObserver.
-// ---------------------------------------------------------------------------
-//
-void CSProvider::HandleNotifyPSL( const TUid /*aUid*/, const TInt& /*aKey*/,
- const TRequestStatus& /*aStatus*/ )
- {
- CSPLOGSTRING(CSPINT, "CSProvider::HandleNotifyPSL");
- HandleSIMStatusL();
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::RemoteAlertingToneStatusChanged
-// From MCSPRemoteAlertingToneObserver.
-// Notify all calls about the change. Call is responsible for
-// notifying observer if the status change was for the call.
-// ---------------------------------------------------------------------------
-//
-void CSProvider::RemoteAlertingToneStatusChanged(
- RMmCustomAPI::TRemoteAlertingToneStatus aNewStatus )
- {
- CSPLOGSTRING(CSPINT, "CSProvider::RemoteAlertingToneStatusChanged");
- for ( TInt i = 0; i < iCallArray->GetCallCount(); i++ )
- {
- CSPCall* call = iCallArray->Get( i );
- if ( call )
- {
- call->RemoteAlertingToneStatusChanged( aNewStatus );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::HandleSIMStatusL
-// ---------------------------------------------------------------------------
-//
-void CSProvider::HandleSIMStatusL()
- {
- CSPLOGSTRING(CSPINT, "CSProvider::HandleSIMStatusL");
- if ( !iSsSettingsHandler && iSimStatusListener )
- {
- TInt simState( ESimNotReady );
- TInt err = iSimStatusListener->Get( simState );
- if ( err == KErrNone && simState == ESimUsable )
- {
- iSsSettingsHandler = CSPSsSettingsHandler::NewL( *iSsObserver );
- }
- else
- {
- CSPLOGSTRING2( CSPERROR, "CSProvider::HandleSIMStatusL, err: %d", err );
- }
- }
-
- if ( iSsSettingsHandler && iSimStatusListener )
- {
- delete iSimStatusListener;
- iSimStatusListener = NULL;
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::IndicateActiveHangup
-// ---------------------------------------------------------------------------
-//
-TInt CSProvider::IndicateActiveHangup( MCCPCallCommandHandling& aCall )
- {
- CSPLOGSTRING(CSPINT, "CSProvider::IndicateActiveHangup");
- return iCallCommandHandler->IndicateActiveHangup( aCall );
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::IndicateHangupComplete
-// ---------------------------------------------------------------------------
-//
-TInt CSProvider::IndicateHangupComplete( MCCPCallCommandHandling& aCall )
- {
- CSPLOGSTRING(CSPINT, "CSProvider::IndicateHangupComplete");
- return iCallCommandHandler->IndicateHangupComplete( aCall );
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::IndicateDialRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSProvider::IndicateDialRequest( MCCPCallCommandHandling& aCall )
- {
- CSPLOGSTRING(CSPINT, "CSProvider::IndicateDialRequest");
- return iCallCommandHandler->IndicateDialRequest( aCall );
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::IndicateAnswerRequest
-// ---------------------------------------------------------------------------
-//
-TInt CSProvider::IndicateAnswerRequest( MCCPCallCommandHandling& aCall )
- {
- CSPLOGSTRING(CSPINT, "CSProvider::IndicateAnswerRequest");
- return iCallCommandHandler->IndicateAnswerRequest( aCall );
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::DontReportTerminationError
-// ---------------------------------------------------------------------------
-//
-TInt CSProvider::DontReportTerminationError()
- {
- CSPLOGSTRING(CSPINT, "CSProvider::DontReportTerminationError");
-
- TInt callCount = iCallArray->GetCallCount();
- for ( TInt i = 0; i < callCount; i++ )
- {
- if ( iCallArray->Get(i)->State() == MCCPCallObserver::ECCPStateConnecting )
- {
- iCallArray->Get(i)->DontReportTerminationError();
- return KErrNone;
- }
- }
- return KErrNotFound;
- }
-
-// ---------------------------------------------------------------------------
-// CSProvider::NotifyStateChange
-// ---------------------------------------------------------------------------
-//
-void CSProvider::NotifyStateChange(
- MCSPConferenceStatusObserver::TCSPConferenceState aStatus )
- {
- CSPLOGSTRING(CSPINT, "CSProvider::NotifyStateChange");
-
- if ( !iConferenceCall &&
- aStatus == MCSPConferenceStatusObserver::ECSPConferenceActive )
- {
- TRAPD( err, iConferenceCall = CSPConferenceCall::NewL(
- iMobilePhone, *iCallArray, iServiceId ) );
- if ( KErrNone == err )
- {
- CSPLOGSTRING( CSPINT, "CSProvider::NotifyStateChange ext conference created" );
- iCCPObserver->ConferenceCallCreated( *iConferenceCall );
- }
- else
- {
- CSPLOGSTRING2(CSPERROR, "CSProvider::NotifyStateChange \
- ext conference creation error %d", err);
- }
- }
- }
-
-// End of File
-
--- a/convergedcallengine/csplugin/src/cspservicesettingshandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Contains the implementation of class CSPServiceSettingsHandler
-*
-*/
-
-
-// CLASS HEADER
-#include "cspservicesettingshandler.h"
-
-// EXTERNAL INCLUDES
-#include <spsettings.h>
-#include <spentry.h>
-
-// INTERNAL INCLUDES
-#include "csplogger.h"
-
-
-_LIT(KLineNameVoice, "CS");
-
-
-
-CSPServiceSettingsHandler* CSPServiceSettingsHandler::NewL( )
- {
- CSPServiceSettingsHandler* self
- = new ( ELeave ) CSPServiceSettingsHandler( );
- CleanupStack::PushL( self );
- self->ConstructL( );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor of the object.
-// ---------------------------------------------------------------------------
-//
-CSPServiceSettingsHandler::~CSPServiceSettingsHandler( )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPServiceSettingsHandler::~CSPServiceSettingsHandler()" );
- }
-
-// ---------------------------------------------------------------------------
-// Finds service ID by name.
-// ---------------------------------------------------------------------------
-//
-void CSPServiceSettingsHandler::FindByNameL( const TDesC& aName,
- TUint32& aServiceId )
- {
- CSPLOGSTRING(CSPINT, "CSPServiceSettingsHandler::FindByNameL()" );
- CSPLOGSTRING2(CSPINT, "CSPServiceSettingsHandler::FindByNameL() Name=%S", &aName );
- CSPSettings* settingsApi = CSPSettings::NewLC();
- RIdArray idArray;
- CleanupClosePushL( idArray );
- TInt err = settingsApi->FindServiceIdsL( idArray );
-
- TBool found = EFalse;
- if ( KErrNone == err )
- {
- TInt idCount = idArray.Count();
- if( idCount > 0 )
- {
-
- for ( TInt i = 0; !found && i < idCount; i++ )
- {
- CSPEntry* entry = CSPEntry::NewLC();
- TInt ferr = settingsApi->FindEntryL( idArray[i], *entry );
-
- if( ferr == KErrNone
- && aName.Compare( entry->GetServiceName() ) == 0 )
- {
- aServiceId = idArray[i];
- found = ETrue;
- }
- CleanupStack::PopAndDestroy( entry );
- }
- }
- else
- {
- err = KErrNotFound;
- }
- }
-
- if ( !found )
- {
- err = KErrNotFound;
- }
-
- CleanupStack::PopAndDestroy( &idArray );
- CleanupStack::PopAndDestroy( settingsApi );
- CSPLOGSTRING3(CSPINT, "CSProvider::FindByNameL() err = %d serv_id = %u",
- err, aServiceId );
- User::LeaveIfError( err );
- }
-
-
-
-TInt CSPServiceSettingsHandler::ReadCSServiceId( TUint32& aServiceId )
- {
- TRAPD( err, FindByNameL( KLineNameVoice, aServiceId ) );
-
- if ( err )
- {
- CSPLOGSTRING2(CSPINT,
- "CSPServiceSettingsHandler::FindByNameL() leave %d",
- err );
- }
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the requester.
-// ---------------------------------------------------------------------------
-//
-CSPServiceSettingsHandler::CSPServiceSettingsHandler( )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPServiceSettingsHandler::CSPServiceSettingsHandler()" );
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the requester in the second phase.
-// ---------------------------------------------------------------------------
-//
-void CSPServiceSettingsHandler::ConstructL( )
- {
- }
-
-
--- a/convergedcallengine/csplugin/src/cspspeaker.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,158 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Provides speaker functionality
-*
-*/
-
-
-#include <AudioPreference.h>
-
-#include "cspspeaker.h"
-#include "csplogger.h"
-#include "mcspdevsoundobserver.h"
-
-//Audio levels
-//Max volume level
-const TInt KMaxVolumeLevel = 10;
-
-// ---------------------------------------------------------------------------
-// Static constructor
-// ---------------------------------------------------------------------------
-//
-CSPSpeaker* CSPSpeaker::NewL(
- MCSPDevSoundObserver& aObserver )
- {
- CSPSpeaker* self = new( ELeave ) CSPSpeaker( aObserver );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor.
-// ---------------------------------------------------------------------------
-//
-CSPSpeaker::~CSPSpeaker()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Sets volume
-// Volume needs to be converted from 0-10 scale to the volume scale used by
-// DevSound 0 - MaxVolume().
-// No need to check aVolume value, because devsound takes care
-// than illegal value are converted to legal, ie <0 are 0 and >MaxVolume
-// are set to MaxVolume.
-// ---------------------------------------------------------------------------
-//
-void CSPSpeaker::SetVolume( TInt aVolume )
- {
- TInt vol( 0 );
- vol = iDevSound->MaxVolume() * aVolume / KMaxVolumeLevel;
- iDevSound->SetVolume( vol );
- CSPLOGSTRING2(CSPINT, "CSPSpeaker::SetVolume() \
- vol=%d", vol );
- CSPLOGSTRING2(CSPINT, "CSPSpeaker::SetVolume() \
- maxVol=%d", iDevSound->MaxVolume() );
- }
-
-// ---------------------------------------------------------------------------
-// Gives volume
-// ---------------------------------------------------------------------------
-//
-TInt CSPSpeaker::Volume()
- {
- TInt devVol = iDevSound->Volume();
- CSPLOGSTRING2(CSPINT, "CSPSpeaker::Volume \
- vol from DevSound =%d", devVol );
- TInt vol = devVol * KMaxVolumeLevel / iDevSound->MaxVolume();
-
- CSPLOGSTRING2(CSPINT, "CSPSpeaker::Volume() \
- vol=%d", vol );
-
- return vol;
- }
-
-// ---------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Speaker stream has been activated successfully.
-// ---------------------------------------------------------------------------
-//
-void CSPSpeaker::BufferToBeFilled( CMMFBuffer* /*aBuffer*/ )
- {
- CSPLOGSTRING( CSPINT, "CSPSpeaker::BufferToBeFilled activated" );
- // We dont react to devsound messages unless we are activating.
- if( IsActivationOngoing() )
- {
- iActive = ETrue;
- iActivationOngoing = EFalse;
- iObserver.SpeakerActivatedSuccessfully();
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class MDevSoundObserver
-// Speaker stream activation failed
-// ---------------------------------------------------------------------------
-//
-void CSPSpeaker::PlayError( TInt aError )
- {
- CSPLOGSTRING( CSPINT, "CSPSpeaker::PlayError" );
-
- // We dont react to devsound messages unless we are activating.
- if( IsActivationOngoing() )
- {
- CSPLOGSTRING( CSPINT, "CSPSpeaker::PlayError activation failed" );
- if( aError == KErrAccessDenied )
- {
- iActivationOngoing = EFalse;
- iObserver.SpeakerActivationFailed();
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// From class CSPDevsound
-// Tries to activate speaker stream.
-// ---------------------------------------------------------------------------
-//
-void CSPSpeaker::DoActivateL()
- {
- iDevSound->PlayInitL();
- }
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CSPSpeaker::CSPSpeaker(
- MCSPDevSoundObserver& aObserver ) :
- CSPDevSound( aObserver )
- {
- }
-
-// ---------------------------------------------------------------------------
-// Second phase constructor
-// ---------------------------------------------------------------------------
-//
-void CSPSpeaker::ConstructL()
- {
- CSPDevSound::ConstructL(
- EMMFStatePlaying,
- KAudioPrefCSCallDownlink,
- KAudioPriorityCSCallDownlink );
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspsssettingshandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,321 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: implementation of CSPSsSettingsHandler class.
-*
-*/
-
-
-// INCLUDES
-#include "cspsssettingshandler.h"
-#include "csplogger.h"
-#include "csppanic.pan"
-
-#include <etelmm.h>
-#include <mccpssobserver.h>
-
-
-// -----------------------------------------------------------------------------
-// CSPSsSettingsHandler::CSPSsSettingsHandler
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CSPSsSettingsHandler::CSPSsSettingsHandler( const MCCPSsObserver& aObs ) :
- iObserver( const_cast<MCCPSsObserver&>(aObs) )
- {
- CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::CSPSsSettingsHandler" );
- }
-
-// -----------------------------------------------------------------------------
-// CSPSsSettingsHandler::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CSPSsSettingsHandler::ConstructL()
- {
- CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::ConstructL <" );
- User::LeaveIfError( iSSSettings.Open() );
- CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::ConstructL Reg " );
- TInt errorCode = iSSSettings.Register( ESSSettingsAls, *this );
- CSPLOGSTRING2( CSPINT,
- "CSPSsSettingsHandler::ConstructL > iSSSettings.Register, errorCode: %d",
- errorCode );
- if ( errorCode == KErrNotSupported )
- {
- CSPLOGSTRING( CSPINT, "CSPSsSettingsHandler::ConstructL, ALS not supported" );
- }
- else if ( errorCode == KErrNotReady )
- {
- // Try again after idle
- iRegisterAlsNofify = CIdle::NewL( CActive::EPriorityHigh );
- RegisterAfterIdle();
- }
-
- RMobilePhone::TMobilePhoneALSLine alsLine;
- CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::ConstructL GetALS" );
- GetALSLineL( alsLine );
- CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::ConstructL Notify " );
- iObserver.NotifyCurrentActiveALSLine( (TInt) alsLine );
-
- CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::ConstructL >" );
- }
-
-// -----------------------------------------------------------------------------
-// CSPSsSettingsHandler::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CSPSsSettingsHandler* CSPSsSettingsHandler::NewL( const MCCPSsObserver& aObs )
- {
- CSPSsSettingsHandler* self = new ( ELeave ) CSPSsSettingsHandler( aObs );
- CleanupStack::PushL( self );
- self->ConstructL( );
- CleanupStack::Pop( self );
- CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::NewL" );
- return self;
- }
-
-// Destructor
-CSPSsSettingsHandler::~CSPSsSettingsHandler()
- {
- CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::~CSPSsSettingsHandler <" );
- iSSSettings.Close();
- CSPLOGSTRING( CSPOBJECT, "CSPSsSettingsHandler::~CSPSsSettingsHandler >" );
- if ( iRegisterAlsNofify )
- {
- delete iRegisterAlsNofify;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CSPSsSettingsHandler::GetALSLineL
-// Sends synchronous request to get the ALS line and returns handle to access
-// the status.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CSPSsSettingsHandler::GetALSLineL(
- RMobilePhone::TMobilePhoneALSLine& aALSLine )
- {
- TInt value;
- User::LeaveIfError( iSSSettings.Get( ESSSettingsAls, value ) );
-
- TSSSettingsAlsValue alsValue =
- static_cast< TSSSettingsAlsValue > ( value );
-
- switch( alsValue )
- {
- case ESSSettingsAlsNotSupported:
- aALSLine = RMobilePhone::EAlternateLineNotAvailable;
- break;
- case ESSSettingsAlsPrimary:
- aALSLine = RMobilePhone::EAlternateLinePrimary;
- break;
- case ESSSettingsAlsAlternate:
- aALSLine = RMobilePhone::EAlternateLineAuxiliary;
- break;
- default:
- break;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CSPSsSettingsHandler::SetALSLineL
-// Sends synchronous request to set the ALS line and returns handle to access
-// the status.
-// -----------------------------------------------------------------------------
-//
-void CSPSsSettingsHandler::SetALSLineL(
- RMobilePhone::TMobilePhoneALSLine& aALSLine )
- {
- TSSSettingsAlsValue alsValue =
- static_cast<TSSSettingsAlsValue> ( aALSLine );
-
- switch( aALSLine )
- {
- case RMobilePhone::EAlternateLineUnknown:
- case RMobilePhone::EAlternateLineNotAvailable:
- alsValue = ESSSettingsAlsNotSupported;
- break;
- case RMobilePhone::EAlternateLinePrimary:
- alsValue = ESSSettingsAlsPrimary;
- break;
- case RMobilePhone::EAlternateLineAuxiliary:
- alsValue = ESSSettingsAlsAlternate;
- break;
- default:
- CSPLOGSTRING( CSPINT,
- "CSPSsSettingsHandler::SetALSLineL: Not valid value" );
- __ASSERT_DEBUG( EFalse, Panic( ECSPPanicInvalidRequest ) );
- break;
- }
- User::LeaveIfError( iSSSettings.Set( ESSSettingsAls, alsValue ) );
- }
-
-// -----------------------------------------------------------------------------
-// CSPSsSettingsHandler::GetClirL
-// Sends synchronous request to get the CLIR value and returns handle to access
-// the status.
-// -----------------------------------------------------------------------------
-//
-void CSPSsSettingsHandler::GetClirL(
- RMobileCall::TMobileCallIdRestriction& aClir )
- {
- TInt value;
- User::LeaveIfError( iSSSettings.Get( ESSSettingsClir, value ) );
-
- TSSSettingsClirValue clir =
- static_cast<TSSSettingsClirValue> ( value );
- CSPLOGSTRING2( CSPERROR,
- "CSPSsSettingsHandler::GetClirL, clir: %d", clir );
-
- switch( clir )
- {
- case ESSSettingsClirNetworkDefault:
- aClir = RMobileCall::EIdRestrictDefault;
- break;
- case ESSSettingsClirExplicitInvoke:
- aClir = RMobileCall::EDontSendMyId;
- break;
- case ESSSettingsClirExplicitSuppress:
- aClir = RMobileCall::ESendMyId;
- break;
- default:
- CSPLOGSTRING2( CSPERROR,
- "CSPSsSettingsHandler::GetClirL, NOT VALID aClir: %d", aClir );
- __ASSERT_DEBUG( EFalse, Panic( ECSPPanicInvalidRequest ) );
- break;
- }
- }
-
-// -----------------------------------------------------------------------------
-// CSPSsSettingsHandler::GetCugL
-// Sends synchronous request to get the CUG index and returns handle to access
-// the status.
-// -----------------------------------------------------------------------------
-//
-void CSPSsSettingsHandler::GetCugL( TInt& aCugIndex )
- {
- CSPLOGSTRING2( CSPINT,
- "CSPSsSettingsHandler::GetCugL, aCugIndex: %d", aCugIndex );
- User::LeaveIfError( iSSSettings.Get( ESSSettingsCug, aCugIndex ) );
- }
-
-// -----------------------------------------------------------------------------
-// CSPSsSettingsHandler::GetDefaultCugL
-// Sends synchronous request to get the default CUG index
-// -----------------------------------------------------------------------------
-//
-void CSPSsSettingsHandler::GetDefaultCugL( TInt& aDefCug )
- {
- User::LeaveIfError( iSSSettings.Get( ESSSettingsDefaultCug, aDefCug ) );
- }
-
-// -----------------------------------------------------------------------------
-// CSPSsSettingsHandler::IsValueValidCugIndex
-// Sends synchronous request to check the CUG index
-// -----------------------------------------------------------------------------
-//
-TBool CSPSsSettingsHandler::IsValueValidCugIndex( const TInt& aValue ) const
- {
- return iSSSettings.IsValueValidCugIndex( aValue );
- }
-
-// ---------------------------------------------------------
-// CSPSsSettingsHandler::PhoneSettingChanged
-// ---------------------------------------------------------
-//
-void CSPSsSettingsHandler::PhoneSettingChanged(
- TSSSettingsSetting aSetting,
- TInt aNewValue )
- {
- CSPLOGSTRING2( CSPINT,
- "CSPSsSettingsHandler::PhoneSettingChanged, aNewValue : %d",
- aNewValue );
- if ( aSetting == ESSSettingsAls )
- {
- TSSSettingsAlsValue alsValue =
- static_cast< TSSSettingsAlsValue > ( aNewValue );
-
- RMobilePhone::TMobilePhoneALSLine
- alsLine( RMobilePhone::EAlternateLineUnknown );
-
- switch( alsValue )
- {
- case ESSSettingsAlsNotSupported:
- alsLine = RMobilePhone::EAlternateLineNotAvailable;
- break;
- case ESSSettingsAlsPrimary:
- alsLine = RMobilePhone::EAlternateLinePrimary;
- break;
- case ESSSettingsAlsAlternate:
- alsLine = RMobilePhone::EAlternateLineAuxiliary;
- break;
- default:
- break;
- }
-
- iObserver.NotifyCurrentActiveALSLine( (TInt) alsLine );
- }
- }
-
-// -----------------------------------------------------------------------------
-// CSPSsSettingsHandler::RegisterAfterIdle
-// -----------------------------------------------------------------------------
-//
-void CSPSsSettingsHandler::RegisterAfterIdle()
- {
- CSPLOGSTRING( CSPINT, "CSPSsSettingsHandler::RegisterAfterIdle" );
- if ( !iRegisterAlsNofify->IsActive() )
- {
- CSPLOGSTRING( CSPINT, "CSPSsSettingsHandler::RegisterAfterIdle > iRegisterAlsNofify->Star" );
- iRegisterAlsNofify->Start(
- TCallBack( CIdleCallBack, this ) );
- }
- }
-
-// -----------------------------------------------------------------------------
-// CSProvider::CIdleCallBack
-// -----------------------------------------------------------------------------
-//
-TInt CSPSsSettingsHandler::CIdleCallBack( TAny* aAny )
- {
- CSPLOGSTRING( CSPINT, "CSPSsSettingsHandler::CIdleCallBack" );
- static_cast< CSPSsSettingsHandler* >( aAny )->Register();
-
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// CSProvider::Register
-// -----------------------------------------------------------------------------
-//
-void CSPSsSettingsHandler::Register()
- {
- CSPLOGSTRING( CSPINT, "CSPSsSettingsHandler::Register" );
- TInt errorCode( KErrNotReady );
-
- errorCode = iSSSettings.Register( ESSSettingsAls, *this );
- CSPLOGSTRING2( CSPINT,
- "CSPSsSettingsHandler::Register > iSSSettings.Register, errorCode: %d",
- errorCode );
-
- if ( errorCode == KErrNotReady )
- {
- // Try again
- RegisterAfterIdle();
- }
- }
-
-// End of file
--- a/convergedcallengine/csplugin/src/cspsupplementaryservicesmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,109 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains the implementation of CSPSupplementaryServicesMonitor class
-* member functions.
-*
-*/
-
-
-
-#include "cspsupplementaryservicesmonitor.h"
-#include "csprovider.h"
-#include "csplogger.h"
-
-
-// -----------------------------------------------------------------------------
-// CSPSupplementaryServicesMonitor::CSPSupplementaryServicesMonitor
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CSPSupplementaryServicesMonitor::CSPSupplementaryServicesMonitor
- (
- CSProvider& aOwner,
- RMmCustomAPI& aCustomAPI
- ) : CActive( EPriorityStandard ),
- iOwner( aOwner ),
- iCustomAPI( aCustomAPI )
- {
- CSPLOGSTRING( CSPOBJECT,
- "CSPSupplementaryServicesMonitor::CSPSupplementaryServicesMonitor: complete" );
- CActiveScheduler::Add( this );
- }
-
-// Destructor
-CSPSupplementaryServicesMonitor::~CSPSupplementaryServicesMonitor()
- {
- Cancel();
- CSPLOGSTRING( CSPOBJECT,
- "CALL CSPSupplementaryServicesMonitor::~CSPSupplementaryServicesMonitor: Complete." );
- }
-
-// -----------------------------------------------------------------------------
-// CSPSupplementaryServicesMonitor::StartMonitoring
-// Starts supplementary services monitoring
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CSPSupplementaryServicesMonitor::StartMonitoring()
- {
- if ( !IsActive() )
- {
- CSPLOGSTRING( CSPREQOUT,
- "CALL CSPSupplementaryServicesMonitor::StartMonitoring: RMMCustomAPI::NotifySsNetworkEvent() called" );
- iCustomAPI.NotifySsNetworkEvent( iStatus, iSsTypeAndMode, iSsInfo );
- SetActive();
- }
- else
- {
- CSPLOGSTRING( CSPINT,
- "CALL CSPSupplementaryServicesMonitor::StartMonitoring: Already active" );
- }
- }
-
-// -----------------------------------------------------------------------------
-// CSPSupplementaryServicesMonitor::DoCancel
-// Cancels active object requests
-// Method calls CancelAsyncRequest from the CustomaEtel object
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CSPSupplementaryServicesMonitor::DoCancel()
- {
- iCustomAPI.CancelAsyncRequest( ECustomNotifySsNetworkEventIPC );
- CSPLOGSTRING( CSPINT,
- "CALL CSPSupplementaryServicesMonitor::DoCancel: \
- RMMCustomAPI::CancelAsyncRequest( ECustomNotifySsRequestCompleteIPC ) called" );
- }
-
-// -----------------------------------------------------------------------------
-// CSPSupplementaryServicesMonitor::RunL
-// CMethod gets notification from etel that asyncronous request is completed.
-// -----------------------------------------------------------------------------
-//
-void CSPSupplementaryServicesMonitor::RunL()
- {
- CSPLOGSTRING( CSPINT, "CSPSupplementaryServicesMonitor::RunL" );
- if ( iStatus == KErrNone )
- {
- CSPLOGSTRING2( CSPINT,
- "CSPSupplementaryServicesMonitor::RunL: iSsTypeAndMode.iSsType: %d",
- iSsTypeAndMode.iSsType );
-
- iOwner.NotifySsEvent( iSsTypeAndMode, iSsInfo );
- StartMonitoring();
- }
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/csptimer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Timer service
-*
-*/
-
-#include "csptimer.h"
-#include "mcsptimerobserver.h"
-#include "csppanic.pan"
-
-// ---------------------------------------------------------------------------
-// Static constructor
-// ---------------------------------------------------------------------------
-//
-CSPTimer* CSPTimer::NewL()
- {
- CSPTimer* self = CSPTimer::NewLC();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Static constructor
-// ---------------------------------------------------------------------------
-//
-CSPTimer* CSPTimer::NewLC()
- {
- CSPTimer* self = new( ELeave ) CSPTimer;
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CSPTimer::~CSPTimer()
- {
- Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// Starts notify request
-// ---------------------------------------------------------------------------
-//
-void CSPTimer::NotifyAfter( TInt aTimeout,
- MCSPTimerObserver& aTimerObserver )
- {
- __ASSERT_ALWAYS( !IsNotifyOngoing(), Panic( ECSPPanicTimerAlreadyActive ) );
- After( aTimeout );
- iObserver = &aTimerObserver;
- }
-
-// ---------------------------------------------------------------------------
-// Cancels the outstancing request.
-// ---------------------------------------------------------------------------
-//
-void CSPTimer::CancelNotify()
- {
- Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// Determines if there is active request outstanding.
-// ---------------------------------------------------------------------------
-//
-TBool CSPTimer::IsNotifyOngoing()
- {
- return IsActive();
- }
-
-// ---------------------------------------------------------------------------
-// From class CActive
-// Notifies the observer about request.
-// ---------------------------------------------------------------------------
-//
-void CSPTimer::RunL()
- {
- if( iObserver )
- {
- iObserver->TimerEvent();
- }
- }
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CSPTimer::CSPTimer() :
- CTimer( CActive::EPriorityStandard )
- {
- CActiveScheduler::Add( this );
- }
-
-// ---------------------------------------------------------------------------
-// Second phase constructor
-// ---------------------------------------------------------------------------
-//
-void CSPTimer::ConstructL()
- {
- CTimer::ConstructL();
- }
-
-// End of File
-
--- a/convergedcallengine/csplugin/src/csptransferprovider.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,281 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Contains the implementation of class CSPTransferProvider
-*
-*/
-
-
-#include <mccptransferprovider.h>
-#include <mccptransferobserver.h>
-#include <etelmm.h>
-#include <exterror.h>
-#include <mccpcall.h>
-
-#include "csptransferprovider.h"
-#include "csplogger.h"
-#include "mcspcallerrorobserver.h"
-#include "mcspcommoninfo.h"
-
-
-// ---------------------------------------------------------------------------
-// Two phased construction
-// ---------------------------------------------------------------------------
-//
-CSPTransferProvider* CSPTransferProvider::NewL (
- RMobileCall& aCall,
- MCSPCallErrorObserver& aErrorObserver,
- MCSPCommonInfo& aCommonInfo )
- {
- CSPTransferProvider* self =
- new ( ELeave ) CSPTransferProvider( aCall, aErrorObserver, aCommonInfo );
- CleanupStack::PushL( self );
- self->ConstructL( );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor of the object.
-// ---------------------------------------------------------------------------
-//
-CSPTransferProvider::~CSPTransferProvider()
- {
- Cancel();
- iObservers.Close();
- }
-
-// ---------------------------------------------------------------------------
-// Transfers the call. CCE maps CS Transfer() to this method.
-// (UnattendedTransfer and others are VoIP features)
-// ---------------------------------------------------------------------------
-//
-TInt CSPTransferProvider::AttendedTransfer( MCCPCall& aTransferTargetCall )
- {
- TInt err ( KErrNone );
-
- if ( !IsActive() )
- {
- if ( iCall.SubSessionHandle() != 0 )
- {
- err = KErrNone;
- // send async request to Etel
- iCall.Transfer( iStatus );
- SetActive();
- if( aTransferTargetCall.State() == MCCPCallObserver::ECCPStateConnecting )
- {
- iCommonInfo.DontReportTerminationError();
- }
- }
- else
- {
- // transfer not allowed
- err = KErrNotSupported;
- }
- }
- else
- {
- err = KErrInUse;
- }
- CSPLOGSTRING2( CSPREQOUT,
- "CSPTransferProvider::AttendedTransfer: err: %d", err );
- // return error value
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// Transfers the call. CCE maps CS Transfer() to this method.
-// (UnattendedTransfer and others are VoIP features)
-// ---------------------------------------------------------------------------
-//
-TInt CSPTransferProvider::AttendedTransfer( const TDesC& /*aTransferTarget*/ )
- {
- TInt err ( KErrNone );
-
- if ( !IsActive() )
- {
- if ( iCall.SubSessionHandle() != 0 )
- {
- err = KErrNone;
- // send async request to Etel
- iCall.Transfer( iStatus );
- SetActive();
- }
- else
- {
- // transfer not allowed
- err = KErrNotSupported;
- }
- }
- else
- {
- err = KErrInUse;
- }
- CSPLOGSTRING2( CSPREQOUT,
- "CSPTransferProvider::AttendedTransfer: err: %d", err );
- // return error value
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// Not supported by CS Plug-in. This is a VoIP feature
-// ---------------------------------------------------------------------------
-//
-TInt CSPTransferProvider::UnattendedTransfer( const TDesC& /*aTransferTarget*/ )
- {
- return KErrNotSupported;
- }
-
-// ---------------------------------------------------------------------------
-// Not supported by CS Plug-in. This is a VoIP feature
-// ---------------------------------------------------------------------------
-//
-TInt CSPTransferProvider::AcceptTransfer( const TBool /*aAccept*/ )
- {
- return KErrNotSupported;
- }
-
-// ---------------------------------------------------------------------------
-// Not supported by CS Plug-in. This is a VoIP feature
-// ---------------------------------------------------------------------------
-//
-const TDesC& CSPTransferProvider::TransferTarget() const
- {
- return KNullDesC;
- }
-
-// ---------------------------------------------------------------------------
-// Notify observers about an occurred transfer event
-// ---------------------------------------------------------------------------
-//
-void CSPTransferProvider::TransferEventOccurred(
- const MCCPTransferObserver::TCCPTransferEvent aEvent )
- {
- CSPLOGSTRING2( CSPREQOUT,
- "CSPTransferProvider::TransferEventOccurred: event: %d", aEvent );
-
- for ( TInt i = 0; i < iObservers.Count(); i++ )
- {
- MCCPTransferObserver *obs = iObservers[i];
- if ( obs )
- {
- iObservers[i]->TransferEventOccurred( aEvent );
- }
- }
- }
-
-// ---------------------------------------------------------------------------
-// Adds observer to array
-// ---------------------------------------------------------------------------
-//
-void CSPTransferProvider::AddObserverL( const MCCPTransferObserver& aObserver )
- {
- if ( iObservers.Find( &aObserver ) == KErrNotFound )
- {
- iObservers.Append( &aObserver );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Removes observer from array
-// ---------------------------------------------------------------------------
-//
-TInt CSPTransferProvider::RemoveObserver( const MCCPTransferObserver& aObserver )
- {
- TInt found = iObservers.Find( &aObserver );
- if ( found != KErrNotFound )
- {
- iObservers.Remove( found );
- return KErrNone;
- }
- return found;
- }
-
-// ---------------------------------------------------------------------------
-// From CActive.
-// Handles request completion.
-// ---------------------------------------------------------------------------
-//
-void CSPTransferProvider::RunL()
- {
- CSPLOGSTRING2( CSPREQEND,
- "CSPTransferProvider::RunL: status: %d", iStatus.Int() );
-
- if ( iStatus == KErrNone )
- {
- MCCPTransferObserver::TCCPTransferEvent event =
- MCCPTransferObserver::ECCPLocalTransfer;
- TransferEventOccurred( event );
- }
- else
- {
- CSPLOGSTRING2( CSPERROR, "CSPTransferProvider::RunL: Error \
- %d", iStatus.Int() );
-
- TInt error = iStatus.Int();
- if ( error == KErrGsmCCFacilityRejected )
- {
- iErrorObserver.NotifyErrorOccurred( ECCPErrorRejected );
- }
- else if( error != KErrCancel )
- {
- iErrorObserver.NotifyErrorOccurred( ECCPTransferFailed );
- }
- }
-
- CSPLOGSTRING( CSPREQEND, "CSPTransferProvider::RunL End of RunL." );
- }
-
-// ---------------------------------------------------------------------------
-// Cancels the pending async request
-// ---------------------------------------------------------------------------
-//
-void CSPTransferProvider::DoCancel()
- {
- if ( iStatus == KRequestPending )
- {
- CSPLOGSTRING( CSPINT,
- "CSPTransferProvider::DoCancel Canceling pending request.." );
- // cancel request
- iCall.CancelAsyncRequest( EMobileCallTransfer );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Default C++ constructor
-// ---------------------------------------------------------------------------
-//
-CSPTransferProvider::CSPTransferProvider(
- RMobileCall& aCall,
- MCSPCallErrorObserver& aErrorObserver,
- MCSPCommonInfo& aCommonInfo )
- : CActive( EPriorityStandard ),
- iCall (aCall),
- iErrorObserver( aErrorObserver ),
- iCommonInfo( aCommonInfo )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPTransferProvider::CSPTransferProvider()" );
- CActiveScheduler::Add( this );
- }
-
-// ---------------------------------------------------------------------------
-// Constructing 2nd phase
-// ---------------------------------------------------------------------------
-//
-void CSPTransferProvider::ConstructL()
- {
- CSPLOGSTRING(CSPOBJECT, "CSPTransferProvider::ConstructL()" );
- }
-
-// End of File
-
--- a/convergedcallengine/csplugin/src/cspuuimessagesender.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,103 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Sends UUI message.
-*
-*/
-
-
-#include "cspuuimessagesender.h"
-#include "csplogger.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CSPUUIMessageSender::CSPUUIMessageSender(
- RMobileCall& aCall ) :
- CActive( CActive::EPriorityStandard ),
- iCall( aCall ),
- iUUSRequestPckg( iUUSRequest )
- {
- CActiveScheduler::Add( this );
- }
-
-
-// ---------------------------------------------------------------------------
-// 2nd phase constructor
-// ---------------------------------------------------------------------------
-//
-void CSPUUIMessageSender::ConstructL()
- {
- }
-
-
-// ---------------------------------------------------------------------------
-// Static constructor
-// ---------------------------------------------------------------------------
-//
-CSPUUIMessageSender* CSPUUIMessageSender::NewL(
- RMobileCall& aCall )
- {
- CSPUUIMessageSender* self =
- new( ELeave ) CSPUUIMessageSender( aCall );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CSPUUIMessageSender::~CSPUUIMessageSender()
- {
- Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// Sends the UUI message.
-// ---------------------------------------------------------------------------
-//
-void CSPUUIMessageSender::SendUUIMessage( const TDesC& aMessage )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPUUIMessageSender::SendUUIMessage start");
- Cancel();
- iUUSRequest.iServiceReq = RMobileCall::KUUS1Implicit;
- iUUSRequest.iUUI = aMessage;
- iCall.ActivateUUS( iStatus, iUUSRequestPckg );
- SetActive();
- }
-
-// ---------------------------------------------------------------------------
-// From class CActive
-// Cancels the outstanding request.
-// ---------------------------------------------------------------------------
-//
-void CSPUUIMessageSender::DoCancel()
- {
- iCall.CancelAsyncRequest( EMobileCallActivateUUS );
- }
-
-// ---------------------------------------------------------------------------
-// From class CActive
-// No need to react the completion. The message is sent or not.
-// ---------------------------------------------------------------------------
-//
-void CSPUUIMessageSender::RunL()
- {
- CSPLOGSTRING2(CSPINT, "CSPUUIMessageSender::RunL %d iStatus", iStatus.Int() );
- }
--- a/convergedcallengine/csplugin/src/cspuuimonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,111 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Monitor UUI messages.
-*
-*/
-
-#include "csplogger.h"
-#include "cspuuimonitor.h"
-#include "mcspuusmessageobserver.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-CSPUUIMonitor::CSPUUIMonitor(
- RMobileCall& aCall,
- MCSPUUSMessageObserver& aUUIHandler )
- : CActive( CActive::EPriorityStandard ),
- iCall( aCall ),
- iObserver( aUUIHandler )
- {
- CActiveScheduler::Add( this );
- }
-
-
-// ---------------------------------------------------------------------------
-// Second phase constructor
-// ---------------------------------------------------------------------------
-//
-void CSPUUIMonitor::ConstructL()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Static constructor
-// ---------------------------------------------------------------------------
-//
-CSPUUIMonitor* CSPUUIMonitor::NewL(
- RMobileCall& aCall,
- MCSPUUSMessageObserver& aUUIHandler )
- {
- CSPUUIMonitor* self =
- new( ELeave ) CSPUUIMonitor( aCall, aUUIHandler );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CSPUUIMonitor::~CSPUUIMonitor()
- {
- Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// Starts monitoring the UUI messages.
-// ---------------------------------------------------------------------------
-//
-void CSPUUIMonitor::StartMonitor()
- {
- CSPLOGSTRING(CSPOBJECT, "CSPUUIMonitor::StartMonitor");
- Cancel();
- iCall.ReceiveUUI( iStatus, iUUI );
- SetActive();
- }
-
-// ---------------------------------------------------------------------------
-// From class CActive
-// Cancels out standign request
-// ---------------------------------------------------------------------------
-//
-void CSPUUIMonitor::DoCancel()
- {
- iCall.CancelAsyncRequest( EMobileCallReceiveUUI ) ;
- }
-
-// ---------------------------------------------------------------------------
-// From class CActive
-// Notifies observer.
-// ---------------------------------------------------------------------------
-//
-void CSPUUIMonitor::RunL()
- {
- CSPLOGSTRING2(CSPINT, "CSPUUIMonitor::RunL %d iStatus", iStatus.Int() );
- if( iStatus == KErrNone )
- {
- iObserver.UUSMessageReceived( iUUI );
- StartMonitor();
- }
- else if( iStatus != KErrNotSupported )
- {
- StartMonitor();
- }
- }
--- a/convergedcallengine/csplugin/src/cspvideocall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,372 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements class CSPVideoCall which provides video call
-* functionality
-*
-*/
-
-
-#include <etelmm.h>
-#include <etel.h>
-#include <mccpcallobserver.h>
-#include <rmmcustomapi.h>
-
-#include "cspvideocall.h"
-#include "cspetelcallrequester.h"
-#include "cspetelcalleventmonitor.h"
-#include "cspetelcallstatusmonitor.h"
-#include "cspetelvideocallcapsmonitor.h"
-#include "csplogger.h"
-#include "csppanic.pan"
-#include "cspconsts.h"
-#include "mcspcommoninfo.h"
-
-
-// ---------------------------------------------------------------------------
-// CSPVideoCall::NewL Two phased construction.
-// ---------------------------------------------------------------------------
-//
-CSPVideoCall* CSPVideoCall::NewL( const TDesC& aName,
- RMobileLine& aLine, TBool aMobileOriginated,
- const CCCECallParameters& aParams,
- MCSPCommonInfo& aCommonInfo )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::NewL <");
-
- CSPVideoCall* self = new (ELeave) CSPVideoCall( aLine, aMobileOriginated,
- aName, aCommonInfo );
- CleanupStack::PushL( self );
- self->ConstructL( aParams );
- CleanupStack::Pop( self );
- CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::NewL >");
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCall::~CSPVideoCall
-// ---------------------------------------------------------------------------
-//
-CSPVideoCall::~CSPVideoCall()
- {
- CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::~CSPVideoCall <");
- // Stop monitoring events
- delete iConnectionHandler;
- delete iVideoCallCapsMonitor;
-
- CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::~CSPVideoCall >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCall::NotifyCallStateChanged
-// Notifies observers about state changes
-// ---------------------------------------------------------------------------
-//
-void CSPVideoCall::NotifyCallStateChanged(
- MCCPCallObserver::TCCPCallState aState )
- {
- CSPLOGSTRING2(CSPINT, "CSPVideoCall::NotifyCallStateChanged %d", aState);
-
- TInt errorCode( KErrNone );
- iNextCallState = aState;
-
- if ( aState == MCCPCallObserver::ECCPStateConnected &&
- iParams->CallType() == CCPCall::ECallTypeVideo &&
- !iConnectionHandler->ConnectionInitialized() )
- {
- // When connected message is received, call object must first open
- // the socket connection and loan data port
- CSPLOGSTRING(CSPINT,
- "CSPVideoCall::NotifyCallStateChanged initializing connection");
- errorCode = iConnectionHandler->InitializeConnection();
-
- __ASSERT_ALWAYS( errorCode == KErrNone,
- Panic( ECSPPanicDataConnectionInitError ) );
- }
- else if ( aState == MCCPCallObserver::ECCPStateIdle &&
- iParams->CallType() == CCPCall::ECallTypeVideo )
- {
- // When idle message is received one can close the
- // socket connections.
- CSPLOGSTRING(CSPINT,
- "CSPVideoCall::NotifyCallStateChanged releasing connection");
- iConnectionHandler->ReleaseConnection();
- }
-
- // Connected notify is not sent for video call before connection has
- // been initialized.
- if ( aState == MCCPCallObserver::ECCPStateConnected &&
- iParams->CallType() == CCPCall::ECallTypeVideo &&
- !iConnectionHandler->ConnectionInitialized() )
- {
- CSPLOGSTRING(CSPINT,
- "CSPVideoCall::NotifyCallStateChanged connection not initialized");
- }
- else
- {
- CSPLOGSTRING(CSPINT,
- "CSPVideoCall::NotifyCallStateChanged notifying state change");
- CSPCall::NotifyCallStateChanged( aState );
- }
-
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCall::NotifyCallStateChangedWithInband
-// Notifies observers about state changes
-// ---------------------------------------------------------------------------
-//
-void CSPVideoCall::NotifyCallStateChangedWithInband(
- MCCPCallObserver::TCCPCallState aState )
- {
- CSPLOGSTRING2(CSPINT,
- "CSPVideoCall::NotifyCallStateChangedWithInband %d", aState);
- iNextCallState = aState;
-
- CSPCall::NotifyCallStateChangedWithInband( aState );
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCall::ConnectionReady
-// ---------------------------------------------------------------------------
-//
-void CSPVideoCall::ConnectionReady( TName aDataPortName )
- {
- CSPLOGSTRING3(CSPINT, "CSPVideoCall::ConnectionReady \
- state = %d, next state: %d", iCallState, iNextCallState);
-
- // If still connecting
- if ( iNextCallState == MCCPCallObserver::ECCPStateConnected )
- {
- NotifyCallEventOccurred( MCCPCallObserver::ECCPCSDataPortLoaned );
- NotifyCallStateChanged( iNextCallState );
- iCommonInfo.NotifyDataPortName( aDataPortName );
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCall::ConnectionEstablishingFailed
-// ---------------------------------------------------------------------------
-//
-void CSPVideoCall::ConnectionEstablishingFailed(TInt /*aErr*/)
- {
- CSPLOGSTRING(CSPERROR, "CSPVideoCall::ConnectionEstablishingFailed");
- CSPCall::NotifyErrorOccurred( ECCPErrorVideoCallSetupFailed );
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCall::VideoCallCapsChanged
-// Receives data call caps changed notification from Etel data call caps monitor
-// ---------------------------------------------------------------------------
-//
-void CSPVideoCall::DataCallCapsChanged( RMobileCall::TMobileCallDataCapsV1& aCaps )
- {
- CSPLOGSTRING(CSPINT, "CSPVideoCall::DataCallCapsChanged");
- if ( aCaps.iProtocolCaps == RMobileCall::KCapsIsdnMultimedia )
- {
- CSPLOGSTRING(CSPINT, "CSPVideoCall::DataCallCapsChanged type=video");
- iParams->SetCallType( CCPCall::ECallTypeVideo );
- }
- else
- {
- CSPLOGSTRING(CSPINT, "CSPVideoCall::DataCallCapsChanged type=voice");
- iParams->SetCallType( CCPCall::ECallTypeCSVoice );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Branches dial requests according to the flag.
-// ---------------------------------------------------------------------------
-//
-TInt CSPVideoCall::DialFdnCond( TBool aFdnCheck )
- {
- CSPLOGSTRING(CSPREQIN, "CSPVideoCall::DialFdnCond <");
- TInt err(KErrNone);
-
- SetDefaultCallParameters();
-
- // Update internal call params
- iCommonInfo.InitializeDataCallParameters( iDataCallParams );
-
- // Set the call state to dialling
- if ( iCall.SubSessionHandle() )
- {
- CSPLOGSTRING(CSPINT, "CSPVideoCall::DialFdnCond make request");
- if ( aFdnCheck )
- {
- err = iRequester->MakeDialRequest(
- iDataCallParamsPckg, iRemotePartyNumber );
- }
- else
- {
- err = iRequester->MakeDialNoFdnCheckRequest(
- iDataCallParamsPckg, iRemotePartyNumber );
- }
-
- if ( err != KErrNone )
- {
- CSPLOGSTRING2(CSPERROR,
- "CSPVideoCall::DialFdnCond ERROR with Dial request: %d", err );
- }
- }
- else
- {
- CSPLOGSTRING2(CSPERROR, "CSPVideoCall::DialFdnCond() ERROR with iCall session: %d", &iCall );
- err = KErrGeneral;
- }
-
- CSPLOGSTRING(CSPINT, "CSPVideoCall::DialFdnCond() >");
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCSCall
-// CSPVideoCall::SwitchAlternatingCall
-// ---------------------------------------------------------------------------
-//
-TInt CSPVideoCall::SwitchAlternatingCall()
- {
- CSPLOGSTRING(CSPREQIN, "CSPVideoCall::GetMobileCallInfo");
- return KErrNotSupported;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCSCall
-// CSPVideoCall::GetMobileDataCallCaps
-// ---------------------------------------------------------------------------
-//
-TInt CSPVideoCall::GetMobileDataCallCaps( TDes8& aCaps ) const
- {
- CSPLOGSTRING(CSPREQIN, "CSPVideoCall::GetMobileDataCallCaps");
- return iVideoCallCapsMonitor->GetMobileDataCallCaps( aCaps );
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPVideoCall::IsSecured
-// ---------------------------------------------------------------------------
-//
-TBool CSPVideoCall::IsSecured() const
- {
- CSPLOGSTRING(CSPREQIN, "CSPVideoCall::IsSecured");
- return CSPCall::IsSecured();
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCall::CSPVideoCall
-// ---------------------------------------------------------------------------
-//
-CSPVideoCall::CSPVideoCall( RMobileLine& aLine,
- TBool aMobileOriginated,
- const TDesC& aName,
- MCSPCommonInfo& aCommonInfo ) :
- CSPCall( aLine, aMobileOriginated, aName,
- aCommonInfo, EFalse ),
- iDataCallParams(),
- iDataCallParamsPckg (iDataCallParams)
-
- {
- CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::CSPVideoCall");
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCall::ConstructL
-// Constructing CSPVideoCall for MT call.
-// ---------------------------------------------------------------------------
-//
-void CSPVideoCall::ConstructL( const CCCECallParameters& aParams )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::ConstructL <");
-
- CSPCall::ConstructL( aParams );
-
- iConnectionHandler = CSPVideoCallConnectionHandler::NewL( *this, iCall );
- iVideoCallCapsMonitor = CSPEtelVideoCallCapsMonitor::NewL( *this, iCall );
- iVideoCallCapsMonitor->StartMonitoring();
-
- // Update call type info only for MT call.
- if ( !iMobileOriginated )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::ConstructL() selecting call type for MT call");
- CCPCall::TCallType callType = SelectCallTypeFromProtocolCaps();
- iParams->SetCallType( callType );
- }
-
- // Filter out illegal requests
- if ( !CCPCall::ECallTypeVideo == iParams->CallType() )
- {
- CSPLOGSTRING(CSPERROR, "CSPVideoCall::ConstructL() error invalid call type");
- User::Leave( KErrArgument );
- }
-
- CSPLOGSTRING(CSPOBJECT, "CSPVideoCall::ConstructL >");
- }
-
-// -----------------------------------------------------------------------------
-// Set default call parameters.
-// -----------------------------------------------------------------------------
-//
-void CSPVideoCall::SetDefaultCallParameters()
- {
- // Set common call default parameters
- iDataCallParams.iSpeakerControl = RMobileCall::EMonitorSpeakerControlAlwaysOn;
- iDataCallParams.iSpeakerVolume = RMobileCall::EMonitorSpeakerVolumeMedium;
- iDataCallParams.iInterval = KCSPDefaultInterval;
- iDataCallParams.iWaitForDialTone = RMobileCall::EDialToneNoWait;
- iDataCallParams.iIdRestrict = RMobileCall::EIdRestrictDefault;
- iDataCallParams.iAutoRedial = KCSPDefaultAutoRedial;
- // Set video call parameters
- iDataCallParams.iService = RMobileCall::EServiceDataCircuitSync;
- iDataCallParams.iSpeed = RMobileCall::ESpeed64000;
- iDataCallParams.iProtocol = RMobileCall::EProtocolIsdnMultimedia;
- iDataCallParams.iQoS = RMobileCall::EQoSTransparent;
- iDataCallParams.iRLPVersion = RMobileCall::ERLPNotRequested;
- iDataCallParams.iModemToMSWindowSize = 0x00;
- iDataCallParams.iMSToModemWindowSize = 0x00;
- iDataCallParams.iAckTimer = 0x00;
- iDataCallParams.iRetransmissionAttempts = 0x00;
- iDataCallParams.iResequencingPeriod = 0x00;
- iDataCallParams.iV42bisReq = RMobileCall::EV42bisNeitherDirection;
- iDataCallParams.iV42bisCodewordsNum = 0x00;
- iDataCallParams.iV42bisMaxStringLength = 0x00;
- iDataCallParams.iUseEdge = EFalse;
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCall::SelectCallTypeFromProtocolCaps
-// ---------------------------------------------------------------------------
-//
-CCPCall::TCallType CSPVideoCall::SelectCallTypeFromProtocolCaps()
- {
- CSPLOGSTRING(CSPREQIN, "CSPVideoCall::SelectCallTypeFromProtocolCaps <");
-
- iVideoCallCapsMonitor->UpdateProtocolCaps();
- TUint protocolCaps = iVideoCallCapsMonitor->GetProtocolCaps();
- CCPCall::TCallType callType;
-
- if ( protocolCaps == RMobileCall::KCapsIsdnMultimedia )
- {
- callType = CCPCall::ECallTypeVideo;
- }
- else
- {
- callType = CCPCall::ECallTypeCSVoice;
- }
- CSPLOGSTRING2(CSPINT, "CSPVideoCall::SelectCallTypeFromProtocolCaps >\
- call type: %d", callType );
-
- return callType;
- }
-
-
-// End of File
--- a/convergedcallengine/csplugin/src/cspvideocallconnectionhandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Contains the implementation of class CSPDataCallConnectionHandler
-*
-*/
-
-
-#include <etelmm.h>
-#include <mccpcallobserver.h>
-#include <e32property.h>
-
-#include "cspvideocallconnectionhandler.h"
-#include "cspvideocall.h"
-#include "csplogger.h"
-#include "cspconsts.h"
-
-
-// ---------------------------------------------------------------------------
-// Constructs the connection handler via two phased constructing.
-// ---------------------------------------------------------------------------
-//
-CSPVideoCallConnectionHandler* CSPVideoCallConnectionHandler::NewL(
- CSPVideoCall& aObserver,
- RMobileCall& aCall )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPDataCallConnectionHandler::NewL()" );
- CSPVideoCallConnectionHandler* self = new (ELeave) CSPVideoCallConnectionHandler(
- aObserver, aCall );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor of the object.
-// ---------------------------------------------------------------------------
-//
-CSPVideoCallConnectionHandler::~CSPVideoCallConnectionHandler( )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPVideoCallConnectionHandler::~CSPDataCallConnectionHandler()" );
- ReleaseConnection();
- Cancel();
- CloseConnection();
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCallConnectionHandler::InitializeConnection
-// ---------------------------------------------------------------------------
-//
-TInt CSPVideoCallConnectionHandler::InitializeConnection( )
- {
- TInt err = CreateSocketConnection();
- if ( !err )
- {
- err = LoanDataPort();
- }
-
- CSPLOGSTRING2(CSPOBJECT,
- "CSPVideoCallConnectionHandler::InitializeConnection err=%i", err );
-
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCallConnectionHandler::ReleaseConnection
-// ---------------------------------------------------------------------------
-//
-TInt CSPVideoCallConnectionHandler::ReleaseConnection( )
- {
- CloseConnection();
- TInt err = iCall.RecoverDataPort();
- CSPLOGSTRING2(CSPOBJECT,
- "CSPVideoCallConnectionHandler::ReleaseConnection err=%i", err );
- iConnectionInitialized = EFalse;
-
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCallConnectionHandler::InitializeConnection
-// ---------------------------------------------------------------------------
-//
-TBool CSPVideoCallConnectionHandler::ConnectionInitialized( )
- {
- return iConnectionInitialized;
- }
-
-// -----------------------------------------------------------------------------
-// Creates socket connection.
-// Enumerates connections and save Access Point Name of CSD connection.
-// -----------------------------------------------------------------------------
-//
-TInt CSPVideoCallConnectionHandler::CreateSocketConnection()
- {
- CSPLOGSTRING( CSPINT, "CSPVideoCallConnectionHandler::CreateSocketConnection() start");
- // Socket server connection to get Access Point Name
- TInt errorCode = iSocketServer.Connect();
- CSPLOGSTRING2( CSPREQOUT,
- "CSPVideoCallConnectionHandler::CreateSocketConnection: RSocketServ::Connect, error code: %d",
- errorCode );
-
- if ( KErrNone == errorCode )
- {
- errorCode = iConnection.Open( iSocketServer );
- CSPLOGSTRING2( CSPREQOUT,
- "CSPVideoCallConnectionHandler::CreateSocketConnection: RConnection::Open, errorcode: %d",
- errorCode );
- if ( errorCode )
- {
- iSocketServer.Close();
- }
- }
- return errorCode;
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCallConnectionHandler::LoanDataPort
-// ---------------------------------------------------------------------------
-//
-TInt CSPVideoCallConnectionHandler::LoanDataPort( )
- {
- CSPLOGSTRING(CSPINT, "CSPVideoCallConnectionHandler::LoanDataPort");
- TInt ret( KErrNone );
- if ( !IsActive() )
- {
- SetActive();
- iCall.LoanDataPort( iStatus, iCommPort );
- }
- else
- {
- ret = KErrInUse;
- CSPLOGSTRING2(CSPERROR,
- "CSPVideoCallConnectionHandler::LoanDataPort Error!: %d",
- ret);
- }
-
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// Close Socket Server connection, when the call is on Idle state.
-// -----------------------------------------------------------------------------
-//
-void CSPVideoCallConnectionHandler::CloseConnection()
- {
- CSPLOGSTRING( CSPINT, "CSPVideoCallConnectionHandler::CloseConnection" );
- iConnection.Close();
- iSocketServer.Close();
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCallConnectionHandler::RunL
-// ---------------------------------------------------------------------------
-//
-void CSPVideoCallConnectionHandler::RunL()
- {
- // from CActive
- CSPLOGSTRING2( CSPREQEND,
- "CSPVideoCallConnectionHandler::RunL: status: %d", iStatus.Int() );
-
- if ( iStatus == KErrNone )
- {
- CSPLOGSTRING( CSPINT,
- "CSPVideoCallConnectionHandler::RunL: LoanDataPort request OK" );
- iConnectionInitialized = ETrue;
- iObserver.ConnectionReady( iCommPort.iPort );
- }
- else
- {
- // Error situations
- TInt err = iStatus.Int();
- CSPLOGSTRING2( CSPERROR, "CSPVideoCallConnectionHandler::RunL: request \
- completed with error: %d", err );
-
- iObserver.ConnectionEstablishingFailed( err );
- }
- }
-
-// ---------------------------------------------------------------------------
-// CSPVideoCallConnectionHandler::DoCancel
-// ---------------------------------------------------------------------------
-//
-void CSPVideoCallConnectionHandler::DoCancel()
- {
- CSPLOGSTRING( CSPREQOUT, "CSPVideoCallConnectionHandler::DoCancel" );
- if ( IsActive() )
- {
- iCall.LoanDataPortCancel();
- }
- else
- {
- CSPLOGSTRING( CSPERROR,
- "CSPVideoCallConnectionHandler::DoCancel: Already active" );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Constructs the requester.
-// ---------------------------------------------------------------------------
-//
-CSPVideoCallConnectionHandler::CSPVideoCallConnectionHandler(
- CSPVideoCall& aObserver,
- RMobileCall& aCall ) :
- CActive( EPriorityStandard ),
- iObserver( aObserver ),
- iCall( aCall ),
- iConnectionInitialized( EFalse )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPVideoCallConnectionHandler::CSPVideoCallConnectionHandler" );
- CActiveScheduler::Add( this );
- }
-
-// ---------------------------------------------------------------------------
-// Constructing in the second phase.
-// ---------------------------------------------------------------------------
-//
-void CSPVideoCallConnectionHandler::ConstructL()
- {
- // Empty implementation
- }
-
-
-// End of File
-
--- a/convergedcallengine/csplugin/src/cspvoicecall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implements class CSPVoiceCall which provides call functionality
-*
-*/
-
-
-#include <etelmm.h>
-#include <etel.h>
-#include <mccpcallobserver.h>
-#include <cccecallparameters.h>
-
-#include "cspvoicecall.h"
-#include "cspetelcallrequester.h"
-#include "cspetelcalleventmonitor.h"
-#include "cspetelcallstatusmonitor.h"
-#include "csplogger.h"
-#include "csppanic.pan"
-#include "cspconsts.h"
-#include "mcspcommoninfo.h"
-
-
-// ---------------------------------------------------------------------------
-// CSPVoiceCall::NewL Two phased construction.
-// ---------------------------------------------------------------------------
-//
-CSPVoiceCall* CSPVoiceCall::NewL( const TDesC& aName,
- RMobileLine& aLine, TBool aMobileOriginated,
- const CCCECallParameters& aParams,
- MCSPCommonInfo& aCommonInfo,
- TBool aIsEmergency )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::NewL <");
-
- CSPVoiceCall* self = new ( ELeave ) CSPVoiceCall( aLine,
- aMobileOriginated,
- aName,
- aCommonInfo,
- aIsEmergency );
- CleanupStack::PushL( self );
- self->ConstructL( aParams );
- CleanupStack::Pop( self );
- CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::NewL >");
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CSPVoiceCall::~CSPVoiceCall
-// ---------------------------------------------------------------------------
-//
-CSPVoiceCall::~CSPVoiceCall()
- {
- CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::~CSPVoiceCall");
- }
-
-// ---------------------------------------------------------------------------
-// CSPVoiceCall::GoOneToOneL
-// Goes one to one from conference.
-// ---------------------------------------------------------------------------
-//
-TInt CSPVoiceCall::GoOneToOne( )
- {
- CSPLOGSTRING(CSPREQIN, "CSPVoiceCall::GoOneToOne");
- return iRequester->MakeRequest(
- CSPEtelCallRequester::ERequestTypeGoOneToOne );
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCSCall
-// CSPVoiceCall::Dial
-// ---------------------------------------------------------------------------
-//
-TInt CSPVoiceCall::DialFdnCond( TBool aFdnCond )
- {
- CSPLOGSTRING(CSPREQIN, "CSPVoiceCall::DialFdnCond <");
-
- if ( !iMobileOriginated )
- {
- CSPLOGSTRING(CSPINT,
- "CSPVoiceCall::DialFdnCond MT CALL, Dial not supported");
- return KErrNotSupported;
- }
-
- CSPLOGSTRING(CSPINT, "CSPVoiceCall::DialFdnCond making request");
-
- SetDefaultCallParameters();
- iCommonInfo.InitializeCallParameters( iCallParams );
- iCallParams.iSubAddress = iParams->SubAddress();
- iCallParams.iBearerCap1 = iParams->Bearer();
-
- if ( CCCECallParameters::ECCECallOriginSAT == iParams->Origin() )
- {
- iCallParams.iCallParamOrigin = RMobileCall::EOriginatorSIM;
- }
-
- TInt err(KErrNone);
- if ( aFdnCond )
- {
- err = iRequester->MakeDialRequest( iCallParamsPckg, iRemotePartyNumber );
- }
- else
- {
- err = iRequester->MakeDialNoFdnCheckRequest(
- iCallParamsPckg, iRemotePartyNumber );
- }
- CSPLOGSTRING2(CSPINT, "CSPVoiceCall::DialFdnCond > res: %d", err );
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// Make the DialEmergencyCall request to ETel ( impl. of MCCPEmergencyCall )
-// ---------------------------------------------------------------------------
-//
-TInt CSPVoiceCall::Dial( const TDesC& aEmergencyNumber )
- {
- CSPLOGSTRING2(CSPREQIN, "CSPVoiceCall::Dial EMERGENCY %S", &aEmergencyNumber);
- iDialCompletionCode = KErrNone;
- iTerminationErrorNotified = EFalse;
- iIsEmergencyCall = ETrue;
- iEmergencyNumber.Zero();
- TInt emergencyNumberLength = aEmergencyNumber.Length();
-
- if ( emergencyNumberLength > 0 &&
- emergencyNumberLength <= RMobileENStore::KEmergencyNumberSize )
- {
- iEmergencyNumber.Append( aEmergencyNumber );
- }
- else if ( emergencyNumberLength > RMobileENStore::KEmergencyNumberSize )
- {
- CSPLOGSTRING(CSPERROR, "CSPVoiceCall::Dial invalid argument" );
- return KErrArgument;
- }
-
- CSPLOGSTRING2(CSPREQIN, "CSPVoiceCall::Dial using %S", &iEmergencyNumber);
-
- TInt err( iRequester->MakeDialEmergencyRequest( iEmergencyNumber ) );
-
- CSPLOGSTRING2(CSPINT, "CSPVoiceCall::Dial res %d", err );
- return err;
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPVoiceCall::Answer
-// ---------------------------------------------------------------------------
-//
-TInt CSPVoiceCall::Answer()
- {
- CSPLOGSTRING(CSPREQIN, "CSPVoiceCall::Answer");
- return CSPCall::Answer();
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPCall::HangUp
-// ---------------------------------------------------------------------------
-//
-TInt CSPVoiceCall::HangUp()
- {
- CSPLOGSTRING(CSPREQIN, "CSPVoiceCall::HangUp");
- return CSPCall::HangUp();
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCall
-// CSPVoiceCall::Cancel
-// ---------------------------------------------------------------------------
-//
-TInt CSPVoiceCall::Cancel()
- {
- CSPLOGSTRING(CSPREQIN, "CSPVoiceCall::Cancel");
- return CSPCall::Cancel();
- }
-
-// ---------------------------------------------------------------------------
-// From class MCCPCSCall
-// CSPVoiceCall::SwitchAlternatingCall
-// ---------------------------------------------------------------------------
-//
-TInt CSPVoiceCall::SwitchAlternatingCall()
- {
- CSPLOGSTRING(CSPERROR, "CSPVoiceCall::SwitchAlternatingCall not supported!");
- return KErrNotSupported;
- }
-
-// ---------------------------------------------------------------------------
-// CSPVoiceCall::CSPVoiceCall
-// ---------------------------------------------------------------------------
-//
-CSPVoiceCall::CSPVoiceCall( RMobileLine& aLine,
- TBool aMobileOriginated,
- const TDesC& aName,
- MCSPCommonInfo& aCommonInfo,
- TBool aIsEmergency ):CSPCall( aLine,
- aMobileOriginated, aName,
- aCommonInfo, aIsEmergency ),
- iCallParams(),
- iCallParamsPckg (iCallParams)
-
- {
- CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::CSPVoiceCall");
- }
-
-// ---------------------------------------------------------------------------
-// CSPVoiceCall::ConstructL
-// Constructing CSPVoiceCall for MT call.
-// ---------------------------------------------------------------------------
-//
-void CSPVoiceCall::ConstructL( const CCCECallParameters& aParams )
- {
- CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::ConstructL <");
- CSPCall::ConstructL( aParams );
- CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::ConstructL >");
- }
-
-// ---------------------------------------------------------------------------
-// CSPVoiceCall::SetDefaultCallParameters
-// ---------------------------------------------------------------------------
-//
-void CSPVoiceCall::SetDefaultCallParameters()
- {
- CSPLOGSTRING(CSPOBJECT, "CSPVoiceCall::SetDefaultCallParameters");
-
- //Set defaults
- iCallParams.iSpeakerControl = RMobileCall::EMonitorSpeakerControlAlwaysOn;
- iCallParams.iSpeakerVolume = RMobileCall::EMonitorSpeakerVolumeMedium;
- iCallParams.iInterval = KCSPDefaultInterval;
- iCallParams.iWaitForDialTone = RMobileCall::EDialToneNoWait;
- iCallParams.iIdRestrict = RMobileCall::EIdRestrictDefault;
- iCallParams.iAutoRedial = KCSPDefaultAutoRedial;
- }
-
-// End of File
--- a/convergedcallengine/csplugin/src/rcsplinecontainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,216 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Container for ETel line subsessions.
-*
-*/
-
-
-
-// INCLUDES
-#include <rmmcustomapi.h>
-#include <mmtsy_names.h> // tsy and phone names
-#include <cccpcallparameters.h>
-#include <cccecallparameters.h>
-
-#include "rcsplinecontainer.h"
-#include "csppanic.pan"
-#include "csplogger.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// Default c++ constructor
-RCSPLineContainer::RCSPLineContainer()
- {
- }
-
-// ---------------------------------------------------------
-// RCSPLineContainer::Open
-//
-// ---------------------------------------------------------
-//
-TInt RCSPLineContainer::Open( RMobilePhone& aPhone, TUint32 aServiceId )
- {
- CSPLOGSTRING( CSPINT, "RCSPLineContainer::Open" );
- iServiceId = aServiceId;
-
- TInt error = iPrimaryLine.Open( aPhone, KMmTsyVoice1LineName);
- if (error != KErrNone)
- {
- CSPLOGSTRING2( CSPINT, "RCSPLineContainer::Open voice ERROR %d", error );
- return error;
- }
-
- // Ignore errors on the rest of the lines - they are non-essential
- error = iAls2Line.Open( aPhone, KMmTsyVoice2LineName );
- if ( error )
- {
- CSPLOGSTRING2( CSPINT, "RCSPLineContainer::Open voice2 ERROR %d", error );
- }
-
- error = iDataLine.Open( aPhone, KMmTsyDataLineName );
- if ( error )
- {
- CSPLOGSTRING2( CSPINT, "RCSPLineContainer::Open data ERROR %d", error );
- }
-
- error = iFaxLine.Open( aPhone, KMmTsyFaxLineName );
- if ( error )
- {
- CSPLOGSTRING2( CSPINT, "RCSPLineContainer::Open fax ERROR %d", error );
- }
- return KErrNone;
- }
-
-// ---------------------------------------------------------
-// RCSPLineContainer::Close
-//
-// ---------------------------------------------------------
-//
-void RCSPLineContainer::Close()
- {
- CSPLOGSTRING( CSPINT, "RCSPLineContainer::Close" );
- iPrimaryLine.Close();
- iAls2Line.Close();
- iDataLine.Close();
- iFaxLine.Close();
- }
-
-// ---------------------------------------------------------
-// RCSPLineContainer::LineByType
-//
-// ---------------------------------------------------------
-//
-RMobileLine& RCSPLineContainer::LineByType( TCSPLineId aLine )
- {
- CSPLOGSTRING2( CSPINT, "RCSPLineContainer::LineByType %d", aLine );
- switch(aLine)
- {
- case ECSPLineSpeech:
- CSPLOGSTRING2( CSPINT, "RCSPLineContainer::LineByType Speech %d", aLine );
- return iPrimaryLine;
- case ECSPLineAuxSpeech:
- CSPLOGSTRING2( CSPINT, "RCSPLineContainer::LineByType AuxSpeech %d", aLine );
- return iAls2Line;
- case ECSPLineData:
- CSPLOGSTRING2( CSPINT, "RCSPLineContainer::LineByType Data %d", aLine );
- return iDataLine;
- case ECSPLineFax:
- CSPLOGSTRING2( CSPINT, "RCSPLineContainer::LineByType Fax %d", aLine );
- return iFaxLine;
- default:
- CSPLOGSTRING2( CSPINT, "RCSPLineContainer::INVALID LINE ID %d", aLine );
- Panic( ECSPPanicInvalidParameter );
- return iPrimaryLine;
- }
- }
-
-// ---------------------------------------------------------
-// True if the line matching the line id is open.
-// ---------------------------------------------------------
-//
-TBool RCSPLineContainer::LineIsOpen( TCSPLineId aType )
- {
- CSPLOGSTRING2( CSPINT, "RCSPLineContainer::LineIsOpen %d", aType );
- RMobileLine& line = LineByType(aType);
- return (line.SubSessionHandle() != KNullHandle);
- }
-
-// ---------------------------------------------------------
-// Resolves line id based on service id, call type and line
-// type.
-// ---------------------------------------------------------
-//
-RCSPLineContainer::TCSPLineId RCSPLineContainer::ResolveLineIdL(
- const CCCECallParameters& aCallParameters ) const
- {
- CSPLOGSTRING(CSPOBJECT, "CSProvider::ResolveLineIdL");
- RCSPLineContainer::TCSPLineId lineId = RCSPLineContainer::ECSPLineSpeech;
-
- switch ( aCallParameters.CallType() )
- {
- case CCPCall::ECallTypeCSVoice:
- {
- if ( aCallParameters.LineType() == CCCECallParameters::ECCELineTypeAux )
- {
- lineId = RCSPLineContainer::ECSPLineAuxSpeech;
- }
- else if ( aCallParameters.LineType() == CCCECallParameters::ECCELineTypePrimary )
- {
- lineId = RCSPLineContainer::ECSPLineSpeech;
- }
- else
- {
- CSPLOGSTRING(CSPOBJECT, "CSProvider::ResolveLineIdL ERROR: Unknown line type.");
- User::Leave( KErrNotSupported );
- }
- break;
- }
- case CCPCall::ECallTypeVideo: // Fall through
- {
- lineId = RCSPLineContainer::ECSPLineData;
- break;
- }
-
- default:
- {
- CSPLOGSTRING(CSPOBJECT, "CSProvider::ResolveLineIdL ERROR: Unknown call type");
- User::Leave( KErrNotSupported );
- }
- }
-
- return lineId;
- }
-
-// ---------------------------------------------------------
-// Resolves call type, service id and line type based on
-// line id.
-// ---------------------------------------------------------
-//
-TInt RCSPLineContainer::ResolveCallInfo( RCSPLineContainer::TCSPLineId aLineId,
- TUint32& aServiceId,
- CCPCall::TCallType& aCallType,
- CCCECallParameters::TCCELineType& aLineType ) const
-
- {
- TInt err(KErrNone);
- aLineType = CCCECallParameters::ECCELineTypePrimary;
- aServiceId = iServiceId;
-
- if ( aLineId == RCSPLineContainer::ECSPLineSpeech )
- {
- aCallType = CCPCall::ECallTypeCSVoice;
- }
- else if ( aLineId == RCSPLineContainer::ECSPLineAuxSpeech )
- {
- aCallType = CCPCall::ECallTypeCSVoice;
- aLineType = CCCECallParameters::ECCELineTypeAux;
- }
- else if ( aLineId == RCSPLineContainer::ECSPLineData )
- {
- aCallType = CCPCall::ECallTypeVideo;
- }
- else
- {
- CSPLOGSTRING(CSPOBJECT, "RCSPLineContainer::ResolveCallInfo() ERROR Unknown line id");
- err = KErrArgument;
- }
- CSPLOGSTRING2(CSPINT, "RCSPLineContainer::ResolveCallInfo() aCallType=%d", aCallType );
- CSPLOGSTRING2(CSPINT, "RCSPLineContainer::ResolveCallInfo() aLineType=%d", aLineType );
-
- return err;
- }
-
-
-// End of File
-
--- a/convergedcallengine/csplugin/src/tcspskypeidparser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,105 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Parses Skype id from UUI message.
-*
-*/
-
-
-#include "tcspskypeidparser.h"
-
-const TInt KMinSkypeIdUUILength = 3;
-const TInt KMaxSkypeIdUUILength = 33;
-const TInt KMaxSkypeIdLength = 32;
-const TInt KStartOf31To32EncodingByte = 26;
-const TInt KUUIMTDicriminator = 0x44;
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Constructor
-// ---------------------------------------------------------------------------
-//
-TCSPSkypeIdParser::TCSPSkypeIdParser()
- {
- }
-
-// ---------------------------------------------------------------------------
-// Creates buffer to be used by client with parse method.
-// ---------------------------------------------------------------------------
-//
-HBufC* TCSPSkypeIdParser::CreateSkypeIdBufferL()
- {
- return HBufC::NewL( KMaxSkypeIdLength );
- }
-
-// ---------------------------------------------------------------------------
-// Parses skype id.
-// SkypeID format:
-// byte 0: Protocol discriminator: Always 0x00
-// byte 1: User-User Information Discriminator.
-// For MT call this has to be 0x44
-// Byte 2: First skype id character a.k.a payload. MSB bit is zero.
-// Byte 26-33 May have MSB bit set, which are bits of the last character.
-// The 26 byte's MSB is the last characters MSB bit.
-// ---------------------------------------------------------------------------
-//
-TInt TCSPSkypeIdParser::Parse(
- const TDesC& aUUIMessage,
- TDes& aSkypeId )
- {
- const TInt messageLength( aUUIMessage.Length() );
- TInt error = KErrNone;
-
- const TBool messageSizeOk = (messageLength >= KMinSkypeIdUUILength &&
- messageLength <= KMaxSkypeIdUUILength);
-
- if( messageSizeOk &&
- ( aUUIMessage[1] ) == KUUIMTDicriminator ) // address type
- {
-
- TUint lastChar = 0;
-
- // skypeId payload starts from the second byte.
- TInt i = 2;
- for( ; i < messageLength; i++ )
- {
- TUint byte = aUUIMessage[i];
- if( i >= KStartOf31To32EncodingByte )
- {
- // 31 to 32 encoding: last character is build from
- // 7 last bytes.
- lastChar = lastChar << 1;
- lastChar |= (byte>>7)&0x01;
- }
- // MSB bit is not part of the character.
- aSkypeId.Append( byte & 0x7F );
-
-
- }
-
- // Append the last char only if the aUUIMessage size was the maximum and there
- // is content in the last char.
- if( messageLength == KMaxSkypeIdUUILength && lastChar != 0 )
- {
- aSkypeId.Append(lastChar);
- }
-
- }
- else
- {
- error = KErrNotSupported;
- }
-
- return error;
- }
--- a/convergedcallengine/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -27,7 +27,9 @@
#include "../spsettings/group/bld.inf"
#include "../cenrepdatabase/group/bld.inf"
#include "../serviceselector/group/bld.inf"
-#include "../csplugin/group/bld.inf"
+// <-- QT PHONE START -->
+//#include "../csplugin/group/bld.inf"
+// <-- QT PHONE END -->
PRJ_TESTMMPFILES
--- a/convergedcallengine/serviceselector/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/serviceselector/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -34,7 +34,7 @@
../rom/serviceselectorresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(serviceselectorresources.iby)
// Stub sis file
-../srcdata/serviceselector_stub.sis /epoc32/data/z/system/install/serviceselector_stub.sis
+../srcdata/serviceselector_stub.sis /epoc32/data/z/system/install/serviceselector_stub.sis
PRJ_MMPFILES
serviceselector.mmp
--- a/convergedcallengine/serviceselector/group/serviceselector.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/serviceselector/group/serviceselector.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -22,9 +22,9 @@
TARGET serviceselector.dll
TARGETTYPE dll
UID 0x1000008d 0x20019532
-VENDORID VID_DEFAULT
+VENDORID VID_DEFAULT
-CAPABILITY CAP_GENERAL_DLL
+CAPABILITY CAP_GENERAL_DLL
SOURCEPATH ../src
@@ -37,8 +37,8 @@
SOURCE cssservicehandlervoip.cpp
SOURCE csslistquerydialog.cpp
SOURCE csssettingshandler.cpp
-SOURCE cssnotedialog.cpp
-SOURCE cssbshandler.cpp
+SOURCE cssnotedialog.cpp
+SOURCE cssbshandler.cpp
SOURCE cssiconfileprovider.cpp
USERINCLUDE ../inc
@@ -59,16 +59,18 @@
LIBRARY euser.lib
LIBRARY featmgr.lib // Feature manager.
LIBRARY flogger.lib // For logging.
-LIBRARY cch.lib // Converged connection handler client API
+// <-- QT PHONE START -->
+//LIBRARY cch.lib // Converged connection handler client API
+// <-- QT PHONE END -->
LIBRARY serviceprovidersettings.lib // For service settings
LIBRARY avkon.lib // For UI queries
LIBRARY eikdlg.lib // For UI queries
-LIBRARY eikctl.lib // For UI queries
-LIBRARY cone.lib
+LIBRARY eikctl.lib // For UI queries
+LIBRARY cone.lib
LIBRARY eikcoctl.lib // menu bar
-LIBRARY eikcore.lib
-LIBRARY bafl.lib // For CDesArrays
-LIBRARY commonengine.lib // For stringloader
+LIBRARY eikcore.lib
+LIBRARY bafl.lib // For CDesArrays
+LIBRARY commonengine.lib // For stringloader
LIBRARY aknicon.lib
LIBRARY egul.lib
LIBRARY bsclient.lib
--- a/convergedcallengine/serviceselector/inc/cssconnectionhandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/serviceselector/inc/cssconnectionhandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,9 @@
// INCLUDES
#include <e32base.h>
-#include <cch.h>
+// <-- QT PHONE START -->
+//#include <cch.h>
+// <-- QT PHONE END-->
// FORWARD DECLARATIONS
// None
@@ -74,7 +76,10 @@
private: // Data
// Converged Connection Handler client interface
- CCch* iCch;
+ // <-- QT PHONE START -->
+ //CCch* iCch;
+ // <-- QT PHONE END-->
+
};
--- a/convergedcallengine/serviceselector/inc/cssiconfileprovider.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/serviceselector/inc/cssiconfileprovider.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define C_SSICONFILEPROVIDER_H
#include <e32base.h>
-#include <AknIconUtils.h>
+#include <AknIconUtils.h>
/**
* Declarition of CSsIconFileProvider.
@@ -65,7 +65,7 @@
/**
* By default Symbian 2nd phase constructor is private.
*/
- void ConstructL( RFile& aFile );
+ void ConstructL( RFile& aFile );
private: // data
--- a/convergedcallengine/serviceselector/inc/cssservicehandlervoip.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/serviceselector/inc/cssservicehandlervoip.h Fri Mar 19 09:40:14 2010 +0200
@@ -25,7 +25,7 @@
#include "cservicehandler.h"
#include <e32base.h>
#include <badesca.h>
-#include <AknIconArray.h>
+#include <AknIconArray.h>
#include <gulicon.h>
// CONSTANTS
--- a/convergedcallengine/serviceselector/rom/serviceselector.iby Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/serviceselector/rom/serviceselector.iby Fri Mar 19 09:40:14 2010 +0200
@@ -20,6 +20,6 @@
#define __SERVICESELECTOR_IBY__
file=ABI_DIR\BUILD_DIR\serviceselector.dll SHARED_LIB_DIR\serviceselector.dll
-data=ZSYSTEM\install\serviceselector_stub.sis System\Install\serviceselector_stub.sis
+data=ZSYSTEM\install\serviceselector_stub.sis System\Install\serviceselector_stub.sis
#endif
--- a/convergedcallengine/serviceselector/src/cssbshandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/serviceselector/src/cssbshandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -22,9 +22,9 @@
#include <mbselement.h>
#include <cbsbitmap.h>
#include <coemain.h>
-#include <AknsItemID.h>
-#include <AknsSkinInstance.h>
-#include <AknsUtils.h>
+#include <AknsItemID.h>
+#include <AknsSkinInstance.h>
+#include <AknsUtils.h>
#include "cssiconfileprovider.h"
#include "cssbshandler.h"
--- a/convergedcallengine/serviceselector/src/cssconnectionhandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/serviceselector/src/cssconnectionhandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -57,13 +57,19 @@
//
void CSsConnectionHandler::ConstructL()
{
- iCch = CCch::NewL();
+ // <-- QT PHONE START -->
+ //iCch = CCch::NewL();
+ // <-- QT PHONE END -->
+
}
// Destructor
CSsConnectionHandler::~CSsConnectionHandler()
{
- delete iCch;
+ // <-- QT PHONE START -->
+ //delete iCch;
+ // <-- QT PHONE END-->
+
}
// -----------------------------------------------------------------------------
@@ -73,11 +79,14 @@
//
TBool CSsConnectionHandler::IsVoipServiceRegistered
(
- TUint aServiceId
+ TUint /*aServiceId */
) const
{
+
+ TBool registered( EFalse );
+ // <-- QT PHONE START -->
+/*
TCchServiceStatus serviceStatus;
- TBool registered( EFalse );
CCchService* service = iCch->GetService( aServiceId );
if ( service )
{
@@ -90,6 +99,10 @@
(TInt) aServiceId,
(TInt) ECCHEnabled == serviceStatus.State(),
(TInt) serviceStatus.Error());
+ */
+
+ // <-- QT PHONE END-->
+
return registered;
}
--- a/convergedcallengine/serviceselector/src/cssnotedialog.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/serviceselector/src/cssnotedialog.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
#include "cssuiutilities.h"
#include "cssserviceutilities.h"
#include "csslogger.h"
-#include <StringLoader.h>
+#include <StringLoader.h>
#include <avkon.rsg>
// ================= MEMBER FUNCTIONS =======================================
@@ -91,7 +91,7 @@
}
return ret;
}
-
+
// ================= OTHER EXPORTED FUNCTIONS ===============================
// End of File
--- a/convergedcallengine/serviceselector/src/cssuiutilities.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/serviceselector/src/cssuiutilities.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -26,8 +26,8 @@
#include <coemain.h>
#include <bautils.h>
#include <data_caging_path_literals.hrh> // For resource dir definations
-#include <StringLoader.h>
-#include <AknsUtils.h>
+#include <StringLoader.h>
+#include <AknsUtils.h>
#include <avkon.mbg>
// CONSTANTS
--- a/convergedcallengine/serviceselector/srcdata/serviceselector.rss Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/serviceselector/srcdata/serviceselector.rss Fri Mar 19 09:40:14 2010 +0200
@@ -27,7 +27,7 @@
#include <eikon.rh>
#include <avkon.hrh>
#include <avkon.rh>
-#include <avkon.rsg>
+#include <avkon.rsg>
#include "serviceselector.loc"
--- a/convergedcallengine/spsettings/backuphelper/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/spsettings/backuphelper/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
DEFAULT
PRJ_EXPORTS
-../data/backup_registration.xml z:/private/200286d2/backup_registration.xml
+../data/backup_registration.xml z:/private/200286d2/backup_registration.xml
// Stub files
../data/spsbackuphelper_stub.sis /epoc32/data/z/system/install/spsbackuphelper_stub.sis
--- a/convergedcallengine/spsettings/backuphelper/group/spsbackuphelper.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/spsettings/backuphelper/group/spsbackuphelper.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -17,22 +17,22 @@
#include <platform_paths.hrh>
-TARGET spsbackuphelper.exe
-TARGETTYPE exe
+TARGET spsbackuphelper.exe
+TARGETTYPE exe
UID 0x100039CE 0x200286D2
CAPABILITY WriteDeviceData ReadDeviceData
MW_LAYER_SYSTEMINCLUDE
SYSTEMINCLUDE /epoc32/include/connect
-USERINCLUDE ../inc
+USERINCLUDE ../inc
USERINCLUDE ../../inc
-SOURCEPATH ../src
-SOURCE spsbackuphelpermain.cpp
+SOURCEPATH ../src
+SOURCE spsbackuphelpermain.cpp
SOURCE spsbackuphelperperformer.cpp
SOURCE spsbackuphelpermonitor.cpp
-LIBRARY euser.lib
+LIBRARY euser.lib
LIBRARY serviceprovidersettings.lib
LIBRARY centralrepository.lib
Binary file convergedcallengine/spsettings/conf/spsettings.confml has changed
--- a/convergedcallengine/spsettings/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/spsettings/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -24,7 +24,7 @@
// Public headers
-../data/backup_registration.xml z:/private/10282e7e/backup_registration.xml
+../data/backup_registration.xml z:/private/10282e7e/backup_registration.xml
#if defined CORE_MW_LAYER_IBY_EXPORT_PATH
../rom/spsettings.iby CORE_MW_LAYER_IBY_EXPORT_PATH(spsettings.iby)
@@ -32,7 +32,7 @@
// Generic configuration interface for component cenrep settings
../conf/spsettings.confml MW_LAYER_CONFML(spsettings.confml)
-../conf/spsettings_10282E7F.crml MW_LAYER_CRML(spsettings_10282e7f.crml)
+../conf/spsettings_10282E7F.crml MW_LAYER_CRML(spsettings_10282E7F.crml)
PRJ_MMPFILES
serviceprovidersettings.mmp
--- a/convergedcallengine/spsettings/group/serviceprovidersettings.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/spsettings/group/serviceprovidersettings.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -38,14 +38,16 @@
USERINCLUDE ../inc
-APP_LAYER_SYSTEMINCLUDE
+// <-- QT PHONE START-->
+MW_LAYER_SYSTEMINCLUDE
+// <-- QT PHONE END-->
LIBRARY euser.lib
LIBRARY centralrepository.lib
LIBRARY bafl.lib // CDesCArray
LIBRARY flogger.lib // for logging
-LIBRARY featmgr.lib
-LIBRARY cenrepdatabase.lib
+LIBRARY featmgr.lib
+LIBRARY cenrepdatabase.lib
//DEFFILE ?filename
--- a/convergedcallengine/spsettings/inc/spsettingsengine.h Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/spsettings/inc/spsettingsengine.h Fri Mar 19 09:40:14 2010 +0200
@@ -40,238 +40,238 @@
NONSHARABLE_CLASS( CSPSettingsEngine ): public CBase
{
- public: // Constructors and destructor
+ public: // Constructors and destructor
- /**
- * Two-phased constructor.
- */
- static CSPSettingsEngine* NewL();
+ /**
+ * Two-phased constructor.
+ */
+ static CSPSettingsEngine* NewL();
- /**
- * Two-phased constructor.
- */
- static CSPSettingsEngine* NewLC();
+ /**
+ * Two-phased constructor.
+ */
+ static CSPSettingsEngine* NewLC();
- /**
- * Destructors.
- */
- virtual ~CSPSettingsEngine();
+ /**
+ * Destructors.
+ */
+ virtual ~CSPSettingsEngine();
- public: // memeber functions
- /**
- * Starts transaction in repository
- *
- * @since S60 v3.2
- */
- TInt BeginTransactionLC();
+ public: // memeber functions
+ /**
+ * Starts transaction in repository
+ *
+ * @since S60 v3.2
+ */
+ TInt BeginTransactionLC();
- /**
- * Commits changes in repository
- *
- * @since S60 v3.2
- */
- TInt CommitTransaction();
-
- /**
- * Rollback changes in repository
- *
- * @since S60 v3.2
- */
- void RollbackTransaction();
+ /**
+ * Commits changes in repository
+ *
+ * @since S60 v3.2
+ */
+ TInt CommitTransaction();
+
+ /**
+ * Rollback changes in repository
+ *
+ * @since S60 v3.2
+ */
+ void RollbackTransaction();
- /**
- * Stores new service provider settings entry
- *
- * @since S60 v3.2
- * @param aEntry New service provider settings entry, on return service Id is filled in
- */
- void AddEntryL( CSPEntry& aEntry );
+ /**
+ * Stores new service provider settings entry
+ *
+ * @since S60 v3.2
+ * @param aEntry New service provider settings entry, on return service Id is filled in
+ */
+ void AddEntryL( CSPEntry& aEntry );
- /**
- * Search service provider settings entry by service ID.
- *
- * @since S60 v3.2
- * @param aServiceId Id of requested xSP settings entry
- * @param aEntry on return, SP settings entry corresponding to aServiceId.
- * @return error code, KErrNone if succeeded, otherwise system wide error code
- */
- TInt FindEntryL( TServiceId aServiceId, CSPEntry& aEntry );
+ /**
+ * Search service provider settings entry by service ID.
+ *
+ * @since S60 v3.2
+ * @param aServiceId Id of requested xSP settings entry
+ * @param aEntry on return, SP settings entry corresponding to aServiceId.
+ * @return error code, KErrNone if succeeded, otherwise system wide error code
+ */
+ TInt FindEntryL( TServiceId aServiceId, CSPEntry& aEntry );
- /**
- * Updates service provider settings entry to settings storage.
- *
- * @since S60 v3.2
- * @param aEntry Updated service provider settings entry
- * @return error code, KErrNone if update succeeded, otherwise system wide error code
- */
- TInt UpdateEntryL( const CSPEntry& aEntry );
+ /**
+ * Updates service provider settings entry to settings storage.
+ *
+ * @since S60 v3.2
+ * @param aEntry Updated service provider settings entry
+ * @return error code, KErrNone if update succeeded, otherwise system wide error code
+ */
+ TInt UpdateEntryL( const CSPEntry& aEntry );
- /**
- * Deletes service provider settings entry from storage by service ID.
- *
- * @since S60 v3.2
- * @param aEntryId Id of settings entry which is going to be deleted
- * @return error code, KErrNone if delete succeeded, otherwise system wide error code
- */
- TInt DeleteEntryL( TServiceId aServiceId );
+ /**
+ * Deletes service provider settings entry from storage by service ID.
+ *
+ * @since S60 v3.2
+ * @param aEntryId Id of settings entry which is going to be deleted
+ * @return error code, KErrNone if delete succeeded, otherwise system wide error code
+ */
+ TInt DeleteEntryL( TServiceId aServiceId );
- /**
- * Search property of service provider settings entry from storage.
- *
- * @since S60 v3.2
- * @param aServiceId The service ID of requested service entry
- * @param aPropertyName property name to be found
- * @param aProperty on return, requested property
- * @return error code, KErrNone if succeeded, otherwise system wide error code
- */
- TInt FindPropertyL( TServiceId aServiceId,
- TServicePropertyName aPropertyName,
- CSPProperty& aProperty );
+ /**
+ * Search property of service provider settings entry from storage.
+ *
+ * @since S60 v3.2
+ * @param aServiceId The service ID of requested service entry
+ * @param aPropertyName property name to be found
+ * @param aProperty on return, requested property
+ * @return error code, KErrNone if succeeded, otherwise system wide error code
+ */
+ TInt FindPropertyL( TServiceId aServiceId,
+ TServicePropertyName aPropertyName,
+ CSPProperty& aProperty );
- /**
- * Add or update properties of service provider settings entry to storage.
- * If property name exists, update property. If property doesn't exist,
- *
- * @since S60 v3.2
- * @param aServiceId The ID of updated service entry
- * @param aPropertyArray new properties to be added or updated
- * @return error code, KErrNone if update succeeded, otherwise system wide error code
- */
- TInt AddOrUpdatePropertiesL( TServiceId aServiceId, const RPropertyArray& aPropertyArray );
+ /**
+ * Add or update properties of service provider settings entry to storage.
+ * If property name exists, update property. If property doesn't exist,
+ *
+ * @since S60 v3.2
+ * @param aServiceId The ID of updated service entry
+ * @param aPropertyArray new properties to be added or updated
+ * @return error code, KErrNone if update succeeded, otherwise system wide error code
+ */
+ TInt AddOrUpdatePropertiesL( TServiceId aServiceId, const RPropertyArray& aPropertyArray );
- /**
- * Return count of service provider settings entries in storage.
- *
- * @since S60 v3.2
- * @return Count of stored service provider settings.
- */
- TInt SettingsCountL();
+ /**
+ * Return count of service provider settings entries in storage.
+ *
+ * @since S60 v3.2
+ * @return Count of stored service provider settings.
+ */
+ TInt SettingsCountL();
- /**
- * Search all service provider IDs from storage
- *
- * @since S60 v3.2
- * @param aServiceIds An array containing returned service IDs
- * @return error code
- */
- TInt FindServiceIdsL( RIdArray& aServiceIds );
+ /**
+ * Search all service provider IDs from storage
+ *
+ * @since S60 v3.2
+ * @param aServiceIds An array containing returned service IDs
+ * @return error code
+ */
+ TInt FindServiceIdsL( RIdArray& aServiceIds );
- /**
- * Search all service names from settings storage by given service IDs.
- * Removes service ID from given array if corresponding service name
- * is not found.
- *
- * @since S60 v3.2
- * @param aServiceIds An array of service IDs
- * @param aServiceNames on return, array which saves found service names
- */
- void FindServiceNamesL( RIdArray& aServiceIds, CDesCArray& aServiceNames );
+ /**
+ * Search all service names from settings storage by given service IDs.
+ * Removes service ID from given array if corresponding service name
+ * is not found.
+ *
+ * @since S60 v3.2
+ * @param aServiceIds An array of service IDs
+ * @param aServiceNames on return, array which saves found service names
+ */
+ void FindServiceNamesL( RIdArray& aServiceIds, CDesCArray& aServiceNames );
- /**
- * Search subservice properties of requested service provider settings entry by ID.
- *
- * @since S60 v3.2
- * @param aServiceId The ID of requested service entry
- * @param aPropertyType property type of sub service
- * @param aPropertyArray on return, array which saves found subservice properties
- * @return error code
- */
- TInt FindSubServicePropertiesL( TServiceId aServiceId,
- TSPItemType aPropertyType,
- RPropertyArray& aPropertyArray );
+ /**
+ * Search subservice properties of requested service provider settings entry by ID.
+ *
+ * @since S60 v3.2
+ * @param aServiceId The ID of requested service entry
+ * @param aPropertyType property type of sub service
+ * @param aPropertyArray on return, array which saves found subservice properties
+ * @return error code
+ */
+ TInt FindSubServicePropertiesL( TServiceId aServiceId,
+ TSPItemType aPropertyType,
+ RPropertyArray& aPropertyArray );
- /**
- * Deletes service properties by service ID and property name.
- *
- * @since S60 v3.2
- * @param aServiceId The service ID of requested service entry
- * @param aNameArray name of properties to be deleted
- * @return error code
- */
- TInt DeleteServicePropertiesL( TServiceId aServiceId,
- const RPropertyNameArray& aNameArray );
-
- /**
- * Find service IDs with same properties
- *
- * @since S60 v3.2
- * @param aPropertyArray property array
- * @param on return, service Ids with same properties
- * @return error code
- */
- void FindServiceIdsFromPropertiesL( const RPropertyArray& aPropertyArray, RIdArray& aServiceIds );
-
- /**
- * Check feature is supported or not
- *
- * @since S60 v3.2
- * @return SIP VoIP software version
- */
- TBool IsFeatureSupportedL( TSPServiceFeature aFeature,
- TBool aWriteAllowed );
-
-
- /**
- * When service table is changed, update the P&S key
- *
- * @since S60 v3.2
- */
- void UpdateSupportFeaturePSKeyL();
+ /**
+ * Deletes service properties by service ID and property name.
+ *
+ * @since S60 v3.2
+ * @param aServiceId The service ID of requested service entry
+ * @param aNameArray name of properties to be deleted
+ * @return error code
+ */
+ TInt DeleteServicePropertiesL( TServiceId aServiceId,
+ const RPropertyNameArray& aNameArray );
+
+ /**
+ * Find service IDs with same properties
+ *
+ * @since S60 v3.2
+ * @param aPropertyArray property array
+ * @param on return, service Ids with same properties
+ * @return error code
+ */
+ void FindServiceIdsFromPropertiesL( const RPropertyArray& aPropertyArray, RIdArray& aServiceIds );
+
+ /**
+ * Check feature is supported or not
+ *
+ * @since S60 v3.2
+ * @return SIP VoIP software version
+ */
+ TBool IsFeatureSupportedL( TSPServiceFeature aFeature,
+ TBool aWriteAllowed );
+
+
+ /**
+ * When service table is changed, update the P&S key
+ *
+ * @since S60 v3.2
+ */
+ void UpdateSupportFeaturePSKeyL();
- /**
- * Check if it is VoIP Service ID
- *
- * @since S60 v3.2.3
- * @return ETrue if yes
- */
- TBool IsVoIPServiceL( TServiceId aServiceId );
+ /**
+ * Check if it is VoIP Service ID
+ *
+ * @since S60 v3.2.3
+ * @return ETrue if yes
+ */
+ TBool IsVoIPServiceL( TServiceId aServiceId );
- /**
- * Get Name array from Property array
- *
- * @since S60 v3.2.3
- */
- void NameArrayFromPropertyArrayL( RPropertyNameArray& aNameArray, const RPropertyArray& aPropertyArray );
+ /**
+ * Get Name array from Property array
+ *
+ * @since S60 v3.2.3
+ */
+ void NameArrayFromPropertyArrayL( RPropertyNameArray& aNameArray, const RPropertyArray& aPropertyArray );
- /**
- * Check if an array has call related property name in it
- *
- * @since S60 v3.2.3
- * @return ETrue if yes
- */
- TBool HasCallPropertyName( const RPropertyNameArray& aNameArray );
-
- /**
- * Check if an array has VoIP or Vmbx related property name in it
- *
- * @since S60 v3.2.3
- * @return ETrue if yes
- */
- TBool HasVoIPAndVmbxPropertyName( const RPropertyNameArray& aNameArray );
-
- private:
+ /**
+ * Check if an array has call related property name in it
+ *
+ * @since S60 v3.2.3
+ * @return ETrue if yes
+ */
+ TBool HasCallPropertyName( const RPropertyNameArray& aNameArray );
+
+ /**
+ * Check if an array has VoIP or Vmbx related property name in it
+ *
+ * @since S60 v3.2.3
+ * @return ETrue if yes
+ */
+ TBool HasVoIPAndVmbxPropertyName( const RPropertyNameArray& aNameArray );
+
+ private:
- /**
- * C++ default constructor.
- */
- CSPSettingsEngine();
+ /**
+ * C++ default constructor.
+ */
+ CSPSettingsEngine();
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
- /**
- * Walk through all the sevices and check there is any service match
- *
- * @since S60 v3.2
- * @param aMask attribute mask
- * @param aValue value to be checked
- */
- TBool CheckFeatureL( TInt aMask, TInt aValue );
-
+ /**
+ * Walk through all the sevices and check there is any service match
+ *
+ * @since S60 v3.2
+ * @param aMask attribute mask
+ * @param aValue value to be checked
+ */
+ TBool CheckFeatureL( TInt aMask, TInt aValue );
+
void ConvertSpEntryToCenRepArrayL( const CSPEntry& aEntry,
RIpAppPropArray& aArray );
@@ -283,9 +283,9 @@
RPropertyNameArray& aNameArray );
static void CleanupPointerArray( TAny* aPointer );
-
-
- private: // data
+
+
+ private: // data
CCenRepDatabaseUtil* iCenRepUtils;
};
--- a/convergedcallengine/spsettings/src/spentry.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/spsettings/src/spentry.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -233,7 +233,7 @@
// ---------------------------------------------------------------------------
//
EXPORT_C TInt CSPEntry::GetProperty( const CSPProperty*& aProperty,
- TServicePropertyName aPropertyName ) const
+ TServicePropertyName aPropertyName ) const
{
TInt index = SearchProperty( aPropertyName );
@@ -254,7 +254,7 @@
// ---------------------------------------------------------------------------
//
EXPORT_C TInt CSPEntry::GetProperty( const CSPProperty*& aProperty,
- TInt aIndex ) const
+ TInt aIndex ) const
{
if ( iPropertyArray.Count() > aIndex && 0 <= aIndex )
{
@@ -347,9 +347,9 @@
// ---------------------------------------------------------------------------
//
EXPORT_C void CSPEntry::Reset()
- {
- iServiceId = KSPNoId;
- iServiceName.Close();
- iPropertyArray.ResetAndDestroy();
- }
+ {
+ iServiceId = KSPNoId;
+ iServiceName.Close();
+ iPropertyArray.ResetAndDestroy();
+ }
--- a/convergedcallengine/spsettings/src/spnotifychange.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/spsettings/src/spnotifychange.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -81,7 +81,7 @@
XSPSLOGSTRING( "CSPNotifyChange::~CSPNotifyChange() - IN" );
delete iData;
Cancel();
- iIdArray.Reset();
+ iIdArray.Reset();
iIdArray.Close();
iProperty.Close();
@@ -138,7 +138,7 @@
array.Close();
- XSPSLOGSTRING( "CSPNotifyChange::RunL() - OUT" );
+ XSPSLOGSTRING( "CSPNotifyChange::RunL() - OUT" );
}
// ---------------------------------------------------------------------------
@@ -146,52 +146,52 @@
// ---------------------------------------------------------------------------
//
TInt CSPNotifyChange::RunError( TInt aError )
- {
- XSPSLOGSTRING( "CSPNotifyChange::RunError() - IN" );
-
- iObserver.HandleError( aError );
+ {
+ XSPSLOGSTRING( "CSPNotifyChange::RunError() - IN" );
+
+ iObserver.HandleError( aError );
- Subscribe();
+ Subscribe();
+
+ XSPSLOGSTRING( "CSPNotifyChange::RunError() - OUT" );
- XSPSLOGSTRING( "CSPNotifyChange::RunError() - OUT" );
-
- return KErrNone;
- }
-
+ return KErrNone;
+ }
+
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
//
EXPORT_C void CSPNotifyChange::NotifyChangeL( const RIdArray& aIdArray )
- {
- XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeL() - IN" );
-
- iIdArray.Reset();
-
- TInt count = aIdArray.Count();
-
- for( TInt i = 0; i < count; i++)
- {
- User::LeaveIfError( iIdArray.Append( aIdArray[i] ) );
- }
-
- Subscribe();
-
- XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeL() - OUT" );
- }
+ {
+ XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeL() - IN" );
+
+ iIdArray.Reset();
+
+ TInt count = aIdArray.Count();
+
+ for( TInt i = 0; i < count; i++)
+ {
+ User::LeaveIfError( iIdArray.Append( aIdArray[i] ) );
+ }
+
+ Subscribe();
+
+ XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeL() - OUT" );
+ }
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
//
EXPORT_C void CSPNotifyChange::NotifyChangeCancel()
- {
- XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeCancel() - IN" );
-
- Cancel();
-
- XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeCancel() - OUT" );
- }
+ {
+ XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeCancel() - IN" );
+
+ Cancel();
+
+ XSPSLOGSTRING( "CSPNotifyChange::NotifyChangeCancel() - OUT" );
+ }
// ---------------------------------------------------------------------------
//
--- a/convergedcallengine/spsettings/src/spproperty.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/spsettings/src/spproperty.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -166,21 +166,21 @@
TInt value;
TInt err = convert.Val( value );
if( err == KErrNone )
- {
- if( value != EOONotSet && value != EOff && value != EOn )
- {
- return KErrOverflow;
- }
- else
- {
- aValue = static_cast<TOnOff>( value );
- return KErrNone;
- }
- }
+ {
+ if( value != EOONotSet && value != EOff && value != EOn )
+ {
+ return KErrOverflow;
+ }
+ else
+ {
+ aValue = static_cast<TOnOff>( value );
+ return KErrNone;
+ }
+ }
else
- {
- return err;
- }
+ {
+ return err;
+ }
}
@@ -253,15 +253,15 @@
EXPORT_C void CSPProperty::CopyL( const CSPProperty& aSource )
{
if( this != &aSource )
- {
- User::LeaveIfError( SetName( aSource.GetName() ) );
- SetDataType( aSource.GetDataType() );
- SetPropertyType( aSource.GetPropertyType() );
+ {
+ User::LeaveIfError( SetName( aSource.GetName() ) );
+ SetDataType( aSource.GetDataType() );
+ SetPropertyType( aSource.GetPropertyType() );
- iPropertyValue.Close();
- User::LeaveIfError( iPropertyValue.Create( KSPMaxDesLength ) );
- User::LeaveIfError( aSource.GetValue( iPropertyValue ) );
- }
+ iPropertyValue.Close();
+ User::LeaveIfError( iPropertyValue.Create( KSPMaxDesLength ) );
+ User::LeaveIfError( aSource.GetValue( iPropertyValue ) );
+ }
}
@@ -317,38 +317,38 @@
EXPORT_C TSPItemType CSPProperty::PropertyType( TServicePropertyName aProperty )
{
if ( ( aProperty >= ESubPropertyVoIPSettingsId && aProperty <= ESubPropertyVoIPTemporaryIAPId ) ||
- ( aProperty >= ESubPropertyVoIPRelNumber && aProperty <= ESubPropertyVoIPAddrScheme ) ||
- ( aProperty >= ESubPropertyVoIPEnabled && aProperty <= ESubPropertyVoIPEnabled ) )
+ ( aProperty >= ESubPropertyVoIPRelNumber && aProperty <= ESubPropertyVoIPAddrScheme ) ||
+ ( aProperty >= ESubPropertyVoIPEnabled && aProperty <= ESubPropertyVoIPEnabled ) )
{
return EItemTypeVoIPSubProperty;
}
else if ( ( aProperty >= ESubPropertyPresenceSettingsId && aProperty <= ESubPropertyPresenceLaunchUid ) ||
- ( aProperty >= ESubPropertyPresenceAddrScheme && aProperty <= ESubPropertyPresenceAddrScheme ) ||
- ( aProperty >= ESubPropertyPresenceEnabled && aProperty <= ESubPropertyPresenceRequestPreference ) )
+ ( aProperty >= ESubPropertyPresenceAddrScheme && aProperty <= ESubPropertyPresenceAddrScheme ) ||
+ ( aProperty >= ESubPropertyPresenceEnabled && aProperty <= ESubPropertyPresenceRequestPreference ) )
{
return EItemTypePresenceSubProperty;
}
else if ( ( aProperty >= ESubPropertyIMSettingsId && aProperty <= ESubPropertyIMLaunchUid ) ||
- ( aProperty >= ESubPropertyIMAddrScheme && aProperty <= ESubPropertyIMAddrScheme ) ||
- ( aProperty >= ESubPropertyIMEnabled && aProperty <= ESubPropertyIMEnabled ) )
+ ( aProperty >= ESubPropertyIMAddrScheme && aProperty <= ESubPropertyIMAddrScheme ) ||
+ ( aProperty >= ESubPropertyIMEnabled && aProperty <= ESubPropertyIMEnabled ) )
{
return EItemTypeIMSubProperty;
}
else if ( ( aProperty >= ESubPropertyVMBXSettingsId && aProperty <= ESubPropertyVMBXLaunchUid ) ||
- ( aProperty >= ESubPropertyVMBXListenAddress && aProperty <= ESubPropertyVMBXAddrScheme ) ||
- ( aProperty >= ESubPropertyVMBXListenRegister && aProperty <= ESubPropertyVMBXEnabled ) )
+ ( aProperty >= ESubPropertyVMBXListenAddress && aProperty <= ESubPropertyVMBXAddrScheme ) ||
+ ( aProperty >= ESubPropertyVMBXListenRegister && aProperty <= ESubPropertyVMBXEnabled ) )
{
return EItemTypeVMBXSubProperty;
}
else if( ( aProperty >= EPropertyServiceAttributeMask && aProperty <= EPropertyRingtoneTimeout ) ||
- ( aProperty >= EPropertyBrandId && aProperty <= EPropertyIncomingEmailserver ) )
+ ( aProperty >= EPropertyBrandId && aProperty <= EPropertyIncomingEmailserver ) )
{
return EItemTypeProperty;
}
else
- {
- return EItemTypeNotDefined;
- }
+ {
+ return EItemTypeNotDefined;
+ }
}
@@ -363,17 +363,17 @@
RBuf tmp;
TInt err = tmp.Create( KSPMaxDesLength );
if( err != KErrNone )
- {
- return EFalse;
- }
+ {
+ return EFalse;
+ }
err = aProperty.GetValue( tmp );
if( err != KErrNone )
- {
- return EFalse;
- }
+ {
+ return EFalse;
+ }
result = ( iPropertyType == aProperty.GetPropertyType() &&
- iPropertyName == aProperty.GetName() &&
+ iPropertyName == aProperty.GetName() &&
iDataType == aProperty.GetDataType() &&
0 == iPropertyValue.Compare( tmp ) );
tmp.Close();
@@ -387,19 +387,19 @@
// ---------------------------------------------------------------------------
//
EXPORT_C TSPItemType CSPProperty::GetPropertyType() const
- {
- return iPropertyType;
- }
+ {
+ return iPropertyType;
+ }
// ---------------------------------------------------------------------------
// Set default value for property
// ---------------------------------------------------------------------------
//
TInt CSPProperty::SetPropertyType( TSPItemType aPropertyType )
- {
- iPropertyType = aPropertyType;
-
- return KErrNone;
- }
-
+ {
+ iPropertyType = aPropertyType;
+
+ return KErrNone;
+ }
+
--- a/convergedcallengine/spsettings/src/spsettingsengine.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/spsettings/src/spsettingsengine.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
#include <centralrepository.h>
#include <e32property.h>
#include <featmgr.h>
-#include <settingsinternalcrkeys.h>
+#include <settingsinternalcrkeys.h>
#include <cenrepdatabaseutil.h>
#include "spsettingsengine.h"
@@ -192,10 +192,10 @@
}
void CSPSettingsEngine::CleanupPointerArray( TAny* aPointer )
- {
- RIpAppPropArray* array = static_cast<RIpAppPropArray*>( aPointer );
- array->ResetAndDestroy();
- }
+ {
+ RIpAppPropArray* array = static_cast<RIpAppPropArray*>( aPointer );
+ array->ResetAndDestroy();
+ }
// ---------------------------------------------------------------------------
// Stores new service provider settings entry
@@ -207,14 +207,14 @@
// check the service name is not empty
if( aEntry.GetServiceName().Length() == 0 )
- {
- User::LeaveIfError( KErrArgument );
- }
+ {
+ User::LeaveIfError( KErrArgument );
+ }
// construct RIpAppPropArray
RIpAppPropArray array;
- TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array );
- CleanupStack::PushL( cleanup );
+ TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array );
+ CleanupStack::PushL( cleanup );
ConvertSpEntryToCenRepArrayL( aEntry, array );
@@ -237,8 +237,8 @@
XSPSLOGSTRING2( "CSPSettingsEngine::FindEntryL( %d ) - IN", aServiceId );
RIpAppPropArray array;
- TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array );
- CleanupStack::PushL( cleanup );
+ TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array );
+ CleanupStack::PushL( cleanup );
TInt err = iCenRepUtils->FindEntryL( aServiceId, array );
@@ -292,21 +292,21 @@
// construct RIpAppPropArray
RIpAppPropArray array;
- TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array );
- CleanupStack::PushL( cleanup );
+ TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array );
+ CleanupStack::PushL( cleanup );
ConvertSpEntryToCenRepArrayL( aEntry, array );
TInt err = iCenRepUtils->UpdateEntryL( (TInt) serviceId, array );
CleanupStack::PopAndDestroy( &array );
-
+
XSPSLOGSTRING( "CSPSettingsEngine::UpdateEntry() - OUT" );
return err;
}
-
+
// ---------------------------------------------------------------------------
// Deletes service provider settings entry by service ID
// ---------------------------------------------------------------------------
@@ -328,8 +328,8 @@
// ---------------------------------------------------------------------------
//
TInt CSPSettingsEngine::FindPropertyL( TServiceId aServiceId,
- TServicePropertyName aPropertyName,
- CSPProperty& aProperty )
+ TServicePropertyName aPropertyName,
+ CSPProperty& aProperty )
{
XSPSLOGSTRING2( "CSPSettingsEngine::FindPropertyL(%d) - IN", aServiceId );
@@ -355,14 +355,14 @@
// ---------------------------------------------------------------------------
//
TInt CSPSettingsEngine::AddOrUpdatePropertiesL( TServiceId aServiceId,
- const RPropertyArray& aPropertyArray )
+ const RPropertyArray& aPropertyArray )
{
XSPSLOGSTRING2( "CSPSettingsEngine::AddOrUpdatePropertiesL(%d) - IN", aServiceId );
// construct RIpAppPropArray
RIpAppPropArray array;
- TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array );
- CleanupStack::PushL( cleanup );
+ TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array );
+ CleanupStack::PushL( cleanup );
ConvertSpArrayToCenRepArrayL( aPropertyArray, array );
@@ -543,7 +543,7 @@
// ---------------------------------------------------------------------------
//
TInt CSPSettingsEngine::FindSubServicePropertiesL( TServiceId aServiceId,
- TSPItemType aPropertyType,
+ TSPItemType aPropertyType,
RPropertyArray& aPropertyArray )
{
XSPSLOGSTRING2(
@@ -586,7 +586,7 @@
// ---------------------------------------------------------------------------
//
TInt CSPSettingsEngine::DeleteServicePropertiesL( TServiceId aServiceId,
- const RPropertyNameArray& aNameArray )
+ const RPropertyNameArray& aNameArray )
{
XSPSLOGSTRING2(
"CSPSettingsEngine::FindSubServicePropertyL( %d ) - IN", aServiceId );
@@ -616,16 +616,16 @@
// ---------------------------------------------------------------------------
//
void CSPSettingsEngine::FindServiceIdsFromPropertiesL( const RPropertyArray& aPropertyArray,
- RIdArray& aServiceIds )
- {
- XSPSLOGSTRING( "CSPSettingsEngine::FindServiceIdsFromPropertiesL() - IN" );
-
+ RIdArray& aServiceIds )
+ {
+ XSPSLOGSTRING( "CSPSettingsEngine::FindServiceIdsFromPropertiesL() - IN" );
+
RArray<TInt> entryIds;
CleanupClosePushL( entryIds );
RIpAppPropArray array;
- TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array );
- CleanupStack::PushL( cleanup );
+ TCleanupItem cleanup( CSPSettingsEngine::CleanupPointerArray, &array );
+ CleanupStack::PushL( cleanup );
// todo custom cleanup stack
ConvertSpArrayToCenRepArrayL( aPropertyArray, array );
@@ -647,8 +647,8 @@
CleanupStack::PopAndDestroy( &array );
CleanupStack::PopAndDestroy( &entryIds );
- XSPSLOGSTRING( "CSPSettingsEngine::FindServiceIdsFromPropertiesL() - OUT" );
- }
+ XSPSLOGSTRING( "CSPSettingsEngine::FindServiceIdsFromPropertiesL() - OUT" );
+ }
@@ -658,214 +658,214 @@
//
TBool CSPSettingsEngine::IsFeatureSupportedL( TSPServiceFeature aFeature,
TBool aWriteAllowed )
- {
+ {
XSPSLOGSTRING( "CSPSettingsEngine::IsFeatureSupportedL() - IN" );
TBool ret = EFalse;
- // First check P&S key, if P&S key is defined, use the value from P&S key.
- // if not defined, then walk through all the sevices and check there is any service match
- TInt mask = 0;
- TInt value = 0;
- TInt psFlag = 0;
- TInt retProperty = 0;
-
+ // First check P&S key, if P&S key is defined, use the value from P&S key.
+ // if not defined, then walk through all the sevices and check there is any service match
+ TInt mask = 0;
+ TInt value = 0;
+ TInt psFlag = 0;
+ TInt retProperty = 0;
+
switch( aFeature )
- {
- case ESupportInternetCallFeature:
- {
- retProperty = RProperty::Get( KUidSystemCategory, KSPSupportInternetCallKey, psFlag );
- if( retProperty == KErrNone && psFlag != KSPInitFeatureValue )
- {
- ret = psFlag;
- }
- else
- {
- mask = ESupportsInternetCall | ESupportsAlphanumericAddressing | EIsVisibleInCallMenu;
- value = mask;
- ret = CheckFeatureL( mask, value );
- if ( aWriteAllowed )
- {
- User::LeaveIfError( RProperty::Set( KUidSystemCategory,
- KSPSupportInternetCallKey, ret ) );
- }
- }
-
- break;
- }
- case ESupportCallOutFeature:
- {
- retProperty = RProperty::Get( KUidSystemCategory, KSPSupportCallOutKey, psFlag );
- if( retProperty == KErrNone && psFlag != KSPInitFeatureValue )
- {
- ret = psFlag;
- }
- else
- {
- mask = ESupportsInternetCall | ESupportsMSISDNAddressing | EIsVisibleInCallMenu;
- value = mask;
- ret = CheckFeatureL( mask, value );
- if ( aWriteAllowed )
- {
- User::LeaveIfError( RProperty::Set(
- KUidSystemCategory,
- KSPSupportCallOutKey, ret ) );
- }
- }
- break;
- }
-
- case ESupportVoIPSSFeature:
- {
- retProperty = RProperty::Get( KUidSystemCategory, KSPSupportVoIPSSKey, psFlag );
- if( retProperty == KErrNone && psFlag != KSPInitFeatureValue )
- {
- ret = psFlag;
- }
- else
- {
- mask = ESupportVoIPSS;
- value = mask;
- ret = CheckFeatureL( mask, value );
- if ( aWriteAllowed )
- {
- User::LeaveIfError( RProperty::Set(
- KUidSystemCategory,
- KSPSupportVoIPSSKey, ret ) );
- }
- }
- break;
- }
-
- case ESupportVoIPFeature:
- {
- TBool bFeatureMgr = EFalse;
- TBool bDynVoIP = EFalse;
- TBool bSubVoIP = EFalse;
-
- //check FeatureManager
- FeatureManager::InitializeLibL();
- bFeatureMgr = FeatureManager::FeatureSupported( KFeatureIdCommonVoip );
- FeatureManager::UnInitializeLib();
-
- //check dynamic voip flag
- CRepository* repository = CRepository::NewLC( KCRUidTelephonySettings );
- TInt value = 0;
- TInt err = repository->Get( KDynamicVoIP, value );
- if( value != 0 )
- {
- bDynVoIP = ETrue;
- }
-
- CleanupStack::PopAndDestroy( repository );
-
- //check subservice voip
- RIdArray serviceIds;
- CleanupClosePushL( serviceIds );
- FindServiceIdsL( serviceIds );
- CSPProperty* property = CSPProperty::NewLC();
-
- for( TInt i = 0; i < serviceIds.Count(); i++ )
- {
- TServiceId serviceId = serviceIds[i];
- TInt retProperty = FindPropertyL( serviceId, EPropertyVoIPSubServicePluginId, *property );
- if( retProperty == KErrNone )
- {
- bSubVoIP = ETrue;
- break;
- }
- }
- CleanupStack::PopAndDestroy( property );
- CleanupStack::PopAndDestroy( &serviceIds );
-
- ret = bFeatureMgr && bDynVoIP && bSubVoIP;
-
- break;
- }
- default:
- {
- User::Leave( KErrNotSupported );
- }
- }
+ {
+ case ESupportInternetCallFeature:
+ {
+ retProperty = RProperty::Get( KUidSystemCategory, KSPSupportInternetCallKey, psFlag );
+ if( retProperty == KErrNone && psFlag != KSPInitFeatureValue )
+ {
+ ret = psFlag;
+ }
+ else
+ {
+ mask = ESupportsInternetCall | ESupportsAlphanumericAddressing | EIsVisibleInCallMenu;
+ value = mask;
+ ret = CheckFeatureL( mask, value );
+ if ( aWriteAllowed )
+ {
+ User::LeaveIfError( RProperty::Set( KUidSystemCategory,
+ KSPSupportInternetCallKey, ret ) );
+ }
+ }
+
+ break;
+ }
+ case ESupportCallOutFeature:
+ {
+ retProperty = RProperty::Get( KUidSystemCategory, KSPSupportCallOutKey, psFlag );
+ if( retProperty == KErrNone && psFlag != KSPInitFeatureValue )
+ {
+ ret = psFlag;
+ }
+ else
+ {
+ mask = ESupportsInternetCall | ESupportsMSISDNAddressing | EIsVisibleInCallMenu;
+ value = mask;
+ ret = CheckFeatureL( mask, value );
+ if ( aWriteAllowed )
+ {
+ User::LeaveIfError( RProperty::Set(
+ KUidSystemCategory,
+ KSPSupportCallOutKey, ret ) );
+ }
+ }
+ break;
+ }
+
+ case ESupportVoIPSSFeature:
+ {
+ retProperty = RProperty::Get( KUidSystemCategory, KSPSupportVoIPSSKey, psFlag );
+ if( retProperty == KErrNone && psFlag != KSPInitFeatureValue )
+ {
+ ret = psFlag;
+ }
+ else
+ {
+ mask = ESupportVoIPSS;
+ value = mask;
+ ret = CheckFeatureL( mask, value );
+ if ( aWriteAllowed )
+ {
+ User::LeaveIfError( RProperty::Set(
+ KUidSystemCategory,
+ KSPSupportVoIPSSKey, ret ) );
+ }
+ }
+ break;
+ }
+
+ case ESupportVoIPFeature:
+ {
+ TBool bFeatureMgr = EFalse;
+ TBool bDynVoIP = EFalse;
+ TBool bSubVoIP = EFalse;
+
+ //check FeatureManager
+ FeatureManager::InitializeLibL();
+ bFeatureMgr = FeatureManager::FeatureSupported( KFeatureIdCommonVoip );
+ FeatureManager::UnInitializeLib();
+
+ //check dynamic voip flag
+ CRepository* repository = CRepository::NewLC( KCRUidTelephonySettings );
+ TInt value = 0;
+ TInt err = repository->Get( KDynamicVoIP, value );
+ if( value != 0 )
+ {
+ bDynVoIP = ETrue;
+ }
+
+ CleanupStack::PopAndDestroy( repository );
+
+ //check subservice voip
+ RIdArray serviceIds;
+ CleanupClosePushL( serviceIds );
+ FindServiceIdsL( serviceIds );
+ CSPProperty* property = CSPProperty::NewLC();
+
+ for( TInt i = 0; i < serviceIds.Count(); i++ )
+ {
+ TServiceId serviceId = serviceIds[i];
+ TInt retProperty = FindPropertyL( serviceId, EPropertyVoIPSubServicePluginId, *property );
+ if( retProperty == KErrNone )
+ {
+ bSubVoIP = ETrue;
+ break;
+ }
+ }
+ CleanupStack::PopAndDestroy( property );
+ CleanupStack::PopAndDestroy( &serviceIds );
+
+ ret = bFeatureMgr && bDynVoIP && bSubVoIP;
+
+ break;
+ }
+ default:
+ {
+ User::Leave( KErrNotSupported );
+ }
+ }
XSPSLOGSTRING( "CSPSettingsEngine::IsFeatureSupportedL() - OUT" );
return ret;
- }
+ }
// ---------------------------------------------------------------------------
// When service table is changed, update the P&S key
// ---------------------------------------------------------------------------
//
void CSPSettingsEngine::UpdateSupportFeaturePSKeyL()
- {
- TInt mask = 0;
- TInt value = 0;
- TBool ret = EFalse;
-
- //ESupportInternetCallFeature
- //ESupportsInternetCall + ESupportsAlphanumericAddressing + EIsVisibleInCallMenu
- mask = ESupportsInternetCall | ESupportsAlphanumericAddressing | EIsVisibleInCallMenu;
- value = mask;
- ret = CheckFeatureL( mask, value );
- User::LeaveIfError( RProperty::Set( KUidSystemCategory, KSPSupportInternetCallKey, ret ) );
-
- //ESupportCallOutFeature
- //ESupportsInternetCall + ESupportsMSISDNAddressing + EIsVisibleInCallMenu
- mask = ESupportsInternetCall | ESupportsMSISDNAddressing | EIsVisibleInCallMenu;
- value = mask;
- ret = CheckFeatureL( mask, value );
- User::LeaveIfError( RProperty::Set( KUidSystemCategory, KSPSupportCallOutKey, ret ) );
-
- //ESupportVoIPSSFeature
- //ESupportVoIPSS
- mask = ESupportVoIPSS;
- value = mask;
- ret = CheckFeatureL( mask, value );
- User::LeaveIfError( RProperty::Set( KUidSystemCategory, KSPSupportVoIPSSKey, ret ) );
- }
+ {
+ TInt mask = 0;
+ TInt value = 0;
+ TBool ret = EFalse;
+
+ //ESupportInternetCallFeature
+ //ESupportsInternetCall + ESupportsAlphanumericAddressing + EIsVisibleInCallMenu
+ mask = ESupportsInternetCall | ESupportsAlphanumericAddressing | EIsVisibleInCallMenu;
+ value = mask;
+ ret = CheckFeatureL( mask, value );
+ User::LeaveIfError( RProperty::Set( KUidSystemCategory, KSPSupportInternetCallKey, ret ) );
+
+ //ESupportCallOutFeature
+ //ESupportsInternetCall + ESupportsMSISDNAddressing + EIsVisibleInCallMenu
+ mask = ESupportsInternetCall | ESupportsMSISDNAddressing | EIsVisibleInCallMenu;
+ value = mask;
+ ret = CheckFeatureL( mask, value );
+ User::LeaveIfError( RProperty::Set( KUidSystemCategory, KSPSupportCallOutKey, ret ) );
+
+ //ESupportVoIPSSFeature
+ //ESupportVoIPSS
+ mask = ESupportVoIPSS;
+ value = mask;
+ ret = CheckFeatureL( mask, value );
+ User::LeaveIfError( RProperty::Set( KUidSystemCategory, KSPSupportVoIPSSKey, ret ) );
+ }
// ---------------------------------------------------------------------------
// Walk through all the sevices and check there is any service match
// ---------------------------------------------------------------------------
//
TBool CSPSettingsEngine::CheckFeatureL( TInt aMask, TInt aValue )
- {
- RArray<TInt> entryIds;
- CleanupClosePushL( entryIds );
- iCenRepUtils->FindEntryIdsL( entryIds );
- CCenRepDatabaseProperty* property = CCenRepDatabaseProperty::NewLC();
- TBool ret = EFalse;
-
- for( TInt i = 0; i < entryIds.Count(); i++ )
- {
- TInt entryId = entryIds[i];
- if( entryId == KSPDefaultVoIPServiceId )
- {
- continue;
- }
-
- TInt retProperty = iCenRepUtils->FindPropertyL( entryId, EPropertyServiceAttributeMask, *property );
- if( retProperty == KErrNone )
- {
- TInt maskValue = 0;
- TInt err = property->GetValue( maskValue );
- if( err == KErrNone )
- {
- if( ( maskValue & aMask ) == (aValue & aMask) )
- {
- // Find matched servcie
- ret = ETrue;
- break;
- }
- }
- }
- }
-
- CleanupStack::PopAndDestroy( property );
- CleanupStack::PopAndDestroy( &entryIds );
- return ret;
- }
+ {
+ RArray<TInt> entryIds;
+ CleanupClosePushL( entryIds );
+ iCenRepUtils->FindEntryIdsL( entryIds );
+ CCenRepDatabaseProperty* property = CCenRepDatabaseProperty::NewLC();
+ TBool ret = EFalse;
+
+ for( TInt i = 0; i < entryIds.Count(); i++ )
+ {
+ TInt entryId = entryIds[i];
+ if( entryId == KSPDefaultVoIPServiceId )
+ {
+ continue;
+ }
+
+ TInt retProperty = iCenRepUtils->FindPropertyL( entryId, EPropertyServiceAttributeMask, *property );
+ if( retProperty == KErrNone )
+ {
+ TInt maskValue = 0;
+ TInt err = property->GetValue( maskValue );
+ if( err == KErrNone )
+ {
+ if( ( maskValue & aMask ) == (aValue & aMask) )
+ {
+ // Find matched servcie
+ ret = ETrue;
+ break;
+ }
+ }
+ }
+ }
+
+ CleanupStack::PopAndDestroy( property );
+ CleanupStack::PopAndDestroy( &entryIds );
+ return ret;
+ }
// ---------------------------------------------------------------------------
// Check if it is VoIP Service ID
@@ -960,7 +960,7 @@
// ---------------------------------------------------------------------------
//
void CSPSettingsEngine::NameArrayFromPropertyArrayL( RPropertyNameArray& aNameArray,
- const RPropertyArray& aPropertyArray )
+ const RPropertyArray& aPropertyArray )
{
aNameArray.Reset();
--- a/convergedcallengine/spsettings/src/spsettingsvoiputils.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/convergedcallengine/spsettings/src/spsettingsvoiputils.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -26,7 +26,7 @@
#include <featmgr.h>
#include <centralrepository.h>
-#include <settingsinternalcrkeys.h>
+#include <settingsinternalcrkeys.h>
#include "spsapilogger.h" // For logging
@@ -124,8 +124,8 @@
}
err = iSettingsEngine->FindPropertyL( id,
- EPropertyVoIPSubServicePluginId,
- *property );
+ EPropertyVoIPSubServicePluginId,
+ *property );
profileExists = ( KErrNone == err ? ETrue : EFalse );
}
--- a/engines/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build file for engines.
-*
-*/
-
-
-#include "../vmbxengine/group/bld.inf"
-
-
-// End of File
--- a/engines/vmbxengine/EABI/VMBXU.DEF Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-EXPORTS
- _ZN11RVmbxNumber11IsSimMemoryEv @ 1 NONAME
- _ZN11RVmbxNumber11SelectTypeLEi @ 2 NONAME
- _ZN11RVmbxNumber12QueryNumberLE14TVmbxQueryTypeR6TDes16i @ 3 NONAME
- _ZN11RVmbxNumber13GetVmbxNumberER6TDes1616TVmbxNumberEntry @ 4 NONAME
- _ZN11RVmbxNumber13QueryAddressLE14TVmbxQueryTypeR6TDes16 @ 5 NONAME
- _ZN11RVmbxNumber14SaveVmbxNumberERK7TDesC1616TVmbxNumberEntry @ 6 NONAME
- _ZN11RVmbxNumber15GetVmbxAddressLER6TDes16 @ 7 NONAME
- _ZN11RVmbxNumber16SaveVmbxAddressLER6TDes16 @ 8 NONAME
- _ZN11RVmbxNumber17GetVideoMbxNumberER6TDes1616TVmbxNumberEntry @ 9 NONAME
- _ZN11RVmbxNumber18SaveVideoMbxNumberERK7TDesC1616TVmbxNumberEntry @ 10 NONAME
- _ZN11RVmbxNumber19IsVoIPProfilesFoundEv @ 11 NONAME
- _ZN11RVmbxNumber20NotifyAlsLineChangeLEP16MVmbxAlsObserver @ 12 NONAME
- _ZN11RVmbxNumber20QueryVideoMbxNumberLE14TVmbxQueryTypeR6TDes16 @ 13 NONAME
- _ZN11RVmbxNumber23NotifyVmbxNumberChangeLEP18MVmbxNotifyHandleri @ 14 NONAME
- _ZN11RVmbxNumber24AllowedToChangeTheNumberEv @ 15 NONAME
- _ZN11RVmbxNumber25NotifyAlsLineChangeCancelEv @ 16 NONAME
- _ZN11RVmbxNumber28NotifyVmbxNumberChangeCancelEv @ 17 NONAME
- _ZN11RVmbxNumber4OpenER12RMobilePhone @ 18 NONAME
- _ZN11RVmbxNumber4OpenEv @ 19 NONAME
- _ZN11RVmbxNumber5CloseEv @ 20 NONAME
- _ZN11RVmbxNumberC1Ev @ 21 NONAME
- _ZN11RVmbxNumberC2Ev @ 22 NONAME
- _ZN11RVmbxNumberD0Ev @ 23 NONAME
- _ZN11RVmbxNumberD1Ev @ 24 NONAME
- _ZN11RVmbxNumberD2Ev @ 25 NONAME
- _ZNK11RVmbxNumber10GetAlsLineERi @ 26 NONAME
- _ZTI11RVmbxNumber @ 27 NONAME ; #<TI>#
- _ZTI17CVMSimQueryDilaog @ 28 NONAME ; #<TI>#
- _ZTI18CVmTextQueryDialog @ 29 NONAME ; #<TI>#
- _ZTV11RVmbxNumber @ 30 NONAME ; #<VT>#
- _ZTV17CVMSimQueryDilaog @ 31 NONAME ; #<VT>#
- _ZTV18CVmTextQueryDialog @ 32 NONAME ; #<VT>#
- _ZThn8_N11RVmbxNumberD0Ev @ 33 NONAME ; #<thunk>#
- _ZThn8_N11RVmbxNumberD1Ev @ 34 NONAME ; #<thunk>#
- _ZN11RVmbxNumber13GetServiceIdsER6RArrayIjE @ 35 NONAME
- _ZN11RVmbxNumber14GetServiceInfoER16TVmbxServiceInfo @ 36 NONAME
- _ZN11RVmbxNumber11SelectTypeLEiRj @ 37 NONAME
- _ZN11RVmbxNumber14GetVmbxAddressER6TDes16j @ 38 NONAME
- _ZN11RVmbxNumber15GetBrandedIconLERK6TDesC8RP10CFbsBitmapS5_ @ 39 NONAME
- _ZN11RVmbxNumber19NotifyServiceChangeEP21MServiceNotifyHandler @ 40 NONAME
- _ZN11RVmbxNumber22ConstructDefaultIconsLEP9CArrayPtrI8CGulIconE @ 41 NONAME
- _ZN11RVmbxNumber24IsIpVoiceMailboxServicesEv @ 42 NONAME
- _ZN11RVmbxNumber25NotifyServiceChangeCancelEv @ 43 NONAME
- _ZN11RVmbxNumber8BrandIdLEiR5TDes8 @ 44 NONAME
- _ZTI18CVmListQueryDialog @ 45 NONAME ; #<TI>#
- _ZTV18CVmListQueryDialog @ 46 NONAME ; #<VT>#
-
--- a/engines/vmbxengine/bwins/VMBXU.DEF Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-EXPORTS
- ??0RVmbxNumber@@QAE@XZ @ 1 NONAME ; RVmbxNumber::RVmbxNumber(void)
- ??1RVmbxNumber@@UAE@XZ @ 2 NONAME ; RVmbxNumber::~RVmbxNumber(void)
- ?AllowedToChangeTheNumber@RVmbxNumber@@QAEHXZ @ 3 NONAME ; int RVmbxNumber::AllowedToChangeTheNumber(void)
- ?Close@RVmbxNumber@@QAEXXZ @ 4 NONAME ; void RVmbxNumber::Close(void)
- ?GetAlsLine@RVmbxNumber@@QBEHAAH@Z @ 5 NONAME ; int RVmbxNumber::GetAlsLine(int &) const
- ?GetVideoMbxNumber@RVmbxNumber@@QAEHAAVTDes16@@W4TVmbxNumberEntry@@@Z @ 6 NONAME ; int RVmbxNumber::GetVideoMbxNumber(class TDes16 &, enum TVmbxNumberEntry)
- ?GetVmbxAddressL@RVmbxNumber@@QAEHAAVTDes16@@@Z @ 7 NONAME ; int RVmbxNumber::GetVmbxAddressL(class TDes16 &)
- ?GetVmbxNumber@RVmbxNumber@@QAEHAAVTDes16@@W4TVmbxNumberEntry@@@Z @ 8 NONAME ; int RVmbxNumber::GetVmbxNumber(class TDes16 &, enum TVmbxNumberEntry)
- ?IsSimMemory@RVmbxNumber@@QAEHXZ @ 9 NONAME ; int RVmbxNumber::IsSimMemory(void)
- ?IsVoIPProfilesFound@RVmbxNumber@@QAEHXZ @ 10 NONAME ; int RVmbxNumber::IsVoIPProfilesFound(void)
- ?NotifyAlsLineChangeCancel@RVmbxNumber@@QAEXXZ @ 11 NONAME ; void RVmbxNumber::NotifyAlsLineChangeCancel(void)
- ?NotifyAlsLineChangeL@RVmbxNumber@@QAEXPAVMVmbxAlsObserver@@@Z @ 12 NONAME ; void RVmbxNumber::NotifyAlsLineChangeL(class MVmbxAlsObserver *)
- ?NotifyVmbxNumberChangeCancel@RVmbxNumber@@QAEXXZ @ 13 NONAME ; void RVmbxNumber::NotifyVmbxNumberChangeCancel(void)
- ?NotifyVmbxNumberChangeL@RVmbxNumber@@QAEXPAVMVmbxNotifyHandler@@H@Z @ 14 NONAME ; void RVmbxNumber::NotifyVmbxNumberChangeL(class MVmbxNotifyHandler *, int)
- ?Open@RVmbxNumber@@QAEHAAVRMobilePhone@@@Z @ 15 NONAME ; int RVmbxNumber::Open(class RMobilePhone &)
- ?Open@RVmbxNumber@@QAEHXZ @ 16 NONAME ; int RVmbxNumber::Open(void)
- ?QueryAddressL@RVmbxNumber@@QAEHW4TVmbxQueryType@@AAVTDes16@@@Z @ 17 NONAME ; int RVmbxNumber::QueryAddressL(enum TVmbxQueryType, class TDes16 &)
- ?QueryNumberL@RVmbxNumber@@QAEHW4TVmbxQueryType@@AAVTDes16@@H@Z @ 18 NONAME ; int RVmbxNumber::QueryNumberL(enum TVmbxQueryType, class TDes16 &, int)
- ?QueryVideoMbxNumberL@RVmbxNumber@@QAEHW4TVmbxQueryType@@AAVTDes16@@@Z @ 19 NONAME ; int RVmbxNumber::QueryVideoMbxNumberL(enum TVmbxQueryType, class TDes16 &)
- ?SaveVideoMbxNumber@RVmbxNumber@@QAEHABVTDesC16@@W4TVmbxNumberEntry@@@Z @ 20 NONAME ; int RVmbxNumber::SaveVideoMbxNumber(class TDesC16 const &, enum TVmbxNumberEntry)
- ?SaveVmbxAddressL@RVmbxNumber@@QAEHAAVTDes16@@@Z @ 21 NONAME ; int RVmbxNumber::SaveVmbxAddressL(class TDes16 &)
- ?SaveVmbxNumber@RVmbxNumber@@QAEHABVTDesC16@@W4TVmbxNumberEntry@@@Z @ 22 NONAME ; int RVmbxNumber::SaveVmbxNumber(class TDesC16 const &, enum TVmbxNumberEntry)
- ?SelectTypeL@RVmbxNumber@@QAEHH@Z @ 23 NONAME ; int RVmbxNumber::SelectTypeL(int)
- ?NotifyServiceChangeCancel@RVmbxNumber@@QAEXXZ @ 24 NONAME ; void RVmbxNumber::NotifyServiceChangeCancel(void)
- ?SelectTypeL@RVmbxNumber@@QAEHHAAI@Z @ 25 NONAME ; int RVmbxNumber::SelectTypeL(int, unsigned int &)
- ?BrandIdL@RVmbxNumber@@QAEXHAAVTDes8@@@Z @ 26 NONAME ; void RVmbxNumber::BrandIdL(int, class TDes8 &)
- ?ConstructDefaultIconsL@RVmbxNumber@@QAEXPAV?$CArrayPtr@VCGulIcon@@@@@Z @ 27 NONAME ; void RVmbxNumber::ConstructDefaultIconsL(class CArrayPtr<class CGulIcon> *)
- ?IsIpVoiceMailboxServices@RVmbxNumber@@QAEHXZ @ 28 NONAME ; int RVmbxNumber::IsIpVoiceMailboxServices(void)
- ?NotifyServiceChange@RVmbxNumber@@QAEXPAVMServiceNotifyHandler@@@Z @ 29 NONAME ; void RVmbxNumber::NotifyServiceChange(class MServiceNotifyHandler *)
- ?GetBrandedIconL@RVmbxNumber@@QAEXABVTDesC8@@AAPAVCFbsBitmap@@1@Z @ 30 NONAME ; void RVmbxNumber::GetBrandedIconL(class TDesC8 const &, class CFbsBitmap * &, class CFbsBitmap * &)
- ?GetServiceInfo@RVmbxNumber@@QAEHAAVTVmbxServiceInfo@@@Z @ 31 NONAME ; int RVmbxNumber::GetServiceInfo(class TVmbxServiceInfo &)
- ?GetVmbxAddress@RVmbxNumber@@QAEHAAVTDes16@@I@Z @ 32 NONAME ; int RVmbxNumber::GetVmbxAddress(class TDes16 &, unsigned int)
- ?GetServiceIds@RVmbxNumber@@QAEHAAV?$RArray@I@@@Z @ 33 NONAME ; int RVmbxNumber::GetServiceIds(class RArray<unsigned int> &)
-
Binary file engines/vmbxengine/conf/101F874F.txt has changed
Binary file engines/vmbxengine/conf/voicemailbox.confml has changed
Binary file engines/vmbxengine/conf/voicemailbox_101F874F.crml has changed
--- a/engines/vmbxengine/group/backup_registration.xml Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<backup_registration version="1.0">
- <proxy_data_manager sid = "0x10202BE9" />
- <restore requires_reboot = "no"/>
-</backup_registration>
--- a/engines/vmbxengine/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,55 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project vmbxengine.
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-//Backup registartion file
-backup_registration.xml /epoc32/data/z/private/100058F5/backup_registration.xml
-backup_registration.xml /epoc32/release/winscw/udeb/z/private/100058F5/backup_registration.xml
-backup_registration.xml /epoc32/release/winscw/urel/z/private/100058F5/backup_registration.xml
-
-// sis export
-vmbx_stub.sis /epoc32/data/z/system/install/vmbx_stub.sis
-
-// iby export
-../rom/vmbxengine.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vmbxengine.iby)
-../rom/vmbxengineresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(vmbxengineresources.iby)
-
-// loc export
-../loc/vmbx.loc MW_LAYER_LOC_EXPORT_PATH(vmbx.loc)
-
-// Generic configuration interface for component cenrep settings
-../conf/voicemailbox.confml MW_LAYER_CONFML(voicemailbox.confml)
-../conf/voicemailbox_101F874F.crml MW_LAYER_CRML(voicemailbox_101F874F.crml)
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
- option TARGETFILE vm.mif
- option HEADERFILE vm.mbg
- option SOURCES -c8,8 qgn_menu_smsvo_cxt -c8,8 qgn_prop_nrtyp_sim_contact -c8,8 qgn_prop_empty -c8,8 qgn_prop_nrtyp_mobile -c8,8 qgn_prop_nrtyp_video -c8,8 qgn_prop_nrtyp_voip
-END
-
-PRJ_MMPFILES
-vmbxengine.mmp
-
-// End of File
--- a/engines/vmbxengine/group/vmbx.pkg Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: For packing vmbx.
-;
-; Languages
-&EN
-
-; Header
-#{"vmbx"},(0x1000590f),1,1,0,TYPE=PU
-
-;Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-;Files
-"\epoc32\RELEASE\armv5\UREL\vmbx.dll"-"c:\sys\bin\vmbx.dll"
-"\epoc32\data\z\resource\apps\vmbx.rsc"-"c:\resource\vmbx.rsc"
Binary file engines/vmbxengine/group/vmbx.sis has changed
--- a/engines/vmbxengine/group/vmbx_stub.pkg Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: For packing vmbx stub.
-;
-; Languages
-&EN
-
-; Header
-#{"vmbx"},(0x1000590f),1,0,0,TYPE=SA
-
-;Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-;Files
-""-"z:\sys\bin\vmbx.dll"
-""-"z:\resource\vmbx.rsc"
Binary file engines/vmbxengine/group/vmbx_stub.sis has changed
--- a/engines/vmbxengine/group/vmbxengine.mmp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This is a project specification file for the
-* voice mailbox number interface.
-*
-*/
-
-#include <platform_paths.hrh>
-#include <data_caging_paths.hrh>
-
-TARGET vmbx.dll
-TARGETTYPE dll
-UID 0x1000008d 0x1000590F
-
-//We use default capabilities (from defaultcaps.hrh)
-CAPABILITY CAP_GENERAL_DLL
-
-EPOCSTACKSIZE 0x5000
-
-LANG SC
-
-SOURCEPATH ../src
-
-SOURCE vmnumber.cpp
-SOURCE vmdialog.cpp
-SOURCE vmspshandler.cpp
-SOURCE vmlist.cpp
-SOURCE vmbshandler.cpp
-SOURCE vmsettingsuiiconfileprovider.cpp
-
-START RESOURCE vmbx.rss
-TARGETPATH RESOURCE_FILES_DIR
-HEADER
-LANGUAGE_IDS
-END //RESOURCE
-
-USERINCLUDE ../inc
-SYSTEMINCLUDE ../../../inc
-
-// TEMPORARY DEFINITION FOR CONTACT FINDER HEADERS
-SYSTEMINCLUDE ../../../../../app/phone/inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY euser.lib
-LIBRARY cone.lib
-LIBRARY CommonEngine.lib
-LIBRARY etel.lib
-LIBRARY etelmm.lib
-LIBRARY avkon.lib
-LIBRARY aknicon.lib
-LIBRARY egul.lib
-LIBRARY bsclient.lib
-LIBRARY aknskins.lib
-LIBRARY bafl.lib
-LIBRARY eikdlg.lib
-LIBRARY eikcoctl.lib
-LIBRARY eikcore.lib
-LIBRARY sssettings.lib
-LIBRARY phonecntfinder.lib // Phonebook Single Fetch View
-LIBRARY phoneclient.lib // emergency call
-LIBRARY charconv.lib // CnvUtfConverter
-LIBRARY featmgr.lib
-LIBRARY efsrv.lib
-
-LIBRARY satclient.lib
-LIBRARY centralrepository.lib
-LIBRARY cenrepnotifhandler.lib
-LIBRARY flogger.lib
-LIBRARY serviceprovidersettings.lib
-
-// End of File
--- a/engines/vmbxengine/inc/vmblogger.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Provides macros for logging
-*
-*/
-
-
-#ifndef __VMBLOGGER_H__
-#define __VMBLOGGER_H__
-
-// INCLUDES
-#include <e32def.h>
-
-/*
------------------------------------------------------------------------------
-
- USER LOG SELECTION
-
------------------------------------------------------------------------------
-*/
-
-
-#ifndef _DEBUG
-
-/***************************
-* Logging method variants:
-* 0 = No logging
-* 1 = Flogger
-* 2 = RDebug
-***************************/
-
-#define VMB_LOGGING_METHOD 0 // UREL BUILD
-
-#else
-
-#ifdef __WINS__
-#define VMB_LOGGING_METHOD 1 // UDEB BUILD, WINS
-#else
-#define VMB_LOGGING_METHOD 1 // UDEB BUILD, HW
-#endif // __WINS__
-
-#endif // _DEBUG
-
-
-// Next is for backward compatibility
-#if VMB_LOGGING_METHOD > 0
- #define VMB_LOGGING_ENABLED
-#endif //VMB_LOGGING_METHOD
-
-
-/**
-*
-* FLOGGER SETTINGS
-*
-*/
-#if VMB_LOGGING_METHOD == 1 // Flogger
-
- #include <flogger.h>
-
- _LIT(KVMBLogFolder, "vmbx");
- _LIT(KVMBLogFile, "vmbxengine.txt");
-
-#elif VMB_LOGGING_METHOD == 2 // RDebug
-
- #include <e32svr.h>
-
-#endif //VMB_LOGGING_METHOD
-
-
-/**
-*
-* LOGGING MACROs
-*
-* USE THESE MACROS IN YOUR CODE !
-*
-*/
-
-#if VMB_LOGGING_METHOD == 1 // Flogger
-
-#define VMBLOGTEXT(AAA) /*lint -save -e960 */ { RFileLogger::Write(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,AAA); } /*lint -restore */
-#define VMBLOGSTRING(AAA) /*lint -save -e960 */ { _LIT(tempLogDes,AAA); RFileLogger::Write(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,tempLogDes()); } /*lint -restore */
-#define VMBLOGSTRING2(AAA,BBB) /*lint -save -e960 -e437 */ { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } /*lint -restore */
-#define VMBLOGSTRING3(AAA,BBB,CCC) /*lint -save -e960 */ { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } /*lint -restore */
-
-#elif VMB_LOGGING_METHOD == 2 // RDebug
-
-#define VMBLOGTEXT(AAA) RDebug::Print(AAA);
-#define VMBLOGSTRING(AAA) RDebug::Print(_L(AAA));
-#define VMBLOGSTRING2(AAA,BBB) RDebug::Print(_L(AAA),BBB);
-#define VMBLOGSTRING3(AAA,BBB,CCC) RDebug::Print(_L(AAA),BBB,CCC);
-
-#else // VMB_LOGGING_METHOD == 0 or invalid
-
-// Example: VMBLOGTEXT(own_desc);
-#define VMBLOGTEXT(AAA)
-// Example: VMBLOGSTRING("Test");
-#define VMBLOGSTRING(AAA)
-// Example: VMBLOGSTRING("Test %i", aValue);
-#define VMBLOGSTRING2(AAA,BBB)
-// Example: VMBLOGSTRING("Test %i %i", aValue1, aValue2);
-#define VMBLOGSTRING3(AAA,BBB,CCC)
-
-#endif // VMB_LOGGING_METHOD
-
-#endif // VMBLOGGER_H
-
-// End of File
--- a/engines/vmbxengine/inc/vmbshandler.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,96 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Branding for voice mailbox
- *
-*/
-
-#ifndef C_VMBSHANDLER_H
-#define C_VMBSHANDLER_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-
-
-// CLASS DECLARATION
-
-/**
- * CVmBSHandler declaration.
- *
- * @since S60 3.2
- */
-NONSHARABLE_CLASS( CVmBSHandler ) : public CBase
- {
-
-public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CVmBSHandler* NewL();
-
- /**
- * Two-phased constructor.
- */
- static CVmBSHandler* NewLC();
-
- /**
- * Destructor.
- */
- virtual ~CVmBSHandler();
-
-public: // New functions
-
- /**
- * Get branded icon
- * @since S60 3.2
- * @param aBrandingId Brandind Id
- * @param aBrandedBitmap Bitmap for branded icon
- * @param aBrandedBitmapMask Mask to branded icon
- */
- void GetBrandedIconL( const TDesC8& aBrandingId,
- CFbsBitmap*& aBrandedBitmap,
- CFbsBitmap*& aBrandedBitmapMask ) const;
-
-private:
-
- /**
- * C++ default constructor.
- */
- CVmBSHandler();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- };
-
-#endif // C_VMBSHANDLER_H
-
-// End of file
--- a/engines/vmbxengine/inc/vmdialog.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,160 +0,0 @@
-/*
-* Copyright (c) 2002 - 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: A text query where empty query can be approved.
-*
-*/
-
-
-#ifndef VMDIALOG_H
-#define VMDIALOG_H
-
-// INCLUDES
-#include <AknQueryDialog.h>
-
-// CLASS DECLARATION
-
-/**
-* Text query dialog
-*
-* @lib vmbx.lib
-* @since
-*/
-class CVmTextQueryDialog : public CAknTextQueryDialog
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CVmTextQueryDialog* NewL( TDes& aDataText, const TDesC& aPrompt,
- const TBool aSearchEnabled );
-
- /**
- * Destructor.
- */
- virtual ~CVmTextQueryDialog();
-
- public:// Functions from base classes
-
- /**
- * From CCoeControl Key event handler
- * @since
- * @param aKeyEvent The key event
- * @param aType The type of key event
- * @return Response of the key event handling
- */
- TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
- TEventCode aType );
-
- public:// New method
-
- /**
- * Dissmiss the dialog with EAknSoftkeyCancel
- * @since 5.0
- */
- void DismissQueryDlg();
-
- protected: // Functions from base classes
-
- /**
- * From CEikdialog This function is called by the EIKON dialog framework
- * just before the dialog is activated, after it has called
- * PreLayoutDynInitL() and the dialog has been sized.
- * Overridden method to enable accepting an empty query
- * @since
- */
- void PreLayoutDynInitL();
-
- /**
- * From MAknQueryControlObserver Gets called when editor sends
- * state event. Overridden method to enable accepting an empty query
- * @since
- * @param aQueryControl Pointer to query control which sent the event
- * @param aEventType Type of the event
- * @param aStatus Editor validation status
- * @return ETrue if success
- */
- TBool HandleQueryEditorStateEventL( CAknQueryControl* aQueryControl,
- TQueryControlEvent aEventType,
- TQueryValidationStatus aStatus );
-
- private:
-
- /**
- * C++ default constructor.
- */
- CVmTextQueryDialog( TDes& aDataText, const TBool aSearchEnabled );
-
- private: // Data
-
- // Flag to allow search
- TBool iSearchEnabled;
- };
-
-
-
-// CLASS DECLARATION
-
-/**
-* Query dialog for sim
-* added to fix JKAN-6KU5C2
-*
-* @lib vmbx.lib
-* @since
-**/
-class CVMSimQueryDilaog:public CAknQueryDialog
- {
-
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CVMSimQueryDilaog* NewL();
-
- /**
- * Destructor.
- */
- virtual ~CVMSimQueryDilaog();
-
- public: // New functions
-
- /**
- * Sets query caption on the screen asking for confirmation to copy voice
- * mailbox number from sim.
- *
- * @since 3.0
- * @param aPrompt query heading to display on dialog.
- **/
- void SetVMSimPromptL( const TDesC& aPrompt );
-
- /**
- * Destroys the query dialog.
- *
- * @since 3.0
- **/
- void VMSimDismissDialogL();
-
- private:
-
- /**
- * C++ default constructor.
- */
- CVMSimQueryDilaog();
-
- };
-
-#endif // VMDIALOG_H
-
-// End of File
--- a/engines/vmbxengine/inc/vmlist.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: A list query where voice mail type can be selected.
- *
-*/
-
-
-#ifndef VMLIST_H
-#define VMLIST_H
-
-// INCLUDES
-#include <aknlistquerydialog.h>
-
-
-// CLASS DECLARATION
-
-/**
-* ?one_line_short_description.
-* ?other_description_lines
-*
-* @lib ?library
-* @since ?Series60_version
-*/
-class CVmListQueryDialog : public CAknListQueryDialog
-{
- public:
- static CVmListQueryDialog* NewL( TInt* aIndex );
- virtual ~CVmListQueryDialog();
-
- public:
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType);
-
-
- protected:
- TBool OkToExitL(TInt aButtonId);
- private:
- CVmListQueryDialog( TInt* aIndex );
-
- private: // Data
- TBool iOkToExit;
-
-};
-
-
-#endif // VMLIST_H
-
-// End of File
--- a/engines/vmbxengine/inc/vmsettingsuiiconfileprovider.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,79 +0,0 @@
-/*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
- *
-*/
-
-#ifndef C_VMSETTINGSUIICONFILEPROVIDER
-#define C_VMSETTINGSUIICONFILEPROVIDER
-
-#include <e32base.h>
-#include <AknIconUtils.h>
-
-/**
- * CVmSettingsUiIconFileProvider class
- * Declarition of CVmSettingsUiIconFileProvider.
- *
- * @since S60 v3.2
- */
-NONSHARABLE_CLASS( CVmSettingsUiIconFileProvider ) : public CBase,
- public MAknIconFileProvider
- {
- public:
-
- /**
- * Two-phased constructor.
- * @param aFile for handle to file
- */
- static CVmSettingsUiIconFileProvider* NewL( RFile& aFile );
-
- /**
- * Destructor.
- */
- virtual ~CVmSettingsUiIconFileProvider();
-
- public: // from base class MAknIconFileProvider
-
- /**
- * from MAknIconFileProvider.
- */
- void RetrieveIconFileHandleL( RFile& aFile, const TIconFileType aType );
-
- /**
- * from MAknIconFileProvider.
- */
- void Finished();
-
- private:
-
- /**
- * C++ default constructor.
- */
- CVmSettingsUiIconFileProvider();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL( RFile& aFile );
-
- private: // data
-
- // File handle. Own.
- RFile iFile;
-
- };
-
-#endif // C_VMSETTINGSUIICONFILEPROVIDER
-
-// End of File
\ No newline at end of file
--- a/engines/vmbxengine/inc/vmspshandler.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,219 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Service provider settings handler
- *
-*/
-
-#ifndef C_VMSPSHANDLER_H
-#define C_VMSPSHANDLER_H
-
-// INCLUDES
-#include <e32std.h>
-#include <e32base.h>
-#include <mspnotifychangeobserver.h>
-#include <spsettingsvoiputils.h>
-
-// CONSTANTS
-// None
-
-// MACROS
-// None
-
-// DATA TYPES
-// None
-
-// FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-class CSPSettings;
-class CSPNotifyChange;
-class TVmbxServiceInfo;
-class MServiceNotifyHandler;
-
-// CLASS DECLARATION
-
-/**
- * CVmSPSHandler declaration.
- * Service provider settings handler is used to access service and
- * sub-service configuration data.
- *
- * @since S60 3.2
- */
-NONSHARABLE_CLASS( CVmSPSHandler ) : public CBase,
- private MSPNotifyChangeObserver
- {
-
-public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CVmSPSHandler* NewL();
-
- /**
- * Two-phased constructor.
- */
- static CVmSPSHandler* NewLC();
-
- /**
- * Destructor.
- */
- virtual ~CVmSPSHandler();
-
-public: // New functions
-
- /**
- * Get service ids
- * @since S60 3.2
- * @param aServiceIds On completion contains service ids
- */
- void GetServiceIdsL( RArray<TUint>& aServiceIds ) const;
-
- /**
- * Get service ids
- * @since S60 3.2
- * @param aServiceInfo On completion contains service ids
- */
- TInt GetServiceInfo( TVmbxServiceInfo& aServiceInfo ) const;
-
- /**
- * Get service's VMBX address
- * @since S60 3.2
- * @param aServiceId Used Service
- * @param aService On completion, contains service's address
- */
- void GetVmAddressL( const TUint32 aServiceId, TDes& aAddress ) const;
-
- /**
- * Get service's name
- * @since S60 3.2
- * @param aServiceId Used Service
- * @param aName On completion, contains service's name
- */
- void GetServiceNameL( const TUint32 aServiceId, TDes& aName ) const;
-
- /**
- * Get SNAP id
- * @since S60 3.2
- * @param aServiceId Used Service
- * @param aSNAPId On completion, contains SNAP Id
- */
- void GetSNAPIdL( TUint32 aServiceId, TInt& aSNAPId ) const;
-
- /**
- * Get brand id
- * @since S60 3.2
- * @param aServiceId Used Service
- * @param aBrandId On completion, contains Brand Id
- */
- void BrandIdL( TInt aServiceId, TDes8& aBrandId );
-
- /**
- * Check is given service already activated
- * @since S60 3.2
- * @param aServiceId Used Service
- * @return ETrue if Service is already activated
- */
- TBool IsActivatedL( TInt aServiceId );
-
- /**
- * Issues a notify request on a Service profile change.
- * @param aHandler user's notify handler
- */
- void NotifyServiceChange( MServiceNotifyHandler* aHandler );
-
- /**
- * Cancels a notify request on a VoIP profile change.
- */
- void NotifyServiceChangeCancel();
-
- /**
- * Check from SPSettings if there are VoIP profiles
- * @since S60 3.2.3
- * @param None
- * @return ETrue if VoIP profiles were found, otherwise EFalse
- */
- TBool IsVoIPProfilesFound();
-
-protected:
-
- /**
- * Handle notify change event.
- * From MSPNotifyChangeObserver;
- *
- * @since S60 3.2
- * @param aServiceId The service ID of changed service
- */
- void HandleNotifyChange( TServiceId aServiceId );
-
- /**
- * Handle error
- *
- * @since S60 3.2
- */
- void HandleError( TInt aError );
-
-private:
-
- /**
- * Is VMBX supported
- * @since S60 3.2
- * @param aServiceId Used Service
- * @return ETrue if VMBX is supported
- */
- TBool IsVbmxSupportedL( TUint32 aServiceId ) const;
-
- /**
- * C++ default constructor.
- */
- CVmSPSHandler();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
-private: // data
-
- /**
- * CSPSettings. Own
- */
- CSPSettings* iSettings;
-
- /**
- * CSPSettingsVoIPUtils. Own
- */
- CSPSettingsVoIPUtils* iSpsSettingsVoipUtils;
-
- /**
- * Observer. Not own
- */
- MServiceNotifyHandler* iObserver;
-
- /**
- * Pointer to CSPNotifyChange
- */
- CSPNotifyChange* iNotifier;
-
- /**
- * Service id array
- */
- RIdArray iServiceIds;
-
- };
-
-#endif // C_VMSPSHANDLER_H
-
-// End of file
--- a/engines/vmbxengine/inc/voicemailboxprivatecrkeys.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,195 +0,0 @@
-/*
-* Copyright (c) 2002 - 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Private keys for voice mailbox.
-*
-*/
-
-
-#ifndef VOICEMAILBOXPRIVATECRKEYS_H
-#define VOICEMAILBOXPRIVATECRKEYS_H
-#include <e32std.h>
-
-/** VoiceMailbox Settings API */
-/** Provides access to the VoiceMailbox numbers and settings */
-
-const TUid KCRUidVoiceMailbox = {0x101F874F};
-
-/** Voice Mailbox number for primary line
-*
-* Integer type
-*
-* Default value: 0
-*/
-const TUint32 KVmbxNumberLineAuxiliary = 0x00000000;
-
-/** Voice Mailbox number for auxiliary line
-*
-* Integer type
-*
-* Default value: 0
-*/
-const TUint32 KVmbxNumberLinePrimary = 0x00000001;
-
-/** Voice Message Callback Number, a field in VMN for a direct callback Number
-*
-* Text type
-*
-* Default value: ""
-**/
-const TUint32 KVmCallbackNumber = 0x00000002;
-
-/**
-* Voicemail Summary Info Set flag, a field in VMN
-*
-* Integer type
-*
-* Possible values:
-* 0 (not set)
-* 1 (set)
-*
-* Default value: 0
-**/
-const TUint32 KVmSummaryInfoIsSet = 0x00000005;
-
-/** Local Variation key. Voice Mailbox Number default for CDMA operators.
-* Default number can be Blank, MIN, MDN, and etc
-*
-* Integer type
-*
-* Possible values:
-* 0 (EBlank)
-* 1 (EDedicatedVMN)
-* 2 (EMIN)
-* 3 (EMDN)
-* 4 (EOnePlusMIN)
-* 5 (EOnePlusMDN)
-* 6 (EMDNCustom)
-* 7 (EOnePlusMDNCustom)
-*
-* Default value: 0
-**/
-const TUint32 KVmNumOpts = 0x00000009;
-
-/**
- * Values for KVmNumOpts
- */
-enum TVmNumOpts
- {
- // For GSM SIM- and CDMA RUIM-based voice mbox number.
- EVmNumOptsBlank = 0,
- EVmNumOptsDedicatedVMN,
- EVmNumOptsMIN,
- EVmNumOptsMDN,
- EVmNumOptsOnePlusMIN,
- EVmNumOptsOnePlusMDN,
- EVmNumOptsMDNCustom,
- EVmNumOptsOnePlusMDNCustom,
- EVmNumOptsSharedData
- };
-
-/** Voice Message Option to configure UI related features.
-*
-* Integer type
-*
-* This is a bit flag pattern, whose value is specified by setting individual bits.
-* For example if you want to set 3rd and 2nd bits: 0100b and 0010b ===> 0110b ==>
-* 6 in decimal representation ==> use value 6.
-* Possible values.
-* Bit 1 = Set this bit to prevent user from defining or
-* modifying the voice mailbox number, clear to allow.
-* Rest of the bits are reserved for future use and currently not used.
-*
-* Default value: 2
-**/
-const TUint32 KVmUIOpts = 0x00000010;
-
-/**
- * Values for KVmUIOpts
- */
-enum TVmUiOpts
- {
- // Prevent all to change voice mail number
- EUiNmbrChangeNotAllowed = 0x01
- };
-
-/** Flag which decides where the vmbx number is to be stored.
-* If this is Off (equals 0) the voice mailbox number is stored in SIM memory,
-* else it is stored in Phone memory.
-*
-* Integer type
-*
-* Default value: 0
-*/
-const TUint32 KVmUsesSimMemory = 0x00000011;
-
-/** Video Mailbox number for primary line
-*
-* Text type
-*
-* Default value: ""
-*/
-const TUint32 KVideoMbxNumberLinePrimary = 0x00000012;
-
-/** Video Mailbox number for auxiliary line
-*
-* Text type
-*
-* Default value: ""
-*/
-const TUint32 KVideoMbxNumberLineAuxiliary = 0x00000013;
-
-/** Flag which decides if writing to sim allowed.
-* If this is On (equals 1) writing to SIM is not allowed.
-* Writing is allowed with value 0
-* Value
-* Integer type
-*
-* Default value: 1
-*/
-const TUint32 KReadOnlySim = 0x00000016;
-
-/** Voice Mailbox number backup for primary line
-*
-* Integer type
-*
-* Default value: 0
-*/
-const TUint32 KVmbxTmpNumberLinePrimary = 0x000000017;
-/** Voice Mailbox number for auxiliary line
-*
-* Integer type
-*
-* Default value: 0
-*/
-const TUint32 KVmbxTmpNumberLineAuxiliary = 0x000000018;
-
-/** Flag which indicates that user has edited primary number.
-* If this is off (equals 0), number from SIM is used,
-* when available.
-* Integer type
-*
-* Default value: 0
-*/
-const TUint32 KUserEditedNumber = 0x00000019;
-
-/** Flag which indicates that user has edited auxiliary number.
-* If this is off (equals 0), number from SIM is used,
-* when available.
-* Integer type
-*
-* Default value: 0
-*/
-const TUint32 KUserEditedNumberAuxiliary = 0x00000020;
-
-#endif // VOICEMAILBOXPRIVATECRKEYS_H
\ No newline at end of file
--- a/engines/vmbxengine/loc/vmbx.loc Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,163 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains the localised strings for vmbx.dll
-*
-*/
-
-
-// LOCALISATION STRINGS
-
-// d: Prompt of the query for changing voice mailbox number.
-// l: popup_query_data_window
-// w:
-// r:3.1
-//
-#define qtn_smsvo_number_query "Define voice mailbox number:"
-
-// d: Note for invalid vmbx number.
-// l: popup_note_window
-//
-#define qtn_smsvo_invalid_number "Invalid phone number."
-
-// d: Note for user entering empty value in vmbx number query.
-// l: popup_note_window
-//
-#define qtn_smsvo_note_empty_number "Voice mailbox number not defined."
-
-// d: text for selecting mailbox query
-// l: heading_pane_t1
-// w:
-// r:3.0
-//
-#define qtn_voip_call_to_voice_mailbox "Call to:"
-
-// d: text for selecting mailbox query
-// l: heading_pane_t1
-// w:
-// r:3.0
-//
-#define qtn_voip_define_voice_mailbox "Define voice mailbox:"
-
-// d: text for selections in mailbox query
-// d: voice mailbox
-// l: list_single_pane_t1_cp2
-// w:
-// r:3.0
-//
-#define qtn_voip_cs_mailbox "Voice mailbox"
-
-// d: text for selections in mailbox query
-// d: Internet call voice mailbox
-// l: list_single_pane_t1_cp2
-// w:
-// r:3.0
-//
-#define qtn_voip_ps_mailbox "Internet call voice mailbox"
-
-// d: Note for displaying sim number for user.
-// l: popup_note_window
-//
-#define qtn_smsvo_numb_from_sim_in_use "Voice mailbox number from SIM taken into use"
-
-// d: Note for successfully saved vmbx number to Sim card.
-// l: popup_note_window
-//
-#define qtn_smsvo_saved_to_sim "Voice mailbox number saved to Sim card."
-
-// d: Note for successfully saved vmbx number to Phone memory.
-// l: popup_note_window
-//
-#define qtn_smsvo_saved_to_phone "Voice mailbox number saved to Phone memory."
-
-// d: query asking user if he wants to take the sim number into use.
-// l: popup_note_window
-
-#define qtn_smsvo_use_numb_from_sim "Voice mailbox number %U is saved to SIM. Do you want to take it into use?"
-
-//d: memory location heading for the vmbx number
-//l: list_single_pane_t1_cp2
-//
-#define qtn_smsvo_save_to "Save number to:"
-
-//d: memory location for the vmbx number
-//l: list_single_pane_t1_cp2
-//
-#define qtn_smsvo_sim_card "SIM card"
-
-//d: memory location for the vmbx number
-//l: list_single_pane_t1_cp2
-//
-#define qtn_smsvo_phone_memory "Phone Memory"
-
-// d: text for selecting mailbox query
-// l: heading_pane_t1
-// w:
-// r:3.1
-//
-#define qtn_smsvi_define_vi_or_vo_mailbox "Define video or voice call mailbox:"
-
-// d: text for selections in mailbox query
-// d: CS Video call mailbox
-// l: list_single_pane_t1_cp2
-// w:
-// r:3.1
-//
-#define qtn_smsvi_video_mailbox "Video call mailbox"
-
-// d: text for selections in mailbox query when any mailbox is not defined
-// d: CS voice call mailbox
-// l: list_single_pane_t1_cp2
-// w:
-// r:3.1
-//
-#define qtn_voip_define_cs_mailbox "Voice mailbox"
-
-// d: text for selections in mailbox query when any mailbox is not defined
-// d: CS Video call mailbox
-// l: list_single_pane_t1_cp2
-// w:
-// r:3.1
-//
-#define qtn_smsvi_define_vt_mailbox "Video call mailbox"
-
-// d: Prompt of the query for changing video mailbox number.
-// l: popup_query_data_window
-// w:
-// r:3.1
-//
-#define qtn_smsvi_number_query "Define video call mailbox number:"
-
-// d: Note for succesfully saved video mailbox number.
-// l: popup_note_window
-// w:
-// r:3.1
-//
-#define qtn_smsvi_mailbox_saved "Video call mailbox saved."
-
-// d: Note for user when entering empty value in video mailbox number query.
-// l: popup_note_window
-// w:
-// r:3.1
-//
-#define qtn_smsvi_note_empty_number "No video call mailbox number defined."
-
-// d: Note for user when there is no voice mailbox number.
-// l: popup_note_window
-// w:
-// r:5.2
-//
-#define qtn_voice_no_vmbx_number "Voicemail number not provisioned"
-
-
-// End of File
--- a/engines/vmbxengine/rom/vmbxengine.iby Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: IBY file for Voice mailbox Engine
- *
-*/
-
-
-#ifndef __VMBXENGINE_IBY__
-#define __VMBXENGINE_IBY__
-
-//vmbx.dll
-file=ABI_DIR\BUILD_DIR\vmbx.dll SHARED_LIB_DIR\vmbx.dll
-
-// sis stub file
-data=ZSYSTEM\install\vmbx_stub.sis System\Install\vmbx_stub.sis
-
-#endif // __VMBXENGINE_IBY__
--- a/engines/vmbxengine/rom/vmbxengineresources.iby Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: IBY file for those parts of
- * voice mailbox engine that needs localization
- *
-*/
-
-
-#ifndef __VMBXENGINERESOURCES_IBY__
-#define __VMBXENGINERESOURCES_IBY__
-
-// wmbx.dll
-data=DATAZ_\RESOURCE_FILES_DIR\VMBX.RSC RESOURCE_FILES_DIR\VMBX.RSC
-
-#endif // __VMBXENGINERESOURCES_IBY__
--- a/engines/vmbxengine/src/vmbshandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +0,0 @@
-/*
-* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of CVmBSHandler class.
- *
-*/
-
-// INCLUDE FILES
-#include <mbsaccess.h>
-#include <cbsfactory.h>
-#include <mbselement.h>
-#include <cbsbitmap.h>
-#include <coemain.h>
-#include <AknsItemID.h>
-#include <AknsSkinInstance.h>
-#include <AknsUtils.h>
-
-#include "vmsettingsuiiconfileprovider.h"
-#include "vmbshandler.h"
-#include "vmblogger.h"
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES
-// None
-
-// CONSTANTS
-// Branding server & data constants.
-const TInt KVmSettingsUiBrandingIconSize = 21; // icon size
-
-_LIT8( KVmSettingsUiBSApplicationId, "xsp" ); // application id
-_LIT8( KVmSettingsUiBSIconId, "service_active_image_small" ); // icon id
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// ============================= LOCAL FUNCTIONS =============================
-
-// ============================ MEMBER FUNCTIONS =============================
-
-// ---------------------------------------------------------------------------
-// CVmBSHandler::CVmBSHandler
-// C++ default constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CVmBSHandler::CVmBSHandler()
- {
- // No implementation required
- }
-
-// ---------------------------------------------------------------------------
-// CVmBSHandler::ConstructL
-// Symbian 2nd phase constructor can leave.
-// ---------------------------------------------------------------------------
-//
-void CVmBSHandler::ConstructL()
- {
- }
-
-// ---------------------------------------------------------------------------
-// CVmBSHandler::NewL
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CVmBSHandler* CVmBSHandler::NewL( )
- {
- CVmBSHandler* self = CVmBSHandler::NewLC();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CVmBSHandler::NewLC
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CVmBSHandler* CVmBSHandler::NewLC()
- {
- CVmBSHandler* self = new (ELeave) CVmBSHandler();
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// Destructor
-CVmBSHandler::~CVmBSHandler()
- {
- }
-
-// ---------------------------------------------------------------------------
-// CVmBSHandler::GetBrandedIconL
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CVmBSHandler::GetBrandedIconL(
- const TDesC8& aBrandingId,
- CFbsBitmap*& aBrandedBitmap,
- CFbsBitmap*& aBrandedBitmapMask ) const
- {
- VMBLOGSTRING( "VMBX: CVmBSHandler::CreateBrandedBitmapL: =>" );
-
- // Create branding server factory and access to branding data.
- CBSFactory* factory = CBSFactory::NewL(
- aBrandingId, KVmSettingsUiBSApplicationId );
- CleanupStack::PushL( factory );
-
- MBSAccess* access = factory->CreateAccessL(
- aBrandingId, ELangInternationalEnglish );
- CleanupClosePushL( *access );
-
- // Get structure which contains bitmap information.
- MBSElement* element = access->GetStructureL( KVmSettingsUiBSIconId );
- CleanupClosePushL( *element );
- const CBSBitmap& bitmap = element->BitmapDataL();
-
- // Open file which contains branded bitmaps.
- RFile file;
- CleanupClosePushL( file );
- access->GetFileL( bitmap.BitmapFileId(), file );
-
- // Try to load a skinned bitmap.
- if ( CCoeEnv::Static() )
- {
- TAknsItemID itemId;
- itemId.Set( bitmap.SkinIdMajor(), bitmap.SkinIdMinor() );
- MAknsSkinInstance* skin = AknsUtils::SkinInstance();
- TRAP_IGNORE( ( aBrandedBitmap =
- AknsUtils::CreateBitmapL( skin, itemId ) ) );
- }
-
- // If skinned bitmaps was not found, try to load bitmaps manually.
- if ( !aBrandedBitmap )
- {
- CVmSettingsUiIconFileProvider* ifp =
- CVmSettingsUiIconFileProvider::NewL( file );
-
- AknIconUtils::CreateIconL(
- aBrandedBitmap,
- aBrandedBitmapMask,
- *ifp,
- bitmap.BitmapId(),
- bitmap.BitmapMaskId() );
- }
-
- // Set sizes.
- const TInt iconSize( KVmSettingsUiBrandingIconSize );
- AknIconUtils::SetSize( aBrandedBitmap, TSize( iconSize, iconSize ) );
- AknIconUtils::SetSize( aBrandedBitmapMask, TSize( iconSize, iconSize ) );
-
- // Destroy some items.
- CleanupStack::PopAndDestroy( &file );
- CleanupStack::PopAndDestroy( element );
- CleanupStack::PopAndDestroy( access );
- CleanupStack::PopAndDestroy( factory );
-
- VMBLOGSTRING( "VMBX: CVmBSHandler::CreateBrandedBitmapL: <=" );
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =======================
-
-// End of File
--- a/engines/vmbxengine/src/vmbx.rss Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,491 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This file contains all the resources for vmbx.dll.
- *
-*/
-
-
-// RESOURCE IDENTIFIER
-NAME VMBX // 4 letter ID
-
-// INCLUDES
-#include <bldvariant.hrh>
-
-#include <uikon.rh>
-#include <eikon.rh>
-#include "eikon.rsg"
-#include <avkon.rsg>
-#include <avkon.rh>
-#include <avkon.mbg>
-#include <avkon.loc>
-#include <vmbx.loc>
-
-// RESOURCE DEFINITIONS
-
-// -----------------------------------------------------------------------------
-//
-// RSS signature
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE {}
-
-// -----------------------------------------------------------------------------
-//
-// A document name buffer.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF { buf=""; }
-
-// -----------------------------------------------------------------------------
-//
-// r_define_number_prompt
-// Prompt of the query for changing voice mailbox number.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_define_number_prompt
- {
- buf = qtn_smsvo_number_query;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_change_number_prompt
-// Prompt of the query for changing voice mailbox number.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_change_number_prompt
- {
- buf = qtn_smsvo_number_query;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_vmbx_number_query
-// Dialog for inserting/changing number
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_vmbx_number_query
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_DATA_QUERY
- {
- layout = EPhoneLayout;
- control = EDWIN
- {
- flags = EEikEdwinNoHorizScrolling |
- EEikEdwinResizable |
- EEikEdwinAlternativeWrapping |
- EEikEdwinAutoSelection;
- width = 16;
- lines = 1;
- maxlength = 48;
- default_input_mode = EAknEditorNumericInputMode;
- allowed_input_modes = EAknEditorNumericInputMode;
- numeric_keymap = EAknEditorStandardNumberModeKeymap;
- special_character_table = 0;
- };
- };
- }
- };
- }
-
-
-// -----------------------------------------------------------------------------
-//
-// r_vmbx_softkeys_search_cancel_select
-// for MSK CBA buttons
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE CBA r_vmbx_softkeys_search_cancel_select
- {
- buttons =
- {
- CBA_BUTTON { id = EAknSoftkeySearch; txt = text_softkey_search; },
- CBA_BUTTON { id = EAknSoftkeyCancel; txt = text_softkey_cancel; },
- CBA_BUTTON { id = EAknSoftkeySearch; txt = text_softkey_select; }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_saved_note
-// Note for succesfully saved vmbx number.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_saved_note
- {
- buf = qtn_smsvo_saved_note;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_note_empty_number
-// Note for user entering empty value in vmbx number query.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_note_empty_number
- {
- buf = qtn_smsvo_note_empty_number;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_invalid_number_note
-// Note for invalid vmbx number.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_invalid_number_note
- {
- buf = qtn_smsvo_invalid_number;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_sim_number_note
-// Note for displaying sim number for user
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_sim_number_note
- {
- buf = qtn_smsvo_numb_from_sim_in_use;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_saved_note_sim_memory
-// Note for successfully saved vmbx number to Sim card.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_saved_note_sim_memory
- {
- buf = qtn_smsvo_saved_to_sim;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_saved_note_phone_memory
-// Note for successfully saved vmbx number to Phone memory.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_saved_note_phone_memory
- {
- buf = qtn_smsvo_saved_to_phone;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_saved_sim_number_into_use
-// Query asking user if he wants to take the sim number into use.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_saved_sim_number_into_use
- {
- buf = qtn_smsvo_use_numb_from_sim;
- }
-
-
-// -----------------------------------------------------------------------------
-//
-// r_vmbx_take_sim_number_into_use
-// Dialog asking user if he wants to take the sim number into use.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_vmbx_take_sim_number_into_use
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_YES_NO;
- items=
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- itemflags = EEikDlgItemNonFocusing;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- label = "";
- };
- }
- };
- }
-
-
-// -----------------------------------------------------------------------------
-//
-// r_vmbx_memory_list_query
-// Query where to save number
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE AVKON_LIST_QUERY r_vmbx_memory_list_query
- {
- //flags = EGeneralQueryFlags;
- //softkeys = r_avkon_softkeys_ok_cancel;
- items =
- {
- AVKON_LIST_QUERY_DLG_LINE
- {
- control = AVKON_LIST_QUERY_CONTROL
- {
- listtype = EAknCtSinglePopupMenuListBox;
- listbox = AVKON_LIST_QUERY_LIST
- {
- array_id=r_vmbx_memory_save_number_to;
- };
- heading = qtn_smsvo_save_to;
- };
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_vmbx_memory_save_number_to
-// Options array for r_vmbx_memory_list_query
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE ARRAY r_vmbx_memory_save_number_to
- {
- items=
- {
- LBUF {txt=qtn_smsvo_sim_card; } ,
- LBUF {txt=qtn_smsvo_phone_memory; }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_video_saved_note
-// Note for succesfully saved video mailbox number.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_video_saved_note
- {
- buf = qtn_smsvi_mailbox_saved;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_video_note_empty_number
-// text for selections in mailbox query when any mailbox is not defined
-// (Internet call voice mailbox)
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_video_note_empty_number
- {
- buf = qtn_smsvi_note_empty_number;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_video_define_number_prompt
-// Prompt of the query for changing video mailbox number.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_video_define_number_prompt
- {
- buf = qtn_smsvi_number_query;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_video_change_number_prompt
-// Prompt of the query for changing video mailbox number.
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_video_change_number_prompt
- {
- buf = qtn_smsvi_number_query;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_callto_lbx_prompt
-// text for selecting mailbox query
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_callto_lbx_prompt
- {
- buf = qtn_voip_call_to_voice_mailbox;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_callto_lbx_cs_mailbox_item
-// text for selections in mailbox query
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_callto_lbx_cs_mailbox_item
- {
- buf = qtn_voip_cs_mailbox;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_callto_lbx_video_mailbox_item
-// text for selections in mailbox query
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_callto_lbx_video_mailbox_item
- {
- buf = qtn_smsvi_video_mailbox;
- }
-
-
-// -----------------------------------------------------------------------------
-//
-// r_define_voice_lbx_prompt
-// text for selecting mailbox query
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_define_voice_lbx_prompt
- {
- buf = qtn_voip_define_voice_mailbox;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_define_video_or_voice_lbx_prompt
-// text for selecting mailbox query
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_define_video_or_voice_lbx_prompt
- {
- buf = qtn_smsvi_define_vi_or_vo_mailbox;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_define_lbx_cs_mailbox_item
-// text for selections in mailbox query when any mailbox is not defined
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_define_lbx_cs_mailbox_item
- {
- buf = qtn_voip_define_cs_mailbox;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_define_lbx_video_mailbox_item
-// text for selections in mailbox query when any mailbox is not defined
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_define_lbx_video_mailbox_item
- {
- buf = qtn_smsvi_define_vt_mailbox;
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_mailbox_listquery
-// List query
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE AVKON_LIST_QUERY r_mailbox_listquery
- {
- items =
- {
- AVKON_LIST_QUERY_DLG_LINE
- {
- control = AVKON_LIST_QUERY_CONTROL
- {
- listtype = EAknCtSinglePopupMenuListBox;
- heading = qtn_voip_call_to_voice_mailbox;
- listbox = AVKON_LIST_QUERY_LIST
- {
- };
- };
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_voip_rel2_2_call_to
-// Query for voice mailbox call, contains all configured vmbx services
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE DIALOG r_voip_rel2_2_call_to
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtListQueryControl;
- id = EListQueryControl;
- control = AVKON_LIST_QUERY_CONTROL
- {
- listtype = EAknCtSingleGraphicPopupMenuListBox;
- listbox = LISTBOX
- {
- //constructed dynamically
- };
- heading = qtn_voip_call_to_voice_mailbox;
- };
- }
- };
- }
-
-// -----------------------------------------------------------------------------
-//
-// r_voice_no_vmbx_number_note
-// Notification about missing number
-//
-// -----------------------------------------------------------------------------
-//
-RESOURCE TBUF r_voice_no_vmbx_number_note
- {
- buf = qtn_voice_no_vmbx_number;
- }
-
-// End of File
--- a/engines/vmbxengine/src/vmdialog.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,248 +0,0 @@
-/*
-* Copyright (c) 2002 - 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of CVmTextQueryDialog class.
-*
-*/
-
-
-// INCLUDE FILES
-#include <AknQueryDialog.h>
-#include <featmgr.h>
-#include "vmdialog.h"
-#include <vmbx.rsg>
-#include "vmblogger.h"
-
-
-// MEMBER FUNCTIONS
-
-// -----------------------------------------------------------------------------
-// CVmTextQueryDialog::CVmTextQueryDialog
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CVmTextQueryDialog::CVmTextQueryDialog( TDes& aDataText,
- const TBool aSearchEnabled )
- : CAknTextQueryDialog( aDataText ),
- iSearchEnabled( aSearchEnabled )
- {
- // no tone as default
- }
-
-// -----------------------------------------------------------------------------
-// CVmTextQueryDialog::~CVmTextQueryDialog
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CVmTextQueryDialog::~CVmTextQueryDialog()
-{
-
-}
-
-// -----------------------------------------------------------------------------
-// CVmTextQueryDialog::NewL
-// Two-phased constructor
-// -----------------------------------------------------------------------------
-//
-CVmTextQueryDialog* CVmTextQueryDialog::NewL( TDes& aDataText,
- const TDesC& aPrompt,
- const TBool aSearchEnabled )
- {
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog::NewL =>" );
- CVmTextQueryDialog* query = new( ELeave ) CVmTextQueryDialog( aDataText,
- aSearchEnabled );
- CleanupStack::PushL( query );
- query->SetPromptL( aPrompt );
- CleanupStack::Pop( query );
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog: <=:NewL " );
- return query;
- }
-
-// -----------------------------------------------------------------------------
-// CVmTextQueryDialog::PreLayoutDynInitL
-// Pre-layout dialog initialisation
-// -----------------------------------------------------------------------------
-//
-void CVmTextQueryDialog::PreLayoutDynInitL()
- {
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL =>" );
- CAknTextQueryDialog::PreLayoutDynInitL();
-
- // Change command buttons if needed
- if ( iSearchEnabled && !QueryControl()->GetTextLength() )
- {
- ButtonGroupContainer().SetCommandSetL(
- R_VMBX_SOFTKEYS_SEARCH_CANCEL_SELECT );
- }
-
- MakeLeftSoftkeyVisible( ETrue );
-
- // Set Pen support flags.
- if ( FeatureManager::FeatureSupported( KFeatureIdPenSupport ) )
- {
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL Pen" );
- CAknQueryControl* control = QueryControl();
- if( control )
- {
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL ctr" );
- CCoeControl *controlByLayout =
- control->ControlByLayoutOrNull( control->QueryType() );
- if ( controlByLayout )
- {
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL\
- edit" );
- CEikEdwin* numberEditor =
- static_cast< CEikEdwin* > ( controlByLayout );
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL\
- cast" );
- TInt flags = numberEditor->AknEdwinFlags()
- | EAknEditorFlagDeliverVirtualKeyEventsToApplication;
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL\
- flag" );
- numberEditor->SetAknEditorFlags( flags );
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL\
- set done" );
- }
- }
- }
-
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog::PreLayoutDynInitL <=" );
- }
-
-// -----------------------------------------------------------------------------
-// CVmTextQueryDialog::HandleQueryEditorStateEventL
-// Called when query editor event happens
-// -----------------------------------------------------------------------------
-//
-TBool CVmTextQueryDialog::HandleQueryEditorStateEventL(
- CAknQueryControl* /*aQueryControl*/,
- TQueryControlEvent /*aEventType*/,
- TQueryValidationStatus /*aStatus*/ )
- {
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog::HandleQueryEditorStateEventL =>" );
- MakeLeftSoftkeyVisible( ETrue );
- if ( iSearchEnabled )
- {
- if ( !QueryControl()->GetTextLength() )
- {
- ButtonGroupContainer().SetCommandSetL(
- R_VMBX_SOFTKEYS_SEARCH_CANCEL_SELECT );
- }
- else
- {
- ButtonGroupContainer().SetCommandSetL(
- R_AVKON_SOFTKEYS_OK_CANCEL__OK );
- }
- ButtonGroupContainer().DrawDeferred();
- }
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog::HandleQueryEditorStateEventL <=" );
- return EFalse;
- }
-
-// -----------------------------------------------------------------------------
-// CVmTextQueryDialog::OfferKeyEventL
-// Handles key events
-// -----------------------------------------------------------------------------
-//
-TKeyResponse CVmTextQueryDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent,
- TEventCode aType )
- {
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog::OfferKeyEventL =>" );
- TKeyResponse response = EKeyWasConsumed;
- switch( aKeyEvent.iScanCode )
- {
- case EStdKeyYes:
- // Catch this key event. EStdKeyYes would leak to other controls.
- break;
-
- default:
- response = CAknTextQueryDialog::OfferKeyEventL( aKeyEvent, aType );
- break;
- }
-
- VMBLOGSTRING( "VMBX: CVmTextQueryDialog::OfferKeyEventL <=" );
- return response;
- }
-
-// -----------------------------------------------------------------------------
-// CVmTextQueryDialog::DissmissQueryDlg
-// Dissmiss the query with cancel
-// -----------------------------------------------------------------------------
-//
-void CVmTextQueryDialog::DismissQueryDlg()
- {
- // try to dismiss query,leave will be ignored
- TRAP_IGNORE( TryExitL( EAknSoftkeyCancel ) );
- }
-
-// -----------------------------------------------------------------------------
-// CVMSimQueryDilaog::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CVMSimQueryDilaog* CVMSimQueryDilaog::NewL()
- {
- CVMSimQueryDilaog* query = new( ELeave )CVMSimQueryDilaog( );
- CleanupStack::PushL( query );
-
- CleanupStack::Pop( query );
- return query;
- }
-
-
-// -----------------------------------------------------------------------------
-// CVMSimQueryDilaog::CVMSimQueryDilaog
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CVMSimQueryDilaog::CVMSimQueryDilaog(): CAknQueryDialog(
- CAknQueryDialog::EConfirmationTone )
- {
- // no tone as default
- }
-
-// -----------------------------------------------------------------------------
-// CVMSimQueryDilaog:: ~CVMSimQueryDilaog
-// Destructor
-// -----------------------------------------------------------------------------
-//
-CVMSimQueryDilaog:: ~CVMSimQueryDilaog()
- {
-
- }
-
-// -----------------------------------------------------------------------------
-// CVMSimQueryDilaog::SetVMSimPromptL
-// Sets query caption on the screen asking for confirmation to copy voice
-// mailbox number from sim.
-// -----------------------------------------------------------------------------
-//
-void CVMSimQueryDilaog::SetVMSimPromptL( const TDesC& aDesC )
- {
- SetPromptL( aDesC );
- }
-
-// -----------------------------------------------------------------------------
-// CVMSimQueryDilaog::VMSimDismissDialogL
-// Destroys the query dialog
-// -----------------------------------------------------------------------------
-//
-void CVMSimQueryDilaog::VMSimDismissDialogL()
- {
- TryExitL( EEikBidCancel );
- }
-
-
-// End of File
--- a/engines/vmbxengine/src/vmlist.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of CVmListQueryDialog class.
-*
-*/
-
-
-// INCLUDE FILES
-#include <aknlistquerydialog.h>
-#include "vmlist.h"
-#include <vmbx.rsg>
-
-// MEMBER FUNCTIONS
-
-// -----------------------------------------------------------------------------
-// CVmListQueryDialog::CVmListQueryDialog()
-// -----------------------------------------------------------------------------
-CVmListQueryDialog::CVmListQueryDialog( TInt* aIndex ):CAknListQueryDialog( aIndex )
- {
- iOkToExit = EFalse;
- }
-
-// -----------------------------------------------------------------------------
-// CVmListQueryDialog::~CVmListQueryDialog()
-// -----------------------------------------------------------------------------
-CVmListQueryDialog::~CVmListQueryDialog()
-{
-}
-
-// -----------------------------------------------------------------------------
-// CVmListQueryDialog::NewL()
-// -----------------------------------------------------------------------------
-CVmListQueryDialog* CVmListQueryDialog::NewL( /*const TDesC& aPrompt,*/ TInt* aIndex )
- {
- CVmListQueryDialog* query = new( ELeave ) CVmListQueryDialog( aIndex );
- return query;
- }
-
-// -----------------------------------------------------------------------------
-// CVmListQueryDialog::OfferKeyEventL()
-// -----------------------------------------------------------------------------
-TKeyResponse CVmListQueryDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
- {
- RDebug::Print( _L("CVmListQueryDialog::OfferKeyEventL: %d" ), aType);
- RDebug::Print( _L("CVmListQueryDialog::KeyCode: %d" ), aKeyEvent.iCode);
- RDebug::Print( _L("CVmListQueryDialog::KeyCode: %d" ), aKeyEvent.iScanCode);
- if( aKeyEvent.iCode == EKeyNo && aType == KErrNone )
- {
- iOkToExit = ETrue;
- RDebug::Print( _L("CVmListQueryDialog::OfferKeyEventL" ));
- DismissQueryL();
- return EKeyWasConsumed;
- }
- return CAknListQueryDialog::OfferKeyEventL( aKeyEvent, aType );
- }
-
-TBool CVmListQueryDialog::OkToExitL(TInt aButtonId)
- {
- RDebug::Print( _L("CVmListQueryDialog::OkToExitL: %d" ), aButtonId);
- if( iOkToExit )
- {
- return ETrue;
- }
- return CAknListQueryDialog::OkToExitL(aButtonId);
- }
-// End of File
--- a/engines/vmbxengine/src/vmnumber.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,4655 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of RVmbxNumber class.
-*
-*/
-
-
-// INCLUDE FILES
-
-#include <vmnumber.h>
-#include <e32std.h>
-#include <avkon.hrh>
-#include <bautils.h>
-#include <eikenv.h>
-#include <commonphoneparser.h>
-#include <aknnotewrappers.h>
-#include <StringLoader.h>
-#include <data_caging_path_literals.hrh>
-#include <PhCltUtils.h>
-#include <vmbx.rsg>
-// includes for phonebook search
-#include <cphonecntfactory.h>
-#include <cphcntsingleitemfetch.h>
-#include <featmgr.h>
-#include <AknIconArray.h>
-#include <AknsUtils.h>
-
-#ifdef RD_STARTUP_CHANGE
- #include <startupdomainpskeys.h>//for KPSSimStatus
-#endif
-
-#include <AknQueryDialog.h>
-
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-#include <mpbutil.h>
-#include <utf.h> //CnvUtfConverter
-#include "voicemailboxprivatecrkeys.h"
-#include "voicemailboxdomaincrkeys.h"
-#include <PSVariables.h>
-#include <e32property.h>
-#include "vmdialog.h"
-#include "vmlist.h"
-#include "vmblogger.h"
-#include <vm.mbg>
-#include "vmspshandler.h"
-#include "vmbshandler.h"
-
-// CONSTANTS
-const TInt KVmFlagOpened = 0x00000001;
-const TInt KVmFlagPhoneOpened = 0x00000002;
-const TInt KVmFlagSimReadSupport = 0x00000004;
-const TInt KVmFlagPhoneModuleLoaded = 0x00000008;
-const TInt KVmFlagNotifyRequested = 0x00000010;
-const TInt KVmFlagNotifyOnActiveLineOnly = 0x00000020;
-const TInt KVmFlagPhonebookBeingCached = 0x00000040;
-const TInt KVmFlagSimWriteSupport = 0x00000080;
-const TInt KVmFlagSimVmbxNumSupport = 0x00000100;
-// Flag of external API saving number to phone
-const TInt KForceSavedToPhoneMem = 0x00000400;
-
-//flag of CS defined number
-const TInt KVmFlagCSNumberDefined = 0x00000001;
-//flag of Vedio defined number
-const TInt KVmFlagVideoNumberDefined = 0x00000002;
-//flag of VoIP defined number
-const TInt KVmFlagVoIpNumberDefined = 0x00000004;
-// phone application uid
-const TInt KPhoneApplicationUid = 0x100058B3;
-
-_LIT (KVmbxResourceFileDrive, "Z:");
-// The file directory is in literal KDC_RESOURCE_FILES_DIR
-// (in data data_caging_path_literals.hrh)
-_LIT (KVmbxResourceFileName, "Vmbx.rsc");
-
-// Phonebook entry name
-_LIT( KVmbxPhoneBookEntryName, "Vmbx" ); // If changed, remember to update
-// the size of KVmbxPhoneBookEntryNameLength in VmNumber.h
-const TInt KVmbxPhonebookRetriesIfInUse = 20;
-const TInt KVmbxPhonebookRetryDelay = 100000; // 0.1s
-
-const TInt KVmbxPhonebookBufferSize = 150; // Estimated max size 128
-
-_LIT( KVmbxOnePlus, "1" );
-
-// Format of the IAP selection list query.
-_LIT( KQueryItemFormat, "%d\t%S" );
-//for the mbm file
-_LIT( KVmMbmDrive, "Z:" );
-_LIT( KVmLibMbmFile, "vm.mbm" );
-
-const TInt KVmNumOverwrite = 1;
-
-const TInt KVmNamStoreMDNId = RMobileNamStore::EMobileDirectoryNumber;
-// MIN is not included in mmetel std params. Third extended param
-const TInt KVmNamStoreMINId = RMobileNamStore::ENumStandardNamParameters + 3;
-const TInt KVmPhNumMinLength = 3;
-const TInt KVmLbxItemsArraySize = 3;
-const TInt KVmOriginalNumLength = 256;
-const TInt KVmPhoneNumDigitsMinLength = 2;
-const TInt KVmPhoneNumDigitsMaxLength = 40;
-const TInt KVmbxOnlyDefinedOneNumber = 1;
-const TInt KMailBoxLimitForPrompt = 1;
-
-_LIT (KVmbxIllegalSimCharacter, "w");
-_LIT (KTestNumber, "12345");
-
-const TInt KVmExtFileSize = 20;
-const TInt KVmMaxStoreSize = 48;
-
-const TInt KDefaultServiceId = 0; // default ServerId
-const TInt KCSorVideoServiceId = 1; // CS or Video ServerId
-const TInt KDefaultDefinedNumberCount = 0; // default defined number count
-
-// When the define VM_USE_TSY is set, SIM phonebook will be used and
-// methods won't work if a compatible TSY/DOS environment is not present.
-
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-// &
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-
-#ifndef __WINS__ // SIM phonebook stalls in WINS
-#define VM_USE_TSY
-#endif
-// ================= MEMBER FUNCTIONS ==========================================
-
-
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::RVmbxNumber
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RVmbxNumber::RVmbxNumber() : iNotifyCallBack( NULL ),
- iUserAlsObserver( NULL ),
- iPhoneBookInfoPckg( iPhoneBookInfo ),
- iPhoneVoicemailInfoPckg( iPhoneVoicemailInfo ),
- iRSatSession(),
- iRSatClient( *this ),
- iNotifyHandler( NULL ),
- iSession( NULL ),
- iResourceFileOffset( 0 ),
- iFlags( KForceSavedToPhoneMem ),
- iQuery( NULL ),
- iClosedPtr( NULL ),
- iCoeEnv( NULL ),
- iVmNumOpts( EVmNumOptsBlank ),
- iVmUiOpts( 0 ),
- iSynchronize( EFalse ),
- iType( EVmbxNone ),
- iVMSimQueryDialog( NULL ),
- iUSimSupport( EFalse ),
- iVideoQuery( NULL ),
- iTypeSelectionQuery( NULL ),
- iAlphaStringFound( EFalse ),
- iAlphaStringFromSIM( NULL ),
- iNumberFound( EFalse ),
- iUSimFirstRoundTest( ETrue ),
- iCntFetch( NULL ),
- iVmSpsHandler( NULL ),
- iVmBsHandler( NULL ),
- iFeatMgrInitialized( EFalse ),
- iSimCardFound( EFalse )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::RVmbxNumber =>" );
-
- // Default sets to Phone memory, this can be changed in RVmbxNUmber::Open()
- iMemoryLocation = EVmbxPhoneMemory;
-
- //Create repository and notify handler.
- TRAPD( error,
- FeatureManager::InitializeLibL();
- iFeatMgrInitialized = ETrue;
- VMBLOGSTRING( "VMBX: RVmbxNumber::RVmbxNumber: FeatureManager initialized" );
-
- iSession = CRepository::NewL( KCRUidVoiceMailbox );
- VMBLOGSTRING( "VMBX: RVmbxNumber::RVmbxNumber: CRepository created" );
-
- if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) )
- {
- iVmSpsHandler = CVmSPSHandler::NewL();
- VMBLOGSTRING( "VMBX: RVmbxNumber::RVmbxNumber: CVmSPSHandler created" );
- }
-
- iVmBsHandler = CVmBSHandler::NewL();
- VMBLOGSTRING( "VMBX: RVmbxNumber::RVmbxNumber: CVmBSHandler created" );
- );
-
- if ( error != KErrNone )
- {
- VMBLOGSTRING2( "VMBX: RVmbxNumber::RVmbxNumber : \
- Initialization error %I", error );
- _LIT(KVmbxConstructorPanicType,"RVmbxNumber::RVmbxNumber");
- User::Panic( KVmbxConstructorPanicType, error );
- }
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::RVmbxNumber <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::~RVmbxNumber
-// Destructor
-// -----------------------------------------------------------------------------
-//
-EXPORT_C RVmbxNumber::~RVmbxNumber()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::~RVmbxNumber =>" );
-
- if ( iNotifyHandler )
- {
- iNotifyHandler->StopListening();
- delete iNotifyHandler;
- }
-
- delete iSession;
- delete iAlphaStringFromSIM;
-
- delete iVmSpsHandler;
- delete iVmBsHandler;
-
- if ( iFeatMgrInitialized )
- {
- FeatureManager::UnInitializeLib();
- }
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::~RVmbxNumber <=" );
- }
-
-
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::Open
-// Opens a new ETel connection
-// -----------------------------------------------------------------------------
-//
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-EXPORT_C TInt RVmbxNumber::Open()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::Open =>" );
-
- TInt ret( KErrGeneral );
- // initialize the CenRep number in the bankup store
- ret = BackUpSimNumber( KEmptyVoiceMailNumber, KVmbxTmpNumberLinePrimary );
- VMBLOGSTRING2( "RVmbxNumber::Open(): Clear KVmbxTmpNumberLinePrimary result = %d",
- ret );
- ret = BackUpSimNumber( KEmptyVoiceMailNumber, KVmbxTmpNumberLineAuxiliary );
- VMBLOGSTRING2( "RVmbxNumber::Open(): Clear KVmbxTmpNumberLineAuxiliary result = %d",
- ret );
- VMBLOGSTRING( "RVmbxNumber::Open(): Clear Tmp numbers from CenRep" );
- if ( iFlags & KVmFlagOpened )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::Open: Opened already" );
- ret = KErrNone;
- }
- else
- {
- ret = ConnectETelServer();
- if ( !ret )
- {
- // try to load ETel TSY module
- ret = iTelServer.LoadPhoneModule( KMmTsyModuleName );
- if ( !ret )
- {
- iFlags |= KVmFlagPhoneModuleLoaded;
-
- RTelServer::TPhoneInfo info;
- ret = iTelServer.GetPhoneInfo( 0, info );
- if ( !ret )
- {
- ret = iPhone.Open( iTelServer, info.iName );
- if ( !ret )
- {
- iFlags |= KVmFlagPhoneOpened;
- }
- }
- }
- }
-
- if ( !ret )
- {
- ret = Open( iPhone );
- }
- else
- {
- Close();
- }
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::Open <=" );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::Open
-// Opens a new ETel connection, when there is existing ETel connection already
-// -----------------------------------------------------------------------------
-//
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-EXPORT_C TInt RVmbxNumber::Open( RMobilePhone& aPhone )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::Open =>" );
- TInt result( KErrNone );
- TInt alsline( EAlsLine1 );
-
- if ( iFlags & KVmFlagOpened )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::Open: Opened already" );
- return KErrNone;
- }
- iPhone = aPhone;
-
- result = iSession->Get( KVmUsesSimMemory, iMemoryLocation );
-
- if ( KErrNone != result )
- {
- if ( KErrNotFound == result )
- {
- iMemoryLocation = EVmbxPhoneMemory;
- }
- else
- {
- Close();
- VMBLOGSTRING( "VMBX: RVmbxNumber::Open: Memory location error" );
- return result;
- }
- }
-
- VMBLOGSTRING2( "iMemoryLocation = %d", iMemoryLocation );
-
- // Connect to system agent
- RProperty property;
- TInt psErr( KErrNone );
-
-#ifdef RD_STARTUP_CHANGE
- psErr = property.Attach( KPSUidStartup, KPSSimStatus );
-#else
- psErr = property.Attach( KUidSystemCategory, KPSUidSimCStatusValue );
-#endif
- if ( KErrNone != psErr )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::Open: SIM status property error" );
- return psErr;
- }
-
- result = iSsSettings.Open( NULL );
-
- if ( KErrNone != result )
- {
- Close();
- VMBLOGSTRING( "VMBX: RVmbxNumber::Open: SS setting opening error" );
- return result;
- }
-
- // ignore error
- iSsSettings.Register( ESSSettingsAls, *this );
-
- // get the current ALS line
- if ( KErrNone != GetAlsLine( alsline ) )
- {
- alsline = EAlsLine1; // if problems, assume primary line
- }
-
-#ifdef VM_USE_TSY
-
- TInt nValue;
- psErr = property.Get( nValue );
- TBool simStatus = EFalse;
- iUSimSupport = IsUsimSupport();
- VMBLOGSTRING2( "iUSimSupport = %d", iUSimSupport );
- // Sim aceess test on startup
- iStartUpTest = ETrue;
-#ifdef RD_STARTUP_CHANGE
-
- if ( ( FeatureManager::FeatureSupported( KFeatureIdSimCard ) )
- && ( ESimNotPresent != nValue ) )
- {
- simStatus = ETrue;
- }
-
-#else //RD_STARTUP_CHANGE
-
- if ( ( FeatureManager::FeatureSupported( KFeatureIdSimCard ) )
- && ( EPSCSimRemoved != nValue ) )
- {
- simStatus = ETrue;
- }
-#endif // RD_STARTUP_CHANGE
- if ( FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ) )
- {
- if ( iUSimSupport )
- {
- simStatus = ETrue;
- }
- }
-
- VMBLOGSTRING2( "simStatus = %d", simStatus );
- if ( simStatus )//Is simCard supproted and it is not removed
- {
- iSimCardFound = ETrue;
- // If UICC supported, then open USIM phone book.
- if ( iUSimSupport )
- {
- iMbdnPhonebookOk = EFalse;
- // Get identifiers from MBI-file
- if ( EAlsLine1 == alsline )
- {
- result = MailboxNumbersIdentifiers();
- VMBLOGSTRING2( "Identifier result = %d", result );
- if ( KErrPathNotFound == result )
- {
- // try open vmbx-phonebook next
- iPhoneBookType = EVMBXPhoneBook;
- }
- else
- {
- iPhoneBookType = EMBDNPhoneBook;
- // set ALS line, if identifier reading returns -1
- if ( KErrNotFound == result )
- {
- iPhoneVoicemailInfo.iVoice = alsline;
- }
-
- // try to open mbdn-type phonebook
- result = iPhoneBook.Open( iPhone, KETelIccMbdnPhoneBook );
- VMBLOGSTRING2( "Mbdn phonebook opening result = %I ", result );
- if ( KErrNone == result )
- {
- // Get phonebook info
- result = PhoneBookInfo();
- }
- // close phonebook when error in opening or GetInfo
- if ( KErrNone != result )
- {
- VMBLOGSTRING( "Close MBDN phonebook" );
- iPhoneBook.Close();
- }
- // close phonebook when no number founf to test vmbx-phonebook
- else if ( ( KErrNone == result ) && iNoNumberFound )
- {
- VMBLOGSTRING( "mbdn close, number not found" );
- iMbdnPhonebookOk = ETrue;
- iPhoneBook.Close();
- // try open vmbx-phonebook next
- iPhoneBookType = EVMBXPhoneBook;
- }
- }
- }
-
- if ( EAlsLine2 == alsline || EVMBXPhoneBook == iPhoneBookType )
- {
- // try to open vmbx-type phonebook
- result = iPhoneBook.Open( iPhone, KETelIccVoiceMailBox );
- VMBLOGSTRING2( "Vmbx phonebook opening result = %I ", result );
- if ( KErrNone == result )
- {
- // check that this phonebook supports reading
- result = PhoneBookInfo();
- VMBLOGSTRING( "VmbxPhoneBook opened" );
- }
- }
- // reopen mbdn-phonebook when vmbx-phonebook has no number
- if ( iMbdnPhonebookOk && iNoNumberFound )
- {
- VMBLOGSTRING( "reopen mbdn" );
- iPhoneBook.Close();
- // try open vmbx-phonebook next
- iPhoneBookType = EMBDNPhoneBook;
- // try to open mbdn-type phonebook
- result = iPhoneBook.Open( iPhone, KETelIccMbdnPhoneBook );
- VMBLOGSTRING2( "Mbdn phonebook opening result = %I ", result );
- if ( KErrNone == result )
- {
- // Get phonebook info
- result = PhoneBookInfo();
- }
- // close phonebook when error in opening or GetInfo
- if ( KErrNone != result )
- {
- VMBLOGSTRING( "Close MBDN phonebook" );
- iPhoneBook.Close();
- }
- }
- }
- // open SIM book
- else
- {
- // No need to prevent for changing memory location
- iUSimFirstRoundTest = EFalse;
- result = iPhoneBook.Open( iPhone, KETelIccVoiceMailBox );
- iPhoneBookType = EVMBXPhoneBook;
- VMBLOGSTRING( "VmbxPhoneBook opened" );
-
- if ( KErrNone == result )
- {
- result = PhoneBookInfo();
- }
- }
-
- // set readonly state if aquired
- if ( IsReadOnlySIM() )
- {
- iFlags &= ~KVmFlagSimWriteSupport;
- VMBLOGSTRING( "VMBX: RVmbxNumber::Open: ReadOnly set" );
- }
-
- if ( KErrNone != result && KErrInUse != result )
- {
- // Fatal error
- Close();
- property.Close();
- VMBLOGSTRING( "VMBX: RVmbxNumber::Open: Phonebook info error" );
-
- return result;
- }
-
- // If no SIM support for vmbx numbers, we don't need
- //ETel for anything. -> close all ETel resources
- if ( !( iFlags &
- (KVmFlagPhonebookBeingCached | KVmFlagSimReadSupport ) ) )
- {
- CloseETel();
- }
- }
- // Sim access rights are tested only in start up
- iStartUpTest = EFalse;
-#endif // VM_USE_TSY
-
- property.Close();
-
- if ( FeatureManager::FeatureSupported( KFeatureIdProtocolCdma ) )
- {
- result = iSession->Get( KVmNumOpts,iVmNumOpts );
-
- if ( KErrNone != result )
- {
- if ( KErrNotFound == result )
- {
- iVmNumOpts = EVmNumOptsBlank;
- }
- else
- {
- Close();
- VMBLOGSTRING( "VMBX: RVmbxNumber::Open: NumOpt error" );
- return result;
- }
- }
- }
- result = iSession->Get( KVmUIOpts, iVmUiOpts );
-
- if ( KErrNone != result )
- {
- if ( KErrNotFound == result )
- {
- iVmUiOpts = 0;
- }
- else
- {
- Close();
- VMBLOGSTRING( "VMBX: RVmbxNumber::Open: NumOpt error" );
- return result;
- }
- }
-
- iCoeEnv = CEikonEnv::Static();
-
- // load the resources for queries and notes
- if ( iCoeEnv )
- {
- __ASSERT_DEBUG( iCoeEnv,
- User::Panic( KVmbxPanicCategory, EVmbxNoCoeEnv ) );
-
- // load the resources for queries and notes
- TInt tmpStatus;
- TRAP( tmpStatus, LoadResourceL() );
- result = tmpStatus;
-
- if ( result )
- {
- Close();
- }
- else
- {
- iFlags |= KVmFlagOpened;
- }
- }
-
- HandleNumberStores( alsline );
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::Open <=" );
- return result;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::ConnectETelServer
-// Connects to ETel server
-// -----------------------------------------------------------------------------
-//
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-TInt RVmbxNumber::ConnectETelServer()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::ConnectETelServer =>" );
- const TInt KRetryCount = 7;
- const TInt KRetryTimeout = 100000;
- TInt status( KErrNone );
-
- for ( TInt i( 0 ); i < KRetryCount; i++ )
- {
- status = iTelServer.Connect();
- if ( !status )
- {
- break;
- }
- User::After( KRetryTimeout );
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::ConnectETelServer <=" );
- return status;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::GetVmbxNumber
-// Fetches the specified vmbx number
-// -----------------------------------------------------------------------------
-//
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-EXPORT_C TInt RVmbxNumber::GetVmbxNumber( TDes& aNumber,
- TVmbxNumberEntry aEntry )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxNumber =>" );
- __ASSERT_DEBUG( iFlags & ( KVmFlagOpened ),
- User::Panic(KVmbxPanicCategory, EVmbxNotConnected) );
- __ASSERT_DEBUG( aNumber.MaxLength() >= KVmbxMaxNumberLength,
- User::Panic(KVmbxPanicCategory, EVmbxDescriptorTooSmall) );
-
- TInt lineNumber( aEntry );
-
- if ( aEntry == EAlsActiveLineEntry )
- {
- // get the current ALS line
- if ( GetAlsLine( lineNumber ) != KErrNone )
- {
- lineNumber = EAlsLine1; // if problems, assume primary line
- }
- }
- TInt ret( KErrNotFound );
- TBuf< KVmbxMaxNumberLength > number;
- TBuf< KVmbxMaxNumberLength > line2AlsNumber;
-
- //VMN callback#
- if ( FeatureManager::FeatureSupported( KFeatureIdProtocolCdma ) &&
- ( iVmUiOpts & KVmNumOverwrite ) )
- {
- ret = GetVmNumFromVMN( number );
- if ( ret == KErrNone )
- {
- aNumber.Copy( number );
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxNumber OK" );
- return ret;
- }
- else if ( ret != KErrNotFound )
- {
- VMBLOGSTRING2( "VMBX: RVmbxNumber:: \
- GetVmbxNumber error = %I", ret );
- return ret;
- }
- }
-
- TBool isFromSD = EFalse;
- TBool isFromSim = EFalse;
-
- // Get saved number
- switch ( iVmNumOpts )
- {
- case EVmNumOptsBlank:
- {
- // On ALS1 read number from sim, if sim is active
- // On ALS2 always read number from sim when vmbx phone memory in use
- if ( IsSimMemory() && ( ( EAlsLine1 == lineNumber )
- || ( EAlsLine2 == lineNumber ) ) )
- {
- ret = GetVmNumFromSIM( number, lineNumber );
- isFromSim = ETrue;
- // If there is no voice mailbox number available on SIM,
- // a note(qtn_...) should be shown,
- // when pressing '1' + 'send' key or long pressing '1' key
- // to try to call voice mailbox by phone application.
- if ( ( !UserEditNumber( lineNumber )
- || !IsPhoneMemForcedEdit( lineNumber ) ) &&
- ( ( KErrNotFound == ret ) || ( KErrNotSupported == ret ) )
- && !AllowedToChangeTheNumber() )
- {
- // get current active process
- RProcess curProcess;
- TInt curProcessId( curProcess.SecureId().iId );
- VMBLOGSTRING2( "VMBX: RVmbxNumber:: Get cur process id: \
- curProcessId = %I", curProcessId );
-
- if ( KPhoneApplicationUid == curProcessId )
- {
- TBool thisClosed( EFalse );
- iClosedPtr = &thisClosed;
-
- // This check is done because phone client calls
- // GetVmbxNumber and then SelectTypeL,
- // which causes note qtn_... to be shown twice
- if ( IsNoNumberNoteAllowed() )
- {
- // show the information note to user
- TRAP_IGNORE(
- ShowInformationNoteL( R_VOICE_NO_VMBX_NUMBER_NOTE ) )
- }
-
- iClosedPtr = NULL;
- if ( thisClosed )
- {
- //End Key Pressed
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxNumber: \
- End key pressed" );
- return KErrCancel;
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxNumber \
- No voice mailbox number available on SIM" );
- }
- }
- if ( KErrNone == ret )
- {
- ResetUserEditNumber( lineNumber );
- }
- VMBLOGSTRING2( "GetVmNumFromSIM = %I", ret );
- }
- else
- {
- ret = KErrNotFound;
- }
- break;
- }
- case EVmNumOptsDedicatedVMN:
- {
- ret = GetVmNumFromVMN( number );
- break;
- }
- case EVmNumOptsMIN:
- case EVmNumOptsOnePlusMIN:
- {
- ret = GetVmNumFromNamStore( number, EVmbxMIN );
- break;
- }
- case EVmNumOptsMDN:
- case EVmNumOptsOnePlusMDN:
- {
- ret = GetVmNumFromNamStore( number );
- break;
- }
- case EVmNumOptsMDNCustom:
- case EVmNumOptsOnePlusMDNCustom:
- {
- ret = GetVmNumFromSD( number, lineNumber );
- if ( ret != KErrNone )
- {
- ret = GetVmNumFromNamStore( number );
- }
- break;
- }
- case EVmNumOptsSharedData:
- {
- ret = GetVmNumFromSD( number, lineNumber );
- isFromSD = ETrue;
- break;
- }
- default:
- //
- break;
- }
-
- // On ALS2, if number exists on SD, then use it
- // if ALS2 number found in SIM, but not in phone memory,
- // reset flag for automatic SIM number use.
- // Number found from SIM is saved to SD later
-
- if ( lineNumber == EAlsLine2 )
- {
- TInt alsReturnValue = GetVmNumFromSD( line2AlsNumber, lineNumber );
- if ( ( alsReturnValue == KErrNone ) && ( line2AlsNumber.Length() ) )
- {
- VMBLOGSTRING( "GetVmbxNumber::ALS2 number found from CenRep" );
- number.Copy( line2AlsNumber );
- isFromSD = ETrue;
- }
- else
- {
- if ( ( KErrNone == ret ) && isFromSim )
- {
- VMBLOGSTRING( "[VMBX] GetVmbxNumber::ALS 2 number found from SIM" );
- ResetUserEditNumber( lineNumber );
- }
- else
- {
- number.Zero();
- }
- }
- }
-
- // No number retrieved so try to read SD for number
- // (Phone memory in use)
- if ( ret != KErrNone )
- {
- switch( iVmNumOpts )
- {
- case EVmNumOptsBlank:
- case EVmNumOptsDedicatedVMN:
- case EVmNumOptsMIN:
- case EVmNumOptsOnePlusMIN:
- case EVmNumOptsMDN:
- case EVmNumOptsOnePlusMDN:
- {
- if ( !IsSimMemory() )
- {
- ret = GetVmNumFromSD( number, lineNumber );
- VMBLOGSTRING2( "GetVmNumFromSD = %I", ret );
- isFromSD = ETrue;
- }
- else
- {
- aNumber.Copy( number );
- VMBLOGSTRING2( "number = %S", &number );
- }
- break;
- }
- default:
- break;
- }
- }
-
- if ( ret == KErrNone )
- {
- if ( number.Length() )
- {
- VMBLOGSTRING( "Number length > 0" );
- //Synchronize the number in storage with the retrieved number
- if ( iVmNumOpts != EVmNumOptsMDNCustom &&
- iVmNumOpts != EVmNumOptsOnePlusMDNCustom &&
- !isFromSD )
- {
- iSynchronize = ETrue;
-
- if ( ( iFlags & KVmFlagSimWriteSupport ) ||
- ( lineNumber == EAlsLine2 ) )
- {
- TInt error( KErrNone );
- // If number is not fetched from SIM and SIM memory active
- // on primary line, number saved to SIM.
- if ( UsesSimMemory() )
- {
- if ( !isFromSim )
- {
- error = SaveVmbxNumberToSim( number, aEntry );
- VMBLOGSTRING2( "SaveVmbxNumberToSim = %I", error );
- }
- }
- else
- {
- error = SaveVmbxNumberToPhone( number, aEntry );
- VMBLOGSTRING2( "SaveVmbxNumberToPhone = %I", error );
- }
- }
- else
- {
- iFlags &= (~KForceSavedToPhoneMem);
- SaveVmbxNumber( number, aEntry );
- }
- }
-
- if ( iVmNumOpts == EVmNumOptsOnePlusMIN ||
- iVmNumOpts == EVmNumOptsOnePlusMDN )
- {
- if ( KVmbxMaxNumberLength < number.Length() + 1 )
- {
- VMBLOGSTRING( "GetVmbxNumber::Number too long" );
- return KErrTooBig;
- }
- // Add 1 plus
- number.Insert( 0, KVmbxOnePlus );
- }
-
- aNumber.Copy( number );
- }
- else
- {
- VMBLOGSTRING( "GetVmbxNumber::No number found." );
- ret = KErrNotFound;
- }
- }
-
- VMBLOGSTRING2( "VMBX: RVmbxNumber::GetVmbxNumber error = %I", ret );
- if ( ret != KErrNone )
- {
- return KErrNotFound;
- }
-
- if ( IsEmergencyNumberL( aNumber ) )
- {
- aNumber.Zero();
- ret = KErrNotFound;
- }
-
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::QueryNumberL
-// Check wether the voice mailbox number can be changed
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RVmbxNumber::QueryNumberL( TVmbxQueryType aQueryType,
- TDes& aNumber,
- TBool aShowQuery)
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: =>" );
- __ASSERT_DEBUG( aNumber.MaxLength() >= KVmbxMaxNumberLength,
- User::Panic( KVmbxPanicCategory, EVmbxDescriptorTooSmall ) );
- __ASSERT_DEBUG( aNumber.Length() <= KVmbxMaxNumberLength,
- User::Panic( KVmbxPanicCategory, EVmbxNumberTooLong ) );
-
- VMBLOGSTRING2( "aQueryType = %d", aQueryType );
- VMBLOGSTRING2( "iPhoneBookType = %d", iPhoneBookType );
-
- TBool result( EFalse );
- if ( EVmQueryProcess == iQueryingState )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: \
- running forever case" );
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" );
- return result;
- }
-
- if ( !AllowedToChangeTheNumber() )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: \
- Number not allowed to change" );
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" );
- User::Leave( KErrAccessDenied );
- }
-
- // Vmbx type is set for FetchNumberFromPhonebookL
- iType = EVmbx;
-
- __ASSERT_DEBUG( aNumber.MaxLength() >= KVmbxMaxNumberLength,
- User::Panic( KVmbxPanicCategory, EVmbxDescriptorTooSmall ) );
- __ASSERT_DEBUG( aNumber.Length() <= KVmbxMaxNumberLength,
- User::Panic( KVmbxPanicCategory, EVmbxNumberTooLong ) );
-
- // Close() sets thisClosed to ETrue
- TBool thisClosed( EFalse );
-
- TBuf<KVmbxMaxNumberLength> vmbxNumber;
-
- TInt alsline( EAlsLine1 );
- // get the current ALS line
- if ( GetAlsLine( alsline ) != KErrNone )
- {
- // if problems, assume primary line
- alsline = EAlsLine1;
- }
- VMBLOGSTRING2( "VMBX: RVmbxNumber::QueryNumberL: ALSline = %d",
- alsline );
-
- if ( iFlags & KVmFlagSimReadSupport )
- {
- VMBLOGSTRING( "RVmbxNumber::QueryNumberL: SIM Read support" )
- TBool querySim( EFalse );
-
- if ( alsline == EAlsLine1 )
- {
- // Do sim query when not defined query
- // or 6f17 Sim memory not active and query wanted
- if ( ( aQueryType == EVmbxNotDefinedQuery ) ||
- ( !IsSimMemory() && aShowQuery &&
- ( iMemoryLocation == EVmbxPhoneMemory ) ) )
- {
- VMBLOGSTRING( "RVmbxNumber::QueryNumberL: Query on line1" );
- querySim = ETrue;
- }
- }
- else //EAlsLine2
- {
- // Allways and only when vmbx phonebook in use
- if ( iPhoneBookType == EVMBXPhoneBook )
- {
- VMBLOGSTRING( "RVmbxNumber::QueryNumberL: Query on line2" );
- querySim = ETrue;
- }
- }
-
- if ( querySim )
- {
- iClosedPtr = &thisClosed;
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: Q SIM number" );
-
- TBool isSimNumber = QuerySimNumberL( vmbxNumber );
-
- VMBLOGSTRING2( "VMBX: RVmbxNumber::QueryNumberL: SIM number %S",
- &vmbxNumber );
-
- iClosedPtr = NULL;
-
- if ( thisClosed )
- {
- //End Key Pressed
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: \
- End key pressed" );
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" );
- return EFalse;
- }
-
- if ( isSimNumber )
- {
- // save to phone memory when ALS2 in use
- // or read-only sim on ALS1
- if ( ( alsline == EAlsLine2 ) ||
- ( ( alsline == EAlsLine1 ) &&
- !( iFlags & KVmFlagSimWriteSupport ) ) )
- {
- VMBLOGSTRING( "Save number To Phone" );
- SaveVmbxNumberToPhone( vmbxNumber, EAlsActiveLineEntry );
- // confirmation note is not needed if number is taken
- // from SIM automatically
- if ( UserEditNumber( alsline ) ||
- IsPhoneMemForcedEdit( alsline ) )
- {
- ResetUserEditNumber( alsline );
- ShowConfirmationNoteL( R_SIM_NUMBER_NOTE );
- }
- }
- else
- {
- // confirmation note is not needed if number is taken
- // from SIM automatically
- if ( UserEditNumber( alsline ) ||
- IsPhoneMemForcedEdit( alsline ) )
- {
- ShowConfirmationNoteL( R_SIM_NUMBER_NOTE );
- }
- }
- aNumber.Copy( vmbxNumber );
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL Number from \
- Sim accepted" );
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" );
- return ETrue;
- }
- }
- }
-
- TBuf<KVmOriginalNumLength> originalNumber;
- originalNumber.Copy( aNumber );
-
- iQueryingState = EVmQueryProcess;
- //QueryNumberL dialog
- FOREVER
- {
- vmbxNumber.Copy( aNumber );
-
- // get the correct query prompt from resource file
- HBufC* prompt = StringLoader::LoadLC( ( aQueryType ==
- EVmbxNotDefinedQuery
- ? R_DEFINE_NUMBER_PROMPT
- : R_CHANGE_NUMBER_PROMPT ),
- iCoeEnv );
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL string loaded" );
- iClosedPtr = &thisClosed;
-
- // Convert output to accommodate the current locale
- AknTextUtils::LanguageSpecificNumberConversion( vmbxNumber );
-
- TInt ret; // return value of the query
-
- // ETrue to open the query again after closing single fetch dialog
- TBool searchUsed;
-
- // enable search if number length is 0
- TBool searchEnabled( vmbxNumber.Length() ? EFalse : ETrue );
-
- do
- {
- // show query with the correct prompt
- iQuery = CVmTextQueryDialog::NewL( vmbxNumber,
- *prompt, searchEnabled );
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL ExecuteLD" );
- ret = iQuery->ExecuteLD( R_VMBX_NUMBER_QUERY );
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL ExecuteLD done" );
-
- iQuery = NULL;
- searchUsed = EFalse;
-
- if ( searchEnabled && ret && !vmbxNumber.Length() )
- {
- searchUsed = ETrue;
- // Show phonebook's single fetch dialog
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL Fetch from Pb" );
- TRAPD( error, FetchNumberFromPhonebook2L( vmbxNumber ) );
- VMBLOGSTRING2( "VMBX: RVmbxNumber::QueryNumberL Fetch from Pb done \
- error = %d", error );
-
- // If application is killed via FSW, contact selection query
- // returns KLeaveExit. This should propagate to "root"
- // application where it reaches the active scheduler loop
- // and thus allows proper application exit when the loop exits.
- // Therefore propagate the error to caller and do not ignore it.
- if ( KLeaveExit == error )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL KLeaveExit" );
- User::Leave( error );
- }
-
- // user has pressed End Key
- if ( thisClosed )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: \
- End key pressed" );
- CleanupStack::PopAndDestroy( prompt );
-
- iQueryingState = EVmQueryNormal;
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" );
- return EFalse;
- }
-
- if ( error ) // Back pressed in Contact UI
- {
- // Now the phone book fetch dialog was closed,
- // get out of the loop
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL Fetch done" );
- ret = 0;
- break;
- }
- }
- } while ( searchUsed );
-
- iClosedPtr = NULL;
-
- CleanupStack::PopAndDestroy( prompt );
-
- if ( ret != KErrNone )
- {
- if ( !vmbxNumber.Length() )
- {
- iFlags &= (~KForceSavedToPhoneMem);
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL has number" );
- // Resets the flag that indicates that the user has edited VMBX number
- ResetUserEditNumber( alsline );
- TInt status =
- SaveVmbxNumber( vmbxNumber, EAlsActiveLineEntry );
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL number save" );
-
- if ( status == KErrNone )
- {
- // If number does not exist,
- // number from SIM is used if it's available
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL save ok" );
- if ( UseSimNumIfAvailable( vmbxNumber, alsline )
- && vmbxNumber.Length() )
- {
- // If number is taken from SIM,
- // show appropriate confirmation note
- ShowConfirmationNoteL( R_SIM_NUMBER_NOTE );
- }
- aNumber.Copy( vmbxNumber );
- if ( !vmbxNumber.Length() )
- {
- // show "not defined" note
- ShowConfirmationNoteL( R_NOTE_EMPTY_NUMBER );
- }
- result = ETrue;
- break;
- }
- else if ( status == KErrCancel )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL save \
- cancel" );
-
- aNumber.Copy( vmbxNumber );
- continue;
- }
- else
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: \
- Number saving error" );
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" );
- User::LeaveIfError( status );
- }
- }
- else
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL no number" );
- SetUserEditNumber( alsline );
- }
-
- // Convert back to western digits
- ConvertToWesternDigits( vmbxNumber );
-
- // check the given number here (emergency numbers not allowed)
- if ( IsValidPhoneNumber( vmbxNumber )
- && !IsEmergencyNumberL( vmbxNumber ) )
- {
- iFlags &= ~KForceSavedToPhoneMem;
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: save num 2" );
- TInt status = SaveVmbxNumber( vmbxNumber, EAlsActiveLineEntry );
-
- if ( status == KErrNone )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: save \
- num 2 ok" );
- aNumber.Copy( vmbxNumber );
- if ( UsesSimMemory() )
- {
- ShowConfirmationNoteL(
- R_SAVED_NOTE_SIM_MEMORY );
- }
- else
- {
- ShowConfirmationNoteL(
- R_SAVED_NOTE_PHONE_MEMORY );
- }
- result = ETrue;
- break;
- }
- else if ( status == KErrCancel )
- {// The query number dialog was cancelled, so continue
- aNumber.Copy( vmbxNumber );
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: save \
- num 2 cancel" );
- continue;
- }
- else if ( status == KErrArgument )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: save \
- num 2 err arg" );
- result = EFalse;
- }
- else
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: \
- Invalid number" );
- result = EFalse;
- }
- }
-
- if ( !result )
- {
- // show "invalid number" note and wait
- // for a short timeout
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: invalid \
- number show note" );
-
- prompt = StringLoader::LoadLC( R_INVALID_NUMBER_NOTE,
- iCoeEnv );
-
- iClosedPtr = &thisClosed;
-
- CAknInformationNote* note =
- new( ELeave ) CAknInformationNote( ETrue );
- note->ExecuteLD( *prompt );
-
- iClosedPtr = NULL;
-
- CleanupStack::PopAndDestroy( prompt );
-
- if ( !thisClosed )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: invalid \
- number query again" );
- continue; // the number was invalid -> query again.
- }
- }
- }
-
- // retrieve the original number in the query
- // as user has cancelled the query...
- aNumber.Copy( originalNumber );
- break; // user canceled the query
- }
- iQueryingState = EVmQueryNormal;
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryNumberL: <=" );
- return result;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::QuerySimNumberL
-// Routine to query and save SIM number from user
-// -----------------------------------------------------------------------------
-//
-TBool RVmbxNumber::QuerySimNumberL( TDes& aNumber, TVmbxNumberEntry aEntry )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QuerySimNumberL: =>" );
- TInt lineNumber( aEntry );
-
- if ( aEntry == EAlsActiveLineEntry )
- {
- // get the current ALS line
- if ( GetAlsLine( lineNumber ) != KErrNone )
- {
- lineNumber = EAlsLine1; // if problems, assume primary line
- }
- }
- TInt ret( KErrNotFound );
-
- ret = GetVmNumFromSIM( aNumber, lineNumber );
-
- if ( ret )
- {
- return EFalse;
- }
-
- VMBLOGSTRING2( "iMemoryLocation = %d", iMemoryLocation );
-
- TBool doSimQuery( EFalse );
- if ( ( lineNumber == EAlsLine2 ) && ( iPhoneBookType == EVMBXPhoneBook ) )
- {
- VMBLOGSTRING( "Sim query allowed on line2" );
- doSimQuery = ETrue;
- }
- else if ( ( iMemoryLocation == EVmbxPhoneMemory ) &&
- ( 0 != aNumber.Length() ) )
- {
- VMBLOGSTRING( "Sim query allowed on line1" );
- doSimQuery = ETrue;
- }
-
- if ( doSimQuery )
- {
- TInt retVal = EVmbxSimNumNotAccepted;
- // If number not defined, query is not needed as number
- // found in SIM is used automatically
- if ( VmbxNumDefInPhoneMemory( lineNumber ) )
- {
- // If number found in SIM is the same as the number stored in phone memory,
- // skip query
- if ( !NumStoredInPhone( aNumber, lineNumber ) )
- {
- HBufC* label = StringLoader::LoadLC( R_SAVED_SIM_NUMBER_INTO_USE,
- aNumber );
- iVMSimQueryDialog = CVMSimQueryDilaog::NewL();
- iVMSimQueryDialog->SetVMSimPromptL( *label );
- CleanupStack::PopAndDestroy( label );
- retVal= iVMSimQueryDialog->ExecuteLD(
- R_VMBX_TAKE_SIM_NUMBER_INTO_USE );
- if ( iVMSimQueryDialog == NULL )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QuerySimNumberL: \
- No number inserted" );
- return EFalse;
- }
- iVMSimQueryDialog = NULL;
- if ( retVal )
- {
- SetUserEditNumber( lineNumber );
- }
- }
- }
- else
- {
- // IF VMBX number not defined and number found in SIM,
- // number from SIM is used
- retVal = EVmbxSimNumAccepted;
- ResetUserEditNumber( lineNumber );
- }
-
- // sim number accepted on line 1
- if ( retVal && ( lineNumber == EAlsLine1 ) )
- {
- VMBLOGSTRING( "sim number accepted on line 1" );
- // No write support on sim, use phone memory
- if ( !( iFlags & KVmFlagSimWriteSupport ) )
- {
- iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory );
- iMemoryLocation = EVmbxPhoneMemory;
- }
- else
- {
- iSession->Set( KVmUsesSimMemory, EVmbxSimMemory );
- iMemoryLocation = EVmbxSimMemory;
- }
- VMBLOGSTRING( "return ETrue" );
- return ETrue;
- }
- // sim number accepted on line 2
- else if ( retVal && ( lineNumber == EAlsLine2 ) )
- {
- VMBLOGSTRING( "Sim number accepted on line2" );
- return ETrue;
- }
- // user selection "No"
- else
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QuerySimNumberL: \
- No number inserted" );
- return EFalse;
- }
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::QuerySimNumberL: <=" );
- return EFalse;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::ConvertToWesternDigits
-// Converts a phone number to western format
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::ConvertToWesternDigits( TDes& aDes ) const
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::ConvertToWesternDigits: =>" );
- AknTextUtils::ConvertDigitsTo( aDes, EDigitTypeWestern );
- VMBLOGSTRING( "VMBX: RVmbxNumber::ConvertToWesternDigits: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::SaveVmbxNumber
-// Saves vmbx number to phone or sim memory
-// -----------------------------------------------------------------------------
-//
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-EXPORT_C TInt RVmbxNumber::SaveVmbxNumber( const TDesC& aNumber,
- TVmbxNumberEntry aEntry )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumber: =>" );
- TInt status( KErrNone );
- TInt alsline( EAlsLine1 );
- // get the current ALS line
- if ( GetAlsLine( alsline ) != KErrNone )
- {
- alsline = EAlsLine1; // if problems, assume primary line
- }
-
- if ( EAlsLine1 == alsline)
- {
- // Ask place to save if sim available for saving
- if ( iFlags & KVmFlagSimWriteSupport )
- {
- TInt index( 0 );
- TInt ret( 0 );
-
- CAknListQueryDialog* dlg( NULL );
- TRAP_IGNORE( dlg = new( ELeave ) CAknListQueryDialog( &index ) );
-
- if ( dlg )
- {
- TRAP_IGNORE( ret = dlg->ExecuteLD( R_VMBX_MEMORY_LIST_QUERY ) );
- dlg = NULL;
- }
-
- if ( ret )
- {
- // user selected to save number to Sim
- if ( EVmbxSimMemory == index )
- {
- iMemoryLocation = EVmbxSimMemory;
- iSession->Set( KVmUsesSimMemory, EVmbxSimMemory );
-
- status = SaveVmbxNumberToSim( aNumber, aEntry );
- VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumber: \
- Number saved to Sim" );
- }
- // user selected to save number to Phone memory
- else if ( EVmbxPhoneMemory == index )
- {
- iMemoryLocation = EVmbxPhoneMemory;
- iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory );
- if ( iFlags & KForceSavedToPhoneMem )
- {
- SetPhoneMemForcedEdit( alsline );
- }
-
- status = SaveVmbxNumberToPhone( aNumber, aEntry );
- VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumber: \
- Number saved to phone memory" );
- }
- }
- else// The user has selected Cancel.. so no changes, return KErrCancel
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumber: canceled" );
- status = KErrCancel;
- }
- }
- // Line1 in use and no sim available, so use Phone memory
- else
- {
- // Sim write not support and external clients invoke the function
- // set phone memory forced edit
- if ( iFlags & KForceSavedToPhoneMem )
- {
- SetPhoneMemForcedEdit( alsline );
- }
- iMemoryLocation = EVmbxPhoneMemory;
- iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory );
- status = SaveVmbxNumberToPhone( aNumber, EAlsActiveLineEntry );
- VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumber: \
- Number saved to phone memory" );
- }
- }
- // EAlsLine2
- else
- {
- // Sim write not support and external clients invoke the function
- // set phone memory forced edit
- if ( ( iFlags & KForceSavedToPhoneMem ) &&
- ! ( iFlags & KVmFlagSimWriteSupport ) )
- {
- SetPhoneMemForcedEdit( alsline );
- }
- status = SaveVmbxNumberToPhone( aNumber, EAlsActiveLineEntry );
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumber: <=" );
- return status;
- }
-
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::SaveVmbxNumberToSim
-// Saves vmbx number to sim memory
-// -----------------------------------------------------------------------------
-//
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-TInt RVmbxNumber::SaveVmbxNumberToSim( const TDesC& aNumber,
- TVmbxNumberEntry aEntry )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumberToSim: =>" );
-
- // AllowedToChangeTheNumber() check not done in this method
- // in order to always allow saving.
- TInt alsline( EAlsLine1 );
- // get the current ALS line
- if ( GetAlsLine( alsline ) != KErrNone )
- {
- alsline = EAlsLine1; // if problems, assume primary line
- }
- // ALS line2 not supported when saving to SIM
- if ( alsline == EAlsLine2 )
- {
- VMBLOGSTRING( "Sim usage for ALS Line2 not supported, \
- return KErrArgument " );
- return KErrArgument;
- }
-
- // number containing "w"-character not allowed to save to sim
- if ( aNumber.Find( KVmbxIllegalSimCharacter ) != KErrNotFound )
- {
- VMBLOGSTRING( "w-char not allowed, return KErrArgument " );
- return KErrArgument;
- }
-
- __ASSERT_DEBUG( iFlags & KVmFlagOpened,
- User::Panic( KVmbxPanicCategory, EVmbxNotConnected ) );
- __ASSERT_DEBUG( aNumber.Length() <= KVmbxMaxNumberLength,
- User::Panic( KVmbxPanicCategory, EVmbxNumberTooLong ) );
-
- TInt lineNumber( aEntry );
- TInt error( KErrNone );
-
- if ( aEntry == EAlsActiveLineEntry )
- {
- // get the active ALS line
- lineNumber = alsline;
- }
-
-#ifdef VM_USE_TSY
- // Update maxLength info
- // First read number from sim.
- // Then get info of the max size.
- // Finally determine actual max size using retrieved info.
- // Note! GetInfo reads data from cache, which is updated when write
- // attempt is done. So if Ext-files are taken into use by some
- // other application while Vmbx is opened, then correct info
- // cannot fetch by GetInfo. (This appears when trying to save
- // long number twice and first one fails and second is saved
- // successfully.)
- TBuf<KVmbxMaxNumberLength> numberOnSim;
- // return value ignored here, because no meaning for size determination
- GetVmNumFromSIM( numberOnSim, lineNumber );
-
- TInt ret = DoPhonebookOperation( EVmbxPhonebookGetInfo );
-
- if ( ret != KErrNone )
- {
- VMBLOGSTRING2( "DoPhonebookOperation getinfo retval = %I", ret );
- return ret;
- }
- else
- {
- CalculateActualMaxLengthOnSim( numberOnSim.Length() );
- }
-
- // store in SIM phonebook
- if ( iVmNumOpts == EVmNumOptsBlank )
- {
- if ( aNumber.Length() <= iPhoneBookInfo.iMaxNumLength )
- {
- VMBLOGSTRING( "SaveVmbxNumberToSim::Num length <= maxNumLength" );
- if ( iFlags & KVmFlagPhonebookBeingCached )
- {
- error = DoPhonebookOperation( EVmbxPhonebookGetInfo );
- }
-
- if ( !error && ( iFlags & KVmFlagSimWriteSupport ) )
- {
- TVmbxEntry entry;
- entry.iIndex = lineNumber;
-
- if ( aNumber.Length() )
- {
- entry.iTelNumber.Copy( aNumber );
- entry.iText.Copy( KVmbxPhoneBookEntryName );
- entry.iText.AppendNum( lineNumber );
- error = DoPhonebookOperation( EVmbxPhonebookWrite,
- &entry );
- VMBLOGSTRING3( "VMBX: RVmbxNumber::SaveVmbxNumberToSim: \
- Write SIM entry %I, status: %I", lineNumber, error );
- }
- else
- {
- error = DoPhonebookOperation( EVmbxPhonebookDelete,
- &entry );
- VMBLOGSTRING3( "VMBX: RVmbxNumber::SaveVmbxNumberToSim: \
- Delete SIM entry %I, status: %I", lineNumber, error );
- }
- }
- }
- else
- {
- error = KErrArgument;
- }
- }
- else
- {
- error = KErrNotFound;
- }
-#else // <= VM_USE_TSY
- error = KErrNotFound;
-#endif // VM_USE_TSY
- VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumberToSim: <=" );
- return error; //to be removed
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::SaveVmbxNumberToPhone()
-// Saves vmbx number to phone memory
-// -----------------------------------------------------------------------------
-//
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-TInt RVmbxNumber::SaveVmbxNumberToPhone( const TDesC& aNumber,
- TVmbxNumberEntry aEntry )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumberToPhone: =>" );
-
- __ASSERT_DEBUG( iFlags & KVmFlagOpened,
- User::Panic( KVmbxPanicCategory, EVmbxNotConnected ) );
- __ASSERT_DEBUG( aNumber.Length() <= KVmbxMaxNumberLength,
- User::Panic( KVmbxPanicCategory, EVmbxNumberTooLong ) );
-
- // AllowedToChangeTheNumber() check not done in this method
- // in order to always allow saving.
- TInt lineNumber( aEntry );
- TInt error( KErrNone );
-
- if ( aEntry == EAlsActiveLineEntry )
- {
- // get the current ALS line
- if ( GetAlsLine( lineNumber ) != KErrNone )
- {
- lineNumber = EAlsLine1; // if problems, assume primary line
- }
- }
-
- TUint32 keyword = lineNumber ==
- EAlsLine1Entry ? KVmbxNumberLinePrimary: KVmbxNumberLineAuxiliary;
- error = iSession->Set( keyword, aNumber );
-
- if ( !error )
- {
- // Client will generate the event itself on request.
- if ( iFlags & KVmFlagNotifyRequested )
- {
- HandleNotifyString( keyword, aNumber );
- }
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxNumberToPhone: <=" );
- return error;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::NotifyVmbxNumberChangeL
-// Issues a notify request on a vmbx number change
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RVmbxNumber::NotifyVmbxNumberChangeL(
- MVmbxNotifyHandler* aHandler, TBool aNotifyOnActiveLineOnly )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyVmbxNumberChangeL: =>" );
- __ASSERT_DEBUG( iFlags & ( KVmFlagOpened ),
- User::Panic( KVmbxPanicCategory, EVmbxNotConnected ) );
-
- iNotifyCallBack = aHandler;
- SubscribeSATNotificationsL(); // subscribe SAT notifications
-
- // only issue a new notify request if there isn't one already
- if ( !( iFlags & KVmFlagNotifyRequested ) )
- {
- iNotifyHandler = CCenRepNotifyHandler::NewL( *this, *iSession );
- iNotifyHandler->StartListeningL();
-
- iFlags |= KVmFlagNotifyRequested;
- }
-
- if ( aNotifyOnActiveLineOnly )
- {
- iFlags |= KVmFlagNotifyOnActiveLineOnly;
- }
- else
- {
- iFlags &= ( ~KVmFlagNotifyOnActiveLineOnly );
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyVmbxNumberChangeL: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::SubscribeSATNotificationsL
-// Subscribe SAT notifications
-// -----------------------------------------------------------------------------
-void RVmbxNumber::SubscribeSATNotificationsL()
- {
- if ( iPhoneBookType == EMBDNPhoneBook )
- {
- iRSatSession.ConnectL();
- iRSatClient.OpenL( iRSatSession );
- iObservedFileList.Append( KMbdnEf );
- iObservedFileList.Append( KMbiEf );
- iRSatClient.NotifyFileChangeL( iObservedFileList );
- }
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::NotifyVmbxNumberChangeCancel
-// Cancels a notify request on a vmbx number change.
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RVmbxNumber::NotifyVmbxNumberChangeCancel()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyVmbxNumberChangeCancel: =>" );
- __ASSERT_DEBUG( iFlags & KVmFlagOpened,
- User::Panic( KVmbxPanicCategory, EVmbxNotConnected ) );
-
- iNotifyHandler->StopListening();
-
- iFlags &= ( ~KVmFlagNotifyRequested );
- VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyVmbxNumberChangeCancel: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::NotifyAlsLineChangeL
-// Issues a notify request on active ALS line change
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RVmbxNumber::NotifyAlsLineChangeL( MVmbxAlsObserver* aObserver )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyAlsLineChangeL: =>" );
- __ASSERT_DEBUG( iFlags & KVmFlagOpened,
- User::Panic( KVmbxPanicCategory, EVmbxNotConnected ) );
- iUserAlsObserver = aObserver;
- VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyAlsLineChangeL: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::NotifyAlsLineChangeCancel
-// Cancels a notify request on ALS line change
-// -----------------------------------------------------------------------------
-//
-EXPORT_C void RVmbxNumber::NotifyAlsLineChangeCancel()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyAlsLineChangeCancel: =>" );
- __ASSERT_DEBUG( iFlags & KVmFlagOpened,
- User::Panic(KVmbxPanicCategory, EVmbxNotConnected) );
- iUserAlsObserver = NULL;
- VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyAlsLineChangeCancel: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::Close
-// Closes the resources allocated in Open
-// -----------------------------------------------------------------------------
-//
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-EXPORT_C void RVmbxNumber::Close()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::Close: =>" );
- if ( iCntFetch )
- {
- delete iCntFetch;
- iCntFetch = NULL;
- }
-
- iRSatClient.Cancel();
- iRSatClient.Close();
- iRSatSession.Close();
- if ( iClosedPtr )
- {
- *iClosedPtr = ETrue;
- iClosedPtr = NULL;
- }
-
- if ( iVMSimQueryDialog )
- {
- TRAP_IGNORE( iVMSimQueryDialog->VMSimDismissDialogL() );
- iVMSimQueryDialog = NULL;
- }
-
- if ( iQuery )
- {
- delete iQuery;
- iQuery = NULL;
- }
-
- if ( iVideoQuery )
- {
- delete iVideoQuery;
- iVideoQuery = NULL;
- }
- // Type selection query
- if ( iTypeSelectionQuery )
- {
- delete iTypeSelectionQuery;
- iTypeSelectionQuery = NULL;
- }
-
- iVmbxServiceSelection.Close();
- if ( iResourceFileOffset )
- {
- iCoeEnv->DeleteResourceFile( iResourceFileOffset );
- iResourceFileOffset = 0;
- }
-
- CloseETel();
-
- iUserAlsObserver = NULL;
-
- // these automatically cancel all observations as well
-
- iSsSettings.Close();
-
- iFlags = 0;
- VMBLOGSTRING( "VMBX: RVmbxNumber::Close: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::LoadResourceL
-// Loads the resources needed for queries and confirmation notes
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::LoadResourceL()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::LoadResourceL: =>" );
- TFileName fileName;
- fileName += KVmbxResourceFileDrive;
- fileName += KDC_RESOURCE_FILES_DIR;
- fileName += KVmbxResourceFileName;
- BaflUtils::NearestLanguageFile( iCoeEnv->FsSession(), fileName );
- iResourceFileOffset = iCoeEnv->AddResourceFileL( fileName );
- VMBLOGSTRING( "VMBX: RVmbxNumber::LoadResourceL: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::AllowedToChangeTheNumber
-// Check wether the voice mailbox number can be changed
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RVmbxNumber::AllowedToChangeTheNumber()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::AllowedToChangeTheNumber: =>" );
- TBool ret( ETrue );
-
- if ( EUiNmbrChangeNotAllowed & iVmUiOpts )
- {
- ret = EFalse;
- }
- VMBLOGSTRING2( "RVmbxNumber::AllowedToChangeTheNumber \
- iVmUiOpts = %M", iVmUiOpts );
- VMBLOGSTRING( "VMBX: RVmbxNumber::AllowedToChangeTheNumber: <=" );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::HandleNotifyString
-// To notify the client about changes for string value keys
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::HandleNotifyString( TUint32 aKey, const TDesC16& aValue )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNotifyString: =>" );
- TInt alsline( EAlsLine1 );
-
- // get the current ALS line
- if ( GetAlsLine( alsline ) != KErrNone )
- {
- alsline = EAlsLine1; // if problems, assume primary line
- }
- if ( iNotifyCallBack )
- {
- TInt notifyLine( 0 );
-
- if ( aKey == KVmbxNumberLinePrimary )
- {
- notifyLine = EAlsLine1Entry;
- }
- else if ( aKey == KVmbxNumberLineAuxiliary )
- {
- notifyLine = EAlsLine2Entry;
- }
-
- if ( ( iFlags & KVmFlagNotifyOnActiveLineOnly ) && alsline != notifyLine )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNotifyString: \
- Line not notifyline" );
- return;
- }
-
- if ( notifyLine == EAlsLine1Entry || notifyLine == EAlsLine2Entry )
- {
- TRAPD( err, iNotifyCallBack->HandleNotifyL( notifyLine, aValue ) );
- if ( err != KErrNone )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNotifyString: \
- Notify handle error" );
- _LIT( KVmbxPanicType,"iNotifyCallBack->HandleNotifyL" );
- User::Panic( KVmbxPanicType, err );
- }
- }
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNotifyString: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::HandleNotifyGeneric
-// To notify the client about changes in keys when the whole repository
-// is listened for.
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::HandleNotifyGeneric( TUint32 aKey )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNotifyGeneric: =>" );
- if ( aKey == NCentralRepositoryConstants::KInvalidNotificationId )
- {
-
- // We have to check which keys have changed.
- }
- else
- {
-
- //Check the key value of the particular key being changed and
- //do further processing.
- }
-
- if ( iQuery )
- {
- // if the vmbx number is saved,notify to dismiss the query.
- iQuery->DismissQueryDlg();
- }
- if ( iVideoQuery )
- {
- // if the video number is saved,notify to dismiss the query.
- iVideoQuery->DismissQueryDlg();
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNotifyGeneric: <=" );
- }
-
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::PhoneSettingChanged
-// To notify changes in SS settings in phone
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::PhoneSettingChanged( TSSSettingsSetting aSetting,
- TInt aNewValue )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhoneSettingChanged: =>" );
- TInt alsline( EAlsLine1 );
- if ( aSetting == ESSSettingsAls )
- {
- alsline = ( aNewValue ==
- ESSSettingsAlsAlternate ? EAlsLine2Entry : EAlsLine1Entry );
-
- if ( iUserAlsObserver )
- {
- TRAP_IGNORE( iUserAlsObserver->HandleAlsChangeL(
- ( TVmbxAlsLine ) alsline ) );
- }
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhoneSettingChanged: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::GetAlsLine
-// Fetches ALS line from SS settings
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt RVmbxNumber::GetAlsLine( TInt& aLineNumber ) const
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetAlsLine: =>" );
- aLineNumber = EAlsLine1;
-
- TInt alsline( ESSSettingsAlsPrimary );
-
- TInt ret = CONST_CAST( RVmbxNumber*, this )->iSsSettings.Get(
- ESSSettingsAls, alsline );
-
- if ( alsline == ESSSettingsAlsAlternate )
- {
- aLineNumber = EAlsLine2;
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetAlsLine: <=" );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::ShowConfirmationNoteL
-// Shows confirmation note to user
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::ShowConfirmationNoteL( TInt aResourceId ) const
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::ShowConfirmationNoteL: =>" );
- HBufC* prompt = StringLoader::LoadLC( aResourceId, iCoeEnv );
-
- CAknConfirmationNote* note = new( ELeave ) CAknConfirmationNote( ETrue );
-
- note->ExecuteLD( *prompt );
-
- CleanupStack::PopAndDestroy( prompt );
- VMBLOGSTRING( "VMBX: RVmbxNumber::ShowConfirmationNoteL: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::IsValidPhoneNumber
-// Validates phone number
-// -----------------------------------------------------------------------------
-//
-TBool RVmbxNumber::IsValidPhoneNumber( const TDesC& aNumber ) const
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsValidPhoneNumber: =>" );
- TBool isValid( EFalse );
-
- if ( aNumber.Length() >= KVmPhNumMinLength )
- {
- TInt index( 0 );
- TInt digits( 0 );
-
- // Skip the possible '*'s and '#'s in the beginning.
- while ( index < aNumber.Length() &&
- ( aNumber[ index ] == '#' || aNumber[ index ] == '*' ||
- aNumber[ index ] == ' ') )
- {
- index++;
- }
-
- // Skip the possible '+'.
- if ( index < aNumber.Length() && aNumber[ index ] == '+' )
- {
- index++;
- }
-
- // Count the digits.
- // For this let's use another index so that the following
- // operation will start from the beginning of the actual
- // vmbx number
- TInt loopindex = index;
-
- while ( loopindex < aNumber.Length() &&
- ( aNumber[ loopindex ] >= '0' && aNumber[ loopindex ] <= '9'
- || aNumber[ loopindex ] == ' ') )
- {
- if ( aNumber[ loopindex ] != ' ' )
- {
- digits++;
- }
- loopindex++;
- }
-
- // Check that there are only allowed characters in the remaining string.
- while ( index < aNumber.Length() )
- {
- TText t = aNumber[ index ];
-
- if ( (t < '0' && t > '9') || t == ' ' )
- {
- break;
- }
- index++;
- }
-
- // If only legal characters were encountered, index is now same as
- // the length of the string.
-
- // phone number part must have 2...41 digits
- // '+' is only allowed as the first character in the string
- if ( digits >= KVmPhoneNumDigitsMinLength &&
- digits <= KVmPhoneNumDigitsMaxLength &&
- index == aNumber.Length())
- {
- isValid = ETrue;
- }
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsValidPhoneNumber: <=" );
- return isValid;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::IsEmergencyNumberL
-// Checks if a number is an emergency number.
-// -----------------------------------------------------------------------------
-//
-TBool RVmbxNumber::IsEmergencyNumberL( const TDesC& aNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsEmergencyNumberL: =>" );
- TBool isEmergency = EFalse;
-
- // Emergency Call API does not strip invalid characters like Call UI does, so it is done manually here.
- TPhCltTelephoneNumber number( aNumber.Left( KPhCltTelephoneNumberLength ) );
- PhCltUtils::RemoveInvalidChars( number );
-
- CPhCltEmergencyCall* emergencyCall = CPhCltEmergencyCall::NewL( this );
-
- TInt result = emergencyCall->IsEmergencyPhoneNumber( number, isEmergency );
- delete emergencyCall;
- if ( result != KErrNone )
- {
- return EFalse;
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsEmergencyNumberL: <=" );
- return isEmergency;
- }
-
-// ---------------------------------------------------------
-// RVmbxNumber::HandleEmergencyDialL()
-// ---------------------------------------------------------
-//
-void RVmbxNumber::HandleEmergencyDialL( const TInt /*aStatus*/ )
- {
- // No action
- }
-
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::PhoneBookInfo
-// Fetches information about the SIM phonebook for vmbx numbers
-// -----------------------------------------------------------------------------
-//
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-TInt RVmbxNumber::PhoneBookInfo()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhoneBookInfo: =>" );
- TRequestStatus status( KErrNone );
- TInt alsline( EAlsLine1 );
-
- // get the current ALS line
- if ( GetAlsLine( alsline ) != KErrNone )
- {
- alsline = EAlsLine1; // if problems, assume primary line
- }
-
- // This may return KErrInUse if phonebook is being cached
- iPhoneBook.GetInfo( status, iPhoneBookInfoPckg );
- User::WaitForRequest( status ); // Wait for asynchronous call to finish
-
- VMBLOGSTRING2( "VMBX: RVmbxNumber::PhoneBookInfo: \
- SIM Phonebook info read, status: %I", status.Int() );
- VMBLOGSTRING2( "VMBX: RVmbxNumber::PhoneBookInfo: \
- SIM Phonebook write access = %I",
- iPhoneBookInfo.iCaps & RMobilePhoneBookStore::KCapsWriteAccess ? 1 : 0);
- iFlags &= ~KVmFlagPhonebookBeingCached;
- iFlags &= ~KVmFlagSimVmbxNumSupport;
-
- VMBLOGSTRING2( "MaxNum length from sim: %I", iPhoneBookInfo.iMaxNumLength );
- if ( status == KErrInUse || status == KErrNotReady )
- {
- iFlags |= KVmFlagPhonebookBeingCached;
- VMBLOGSTRING( "Phonebook Being Cached" );
- }
- else if ( status == KErrNone )
- {
- //If read access, only then write access possible
- if ( iPhoneBookInfo.iCaps & RMobilePhoneBookStore::KCapsReadAccess )
- {
- VMBLOGSTRING( "ReadAccess ok" );
- iFlags |= KVmFlagSimReadSupport;
-
- if ( iPhoneBookInfo.iCaps & RMobilePhoneBookStore::KCapsWriteAccess )
- {
- VMBLOGSTRING( "WriteAccess ok" );
- iFlags |= KVmFlagSimWriteSupport;
- iFlags |= KVmFlagSimVmbxNumSupport;
- }
- // Sim access rights are tested only in start up
- if ( iStartUpTest )
- {
- TestAndSetSimAccessFlags();
- }
- }
- //As there is no sim support set the memory to phone memory
- else
- {
- // No write capability and line1 in use
- if ( ( iMemoryLocation != EVmbxPhoneMemory ) &&
- ( alsline == EAlsLine1 ) )
- {
- iMemoryLocation = EVmbxPhoneMemory;
- iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory );
- }
- iFlags &= ~KVmFlagSimReadSupport;
- }
- }
- // no caps fetched
- else
- {
- if ( ( iMemoryLocation != EVmbxPhoneMemory ) &&
- ( alsline == EAlsLine1 ) )
- {//as there is no sim support set the memory to phone memory
- iMemoryLocation = EVmbxPhoneMemory;
- iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory );
- }
- iFlags &= ~KVmFlagSimReadSupport;
- VMBLOGSTRING( "USim not supported" );
- status = KErrNone;
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhoneBookInfo: <=" );
- return status.Int();
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::IsReadOnlySIM
-// Checks if writing to sim is prohibited
-// -----------------------------------------------------------------------------
-//
-TBool RVmbxNumber::IsReadOnlySIM()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsReadOnlySIM. =>" );
-
- TBool readOnlySIM = EFalse;
- iSession->Get( KReadOnlySim, readOnlySIM );
- VMBLOGSTRING2( "VMBX: RVmbxNumber::IsReadOnlySIM: \
- read only flag = %I", readOnlySIM );
- return readOnlySIM;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::DoPhonebookOperation
-// Does a vmbx phonebook operation
-// -----------------------------------------------------------------------------
-//
-TInt RVmbxNumber::DoPhonebookOperation( TVmbxPhonebookOperation aOperation,
- TVmbxEntry* aEntry )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::DoPhonebookOperation: =>" );
- TInt result( KErrNone );
- TInt retryCounter( KVmbxPhonebookRetriesIfInUse );
-
- FOREVER
- {
- retryCounter--;
-
- switch ( aOperation )
- {
- case EVmbxPhonebookGetInfo:
- {
- result = PhoneBookInfo();
- break;
- }
- case EVmbxPhonebookRead:
- {
- TRAPD( readErr, PhonebookReadL( *aEntry ) );
- if ( readErr != KErrNone && readErr != KErrNotFound )
- {
- result = KErrNotSupported;
- }
- break;
- }
- case EVmbxPhonebookWrite:
- {
- result = PhonebookWrite( *aEntry );
- break;
- }
- case EVmbxPhonebookDelete:
- {
- result = PhonebookDelete( *aEntry );
- break;
- }
- default:
- {
- __ASSERT_DEBUG( 0, User::Panic( KVmbxPanicCategory,
- EVmbxUnhandledOperation) );
- break;
- }
- }
-
- if ( result != KErrInUse || retryCounter <= 0 )
- {
- break;
- }
-
- iFlags |= KVmFlagPhonebookBeingCached;
- User::After( KVmbxPhonebookRetryDelay );
- }
- // set readonly state if aquired
- if ( IsReadOnlySIM() )
- {
- iFlags &= ~KVmFlagSimWriteSupport;
- VMBLOGSTRING( "VMBX: RVmbxNumber::DoPhonebookOperation: ReadOnly set" );
- }
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::DoPhonebookOperation: <=" );
- return result;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::PhonebookReadL
-// Reads an entry from the ICC-based phonebook
-// -----------------------------------------------------------------------------
-//
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-void RVmbxNumber::PhonebookReadL( TVmbxEntry& aEntry )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: =>" );
- TRequestStatus status( KErrNone );
- TInt numEntries( 1 );
- TBuf8<KVmbxPhonebookBufferSize> pbData;
- pbData.FillZ();
- pbData.Zero();
- TInt result( KErrNone );
-
- // Reset variables
- iNumberFound = EFalse;
- if ( iAlphaStringFound )
- {
- delete iAlphaStringFromSIM;
- iAlphaStringFromSIM = NULL;
- }
- iAlphaStringFound = EFalse;
-
- if ( iPhoneBookType == EMBDNPhoneBook )
- {
- VMBLOGSTRING( "start MBDN PhoneBook read" );
- iPhoneBook.Read( status, iPhoneVoicemailInfo.iVoice,
- numEntries, pbData );
- }
- else
- {
- // Record#1 in sim is for line1 number and Record#2 in sim is for
- // line2 number so line is used to fetch
- VMBLOGSTRING( "start VMBX PhoneBook read" );
- iPhoneBook.Read( status, aEntry.iIndex, numEntries, pbData );
- }
-
- User::WaitForRequest( status ); // Wait for asynchronous call to finish
- VMBLOGSTRING2( "PhoneBook read status = %I", status.Int() );
-
- if ( status == KErrNone || status == KErrNotFound )
- {
- if ( pbData.Length() )
- {
- // -> Search Tags "ETagPBNumber" and "ETagPBText"
- // and read (decode) them
- TUint8 tagValue(0);
- CPhoneBookBuffer::TPhBkTagType dataType(
- CPhoneBookBuffer::EPhBkTypeNoData );
-
- CPhoneBookBuffer* pbkBuffer = NULL;
- TRAPD( err, pbkBuffer = new(ELeave) CPhoneBookBuffer() );
- if ( err != KErrNone )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: \
- Phonebook creation error" );
- User::Leave( err );
- }
-
- pbkBuffer->Set( &pbData );
- pbkBuffer->StartRead();
-
- // Read first "new-entry-tag"
- result = pbkBuffer->GetTagAndType( tagValue, dataType );
-
- if ( result != KErrNone || tagValue != RMobilePhoneBookStore::ETagPBNewEntry)
- {
- delete pbkBuffer;
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: \
- Unknown error" );
- User::Leave( KErrUnknown ); // Something wrong in TLV
- }
-
- // search number and text fields from TLV entry
- result = pbkBuffer->GetTagAndType( tagValue, dataType );
-
- while ( result == KErrNone && pbkBuffer->RemainingReadLength() > 0 )
- {
- VMBLOGSTRING2("VMBX: RVmbxNumber::PhonebookReadL(): tagValue: %d", tagValue )
- VMBLOGSTRING2("VMBX: RVmbxNumber::PhonebookReadL(): dataType: %d", dataType )
-
- // Check for text field
- if ( tagValue == RMobilePhoneBookStore::ETagPBText )
- {
- // Alpha string field found from TLV entry,
- // assuming 16bit data
- TPtrC16 alphaPtrC;
- result = pbkBuffer->GetValue( alphaPtrC );
- if ( result == KErrNone )
- {
- iAlphaStringFromSIM = alphaPtrC.AllocL();
- iAlphaStringFound = ETrue;
- VMBLOGSTRING2("VMBX: RVmbxNumber::PhonebookReadL(): iAlphaStringFromSIM: %S", iAlphaStringFromSIM )
- }
- }
- // Check for number field
- else if ( tagValue == RMobilePhoneBookStore::ETagPBNumber )
- {
- // Number field found from TLV entry, assuming 16bit data
- TPtrC16 numberPtrC;
- result = pbkBuffer->GetValue( numberPtrC );
- iNumberFound = ETrue;
- VMBLOGSTRING("VMBX: RVmbxNumber::PhonebookReadL(): ETagPBNumber found.");
-
- if ( result == KErrNone )
- {
- // Error code is returned if number not fit to
- // local buffer.
- if ( numberPtrC.Length() > aEntry.iTelNumber.MaxLength() )
- {
- delete pbkBuffer;
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: \
- Overflow error" );
- User::Leave( KErrOverflow );
- }
- else
- {
- // copy number to local buffer
- aEntry.iTelNumber.Copy( numberPtrC );
- VMBLOGSTRING2("VMBX: RVmbxNumber::PhonebookReadL(): ETagPBNumber found. Number: %S", &aEntry.iTelNumber );
- }
- }
- }
- else
- {
- // skip field
- pbkBuffer->SkipValue( dataType );
- }
- // Read next field type
- result = pbkBuffer->GetTagAndType( tagValue, dataType );
- }
-
- // Number and Alpha fields not found from TLV entry
- if ( !iAlphaStringFound && !iNumberFound )
- {
- delete pbkBuffer;
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: \
- Not found error" );
- User::Leave( KErrNotFound );
- }
- delete pbkBuffer;
- }
- else
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: Not found error" );
- iNumberFromSim.FillZ();
- iNumberFromSim.Zero();
- User::Leave( KErrNotFound );
- }
- }
- else
- {
- // sim read-only and number fetched by GetPhonebookInfo
- // so return number
- if ( iNumberFromSim.Length() && !( iFlags & KVmFlagSimWriteSupport ) )
- {
- aEntry.iTelNumber.Copy( iNumberFromSim );
- iMemoryLocation = EVmbxPhoneMemory;
- iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory );
- VMBLOGSTRING2( "Number value = %S", &iNumberFromSim );
- VMBLOGSTRING2( "iMemoryLocation = %d", iMemoryLocation );
- VMBLOGSTRING( "Startuptest ongoing, read only sim, number fetched" );
- }
- else
- {
- User::Leave( status.Int() );
- }
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookReadL: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::PhonebookWrite
-// Writes an entry into ICC-based phonebook
-// -----------------------------------------------------------------------------
-//
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-TInt RVmbxNumber::PhonebookWrite( TVmbxEntry& aEntry )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookWrite: =>" );
- TRequestStatus status( KErrNone );
- TBuf8<KVmbxPhonebookBufferSize> pbData;
- pbData.FillZ();
-
- CPhoneBookBuffer* pbkBuffer = NULL;
- TRAPD( err, pbkBuffer = new(ELeave) CPhoneBookBuffer() );
- if (err != KErrNone)
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookWrite: \
- Phonebook creation error" );
- return err;
- }
-
- pbkBuffer->Set( &pbData );
-
- // New entry
- status = pbkBuffer->AddNewEntryTag();
-
- // Add index
- // Type of index is TUint16 in Multimode ETel and TInt in old ETel.
- status = pbkBuffer->PutTagAndValue( RMobilePhoneBookStore::ETagPBAdnIndex,
- (TUint16)aEntry.iIndex );
-
- // Add name if it existed on SIM card
- // Type of ETagPBText is TDes16
- if ( iAlphaStringFound )
- {
- status = pbkBuffer->PutTagAndValue( RMobilePhoneBookStore::ETagPBText,
- *iAlphaStringFromSIM );
- }
-
- // Add number
- // Type of ETagPBNumber is TDes16
- status = pbkBuffer->PutTagAndValue( RMobilePhoneBookStore::ETagPBNumber,
- aEntry.iTelNumber );
- if ( iPhoneBookType == EMBDNPhoneBook )
- {
- TInt index = iPhoneVoicemailInfo.iVoice;
- iPhoneBook.Write( status, pbData, index );
- VMBLOGSTRING( "Mbdn writing" );
- }
- else
- {
- iPhoneBook.Write( status, pbData, aEntry.iIndex );
- VMBLOGSTRING( "6f17 writing" );
- }
- User::WaitForRequest( status ); // Wait for asynchronous call to finish
- VMBLOGSTRING2( "PhonebookWrite: status=%I", status.Int() );
-
- delete pbkBuffer;
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookWrite: <=" );
- return status.Int();
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::PhonebookDelete
-// Removes an entry from ICC-based phonebook
-// -----------------------------------------------------------------------------
-//
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-TInt RVmbxNumber::PhonebookDelete( TVmbxEntry& aEntry )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookDelete: =>" );
- TRequestStatus status( KErrNone );
- if ( iPhoneBookType == EMBDNPhoneBook )
- {
- TInt index = iPhoneVoicemailInfo.iVoice;
- iPhoneBook.Delete( status, index );
- }
- else
- {
- iPhoneBook.Delete( status, aEntry.iIndex );
- }
- User::WaitForRequest( status ); // Wait for asynchronous call to finish
- VMBLOGSTRING( "VMBX: RVmbxNumber::PhonebookDelete: <=" );
- return status.Int();
- }
-
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::FetchNumberFromPhonebook2L
-// Create and show Phonebook's Single Fetch Dialog
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::FetchNumberFromPhonebook2L( TDes& aPhoneNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::FetchNumberFromPhonebook2L: =>" );
-
- CPhCntFactory* contactFactory = CreateCntFactoryL();
- CleanupStack::PushL( contactFactory );
- iCntFetch = NULL;
- iCntFetch = contactFactory->CreateSingleItemFetchL();
- CPhCntSelection* contactSelect = NULL;
-
- TRAPD( error, contactSelect = iCntFetch->SelectPhoneNumberLD() );
- // Task swapper close activated
- if ( error != KErrNone )
- {
- contactSelect = NULL;
- iCntFetch = NULL;
- User::Leave( error ); //close application
- }
-
- // This check is needed because contactselect is NULL in case of user
- // presses back in contact fetch dialog. It will NOT leave.
- if ( contactSelect )
- {
- if ( contactSelect->Number().Length() )
- {
- aPhoneNumber = contactSelect->Number().Left( KVmbxMaxNumberLength );
- }
- delete contactSelect;
- contactSelect = NULL;
- }
-
- iCntFetch = NULL;
- CleanupStack::PopAndDestroy( contactFactory );
-
- //for removing special chars from number fetched from phone book
- TText ch = 0;
- TInt len = aPhoneNumber.Length();
- for ( TInt cnt = 0; cnt < len; cnt++ )
- {
- ch = aPhoneNumber[cnt];
- switch ( ch )
- {
- case '(':
- case ')':
- case '-':
- case ' ':
- {
- aPhoneNumber.Delete( cnt, 1 );
- cnt--;
- len = aPhoneNumber.Length();
- break;
- }
- default:
- break;
- }
- }
-
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::FetchNumberFromPhonebook2L: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::GetVmNumFromSIM
-// Retrieves voice mailbox number from SIM/R-UIM
-// -----------------------------------------------------------------------------
-//
-#ifdef VM_USE_TSY
-TInt RVmbxNumber::GetVmNumFromSIM( TDes& aNumber, TInt aLineNumber )
-#else
-TInt RVmbxNumber::GetVmNumFromSIM( TDes& /*aNumber*/, TInt /*aLineNumber*/ )
-#endif
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromSIM: =>" );
- TInt ret( KErrNotFound );
-
-#ifdef VM_USE_TSY
-
- if ( iFlags & KVmFlagPhonebookBeingCached )
- {
- ret = DoPhonebookOperation( EVmbxPhonebookGetInfo );
-
- if ( ret != KErrNone )
- {
- VMBLOGSTRING2( "DoPhonebookOperation getinfo retval = %I", ret );
- return ret;
- }
- }
-
- // Now we have SIM support information updated
- if ( iFlags & KVmFlagSimReadSupport )
- {
- TVmbxEntry entry;
- entry.iIndex = aLineNumber; // 1 or 2
- ret = DoPhonebookOperation( EVmbxPhonebookRead, &entry );
- VMBLOGSTRING3( "VMBX: RVmbxNumber::GetVmNumFromSIM: \
- Read SIM entry %I, status: %I", aLineNumber, ret );
-
- if ( ret == KErrNone )
- {
- if ( !entry.iTelNumber.Length() )
- {
- ret = KErrNotFound;
- }
- else
- {
- aNumber.Copy( entry.iTelNumber );
- }
- }
- }
- else
- {
- ret = KErrNotSupported;
- }
-
- if ( IsEmergencyNumberL( aNumber ) )
- {
- aNumber.Zero();
- ret = KErrNotFound;
- }
-
- VMBLOGSTRING2( "Number = %S", &aNumber );
-#endif // VM_USE_TSY
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromSIM: <=" );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::GetVmNumFromVMN
-// Retrieves voice mailbox number from VMN summary info
-// -----------------------------------------------------------------------------
-//
-TInt RVmbxNumber::GetVmNumFromVMN( TDes& aNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromVMN: =>" );
- TBuf<KVmbxMaxNumberLength> number;
- TInt ret( KErrNotFound );
- TInt value = 0;
-
- ret = iSession->Get( KVmSummaryInfoIsSet, value );
-
- if ( !ret && value == 1 )
- {
- ret = iSession->Get( KVmCallbackNumber, number );
- if ( !ret )
- {
- if ( number.Length() )
- {
- aNumber.Copy( number );
- }
- else
- {
- ret = KErrNotFound;
- }
- }
- }
-
- if ( IsEmergencyNumberL( aNumber ) )
- {
- aNumber.Zero();
- ret = KErrNotFound;
- }
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromVMN: <=" );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::GetVmNumFromNamStore
-// Retrieves voice mailbox number from NAM
-// -----------------------------------------------------------------------------
-//
-TInt RVmbxNumber::GetVmNumFromNamStore( TDes& aNumber, TInt aNumType )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromNamStore: =>" );
- TRequestStatus ret( KErrNotFound );
- RMobileNamStore namStore;
-
- ret = namStore.Open( iPhone );
- if ( ret != KErrNone )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromNamStore: \
- NameStore error %I, ret.Int()" );
- return ret.Int();
- }
-
- RMobileNamStore::TMobileNamStoreInfoV1 namInfo;
- RMobileNamStore::TMobileNamStoreInfoV1Pckg namInfoPckg( namInfo );
-
- namStore.GetInfo( ret, namInfoPckg );
- User::WaitForRequest( ret );
- if ( ret == KErrNone )
- {
- RMobileNamStore::TMobileNamEntryV1 namEntry;
- RMobileNamStore::TMobileNamEntryV1Pckg namEntryPckg( namEntry );
-
- namEntry.iNamId = namInfo.iActiveNam;
-
- switch ( aNumType )
- {
- case EVmbxMDN:
- {
- namEntry.iParamIdentifier = KVmNamStoreMDNId;
- break;
- }
- case EVmbxMIN:
- {
- namEntry.iParamIdentifier = KVmNamStoreMINId;
- break;
- }
- default:
- break;
- }
-
- namStore.Read( ret, namEntryPckg );
- User::WaitForRequest( ret );
- if ( ret == KErrNone )
- {
- ret = CnvUtfConverter::ConvertToUnicodeFromUtf8(
- aNumber, // Unicode
- namEntry.iData ); // Utf8
- }
- }
-
- if ( IsEmergencyNumberL( aNumber ) )
- {
- aNumber.Zero();
- ret = KErrNotFound;
- }
-
- namStore.Close();
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromNamStore: <=" );
- return ret.Int();
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::GetVmNumFromSD
-// Retrieves voice mailbox number from Shared Data
-// -----------------------------------------------------------------------------
-//
-TInt RVmbxNumber::GetVmNumFromSD( TDes& aNumber, TInt aLineNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromSD: =>" );
- TBuf< KVmbxMaxNumberLength > number;
- TInt ret( KErrNotFound );
-
- TUint32 keyword = aLineNumber ==
- EAlsLine1Entry?KVmbxNumberLinePrimary: KVmbxNumberLineAuxiliary;
- ret = iSession->Get( keyword, number );
-
- if ( !ret )
- {
- if ( number.Length() )
- {
- aNumber.Copy( number );
- }
- else
- {
- ret = KErrNotFound;
- }
- }
- if ( IsEmergencyNumberL( aNumber ) )
- {
- aNumber.Zero();
- ret = KErrNotFound;
- }
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmNumFromSD: <=" );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::CloseETel
-// Closes all ETel resources
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::CloseETel()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::CloseETel: =>" );
- iPhoneBook.Close();
-
- if ( iFlags & KVmFlagPhoneOpened )
- {
- iPhone.Close();
- }
-
- if ( iFlags & KVmFlagPhoneModuleLoaded )
- {
- iTelServer.UnloadPhoneModule( KMmTsyModuleName );
- }
- iTelServer.Close();
-
- // Clear corresponding flags
- iFlags &= ~KVmFlagSimReadSupport;
- iFlags &= ~KVmFlagSimWriteSupport;
- iFlags &= ~KVmFlagPhoneModuleLoaded;
- iFlags &= ~KVmFlagPhoneOpened;
- iFlags &= ~KVmFlagPhonebookBeingCached;
- VMBLOGSTRING( "VMBX: RVmbxNumber::CloseETel: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::AppendStrToArrayL
-// Appends string from resourse to descriptor array
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::AppendStrToArrayL( TInt aResourceId, CDesCArray& aArray )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::AppendStrToArrayL: =>" );
- HBufC* tmp = StringLoader::LoadLC( aResourceId, iCoeEnv );
- aArray.AppendL( *tmp );
- CleanupStack::PopAndDestroy( tmp );
- VMBLOGSTRING( "VMBX: RVmbxNumber::AppendStrToArrayL: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::SetHeaderFromResourceL
-// Set query dialog header text from resource string
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::SetHeaderFromResourceL( TInt aResourceId,
- CAknQueryDialog& aDlg )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SetHeaderFromResourceL: =>" );
- HBufC* headingText = StringLoader::LoadLC( aResourceId, iCoeEnv );
- aDlg.SetHeaderTextL( *headingText );
- CleanupStack::PopAndDestroy( headingText );
- VMBLOGSTRING( "VMBX: RVmbxNumber::SetHeaderFromResourceL: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::QueryAddressL
-// Fetches Voip address (returns ETrue when success)
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RVmbxNumber::QueryAddressL( TVmbxQueryType /*aQueryType*/,
- TDes& /*aNumber*/ )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryAddressL: =>" );
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryAddressL: METHOD NOT SUPPORTED ANYMORE" );
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryAddressL: <=" );
- return EFalse;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::SelectTypeL
-// Select which type of Vmbx
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt RVmbxNumber::SelectTypeL( TBool aTitle )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: =>" );
- if ( !AllowedToChangeTheNumber() && EVmbxDefine == aTitle )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: \
- Not Allow to define voice mail number" );
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: <=" );
- return EVmbxNone;
- }
-
- if ( VideoSupported() )
- {
- TInt index( 0 );
-
- RArray<TInt> vmbxTypeArray;
- CleanupClosePushL( vmbxTypeArray );
-
- iTypeSelectionQuery = CVmListQueryDialog::NewL( &index );
- iTypeSelectionQuery->PrepareLC( R_MAILBOX_LISTQUERY );
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: Not only Voice" );
-
- // Select which type voice mailbox number to call, CS or Video
- if ( EVmbxCall == aTitle )
- {
- // Set prompt
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: aTitle = call" );
-
- SetHeaderFromResourceL( R_CALLTO_LBX_PROMPT, *iTypeSelectionQuery );
-
- // Fill items to array
- CDesCArrayFlat* lbxItems =
- new (ELeave) CDesCArrayFlat( KVmLbxItemsArraySize );
- CleanupStack::PushL( lbxItems );
-
- TBuf<KVmbxMaxNumberLength> vmbxNumber;
-
- // Check CS number
- if ( KErrNone == GetVmbxNumber( vmbxNumber ) )
- {
- AppendStrToArrayL( R_CALLTO_LBX_CS_MAILBOX_ITEM, *lbxItems );
- User::LeaveIfError( vmbxTypeArray.Append( EVmbx ) );
- iType = EVmbx;
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: EVmbx" );
- }
- // Check Video number
- if ( VideoSupported() &&
- KErrNone == GetVideoMbxNumber( vmbxNumber ) )
- {
- AppendStrToArrayL( R_CALLTO_LBX_VIDEO_MAILBOX_ITEM,
- *lbxItems );
- User::LeaveIfError( vmbxTypeArray.Append( EVmbxVideo ) );
- iType = EVmbxVideo;
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: EVmbxVideo" );
- }
-
- iTypeSelectionQuery->SetItemTextArray( lbxItems );
- // vest ownership to lbx
- iTypeSelectionQuery->SetOwnershipType( ELbmOwnsItemArray );
- CleanupStack::Pop( lbxItems );
- }
- // Select which type of VMBX number to define, CS or Video
- else
- {
- // Set prompt
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: aTitle = define" );
-
- SetHeaderFromResourceL( R_DEFINE_VIDEO_OR_VOICE_LBX_PROMPT,
- *iTypeSelectionQuery );
-
- // Fill items to array
- CDesCArrayFlat* lbxItems =
- new (ELeave) CDesCArrayFlat( KVmLbxItemsArraySize );
- CleanupStack::PushL( lbxItems );
-
- AppendStrToArrayL( R_DEFINE_LBX_CS_MAILBOX_ITEM, *lbxItems );
- User::LeaveIfError( vmbxTypeArray.Append( EVmbx ) );
-
- if ( VideoSupported() )
- {
- AppendStrToArrayL( R_DEFINE_LBX_VIDEO_MAILBOX_ITEM,
- *lbxItems );
- User::LeaveIfError( vmbxTypeArray.Append( EVmbxVideo ) );
- }
-
- iTypeSelectionQuery->SetItemTextArray( lbxItems );
- // vest ownership to lbx
- iTypeSelectionQuery->SetOwnershipType( ELbmOwnsItemArray );
- CleanupStack::Pop( lbxItems );
- }
-
- VMBLOGSTRING2( "VMBX: RVmbxNumber::SelectTypeL array count %d",
- vmbxTypeArray.Count());
-
- if ( ( EVmbxCall == aTitle ) &&
- ( KVmbxOnlyDefinedOneNumber == vmbxTypeArray.Count() ) )
- {
- // call directly
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: Only one" );
- CleanupStack::PopAndDestroy( iTypeSelectionQuery );
- }
- else
- {
- if ( iTypeSelectionQuery->RunLD() )
- {
- iType = vmbxTypeArray[ index ];
- }
- else
- {
- iType = EVmbxNone;
- }
- }
-
- iTypeSelectionQuery = NULL;
- //close and destroy vmbxTypeArray
- CleanupStack::PopAndDestroy( &vmbxTypeArray );
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: <=" );
- return iType;
- }
- // Only supported CS
- else
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: <=" );
- return EVmbx;
- }
- }
-
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::SaveVmbxAddressL
-// Save voice mailbox address to RCSC
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt RVmbxNumber::SaveVmbxAddressL( TDes& /*aAddress*/ )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVmbxAddressL(TDes& aAddress): Method deprecated" );
- return KErrNotSupported;
- }
-
-
-// ----------------------------------------------------------------------------
-// RVmbxNumber::IsVoIPProfilesFound
-// Check if VoIP profiles is found.
-// ----------------------------------------------------------------------------
-//
-EXPORT_C TBool RVmbxNumber::IsVoIPProfilesFound()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsVoIPProfilesFound" );
-
- return iVmSpsHandler->IsVoIPProfilesFound();
- }
-
-
-EXPORT_C TBool RVmbxNumber::IsIpVoiceMailboxServices()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsIpVoiceMailboxServices: =>" );
-
- TBool ret( EFalse );
-
- if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) )
- {
- RArray<TUint> profileIds;
-
- GetServiceIds( profileIds );
-
- TInt count = profileIds.Count();
-
- profileIds.Close();
-
- if ( count > 0 )
- {
- ret = ETrue;
- }
- else
- {
- ret = EFalse;
- }
- }
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsIpVoiceMailboxServices: <=" );
- return ret;
- }
-
-// ----------------------------------------------------------------------------
-// RVmbxNumber::IsSimMemory
-// Returns if the memory location for vmbx is sim memory
-// ----------------------------------------------------------------------------
-//
-EXPORT_C TBool RVmbxNumber::IsSimMemory()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsSimMemory: =>" );
- TBool ret( EFalse );
- TInt alsLine( EAlsLine1 );
- // get the current ALS line
- if ( GetAlsLine( alsLine ) != KErrNone )
- {
- alsLine = EAlsLine1; // if problems, assume primary line
- }
- if ( iSimCardFound )
- {
- // if number automatically fetched from read only SIM
- // or ALS2 is active
- if ( ( !( iFlags & KVmFlagSimWriteSupport ) ) || EAlsLine2 == alsLine )
- {
- ret = ( !UserEditNumber( alsLine ) &&
- !IsPhoneMemForcedEdit( alsLine ) );
- }
- // if number stored in writable SIM
- else
- {
- ret = UsesSimMemory();
- }
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsSimMemory: <=" );
- VMBLOGSTRING3( "VMBX: RVmbxNumber::IsSimMemory: sim memory is used \
- iSimCardFound: %I, ret: %I", iSimCardFound, ret );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::GetVideoMbxNumber
-// Fetches the specified video mailbox number
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt RVmbxNumber::GetVideoMbxNumber( TDes& aNumber,
- TVmbxNumberEntry aEntry )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVideoMbxNumber: =>" );
- TInt ret = VideoSupported();
-
- if ( ret )
- {
- TInt lineNumber( aEntry );
- TBuf< KVmbxMaxNumberLength > number;
- if ( EAlsActiveLineEntry == aEntry )
- {
- // get the current ALS line
- if ( KErrNone != GetAlsLine( lineNumber ) )
- {
- lineNumber = EAlsLine1; // if problems, assume primary line
- }
- }
-
- TUint32 keyword = lineNumber ==
- EAlsLine1Entry ? KVideoMbxNumberLinePrimary : KVideoMbxNumberLineAuxiliary;
- ret = iSession->Get( keyword, number );
-
- if ( KErrNone == ret )
- {
- if ( number.Length() )
- {
- aNumber.Copy( number );
- }
- else
- {
- ret = KErrNotFound;
- }
- }
-
- if ( IsEmergencyNumberL( aNumber ) )
- {
- aNumber.Zero();
- ret = KErrNotFound;
- }
- }
- else
- {
- ret = KErrNotFound;
- }
- VMBLOGSTRING2( "VMBX: RVmbxNumber::GetVideoMbxNumber:<=\
- Video supported = %d", ret );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::QueryVideoMbxNumberL
-// Queries a video mailbox number
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TBool RVmbxNumber::QueryVideoMbxNumberL( TVmbxQueryType aQueryType,
- TDes& aNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryVideoMbxNumberL: =>" );
- TBool result( EFalse );
-
- __ASSERT_DEBUG( aNumber.MaxLength() >= KVmbxMaxNumberLength,
- User::Panic(KVmbxPanicCategory, EVmbxDescriptorTooSmall) );
- __ASSERT_DEBUG( aNumber.Length() <= KVmbxMaxNumberLength,
- User::Panic(KVmbxPanicCategory, EVmbxNumberTooLong) );
-
- if ( !AllowedToChangeTheNumber() )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryVideoMbxNumberL: \
- Video number not allowed to change" );
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryVideoMbxNumberL: <=" );
- User::Leave( KErrAccessDenied );
- }
-
- TBuf< KVmbxMaxNumberLength > number;
- TBool thisClosed( EFalse );
- // Close() sets thisClosed to ETrue
-
- FOREVER
- {
- number.Copy( aNumber );
-
- // get the correct query prompt from resource file
- HBufC* prompt = StringLoader::LoadLC(
- ( aQueryType == EVmbxNotDefinedQuery ?
- R_VIDEO_DEFINE_NUMBER_PROMPT :
- R_VIDEO_CHANGE_NUMBER_PROMPT),
- iCoeEnv );
-
- iClosedPtr = &thisClosed;
-
- // Convert output to accommodate the current locale
- AknTextUtils::LanguageSpecificNumberConversion( number );
-
- TInt ret; // return value of the query
- TBool searchUsed; // ETrue to open the query again after
- //closing single fetch dialog
-
- // enable search if number length is 0
- TBool searchEnabled( number.Length() ? EFalse : ETrue );
-
- do
- {
- // show query with the correct prompt
- iVideoQuery = CVmTextQueryDialog::NewL( number,
- *prompt, searchEnabled );
-
- ret = iVideoQuery->ExecuteLD( R_VMBX_NUMBER_QUERY );
-
- iVideoQuery = NULL;
- searchUsed = EFalse;
-
- if ( searchEnabled && ret && !number.Length() )
- {
- searchUsed = ETrue;
- // Show phonebook's single fetch dialog
- TRAPD( error, FetchNumberFromPhonebook2L( number ) );
-
- // user has pressed End Key
- if ( thisClosed )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryVideoMbxNumberL: \
- End key pressed" );
- CleanupStack::PopAndDestroy( prompt );
- return EFalse;
- }
-
- if ( error ) // Back pressed in Contact UI
- {
- // Now the phone book fetch dialog
- // was closed, get out of the loop
- ret = EFalse;
- break;
- }
- }
- } while( searchUsed );
-
- iClosedPtr = NULL;
-
- CleanupStack::PopAndDestroy( prompt );
-
- if ( ret )
- {
- if ( !number.Length() )
- {
- User::LeaveIfError( SaveVideoMbxNumber( number,
- EAlsActiveLineEntry ) );
- aNumber.Copy( number );
-
- // show "not defined" note
- ShowConfirmationNoteL( R_VIDEO_NOTE_EMPTY_NUMBER );
- result = ETrue;
- break;
- }
-
- // Convert back to western digits
- ConvertToWesternDigits( number );
-
- // check the given number here (emergency numbers not allowed)
- if ( IsValidPhoneNumber( number ) && !IsEmergencyNumberL( number ) )
- {
- TInt status = SaveVideoMbxNumber( number, EAlsActiveLineEntry );
-
- if ( status == KErrNone )
- {
- aNumber.Copy( number );
- ShowConfirmationNoteL( R_VIDEO_SAVED_NOTE );
- result = ETrue;
- break;
- }
- }
-
- if ( !result )
- {
- // show "invalid number" note and wait for a short timeout
- prompt = StringLoader::LoadLC( R_INVALID_NUMBER_NOTE, iCoeEnv );
-
- iClosedPtr = &thisClosed;
-
- CAknInformationNote* note =
- new( ELeave ) CAknInformationNote( ETrue );
- note->ExecuteLD( *prompt );
-
- iClosedPtr = NULL;
-
- CleanupStack::PopAndDestroy( prompt );
-
- if ( !thisClosed )
- {
- continue; // the number was invalid -> query again.
- }
- }
- }
- break; // user canceled the query
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::QueryVideoMbxNumberL: <=" );
- return result;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::SaveVideoMbxNumber
-// Saves the vmbx number. (in phone file system)
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt RVmbxNumber::SaveVideoMbxNumber( const TDesC& aNumber,
- TVmbxNumberEntry aEntry )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVideoMbxNumber: =>" );
- TInt error( KErrNone );
- __ASSERT_DEBUG( iFlags & KVmFlagOpened,
- User::Panic(KVmbxPanicCategory, EVmbxNotConnected) );
- __ASSERT_DEBUG( aNumber.Length() <= KVmbxMaxNumberLength,
- User::Panic(KVmbxPanicCategory, EVmbxNumberTooLong) );
-
- TInt lineNumber( aEntry );
- if ( aEntry == EAlsActiveLineEntry )
- {
- // get the current ALS line
- if ( GetAlsLine( lineNumber ) != KErrNone )
- {
- lineNumber = EAlsLine1; // if problems, assume primary line
- }
- }
- TUint32 keyword = lineNumber ==
- EAlsLine1Entry ? KVideoMbxNumberLinePrimary: KVideoMbxNumberLineAuxiliary;
-
- error = iSession->Set( keyword, aNumber );
- if ( !error )
- {
- // Client will generate the event itself on request.
- if ( iFlags & KVmFlagNotifyRequested )
- {
- HandleNotifyString( keyword, aNumber );
- }
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::SaveVideoMbxNumber: <=" );
- return error;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::IsUsimSupport
-// -----------------------------------------------------------------------------
-TBool RVmbxNumber::IsUsimSupport()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsUsimSupport: =>" );
- TBool ret( EFalse );
- TInt alsline( EAlsLine1 );
-
- // get the current ALS line
- if ( GetAlsLine( alsline ) != KErrNone )
- {
- alsline = EAlsLine1; // if problems, assume primary line
- }
-
- // SIM access not supported for ALS line2
- if ( FeatureManager::FeatureSupported( KFeatureIdProtocolWcdma ) &&
- ( alsline == EAlsLine1 ) )
- {
- TUint32 capability;
- TInt err = iPhone.GetIccAccessCaps( capability );
- VMBLOGSTRING3( "VMBX: RVmbxNumber::IsUsimSupport: Err = %I,\
- Capa = %I ", err, capability );
-
- if ( ( err == KErrNone ) &&
- ( capability & RMobilePhone::KCapsUSimAccessSupported ) )
- {
- VMBLOGSTRING( "USim access caps ok");
- ret = ETrue;
- }
- }
- else
- {
- ret = EFalse;
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsUsimSupport: <=" );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// Series 60 Customer / MSatRefreshOserver
-// Series 60 MSatRefreshObserver API
-// -----------------------------------------------------------------------------
-TBool RVmbxNumber::AllowRefresh(
- TSatRefreshType aType, const TSatRefreshFiles& aFiles )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::AllowRefresh: =>" );
- TBool allowRefresh( ETrue );
- if ( aType == EFileChangeNotification )
- {
- const TInt elFile1( aFiles.Locate( KMbdnEf ) );
- const TInt elFile2( aFiles.Locate( KMbiEf) );
-
- if ( ( KErrNotFound == elFile1) &&
- ( KErrNotFound == elFile2 ) )
- {
- allowRefresh = EFalse;
- }
-
- }
- else
- {
- allowRefresh = EFalse;
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::AllowRefresh: <=" );
- return allowRefresh;
- }
-
-// -----------------------------------------------------------------------------
-// Series 60 Customer / MSatRefreshOserver
-// Series 60 MSatRefreshObserver API
-// -----------------------------------------------------------------------------
- void RVmbxNumber::Refresh( TSatRefreshType aType,
- const TSatRefreshFiles& aFiles )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::Refresh: =>" );
- if ( aType == EFileChangeNotification )
- {
- const TInt elFile1( aFiles.Locate( KMbdnEf ) );
- const TInt elFile2( aFiles.Locate( KMbiEf ) );
-
- if ( ( KErrNotFound != elFile1) || ( KErrNotFound != elFile2 ) )
- {
- //do phone book getInfo
- TInt error( KErrNone );
- error = DoPhonebookOperation( EVmbxPhonebookGetInfo );
- if ( !error )
- {
- TVmbxEntry entry;
- entry.iIndex = 1;
- TInt ret = DoPhonebookOperation( EVmbxPhonebookRead, &entry );
-
- // Notify SAT Server that refresh initiated file read is done
- iRSatClient.RefreshEFRead( EFalse );
-
- if ( ( iNotifyCallBack ) && ( entry.iTelNumber.Length() > 0 )
- && ( iMemoryLocation == EVmbxSimMemory ) )
- {
- TInt notifyLine( 0 );
- TRAPD( err, iNotifyCallBack->HandleNotifyL( notifyLine,
- entry.iTelNumber ) );
- if ( err )
- {
- _LIT(KVmbxPanicType,"iNotifyCallBack->HandleNotifyL");
- User::Panic( KVmbxPanicType, err );
- }
- }
- }
- }
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::Refresh: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::MailboxNumbersIdentifiers
-// Gets identifiers of the records in sim from MBI-file in sim
-// -----------------------------------------------------------------------------
-//
-TInt RVmbxNumber::MailboxNumbersIdentifiers()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::MailboxNumbersIdentifiers: =>" );
- TRequestStatus status;
-
- // Get identifiers
- iPhone.GetMailboxNumbers( status, iPhoneVoicemailInfoPckg );
-
- // Wait for asynchronous call to finish
- User::WaitForRequest( status );
- VMBLOGSTRING2( "Identifier read status = %I", status.Int() );
- VMBLOGSTRING2( "iVoice value: %d", iPhoneVoicemailInfo.iVoice );
- VMBLOGSTRING( "VMBX: RVmbxNumber::MailboxNumbersIdentifiers: <=" );
- return status.Int();
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::MailboxNumbersIdentifiers
-// Gets identifiers of the records in sim from MBI-file in sim
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::TestAndSetSimAccessFlags()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::TestAndSetSimAccessFlags: =>" );
- // Caps are not valid for read-only Sim, so check if writing
- // to sim fails.
- // Assume that a number exist
- iNoNumberFound = EFalse;
- TBool isTestNumberUsed = EFalse;
- // read sim data first
- TVmbxEntry entry;
- entry.iIndex = EAlsLine1;
-
- TInt readError = DoPhonebookOperation( EVmbxPhonebookRead, &entry );
-
- // KErrNotFound is returned when number length is zero, then
- // testnumber is used to test write support
- if ( readError == KErrNone || readError == KErrNotFound )
- {
- // save number for later use
- if ( entry.iTelNumber.Length() )
- {
- iNumberFromSim.Copy( entry.iTelNumber );
- }
- // number not found, test with testnumber
- else if ( entry.iTelNumber.Length() == 0 )
- {
- // no number found
- iNoNumberFound = ETrue;
- VMBLOGSTRING( "Use test number for testing write support" );
- entry.iTelNumber.Copy( KTestNumber ) ;
- isTestNumberUsed = ETrue;
- }
-
- VMBLOGSTRING( "Try writing" );
-
- TInt writeError = DoPhonebookOperation( EVmbxPhonebookWrite, &entry );
- VMBLOGSTRING2( "Write: %I", writeError );
-
- // write error, set write flag to not supported
- // and phone memory in use
- if ( writeError )
- {
- VMBLOGSTRING( "WriteAccess not ok" );
- iFlags &= ~KVmFlagSimWriteSupport;
- }
- // tested with and sim has write access so delete test number from sim
- else if ( isTestNumberUsed && writeError == KErrNone )
- {
- VMBLOGSTRING( "Remove test number from sim" );
- DoPhonebookOperation( EVmbxPhonebookDelete, &entry );
- }
- }
- // read error, set read and write flag to not supported
- // and phone memory in use
- else
- {
- VMBLOGSTRING( "ReadAccess not ok" );
- iFlags &= ~KVmFlagSimReadSupport;
-
- VMBLOGSTRING( "WriteAccess not ok" );
- iFlags &= ~KVmFlagSimWriteSupport;
- // The first USim phonebook type is tested,
- // keep memorylocation unchanged
- if ( iUSimFirstRoundTest )
- {
- VMBLOGSTRING2( "iMemoryLocation = %d", iMemoryLocation );
- iUSimFirstRoundTest = EFalse;
- }
- else
- {
- iMemoryLocation = EVmbxPhoneMemory;
- iSession->Set( KVmUsesSimMemory, EVmbxPhoneMemory );
- VMBLOGSTRING2( "iMemoryLocation = %d", iMemoryLocation );
- }
- }
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::TestAndSetSimAccessFlags: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::MailboxNumbersIdentifiers
-// Gets identifiers of the records in sim from MBI-file in sim
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::CalculateActualMaxLengthOnSim( TInt aSimNumberLength )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::CalculateActualMaxLength: =>" );
- VMBLOGSTRING2("iPhoneBookInfo.iMaxNumLength = %I", iPhoneBookInfo.iMaxNumLength );
- VMBLOGSTRING2("aSimNumberLength = %I", aSimNumberLength );
-
- // If max length is less than 20 or -1 returned, then
- // max length must be detemined from number length that is
- // saved on sim.
- if ( iPhoneBookInfo.iMaxNumLength == KVmExtFileSize ||
- iPhoneBookInfo.iMaxNumLength == -1 )
- {
- // number on sim is less than 21
- if ( aSimNumberLength <= KVmExtFileSize )
- {
- iPhoneBookInfo.iMaxNumLength = KVmExtFileSize;
- }
- // number on sim is more than 20 but less than 40
- else if ( KVmExtFileSize < aSimNumberLength &&
- aSimNumberLength <= KVmPhoneNumDigitsMaxLength )
- {
- iPhoneBookInfo.iMaxNumLength = KVmPhoneNumDigitsMaxLength;
- }
- // number on sim is more than 40
- else
- {
- iPhoneBookInfo.iMaxNumLength = KVmMaxStoreSize;
- }
- }
- // If max length is 40, and number length on sim is more
- // than 20 but less than 41, then 48 is available on sim.
- else if ( iPhoneBookInfo.iMaxNumLength == KVmPhoneNumDigitsMaxLength &&
- KVmExtFileSize < aSimNumberLength &&
- aSimNumberLength <= KVmPhoneNumDigitsMaxLength )
- {
- iPhoneBookInfo.iMaxNumLength = KVmMaxStoreSize;
- }
- VMBLOGSTRING2("iPhoneBookInfo.iMaxNumLength = %I", iPhoneBookInfo.iMaxNumLength );
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::CalculateActualMaxLength: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::VideoSupported
-// Returns video support state
-// -----------------------------------------------------------------------------
-//
-TBool RVmbxNumber::VideoSupported()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::VideoSupported: =>" );
-
- TBool supported( EFalse );
-
- if ( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) )
- {
- TInt result = iSession->Get( KVideoMbxSupport, supported );
- if ( result != KErrNone )
- {
- supported = EFalse;
- }
- }
-
- VMBLOGSTRING2("VMBX: RVmbxNumber::VideoSupported: supported = %d", supported );
- return supported;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::GetVmbxAddressL
-// Retrieves voice mailbox address from RCSC
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt RVmbxNumber::GetVmbxAddressL( TDes& /*aAddress*/ )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxAddressL(TDes& aAddress): Method deprecated" );
- VMBLOGSTRING( "Use GetVmbxAddressL(TDes& aAddress, TUint aServiceId) instead" );
-
- return KErrNotSupported;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::GetVmbxAddress
-// Retrieves voice mailbox address from SPS
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt RVmbxNumber::GetVmbxAddress( TDes& aAddress, TUint aServiceId )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxAddress: =>" );
- TInt ret( KErrNotSupported );
-
- if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) )
- {
- TVmbxServiceInfo serviceInfo;
- serviceInfo.iServiceId = aServiceId;
- ret = GetServiceInfo( serviceInfo );
- VMBLOGSTRING2( "VMBX: RVmbxNumber::GetVmbxAddress: error: %d", ret );
- if ( KErrNone == ret )
- {
- if ( serviceInfo.iAddress.Length() > aAddress.MaxLength() )
- {
- ret = KErrOverflow;
- }
- else
- {
- aAddress.Copy( serviceInfo.iAddress );
- }
- }
- VMBLOGSTRING2( "VMBX: RVmbxNumber::GetVmbxAddress: error: %d", ret );
- }
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetVmbxAddress: <=" );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::SelectTypeL
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt RVmbxNumber::SelectTypeL( TBool aTitle, TUint& aServiceId )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: =>" );
-
- if ( !AllowedToChangeTheNumber() && EVmbxDefine == aTitle )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: \
- Not Allow to define voice mail number" );
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: <=" );
- return EVmbxNone;
- }
-
- if ( EVmbxCall != aTitle )
- {
- User::Leave( KErrNotSupported );
- }
- // the sum of defined numbers
- TInt definedNumber( 0 );
- TInt definedFlag( 0 );
- CheckDefinedNumberCountL(definedNumber, definedFlag, aServiceId );
-
- // Pop up selection dialog only if there are more than 2 defined numbers
- if ( KMailBoxLimitForPrompt < definedNumber )
- {
- TInt index( 0 );
- // Clear the old service information
- iVmbxServiceSelection.Reset();
-
- // Create selection list query and show it.
- iTypeSelectionQuery = new (ELeave) CAknListQueryDialog( &index );
- iTypeSelectionQuery->PrepareLC( R_VOIP_REL2_2_CALL_TO );
-
- // Create descriptor array for connection networks, connection networks
- // icons and load connection network images to memory..
- CDesCArrayFlat* lbxItems =
- new (ELeave) CDesCArrayFlat( KVmLbxItemsArraySize );
- CleanupStack::PushL( lbxItems );
- CArrayPtr<CGulIcon>* icons =
- new (ELeave) CAknIconArray( KVmLbxItemsArraySize );
- CleanupStack::PushL( icons );
-
- ConstructDefaultIconsL( icons );
-
- // Create final list box item data.
- TBuf<512> queryItem( KNullDesC );
- if( definedFlag & KVmFlagCSNumberDefined )
- {
- HBufC* csName = StringLoader::LoadLC( R_CALLTO_LBX_CS_MAILBOX_ITEM,
- iCoeEnv );
- queryItem.Format( KQueryItemFormat, 0, csName );
- CleanupStack::PopAndDestroy( csName );
-
- // Append text to the item array.
- lbxItems->AppendL( queryItem );
- // CS's hardcoded service value is 1
- User::LeaveIfError( iVmbxServiceSelection.Append(
- TVmbxServiceSelection( EVmbx, 1 ) ) );
- }
-
- if( definedFlag & KVmFlagVideoNumberDefined )
- {
- HBufC* videoName =
- StringLoader::LoadLC( R_CALLTO_LBX_VIDEO_MAILBOX_ITEM,
- iCoeEnv );
- // Create final list box item data.
- queryItem.Format( KQueryItemFormat, 1, videoName );
- CleanupStack::PopAndDestroy( videoName );
-
- // Append text to the item array.
- lbxItems->AppendL( queryItem );
- // Video's hardcoded service value is 1
- User::LeaveIfError( iVmbxServiceSelection.Append(
- TVmbxServiceSelection( EVmbxVideo, 1 ) ) );
- }
- if( definedFlag & KVmFlagVoIpNumberDefined )
- {
- // Get all Service Ids
- RArray<TUint> profileIds;
- CleanupClosePushL( profileIds );
- GetServiceIds( profileIds );
-
- for ( TInt i( 0 ); i < profileIds.Count(); i++ )
- {
- TVmbxServiceInfo serviceInfo;
- serviceInfo.iServiceId = profileIds[ i ];
- GetServiceInfo( serviceInfo );
-
- HBufC* voipName = HBufC::NewLC( serviceInfo.iName.Length() );
- voipName->Des().Copy( serviceInfo.iName );
-
- TInt iconId( KErrNotFound );
- TRAPD( error, AddBrandIconL( icons, profileIds[ i ], iconId ) );
-
- // If branded icon is not available, use hardcoded value 2 which is
- // default VoIP icons value
- if ( KErrNone != error || KErrNotFound == iconId )
- {
- iconId = 2;
- }
-
- // Create final list box item data.
- queryItem.Format( KQueryItemFormat, iconId, voipName );
- CleanupStack::PopAndDestroy( voipName );
-
- //Append text to the item array.
- lbxItems->AppendL( queryItem );
- User::LeaveIfError( iVmbxServiceSelection.Append(
- TVmbxServiceSelection( EVmbxIP, serviceInfo.iServiceId ) ) );
- }
-
- CleanupStack::PopAndDestroy( &profileIds );
- }
-
- iTypeSelectionQuery->SetIconArrayL( icons );
- iTypeSelectionQuery->SetItemTextArray( lbxItems );
- iTypeSelectionQuery->SetOwnershipType( ELbmOwnsItemArray );
-
- CleanupStack::Pop( icons );
- CleanupStack::Pop( lbxItems );
-
- if ( iTypeSelectionQuery->RunLD() )
- {
- TVmbxServiceSelection serviceType = iVmbxServiceSelection[ index ];
- iType = serviceType.iServiceType;
- aServiceId = serviceType.iServiceId;
- VMBLOGSTRING2( "VMBX: RVmbxNumber::VoIP vmbx with service id %d selected", aServiceId );
- }
- else
- {
- iType = EVmbxNone;
- aServiceId = 0;
- }
- iTypeSelectionQuery = NULL;
- }
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::SelectTypeL: <=" );
- return iType;
- }
-// -----------------------------------------------------------------------------
-// RVmbxNumber::CheckDefinedNumberCountL
-//
-// -----------------------------------------------------------------------------
-//
-TInt RVmbxNumber::CheckDefinedNumberCountL( TInt& aDefinedNumber,
- TInt& aDefinedFlag, TUint& aServiceId )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::CheckDefinedNumberCountL: =>" );
- iType = EVmbxNone;
- aServiceId = KDefaultServiceId;
- // the sum of defined numbers
- TInt definedNumber( KDefaultDefinedNumberCount );
- TInt definedServiceTypes( 0 );
- TInt definedFlag( 0 );
-
- TBuf<KVmbxMaxNumberLength> tmpNumber(KNullDesC);
-
- // First check what mailboxes are defined.
- // Skip querying if only one mailbox with number/address defined.
- // 1. Get voice number
- if ( KErrNone == GetVmbxNumber( tmpNumber ) )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::CheckDefinedNumberCountL: CS vmbx number defined");
- definedNumber++;
- definedServiceTypes++;
- iType = EVmbx;
- aServiceId = KCSorVideoServiceId;
- definedFlag |= KVmFlagCSNumberDefined;
- }
-
- // 2. Get video number
- if ( VideoSupported() && KErrNone == GetVideoMbxNumber( tmpNumber ) )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::CheckDefinedNumberCountL: Video mbx number defined");
- definedNumber++;
- definedServiceTypes++;
- if( KMailBoxLimitForPrompt == definedNumber)
- {
- iType = EVmbxVideo;
- }
- aServiceId = KCSorVideoServiceId;
- definedFlag |= KVmFlagVideoNumberDefined;
- }
-
- // 3. Get count of all Service Ids of VoIP
- RArray<TUint> profileIds;
- CleanupClosePushL( profileIds );
-
- if ( KErrNone == GetServiceIds( profileIds ) )
- {
- TInt idCount( profileIds.Count() );
- VMBLOGSTRING2( "VMBX: RVmbxNumber::CheckDefinedNumberCountL: %d IP vmbx services defined", idCount );
-
- if ( idCount )
- {
- definedNumber += idCount;
- definedServiceTypes++;
- // If only VoIP and only one service support Vmbx,
- // then use it directly without prompting.
- if ( KMailBoxLimitForPrompt == definedNumber )
- {
- iType = EVmbxIP;
- aServiceId = profileIds[ 0 ];
- }
- definedFlag |= KVmFlagVoIpNumberDefined;
- }
- }
-
- CleanupStack::PopAndDestroy( &profileIds );
- aDefinedNumber = definedNumber;
- aDefinedFlag = definedFlag;
- VMBLOGSTRING2( "VMBX: RVmbxNumber::CheckDefinedNumberCountL: definedNumber = %d",
- definedNumber );
- VMBLOGSTRING( "VMBX: RVmbxNumber::CheckDefinedNumberCountL: <=" );
-
- if ( 1 < definedServiceTypes )
- {
- iType = EVmbxNone;
- }
- return iType;
- }
-
-// ----------------------------------------------------------------------------
-// RVmbxNumber::GetServiceIds
-//
-// ----------------------------------------------------------------------------
-//
-EXPORT_C TInt RVmbxNumber::GetServiceIds( RArray<TUint>& aProfileIds )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetServiceIds: =>" );
- TInt ret( KErrNotFound );
- if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) )
- {
- TRAP( ret, iVmSpsHandler->GetServiceIdsL( aProfileIds ) );
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetServiceIds: <=" );
- return ret;
- }
-
-// ----------------------------------------------------------------------------
-// RVmbxNumber::GetServiceInfo
-//
-// ----------------------------------------------------------------------------
-//
-EXPORT_C TInt RVmbxNumber::GetServiceInfo( TVmbxServiceInfo& aServiceInfo )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetServiceInfo: =>" );
- TInt ret( KErrNotFound );
- if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) )
- {
- ret = iVmSpsHandler->GetServiceInfo( aServiceInfo );
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetServiceInfo: <=" );
- return ret;
- }
-
-// ----------------------------------------------------------------------------
-// RVmbxNumber::NotifyServiceChange
-//
-// ----------------------------------------------------------------------------
-//
-EXPORT_C void RVmbxNumber::NotifyServiceChange(
- MServiceNotifyHandler* aHandler )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyServiceChange: =>" );
-
- if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) )
- {
- iVmSpsHandler->NotifyServiceChange( aHandler );
- }
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyServiceChange: <=" );
- }
-
-// ----------------------------------------------------------------------------
-// RVmbxNumber::NotifyServiceChangeCancel
-//
-// ----------------------------------------------------------------------------
-//
-EXPORT_C void RVmbxNumber::NotifyServiceChangeCancel()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyServiceChangeCancel: =>" );
-
- if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) )
- {
- iVmSpsHandler->NotifyServiceChangeCancel();
- }
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::NotifyServiceChangeCancel: <=" );
- }
-
-// ----------------------------------------------------------------------------
-// RVmbxNumber::BrandIdL
-//
-// ----------------------------------------------------------------------------
-//
-EXPORT_C void RVmbxNumber::BrandIdL( TInt aServiceId, TDes8& aBrandId )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::BrandIdL: =>" );
-
- if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) )
- {
- iVmSpsHandler->BrandIdL( aServiceId, aBrandId );
- }
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::BrandIdL: <=" );
- }
-
-// ----------------------------------------------------------------------------
-// RVmbxNumber::GetBrandedIconL
-//
-// ----------------------------------------------------------------------------
-//
-EXPORT_C void RVmbxNumber::GetBrandedIconL(
- const TDesC8& aBrandingId,
- CFbsBitmap*& aBrandedBitmap,
- CFbsBitmap*& aBrandedBitmapMask )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetBrandedIconL: =>" );
-
- iVmBsHandler->GetBrandedIconL(
- aBrandingId, aBrandedBitmap, aBrandedBitmapMask );
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::GetBrandedIconL: <=" );
- }
-
-// ----------------------------------------------------------------------------
-// RVmbxNumber::ConstructDefaultIconsL
-//
-// ----------------------------------------------------------------------------
-//
-EXPORT_C void RVmbxNumber::ConstructDefaultIconsL(
- CArrayPtr<CGulIcon>* aIcons )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::ConstructDefaultIconsL: =>" );
-
- CFbsBitmap* bitmap;
- CFbsBitmap* mask;
-
- //Get the mbm file path
- TFileName mbmfile( KVmMbmDrive );
- mbmfile.Append( KDC_APP_BITMAP_DIR );
- mbmfile.Append( KVmLibMbmFile );
-
- //default CS icon
- AknIconUtils::CreateIconL( bitmap, mask, mbmfile,
- EMbmVmQgn_prop_nrtyp_mobile,
- EMbmVmQgn_prop_nrtyp_mobile_mask );
-
- aIcons->AppendL( CGulIcon::NewL( bitmap, mask ) );
-
- //default Video icon
- AknIconUtils::CreateIconL( bitmap, mask, mbmfile,
- EMbmVmQgn_prop_nrtyp_video,
- EMbmVmQgn_prop_nrtyp_video_mask );
-
- aIcons->AppendL( CGulIcon::NewL( bitmap, mask ) );
-
- //default VoIP icon
- AknIconUtils::CreateIconL( bitmap, mask, mbmfile,
- EMbmVmQgn_prop_nrtyp_voip,
- EMbmVmQgn_prop_nrtyp_voip_mask );
-
- aIcons->AppendL( CGulIcon::NewL( bitmap, mask ) );
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::ConstructDefaultIconsL: <=" );
- }
-// -----------------------------------------------------------------------------
-// RVmbxNumber::AddBrandIconL
-//
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::AddBrandIconL(
- CArrayPtr<CGulIcon>* aIcons,
- TUint aServiceId,
- TInt& aIconId )
- {
- // Set branding icon to context pane if available.
- TBuf8<KVmSettingsUiBrandingIdLength> brandId( KNullDesC8 );
-
- BrandIdL( aServiceId, brandId );
-
- CFbsBitmap* brandedBitmap = NULL;
- CFbsBitmap* brandedBitmapMask = NULL;
-
- // Get branded bitmap
- TRAPD( err, GetBrandedIconL( brandId, brandedBitmap, brandedBitmapMask ) );
-
- if ( KErrNone == err )
- {
- // The count of list icons(before adding branding icon to the list)
- // must be the branded icon list id
- aIconId = aIcons->Count();
- // Create new icon and add it to the icon list
- aIcons->AppendL( CGulIcon::NewL( brandedBitmap, brandedBitmapMask ) );
- }
- else
- {
- delete brandedBitmap;
- delete brandedBitmapMask;
- }
- }
-
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::VmbxNumDefInPhoneMemory
-// Checks is VMBX number defined in phone memory
-// -----------------------------------------------------------------------------
-//
-TBool RVmbxNumber::VmbxNumDefInPhoneMemory( TInt aLineNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::VmbxNumDefInPhoneMemory: =>" );
- TBool numDefined( EFalse );
- TBuf< KVmbxMaxNumberLength > number;
- TUint32 lineNumber = aLineNumber ==
- EAlsLine1 ? KVmbxNumberLinePrimary: KVmbxNumberLineAuxiliary;
-
- if ( KErrNone == iSession->Get( lineNumber, number ) )
- {
- if ( aLineNumber == EAlsLine1 )
- {
- if ( iMemoryLocation == EVmbxPhoneMemory &&
- number.Length() )
- {
- numDefined = ETrue;
- }
- }
- else if ( aLineNumber == EAlsLine2 && number.Length() )
- {
- numDefined = ETrue;
- }
- }
-
- VMBLOGSTRING2("VMBX: RVmbxNumber::VmbxNumDefInPhoneMemory: numDefined = %d",
- numDefined );
- return numDefined;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::NumStoredInPhone
-// Checks is the given number stored in phone memory
-// -----------------------------------------------------------------------------
-//
-TBool RVmbxNumber::NumStoredInPhone( const TDesC& aNumber, TInt aLineNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::NumStoredInPhone: =>" );
- TBool numStoredInPhone( EFalse );
- TBuf< KVmbxMaxNumberLength > number;
- TUint32 lineNumber = aLineNumber ==
- EAlsLine1 ? KVmbxNumberLinePrimary : KVmbxNumberLineAuxiliary;
-
- if ( KErrNone == iSession->Get( lineNumber, number ) )
- {
- if ( !( number.Compare( aNumber ) ) )
- {
- numStoredInPhone = ETrue;
- }
- }
-
- VMBLOGSTRING2( "VMBX: RVmbxNumber::NumStoredInPhone: numStoredInPhone = %d",
- numStoredInPhone );
- return numStoredInPhone;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::BackUpSimNumber
-// Saves VMBX number to the backup store
-// -----------------------------------------------------------------------------
-//
-TInt RVmbxNumber::BackUpSimNumber( const TDesC& aNumber, TInt aLineNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::BackUpSimNumber: =>" );
- TUint32 lineNumber = aLineNumber == EAlsLine1 ?
- KVmbxTmpNumberLinePrimary : KVmbxTmpNumberLineAuxiliary;
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::BackUpSimNumber: <=" );
- return ( iSession->Set( lineNumber, aNumber ));
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::FetchSimNumberBackUp
-// Fetches VMBX number from backup store
-// -----------------------------------------------------------------------------
-//
-TInt RVmbxNumber::FetchSimNumberBackUp( TDes& aNumber, TInt aLineNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::FetchSimNumberBackUp: =>" );
- TUint32 lineNumber = aLineNumber == EAlsLine1 ?
- KVmbxTmpNumberLinePrimary : KVmbxTmpNumberLineAuxiliary;
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::FetchSimNumberBackUp: <=" );
- return ( iSession->Get( lineNumber, aNumber ));
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::ClearVMBXNumberFromPhone
-// Fetches VMBX number from backup store
-// -----------------------------------------------------------------------------
-//
-TInt RVmbxNumber::ClearVMBXNumberFromPhone( TInt aLineNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::ClearVMBXNumberFromPhone: =>" );
-
- TInt error( KErrNone );
-
- if ( aLineNumber == EAlsLine1 )
- {
- error = SaveVmbxNumberToPhone( KEmptyVoiceMailNumber, EAlsLine1Entry );
- if ( KErrNone == error &&
- ( KErrNone == iSession->Set( KVmUsesSimMemory, EVmbxSimMemory ) ) )
- {
- iMemoryLocation = EVmbxSimMemory;
- VMBLOGSTRING(
- "VMBX: RVmbxNumber::ClearVMBXNumberFromPhone: Line 1" );
- }
- }
- else if ( aLineNumber == EAlsLine2 )
- {
- error = SaveVmbxNumberToPhone( KEmptyVoiceMailNumber, EAlsLine2Entry );
- if ( KErrNone == error )
- {
- VMBLOGSTRING(
- "VMBX: RVmbxNumber::ClearVMBXNumberFromPhone: Line 2");
- }
- }
- else
- {
- error = KErrArgument;
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::ClearVMBXNumberFromPhone: <=" );
- return error;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::UserEditNumber
-// Indicates if user has edited VMBX number
-// -----------------------------------------------------------------------------
-//
-TBool RVmbxNumber::UserEditNumber( TInt aLineNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::UserEditNumber: =>" );
- TBool nbrEdited( EFalse );
-
- TUint32 lineNumber = aLineNumber == EAlsLine1 ?
- KUserEditedNumber : KUserEditedNumberAuxiliary;
-
- iSession->Get( lineNumber, nbrEdited );
-
- VMBLOGSTRING2( "VMBX: RVmbxNumber::UserEditNumber: result = %d",
- nbrEdited );
- return EVmbxUserEdit == nbrEdited;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::SetUserEditNumber
-// Sets the flag indicating that the user has edited VMBX number
-// -----------------------------------------------------------------------------
-//
-TInt RVmbxNumber::SetUserEditNumber( TInt aLineNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SetUserEditNumber: =>" );
-
- TUint32 lineNumber = aLineNumber == EAlsLine1 ?
- KUserEditedNumber : KUserEditedNumberAuxiliary;
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::SetUserEditNumber: <=" );
- return ( iSession->Set( lineNumber, EVmbxUserEdit ) );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::ResetUserEditNumber
-// Resets the flag that indicates that the user has edited VMBX number
-// -----------------------------------------------------------------------------
-//
-TInt RVmbxNumber::ResetUserEditNumber( TInt aLineNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::ResetUserEditNumber: =>" );
-
- TUint32 lineNumber = aLineNumber == EAlsLine1 ?
- KUserEditedNumber : KUserEditedNumberAuxiliary;
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::ResetUserEditNumber: <=" );
- return ( iSession->Set( lineNumber, EVmbxNotUserEdit ) );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::UseSimNumIfAvailable
-// Fetches VMBX number stored in SIM if number is available
-// -----------------------------------------------------------------------------
-//
-TBool RVmbxNumber::UseSimNumIfAvailable( TDes& aNumber, TInt aLineNumber )
- {
- TBuf< KVmbxMaxNumberLength > number;
- TBool ret( EFalse );
- TInt error( KErrNone );
- TVmbxNumberEntry numberEntry = aLineNumber == EAlsLine1 ?
- EAlsLine1Entry : EAlsLine2Entry;
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::UseSimNumIfAvailable: =>" );
-
- // If readonly SIM which supports VMBX number
- // number is fetched from the backup store
- if ( ( !( iFlags & KVmFlagSimWriteSupport ) && ( iFlags & KVmFlagSimVmbxNumSupport ) )
- && ( ( aLineNumber == EAlsLine1 && EVmbxPhoneMemory == iMemoryLocation ) ||
- aLineNumber == EAlsLine2 ) )
- {
- error = FetchSimNumberBackUp( number, aLineNumber );
- if ( KErrNone == error )
- {
- aNumber.Copy( number );
- SaveVmbxNumberToPhone( aNumber, numberEntry );
- VMBLOGSTRING(
- "VMBX: RVmbxNumber::UseSimNumIfAvailable: number from backup store" );
- ret = ETrue;
- }
- }
- // If writable SIM which supports VMBX number
- // number is fetched from SIM
- else if ( iFlags & KVmFlagSimWriteSupport &&
- ( ( aLineNumber == EAlsLine1 && EVmbxPhoneMemory == iMemoryLocation ) ||
- aLineNumber == EAlsLine2 ) )
- {
- error = GetVmNumFromSIM( number, aLineNumber );
- if ( KErrNone == error )
- {
- aNumber.Copy( number );
- if ( EAlsLine1 == aLineNumber )
- {
- iMemoryLocation = EVmbxSimMemory;
- iSession->Set( KVmUsesSimMemory, EVmbxSimMemory );
- }
- VMBLOGSTRING(
- "VMBX: RVmbxNumber::UseSimNumIfAvailable: number from SIM" );
- ret = ETrue;
- }
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::UseSimNumIfAvailable: <=" );
- return ret;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::HandleNumberStores
-// Handles the updating of a number stores in phone memory
-// -----------------------------------------------------------------------------
-//
-TInt RVmbxNumber::HandleNumberStores( TInt aLineNumber )
- {
- TInt error( KErrNone );
- TBuf< KVmbxMaxNumberLength > line2number;
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNumberStores: =>" );
-
- if ( iNumberFromSim.Length() )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNumberStores: Sim number found" );
- // If number found in read only SIM
- // backup is made
- if ( !( iFlags & KVmFlagSimWriteSupport ) )
- {
- if ( aLineNumber == EAlsLine2 )
- {
- error = GetVmNumFromSIM( line2number, EAlsLine2Entry );
- if ( KErrNone == error )
- {
- error = BackUpSimNumber( line2number, aLineNumber );
- VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNumberStores: Back up ALS 2 Sim number " );
- }
- }
- else
- {
- error = BackUpSimNumber( iNumberFromSim, aLineNumber );
- VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNumberStores: Back up ALS 1 Sim number" );
- }
- }
- // If number found in SIM, old stored number is erased if
- // it's not defined by the user or updated via external clients
- if ( !UserEditNumber( aLineNumber ) &&
- !IsPhoneMemForcedEdit( aLineNumber ) )
- {
- ClearVMBXNumberFromPhone( EAlsLine1 );
- ClearVMBXNumberFromPhone( EAlsLine2 );
- VMBLOGSTRING( "[VMBX]: RVmbxNumber::HandleNumberStores: Clear old VMBX number" );
- }
- }
- else
- {
- // Changing or defining the number from UI (user) not allowed
- if ( !UserEditNumber( aLineNumber )
- && !IsPhoneMemForcedEdit( aLineNumber ) )
- {
- ClearVMBXNumberFromPhone( EAlsLine1 );
- ClearVMBXNumberFromPhone( EAlsLine2 );
- VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNumberStores: Clear old VMBX number" );
- }
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::HandleNumberStores: <=" );
- return error;
- }
-
-// ----------------------------------------------------------------------------
-// RVmbxNumber::UsesSimMemory
-// Returns if the SIM memory is used on ALS 1
-// ----------------------------------------------------------------------------
-//
-TBool RVmbxNumber::UsesSimMemory()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::UsesSimMemory: =>" );
- TBool ret( EFalse );
- TInt alsline( EAlsLine1 );
- // get the current ALS line
- if ( GetAlsLine( alsline ) != KErrNone )
- {
- alsline = EAlsLine1; // if problems, assume primary line
- }
-
- iSession->Get( KVmUsesSimMemory, iMemoryLocation );
- if ( ( iMemoryLocation == EVmbxSimMemory ) && ( alsline == EAlsLine1 ) )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::UsesSimMemory: SimMemory active" );
- ret = ETrue;
- }
- VMBLOGSTRING( "VMBX: RVmbxNumber::UsesSimMemory: <=" );
- return ret;
- }
-
-// ----------------------------------------------------------------------------
-// RVmbxNumber::IsPhoneMemForcedEdit
-// Returns if VMBX number stored in phone memory via external clients
-// ----------------------------------------------------------------------------
-//
-TBool RVmbxNumber::IsPhoneMemForcedEdit( const TInt aLineNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber:: IsPhoneMemForcedEdit: =>" );
- TInt nbrEdited( NULL );
-
- TUint32 lineNumber = aLineNumber == EAlsLine1 ?
- KUserEditedNumber : KUserEditedNumberAuxiliary;
-
- iSession->Get( lineNumber, nbrEdited );
-
- VMBLOGSTRING2( "VMBX: RVmbxNumber:: IsPhoneMemForcedEdit: value = %d",
- nbrEdited );
- return EvmbxPhoneMemForcedEdit == nbrEdited;
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::SetPhoneMemForcedEdit
-// Sets the flag indicating that external clients have edited VMBX number
-// -----------------------------------------------------------------------------
-//
-TInt RVmbxNumber::SetPhoneMemForcedEdit( TInt aLineNumber )
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::SetPhoneMemForcedEdit: =>" );
-
- TUint32 lineNumber = aLineNumber == EAlsLine1 ?
- KUserEditedNumber : KUserEditedNumberAuxiliary;
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::SetPhoneMemForcedEdit: <=" );
- return iSession->Set( lineNumber, EvmbxPhoneMemForcedEdit );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::ShowInformationNoteL
-// Shows information note to user
-// -----------------------------------------------------------------------------
-//
-void RVmbxNumber::ShowInformationNoteL( const TInt aResourceId ) const
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::ShowInformationNoteL: =>" );
- HBufC* prompt = StringLoader::LoadLC( aResourceId, iCoeEnv );
-
- CAknInformationNote* note = new ( ELeave ) CAknInformationNote ( ETrue );
- note->ExecuteLD( *prompt );
-
- CleanupStack::PopAndDestroy( prompt );
- VMBLOGSTRING( "VMBX: RVmbxNumber::ShowInformationNoteL: <=" );
- }
-
-// -----------------------------------------------------------------------------
-// RVmbxNumber::IsNoNumberNoteAllowed
-// check whether the note should be shown
-// -----------------------------------------------------------------------------
-//
-TBool RVmbxNumber::IsNoNumberNoteAllowed()
- {
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsNoNumberNoteAllowed: =>" );
- TBool result( EFalse );
-
- TInt videoRet( KErrNotFound );
- TBool isVideoSupport( VideoSupported() );
- TBool isVoipSupport( IsIpVoiceMailboxServices() );
- TBool psAddressFound( EFalse );
-
- if ( isVideoSupport )
- {
- HBufC* tmpNumber = HBufC::New( KVmbxMaxNumberLength );
- if ( tmpNumber )
- {
- TPtr tmpPrt( tmpNumber->Des() );
- videoRet = GetVideoMbxNumber( tmpPrt );
- VMBLOGSTRING2( "VMBX: RVmbxNumber::IsNoNumberNoteAllowed \
- get videonum result=%d", videoRet );
- }
- delete tmpNumber;
- tmpNumber = NULL;
- }
-
- if ( isVoipSupport )
- {
- RArray<TUint> profileIds;
- GetServiceIds( profileIds );
-
- TVmbxServiceInfo serviceInfo;
- serviceInfo.iAddress.Zero();
- for ( TInt i = 0; i < profileIds.Count()
- && !psAddressFound; i++ )
- {
- serviceInfo.iServiceId = profileIds[ i ];
- GetServiceInfo( serviceInfo );
-
- VMBLOGSTRING2( "VMBX: RVmbxNumber::IsNoNumberNoteAllowed \
- PS address length=%d", serviceInfo.iAddress.Length() );
- if ( serviceInfo.iAddress.Length() )
- {
- psAddressFound = ETrue;
- }
- }
-
- profileIds.Close();
- }
-
- // This check is done because phone client calls GetVmbxNumber
- // and then SelectTypeL, which causes note qtn_... to be shown twice
- // so the note can be shown in below several condition:
- // the voice mailbox number is not defined,
- // when video feature and
- // voip feature are not supported.
- // the video number is not defined, when video feature
- // is supported but voip feature is not supported.
- // the voip address is not defined, when voip feature
- // is supported but video feature is not supported.
- // both the video number and the voip address are not
- // defined, when both video feature and
- // voip feature are supported.
-
- if ( ( !isVideoSupport && !isVoipSupport )
- || ( ( isVideoSupport && KErrNotFound == videoRet )
- && !isVoipSupport )
- || ( ( isVoipSupport && !psAddressFound
- && !isVideoSupport ) )
- || ( isVideoSupport && isVoipSupport
- && KErrNotFound == videoRet &&
- !psAddressFound ) )
- {
- result = ETrue;
- }
-
- VMBLOGSTRING( "VMBX: RVmbxNumber::IsNoNumberNoteAllowed: <=" );
- return result;
- }
-
-// End of File
--- a/engines/vmbxengine/src/vmsettingsuiiconfileprovider.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of CVmSettingsUiIconFileProvider class.
-*
-*/
-
-#include "vmsettingsuiiconfileprovider.h"
-
-// ================= MEMBER FUNCTIONS ==========================================
-
-// -----------------------------------------------------------------------------
-// CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider
-//
-// -----------------------------------------------------------------------------
-//
-CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider()
- {
- }
-
-// -----------------------------------------------------------------------------
-// CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider
-//
-// -----------------------------------------------------------------------------
-//
-CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider()
- {
- iFile.Close();
- }
-
-// -----------------------------------------------------------------------------
-// CVmSettingsUiIconFileProvider::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CVmSettingsUiIconFileProvider::ConstructL( RFile& aFile )
- {
- User::LeaveIfError( iFile.Duplicate( aFile ) );
- }
-
-// ----------------------------------------------------------------------------
-// CVmSettingsUiIconFileProvider::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CVmSettingsUiIconFileProvider* CVmSettingsUiIconFileProvider::NewL(
- RFile& aFile )
- {
- CVmSettingsUiIconFileProvider* self =
- new ( ELeave ) CVmSettingsUiIconFileProvider();
- CleanupStack::PushL( self );
- self->ConstructL( aFile );
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// From MAknIconFileProvider
-//
-// ---------------------------------------------------------------------------
-//
-void CVmSettingsUiIconFileProvider::RetrieveIconFileHandleL(
- RFile& aFile, const TIconFileType /*aType*/ )
- {
- // duplicate the file's handle
- User::LeaveIfError( aFile.Duplicate( iFile ) );
- }
-
-// ---------------------------------------------------------------------------
-// From MAknIconFileProvider
-//
-// ---------------------------------------------------------------------------
-//
-void CVmSettingsUiIconFileProvider::Finished()
- {
- delete this;
- }
-
-// End of File
--- a/engines/vmbxengine/src/vmspshandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,446 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of CVmSPSHandler class.
-*
-*/
-
-// INCLUDE FILES
-#include <spsettings.h>
-#include <spentry.h>
-#include <spproperty.h>
-#include <spnotifychange.h>
-#include <featmgr.h>
-#include <vmnumber.h>
-#include "vmspshandler.h"
-#include "vmblogger.h"
-
-// EXTERNAL DATA STRUCTURES
-// None
-
-// EXTERNAL FUNCTION PROTOTYPES
-// None
-
-// CONSTANTS
-/** Maximum length of descriptor data */
-const TInt KVmbxMaxDesLength = 512;
-
-// MACROS
-// None
-
-// LOCAL CONSTANTS AND MACROS
-// None
-
-// MODULE DATA STRUCTURES
-// None
-
-// LOCAL FUNCTION PROTOTYPES
-// None
-
-// FORWARD DECLARATIONS
-// None
-
-// ============================= LOCAL FUNCTIONS =============================
-
-// ============================ MEMBER FUNCTIONS =============================
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::CVmSPSHandler
-// C++ default constructor can NOT contain any code, that might leave.
-// ---------------------------------------------------------------------------
-//
-CVmSPSHandler::CVmSPSHandler()
- {
- // No implementation required
- }
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::ConstructL
-// Symbian 2nd phase constructor can leave.
-// ---------------------------------------------------------------------------
-//
-void CVmSPSHandler::ConstructL()
- {
- iSettings = CSPSettings::NewL();
- iSpsSettingsVoipUtils = CSPSettingsVoIPUtils::NewL();
-
- iNotifier = CSPNotifyChange::NewL( *this );
-
- // Subscribe to service change notifies
- // Empty array so that new services will be notified also
- RIdArray array;
- CleanupClosePushL( array );
- //iNotifier->NotifyChangeL( iServiceIds );
- iNotifier->NotifyChangeL( array );
- CleanupStack::PopAndDestroy( &array );
- }
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::NewL
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CVmSPSHandler* CVmSPSHandler::NewL( )
- {
- CVmSPSHandler* self = CVmSPSHandler::NewLC();
- CleanupStack::Pop( self );
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::NewLC
-// Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CVmSPSHandler* CVmSPSHandler::NewLC()
- {
- CVmSPSHandler* self = new (ELeave) CVmSPSHandler();
- CleanupStack::PushL( self );
- self->ConstructL();
- return self;
- }
-
-// Destructor
-CVmSPSHandler::~CVmSPSHandler()
- {
- iObserver = NULL;
-
- if ( iNotifier )
- {
- iNotifier->Cancel();
- delete iNotifier;
- }
-
- delete iSettings;
-
- delete iSpsSettingsVoipUtils;
- }
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::GetServiceIdsL
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CVmSPSHandler::GetServiceIdsL( RArray<TUint>& aServiceIds ) const
- {
- RArray<TUint> serviceIds;
- CleanupClosePushL( serviceIds );
- // Get all service Ids and..
- iSettings->FindServiceIdsL( serviceIds );
- // ..remove service if VMBX is not defined or if VMBX address is empty
- for ( TInt i( 0 ); i < serviceIds.Count(); i++ )
- {
- if ( IsVbmxSupportedL( serviceIds[ i ] ) )
- {
- aServiceIds.Append( serviceIds[ i ] );
- }
- }
-
- VMBLOGSTRING2( "VMBX: found %d IP mailbox services", aServiceIds.Count() );
-
- CleanupStack::PopAndDestroy( &serviceIds );
- }
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::IsVbmxSupportedL
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-TBool CVmSPSHandler::IsVbmxSupportedL( TUint32 aServiceId ) const
- {
- TBool supported( EFalse );
-
- // Get entry
- CSPEntry* entry = CSPEntry::NewLC();
- iSettings->FindEntryL( aServiceId, *entry );
-
- // Get all service properties a.k.a subservices
- RPropertyArray properties;
- properties = entry->GetAllProperties();
-
- TServicePropertyName propertyName;
-
- for ( TInt i( 0 ); i < properties.Count() && !supported; i++ )
- {
- propertyName = properties[ i ]->GetName();
-
- supported = propertyName == EPropertyVMBXSubServicePluginId;
-
- if ( supported )
- {
- TVmbxServiceInfo serviceInfo;
- TRAPD( found, GetVmAddressL( aServiceId, serviceInfo.iAddress ) );
-
- supported = KErrNotFound != found;
- }
- }
-
- CleanupStack::PopAndDestroy( entry );
-
- VMBLOGSTRING2( "VMBX: CVmSPSHandler::IsVbmxSupportedL: %d", supported );
- return supported;
- }
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::GetServiceInfo
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-TInt CVmSPSHandler::GetServiceInfo( TVmbxServiceInfo& aServiceInfo ) const
- {
- VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceInfo: =>" );
- TInt ret( KErrNone );
-
- TRAP( ret,
- {
- GetServiceNameL( aServiceInfo.iServiceId, aServiceInfo.iName );
-
- GetVmAddressL( aServiceInfo.iServiceId, aServiceInfo.iAddress );
-
- TInt snap( 0 );
- GetSNAPIdL( aServiceInfo.iServiceId, snap );
- aServiceInfo.iSnapId = static_cast<TUint32> ( snap );
- } );
-
- VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceInfo: <=" );
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::GetVmAddressL
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CVmSPSHandler::GetVmAddressL( const TUint32 aServiceId,
- TDes& aAddress ) const
- {
- VMBLOGSTRING( "VMBX: CVmSPSHandler::GetVmAddressL: =>" );
- RBuf buffer;
- CleanupClosePushL( buffer );
- buffer.ReAllocL( KVmbxMaxDesLength );
-
- CSPEntry* entry = CSPEntry::NewLC();
- const CSPProperty* property = NULL;
-
- iSettings->FindEntryL( aServiceId, *entry );
-
- // Find correct subservice
- User::LeaveIfError(
- entry->GetProperty( property, ESubPropertyVMBXListenAddress ) );
-
- property->GetValue( buffer );
- buffer.Length() > aAddress.MaxLength() ?
- User::Leave( KErrOverflow ) : aAddress.Copy( buffer );
-
- CleanupStack::PopAndDestroy( entry );
- CleanupStack::PopAndDestroy( &buffer );
-
- VMBLOGSTRING( "VMBX: CVmSPSHandler::GetVmAddressL: <=" );
- }
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::GetServiceNameL
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CVmSPSHandler::GetServiceNameL( const TUint32 aServiceId,
- TDes& aName ) const
- {
- VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: =>" );
- RBuf buffer;
- CleanupClosePushL( buffer );
- buffer.ReAllocL( KVmbxMaxDesLength );
-
- // Get entry
- CSPEntry* entry = CSPEntry::NewLC();
-
- iSettings->FindEntryL( aServiceId, *entry );
- VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: 1" );
- // Read service id and service name
- buffer.Copy( entry->GetServiceName() );
- VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: 2" );
- buffer.Length() > aName.MaxLength() ?
- User::Leave( KErrOverflow ) : aName.Copy( buffer );
-
- CleanupStack::PopAndDestroy( entry );
- CleanupStack::PopAndDestroy( &buffer );
-
- VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: <=" );
- }
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::GetSNAPIdL
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CVmSPSHandler::GetSNAPIdL( TUint32 aServiceId, TInt& aSNAPId ) const
- {
- VMBLOGSTRING( "VMBX: CVmSPSHandler::GetSNAPIdL: =>" );
-
- CSPEntry* entry = CSPEntry::NewLC();
- const CSPProperty* property = NULL;
-
- iSettings->FindEntryL( aServiceId, *entry );
-
- // Find correct subservice
- TInt error(
- entry->GetProperty( property, ESubPropertyVMBXPreferredSNAPId ) );
-
- if ( KErrNotFound != error )
- {
- property->GetValue( aSNAPId );
- }
-
- CleanupStack::PopAndDestroy( entry );
-
- VMBLOGSTRING( "VMBX: CVmSPSHandler::GetSNAPIdL: <=" );
- }
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::BrandIdL
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CVmSPSHandler::BrandIdL( TInt aServiceId, TDes8& aBrandId )
- {
- VMBLOGSTRING( "VMBX: CVmSPSHandler::BrandIdL: =>" );
-
- CSPEntry* entry = CSPEntry::NewLC();
- const CSPProperty* property;
- TBuf<KSPMaxDesLength> brandId( KNullDesC );
-
- User::LeaveIfError(
- iSettings->FindEntryL( aServiceId, *entry ) );
-
- User::LeaveIfError(
- entry->GetProperty( property, EPropertyBrandId ) );
-
- if ( property )
- {
- property->GetValue( brandId );
- }
-
- if ( brandId.Length() )
- {
- aBrandId.Copy( brandId );
- }
-
- CleanupStack::PopAndDestroy( entry );
-
- VMBLOGSTRING( "VMBX: CVmSPSHandler::BrandIdL: <=" );
- }
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::IsActivatedL
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-TBool CVmSPSHandler::IsActivatedL( TInt aServiceId )
- {
- VMBLOGSTRING( "VMBX: CVmSPSHandler::IsActivatedL: =>" );
-
- TBool enabled( EFalse );
-
- CSPEntry* entry = CSPEntry::NewLC();
- const CSPProperty* property = NULL;
-
- iSettings->FindEntryL( aServiceId, *entry );
-
- // Find correct subservice
- TInt error(
- entry->GetProperty( property, ESubPropertyVMBXEnabled ) );
-
- if ( KErrNotFound != error )
- {
- TOnOff onOff( EOONotSet );
- property->GetValue( onOff );
- enabled = onOff == EOn;
- }
-
- CleanupStack::PopAndDestroy( entry );
-
- VMBLOGSTRING2( "VMBX: CVmSPSHandler::IsActivatedL: %d", enabled );
- VMBLOGSTRING( "VMBX: CVmSPSHandler::IsActivatedL: <=" );
-
- return enabled;
- }
-
-// ----------------------------------------------------------------------------
-// CVmSPSHandler::NotifyServiceChange
-// (other items were commented in a header).
-// ----------------------------------------------------------------------------
-//
-void CVmSPSHandler::NotifyServiceChange( MServiceNotifyHandler* aHandler )
- {
- VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChange: =>" );
-
- iObserver = aHandler;
-
- VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChange: <=" );
- }
-
-// ----------------------------------------------------------------------------
-// CVmSPSHandler::NotifyServiceChangeCancel
-// (other items were commented in a header).
-// ----------------------------------------------------------------------------
-//
-void CVmSPSHandler::NotifyServiceChangeCancel()
- {
- VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChangeCancel: =>" );
-
- iObserver = NULL;
-
- VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChangeCancel: <=" );
- }
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::HandleNotifyChange
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CVmSPSHandler::HandleNotifyChange( TServiceId /*ServiceId*/ )
- {
- VMBLOGSTRING( "VMBX: CVmSPSHandler::HandleNotifyChange: =>" );
- if ( iObserver )
- {
- TRAP_IGNORE( iObserver->HandleServiceNotifyL() );
- }
- VMBLOGSTRING( "VMBX: CVmSPSHandler::HandleNotifyChange: <=" );
- }
-
-// ---------------------------------------------------------------------------
-// CVmSPSHandler::HandleError
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CVmSPSHandler::HandleError( TInt /*aError*/ )
- {
- }
-
-TBool CVmSPSHandler::IsVoIPProfilesFound()
- {
- VMBLOGSTRING( "VMBX: CVmSPSHandler::IsVoIPProfilesFound" );
-
- TBool ret( EFalse );
-
- if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) )
- {
- TRAP_IGNORE( ret = iSpsSettingsVoipUtils->VoIPProfilesExistL() );
- }
-
- VMBLOGSTRING2( "VMBX: CVmContainer::IsVoIPProfilesFound: return %I", ret );
- return ret;
- }
-
-// ========================== OTHER EXPORTED FUNCTIONS =======================
-
-// End of File
--- a/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,6 @@
#include "../cbs/group/bld.inf"
#include "../cellular/group/bld.inf"
#include "../convergedcallengine/group/bld.inf"
-#include "../engines/group/bld.inf"
#include "../networkhandling/group/bld.inf"
#include "../phoneclientserver/group/bld.inf"
#include "../satengine/group/bld.inf"
@@ -28,6 +27,7 @@
#include "../phonesrv_plat/group/bld.inf"
#include "../phonesrv_pub/group/bld.inf"
#include "../phonecmdhandler/group/bld.inf"
+#include "../vmbx/group/bld.inf"
// End of File
--- a/layers.sysdef.xml Tue Feb 02 01:11:09 2010 +0200
+++ b/layers.sysdef.xml Fri Mar 19 09:40:14 2010 +0200
@@ -1,13 +1,13 @@
<?xml version="1.0"?>
-<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [
+<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_5_1.dtd" [
<!ENTITY layer_real_source_path "sf/mw/phonesrv" >
]>
-<SystemDefinition name="phonesrv" schema="1.4.0">
+<SystemDefinition name="phonesrv" schema="1.5.1">
<systemModel>
<layer name="mw_layer">
<module name="phonesrv">
- <unit name="phonesrv" unitID="tedo.phonesrv" bldFile="&layer_real_source_path;/group" mrp="" />
+ <unit name="phonesrv" unitID="tedo.phonesrv" bldFile="&layer_real_source_path;" mrp="" proFile="phonesrv.pro" />
</module>
</layer>
@@ -22,7 +22,7 @@
<unit unitID="tedo.dialutils.test" name="dialutils.test" bldFile="&layer_real_source_path;/phoneclientserver/dialutils/tsrc/public/basic/group" mrp="" />
<unit unitID="tedo.phoneclient.test" name="phoneclient.test" bldFile="&layer_real_source_path;/phoneclientserver/phoneclient/tsrc/public/basic/group" mrp="" />
<unit unitID="tedo.call_information_api.test" name="call_information_api.test" bldFile="&layer_real_source_path;/phonesrv_plat/call_information_api/tsrc/group" mrp="" />
- <unit unitID="tedo.sat_client_api.test" name="sat_client_api.test" bldFile="&layer_real_source_path;/phonesrv_plat/sat_client_api/tsrc/group" mrp="" />
+ <unit unitID="tedo.sat_client_api.test" name="sat_client_api.test" bldFile="&layer_real_source_path;/phonesrv_plat/sat_client_api/tsrc/group" mrp="" />
<unit unitID="tedo.sat_refresh_api.test" name="sat_refresh_api.test" bldFile="&layer_real_source_path;/phonesrv_plat/sat_refresh_api/tsrc/group" mrp="" />
<unit unitID="tedo.sat_service_api.test" name="sat_service_api.test" bldFile="&layer_real_source_path;/phonesrv_plat/sat_service_api/tsrc/group" mrp="" />
<unit unitID="tedo.telephony_mediator_api.test" name="telephony_mediator_api.test" bldFile="&layer_real_source_path;/phonesrv_plat/telephony_mediator_api/tsrc/ut_telephony_mediator_api/group" mrp="" />
--- a/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkMCNEngine.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/networkhandling/networkhandlingengine/NetworkHandlingGsmSrc/CNWNetworkMCNEngine.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -28,7 +28,7 @@
#include <CMcn.h>
#include <CMcnTopicArray.h>
#include <centralrepository.h>
-#include <SettingsInternalCRKeys.h>
+#include <settingsinternalcrkeys.h>
// CONSTANTS
const TUint KNWzero = 0;
--- a/phoneclientserver/CallUI/BMARM/DIALUTILSU.DEF Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- CreateDialUtilsFactoryL__Fv @ 1 NONAME R3UNUSED ; CreateDialUtilsFactoryL(void)
-
--- a/phoneclientserver/CallUI/BWINS/DIALUTILSU.DEF Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?CreateDialUtilsFactoryL@@YAPAVCDialUtilsFactory@@XZ @ 1 NONAME ; class CDialUtilsFactory * __cdecl CreateDialUtilsFactoryL(void)
-
--- a/phoneclientserver/CallUI/Data/101F868E.rss Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Data/101F868E.rss Fri Mar 19 09:40:14 2010 +0200
@@ -19,8 +19,8 @@
// INCLUDES
#include <registryinfov2.rh>
-#include <AiwCommon.hrh>
-#include "CaUI.hrh"
+#include <aiwcommon.hrh>
+#include "caui.hrh"
// RESOURCE DEFINITIONS
--- a/phoneclientserver/CallUI/Data/CallUI.rss Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Data/CallUI.rss Fri Mar 19 09:40:14 2010 +0200
@@ -27,9 +27,9 @@
#include <avkon.rsg>
#include <avkon.loc>
-#include "CaUI.hrh"
+#include "caui.hrh"
#include <callui.loc>
-#include <AiwCommon.hrh>
+#include <aiwcommon.hrh>
@@ -428,7 +428,7 @@
#endif //__MMS
#else // RD_UNIFIED_EDITOR
NEW_MESSAGE_MTM_TYPE
- {
+ {
id = 0x102072D6;
name = qtn_tel_retry_message_call_item;
}
@@ -443,7 +443,7 @@
#endif //__EMAIL_UI
,
NEW_MESSAGE_MTM_TYPE
- {
+ {
id = 0x10207245;
name = qtn_mce_pop_up_PostCard;
}
--- a/phoneclientserver/CallUI/Group/CaUiEngine.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Group/CaUiEngine.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -26,21 +26,21 @@
TARGETTYPE dll
UID 0x1000008d 0x101F868F
-SOURCEPATH ../Src/CaUiEngine
-SOURCE CaUiEngFactImpl.cpp
+SOURCEPATH ../src/cauiengine
+SOURCE cauiengfactimpl.cpp
-SOURCE CaUiQuery.cpp
-SOURCE CaUiEngine.cpp
-SOURCE CaUiActiveObject.cpp
-SOURCE CaUiMessageSender.cpp
-SOURCE CaUiDialogs.cpp
+SOURCE cauiquery.cpp
+SOURCE cauiengine.cpp
+SOURCE cauiactiveobject.cpp
+SOURCE cauimessagesender.cpp
+SOURCE cauidialogs.cpp
-SOURCE CaUiVoIPExtension.cpp
+SOURCE cauivoipextension.cpp
SOURCE ccauireconnectquery.cpp
SOURCE ccauireconnectqueryimpl.cpp
-SOURCEPATH ../Data
-START RESOURCE CallUI.rss
+SOURCEPATH ../data
+START RESOURCE callui.rss
HEADER
TARGETPATH RESOURCE_FILES_DIR
END
@@ -48,9 +48,9 @@
// TEMPORARY DEFINITION FOR CONTACT FINDER HEADERS
SYSTEMINCLUDE ../../../../../app/phone/inc
-USERINCLUDE ../Inc
-USERINCLUDE ../Inc/CaUiEngine
-USERINCLUDE ../Data
+USERINCLUDE ../inc
+USERINCLUDE ../inc/cauiengine
+USERINCLUDE ../data
USERINCLUDE ../loc
APP_LAYER_SYSTEMINCLUDE
--- a/phoneclientserver/CallUI/Group/CaUiPlugin.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Group/CaUiPlugin.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -26,20 +26,20 @@
UID 0x10009D8D 0x101F868E
-SOURCEPATH ../Src/CaUiPlugin
-SOURCE CaUiPlugin.cpp
-SOURCE CaUIMain.cpp
+SOURCEPATH ../src/cauiplugin
+SOURCE cauiplugin.cpp
+SOURCE cauimain.cpp
-SOURCEPATH ../Data
+SOURCEPATH ../data
-START RESOURCE 101F868E.rss
+START RESOURCE 101f868e.rss
TARGET cauiplugin.rsc
END
-USERINCLUDE ../Inc
-USERINCLUDE ../Inc/CaUiPlugin
+USERINCLUDE ../inc
+USERINCLUDE ../inc/cauiplugin
MW_LAYER_SYSTEMINCLUDE
SYSTEMINCLUDE /epoc32/include/ecom
@@ -47,9 +47,8 @@
LIBRARY euser.lib
LIBRARY servicehandler.lib
-LIBRARY flogger.lib
+LIBRARY flogger.lib
LIBRARY commonengine.lib
-LIBRARY featmgr.lib // FeatureManager
LANGUAGE_IDS
--- a/phoneclientserver/CallUI/Group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -24,27 +24,27 @@
PRJ_EXPORTS
// Private
-../Inc/CaUiEngine/CaUiDialResultObserver.h |../inc/cauidialresultobserver.h
-../Inc/CaUiEngine/CaUiLogger.h |../inc/cauilogger.h
-../Inc/CaUiEngine/CaUiEng.h |../inc/cauieng.h
+../inc/cauiengine/cauidialresultobserver.h |../inc/cauidialresultobserver.h
+../inc/cauiengine/cauilogger.h |../inc/cauilogger.h
+../inc/cauiengine/cauieng.h |../inc/cauieng.h
// Internal
-../Inc/CaUI.hrh |../../../inc/caui.hrh
+../inc/caui.hrh |../../../inc/caui.hrh
-../Group/callui_stub.SIS /epoc32/data/z/system/install/callui_stub.sis
+../group/callui_stub.sis /epoc32/data/z/system/install/callui_stub.sis
// LOC files
../loc/callui.loc MW_LAYER_LOC_EXPORT_PATH(callui.loc)
// IBY files
-../Rom/CallUI.iby CORE_MW_LAYER_IBY_EXPORT_PATH(CallUI.iby)
-../Rom/CallUI_Variant.iby CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(CallUI_Variant.iby)
-../Rom/CallUIResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(CallUIResources.iby)
+../rom/callui.iby CORE_MW_LAYER_IBY_EXPORT_PATH(callui.iby)
+../rom/callui_variant.iby CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(callui_variant.iby)
+../rom/calluiresources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH(calluiresources.iby)
PRJ_MMPFILES
-../Group/CaUiEngine.mmp
-../Group/CaUiPlugin.mmp
+../group/cauiengine.mmp
+../group/cauiplugin.mmp
// End of File
--- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiActiveObject.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiActiveObject.h Fri Mar 19 09:40:14 2010 +0200
@@ -194,10 +194,10 @@
CPhCntMatcher* iPhCntMatcher;
// Is CPhCntMatcher owned.
- TBool iOwnMatcher;
+ TBool iOwnMatcher;
// Message sender
- CCaUiMessageSender* iMessageSender;
+ CCaUiMessageSender* iMessageSender;
};
--- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiDialDataContainer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiDialDataContainer.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,8 +21,8 @@
#define CAUIDIALDATACONTAINER_H
// INCLUDES
-#include <E32Base.h>
-#include <TPhCltExtPhoneDialData.h>
+#include <e32base.h>
+#include <tphcltextphonedialdata.h>
/**
--- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiDialogs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiDialogs.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,8 +21,9 @@
// Includes
-#include "PhCltTypes.h"
-#include "CaUiVoIPExtension.h"
+#include "phclttypes.h"
+#include "cauivoipextension.h"
+
// Forward declarations
class CCaUiEngine;
@@ -58,16 +59,16 @@
public:
- /**
+ /**
* Two-phased constructor.
* @return an instance of CCaUiDialogs.
*/
- static CCaUiDialogs* NewL( CCaUiEngine& aCaUiEngine );
+ static CCaUiDialogs* NewL( CCaUiEngine& aCaUiEngine );
- /**
- * Destructor.
- */
- virtual ~CCaUiDialogs();
+ /**
+ * Destructor.
+ */
+ virtual ~CCaUiDialogs();
/**
* Launch a query whether video call will be created with long
@@ -75,8 +76,8 @@
*
* @return The selection user made
*/
- TInt QueryVideoCallDefaultActionL();
-
+ TInt QueryVideoCallDefaultActionL();
+
/**
* Launch a list query asking what type of call the caller wants
* to make.
--- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEng.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEng.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,7 +23,7 @@
// INCLUDES
#include <e32base.h>
#include <spdefinitions.h> //RIdArray
-#include "CaUI.hrh"
+#include "caui.hrh"
// FORWARD DECLARATIONS
--- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEngFactImpl.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEngFactImpl.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
-#include "CaUiEng.h"
+#include "cauieng.h"
/**
--- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEngine.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiEngine.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,15 +21,15 @@
// INCLUDES
#include <e32std.h>
-#include <ConeResLoader.h> // RConeResourceLoader.
-#include <mphcltextphoneobserver.h> // MPhCltExtPhoneObserver.
-#include "CaUiEng.h"
-#include "CaUiDialResultObserver.h"
-#include "CaUiQueryObserver.h"
-#include <PhCltTypes.h>
-#include <MPhCltEmergencyCallObserver.h>
+#include <coneresloader.h> // RconeResourceLoader.
+#include <mphcltextphoneobserver.h> // MPhCltExtPhoneObserver.
+#include "cauieng.h"
+#include "cauidialresultobserver.h"
+#include "cauiqueryobserver.h"
+#include <phclttypes.h>
+#include <mphcltemergencycallobserver.h>
#include <cphcntcontactdataselection.h> // MPhCntSelectionObserver
-#include <CPhCltEmergencyCall.h> // CPhCltEmergencyCall
+#include <cphcltemergencycall.h> // CPhCltEmergencyCall
#include <mcauireconnectqueryobserver.h>
#include <cconvergedserviceselector.h>
#include <mphcntstoreloaderobserver.h>
--- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiMessageSender.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiMessageSender.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
#include <msvapi.h>
-#include <MsgArrays.h> // CUidNameArray
+#include <msgarrays.h> // CUidNameArray
// CLASS DECLARATION
class CMsvSession;
@@ -61,17 +61,17 @@
* @param aMessageType mtmUid indicate the message type
* aRealAddress address list to send message
*/
- void CreateNewMessageL( TInt aMessageType,
- MDesC16Array* aRealAddress,
- MDesC16Array* aAliases,
- CRichText* aRichText );
+ void CreateNewMessageL( TInt aMessageType,
+ MDesC16Array* aRealAddress,
+ MDesC16Array* aAliases,
+ CRichText* aRichText );
/**
* Get messgae types array
- */
- const CUidNameArray& MessageTypesArrayL();
-
- private:
+ */
+ const CUidNameArray& MessageTypesArrayL();
+
+ private:
/**
* C++ constructor.
@@ -84,7 +84,7 @@
/**
* Create SendUi
*/
- void CreateSendUiL();
+ void CreateSendUiL();
/**
* Get message types from mtm registry
@@ -92,17 +92,17 @@
* @param aMsgTypes array of UIDs (MTM types)
*
*/
- void UpdateMessageTypesArrayL( CUidNameArray* aMsgTypes );
+ void UpdateMessageTypesArrayL( CUidNameArray* aMsgTypes );
/**
* Check if mail box is defined
- */
- TBool IsMailboxDefinedL();
+ */
+ TBool IsMailboxDefinedL();
/**
* Create connection to message service
*/
- void CreateMessageServiceConnectionL();
+ void CreateMessageServiceConnectionL();
protected: // Functions from base classes
@@ -112,16 +112,16 @@
virtual void HandleSessionEventL(TMsvSessionEvent aEvent,
TAny* aArg1, TAny* aArg2, TAny* aArg3);
- private:
-
- // Message service session
+ private:
+
+ // Message service session
CMsvSession* iSession;
// Send UI
CSendUi* iSendUi;
// Array of MTM types
- CUidNameArray* iMsgTypes;
+ CUidNameArray* iMsgTypes;
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiMessageSenderStub.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,102 @@
+/*
+* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Message sender stub.
+*
+*/
+
+
+#ifndef CAUIMESSAGESENDER_H
+#define CAUIMESSAGESENDER_H
+
+// INCLUDES
+#include <e32base.h>
+#include <msgarrays.h> // cuidnamearray
+
+// CLASS DECLARATION
+
+/**
+* CaUIMessageSender implementation.
+*
+* @lib CaUiEngine.lib
+* @since 3.1
+*/
+class CCaUiMessageSender :
+ public CBase
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Destructor.
+ */
+ ~CCaUiMessageSender();
+
+ /**
+ * Two-phased constructor.
+ * @return an instance of CCaUiMessageSender.
+ */
+ static CCaUiMessageSender* NewL();
+
+ public: // New functions
+
+ /**
+ * Create new message by given Id. The message editor will always
+ * be lauched stand alone.
+ * @param aMessageType mtmUid indicate the message type
+ * aRealAddress address list to send message
+ */
+ void CreateNewMessageL( TInt aMessageType,
+ MDesC16Array* aRealAddress,
+ MDesC16Array* aAliases,
+ CRichText* aRichText );
+
+ private:
+
+ /**
+ * C++ constructor.
+ *
+ * @param aIndex After the query is dismissed, the index will hold
+ * the value of selected item.
+ */
+ CCaUiMessageSender( );
+
+ /**
+ * Create SendUi
+ */
+ void CreateSendUiL();
+
+ /**
+ * Get message types from mtm registry
+ *
+ * @param aMsgTypes array of UIDs (MTM types)
+ *
+ */
+ void UpdateMessageTypesArrayL( CUidNameArray* aMsgTypes );
+
+ /**
+ * Check if mail box is defined
+ */
+ TBool IsMailboxDefinedL();
+
+ /**
+ * Create connection to message service
+ */
+ void CreateMessageServiceConnectionL();
+
+ private:
+
+ };
+
+#endif // CAUIMESSAGESENDER_H
+
+// End of File
--- a/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiVoIPExtension.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Inc/CaUiEngine/CaUiVoIPExtension.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,7 +23,7 @@
// INCLUDES
#include <e32base.h>
#include <badesca.h>
-#include <PhCltTypes.h>
+#include <phclttypes.h>
#include <spdefinitions.h> //RIdArray
/**
--- a/phoneclientserver/CallUI/Inc/CaUiPlugin/CaUiPlugin.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Inc/CaUiPlugin/CaUiPlugin.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,11 +21,11 @@
// INCLUDES
-#include <AiwServiceIfMenu.h>
-#include <AiwCommon.h> // AIW dialdata.
+#include <aiwserviceifmenu.h>
+#include <aiwcommon.h> // AIW dialdata.
#include <spdefinitions.h> //TServiceId
-#include "CaUiDialResultObserver.h"
-#include "CaUI.hrh"
+#include "cauidialresultobserver.h"
+#include "caui.hrh"
// FORWARD DECLARATIONS
class CCaUiEngApi;
--- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiActiveObject.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiActiveObject.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,16 +19,16 @@
// INCLUDE FILES
-#include "CaUiActiveObject.h"
-#include "CaUiQueryObserver.h"
+#include "cauiactiveobject.h"
+#include "cauiqueryobserver.h"
#include <coemain.h>
#include <mcauireconnectqueryobserver.h>
#include <cphonecntfactory.h>
-#include <CPhCntMatcher.h>
-#include <MPhCntMatch.h>
-#include "CaUiMessageSender.h"
-#include "CaUiLogger.h"
+#include <cphcntmatcher.h>
+#include <mphcntmatch.h>
+#include "cauimessagesender.h"
+#include "cauilogger.h"
// CONSTANTS
@@ -366,8 +366,8 @@
break;
}
- CAUILOGSTRING2("CALLUI: CCaUiGlnActiveObject::LaunchEditorL(): Message type: %d", messageType);
- CAUILOGSTRING2("CALLUI: CCaUiGlnActiveObject::LaunchEditorL(): Launch query: %d", launchQuery);
+ CAUILOGSTRING2("CALLUI: CCaUiGlnActiveObject::LaunchEditorL(): Message type: %d", messageType);
+ CAUILOGSTRING2("CALLUI: CCaUiGlnActiveObject::LaunchEditorL(): Launch query: %d", launchQuery);
// If the editor type was valid, launch the editor.
if ( launchQuery )
--- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiDialDataContainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiDialDataContainer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,7 +18,7 @@
// INCLUDE FILES
-#include "CaUiDialDataContainer.h"
+#include "cauidialdatacontainer.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiDialogs.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiDialogs.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -21,19 +21,19 @@
#include <e32base.h>
#include <e32cmn.h>
#include <featmgr.h>
-#include <StringLoader.h>
-#include <CallUI.rsg> // Resources.
+#include <stringloader.h>
+#include <callui.rsg> // Resources.
#include <aknmessagequerydialog.h>
#include <aknnotewrappers.h>
-#include <AknGlobalListQuery.h>
-#include <AknGlobalNote.h>
+#include <akngloballistquery.h>
+#include <aknglobalnote.h>
#include <mcauireconnectqueryobserver.h>
-#include "CaUiDialogs.h"
-#include "CaUiLogger.h"
-#include "CaUiQuery.h"
-#include "CaUiEngine.h"
-#include "CPhCntMatcher.h"
-#include "CaUiActiveObject.h"
+#include "cauidialogs.h"
+#include "cauilogger.h"
+#include "cauiquery.h"
+#include "cauiengine.h"
+#include "cphcntmatcher.h"
+#include "cauiactiveobject.h"
// CLASS DECLARATION
--- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiEngFactImpl.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiEngFactImpl.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "CaUiEngFactImpl.h"
-#include "CaUiEngine.h"
+#include "cauiengfactimpl.h"
+#include "cauiengine.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiEngine.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiEngine.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,43 +17,43 @@
// INCLUDE FILES
-#include "CaUiEngine.h"
-#include "CaUiQuery.h" // CCaUiQuery.
+#include "cauiengine.h"
+#include "cauiquery.h" // CCaUiQuery.
#include <mcauireconnectqueryobserver.h> // MCaUiReconnectQueryObserver.
-#include <CallUI.rsg> // Resources.
-#include <CPhCltDialer.h> // CPhCltDialer.
+#include <callui.rsg> // Resources.
+#include <cphcltdialer.h> // CPhcltDialer.
#include <cphonecntfactory.h>
#include <cphcntsingleitemfetch.h>
#include <aiwinternaldialdata.h>
-#include <AiwServiceHandler.h>
-#include <CPhCltExtPhoneDialData.h> // CPhCltExtPhoneDialData
+#include <aiwservicehandler.h>
+#include <cphcltextphonedialdata.h> // CPhCltExtPhoneDialData
#include "callui.loc" // Localized strings.
-#include <StringLoader.h> // String Loader.
+#include <stringloader.h> // String Loader.
#include <aknnotewrappers.h> // CAknInformationNote.
-#include <AknGlobalListQuery.h> // CAknGlobalListQuery.
+#include <akngloballistquery.h> // CAknGloballistQuery.
#include <featmgr.h> // FeatureManager.
#include <aknglobalconfirmationquery.h> // Confirmation query.
-#include <PhCltUtils.h> // Character removal.
-#include <AiwCommon.h> // AIW dialdata.
+#include <phcltutils.h> // Character removal.
+#include <aiwcommon.h> // AIW dialdata.
-#include <NetworkHandlingDomainPSKeys.h>
+#include <networkhandlingdomainpskeys.h>
#include <e32property.h> // Pub&Sub functionality.
-#include "CaUiVoIPExtension.h" // VoIP/SCCP profile store
+#include "cauivoipextension.h" // VoIP/SCCP profile store
#include <centralrepository.h>
-#include <SettingsInternalCRKeys.h>
-#include "CaUiLogger.h" // Call Ui Logger
+#include <settingsinternalcrkeys.h>
+#include "cauilogger.h" // Call Ui Logger
#include <aknmessagequerydialog.h>
#include <aknglobalnote.h>
#include <mphcntstoreloader.h>
-#include <MVPbkContactStore.h>
+#include <mvpbkcontactstore.h>
-#include "CaUiDialogs.h"
+#include "cauidialogs.h"
// CONSTANTS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiEngineStub.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,656 @@
+/*
+* Copyright (c) 2004-2005 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CallUIEngine, stub version.
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "cauiengine.h"
+#include "cauidialogs.h"
+
+#include <callui.rsg> // resources.
+#include <cphcltdialer.h> // cphcltdialer.
+#include <cphonecntfactory.h>
+#include <aiwinternaldialdata.h>
+#include <aiwservicehandler.h>
+#include <cphcltextphonedialdata.h> // cphcltextphonedialdata
+
+#include "callui.loc" // localized strings.
+
+#include <stringloader.h> // string loader.
+#include <featmgr.h> // featuremanager.
+
+#include <phcltutils.h> // character removal.
+#include <aiwcommon.h> // aiw dialdata.
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::CCaUiEngine
+//
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiEngine::CCaUiEngine()
+: iResourceLoader( *CCoeEnv::Static() )
+#ifndef RD_PHONE_NG
+ ,iResourceLoaderPhoneApE( *CCoeEnv::Static() )
+#endif
+ {
+ }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::ConstructL
+//
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::ConstructL()
+ {
+ // Sets up TLS, must be done before FeatureManager is used.
+ FeatureManager::InitializeLibL();
+
+ if( CCoeEnv::Static() )
+ {
+ // Open CallUI resource file.
+ TFileName* name = new ( ELeave ) TFileName( KCallUIResFile );
+ CleanupStack::PushL( name );
+ User::LeaveIfError( iResourceLoader.Open( *name ) );
+ CleanupStack::PopAndDestroy( name );
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::NewL
+//
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiEngine* CCaUiEngine::NewL()
+ {
+ CCaUiEngine* self = new( ELeave ) CCaUiEngine;
+
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop();
+
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::~CCaUEngine
+//
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiEngine::~CCaUiEngine()
+ {
+ delete iContactSelector;
+ delete iFactory;
+
+ // Clear dial components.
+ ClearDialContents();
+
+ if( CCoeEnv::Static() )
+ {
+ // Close resource loader.
+ iResourceLoader.Close();
+
+#ifndef RD_PHONE_NG
+ // Release PhoneAppEngine resources.
+ iResourceLoaderPhoneApE.Close();
+#endif
+ }
+
+ // Delete the menubuffer.
+ delete iBuf;
+ iBuf = NULL;
+
+ // Frees the TLS! Must be done after FeatureManager is used.
+ FeatureManager::UnInitializeLib();
+ }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::GetResources
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::GetResources(
+ const TCaUiEngResource aResource,
+ TFileName& aResFile,
+ TInt& aResId )
+ {
+ aResFile = KCallUIResFile;
+ if ( aResource == ECaUiResOnlyInternet )
+ {
+ aResId = 0;
+ }
+ else
+ {
+ // Return pure voice menu item.
+ aResId = R_CALLUI_CALL_MENU;
+ }
+ }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::DialL
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::DialL(
+ MCaUiDialResultObserver& aObserver,
+ const TDesC8& aDialData,
+ const TCaUiCallType aCallType )
+ {
+ TInt length = aDialData.Length();
+
+ // If iPhCltDialer and iDialDataContainer exist,
+ // destroy them and create new ones. This clears the dial data.
+ ClearDialContents();
+ iPhCltDialer = CPhCltExtPhoneBase::NewL( this );
+ iObserver = &aObserver;
+
+ iDialData = CPhCltExtPhoneDialData::NewL();
+ CAiwInternalDialData* aiwDialData = CAiwInternalDialData::NewLC( aDialData );
+
+ // Convert AIW dial data to PhoneClient format.
+
+ ConvertDialDataL( *aiwDialData );
+
+ iDialData->SetCallType( EPhCltVoice );
+
+ //a call type is still unknown if the dialing is made via phonebook
+ //send key (doesn't use HandleMenuCmdL, check the call type in
+ //aiwDialData to make sure if unknown is really unknown
+ //only do if call type unknown
+ TCaUiCallType callType = aCallType;
+ if ( callType == ECaUiCallTypeUnknown )
+ {
+ CAiwDialData::TCallType aiwCalltype = aiwDialData->CallType();
+
+ switch ( aiwCalltype )
+ {
+ case CAiwDialData::EAIWVoice:
+ callType = ECaUiCallTypeVoice;
+ break;
+ case CAiwDialData::EAIWVideo:
+ case CAiwDialData::EAIWForcedVideo:
+ callType = ECaUiCallTypeVideo;
+ break;
+ case CAiwDialData::EAIWVoiP:
+ callType = ECaUiCallTypeInternet;
+ break;
+ default:
+ //already unknown
+ break;
+ }
+ }
+
+ //aiwDialData not needed anymore, remove from stack
+ CleanupStack::PopAndDestroy( aiwDialData );
+
+ // If Contact link is provided fetch field link from Phone Book.
+ if ( iDialData->ContactLink() != KNullDesC8() )
+ {
+ // Launch address select.
+ // aCallType describes which selector is used. ( VoIP/PhoneNumber )
+ LaunchAddressSelectL(
+ iDialData->ContactLink(),
+ callType );
+ }
+
+
+ else
+ {
+ iPhCltDialer->DialL( *iDialData );
+ }
+ }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchNoNetSupNoteL
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::LaunchNoNetSupNoteL()
+ {
+ User::Leave( KErrNotSupported );
+ }
+
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchReconConfQueryL
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::LaunchReconConfQueryL(
+ MCaUiReconnectQueryObserver& /*aObserver*/,
+ CPhCntMatcher* /*aPhCntMatcher*/,
+ const TPtrC /*aPhoneNumber*/,
+ const TBool /*aIncludeVideoCallOption*/ )
+ {
+ User::Leave( KErrNotSupported );
+ }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::CancelReconConfQuery
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::CancelReconConfQuery()
+ {
+ }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchNoteAndReconConfQueryL
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::LaunchNoteAndReconConfQueryL(
+ MCaUiReconnectQueryObserver& /*aObserver*/,
+ CPhCntMatcher* /*aPhCntMatcher*/,
+ const TPtrC /*aPhoneNumber*/,
+ const TBool /*aIncludeVideoCallOption*/,
+ const TPtrC /*aNoteText*/ )
+ {
+ User::Leave( KErrNotSupported );
+ }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::CancelNoteAndReconConfQuery
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::CancelNoteAndReconConfQuery()
+ {
+ }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchAddressSelectL
+//
+//
+// -----------------------------------------------------------------------------
+//
+TBool CCaUiEngine::LaunchAddressSelectL(
+ TDes& aTelNum,
+ const TInt aContactId,
+ const TBool aVoIPAddressSelect )
+ {
+ if ( aVoIPAddressSelect )
+ {
+ User::Leave( KErrNotSupported );
+ }
+
+ TBool addressSelected( EFalse );
+ TCaUiCallType callType( ECaUiCallTypeVoice );
+
+ addressSelected = LaunchAddressSelectL( aTelNum, aContactId, callType );
+
+ return addressSelected;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::CancelAddressSelect
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::CancelAddressSelect()
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// From MPhCntStoreLoaderObserver.
+// CCaUiEngine::ContactStoreLoadingCompleted
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::ContactStoreLoadingCompleted(
+ MVPbkContactStore* /*aStore*/, TInt /*aErrorCode*/ )
+ {
+ }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::HandleDialL
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::HandleDialL( const TInt aStatus )
+ {
+ if ( iObserver )
+ {
+ iObserver->HandleDialResultL( aStatus );
+ }
+
+ ClearDialContents();
+ }
+
+// -----------------------------------------------------------------------------
+// From base class MCaUiReconnectQueryObserver
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::OptionSelected(
+ MCaUiReconnectQueryObserver::TCaUiReconType /*aReconType*/ )
+ {
+ }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::ConvertDialData
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::ConvertDialDataL(
+ const CAiwInternalDialData& aAiwDialData )
+ {
+ // Telephony number.
+ iDialData->SetTelephoneNumber( aAiwDialData.PhoneNumber().Left(
+ iDialData->TelephoneNumber().MaxLength() ) );
+
+ // Call type.
+ CAiwDialData::TCallType aiwCallType = aAiwDialData.CallType();
+ TPhCltCallType phCltCallType = EPhCltVoice;
+
+ // After this the call type should be correct one.
+ if ( aiwCallType == CAiwDialData::EAIWVideo )
+ {
+ phCltCallType = EPhCltVideo;
+ iDialData->SetCallType( phCltCallType );
+ }
+ else if ( aiwCallType == CAiwDialData::EAIWForcedVideo )
+ {
+ phCltCallType = EPhCltForcedVideo;
+ iDialData->SetCallType( phCltCallType );
+ }
+ else if ( aiwCallType == CAiwDialData::EAIWVoiP )
+ {
+ phCltCallType = EPhCltCallVoIP;
+ iDialData->SetCallType( phCltCallType );
+ }
+
+ // Name.
+ iDialData->SetNameL( aAiwDialData.Name().Left(
+ iDialData->Name().MaxLength() ) );
+
+ // Contact link.
+ iDialData->SetContactLinkL( aAiwDialData.ContactLink() );
+
+ // Window group.
+ iDialData->SetWindowGroup( aAiwDialData.WindowGroup() );
+
+ // Redial.
+ iDialData->SetRedial( aAiwDialData.Redial() );
+
+ // Redial maximum duration.
+ iDialData->SetRedialMaximumDuration( aAiwDialData.RedialMaximumDuration() );
+
+ // Show number.
+ iDialData->SetShowNumber( aAiwDialData.ShowNumber() );
+
+ // Match.
+ iDialData->SetAllowMatch( aAiwDialData.AllowMatch() );
+
+ // End other calls.
+ iDialData->SetEndOtherCalls( aAiwDialData.EndOtherCalls() );
+
+ // Subaddress.
+ iDialData->SetSubAddressL( aAiwDialData.SubAddress().Left(
+ iDialData->SubAddress().MaxLength() ) );
+
+ // SAT call.
+ iDialData->SetSATCall( aAiwDialData.SATCall() );
+
+ // Bearer.
+ iDialData->SetBearerL( aAiwDialData.Bearer().Left(
+ iDialData->Bearer().MaxLength() ) );
+
+ TPhCltTelephoneNumber telnum;
+ telnum.Zero();
+ telnum = iDialData->TelephoneNumber();
+ PhCltUtils::RemoveInvalidChars( telnum );
+ iDialData->SetTelephoneNumber( telnum );
+
+ }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::ClearDialContents
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::ClearDialContents()
+ {
+ if ( iPhCltDialer )
+ {
+ delete iPhCltDialer;
+ iPhCltDialer = NULL;
+ }
+
+ if ( iDialData )
+ {
+ delete iDialData;
+ iDialData = NULL;
+ }
+
+ // Not owned, so just set to NULL.
+ iObserver = NULL;
+ }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::LaunchAddressSelectL
+//
+//
+// -----------------------------------------------------------------------------
+//
+void CCaUiEngine::LaunchAddressSelectL(
+ const TDesC8& aContactLink,
+ const TCaUiCallType aCallType )
+ {
+ if ( aCallType != ECaUiCallTypeVoice )
+ {
+ HandleDialL( KErrNotSupported );
+ }
+
+ else
+ {
+ if ( !iFactory )
+ {
+ iFactory = CreateCntFactoryL();
+ }
+ if ( !iContactSelector )
+ {
+ iContactSelector = iFactory->CreateContactDataSelectionL();
+ }
+
+ CPhCntContactDataSelection::TCallType callType;
+
+ if ( aCallType == ECaUiCallTypeVoice )
+ {
+ callType = CPhCntContactDataSelection::ECallPhoneNumber;
+ }
+ else if ( aCallType == ECaUiCallTypeVideo )
+ {
+ callType = CPhCntContactDataSelection::ECallVideoNumber;
+ }
+ else if ( aCallType == ECaUiCallTypeInternet )
+ {
+ callType = CPhCntContactDataSelection::ECallVoip;
+ }
+ else
+ {
+ callType = CPhCntContactDataSelection::ECallPhoneNumber;
+ }
+
+ iContactSelector->Cancel();
+ iContactSelector->SelectPhoneNumberForCallL( aContactLink, callType, *this );
+
+ }
+
+ }
+
+// ---------------------------------------------------------
+// CCaUiEngine::HandleEmergencyDialL()
+// ---------------------------------------------------------
+//
+void CCaUiEngine::HandleEmergencyDialL( const TInt /*aStatus*/ )
+ {
+ // Do nothing
+ }
+
+// ---------------------------------------------------------
+// CCaUiEngine::SelectionDone()
+// ---------------------------------------------------------
+//
+void CCaUiEngine::SelectionDone( CPhCntSelectedData* aContactData,
+ TInt aErrorCode )
+ {
+ if ( aErrorCode == KErrNone )
+ {
+ TPhCltTelephoneNumber phoneNumber;
+ HBufC8* fieldLink = NULL;
+
+ if ( iDialData->TelephoneNumber() == KNullDesC )
+ {
+ phoneNumber = aContactData->Data();
+ PhCltUtils::RemoveInvalidChars( phoneNumber );
+ iDialData->SetTelephoneNumber( phoneNumber );
+ }
+ if ( aContactData->FieldLink().Length() > 0 )
+ {
+ fieldLink = aContactData->FieldLink().Alloc();
+ }
+
+ TRAP( aErrorCode, PhoneClientDialL( fieldLink ) );
+
+ delete fieldLink;
+ fieldLink = NULL;
+ }
+
+ if ( aErrorCode != KErrNone )
+ {
+ TRAP_IGNORE( HandleDialL( aErrorCode ) );
+ }
+ }
+
+// ---------------------------------------------------------
+// CCaUiEngine::PhoneClientDialL()
+// ---------------------------------------------------------
+//
+void CCaUiEngine::PhoneClientDialL( const TDesC8* aFieldLink )
+ {
+
+ TBool createCall( ETrue );
+ TInt error( KErrNone );
+
+ if ( aFieldLink )
+ {
+ iDialData->SetContactLinkL( *aFieldLink );
+ }
+
+ // Check if number is emergency number and if it is
+ // then call emeregency call
+ if ( !iEmergencyCall )
+ {
+ iEmergencyCall = CPhCltEmergencyCall::NewL( this );
+ }
+ if ( IsEmergencyNumber() )
+ {
+ createCall = EFalse;
+ if ( aFieldLink )
+ {
+ error = KErrNone;
+ iEmergencyCall->DialEmergencyCallL( iDialData->TelephoneNumber() );
+ }
+ else
+ {
+ error = KErrNotSupported;
+ }
+ }
+
+ // Here note launch + query if this is video call and we
+ // are not in 3G network.
+
+ if ( createCall )
+ {
+ if ( ( iDialData->CallType() == EPhCltVideo ) ||
+ ( iDialData->CallType() == EPhCltForcedVideo ) ||
+ ( iDialData->CallType() == EPhCltCallVoIP ) )
+ {
+ createCall = EFalse;
+ error = KErrNotSupported;
+ }
+
+ }
+ if ( createCall )
+ {
+ iPhCltDialer->DialL( *iDialData );
+ }
+ else
+ {
+ //User cancelled. Need to inform client.
+ if ( error != KErrNone ) // Emergency call does not need to inform client.
+ {
+ HandleDialL( error );
+ }
+ }
+ }
+
+// ---------------------------------------------------------
+// CCaUiEngine::IsEmergencyNumber()
+// ---------------------------------------------------------
+//
+TBool CCaUiEngine::IsEmergencyNumber()
+ {
+ TBool isEmergencyNumber( EFalse );
+
+ // get phonenumber from iDialData and heck number using phoneclient
+ // emergencycall api
+ TInt result = iEmergencyCall->IsEmergencyPhoneNumber(
+ iDialData->TelephoneNumber(),
+ isEmergencyNumber );
+
+ return isEmergencyNumber;
+ }
+
+// -----------------------------------------------------------------------------
+// CCaUiEngine::IsVoIPProfiles()
+//
+//
+// -----------------------------------------------------------------------------
+//
+TBool CCaUiEngine::IsVoIPProfiles()
+ {
+ return EFalse;
+ }
+
+// End of file
--- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiMessageSender.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiMessageSender.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,17 +19,17 @@
// INCLUDES
-#include "CaUiMessageSender.h"
+#include "cauimessagesender.h"
-#include <coemain.h> // CCoeEnv
-#include <CallUI.rsg> // Resources.
+#include <coemain.h> // CCoeEnv
+#include <callui.rsg> // Resources.
-#include <msvids.h> // KUidMsvLocalServiceMtmValue
+#include <msvids.h> // KUidMsvLocalServiceMtmValue
-#include <sendui.h> // CSendAppUi, CSendUi
-#include <CMessageData.h> // Message data for CSendUi
-#include <featmgr.h> // Feature manager
-#include "CaUiLogger.h" // Call Ui Logger
+#include <sendui.h> // CSendAppUi, CSendUi
+#include <cmessagedata.h> // Message data for CSendUi
+#include <featmgr.h> // Feature manager
+#include "cauilogger.h" // Call Ui Logger
// CONSTANTS
// The reconnect query options granularity.
@@ -81,7 +81,7 @@
if( iSendUi )
{
- delete iSendUi;
+ delete iSendUi;
}
CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::~CCaUiMessageSender()");
@@ -100,9 +100,9 @@
CAUILOGSTRING("CALLUI: >>> CCaUiMessageSender::NewL()");
CCaUiMessageSender* self = new( ELeave ) CCaUiMessageSender ();
-
- CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::NewL()");
-
+
+ CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::NewL()");
+
return self;
}
@@ -122,7 +122,7 @@
TRAPD( err, CreateSendUiL());
if ( err != KErrNone )
- User::Leave( KErrGeneral );
+ User::Leave( KErrGeneral );
//Launch message editor standalone
TUid mtmUid = { aMessageType };
@@ -201,7 +201,7 @@
CleanupStack::Pop();
iMsgTypes = msgTypes;
- CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::MessageTypesArrayL()");
+ CAUILOGSTRING("CALLUI: <<< CCaUiMessageSender::MessageTypesArrayL()");
return *iMsgTypes;
}
@@ -332,7 +332,7 @@
CAUILOGSTRING("CALLUI:<<< CCaUiMessageSender::HandleSessionEventL(): case: EMsvCloseSession");
break;
default:
- CAUILOGSTRING("CALLUI:<<< CCaUiMessageSender::HandleSessionEventL(): case: default");
+ CAUILOGSTRING("CALLUI:<<< CCaUiMessageSender::HandleSessionEventL(): case: default");
break;
}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiMessageSenderStub.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Message sender stub
+*
+*/
+
+
+// INCLUDES
+#include "cauimessagesenderstub.h"
+
+// -----------------------------------------------------------------------------
+// CCaUiMessageSender::CCaUiMessageSender
+//
+// C++ constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CCaUiMessageSender::CCaUiMessageSender()
+ {
+ }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiMessageSender::~CCaUiMessageSender
+//
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiMessageSender::~CCaUiMessageSender()
+ {
+ }
+
+
+// -----------------------------------------------------------------------------
+// CCaUiMessageSender::NewL
+//
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CCaUiMessageSender* CCaUiMessageSender::NewL()
+ {
+ CCaUiMessageSender* self = new( ELeave ) CCaUiMessageSender ();
+
+ return self;
+ }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::CreateNewMessageL
+// Create a new message of the given type, in the given location
+// ---------------------------------------------------------
+//
+void CCaUiMessageSender::CreateNewMessageL(
+ TInt /*aMessageType*/,
+ MDesC16Array* /*aRealAddress*/,
+ MDesC16Array* /*aAliases*/,
+ CRichText* /*aRichText*/ )
+ {
+ }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::CreateSendUiL
+// ---------------------------------------------------------
+//
+void CCaUiMessageSender::CreateSendUiL()
+ {
+ }
+
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::UpdateMessageTypesArrayL
+// Updates the array of UIDs which defines the MTM types for which the user
+// can create new messages.
+// ---------------------------------------------------------
+void CCaUiMessageSender::UpdateMessageTypesArrayL(
+ CUidNameArray* /*aMsgTypes*/ )
+ {
+ }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::CreateMessageServiceConnectionL
+// ---------------------------------------------------------
+//
+void CCaUiMessageSender::CreateMessageServiceConnectionL()
+ {
+ }
+
+// ---------------------------------------------------------
+// CCaUiMessageSender::IsMailboxDefinedL
+// ---------------------------------------------------------
+//
+TBool CCaUiMessageSender::IsMailboxDefinedL()
+ {
+ TBool isDefined( EFalse );
+ return isDefined;
+ }
+
+// End of File
--- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiQuery.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiQuery.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
// INCLUDES
-#include "CaUiQuery.h"
+#include "cauiquery.h"
// -----------------------------------------------------------------------------
--- a/phoneclientserver/CallUI/Src/CaUiEngine/CaUiVoIPExtension.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Src/CaUiEngine/CaUiVoIPExtension.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,12 +18,12 @@
// INCLUDE FILES
-#include "CaUiVoIPExtension.h"
-#include <CallUI.rsg>
+#include "cauivoipextension.h"
+#include <callui.rsg>
#include <featmgr.h>
#include <spsettings.h>
#include <spproperty.h>
-#include <StringLoader.h> // String Loader.
+#include <stringloader.h> // String Loader.
@@ -90,7 +90,7 @@
}
CleanupStack::PopAndDestroy( &voipServiceIds );
- return isProfiles;
+ return isProfiles;
}
// -----------------------------------------------------------------------------
@@ -117,7 +117,7 @@
// of them supports internet call
for ( TInt i = 0; idArray.Count() > i; i++)
{
- // check if the service supports internet call
+ // check if the service supports internet call
CSPProperty* property = CSPProperty::NewLC();
// get attribute mask of the service
User::LeaveIfError( settingsApi->FindPropertyL( idArray[i],
--- a/phoneclientserver/CallUI/Src/CaUiEngine/ccauireconnectqueryimpl.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Src/CaUiEngine/ccauireconnectqueryimpl.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
// INCLUDE FILES
#include "ccauireconnectqueryimpl.h"
-#include "CaUiEngine.h"
+#include "cauiengine.h"
CCaUiReconnectQueryImpl* CCaUiReconnectQueryImpl::NewL(
MCaUiReconnectQueryObserver& aObserver )
--- a/phoneclientserver/CallUI/Src/CaUiPlugin/CaUIMain.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Src/CaUiPlugin/CaUIMain.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
// INCLUDE FILES
#include <ecom.h>
#include <implementationproxy.h>
-#include "CaUI.hrh"
-#include "CaUiPlugin.h"
+#include "caui.hrh"
+#include "cauiplugin.h"
// CONSTANTS
--- a/phoneclientserver/CallUI/Src/CaUiPlugin/CaUiPlugin.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/Src/CaUiPlugin/CaUiPlugin.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,18 +18,17 @@
// INCLUDE FILES
-#include "CaUiPlugin.h" // This class interface.
-#include "CaUiEng.h" // CaUiEngine.
-#include <AiwCommon.hrh> // AIW constants.
-#include "CaUI.hrh" // CallUI constants.
-#include <AiwMenu.h> // AIW Menu pane.
+#include "cauiplugin.h" // This class interface.
+#include "cauieng.h" // CaUiEngine.
+#include <aiwcommon.hrh> // AIW constants.
+#include "caui.hrh" // CallUI constants.
+#include <aiwmenu.h> // AIW Menu pane.
-#include <AiwServiceHandler.h>
-#include <PhCltTypes.h> // PhoneClient types.
-#include "CaUiLogger.h" // Call Ui Logger
+#include <aiwservicehandler.h>
+#include <phclttypes.h> // PhoneClient types.
+#include "cauilogger.h" // Call Ui Logger
#include <stringloader.h>
-#include <CallUI.rsg>
-#include <featmgr.h> // FeatureManager.
+#include <callui.rsg>
// CONSTANTS
@@ -247,13 +246,7 @@
}
}
}
-
- if ( csVideoMenuItemAvailable &&
- !FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) )
- {
- csVideoMenuItemAvailable = EFalse;
- }
-
+
// Add menu items
TInt menuIndex = aIndex;
--- a/phoneclientserver/CallUI/loc/callui.loc Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/CallUI/loc/callui.loc Fri Mar 19 09:40:14 2010 +0200
@@ -5,7 +5,7 @@
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-
+*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
--- a/phoneclientserver/EnPolicy/Group/DOSENPolicy.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Group/DOSENPolicy.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -27,11 +27,11 @@
TARGETTYPE DLL
UID 0x101F86D1 0x101F86D2
-SOURCEPATH ../Src/DosEnPolicy
-SOURCE CDOSEmergencyNumberPolicy.cpp
+SOURCEPATH ../src/DosEnPolicy
+SOURCE CDOSEmergencyNumberPolicy.cpp
USERINCLUDE . ../Inc
-USERINCLUDE ../Inc/DosEnPolicy
+USERINCLUDE ../inc/DosEnPolicy
MW_LAYER_SYSTEMINCLUDE
SYSTEMINCLUDE ../../../inc
--- a/phoneclientserver/EnPolicy/Group/SOSENPolicy.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Group/SOSENPolicy.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -27,26 +27,26 @@
TARGETTYPE DLL
UID 0x101F86D1 0x101F86D3
-SOURCEPATH ../Src/SosEnPolicy
-SOURCE CSosEmergencyNumberPolicyManager.cpp
-SOURCE CSosEmergencyNumberPolicyHandler.cpp
-SOURCE CSosEnPolicyENListHandler.cpp
-SOURCE CSosEnPolicySimStatusMonitor.cpp
-SOURCE CSosEnPolicySatRefresh.cpp
+SOURCEPATH ../src/SosEnPolicy
+SOURCE CSosEmergencyNumberPolicyManager.cpp
+SOURCE CSosEmergencyNumberPolicyHandler.cpp
+SOURCE CSosEnPolicyENListHandler.cpp
+SOURCE CSosEnPolicySimStatusMonitor.cpp
+SOURCE CSosEnPolicySatRefresh.cpp
USERINCLUDE . ../Inc
-USERINCLUDE ../Inc/SosEnPolicy
+USERINCLUDE ../inc/SosEnPolicy
MW_LAYER_SYSTEMINCLUDE
SYSTEMINCLUDE ../../../inc
-SYSTEMINCLUDE ../../inc // for RPhCltEmergencyCall.h
+SYSTEMINCLUDE ../../inc // for rphcltemergencycall.h
LIBRARY euser.lib
LIBRARY etel.lib
LIBRARY etelmm.lib
LIBRARY commonengine.lib
LIBRARY featmgr.lib
-LIBRARY satclient.lib // for sat refresh
+LIBRARY satclient.lib // for sat refresh
LIBRARY centralrepository.lib
LIBRARY cenrepnotifhandler.lib
--- a/phoneclientserver/EnPolicy/Group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -22,11 +22,11 @@
PRJ_EXPORTS
-../Inc/CEmergencyNumberPolicy.h |../../../inc/cemergencynumberpolicy.h
+../inc/CEmergencyNumberPolicy.h |../../../inc/CEmergencyNumberPolicy.h
#ifdef __EN_POLICY_DOS
-DosEnPolicy_stub.SIS /epoc32/data/z/system/install/dosenpolicy_stub.sis
+DosEnPolicy_stub.SIS /epoc32/data/z/system/install/DosEnPolicy_stub.SIS
#else
-SosEnPolicy_stub.sis /epoc32/data/z/system/install/SosEnPolicy_stub.sis
+sosenpolicy_stub.sis /epoc32/data/z/system/install/sosenpolicy_stub.sis
#endif
// IBY files
--- a/phoneclientserver/EnPolicy/Inc/CEmergencyNumberPolicy.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Inc/CEmergencyNumberPolicy.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,8 +23,8 @@
// INCLUDES
#include <e32base.h>
-#include <RPhCltServer.h>
-#include <rphcltemergencycall.h>
+#include <rphcltserver.h>
+#include <rphcltemergencycall.h>
// CONSTANTS
const TUid KEnPolicyUid={ 0x101F86D1 };
--- a/phoneclientserver/EnPolicy/Inc/DosEnPolicy/CDOSEmergencyNumberPolicy.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Inc/DosEnPolicy/CDOSEmergencyNumberPolicy.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
#define CDOSEMERGENCYNUMBERPOLICY_H
// INCLUDES
-#include <CEmergencyNumberPolicy.h>
+#include <cemergencynumberpolicy.h>
#include <rmmcustomapi.h>
#include <cenrepnotifyhandler.h>
--- a/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSOSEmergencyNumberPolicyHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSOSEmergencyNumberPolicyHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,9 +21,9 @@
#define CSOSEMERGENCYNUMBERPOLICYHANDLER_H
// INCLUDES
-#include "CSOSEmergencyNumberPolicyManager.h"
-#include "CSosEnPolicySimStatusMonitor.h"
-#include "CSosEnPolicyENListHandler.h"
+#include "CSOSEmergencyNumberPolicyManager.h"
+#include "CSosEnPolicySimStatusMonitor.h"
+#include "CSosEnPolicyENListHandler.h"
#include <mmretrieve.h>
#include <e32property.h>
@@ -211,7 +211,7 @@
//Sim state
TInt iSimState;
-
+
};
#endif // CSOSEMERGENCYNUMBERPOLICYHANDLER_H
--- a/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSOSEmergencyNumberPolicyManager.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSOSEmergencyNumberPolicyManager.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
#define CSOSEMERGENCYNUMBERPOLICYMANAGER_H
// INCLUDES
-#include <CEmergencyNumberPolicy.h>
+#include <cemergencynumberpolicy.h>
// FORWARD DECLARATIONS
class CSosEmergencyNumberPolicyHandler;
--- a/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicyENListHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicyENListHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,8 +22,8 @@
// INCLUDES
-#include "CSOSEmergencyNumberPolicyHandler.h"
-#include <RPhCltServer.h>
+#include "CSOSEmergencyNumberPolicyHandler.h"
+#include <rphcltserver.h>
#include <cenrepnotifyhandler.h>
// FORWARD DECLARATIONS
--- a/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicySatRefresh.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicySatRefresh.h Fri Mar 19 09:40:14 2010 +0200
@@ -102,18 +102,18 @@
*/
void RunL();
- private: // Data
-
- // Reference to cbsserver
- CSosEmergencyNumberPolicyHandler& iCSosEmergencyNumberPolicyHandler;
- // Sat session connection.
- RSatSession* iSatSession;
- // Sat refresh connection
- RSatRefresh* iSatRefresh;
- // Is refresh allowed to do.
- TBool iAllowRefresh;
- // The RProperty to listen system global state..
- RProperty iProperty;
+ private: // Data
+
+ // Reference to cbsserver
+ CSosEmergencyNumberPolicyHandler& iCSosEmergencyNumberPolicyHandler;
+ // Sat session connection.
+ RSatSession* iSatSession;
+ // Sat refresh connection
+ RSatRefresh* iSatRefresh;
+ // Is refresh allowed to do.
+ TBool iAllowRefresh;
+ // The RProperty to listen system global state..
+ RProperty iProperty;
};
#endif // CSOSENPOLICYSATREFRESH_H
--- a/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicySimStatusMonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Inc/SosEnPolicy/CSosEnPolicySimStatusMonitor.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
-#include "CSOSEmergencyNumberPolicyHandler.h"
+#include "CSOSEmergencyNumberPolicyHandler.h"
#include <e32base.h> // CActive
#include <e32property.h> // RProperty
--- a/phoneclientserver/EnPolicy/Src/DosEnPolicy/CDOSEmergencyNumberPolicy.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Src/DosEnPolicy/CDOSEmergencyNumberPolicy.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,7 +17,7 @@
// INCLUDE FILES
-#include "CDOSEmergencyNumberPolicy.h"
+#include "CDOSEmergencyNumberPolicy.h"
#include <mmtsy_names.h>
#include <telservicesvariant.hrh>
@@ -319,21 +319,21 @@
}
}
- //match is wrong, only part of ememergency number is matched
- int newmatchlen = 0;
- for (int i = place; i < iProductSpecificList.Length(); i++)
- {
- if(iProductSpecificList [i] != KEnPolicySDNumberSeparator )
- newmatchlen++;
- else
- break;
- }
-
- if (length != newmatchlen)
- {
- return EFalse;
- }
-
+ //match is wrong, only part of ememergency number is matched
+ int newmatchlen = 0;
+ for (int i = place; i < iProductSpecificList.Length(); i++)
+ {
+ if(iProductSpecificList [i] != KEnPolicySDNumberSeparator )
+ newmatchlen++;
+ else
+ break;
+ }
+
+ if (length != newmatchlen)
+ {
+ return EFalse;
+ }
+
// if we get so far, its ok.
return ETrue;
@@ -349,22 +349,22 @@
//
void CDosEmergencyNumberPolicy::ParseNumber( TPhCltTelephoneNumber& aTelNumber )
{
- // Does number contains prefix. If yes then remove it
-
+ // Does number contains prefix. If yes then remove it
+
if ( 0 == aTelNumber.FindC( KSipPrefix ) ||
0 == aTelNumber.FindC( KTelPrefix ) ||
- 0 == aTelNumber.FindC( KSosPrefix ) )
+ 0 == aTelNumber.FindC( KSosPrefix ) )
{
aTelNumber.Delete( 0, KPrefixLength );
- }
- // Does Number contains domain part. If yes remove it at beging of @ character.
+ }
+ // Does Number contains domain part. If yes remove it at beging of @ character.
TInt atIndex = aTelNumber.Find( KAt );
TInt telNumberLength = aTelNumber.Length();
- if ( 0 < atIndex &&
- atIndex < telNumberLength )
+ if ( 0 < atIndex &&
+ atIndex < telNumberLength )
{
- aTelNumber.Delete( atIndex, telNumberLength - atIndex );
- }
+ aTelNumber.Delete( atIndex, telNumberLength - atIndex );
+ }
}
// -----------------------------------------------------------------------------
--- a/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEmergencyNumberPolicyHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEmergencyNumberPolicyHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,14 +18,14 @@
// INCLUDE FILES
-#include "CSOSEmergencyNumberPolicyHandler.h"
+#include "CSOSEmergencyNumberPolicyHandler.h"
#include <mmtsy_names.h>
#include <featmgr.h>
#include <bldvariant.hrh>
#include <telservicesvariant.hrh>
#include <telservicesinternalcrkeys.h>
#include <centralrepository.h>
-#include "CSosEnPolicySatRefresh.h"
+#include "CSosEnPolicySatRefresh.h"
// CONSTANTS
// The default emergency numbers.
@@ -143,7 +143,7 @@
// Create sat refresh listener
iSatRefresh = CSosEnPolicySatRefresh::NewL( *this );
-
+
iSimMonitor = CSosEnPolicySimStatusMonitor::NewL( *this );
iENListHandler = CSosEnPolicyENListHandler::NewL() ;
@@ -173,7 +173,7 @@
{
aIsEmergencyNumber = iENListHandler->IsInListByNormalMode( aTelNumber );
}
-
+
return KErrNone;
}
--- a/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEmergencyNumberPolicyManager.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEmergencyNumberPolicyManager.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,8 +19,8 @@
// INCLUDE FILES
-#include "CSOSEmergencyNumberPolicyManager.h"
-#include "CSOSEmergencyNumberPolicyHandler.h"
+#include "CSOSEmergencyNumberPolicyManager.h"
+#include "CSOSEmergencyNumberPolicyHandler.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicyENListHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicyENListHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,7 +17,7 @@
// INCLUDES
-#include "CSosEnPolicyENListHandler.h"
+#include "CSosEnPolicyENListHandler.h"
#include <e32property.h>
#include <centralrepository.h>
#include <telservicesinternalcrkeys.h>
--- a/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicySatRefresh.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicySatRefresh.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,11 +20,11 @@
// INCLUDE FILES
#include <e32std.h>
-#include "CSOSEmergencyNumberPolicyHandler.h"
-#include "CSosEnPolicySatRefresh.h"
+#include "CSOSEmergencyNumberPolicyHandler.h"
+#include "CSosEnPolicySatRefresh.h"
-#include <RSatRefresh.h>
-#include <RSatSession.h>
+#include <RSatRefresh.h>
+#include <RSatSession.h>
#include <startupdomainpskeys.h> // Property values
@@ -40,7 +40,7 @@
// -----------------------------------------------------------------------------
//
CSosEnPolicySatRefresh::CSosEnPolicySatRefresh( CSosEmergencyNumberPolicyHandler& aCSosEmergencyNumberPolicyHandler ):
- CActive( EPriorityStandard ), iCSosEmergencyNumberPolicyHandler ( aCSosEmergencyNumberPolicyHandler )
+ CActive( EPriorityStandard ), iCSosEmergencyNumberPolicyHandler ( aCSosEmergencyNumberPolicyHandler )
{
CActiveScheduler::Add( this );
}
@@ -82,17 +82,17 @@
if ( iSatRefresh )
{
// Cancel notifications.
- iSatRefresh->Cancel();
+ iSatRefresh->Cancel();
// Close SubSession.
iSatRefresh->Close();
}
- delete iSatRefresh;
-
- if ( iSatSession )
- {
- iSatSession->Close();
- }
- delete iSatSession;
+ delete iSatRefresh;
+
+ if ( iSatSession )
+ {
+ iSatSession->Close();
+ }
+ delete iSatSession;
Cancel();
iProperty.Close();
@@ -104,9 +104,9 @@
// -----------------------------------------------------------------------------
//
TBool CSosEnPolicySatRefresh::AllowRefresh( TSatRefreshType /*aType*/, const TSatRefreshFiles& /*aFiles*/ )
- {
- // Refresh is always allowed
- return ETrue;
+ {
+ // Refresh is always allowed
+ return ETrue;
}
// -----------------------------------------------------------------------------
@@ -116,12 +116,12 @@
// -----------------------------------------------------------------------------
//
void CSosEnPolicySatRefresh::Refresh( TSatRefreshType /*aType*/, const TSatRefreshFiles& /*aFiles*/ )
- {
- // Reload SIM Topics in case of refresh
+ {
+ // Reload SIM Topics in case of refresh
iCSosEmergencyNumberPolicyHandler.CpsssmHandleSimStatusEvent( CSosEmergencyNumberPolicyHandler::ESosEnPolicySimEmergencyNumberRead );
iSatRefresh->RefreshEFRead( EFalse );
- }
-
+ }
+
// -----------------------------------------------------------------------------
// CSosEnPolicySimStatusMonitor::IssueRequest
@@ -155,11 +155,11 @@
case KErrNone:
{
iSatSession->ConnectL();
- iSatRefresh->OpenL( *iSatSession );
+ iSatRefresh->OpenL( *iSatSession );
TSatRefreshFiles file;
file.Append( KEccEf );
iSatRefresh->NotifyFileChangeL( file );
- break;
+ break;
}
default:
break;
@@ -167,7 +167,7 @@
}
else
{
- IssueRequest();
+ IssueRequest();
}
}
--- a/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicySimStatusMonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/EnPolicy/Src/SosEnPolicy/CSosEnPolicySimStatusMonitor.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDES
-#include "CSosEnPolicySimStatusMonitor.h"
+#include "CSosEnPolicySimStatusMonitor.h"
#include <startupdomainpskeys.h> // Property values
-#include <PSVariables.h>
+#include <PSVariables.h>
@@ -194,15 +194,15 @@
{
switch ( aState )
{
- case ESimUsable:
- case ESimReadable:
- return ETrue;
- case ESimStatusUninitialized:
- case ESimNotReady:
- case ESimNotSupported:
- case ESimNotPresent:
- return EFalse;
- default:
+ case ESimUsable:
+ case ESimReadable:
+ return ETrue;
+ case ESimStatusUninitialized:
+ case ESimNotReady:
+ case ESimNotSupported:
+ case ESimNotPresent:
+ return EFalse;
+ default:
return EFalse;
}
}
--- a/phoneclientserver/aiwdialdata/group/aiwdialdata.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/aiwdialdata/group/aiwdialdata.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -33,7 +33,7 @@
SOURCE aiwinternaldialdata.cpp
USERINCLUDE ../inc
-SYSTEMINCLUDE ../../../inc
+SYSTEMINCLUDE ../../../inc
MW_LAYER_SYSTEMINCLUDE
LIBRARY euser.lib
--- a/phoneclientserver/aiwdialdata/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/aiwdialdata/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -25,7 +25,7 @@
../inc/aiwinternaldialdata.h |../../../inc/aiwinternaldialdata.h
../group/aiwdialdata_stub.SIS\
- /epoc32/data/z/system/install/aiwdialdata_stub.SIS
+ /epoc32/data/z/system/install/aiwdialdata_stub.sis
// IBY files
../rom/aiwdialdata.iby CORE_MW_LAYER_IBY_EXPORT_PATH(aiwdialdata.iby)
--- a/phoneclientserver/aiwdialdata/inc/aiwinternaldialdata.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/aiwdialdata/inc/aiwinternaldialdata.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <s32mem.h>
-#include <AiwGenericParam.h>
+#include <AiwGenericParam.h>
#include "aiwdialdata.h"
/** Constants used by aiwinternaldialdata interface. */
--- a/phoneclientserver/dialutils/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/dialutils/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -24,7 +24,7 @@
PRJ_EXPORTS
// Domain
-../group/dialutils_stub.sis /epoc32/data/z/system/install/dialutils_stub.sis
+../group/dialutils_stub.sis /epoc32/data/z/system/install/dialutils_stub.sis
PRJ_MMPFILES
../group/dialutils.mmp
--- a/phoneclientserver/dialutils/group/dialutils.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/dialutils/group/dialutils.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -24,8 +24,8 @@
UID 0x1000008d 0x101F8747
SOURCEPATH ../src
-SOURCE DialUtilsImpl.cpp
-SOURCE DialUtilsFactImpl.cpp
+SOURCE DialUtilsImpl.cpp
+SOURCE DialUtilsFactImpl.cpp
USERINCLUDE ../inc
--- a/phoneclientserver/dialutils/inc/DialUtilsFactImpl.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/dialutils/inc/DialUtilsFactImpl.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
-#include <DialUtils.h>
+#include <dialutils.h>
/**
--- a/phoneclientserver/dialutils/inc/DialUtilsImpl.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/dialutils/inc/DialUtilsImpl.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <e32std.h>
-#include <DialUtils.h>
+#include <dialutils.h>
// FORWARD DECLARATIONS
--- a/phoneclientserver/dialutils/src/DialUtilsFactImpl.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/dialutils/src/DialUtilsFactImpl.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDE FILES
-#include <DialUtils.h>
-#include "DialUtilsFactImpl.h"
-#include "DialUtilsImpl.h"
+#include <dialutils.h>
+#include "DialUtilsFactImpl.h"
+#include "DialUtilsImpl.h"
--- a/phoneclientserver/dialutils/src/DialUtilsImpl.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/dialutils/src/DialUtilsImpl.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,10 +20,10 @@
// INCLUDE FILES
#include <featmgr.h> // Feature Manager.
-#include "DialUtilsImpl.h" // Interface.
+#include "DialUtilsImpl.h" // Interface.
#include <centralrepository.h> // Central repository
-#include <settingsinternalcrkeys.h> // Settings Central Repository keys.
+#include <settingsinternalcrkeys.h> // Settings Central Repository keys.
// CONSTANTS
--- a/phoneclientserver/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,8 @@
#include "../dialutils/group/bld.inf"
#include "../phoneclient/Group/bld.inf"
#include "../phoneserver/Group/bld.inf"
-#include "../CallUI/Group/bld.inf"
-
+// <-- QT PHONE START -->
+//#include "../CallUI/Group/bld.inf"
+// <-- QT PHONE END -->
// End of File
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/inc/CPhCltDialer.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,100 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: It is dialer class.
+*
+*/
+
+
+#ifndef CPHCLTDIALER_H
+#define CPHCLTDIALER_H
+
+// INCLUDES
+#include <cphcltextphonebase.h>
+#include <cphcltextphonedialdata.h>
+
+// FORWARD DECLARATIONS
+class CPhCltDialerDlg;
+
+// CLASS DECLARATION
+
+/**
+* It is dialer class.
+*
+* @lib phoneclient.lib
+* @since 1.0
+*/
+class CPhCltDialer
+ : public CBase
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ *
+ * @return Pointer to created CPhCltDialer instance.
+ */
+ IMPORT_C static CPhCltDialer* NewL();
+
+ /**
+ * Destructor.
+ */
+ ~CPhCltDialer();
+
+
+ public: // New functions
+
+ /**
+ * Dial parameters.
+ *
+ * @return Returns dial data.
+ */
+ IMPORT_C CPhCltExtPhoneDialData& DialData();
+
+ /**
+ * Performs dialing with the dial data.
+ */
+ IMPORT_C void ExecuteLD();
+
+
+ private:
+
+ /**
+ * C++ constructor.
+ */
+ CPhCltDialer();
+
+ /**
+ * Symbian OS constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Cleanup action. Clears iDestroyed & iDialDlg.
+ */
+ static void DoClear( TAny* aAny );
+
+
+ private: // Data
+
+ // Pointer to boolean indicating if this has been destroyed already.
+ TBool* iDestroyed;
+
+ // Dialer dialog
+ CPhCltDialerDlg* iDialDlg;
+
+ };
+
+#endif // CPHCLTDIALER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/inc/CPhCltExtPhoneBase.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,118 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: It defines dial interface for phone client.
+*
+*/
+
+
+#ifndef CPHCLTEXTPHONEBASE_H
+#define CPHCLTEXTPHONEBASE_H
+
+// INCLUDES
+#include <e32base.h>
+#include "phclttypes.h"
+
+// FORWARD DECLARATIONS
+class MPhCltExtPhoneObserver;
+class CPhCltExtPhoneDialData;
+
+// CLASS DECLARATION
+
+/**
+* It defines dial interface for phone client.
+*
+* Usage:
+*
+* To dial, you must have a string of characters from set
+* { 0, 1, 2, .. 9, #, *, +, p, P, w, W }. It is the only
+* mandatory parameter. String may also contain other characters,
+* but then only a note is displayed. So you should proceed as follows:
+* 1. Check that string is acceptable.
+* (application specific grammar)
+* 2. If not, stop. Otherwise continue.
+* 3. Convert to string acceptable by phoneclient.
+* Note PhCltUtils class may help.
+* 4. Dial using the class.
+*
+* Note that dialling does not always mean creating a call.
+* (E.g. *#43# makes phone to interrogate status of call waiting.)
+*
+* In order to dial, you need instance of CPhCltExtPhoneBase. You
+* can create one as follows:
+* iExtCall = CPhCltExtPhoneBase::NewL( this );
+* (the parameter is pointer to observer)
+*
+* Then you must fill dial parameters to instance of TPhCltExtPhoneDialData.
+* (you can read more details from its header)
+*
+* TPhCltExtPhoneDialData data;
+* data.SetTelephoneNumber( .. );
+* ..
+*
+* And finally, you can dial. Note that the method is asynchronous and
+* observer will be informed when phone starts dialing.
+*
+* iExtCall->DialL( data );
+*
+* Finally, you can delete the instance. If dialing is ongoing, this should
+* be done after observer has been informed. You can also delete before that,
+* but then the request might also be canceled.
+*
+* @lib phoneclient.lib
+* @since 1.0
+*/
+class CPhCltExtPhoneBase : public CActive
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Create an instance that implements the interface.
+ *
+ * @param aObserver It is the observer for the instance.
+ * @return Returns the created instance.
+ */
+ IMPORT_C static CPhCltExtPhoneBase* NewL(
+ MPhCltExtPhoneObserver* aObserver );
+
+
+ public: // New fuctions
+
+
+ /**
+ * Makes a new call. This is the preferred way of dialling!
+ *
+ * @param aData The object containing the parameters for
+ * the dial request.
+ */
+ virtual void DialL( CPhCltExtPhoneDialData& aData ) = 0;
+
+
+ protected:
+
+ /**
+ * C++ constructor.
+ */
+ CPhCltExtPhoneBase( MPhCltExtPhoneObserver* aObserver );
+
+
+ protected: // Data
+
+ // Observer to handle events.
+ MPhCltExtPhoneObserver* iObserver;
+
+ };
+
+#endif // CPHCLTEXTPHONEBASE_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/inc/CPhCltExtPhoneDialData.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,575 @@
+/*
+* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: It defines dial data.
+*
+*/
+
+
+#ifndef CPHCLTEXTPHONEDIALDATA_H
+#define CPHCLTEXTPHONEDIALDATA_H
+
+
+// INCLUDES
+#include <e32base.h>
+#include <s32mem.h>
+#include <bldvariant.hrh>
+#include "phclttypes.h"
+#include <cphcltdialdata.h> // Phone Client Notify API
+
+
+// Other constants used in TPhCltExtPhoneDialData ( default values )
+const TBool KPhCltDefaultAllowMatch = ETrue; // Match is allowed
+const TBool KPhCltDefaultNumberEntry = EFalse; // No return to number entry.
+const TInt KPhCltDefaultNumberType = -1; // No number type.
+
+
+// CONSTANTS
+//None.
+
+
+// FORWARD DECLARATIONS
+//None
+
+// CLASS DECLARATION
+/**
+* It defines the structure containing dial information.
+*
+* Fields:
+*
+* window group - When call is ended, set window group is actived.
+*
+* show number - Permission to show number. ETrue if it is allowed.
+*
+* redial - Automatic redial override.
+*
+* name - Name corresponding to number. Name must be defined
+* if shown number equals to EFalse.
+* contact link - Contact link. you should put always when you are dialing
+* from phonebook contact.
+* tel number - String that is to be dialled.
+* number fields are supported.
+* allow match - Permission to allow match. ETrue if match is to be done.
+* If you are dialing from sim pd or fdn, then this should
+* be EFalse.
+* number entry - Returns whether to return to the number entry on failure
+*
+* end other calls - Information if the existing calls are ended before
+* this new one is made.
+* Not mandatory. Set only if you know that the call is an
+* emergency call.
+* subaddress - The calling party subaddress. Supports SAT features.
+* Defined in ITU-T I.330 and 3GPP TS 11.14.
+* SATCall - Set whether this is SAT originated call or not.
+* Supports SAT features.
+* bearer - Bearer capabilities. Supports SAT features.
+*
+* CallType - The type of the call, i.e. voice (default) or video.
+*
+* SendKey - Call made with SendKey, optional.
+*
+* Redial maximum duration - Automatic redial maximum duration
+*
+* Initiate call - true if iniate call false otherwise
+*
+* UUI - User to user information sent on call setup phase.
+*
+* @lib phoneclient.lib
+* @since 3.2
+*/
+/**
+* Dial data set for PhoneClient.
+*
+* @lib ServiceHandler.lib
+* @since Series 60 3.2
+*/
+NONSHARABLE_CLASS( CPhCltExtPhoneDialData ): public CPhCltDialData
+ {
+
+ public:
+ /*
+ * TBools combined to one uint.
+ *
+ * EPhCltCallFlagsDefault
+ * Default flags, if nothing is not specified.
+ * EPhCltCallFlagsAllowNumberShowing
+ * Number showing is allowed.
+ * EPhCltCallFlagsReturnToNumberEntryOnFailure
+ * Return to Number Entry if there is an error.
+ * EPhCltCallFlagsAllowPersonalDirectoryMatching
+ * The number is matched to Personal Directory.
+ * EPhCltCallFlagsEndBeforeDial
+ * Other calls are ended before the new one is done.
+ * EPhCltCallFlagsSAT
+ * If set means that SAT has originated the call.
+ * EPhCltCallFlagsVideoCall
+ * If set means that this is video call.
+ * Otherwise means normal, i.e. voice call.
+ * EPhCltCallFlagsVoIPCall
+ * If set means that this is VoIP call.
+ * Otherwise means normal, i.e. voice call.
+ * EPhCltCallFlagsSendKey
+ * If set means that call made with SendKey.
+ */
+ enum TPhCltCallFlags
+ {
+ EPhCltCallFlagsDefault = 0x0000,
+ EPhCltCallFlagsAllowNumberShowing = 0x0001,
+ EPhCltCallFlagsReturnToNumberEntryOnFailure = 0x0002,
+ EPhCltCallFlagsAllowPersonalDirectoryMatching = 0x0004,
+ EPhCltCallFlagsEndBeforeDial = 0x0008,
+ EPhCltCallFlagsSAT = 0x0020,
+ EPhCltCallFlagsVideoCall = 0x0040,
+ EPhCltCallFlagsVoIPCall = 0x0080,
+ EPhCltCallFlagsSendKey = 0x0100
+ };
+
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CPhCltExtPhoneDialData* NewL();
+
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CPhCltExtPhoneDialData* NewLC();
+
+
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CPhCltExtPhoneDialData* NewL( const TDesC8& aPackage );
+
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CPhCltExtPhoneDialData* NewLC( const TDesC8& aPackage );
+
+ /**
+ * Destructor.
+ */
+ IMPORT_C virtual ~CPhCltExtPhoneDialData();
+
+ public: // New functions
+
+ /**
+ * Fills the parameter list.
+ * @since Series 60 3.2
+ * @param aInParamList In parameter used with CAiwService.
+ */
+ IMPORT_C HBufC8* PackLC();
+
+
+ // Calculates dialdata package size
+ IMPORT_C TInt CalculatePackageSize() const;
+
+ // Sets dial data parameters to CPhCltExtPhoneDialData object
+ void SetParamsL( const TDesC8& aPackage );
+
+
+ public: // Access - Getters
+
+
+ /**
+ * Defines if mathing is allowed.
+ * @since Series 60 3.2
+ * @return Returns the allow match setting information.
+ */
+ IMPORT_C TBool AllowMatch() const;
+
+ /**
+ * Bearer capability.
+ * @since Series 60 3.2
+ * @return Returns bearer capability.
+ */
+ IMPORT_C const TPhCltBearerCapability& Bearer() const;
+
+ /**
+ * Gives the current call type.
+ * @since Series 60 3.2
+ * @return Current call type.
+ */
+ IMPORT_C TPhCltCallType CallType() const ;
+
+ /**
+ * Contact link field.
+ * @since Series 60 3.2
+ * @return Returns contack link item.
+ */
+ IMPORT_C const TDesC8& ContactLink() const;
+
+
+ /**
+ * End other calls param.
+ * @since Series 60 3.2
+ * @return Returns ETrue if other calls will be terminated.
+ * EFalse if calls are not terminated.
+ */
+ IMPORT_C TBool EndOtherCalls() const;
+
+ /**
+ * Intiate Call
+ * @since Series 60 3.2
+ * @return Returns ETrue if call is itiate call EFalse otherwise
+ */
+ IMPORT_C TBool InitiateCall() const;
+
+ /**
+ * Name.
+ * @since Series 60 3.2
+ * @return Returns name.
+ */
+ IMPORT_C const TPhCltNameBuffer& Name() const;
+
+
+ /**
+ * Redial information.
+ * @since Series 60 3.2
+ * @return Return the redial status,
+ */
+ IMPORT_C TInt Redial() const;
+
+ /**
+ * Redial maximum duration
+ * @since Series 60 3.2
+ * @return Returns redial max duration.
+ */
+ IMPORT_C const TTimeIntervalSeconds RedialMaximumDuration() const;
+
+
+ /**
+ * Return in failure.
+ * @since Series 60 3.2
+ * @return Returns whether to return to the number entry.
+ */
+ //IMPORT_C TBool ReturnToNumberEntryOnFailure() const;
+
+ /**
+ * SAT Call.
+ * @since Series 60 3.2
+ * @return Returns ETrue if SAT call EFalse if not.
+ */
+ IMPORT_C TBool SATCall() const;
+
+ /**
+ * SendKey pressed.
+ * @since Series 60 3.2
+ * @return Return ETrue if SendKey used.
+ */
+ IMPORT_C TBool SendKeyPressed() const;
+
+ /**
+ * Show Number.
+ * @since Series 60 3.2
+ * @return Returns the number visibility.
+ */
+ IMPORT_C TBool ShowNumber() const;
+
+ /**
+ * Sub address.
+ * @since Series 60 3.2
+ * @return Returns SAT call sub address.
+ */
+ IMPORT_C const TPhCltSubAddress& SubAddress() const;
+
+ /**
+ * Gives the current phone number.
+ * @since Series 60 3.2
+ * @return Telephone number.
+ */
+ IMPORT_C const TPhCltTelephoneNumber& TelephoneNumber() const;
+
+ /**
+ * Gives the current window group id.
+ * @since Series 60 3.2
+ * @return Window group id.
+ */
+ IMPORT_C TInt WindowGroup() const;
+
+ /**
+ * Gives the user to user information.
+ * @since S60 v3.2
+ * @return User to user information.
+ */
+ IMPORT_C const TDesC& UUI() const;
+
+ public: // Access - Setters
+
+ /**
+ * Set whether the name entered in SetName should be matched
+ * against the personal directory.
+ * @since Series 60 3.2
+ * This should be set EFalse only if phone number has not been
+ * taken from phonebook.
+ *
+ * @param aAllowMatch Whether to allow matches.
+ */
+ IMPORT_C void SetAllowMatch( TBool aAllowMatch );
+
+ /**
+ * Set the bearer capability.
+ * @since Series 60 3.2
+ * @param aBearer The bearer capabilities as defined in GSM 04.08.
+ * @leaves KErrArgument if aBearer's length is longer than KAiwBearerLength
+ */
+ IMPORT_C void SetBearerL( const TPhCltBearerCapability& aBearer );
+
+ /**
+ * Sets call type.
+ * @since Series 60 3.2
+ * @param aCallType calls' type.
+ */
+ IMPORT_C void SetCallType( TPhCltCallType aCallType );
+
+ /**
+ * Set contact link.
+ * @since Series 60 3.2
+ * @param aContactLink Contact link information.
+ */
+ IMPORT_C void SetContactLinkL( const TDesC8& aContactLink );
+
+
+ /**
+ * Set parameter for end other calls.
+ * @since Series 60 3.2
+ * If this is set to ETrue, other calls will be terminated before
+ * dial. Default is EFalse.
+ * @param aEndCalls Are the other calls ended.
+ */
+ IMPORT_C void SetEndOtherCalls( TBool aEndCalls );
+
+ /**
+ * Set Initiate call Etrue or EFalse
+ *@since Series 60 3.2
+ * @param aInitCall ETrue if call is intiate call
+ */
+ IMPORT_C void SetInitiateCall( TBool aInitCall );
+
+
+ /**
+ * Set the name of the person who is to be called.
+ * @since Series 60 3.2
+ * @param aName The name of the person being called.
+ * @leaves KErrArgument if aName length is over 50 characters.
+ */
+ IMPORT_C void SetNameL( const TPhCltNameBuffer& aName );
+
+
+ /**
+ * Change the redial mode.
+ * @since Series 60 3.2
+ * @param aRedial The new redial status
+ */
+
+ IMPORT_C void SetRedial( TInt aRedial );
+
+ /**
+ * Set redial max duration.
+ * @since Series 60 3.2
+ * @param aDuration redial max duration.
+ */
+ IMPORT_C void SetRedialMaximumDuration( TTimeIntervalSeconds aMaximumRedialDuration );
+
+
+ /**
+ * Set whether to return to number entry.
+ *
+ * @param aReturn Whether to return to the number entry editor.
+ */
+ IMPORT_C void SetReturnToNumberEntryOnFailure( TBool aReturn );
+
+ /**
+ * Set wheteher this is a SAT originated call or not.
+ * If this function is not called, the originator is assumed to
+ * be other than SAT.
+ * @since Series 60 3.2
+ * @param aSATCall ETrue if SAT originated the call, EFalse otherwise.
+ */
+ IMPORT_C void SetSATCall( TBool aSATCall );
+
+
+ /**
+ * Set the value of SendKey.
+ * @since Series 60 3.2
+ * @param aSendKey The value of SendKey.
+ */
+ IMPORT_C void SetSendKeyPressed( TBool aSendKey );
+
+ /**
+ * Set the number visibility in the phone app.
+ * @since Series 60 3.2
+ * If this is set to EFalse, then number is not shown or written to
+ * log event.
+ * @param aShowNumber Whether or not to show the number.
+ */
+ IMPORT_C void SetShowNumber( TBool aShowNumber );
+
+ /**
+ * Set the calling party subaddress.
+ * Defined in ITU-T I.330 and 3GPP TS 11.14.
+ * @since Series 60 3.2
+ * @param aSubAddress The calling party subaddress.
+ * @leaves KErrArgument if aSubAddress length is longer than
+ * KAiwSubAddressLength
+ */
+ IMPORT_C void SetSubAddressL( const TPhCltSubAddress& aSubAddress );
+
+ /**
+ * Sets the phone number.
+ * @since Series 60 3.2
+ * @param aNumber Phone number, which maximum length is
+ * KMaximumPhoneNumberLength.
+ * @leaves KErrArgument if aPhoneNumber length is over KMaximumPhoneNumberLength
+ */
+ IMPORT_C void SetTelephoneNumber( const TPhCltTelephoneNumber& aNumber );
+
+ /**
+ * Sets the window group identifier. When call is ended, set window group is actived.
+ * @since Series 60 3.2
+ * @param aWindowGroup Window group id.
+ */
+ IMPORT_C void SetWindowGroup( TInt aWindowGroup );
+
+ /**
+ * Set the value of xSP Service Id.
+ *
+ * @param aServiceId The value of Service Id.
+ */
+ IMPORT_C void SetServiceId( TUint32 aServiceId );
+
+
+ /**
+ * Service Id. VoIP2.2 implementation
+ * @return Return service id or zero.
+ */
+ IMPORT_C TUint32 ServiceId() const;
+
+
+ /**
+ * Sets user to user information. Maximum length is
+ * KPhCltUUILength.
+ * @param aUUI User to user information.
+ * @since S60 v3.2
+ */
+ IMPORT_C void SetUUIL( const TDesC& aUUI );
+
+
+
+
+
+ // Constructors
+
+ private:
+
+ /**
+ * C++ default constructor.
+ * @since Series 60 3.2
+ */
+ CPhCltExtPhoneDialData();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ * @since Series 60 3.2
+ */
+ void ConstructL();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ * @since Series 60 3.2
+ * @param aPackage including dial data
+ */
+ void ConstructL( const TDesC8& aPackage );
+
+
+ //Private functions
+
+ private:
+ /**
+ * Calculates variable descriptor size
+ * @since Series 60 3.2
+ * @param aDescriptor which size is calculated
+ */
+ TInt CalculateDescriptorSize( const TDesC& aDescriptor ) const;
+
+ /**
+ * Calculates variable descriptor size
+ * @since Series 60 3.2
+ * @param aDescriptor which size is calculated
+ */
+ TInt CalculateDescriptorSize( const TDesC8& aDescriptor ) const;
+
+ /**
+ * Read descriptor value from stream
+ * @since Series 60 3.2
+ * @param aStream used stream
+ * @param aDescriptor which is read from stream
+ */
+ void ReadDescriptorFromStreamL( RDesReadStream& aStream, HBufC8*& aDescriptor );
+
+ /**
+ * Read descriptor value from stream
+ * @since Series 60 3.2
+ * @param aStream used stream
+ * @param aDescriptor which is read from stream
+ */
+ void ReadDescriptorFromStreamL( RDesReadStream& aStream, HBufC*& aDescriptor );
+
+ /**
+ * Write descriptor value to stream
+ * @since Series 60 3.2
+ * @param aStream used stream
+ * @param aDescriptor which value is write to stream
+ */
+ void WriteDescriptorToStreamL( RDesWriteStream& aStream, const TDesC8& aDescriptor );
+
+ /**
+ * Write descriptor value to stream
+ * @since Series 60 3.2
+ * @param aStream used stream
+ * @param aDescriptor which value is write to stream
+ */
+ void WriteDescriptorToStreamL( RDesWriteStream& aStream, const TDesC& aDescriptor );
+
+
+ /**
+ * Copy descriptor value to member descriptor
+ * @since Series 60 3.2
+ * @param aSource which is as copy source
+ * @param aMemberDescriptor is as copy destination
+ */
+ void CopyDescriptorToMemberDescriptorL( const TDesC& aSource, HBufC*& aMemberDescriptor );
+
+ /**
+ * Copy descriptor value to member descriptor
+ * @since Series 60 3.2
+ * @param aSource which is as copy source
+ * @param aMemberDescriptor is as copy destination
+ */
+ void CopyDescriptorToMemberDescriptorL( const TDesC8& aSource, HBufC8*& aMemberDescriptor );
+
+
+ /**
+ * Check descriptor max length
+ * Leaves with KErrArgument if aDescriptorLength is greated that aMaxAllowedDescriptorLenght
+ * @since Series 60 3.2
+ * @param aDescriptorLength is descriptor length
+ * @param aMaxAllowedDescriptorLength maximum allowed descriptor length
+ */
+ void CheckDescriptorMaxLengthL( TInt aDescriptorLength, TInt aMaxAllowedDescriptorLength ) const;
+
+
+ };
+
+#endif // CPHCLTEXTPHONEDIALDATA_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/inc/MPhCltExtPhoneObserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: It defines the interface for the observers of
+* the CPhCltExtPhoneBase.
+*
+*/
+
+
+#ifndef MPHCLTEXTPHONEOBSERVER_H
+#define MPHCLTEXTPHONEOBSERVER_H
+
+// CLASS DECLARATION
+
+/**
+* Defines the interface for the observers of the CPhCltExtPhoneBase.
+*
+* @lib phoneclient.lib
+* @since 1.0
+*/
+class MPhCltExtPhoneObserver
+ {
+ public: // New functions
+
+ /**
+ * It is called whenever client's dial request is completed.
+ *
+ * @param aStatus It is the status of the operation.
+ * <0 means Symbian OS error code.
+ */
+ virtual void HandleDialL( const TInt aStatus ) = 0;
+
+ };
+
+#endif // MPHCLTEXTPHONEOBSERVER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/inc/RPhCltEmergencyCall.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,233 @@
+/*
+* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Client side access to emergency call
+*
+*/
+
+
+#ifndef RPhCltEmergencyCall_H
+#define RPhCltEmergencyCall_H
+
+// INCLUDES
+#include <e32std.h>
+#include "phclttypes.h"
+#include "rphcltserver.h"
+
+/**
+* Emergency number query mode
+*/
+enum TPhCltEmergencyNumberQueryMode
+ {
+ EPhCltEmergencyNumberQueryModeNormal = 0, // Normal mode
+ EPhCltEmergencyNumberQueryModeAdvanced, // advanced mode
+ EPhCltEmergencyNumberQueryModeNormalWriteback // Same as "normal", but writes back emergency number
+ };
+
+// FORWARD DECLARATIONS
+
+// CLASS DECLARATION
+
+/**
+* Client side access to emergency call
+*
+* @lib phoneclient.lib
+* @since Series60_1.0
+*/
+class RPhCltEmergencyCall : public RSubSessionBase
+ {
+ public: // Constructors and destructor
+
+ /**
+ * C++ default constructor.
+ */
+ RPhCltEmergencyCall();
+
+
+ public: // New functions
+
+ /**
+ * Opens the subsession.
+ *
+ * @param aServer It is the session of which subsession this is.
+ * @return Returns error code.
+ */
+ TInt Open( RPhCltServer& aServer );
+
+ /**
+ * Closes the subsession.
+ */
+ void Close();
+
+
+ public:
+
+ /**
+ * Returns information whether the number specified was an emergency number.
+ *
+ * @param aNumber Number to be queried. aNumber might contain prefix (SS code)
+ * and/or postfix (DTMF part).
+ * The aNumber parameter should be a buffer and the
+ * clients are provided with a typedef called
+ * TPhCltEmergencyNumber, which is equivalent to a
+ * TBuf< KPhCltEmergencyNumberSize > where
+ * KPhCltEmergencyNumberSize is defined as 100.
+ *
+ * @param aIsEmergencyNumber If ETrue, then the aNumber
+ * parameter included emergency number.
+ * @return Returns error code of the success of the operation.
+ */
+ TInt IsEmergencyPhoneNumber(
+ const TDesC& aNumber,
+ TBool& aIsEmergencyNumber );
+
+ /**
+ * Method can be used to check if the number specified contains
+ * a valid emergency number in the end of the number.
+ *
+ * @param aNumber Number to be queried, matched emergency number
+ * is returned in this parameter.
+ * The aNumber parameter should be a buffer and the
+ * clients are provided with a typedef called
+ * TPhCltTelephoneNumberwhich is equivalent to a
+ * TBuf< KPhCltTelephoneNumberLength > where
+ * KPhCltTelephoneNumberLength is defined as 100.
+ *
+ * @param aIsEmergencyNumber If ETrue, then the aNumber parameter
+ * was emergency number.
+ * @return Returns error code of the success of the operation.
+ */
+ TInt FindEmergencyPhoneNumber(
+ TDes& aNumber,
+ TBool& aIsEmergencyNumber );
+
+ /**
+ * Initiates an emergency call.
+ *
+ * @param aReqStatus On return, KErrNone if the emergency call successfully reaches
+ * the connected state. If the call set-up fails, the function
+ * member will complete with an error.
+ *
+ * @param aNumber Emergency number to be dialed (optional).
+ * The aNumber parameter should be a buffer and the
+ * clients are provided with a typedef called
+ * TPhCltEmergencyNumber,which is equivalent to a
+ * TBuf< KPhCltEmergencyNumberSize > where
+ * KPhCltEmergencyNumberSize is defined as 100.
+ *
+ * If the aNumber parameter supplies an "empty" buffer
+ * the call is created either dialing the default emergency
+ * phone number or use the SET UP EMERGENCY request
+ * that does not contain a dialling number.
+ *
+ * @pre IsActive() returns EFalse, otherwise leaves with KErrInUse.
+ */
+ void DialEmergencyCall( TRequestStatus& aReqStatus, TDesC8& aNumber );
+
+ /**
+ * Cancels an emergency call.
+ *
+ */
+ void CancelDialEmergencyCall();
+
+ /**
+ * Returns information whether the number specified was an emergency
+ * number and also returns the plain emergency number.
+ *
+ * @param aNumber Number to be queried.aNumber might contain prefix (SS code)
+ * and/or postfix (DTMF part).
+ * The aNumber parameter should be a buffer and the
+ * clients are provided with a typedef called
+ * TPhCltEmergencyNumberwhich is equivalent to a
+ * TBuf< KPhCltEmergencyNumberSize > where
+ * KPhCltEmergencyNumberSize is defined as 100.
+ *
+ * @param aMatchedEmergencyNumber Matched emergencynumber without prefix or
+ * postfix is returned in this parameter. The aMatchedEmergencyNumber
+ * parameter should be a buffer and the clients are
+ * provided with atypedef called TPhCltEmergencyNumber,
+ * which is equivalent to a TBuf< KPhCltEmergencyNumberSize >
+ * where KPhCltEmergencyNumberSize is defined as 100.
+ *
+ * @param aIsEmergencyNumber If ETrue, then the aNumber
+ * parameter included emergency number.
+ *
+ * @return Returns error code of the success of the operation.
+ */
+ TInt IsEmergencyPhoneNumber(
+ const TDesC& aNumber,
+ TDes& aMatchedEmergencyNumber,
+ TBool& aIsEmergencyNumber );
+
+ private:
+
+ /**
+ * Extract telephone number from string. If EFalse is returned
+ * then aString does not contain valid emergency number
+ *
+ * @param aString string from which those characters are removed.
+ *
+ * @return ETrue - aString can be emergency number and aString
+ * contains a telephone number
+ * EFalse - aString cannot be emergency number and aString
+ * does not contain a number that can be emergency number
+ */
+ TBool ExtractTelephoneNumber( TDes& aString );
+
+ /**
+ * Finds start of dtmf string in string.
+ *
+ * @param aString Telephone number
+ *
+ * @return Index where dtmf string starts or KErrNotFound if no
+ * dtmf found.
+ *
+ */
+ TInt FindStartOfDtmfString( const TDesC& aString );
+
+ /**
+ * Removes CLIR ss code from beginning of the string if CLIR is
+ * found from string.
+ *
+ * @param aString Telephone number
+ */
+ void RemoveCLIR( TDes& aString );
+
+ /**
+ * Removes DTMF string from string.
+ *
+ * @param aString Telephone number.
+ */
+ void RemoveDTMF( TDes& aString );
+
+ /**
+ * Executes checks to given phone number to find out if it is a valid
+ * emergency number.
+ *
+ * @param aString Telephone number
+ * @param aIsEmergencyNumber If ETrue, then the aNumber parameter
+ * was a valid emergency number.
+ *
+ * @return Returns error code of the success of the operation.
+ *
+ */
+ TInt ValidateNumber( TDes& aString, TBool& aIsEmergencyNumber,
+ const TBool aWriteEmergencyNumBack );
+
+
+
+ };
+
+#endif // RPhCltEmergencyCall_H
+
+// End of File
--- a/phoneclientserver/phoneclient/Data/PhoneClient.rss Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Data/PhoneClient.rss Fri Mar 19 09:40:14 2010 +0200
@@ -23,7 +23,7 @@
#include <eikon.rh>
#include <avkon.loc>
-#include "PhoneClient.hrh"
+#include "PhoneClient.hrh"
#include "eikon.rsg"
#include <avkon.rsg>
#include <avkon.rh>
--- a/phoneclientserver/phoneclient/Group/PhoneClient.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Group/PhoneClient.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -28,68 +28,68 @@
TARGETTYPE dll
UID 0x1000008d 0x1000084F
-SOURCEPATH ../Src/Notifier/Notifier_Aiw
+SOURCEPATH ../src/notifier/Notifier_Aiw
SOURCE CPhCltCallNotify.cpp
-SOURCE RPhCltCallNotify.cpp
+SOURCE RPhCltCallNotify.cpp
SOURCE cphcltdialrequestmonitor.cpp
SOURCE cphcltdialemergencyrequestmonitor.cpp
SOURCE cphcltcomhandrequestmonitor.cpp
-SOURCEPATH ../Src/ExtCall/ExtCall_Aiw
-SOURCE RPhCltExtCall.cpp
-SOURCE CPhCltExtPhoneDialData.cpp
+SOURCEPATH ../src/extcall/ExtCall_Aiw
+SOURCE RPhCltExtCall.cpp
+SOURCE CPhCltExtPhoneDialData.cpp
SOURCE cphcltdialdata.cpp
-SOURCEPATH ../Src/ExtCallWrapper/ExtCallWrapper_Aiw
-SOURCE CPhCltExtPhone.cpp
-SOURCE CPhCltExtPhoneBase.cpp
+SOURCEPATH ../src/extcallwrapper/ExtCallWrapper_Aiw
+SOURCE CPhCltExtPhone.cpp
+SOURCE CPhCltExtPhoneBase.cpp
-SOURCEPATH ../Src/Ussd/ussd_ext
+SOURCEPATH ../src/ussd/ussd_ext
SOURCE rphcltussd.cpp
-SOURCEPATH ../Src/UssdWrapper
-SOURCE CPhCltUssdRequestHandler.cpp
+SOURCEPATH ../src/UssdWrapper
+SOURCE CPhCltUssdRequestHandler.cpp
-SOURCE CPhCltUssdSatClient.cpp
+SOURCE CPhCltUssdSatClient.cpp
-SOURCE CPhCltUssdInt.cpp
-SOURCE CPhCltUssdImp.cpp
-SOURCE CPhCltUssdExt.cpp
+SOURCE CPhCltUssdInt.cpp
+SOURCE CPhCltUssdImp.cpp
+SOURCE CPhCltUssdExt.cpp
-SOURCE CPhCltUssdNoteController.cpp
+SOURCE CPhCltUssdNoteController.cpp
-SOURCEPATH ../Src/EmergencyNumber/EmergencyNumber_Aiw
-SOURCE CPhCltEmergencyCall.cpp
-SOURCE RPhCltEmergencyCall.cpp
-SOURCE CPhCltEmergencyCallImpl.cpp
+SOURCEPATH ../src/emergencynumber/EmergencyNumber_Aiw
+SOURCE CPhCltEmergencyCall.cpp
+SOURCE RPhCltEmergencyCall.cpp
+SOURCE CPhCltEmergencyCallImpl.cpp
-SOURCEPATH ../Src/Session
-SOURCE RPhCltServer.cpp
+SOURCEPATH ../src/Session
+SOURCE RPhCltServer.cpp
-SOURCEPATH ../Src
-SOURCE PhCltUtils.cpp
-SOURCE RPhCltResourceFile.cpp
+SOURCEPATH ../Src
+SOURCE PhCltUtils.cpp
+SOURCE RPhCltResourceFile.cpp
-SOURCEPATH ../Src/CommandHandler
-SOURCE CPhCltCommandHandler.cpp
-SOURCE CPhCltComHandImplementation.cpp
-SOURCE RPhCltCommandHandler.cpp
-SOURCEPATH ../Src/ImageHandler
-SOURCE CPhCltImageHandler.cpp
-SOURCE CPhCltBaseImageParams.cpp
-SOURCE CPhCltOperatorLogoContainer.cpp
-SOURCE CPhCltImageHandlerImplementation.cpp
-SOURCE RPhCltImageHandler.cpp
-SOURCEPATH ../Src/Messenger
-SOURCE CPhCltMessenger.cpp
-SOURCE RPhCltMessenger.cpp
-SOURCE CPhCltMessengerImplementation.cpp
+SOURCEPATH ../src/CommandHandler
+SOURCE CPhCltCommandHandler.cpp
+SOURCE CPhCltComHandImplementation.cpp
+SOURCE RPhCltCommandHandler.cpp
+SOURCEPATH ../src/ImageHandler
+SOURCE CPhCltImageHandler.cpp
+SOURCE CPhCltBaseImageParams.cpp
+SOURCE CPhCltOperatorLogoContainer.cpp
+SOURCE CPhCltImageHandlerImplementation.cpp
+SOURCE RPhCltImageHandler.cpp
+SOURCEPATH ../src/Messenger
+SOURCE CPhCltMessenger.cpp
+SOURCE RPhCltMessenger.cpp
+SOURCE CPhCltMessengerImplementation.cpp
-SOURCEPATH ../Src
-START RESOURCE ../Data/PhoneClient.rss
+SOURCEPATH ../Src
+START RESOURCE ../data/PhoneClient.rss
HEADER
TARGETPATH RESOURCE_FILES_DIR
LANGUAGE_IDS
@@ -98,20 +98,20 @@
MW_LAYER_SYSTEMINCLUDE
SYSTEMINCLUDE ../../../inc
-USERINCLUDE ../Inc/ExtCall/ExtCall_Aiw
-USERINCLUDE ../Inc/Notifier/Notifier_Aiw
-USERINCLUDE ../Inc/ExtCallWrapper/ExtCallWrapper_Aiw
-USERINCLUDE ../Inc/EmergencyNumber/EmergencyNumber_Aiw
+USERINCLUDE ../inc/extcall/ExtCall_Aiw
+USERINCLUDE ../inc/notifier/Notifier_Aiw
+USERINCLUDE ../inc/extcallwrapper/ExtCallWrapper_Aiw
+USERINCLUDE ../inc/emergencynumber/EmergencyNumber_Aiw
-USERINCLUDE ../Inc/Session
-USERINCLUDE ../Inc/SharedClientServer
+USERINCLUDE ../inc/Session
+USERINCLUDE ../inc/SharedClientServer
-USERINCLUDE ../Inc/UssdWrapper/Ussd_Ext
-USERINCLUDE ../Inc/Ussd/ussd_ext
-USERINCLUDE ../Inc/CommandHandler
-USERINCLUDE ../Inc/ImageHandler
-USERINCLUDE ../Inc/Messenger
-USERINCLUDE ../Inc/UssdWrapper
+USERINCLUDE ../inc/ussdwrapper/Ussd_Ext
+USERINCLUDE ../inc/ussd/ussd_ext
+USERINCLUDE ../inc/CommandHandler
+USERINCLUDE ../inc/ImageHandler
+USERINCLUDE ../inc/Messenger
+USERINCLUDE ../inc/UssdWrapper
USERINCLUDE ../Inc
--- a/phoneclientserver/phoneclient/Group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -23,23 +23,23 @@
PRJ_EXPORTS
- ../Inc/EmergencyNumber/EmergencyNumber_Aiw/RPhCltEmergencyCall.h |../../inc/rphcltemergencycall.h
- ../Inc/misc/telservicesinternalcrkeys.h |../../../inc/telservicesinternalcrkeys.h
- ../Inc/misc/telservicesvariant.hrh |../../../inc/telservicesvariant.hrh
- ../Inc/ExtCall/ExtCall_Aiw/CPhCltExtPhoneDialData.h |../../inc/cphcltextphonedialdata.h
- ../Inc/ExtCallWrapper/ExtCallWrapper_Aiw/MPhCltExtPhoneObserver.h |../../inc/mphcltextphoneobserver.h
- ../Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhoneBase.h |../../inc/cphcltextphonebase.h
- ../Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialer.h |../../inc/cphcltdialer.h
+ ../inc/emergencynumber/emergencynumber_aiw/RPhCltEmergencyCall.h |../../inc/RPhCltEmergencyCall.h
+ ../inc/misc/telservicesinternalcrkeys.h |../../../inc/telservicesinternalcrkeys.h
+ ../inc/misc/telservicesvariant.hrh |../../../inc/telservicesvariant.hrh
+ ../inc/extcall/extcall_aiw/CPhCltExtPhoneDialData.h |../../inc/CPhCltExtPhoneDialData.h
+ ../inc/extcallwrapper/extcallwrapper_aiw/MPhCltExtPhoneObserver.h |../../inc/MPhCltExtPhoneObserver.h
+ ../inc/extcallwrapper/extcallwrapper_aiw/CPhCltExtPhoneBase.h |../../inc/CPhCltExtPhoneBase.h
+ ../inc/extcallwrapper/extcallwrapper_aiw/CPhCltDialer.h |../../inc/CPhCltDialer.h
-../Data/Phoneclient_stub.SIS /epoc32/data/z/system/install/phoneclient_stub.sis
+../data/Phoneclient_stub.SIS /epoc32/data/z/system/install/Phoneclient_stub.SIS
// IBY files
../rom/PhoneClient.iby CORE_MW_LAYER_IBY_EXPORT_PATH(PhoneClient.iby)
// Generic configuration interface for component cenrep settings
../conf/telephonyservices.confml MW_LAYER_CONFML(telephonyservices.confml)
-../conf/telephonyservices_102029AC.crml MW_LAYER_CRML(telephonyservices_102029AC.crml)
-../conf/telephonyservices_102078F1.crml MW_LAYER_CRML(telephonyservices_102078F1.crml)
+../conf/telephonyservices_102029AC.crml MW_LAYER_CRML(telephonyservices_102029AC.crml)
+../conf/telephonyservices_102078F1.crml MW_LAYER_CRML(telephonyservices_102078F1.crml)
PRJ_MMPFILES
../Group/PhoneClient.mmp
--- a/phoneclientserver/phoneclient/Inc/CommandHandler/CPhCltComHandImplementation.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/CommandHandler/CPhCltComHandImplementation.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,9 +23,9 @@
// INCLUDES
-#include "RPhCltCommandHandler.h"
-#include "RPhCltCommandHandlerNotify.h"
-#include "RPhCltServer.h"
+#include "RPhCltCommandHandler.h"
+#include "RPhCltCommandHandlerNotify.h"
+#include "rphcltserver.h"
// CLASS DECLARATION
@@ -59,7 +59,7 @@
/**
* @see CPhCltCommandHandler.
*/
- void Atd(
+ void Atd(
TRequestStatus& aStatus,
const TPhCltTelephoneNumber& aTelephoneNumber );
--- a/phoneclientserver/phoneclient/Inc/CommandHandler/RPhCltCommandHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/CommandHandler/RPhCltCommandHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,9 +23,9 @@
// INCLUDES
#include <e32base.h>
-#include <PhCltTypes.h>
-//#include "CPhCltCommandHandlerNotify.h"
-#include "CPhCltCommandHandler.h"
+#include <phclttypes.h>
+//#include "cphcltcommandhandlernotify.h"
+#include "cphcltcommandhandler.h"
// FORWARD DECLARATIONS
class RPhCltServer;
@@ -77,10 +77,10 @@
* @param aTelephoneNumber The telephony number .
*/
- void Atd(
+ void Atd(
TRequestStatus& aStatus,
const TPhCltTelephoneNumber& aTelephoneNumber );
-
+
/**
* Answer the call.
--- a/phoneclientserver/phoneclient/Inc/EmergencyNumber/CPhCltEmergencyTelNumber.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/EmergencyNumber/CPhCltEmergencyTelNumber.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,8 +21,8 @@
// INCLUDES
#include <e32std.h>
-#include "PhCltTypes.h"
-#include "RPhCltServer.h"
+#include "phclttypes.h"
+#include "rphcltserver.h"
// CLASS DECLARATION
--- a/phoneclientserver/phoneclient/Inc/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCallImpl.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCallImpl.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,9 +21,9 @@
// INCLUDES
#include <e32std.h>
-#include "RPhCltServer.h"
-#include "CPhCltEmergencyCall.h"
-#include "RPhCltEmergencyCall.h"
+#include "rphcltserver.h"
+#include "cphcltemergencycall.h"
+#include "RPhCltEmergencyCall.h"
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneclient/Inc/EmergencyNumber/EmergencyNumber_Aiw/RPhCltEmergencyCall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/EmergencyNumber/EmergencyNumber_Aiw/RPhCltEmergencyCall.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,8 +21,8 @@
// INCLUDES
#include <e32std.h>
-#include "PhCltTypes.h"
-#include "RPhCltServer.h"
+#include "phclttypes.h"
+#include "rphcltserver.h"
/**
* Emergency number query mode
@@ -169,8 +169,8 @@
TDes& aMatchedEmergencyNumber,
TBool& aIsEmergencyNumber );
- private:
-
+ private:
+
/**
* Extract telephone number from string. If EFalse is returned
* then aString does not contain valid emergency number
@@ -214,9 +214,9 @@
* Executes checks to given phone number to find out if it is a valid
* emergency number.
*
- * @param aString Telephone number
- * @param aIsEmergencyNumber If ETrue, then the aNumber parameter
- * was a valid emergency number.
+ * @param aString Telephone number
+ * @param aIsEmergencyNumber If ETrue, then the aNumber parameter
+ * was a valid emergency number.
*
* @return Returns error code of the success of the operation.
*
--- a/phoneclientserver/phoneclient/Inc/EmergencyNumber/RPhCltEmergencyNumber.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/EmergencyNumber/RPhCltEmergencyNumber.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,8 +21,8 @@
#define RPHCLTEMERGENCYNUMBER_H
// INCLUDES
-#include "PhCltTypes.h"
-#include "RPhCltServer.h"
+#include "phclttypes.h"
+#include "rphcltserver.h"
#include <e32std.h>
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/CPhCltExtPhoneDialData.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/CPhCltExtPhoneDialData.h Fri Mar 19 09:40:14 2010 +0200
@@ -24,7 +24,7 @@
#include <e32base.h>
#include <s32mem.h>
#include <bldvariant.hrh>
-#include "PhCltTypes.h"
+#include "phclttypes.h"
#include <cphcltdialdata.h> // Phone Client Notify API
@@ -145,12 +145,12 @@
IMPORT_C static CPhCltExtPhoneDialData* NewLC();
- /**
+ /**
* Two-phased constructor.
*/
IMPORT_C static CPhCltExtPhoneDialData* NewL( const TDesC8& aPackage );
- /**
+ /**
* Two-phased constructor.
*/
IMPORT_C static CPhCltExtPhoneDialData* NewLC( const TDesC8& aPackage );
@@ -160,7 +160,7 @@
*/
IMPORT_C virtual ~CPhCltExtPhoneDialData();
- public: // New functions
+ public: // New functions
/**
* Fills the parameter list.
@@ -213,7 +213,7 @@
* End other calls param.
* @since Series 60 3.2
* @return Returns ETrue if other calls will be terminated.
- * EFalse if calls are not terminated.
+ * EFalse if calls are not terminated.
*/
IMPORT_C TBool EndOtherCalls() const;
@@ -303,9 +303,9 @@
*/
IMPORT_C const TDesC& UUI() const;
- public: // Access - Setters
-
- /**
+ public: // Access - Setters
+
+ /**
* Set whether the name entered in SetName should be matched
* against the personal directory.
* @since Series 60 3.2
@@ -315,8 +315,8 @@
* @param aAllowMatch Whether to allow matches.
*/
IMPORT_C void SetAllowMatch( TBool aAllowMatch );
-
- /**
+
+ /**
* Set the bearer capability.
* @since Series 60 3.2
* @param aBearer The bearer capabilities as defined in GSM 04.08.
@@ -469,9 +469,9 @@
// Constructors
- private:
-
- /**
+ private:
+
+ /**
* C++ default constructor.
* @since Series 60 3.2
*/
--- a/phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/RPhCltCallNotify.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/RPhCltCallNotify.h Fri Mar 19 09:40:14 2010 +0200
@@ -69,7 +69,7 @@
*/
void NotifyCallAttempt(
TRequestStatus& aStatus,
- TPckg< TInt >& aDataLength );
+ TPckg< TInt >& aDataLength );
/**
* Cancel pending call attempt notification.
*/
@@ -94,7 +94,7 @@
void NotifyEmergencyCall(
TRequestStatus& aStatus,
TDes8& aEmergencyNumber
- );
+ );
/**
* Cancel pending call attempt notification.
*/
--- a/phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/RPhCltExtCall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/ExtCall/ExtCall_Aiw/RPhCltExtCall.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,8 +21,8 @@
// INCLUDES
#include <e32std.h>
-#include "PhCltTypes.h"
-#include "RPhCltServer.h"
+#include "phclttypes.h"
+#include "rphcltserver.h"
// FORWARD DECLARATIONS
class CPhCltExtPhoneDialData;
@@ -59,7 +59,7 @@
* Closes the subsession.
*/
void Close();
-
+
/**
* Makes a call (asynchronous).
*
@@ -84,7 +84,7 @@
// Prohibit assigment operator
RPhCltExtCall& operator= ( const RPhCltExtCall& );
-
+
--- a/phoneclientserver/phoneclient/Inc/ExtCall/RPhCltExtCall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/ExtCall/RPhCltExtCall.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,8 +21,8 @@
// INCLUDES
#include <e32std.h>
-#include "PhCltTypes.h"
-#include "RPhCltServer.h"
+#include "phclttypes.h"
+#include "rphcltserver.h"
// FORWARD DECLARATIONS
class TPhCltExtPhoneDialData;
--- a/phoneclientserver/phoneclient/Inc/ExtCall/TPhCltExtPhoneDialData.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/ExtCall/TPhCltExtPhoneDialData.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
-#include "PhCltTypes.h"
+#include "phclttypes.h"
// Constant used as window group id to indicate that we wish to go to idle.
const TInt KPhCltGoToIdle = 0;
@@ -30,7 +30,7 @@
const TInt KPhCltRedialDefault = -1; // Default redial.
const TInt KPhCltRedialOff = -2; // Redial is off.
const TInt KPhCltRedialWithDefaultTime = -3; // Redial on, with default time.
-const TInt KPhCltRedial = 0; // Forced redial.
+const TInt KPhCltRedial = 0; // Forced redial.
// Other constants used in TPhCltExtPhoneDialData ( default values )
const TBool KPhCltDefaultAllowMatch = ETrue; // Match is allowed
--- a/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialer.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
#define CPHCLTDIALER_H
// INCLUDES
-#include <CPhCltExtPhoneBase.h>
-#include <CPhCltExtPhoneDialData.h>
+#include <cphcltextphonebase.h>
+#include <cphcltextphonedialdata.h>
// FORWARD DECLARATIONS
class CPhCltDialerDlg;
--- a/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialerDlg.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialerDlg.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,9 +21,9 @@
// INCLUDES
#include <eikdialg.h>
-#include "MPhCltExtPhoneObserver.h"
-#include "CPhCltExtPhoneBase.h"
-#include <CPhCltExtPhoneDialData.h>
+#include "mphcltextphoneobserver.h"
+#include "cphcltextphonebase.h"
+#include <cphcltextphonedialdata.h>
// FORWARD DECLARATIONS
class CPhCltExtPhoneBase;
--- a/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhone.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhone.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,9 +21,9 @@
// INCLUDES
#include <e32base.h>
-#include "CPhCltExtPhoneBase.h"
-#include "RPhCltServer.h"
-#include "RPhCltExtCall.h"
+#include "CPhCltExtPhoneBase.h"
+#include "rphcltserver.h"
+#include "RPhCltExtCall.h"
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhoneBase.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhoneBase.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <e32base.h>
-#include "PhCltTypes.h"
+#include "phclttypes.h"
// FORWARD DECLARATIONS
class MPhCltExtPhoneObserver;
--- a/phoneclientserver/phoneclient/Inc/Ihf/RPhCltIhf.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/Ihf/RPhCltIhf.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <etelmm.h> // ETel
-#include "PhCltTypes.h"
+#include "phclttypes.h"
// FORWARD DECLARATIONS
class RWsSession;
--- a/phoneclientserver/phoneclient/Inc/ImageHandler/CPhCltImageHandlerImplementation.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/ImageHandler/CPhCltImageHandlerImplementation.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,9 +22,9 @@
// INCLUDES
-#include <CPhCltImageHandler.h>
-#include "RPhCltImageHandler.h"
-#include "RPhCltServer.h"
+#include <cphcltimagehandler.h>
+#include "RPhCltImageHandler.h"
+#include "rphcltserver.h"
/**
* Implementation of image handler interface.
--- a/phoneclientserver/phoneclient/Inc/ImageHandler/CPhCltOperatorLogoContainer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/ImageHandler/CPhCltOperatorLogoContainer.h Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
#define CPHCLTOPERATORLOGOCONTAINER_H
// INCLUDES
-#include <CPhCltBaseImageParams.h>
+#include <cphcltbaseimageparams.h>
#include <fbs.h>
// CLASS DECLARATION
--- a/phoneclientserver/phoneclient/Inc/ImageHandler/RPhCltImageHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/ImageHandler/RPhCltImageHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,9 +20,9 @@
// INCLUDES
#include <e32base.h>
-#include <PhCltTypes.h>
-#include "CPhCltOperatorLogoContainer.h"
-#include "CPhCltBaseImageParams.h"
+#include <phclttypes.h>
+#include "CPhCltOperatorLogoContainer.h"
+#include "cphcltbaseimageparams.h"
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneclient/Inc/Messenger/CPhCltMessengerImplementation.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/Messenger/CPhCltMessengerImplementation.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,9 +22,9 @@
// INCLUDES
-#include <CPhCltMessenger.h>
-#include "RPhCltMessenger.h"
-#include "RPhCltServer.h"
+#include <cphcltmessenger.h>
+#include "RPhCltMessenger.h"
+#include "rphcltserver.h"
/**
* Implementation of the CPhCltMessenger interface.
--- a/phoneclientserver/phoneclient/Inc/Messenger/RPhCltMessenger.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/Messenger/RPhCltMessenger.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
-#include <CPhCltMessenger.h>
+#include <cphcltmessenger.h>
// FORWARD DECLARATIONS
class RPhCltServer;
--- a/phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltcomhandrequestmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltcomhandrequestmonitor.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <e32base.h>
-#include <PhCltTypes.h>
+#include <phclttypes.h>
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltdialemergencyrequestmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltdialemergencyrequestmonitor.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <e32base.h>
-#include <PhCltTypes.h>
+#include <phclttypes.h>
// FORWARD DECLARATIONS
@@ -69,7 +69,7 @@
*
* @param aResultCode Result of the response.
*/
- TInt RespondEmergencyToClient( const TInt aResultCode );
+ TInt RespondEmergencyToClient( const TInt aResultCode );
private:
--- a/phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltdialrequestmonitor.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/Notifier/Notifier_Aiw/cphcltdialrequestmonitor.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <e32base.h>
-#include <PhCltTypes.h>
+#include <phclttypes.h>
// FORWARD DECLARATIONS
class RPhCltServer;
@@ -60,7 +60,7 @@
* @param aObserver dial request observer
*/
void NotifyDialRequest(
- MPhCltDialRequestObserver* aObserver );
+ MPhCltDialRequestObserver* aObserver );
/**
* Respond to client request to make a call
--- a/phoneclientserver/phoneclient/Inc/SharedClientServer/PhCltClientServer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/SharedClientServer/PhCltClientServer.h Fri Mar 19 09:40:14 2010 +0200
@@ -267,7 +267,7 @@
enum TPhCltImageHandlerRequest
{
EPhoneServerImageHandlerSubSessionOpen = EPhoneServerExtensionBase + 300,
- EPhoneServerImageHandlerSubSessionClose, // Closes image handler subsession.
+ EPhoneServerImageHandlerSubSessionClose, // Closes image handler subsession.
EPhoneServerImageHandlerSubSessionSave, // SaveImages (deprecated for VT)
EPhoneServerImageHandlerSubSessionLoad, // LoadImages (deprecated for VT)
EPhoneServerImageHandlerSubSessionCommitLoad, // Finalize load operation
--- a/phoneclientserver/phoneclient/Inc/Ussd/ussd_ext/rphcltussd.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/Ussd/ussd_ext/rphcltussd.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,8 +21,8 @@
// INCLUDES
#include <e32std.h>
-#include <PhCltTypes.h>
-#include <CPhCltUssd.h>
+#include <phclttypes.h>
+#include <cphcltussd.h>
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneclient/Inc/UssdWrapper/CPhCltUssdNoteController.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/UssdWrapper/CPhCltUssdNoteController.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <e32base.h>
-#include "MPhCltUssdNoteControllerCallBack.h"
+#include "MPhCltUssdNoteControllerCallBack.h"
// FORWARD DECLARATIONS
class CAknGlobalNote;
--- a/phoneclientserver/phoneclient/Inc/UssdWrapper/CPhCltUssdRequestHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/UssdWrapper/CPhCltUssdRequestHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
#include "rphcltussd.h"
-#include "RPhCltServer.h"
+#include "rphcltserver.h"
// FORWARD DECLARATIONS
class MPhCltUssdRequestHandler;
--- a/phoneclientserver/phoneclient/Inc/UssdWrapper/Ussd_Ext/CPhCltUssdImp.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Inc/UssdWrapper/Ussd_Ext/CPhCltUssdImp.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,12 +21,12 @@
// INCLUDES
#include <e32base.h>
-#include "MPhCltUssdRequestHandler.h"
-#include "MPhCltUssdNoteControllerCallBack.h"
+#include "MPhCltUssdRequestHandler.h"
+#include "MPhCltUssdNoteControllerCallBack.h"
#include "rphcltussd.h"
-#include "RPhCltServer.h"
-#include "CPhCltUssdInt.h"
+#include "rphcltserver.h"
+#include "cphcltussdint.h"
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneclient/Src/CommandHandler/CPhCltComHandImplementation.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/CommandHandler/CPhCltComHandImplementation.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,7 +18,7 @@
// INCLUDE FILES
-#include "CPhCltComHandImplementation.h"
+#include "CPhCltComHandImplementation.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/CommandHandler/CPhCltCommandHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/CommandHandler/CPhCltCommandHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "CPhCltCommandHandler.h"
-#include "CPhCltComHandImplementation.h"
+#include "cphcltcommandhandler.h"
+#include "CPhCltComHandImplementation.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/CommandHandler/RPhCltCommandHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/CommandHandler/RPhCltCommandHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,10 +20,10 @@
// INCLUDES
-#include "RPhCltCommandHandler.h"
-#include <RPhCltServer.h>
-#include <PhCltTypes.h>
-#include "PhCltClientServer.h"
+#include "RPhCltCommandHandler.h"
+#include <rphcltserver.h>
+#include <phclttypes.h>
+#include "PhCltClientServer.h"
#include <e32std.h>
#include <e32base.h>
@@ -90,7 +90,7 @@
// This is Atd function call.
iComHandParams().iCommandHandlerCommand = EPhCltCommandAtd;
- iComHandParams().iTelNumber = aTPhCltTelephoneNumber;
+ iComHandParams().iTelNumber = aTPhCltTelephoneNumber;
SendReceive(
EPhoneServerComHandSubSessionAtd,
TIpcArgs( &iComHandParams ),
--- a/phoneclientserver/phoneclient/Src/CommandHandler/RPhCltCommandHandlerNotify.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/CommandHandler/RPhCltCommandHandlerNotify.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,10 +20,10 @@
// INCLUDES
-#include "RPhCltCommandHandlerNotify.h"
-#include <RPhCltServer.h>
-#include <PhCltTypes.h>
-#include "PhCltClientServer.h"
+#include "rphcltcommandhandlernotify.h"
+#include <rphcltserver.h>
+#include <phclttypes.h>
+#include "phcltclientserver.h"
#include <e32base.h>
--- a/phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCall.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDE FILES
-#include "CPhCltEmergencyCall.h"
-#include "CPhCltEmergencyCallImpl.h"
-#include "PhCltTypes.h"
+#include "cphcltemergencycall.h"
+#include "CPhCltEmergencyCallImpl.h"
+#include "phclttypes.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCallImpl.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/CPhCltEmergencyCallImpl.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDE FILES
-#include "RPhCltServer.h"
-#include "CPhCltEmergencyCallImpl.h"
-#include "MPhCltEmergencyCallObserver.h"
+#include "rphcltserver.h"
+#include "CPhCltEmergencyCallImpl.h"
+#include "mphcltemergencycallobserver.h"
_LIT( KEmNumber, "112" );
@@ -105,8 +105,8 @@
TBool& aIsEmergencyNumber )
{
return iEmergencyCall.IsEmergencyPhoneNumber(
- aNumber,
- aIsEmergencyNumber );
+ aNumber,
+ aIsEmergencyNumber );
}
// -----------------------------------------------------------------------------
@@ -121,9 +121,9 @@
{
return iEmergencyCall.IsEmergencyPhoneNumber(
- aNumber,
+ aNumber,
aMatchedEmergencyNumber,
- aIsEmergencyNumber );
+ aIsEmergencyNumber );
}
// -----------------------------------------------------------------------------
@@ -136,8 +136,8 @@
TBool& aIsEmergencyNumber )
{
return iEmergencyCall.FindEmergencyPhoneNumber(
- aNumber,
- aIsEmergencyNumber );
+ aNumber,
+ aIsEmergencyNumber );
}
// -----------------------------------------------------------------------------
--- a/phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/RPhCltEmergencyCall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/EmergencyNumber/EmergencyNumber_Aiw/RPhCltEmergencyCall.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,10 +18,10 @@
// INCLUDE FILES
-#include <CPhCltEmergencyCall.h> // for TPhCltEmergencyNumber
-#include "RPhCltEmergencyCall.h"
-#include "PhCltClientServer.h"
-#include "PhCltUtils.h"
+#include <cphcltemergencycall.h> // for TPhCltEmergencyNumber
+#include "RPhCltEmergencyCall.h"
+#include "PhCltClientServer.h"
+#include "phcltutils.h"
// CONSTANTS
_LIT( KPhCltDtmfCharp, "p" );
@@ -176,8 +176,8 @@
// -----------------------------------------------------------------------------
//
void RPhCltEmergencyCall::DialEmergencyCall(
- TRequestStatus& aReqStatus,
- TDesC8& aNumber )
+ TRequestStatus& aReqStatus,
+ TDesC8& aNumber )
{
return SendReceive(
EPhoneServerEmergencyNumberSubsessionEmergencyDial,
@@ -192,11 +192,11 @@
// -----------------------------------------------------------------------------
//
void RPhCltEmergencyCall::CancelDialEmergencyCall()
- {
- SendReceive(
- EPhoneServerEmergencyNumberSubsessionEmergencyDialCancel,
- TIpcArgs() );
- }
+ {
+ SendReceive(
+ EPhoneServerEmergencyNumberSubsessionEmergencyDialCancel,
+ TIpcArgs() );
+ }
// -----------------------------------------------------------------------------
// Extracts telephone number out of string. Valid emergency number can
@@ -322,8 +322,8 @@
// -----------------------------------------------------------------------------
//
TInt RPhCltEmergencyCall::ValidateNumber( TDes& aString,
- TBool& aIsEmergencyNumber,
- const TBool aWriteEmergencyNumBack )
+ TBool& aIsEmergencyNumber,
+ const TBool aWriteEmergencyNumBack )
{
TPckg<TBool> pIsEmergencyNumber( aIsEmergencyNumber );
--- a/phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/CPhCltExtPhoneDialData.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/CPhCltExtPhoneDialData.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,7 +18,7 @@
// INCLUDE FILES
-#include "CPhCltExtPhoneDialData.h"
+#include "CPhCltExtPhoneDialData.h"
#include <cphcltdialdata.h>
--- a/phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/RPhCltExtCall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/RPhCltExtCall.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,10 +18,10 @@
// INCLUDE FILES
-#include "RPhCltServer.h"
-#include "RPhCltExtCall.h"
-#include "CPhCltExtPhoneDialData.h"
-#include "PhCltClientServer.h"
+#include "rphcltserver.h"
+#include "RPhCltExtCall.h"
+#include "CPhCltExtPhoneDialData.h"
+#include "PhCltClientServer.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/cphcltdialdata.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ExtCall/ExtCall_Aiw/cphcltdialdata.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
// INCLUDE FILES
#include <cphcltdialdata.h>
-#include "CPhCltExtPhoneDialData.h" // For correct default values
+#include "CPhCltExtPhoneDialData.h" // For correct default values
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/ExtCall/RPhCltExtCall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ExtCall/RPhCltExtCall.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,10 +18,10 @@
// INCLUDE FILES
-#include "RPhCltServer.h"
-#include "RPhCltExtCall.h"
-#include "TPhCltExtPhoneDialData.h"
-#include "PhCltClientServer.h"
+#include "rphcltserver.h"
+#include "rphcltextcall.h"
+#include "tphcltextphonedialdata.h"
+#include "phcltclientserver.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/ExtCall/TPhCltExtPhoneDialData.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ExtCall/TPhCltExtPhoneDialData.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,7 +18,7 @@
// INCLUDE FILES
-#include "TPhCltExtPhoneDialData.h"
+#include "tphcltextphonedialdata.h"
// ============================ MEMBER FUNCTIONS ===============================
@@ -600,7 +600,7 @@
aReturn.iNumberType = iNumberType;
aReturn.iSubAddress = iSubAddress;
aReturn.iBearer = iBearer;
- aReturn.iRedialMaximumDuration = iRedialMaximumDuration;
+ aReturn.iRedialMaximumDuration = iRedialMaximumDuration;
// Flags
aReturn.iFlags = TPhCltCallArgs::EPhCltCallFlagsDefault;
--- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltDialer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltDialer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "CPhCltDialer.h"
-#include "CPhCltDialerDlg.h"
+#include "cphcltdialer.h"
+#include "cphcltdialerdlg.h"
--- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltDialerDlg.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltDialerDlg.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDE FILES
-#include "CPhCltDialerDlg.h"
+#include "cphcltdialerdlg.h"
#include <phoneclient.rsg>
-#include <CPhCltExtPhoneBase.h>
+#include <cphcltextphonebase.h>
#include <avkon.hrh>
@@ -54,15 +54,15 @@
{
TInt error = KErrNone;
iError = &error;
- if (!iData.Emergency())
- {
- ExecuteLD( R_PHCLT_BLANK_DLG );
- }
+ if (!iData.Emergency())
+ {
+ ExecuteLD( R_PHCLT_BLANK_DLG );
+ }
else
- {
- iPhoneClient = CPhCltExtPhoneBase::NewL( this );
- iPhoneClient->DialL( iData );
- }
+ {
+ iPhoneClient = CPhCltExtPhoneBase::NewL( this );
+ iPhoneClient->DialL( iData );
+ }
User::LeaveIfError( error );
}
--- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltExtPhone.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltExtPhone.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,10 +19,10 @@
// INCLUDE FILES
#include <e32std.h>
-#include "RPhCltExtCall.h"
-#include "RPhCltServer.h"
-#include "MPhCltExtPhoneObserver.h"
-#include "CPhCltExtPhone.h"
+#include "rphcltextcall.h"
+#include "rphcltserver.h"
+#include "mphcltextphoneobserver.h"
+#include "cphcltextphone.h"
// LOCAL CONSTANTS AND MACROS
--- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltExtPhoneBase.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/CPhCltExtPhoneBase.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDE FILES
-#include "CPhCltExtPhoneBase.h"
-#include "CPhCltExtPhone.h"
-#include "PhCltTypes.h"
+#include "cphcltextphonebase.h"
+#include "cphcltextphone.h"
+#include "phclttypes.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "CPhCltDialer.h"
-#include "CPhCltDialerDlg.h"
+#include "cphcltdialer.h"
+#include "cphcltdialerdlg.h"
--- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialerDlg.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltDialerDlg.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDE FILES
-#include "CPhCltDialerDlg.h"
+#include "cphcltdialerdlg.h"
#include <phoneclient.rsg>
-#include <CPhCltExtPhoneBase.h>
+#include <cphcltextphonebase.h>
#include <avkon.hrh>
@@ -54,15 +54,15 @@
{
TInt error = KErrNone;
iError = &error;
- if (!iData->Emergency())
- {
- ExecuteLD( R_PHCLT_BLANK_DLG );
- }
+ if (!iData->Emergency())
+ {
+ ExecuteLD( R_PHCLT_BLANK_DLG );
+ }
else
- {
- iPhoneClient = CPhCltExtPhoneBase::NewL( this );
- iPhoneClient->DialL( *iData );
- }
+ {
+ iPhoneClient = CPhCltExtPhoneBase::NewL( this );
+ iPhoneClient->DialL( *iData );
+ }
User::LeaveIfError( error );
}
--- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhone.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhone.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,9 +19,9 @@
// INCLUDE FILES
#include <e32std.h>
-#include "MPhCltExtPhoneObserver.h"
-#include "CPhCltExtPhone.h"
-#include "CPhCltExtPhoneDialData.h"
+#include "MPhCltExtPhoneObserver.h"
+#include "CPhCltExtPhone.h"
+#include "CPhCltExtPhoneDialData.h"
// LOCAL CONSTANTS AND MACROS
--- a/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhoneBase.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ExtCallWrapper/ExtCallWrapper_Aiw/CPhCltExtPhoneBase.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDE FILES
-#include "CPhCltExtPhoneBase.h"
-#include "CPhCltExtPhone.h"
-#include "PhCltTypes.h"
+#include "CPhCltExtPhoneBase.h"
+#include "CPhCltExtPhone.h"
+#include "phclttypes.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/Ihf/RPhCltIhf.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Ihf/RPhCltIhf.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "RPhCltServer.h"
-#include "RPhCltIhf.h"
+#include "rphcltserver.h"
+#include "rphcltihf.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/Ihf/RPhCltIhfStub.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Ihf/RPhCltIhfStub.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "RPhCltServer.h"
-#include "RPhCltIhf.h"
+#include "rphcltserver.h"
+#include "rphcltihf.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltBaseImageParams.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltBaseImageParams.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -16,8 +16,8 @@
*/
-#include "CPhCltBaseImageParams.h"
-#include "PhCltClientServer.h"
+#include "cphcltbaseimageparams.h"
+#include "PhCltClientServer.h"
// -----------------------------------------------------------------------------
// CPhCltBaseImageParams::CPhCltBaseImageParams
//
--- a/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltImageHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltImageHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "CPhCltImageHandler.h"
-#include "CPhCltImageHandlerImplementation.h"
+#include "cphcltimagehandler.h"
+#include "CPhCltImageHandlerImplementation.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltImageHandlerImplementation.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltImageHandlerImplementation.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,7 +18,7 @@
// INCLUDE FILES
-#include "CPhCltImageHandlerImplementation.h"
+#include "CPhCltImageHandlerImplementation.h"
#ifdef _DEBUG
#define _DxPRINT( x ) RDebug::Print(_L( x ) );
--- a/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltOperatorLogoContainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ImageHandler/CPhCltOperatorLogoContainer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,7 +17,7 @@
// INCLUDE FILES
-#include "CPhCltOperatorLogoContainer.h"
+#include "CPhCltOperatorLogoContainer.h"
// CONSTANTS
--- a/phoneclientserver/phoneclient/Src/ImageHandler/RPhCltImageHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/ImageHandler/RPhCltImageHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDES
-#include "RPhCltImageHandler.h"
-#include "PhCltClientServer.h"
-#include <RPhCltServer.h>
+#include "RPhCltImageHandler.h"
+#include "PhCltClientServer.h"
+#include <rphcltserver.h>
#include <e32std.h>
#include <e32base.h>
#include <fbs.h>
--- a/phoneclientserver/phoneclient/Src/Messenger/CPhCltMessenger.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Messenger/CPhCltMessenger.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "CPhCltMessenger.h"
-#include "CPhCltMessengerImplementation.h"
+#include "cphcltmessenger.h"
+#include "CPhCltMessengerImplementation.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/Messenger/CPhCltMessengerImplementation.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Messenger/CPhCltMessengerImplementation.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,7 +18,7 @@
// INCLUDE FILES
-#include "CPhCltMessengerImplementation.h"
+#include "CPhCltMessengerImplementation.h"
--- a/phoneclientserver/phoneclient/Src/Messenger/RPhCltMessenger.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Messenger/RPhCltMessenger.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,9 +20,9 @@
// INCLUDES
-#include "RPhCltMessenger.h"
-#include <RPhCltServer.h>
-#include "PhCltClientServer.h"
+#include "RPhCltMessenger.h"
+#include <rphcltserver.h>
+#include "PhCltClientServer.h"
--- a/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/CPhCltCallNotify.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/CPhCltCallNotify.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,14 +18,14 @@
// Include Files
-#include <CPhCltEmergencyCall.h> // for TPhCltEmergencyNumber
-#include <CPhCltCallNotify.h>
+#include <cphcltemergencycall.h> // for TPhCltEmergencyNumber
+#include <cphcltcallnotify.h>
#include <cphcltdialdata.h>
#include <mphcltdialrequestobserver.h>
-#include "RPhCltServer.h"
-#include "CPhCltExtPhoneDialData.h"
-#include "RPhCltCallNotify.h"
+#include "rphcltserver.h"
+#include "CPhCltExtPhoneDialData.h"
+#include "RPhCltCallNotify.h"
#include "cphcltdialrequestmonitor.h"
#include "cphcltdialemergencyrequestmonitor.h"
#include "cphcltcomhandrequestmonitor.h"
@@ -76,7 +76,7 @@
EXPORT_C TInt CPhCltCallNotify::Open( RPhCltServer& aServer )
{
TInt retVal = iCallNotify->Open( aServer );
- return retVal;
+ return retVal;
}
// -----------------------------------------------------------------------------
@@ -129,19 +129,19 @@
EXPORT_C void CPhCltCallNotify::NotifyEmergencyCall(
MPhCltDialEmergencyRequestObserver* aObserver,
TDesC& aEmergencyNumber )
- {
+ {
iDialEmergencyMonitor->NotifyEmergencyCall( aObserver, aEmergencyNumber );
- }
+ }
// -----------------------------------------------------------------------------
// CPhCltCallNotify::CancelNotifyEmergencyCall()
//
// -----------------------------------------------------------------------------
-//
+//
EXPORT_C void CPhCltCallNotify::CancelNotifyEmergencyCall() const
- {
- iDialEmergencyMonitor->Cancel();
- }
+ {
+ iDialEmergencyMonitor->Cancel();
+ }
// -----------------------------------------------------------------------------
// CPhCltCallNotify::RespondEmergencyToClient()
@@ -149,10 +149,10 @@
// -----------------------------------------------------------------------------
//
EXPORT_C TInt CPhCltCallNotify::RespondEmergencyToClient(
- const TInt aResultCode )
- {
- return iDialEmergencyMonitor->RespondEmergencyToClient( aResultCode );
- }
+ const TInt aResultCode )
+ {
+ return iDialEmergencyMonitor->RespondEmergencyToClient( aResultCode );
+ }
// -----------------------------------------------------------------------------
// CPhCltCallNotify::NotifyComHandCommand
--- a/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/RPhCltCallNotify.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/RPhCltCallNotify.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// Include Files
-#include "RPhCltCallNotify.h"
-#include "RPhCltServer.h"
-#include "PhCltClientServer.h"
+#include "RPhCltCallNotify.h"
+#include "rphcltserver.h"
+#include "PhCltClientServer.h"
// ============================= LOCAL FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltcomhandrequestmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltcomhandrequestmonitor.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
// Include Files
#include "cphcltcomhandrequestmonitor.h"
-#include "RPhCltCallNotify.h"
+#include "RPhCltCallNotify.h"
#include <mphcltcomhandrequestobserver.h>
#include <e32base.h>
--- a/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltdialemergencyrequestmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltdialemergencyrequestmonitor.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,11 +18,11 @@
// Include Files
-#include <CPhCltEmergencyCall.h> // for TPhCltEmergencyNumber
+#include <cphcltemergencycall.h> // for TPhCltEmergencyNumber
#include "cphcltdialemergencyrequestmonitor.h"
#include <mphcltdialemergencyrequestobserver.h>
-#include "RPhCltServer.h"
-#include "RPhCltCallNotify.h"
+#include "rphcltserver.h"
+#include "RPhCltCallNotify.h"
// ============================= LOCAL FUNCTIONS ===============================
@@ -102,27 +102,27 @@
// -----------------------------------------------------------------------------
//
void CPhCltDialEmergencyRequestMonitor::NotifyEmergencyCall(
- MPhCltDialEmergencyRequestObserver* aObserver,
+ MPhCltDialEmergencyRequestObserver* aObserver,
TDesC& aEmergencyNumber )
- {
-
+ {
+
if ( !IsActive() )
{
-
- iEmergencyCallNumberPtr.Set( reinterpret_cast<TText8*>( &aEmergencyNumber ),
+
+ iEmergencyCallNumberPtr.Set( reinterpret_cast<TText8*>( &aEmergencyNumber ),
sizeof( TPhCltEmergencyNumber ),
sizeof( TPhCltEmergencyNumber ) );
-
- iObserver = aObserver;
-
+
+ iObserver = aObserver;
+
iCallNotify.NotifyEmergencyCall(
- iStatus,
- iEmergencyCallNumberPtr
- );
+ iStatus,
+ iEmergencyCallNumberPtr
+ );
SetActive();
}
-
- }
+
+ }
// -----------------------------------------------------------------------------
@@ -131,10 +131,10 @@
// -----------------------------------------------------------------------------
//
TInt CPhCltDialEmergencyRequestMonitor::RespondEmergencyToClient(
- const TInt aResultCode )
- {
- return iCallNotify.RespondEmergencyToClient( aResultCode );
- }
+ const TInt aResultCode )
+ {
+ return iCallNotify.RespondEmergencyToClient( aResultCode );
+ }
// End of File
--- a/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltdialrequestmonitor.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Notifier/Notifier_Aiw/cphcltdialrequestmonitor.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,14 +18,14 @@
// Include Files
-#include <CPhCltEmergencyCall.h> // for TPhCltEmergencyNumber
+#include <cphcltemergencycall.h> // for TPhCltEmergencyNumber
#include <mphcltdialrequestobserver.h>
-#include "RPhCltServer.h"
-#include "CPhCltExtPhoneDialData.h"
+#include "rphcltserver.h"
+#include "CPhCltExtPhoneDialData.h"
#include "cphcltdialdata.h"
#include "cphcltdialrequestmonitor.h"
-#include "RPhCltCallNotify.h"
+#include "RPhCltCallNotify.h"
--- a/phoneclientserver/phoneclient/Src/Notifier/RPhCltCallNotify.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Notifier/RPhCltCallNotify.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// Include Files
-#include "RPhCltCallNotify.h"
-#include "RPhCltServer.h"
+#include "rphcltcallnotify.h"
+#include "rphcltserver.h"
// ============================= LOCAL FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/Notifier/RPhCltExtCallNotify.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Notifier/RPhCltExtCallNotify.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,9 +19,9 @@
// Include Files
-#include "RPhCltCallNotify.h"
-#include "PhCltClientServer.h"
-#include "RPhCltServer.h"
+#include "rphcltcallnotify.h"
+#include "phcltclientserver.h"
+#include "rphcltserver.h"
--- a/phoneclientserver/phoneclient/Src/PhCltUtils.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/PhCltUtils.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,7 +17,7 @@
// INCLUDE FILES
-#include "PhCltUtils.h"
+#include "phcltutils.h"
// CONSTANTS
@@ -75,21 +75,21 @@
//
EXPORT_C void PhCltUtils::RemoveURIPrefixdAndDomainChars( TDes& aString )
{
- // Does number contains prefix. If yes then remove it
+ // Does number contains prefix. If yes then remove it
if ( 0 == aString.FindC( KSipPrefix ) ||
0 == aString.FindC( KTelPrefix ) ||
- 0 == aString.FindC( KSosPrefix ) )
+ 0 == aString.FindC( KSosPrefix ) )
{
aString.Delete( 0, KPrefixLength );
- }
- // Does Number contains domain part. If yes remove it at beging of @ character.
+ }
+ // Does Number contains domain part. If yes remove it at beging of @ character.
TInt atIndex = aString.Find( KAt );
TInt telNumberLength = aString.Length();
- if ( 0 < atIndex &&
- atIndex < telNumberLength )
+ if ( 0 < atIndex &&
+ atIndex < telNumberLength )
{
- aString.Delete( atIndex, telNumberLength - atIndex );
- }
+ aString.Delete( atIndex, telNumberLength - atIndex );
+ }
}
// End of File
--- a/phoneclientserver/phoneclient/Src/RPhCltResourceFile.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/RPhCltResourceFile.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDE FILES
-#include "RPhCltResourceFile.h"
-#include "ConeResLoader.h"
-#include "PhCltClientServer.h"
+#include "RPhCltResourceFile.h"
+#include "ConeResLoader.h"
+#include "PhCltClientServer.h"
// CONSTANTS
--- a/phoneclientserver/phoneclient/Src/Session/RPhCltServer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Session/RPhCltServer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,9 +20,9 @@
// INCLUDE FILES
#include <e32math.h>
#include <e32uid.h>
-#include "PhCltTypes.h"
-#include "RPhCltServer.h"
-#include "PhCltClientServer.h"
+#include "phclttypes.h"
+#include "rphcltserver.h"
+#include "PhCltClientServer.h"
// CONSTANTS
@@ -163,25 +163,25 @@
// thread dies for any reason.
- TRequestStatus stat;
- serverUnitOfExecution.Rendezvous( stat );
- if ( stat != KRequestPending )
+ TRequestStatus stat;
+ serverUnitOfExecution.Rendezvous( stat );
+ if ( stat != KRequestPending )
{
User::Panic( PH_SRV_SU_FAILURE, EPhSrvStartupFailurePhase1 );
- serverUnitOfExecution.Kill( KErrAbort ); // abort startup
+ serverUnitOfExecution.Kill( KErrAbort ); // abort startup
}
- else
+ else
{
- serverUnitOfExecution.Resume(); // logon ok
+ serverUnitOfExecution.Resume(); // logon ok
}
// wait for start or death
- User::WaitForRequest( stat );
- // we can't use the 'exit reason' if the server panicked as this
- // is the panic 'reason' and may be '0' which cannot be distinguished
- // from KErrNone
- err = ( serverUnitOfExecution.ExitType() == EExitPanic )
+ User::WaitForRequest( stat );
+ // we can't use the 'exit reason' if the server panicked as this
+ // is the panic 'reason' and may be '0' which cannot be distinguished
+ // from KErrNone
+ err = ( serverUnitOfExecution.ExitType() == EExitPanic )
? KErrGeneral : stat.Int();
serverUnitOfExecution.Close();
--- a/phoneclientserver/phoneclient/Src/Ussd/ussd_ext/rphcltussd.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/Ussd/ussd_ext/rphcltussd.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "RPhCltServer.h"
+#include "rphcltserver.h"
#include "rphcltussd.h"
-#include "PhCltClientServer.h"
+#include "PhCltClientServer.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdExt.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdExt.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include <CPhCltUssd.h>
-#include "CPhCltUssdImp.h"
+#include <cphcltussd.h>
+#include "CPhCltUssdImp.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdImp.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdImp.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,10 +18,10 @@
// INCLUDE FILES
-#include "CPhCltUssdImp.h"
-#include "CPhCltUssdRequestHandler.h"
-#include "PhCltClientServer.h"
-#include <PhCltTypes.h>
+#include "CPhCltUssdImp.h"
+#include "CPhCltUssdRequestHandler.h"
+#include "PhCltClientServer.h"
+#include <phclttypes.h>
#include <etelmm.h>
#include <f32file.h>
@@ -32,14 +32,14 @@
#include <avkon.hrh>
#include <avkon.rsg>
-#include <PhoneClient.rsg>
+#include <phoneclient.rsg>
#include <exterror.h>
#include <gsmerror.h>
#include <etelsat.h>
-#include "MPhCltUssdNoteControllerCallBack.h"
-#include "CPhCltUssdNoteController.h"
+#include "MPhCltUssdNoteControllerCallBack.h"
+#include "CPhCltUssdNoteController.h"
// CONSTANTS
@@ -534,7 +534,7 @@
__ASSERT_ALWAYS( aMsgData.Length() <= KPhCltUssdMax7BitCharacterOctets,
User::Invariant() );
- RMobileUssdMessaging::TMobileUssdAttributesV1 attribute;
+ RMobileUssdMessaging::TMobileUssdAttributesV1 attribute;
attribute.iFlags =
RMobileUssdMessaging::KUssdDataFormat +
@@ -549,13 +549,13 @@
}
if ( iSendDcs == KPhCltUssdDcsNotSet ) // 0x00
- {
- attribute.iDcs = KPhCltUssdDcsDefaultAlphabet;
- }
- else
- {
- attribute.iDcs = iSendDcs;
- }
+ {
+ attribute.iDcs = KPhCltUssdDcsDefaultAlphabet;
+ }
+ else
+ {
+ attribute.iDcs = iSendDcs;
+ }
RMobileUssdMessaging::TMobileUssdAttributesV1Pckg
attributePckg( attribute );
@@ -569,12 +569,12 @@
TInt error = KErrNone;
iSendError = &error;
- iRequestHandler->SendUssd( aMsgData , attributePckg );
+ iRequestHandler->SendUssd( aMsgData , attributePckg );
// iNoteController is allocated only if notes are shown.
if ( iNoteController )
{
TRAP_IGNORE( iNoteController->ShowGlobalWaitNoteL(
- R_TEXT_SENDING,
+ R_TEXT_SENDING,
R_AVKON_SOFTKEYS_QUIT ) );
}
--- a/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdInt.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdInt.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "CPhCltUssdInt.h"
-#include "CPhCltUssdImp.h"
+#include "cphcltussdint.h"
+#include "CPhCltUssdImp.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdNoteController.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdNoteController.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,13 +17,13 @@
// INCLUDE FILES
-#include <AknGlobalNote.h> //CAknGlobalNote
+#include <AknGlobalNote.h> //CAknGlobalNote
#include <aknnotewrappers.h>
-#include <ConeResLoader.h>
-#include <StringLoader.h>
+#include <ConeResLoader.h>
+#include <StringLoader.h>
-#include "PhCltClientServer.h"
-#include "CPhCltUssdNoteController.h"
+#include "PhCltClientServer.h"
+#include "CPhCltUssdNoteController.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdRequestHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdRequestHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "CPhCltUssdRequestHandler.h"
-#include "MPhCltUssdRequestHandler.h"
+#include "CPhCltUssdRequestHandler.h"
+#include "MPhCltUssdRequestHandler.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdSatClient.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneclient/Src/UssdWrapper/CPhCltUssdSatClient.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,10 +18,10 @@
// INCLUDE FILES
-#include "CPhCltUssdImp.h"
-#include "PhCltClientServer.h"
-#include <CPhCltUssdSatClient.h>
-#include <CPhCltUssd.h>
+#include "CPhCltUssdImp.h"
+#include "PhCltClientServer.h"
+#include <cphcltussdsatclient.h>
+#include <cphcltussd.h>
// ============================= LOCAL FUNCTIONS ===============================
--- a/phoneclientserver/phoneserver/Group/PhoneServer.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Group/PhoneServer.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -25,7 +25,7 @@
VENDORID VID_DEFAULT
TARGET phoneserver.exe
-EPOCSTACKSIZE 0x5000
+EPOCSTACKSIZE 0x5000
TARGETPATH /system/programs
TARGETTYPE EXE
@@ -33,87 +33,95 @@
UID 0x1000008d 0x10000850
SOURCEPATH .
-START RESOURCE ../Src/Resources/PhoneServer.rss
+START RESOURCE ../src/resources/PhoneServer.rss
HEADER
TARGETPATH RESOURCE_FILES_DIR
LANGUAGE_IDS
END // RESOURCE
-SOURCEPATH ../Src/Standard
-SOURCE PhSrvStartUp.cpp
-SOURCE PhSrvSubSessionFactory.cpp
-SOURCE PhSrvUtils.cpp
+SOURCEPATH ../src/Standard
+SOURCE PhSrvStartUp.cpp
+SOURCE PhSrvSubSessionFactory.cpp
+SOURCE PhSrvUtils.cpp
-SOURCE CPhSrvScheduler.cpp
-SOURCE CPhSrvServer.cpp
-SOURCE CPhSrvSession.cpp
-SOURCE CPhSrvResourceManager.cpp
-SOURCE CPhSrvPhoneController.cpp
-SOURCE CPhSrvEmergencyNumberManager.cpp
+SOURCE CPhSrvScheduler.cpp
+SOURCE CPhSrvServer.cpp
+SOURCE CPhSrvSession.cpp
+SOURCE CPhSrvResourceManager.cpp
+SOURCE CPhSrvPhoneController.cpp
+SOURCE CPhSrvEmergencyNumberManager.cpp
-SOURCE CPhSrvSubSessionBase.cpp
-SOURCE CPhSrvSubSessionUssd.cpp
+SOURCE CPhSrvSubSessionBase.cpp
+SOURCE CPhSrvSubSessionUssd.cpp
-SOURCE PhSrvDebugInfo.cpp
+SOURCE PhSrvDebugInfo.cpp
-SOURCEPATH ../Src/Standard/Standard_Aiw
-SOURCE CPhCltExtPhoneDialData.cpp
+SOURCEPATH ../src/standard/Standard_Aiw
+SOURCE CPhCltExtPhoneDialData.cpp
SOURCE cphcltdialdata.cpp
-SOURCE CPhSrvEmergencyRequestManager.cpp
-SOURCE CPhSrvCallRequest.cpp
-SOURCE CPhSrvCallRequestManager.cpp
-SOURCE CPhSrvSubSessionNotifier.cpp
-SOURCE CPhSrvSubSessionExtCall.cpp
-SOURCE CPhSrvSubSessionEmergencyNum.cpp
+SOURCE CPhSrvEmergencyRequestManager.cpp
+SOURCE CPhSrvCallRequest.cpp
+SOURCE CPhSrvCallRequestManager.cpp
+SOURCE CPhSrvSubSessionNotifier.cpp
+SOURCE CPhSrvSubSessionExtCall.cpp
+SOURCE CPhSrvSubSessionEmergencyNum.cpp
-SOURCEPATH ../Src/ImageHandler
-SOURCE CPhSrvSubSessionImageHandler.cpp
-SOURCE cphsrvimagesaver.cpp
+SOURCEPATH ../src/ImageHandler
+SOURCE CPhSrvSubSessionImageHandler.cpp
+SOURCE cphsrvimagesaver.cpp
-SOURCEPATH ../Src/Ussd
-SOURCE CPhSrvUssdReplyTimer.cpp
-SOURCE CPhSrvUssdSendHandler.cpp
-SOURCE CPhSrvUssdReceiveHandler.cpp
-SOURCE CPhSrvUssdManager.cpp
-SOURCE CPhSrvUssdNotifyNWRelease.cpp
+SOURCEPATH ../src/Ussd
+SOURCE CPhSrvUssdReplyTimer.cpp
+SOURCE CPhSrvUssdSendHandler.cpp
+SOURCE CPhSrvUssdReceiveHandler.cpp
+SOURCE CPhSrvUssdManager.cpp
+SOURCE CPhSrvUssdNotifyNWRelease.cpp
-SOURCEPATH ../Src/CommandHandler
+SOURCEPATH ../src/CommandHandler
#if defined( __AT_HANDLER )
-SOURCE CPhSrvSubSessionCommandHandler.cpp
-SOURCE CPhSrvComHandRequest.cpp
+SOURCE CPhSrvSubSessionCommandHandler.cpp
+SOURCE CPhSrvComHandRequest.cpp
#else // No __AT_HANDLER defined, so stub version is used.
-SOURCE CPhSrvSubSessionCommandHandlerStub.cpp
-SOURCE CPhSrvSubSessionCommandHandlerNotifyStub.cpp
+SOURCE cphsrvsubsessioncommandhandlerstub.cpp
+SOURCE cphsrvsubsessioncommandhandlernotifystub.cpp
#endif // __AT_HANDLER
-SOURCEPATH ../Src/CommandHandler/Commandhandler_Aiw
+SOURCEPATH ../src/commandhandler/Commandhandler_Aiw
#if defined( __AT_HANDLER )
-SOURCE CPhSrvComHandRequestManager.cpp
+SOURCE CPhSrvComHandRequestManager.cpp
#else // No __AT_HANDLER defined, so stub version is used.
-SOURCE CPhSrvComHandRequestManagerStub.cpp
+SOURCE cphsrvcomhandrequestmanagerstub.cpp
#endif // __AT_HANDLER
-SOURCEPATH ../Src/Messenger
-SOURCE CPhSrvMessengerObject.cpp
-SOURCE CPhSrvMessengerRequestManager.cpp
-SOURCE CPhSrvSubSessionMessenger.cpp
+SOURCEPATH ../src/Messenger
+#if defined( __CS_VIDEO_TELEPHONY )
+SOURCE CPhSrvMessengerObject.cpp
+SOURCE CPhSrvMessengerRequestManager.cpp
+SOURCE CPhSrvSubSessionMessenger.cpp
+#else // No __CS_VIDEO_TELEPHONY defined, so stub version is used.
+SOURCE cphsrvmessengerrequestmanagerstub.cpp
+SOURCE cphsrvsubsessionmessengerstub.cpp
+#endif // __CS_VIDEO_TELEPHONY
-USERINCLUDE ../Inc/Standard
-USERINCLUDE ../Inc/Standard/Standard_Aiw
-USERINCLUDE ../Inc/Ussd
-USERINCLUDE ../Inc/CommandHandler
-USERINCLUDE ../Inc/Messenger
-USERINCLUDE ../Inc/ImageHandler
+USERINCLUDE ../inc/Standard
+USERINCLUDE ../inc/standard/Standard_Aiw
+USERINCLUDE ../inc/Ussd
+USERINCLUDE ../inc/CommandHandler
+USERINCLUDE ../inc/Messenger
+USERINCLUDE ../inc/ImageHandler
-USERINCLUDE ../../phoneclient/Inc/SharedClientServer
+USERINCLUDE ../../phoneclient/inc/SharedClientServer
-APP_LAYER_SYSTEMINCLUDE
+// <-- QT PHONE START-->
+MW_LAYER_SYSTEMINCLUDE
+// <-- QT PHONE END-->
+
SYSTEMINCLUDE ../../../inc
SYSTEMINCLUDE ../../inc // for RPhCltEmergencyCall.h, CPhCltExtPhoneDialData.h
// TEMPORARY DEFINITION FOR TELEPHONY VARIATION HEADERS
-SYSTEMINCLUDE ../../../../../app/phone/inc
+SYSTEMINCLUDE ../../../../../app/phone/inc
LIBRARY efsrv.lib
LIBRARY apgrfx.lib
@@ -131,9 +139,9 @@
LIBRARY commonengine.lib
LIBRARY featmgr.lib
LIBRARY fbscli.lib
-LIBRARY estor.lib
+LIBRARY estor.lib
LIBRARY centralrepository.lib
-LIBRARY imageconversion.lib
+LIBRARY imageconversion.lib
LIBRARY bitmaptransforms.lib
// End of File
--- a/phoneclientserver/phoneserver/Group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -25,18 +25,17 @@
backup_registration.xml z:/private/10000850/backup_registration.xml
-Phoneserver_stub.SIS /epoc32/data/z/system/install/phoneserver_stub.sis
+Phoneserver_stub.SIS /epoc32/data/z/system/install/Phoneserver_stub.SIS
// IBY files
../rom/PhoneServer.iby CORE_MW_LAYER_IBY_EXPORT_PATH(PhoneServer.iby)
// LOC files
-../loc/phoneserver.loc MW_LAYER_LOC_EXPORT_PATH(phoneserver.loc)
+../loc/PhoneServer.loc MW_LAYER_LOC_EXPORT_PATH(PhoneServer.loc)
PRJ_MMPFILES
../Group/PhoneServer.mmp
-
PRJ_TESTMMPFILES
// specify the .mmp files required for building any test programs here
--- a/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvComHandRequest.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvComHandRequest.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,8 +22,8 @@
// INCLUDES
#include <e32base.h>
-#include <PhCltTypes.h>
-#include <CPhCltCommandHandler.h>
+#include <phclttypes.h>
+#include <cphcltcommandhandler.h>
// CONSTANTS
--- a/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvComHandRequestManager.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvComHandRequestManager.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,8 +22,8 @@
// INCLUDES
#include <e32base.h>
-#include "MPhSrvComHandNegotiators.h"
-#include "MPhSrvComHandInitiators.h"
+#include "MPhSrvComHandNegotiators.h"
+#include "MPhSrvComHandInitiators.h"
--- a/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvSubSessionCommandHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvSubSessionCommandHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
// INCLUDES
-#include "CPhSrvSubSessionBase.h"
+#include "CPhSrvSubSessionBase.h"
// CLASS DECLARATION
--- a/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvSubSessionCommandHandlerNotify.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/CommandHandler/CPhSrvSubSessionCommandHandlerNotify.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
// INCLUDES
-#include "CPhSrvSubSessionBase.h"
-#include "MPhSrvComHandInitiators.h"
+#include "cphsrvsubsessionbase.h"
+#include "mphsrvcomhandinitiators.h"
// CLASS DECLARATION
--- a/phoneclientserver/phoneserver/Inc/CommandHandler/MPhSrvComHandInitiators.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/CommandHandler/MPhSrvComHandInitiators.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,8 +22,8 @@
// INCLUDES
#include <e32base.h>
-#include "PhCltClientServer.h"
-#include <CPhCltCommandHandler.h>
+#include "PhCltClientServer.h"
+#include <cphcltcommandhandler.h>
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneserver/Inc/CommandHandler/MPhSrvComHandNegotiators.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/CommandHandler/MPhSrvComHandNegotiators.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
-#include <CPhCltCommandHandler.h>
+#include <cphcltcommandhandler.h>
// FORWARD DECLARATIONS
class MPhSrvComHandInitiator;
--- a/phoneclientserver/phoneserver/Inc/ImageHandler/CPhSrvSubSessionImageHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/ImageHandler/CPhSrvSubSessionImageHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -19,14 +19,14 @@
#define CPHSRVSUBSESSIONIMAGEHANDLER_H
// INCLUDES
-#include "CPhSrvSubSessionBase.h"
+#include "CPhSrvSubSessionBase.h"
#include "cphsrvimagesaver.h"
#include "mphsrvimagesaverobserver.h"
-#include <CPhCltBaseImageParams.h>
+#include <cphcltbaseimageparams.h>
#include <bautils.h>
#include <fbs.h>
-#include <PhoneClientServerDomainPStypes.h>
-#include <PhoneClientServerDomainPSkeys.h>
+#include <phoneclientserverdomainpstypes.h>
+#include <phoneclientserverdomainpskeys.h>
// CLASS DECLARATION
--- a/phoneclientserver/phoneserver/Inc/Messenger/CPhSrvMessengerObject.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Messenger/CPhSrvMessengerObject.h Fri Mar 19 09:40:14 2010 +0200
@@ -24,8 +24,8 @@
// INCLUDES
#include <e32base.h>
-#include "PhSrvMessengerTypes.h"
-#include <CPhCltCommandHandler.h>
+#include "PhSrvMessengerTypes.h"
+#include <cphcltcommandhandler.h>
// FORWARD DECLARATIONS
class CPhSrvSubSessionBase;
--- a/phoneclientserver/phoneserver/Inc/Messenger/CPhSrvMessengerRequestManager.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Messenger/CPhSrvMessengerRequestManager.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,8 +22,8 @@
// INCLUDES
#include <e32base.h>
-#include "MPhSrvMessengerNegotiators.h"
-#include <CPhCltCommandHandler.h>
+#include "MPhSrvMessengerNegotiators.h"
+#include <cphcltcommandhandler.h>
// FORWARD DECLARATIONS
class CPhSrvMessengerObject;
--- a/phoneclientserver/phoneserver/Inc/Messenger/CPhSrvSubSessionMessenger.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Messenger/CPhSrvSubSessionMessenger.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
// INCLUDES
-#include "CPhSrvSubSessionBase.h"
-#include <CPhCltMessenger.h>
+#include "CPhSrvSubSessionBase.h"
+#include <cphcltmessenger.h>
// FORWARD DECLARATIONS
class MPhSrvMessengerNegotiator;
--- a/phoneclientserver/phoneserver/Inc/Messenger/MPhSrvMessengerNegotiators.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Messenger/MPhSrvMessengerNegotiators.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,8 +22,8 @@
// INCLUDES
#include <e32base.h>
-#include "PhSrvMessengerTypes.h"
-#include <CPhCltMessenger.h>
+#include "PhSrvMessengerTypes.h"
+#include <cphcltmessenger.h>
// FORWARD DECLARATIONS
class CPhSrvSubSessionBase;
--- a/phoneclientserver/phoneserver/Inc/Messenger/PhSrvMessengerTypes.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Messenger/PhSrvMessengerTypes.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
-#include <CPhCltMessenger.h>
+#include <cphcltmessenger.h>
// DATA TYPES
--- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvEmergencyNumberManager.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvEmergencyNumberManager.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h> // cbase
-#include "MPhSrvEmergencyNumberManager.h" // interface
+#include "MPhSrvEmergencyNumberManager.h" // interface
// FORWARD DECLARATIONS
class MPhSrvPhoneInterface;
@@ -74,7 +74,7 @@
MPhSrvPhoneInterface& iPhone;
// Contains Emergency policy DLL interface.
- RLibrary iEnPolicyLib;
+ RLibrary iEnPolicyLib;
// Pointer to Emergency policy interface.
CEmergencyNumberPolicy* iEmergencyNumberPolicy;
--- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvPhoneController.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvPhoneController.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,7 +23,7 @@
// INCLUDES
#include <etelmm.h> // ETel
#include <rmmcustomapi.h> // CustomAPI
-#include "MPhSrvPhoneInterface.h" // The interface class
+#include "MPhSrvPhoneInterface.h" // The interface class
// CLASS DECLARATION
--- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvServer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvServer.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,9 +21,9 @@
// INCLUDES
-#include "MPhSrvPhoneInterface.h"
-#include "PhCltClientServer.h"
-#include <RPhCltServer.h>
+#include "MPhSrvPhoneInterface.h"
+#include "PhCltClientServer.h"
+#include <rphcltserver.h>
#include <fbs.h>
#include <f32file.h>
--- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSession.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSession.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <e32base.h>
-#include "PhCltClientServer.h"
+#include "PhCltClientServer.h"
// FORWARD DECLARATIONS
class CPhSrvServer;
--- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionBase.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionBase.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
-#include "MPhSrvMessageProcessor.h"
+#include "MPhSrvMessageProcessor.h"
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionExtCall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionExtCall.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
// INCLUDES
-#include "CPhSrvSubSessionBase.h"
-#include <cphcltextphonedialdata.h>
+#include "CPhSrvSubSessionBase.h"
+#include <CPhCltExtPhoneDialData.h>
// CLASS DECLARATION
--- a/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionUssd.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/CPhSrvSubSessionUssd.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
// INCLUDES
-#include "CPhSrvSubSessionBase.h"
-#include "MPhSrvUssdMessageSentObserver.h"
+#include "CPhSrvSubSessionBase.h"
+#include "MPhSrvUssdMessageSentObserver.h"
// CLASS DECLARATION
--- a/phoneclientserver/phoneserver/Inc/Standard/PhSrvDebugInfo.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/PhSrvDebugInfo.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h> // TInt, cbase
-#include "KPhSrvConfigure.h" // Debugging feature defines
+#include "KPhSrvConfigure.h" // Debugging feature defines
// MACROS
//----------------------------------------------------------------------------
--- a/phoneclientserver/phoneserver/Inc/Standard/PhSrvStartUp.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/PhSrvStartUp.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
-#include <PhCltTypes.h>
+#include <phclttypes.h>
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvCallRequest.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvCallRequest.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
-#include <cphcltextphonedialdata.h>
+#include <CPhCltExtPhoneDialData.h>
// CONSTANTS
@@ -100,7 +100,7 @@
* @return The call arguments.
*/
CPhCltExtPhoneDialData& CallArguments() const;
-
+
/**
* Update Emergency call status
* @param aMessage The outstanding client request which will be completed
@@ -146,7 +146,7 @@
// The object responsible for processing external client call requests.
// This is essentially an interface to the phone app engine.
- CPhCltExtPhoneDialData* iCallArguments;
+ CPhCltExtPhoneDialData* iCallArguments;
// A handle to the subsession that initiated this request.
TInt iSubSessionHandle;
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvCallRequestManager.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvCallRequestManager.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,9 +22,9 @@
// INCLUDES
#include <e32base.h>
-#include "MPhSrvObjectNegotiators.h"
-#include "MPhSrvObjectInitiators.h"
-#include <CPhCltExtPhoneDialData.h>
+#include "MPhSrvObjectNegotiators.h"
+#include "MPhSrvObjectInitiators.h"
+#include <CPhCltExtPhoneDialData.h>
// FORWARD DECLARATIONS
class CPhSrvCallRequest;
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvEmergencyRequestManager.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvEmergencyRequestManager.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,8 +22,8 @@
// INCLUDES
#include <e32base.h>
-#include "MPhSrvEmergencyNegotiators.h"
-#include "MPhSrvEmergencyInitiators.h"
+#include "MPhSrvEmergencyNegotiators.h"
+#include "MPhSrvEmergencyInitiators.h"
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvSubSessionEmergencyNum.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvSubSessionEmergencyNum.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
// INCLUDES
-#include "CPhSrvSubSessionBase.h"
+#include "CPhSrvSubSessionBase.h"
// CLASS DECLARATION
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvSubSessionNotifier.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/CPhSrvSubSessionNotifier.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,12 +22,12 @@
// INCLUDES
#include <e32base.h>
-#include <cphcltextphonedialdata.h>
-#include <CPhCltEmergencyCall.h> // for TPhCltEmergencyNumber
-#include "CPhSrvSubSessionBase.h"
-#include "MPhSrvEmergencyInitiators.h"
-#include "MPhSrvObjectInitiators.h"
-#include "MPhSrvComHandInitiators.h"
+#include <CPhCltExtPhoneDialData.h>
+#include <cphcltemergencycall.h> // for TPhCltEmergencyNumber
+#include "CPhSrvSubSessionBase.h"
+#include "MPhSrvEmergencyInitiators.h"
+#include "MPhSrvObjectInitiators.h"
+#include "MPhSrvComHandInitiators.h"
// CLASS DECLARATION
@@ -82,9 +82,9 @@
* be informed that it needs to make a call.
*
* @see MPhSrvInitiatorCall
- */
- void InitiatorMakeAsynchronousCallL( CPhCltExtPhoneDialData& aArgs );
- /**
+ */
+ void InitiatorMakeAsynchronousCallL( CPhCltExtPhoneDialData& aArgs );
+ /**
* Does this subsession have a pending request?
*
* @see MPhSrvInitiatorCall
@@ -130,7 +130,7 @@
void CmdSubSessionDialDataL ( const RMessage2& aMessage );
- void CmdSubSessionNotifyEmergencyL ( const RMessage2& aMessage );
+ void CmdSubSessionNotifyEmergencyL ( const RMessage2& aMessage );
void CmdSubSessionNotifyEmergencyCancel( const RMessage2& aMessage );
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvEmergencyNegotiators.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvEmergencyNegotiators.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
-#include <PhCltTypes.h>
+#include <phclttypes.h>
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvEmergencyNumberManager.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvEmergencyNumberManager.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
#define MPHSRVEMERGENCYNUMBERMANAGER_H
// INCLUDES
-#include "PhCltClientServer.h"
-#include <rphcltemergencycall.h>
+#include "PhCltClientServer.h"
+#include <RPhCltEmergencyCall.h>
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvObjectInitiators.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvObjectInitiators.h Fri Mar 19 09:40:14 2010 +0200
@@ -45,7 +45,7 @@
* @param aArgs The call parameters.
*/
virtual void InitiatorMakeAsynchronousCallL(
- CPhCltExtPhoneDialData& aArgs ) =0;
+ CPhCltExtPhoneDialData& aArgs ) =0;
/**
* Called by the call manager to find out if there is a registered
* notification handler.
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvObjectNegotiators.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_Aiw/MPhSrvObjectNegotiators.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,8 +22,8 @@
// INCLUDES
#include <e32base.h>
-#include <PhCltTypes.h>
-#include <cphcltextphonedialdata.h>
+#include <phclttypes.h>
+#include <CPhCltExtPhoneDialData.h>
// FORWARD DECLARATIONS
class MPhSrvInitiatorCall;
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvCallRequest.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvCallRequest.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
-#include <PhCltTypes.h>
+#include <phclttypes.h>
// CONSTANTS
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvCallRequestManager.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvCallRequestManager.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,8 +22,8 @@
// INCLUDES
#include <e32base.h>
-#include "MPhSrvObjectNegotiators.h"
-#include "MPhSrvObjectInitiators.h"
+#include "mphsrvobjectnegotiators.h"
+#include "mphsrvobjectinitiators.h"
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvSubSessionEmergencyNum.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvSubSessionEmergencyNum.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
// INCLUDES
-#include "CPhSrvSubSessionBase.h"
+#include "cphsrvsubsessionbase.h"
// CLASS DECLARATION
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvSubSessionNotifier.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/CPhSrvSubSessionNotifier.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,10 +22,10 @@
// INCLUDES
#include <e32base.h>
-#include "CPhSrvSubSessionBase.h"
-#include "MPhSrvObjectInitiators.h"
-#include "CPhSrvSubSessionNotifier.h"
-#include "MPhSrvComHandInitiators.h"
+#include "cphsrvsubsessionbase.h"
+#include "mphsrvobjectinitiators.h"
+#include "cphsrvsubsessionnotifier.h"
+#include "mphsrvcomhandinitiators.h"
// CLASS DECLARATION
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/MPhSrvEmergencyNumberManager.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/MPhSrvEmergencyNumberManager.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
-#include <RPhCltEmergencyNumber.h>
+#include <rphcltemergencynumber.h>
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/MPhSrvObjectNegotiators.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Standard/Standard_NoAiw/MPhSrvObjectNegotiators.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
-#include <PhCltTypes.h>
+#include <phclttypes.h>
// FORWARD DECLARATIONS
--- a/phoneclientserver/phoneserver/Inc/Ussd/CPhSrvUssdManager.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Inc/Ussd/CPhSrvUssdManager.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,9 +21,9 @@
// INCLUDES
#include <etelmm.h> // ETel
-#include "PhCltClientServer.h"
-#include "MPhSrvUssdNetworkObserver.h"
-#include "MPhSrvUssdReplyTimerObserver.h"
+#include "PhCltClientServer.h"
+#include "MPhSrvUssdNetworkObserver.h"
+#include "MPhSrvUssdReplyTimerObserver.h"
#include <badesca.h>
@@ -404,7 +404,7 @@
// Show Done note
TBool iShowDone;
- // Checks if received message type is Reply
+ // Checks if received message type is Reply
TBool iMsgTypeReply;
// Has the transaction been closed or not
--- a/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvComHandRequest.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvComHandRequest.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "CPhSrvComHandRequest.h"
-#include "PhSrvUtils.h"
+#include "CPhSrvComHandRequest.h"
+#include "PhSrvUtils.h"
--- a/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,11 +20,11 @@
// INCLUDE FILES
-#include "CPhSrvSubSessionCommandHandler.h"
-#include "CPhSrvSession.h"
-#include "CPhSrvServer.h"
-#include <PhCltTypes.h>
-#include "MPhSrvComHandNegotiators.h"
+#include "CPhSrvSubSessionCommandHandler.h"
+#include "CPhSrvSession.h"
+#include "CPhSrvServer.h"
+#include <phclttypes.h>
+#include "MPhSrvComHandNegotiators.h"
--- a/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerNotify.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerNotify.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,11 +20,11 @@
// INCLUDE FILES
-#include "CPhSrvSubSessionCommandHandlerNotify.h"
-#include "CPhSrvSession.h"
-#include "CPhSrvServer.h"
-#include <PhCltTypes.h>
-#include "MPhSrvComHandNegotiators.h"
+#include "cphsrvsubsessioncommandhandlernotify.h"
+#include "cphsrvsession.h"
+#include "cphsrvserver.h"
+#include <phclttypes.h>
+#include "mphsrvcomhandnegotiators.h"
--- a/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerNotifyStub.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerNotifyStub.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,12 +18,12 @@
// INCLUDE FILES
-#include "CPhSrvSubSessionBase.h"
-#include "CPhSrvSession.h"
-#include "CPhSrvServer.h"
-#include <PhCltTypes.h>
-#include "MPhSrvComHandNegotiators.h"
-#include "CPhSrvSubSessionCommandHandlerNotify.h"
+#include "cphsrvsubsessionbase.h"
+#include "cphsrvsession.h"
+#include "cphsrvserver.h"
+#include <phclttypes.h>
+#include "mphsrvcomhandnegotiators.h"
+#include "cphsrvsubsessioncommandhandlernotify.h"
--- a/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerStub.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/CommandHandler/CPhSrvSubSessionCommandHandlerStub.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,12 +18,12 @@
// INCLUDE FILES
-#include "CPhSrvSubSessionBase.h"
-#include "CPhSrvSession.h"
-#include "CPhSrvServer.h"
-#include <PhCltTypes.h>
-#include "MPhSrvComHandNegotiators.h"
-#include "CPhSrvSubSessionCommandHandler.h"
+#include "cphsrvsubsessionbase.h"
+#include "cphsrvsession.h"
+#include "cphsrvserver.h"
+#include <phclttypes.h>
+#include "mphsrvcomhandnegotiators.h"
+#include "cphsrvsubsessioncommandhandler.h"
--- a/phoneclientserver/phoneserver/Src/CommandHandler/CommandHandler_NoAiw/CPhSrvComHandRequestManager.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/CommandHandler/CommandHandler_NoAiw/CPhSrvComHandRequestManager.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,12 +18,12 @@
// INCLUDES
-#include "CPhSrvComHandRequestManager.h"
-#include "CPhSrvComHandRequest.h"
-#include "CPhSrvSubSessionBase.h"
-#include "PhSrvUtils.h"
-#include "CPhSrvServer.h"
-#include "MPhSrvEmergencyNumberManager.h"
+#include "cphsrvcomhandrequestmanager.h"
+#include "cphsrvcomhandrequest.h"
+#include "cphsrvsubsessionbase.h"
+#include "phsrvutils.h"
+#include "cphsrvserver.h"
+#include "mphsrvemergencynumbermanager.h"
// CONSTANTS
--- a/phoneclientserver/phoneserver/Src/CommandHandler/CommandHandler_NoAiw/CPhSrvComHandRequestManagerStub.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/CommandHandler/CommandHandler_NoAiw/CPhSrvComHandRequestManagerStub.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,10 +18,10 @@
// INCLUDES
-#include "CPhSrvComHandRequestManager.h"
-#include "CPhSrvComHandRequest.h"
-#include "CPhSrvSubSessionBase.h"
-#include "PhSrvUtils.h"
+#include "cphsrvcomhandrequestmanager.h"
+#include "cphsrvcomhandrequest.h"
+#include "cphsrvsubsessionbase.h"
+#include "phsrvutils.h"
--- a/phoneclientserver/phoneserver/Src/CommandHandler/Commandhandler_Aiw/CPhSrvComHandRequestManager.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/CommandHandler/Commandhandler_Aiw/CPhSrvComHandRequestManager.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,12 +18,12 @@
// INCLUDES
-#include "CPhSrvComHandRequestManager.h"
-#include "CPhSrvComHandRequest.h"
-#include "CPhSrvSubSessionBase.h"
-#include "PhSrvUtils.h"
-#include "CPhSrvServer.h"
-#include "MPhSrvEmergencyNumberManager.h"
+#include "CPhSrvComHandRequestManager.h"
+#include "CPhSrvComHandRequest.h"
+#include "CPhSrvSubSessionBase.h"
+#include "PhSrvUtils.h"
+#include "CPhSrvServer.h"
+#include "MPhSrvEmergencyNumberManager.h"
// CONSTANTS
--- a/phoneclientserver/phoneserver/Src/CommandHandler/Commandhandler_Aiw/CPhSrvComHandRequestManagerStub.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/CommandHandler/Commandhandler_Aiw/CPhSrvComHandRequestManagerStub.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,10 +18,10 @@
// INCLUDES
-#include "CPhSrvComHandRequestManager.h"
-#include "CPhSrvComHandRequest.h"
-#include "CPhSrvSubSessionBase.h"
-#include "PhSrvUtils.h"
+#include "cphsrvcomhandrequestmanager.h"
+#include "cphsrvcomhandrequest.h"
+#include "cphsrvsubsessionbase.h"
+#include "phsrvutils.h"
--- a/phoneclientserver/phoneserver/Src/ImageHandler/CPhSrvSubSessionImageHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/ImageHandler/CPhSrvSubSessionImageHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,12 +19,12 @@
// INCLUDE FILES
-#include "CPhSrvSubSessionImageHandler.h"
-#include "CPhSrvSession.h"
-#include "CPhSrvServer.h"
+#include "CPhSrvSubSessionImageHandler.h"
+#include "CPhSrvSession.h"
+#include "CPhSrvServer.h"
#include <e32property.h>
-#include <PhCltTypes.h>
-#include "PhSrvDebugInfo.h"
+#include <phclttypes.h>
+#include "PhSrvDebugInfo.h"
// CONSTANTS
_LIT( KPhSrvImageDriveRom, "z:" );
@@ -532,8 +532,8 @@
// Load the images from file.
const TBool loadDefaultImage = aImages.iType == EPhCltTypeVTDefault;
DoReadVTImagesL( loadDefaultImage );
-
- // Copy handles.
+
+ // Copy handles.
aImages.iImageCount = iVTBitMaps.Count();
for ( TInt i = 0; i < aImages.iImageCount; i++ )
{
@@ -562,7 +562,7 @@
aDefaultImage, path );
#ifdef __PHENG_DEBUG_INFO__
- TPtr ptr = searchPath->Des(); // temp pointer to avoid lvalue compile warning
+ TPtr ptr = searchPath->Des(); // temp pointer to avoid lvalue compile warning
RDebug::Print( _L(
"CPhSrvSubSessionImageHandler::ReadVT: %S"), ( &ptr ));
#endif
--- a/phoneclientserver/phoneserver/Src/Messenger/CPhSrvMessengerObject.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Messenger/CPhSrvMessengerObject.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,10 +18,10 @@
// INCLUDE FILES
-#include "CPhSrvMessengerObject.h"
-#include "CPhSrvSubSessionBase.h"
-#include "CPhSrvSession.h" // Phone server session.
-#include "PhSrvDebugInfo.h"
+#include "CPhSrvMessengerObject.h"
+#include "CPhSrvSubSessionBase.h"
+#include "CPhSrvSession.h" // Phone server session.
+#include "PhSrvDebugInfo.h"
// CONSTANTS
--- a/phoneclientserver/phoneserver/Src/Messenger/CPhSrvMessengerRequestManager.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Messenger/CPhSrvMessengerRequestManager.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,12 +20,12 @@
// INCLUDES
-#include "CPhSrvMessengerRequestManager.h"
-#include "CPhSrvMessengerObject.h"
-#include "CPhSrvSubSessionBase.h"
-#include "PhSrvUtils.h"
-#include "PhSrvMessengerTypes.h"
-#include "PhSrvDebugInfo.h"
+#include "CPhSrvMessengerRequestManager.h"
+#include "CPhSrvMessengerObject.h"
+#include "CPhSrvSubSessionBase.h"
+#include "PhSrvUtils.h"
+#include "PhSrvMessengerTypes.h"
+#include "PhSrvDebugInfo.h"
// CONSTANTS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/phoneserver/Src/Messenger/CPhSrvMessengerRequestManagerStub.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Stub version of CPhSrvMessengerRequestManager.cpp
+*
+*/
+
+
+
+// INCLUDES
+#include "cphsrvmessengerrequestmanager.h"
+
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CPhSrvMessengerRequestManager::CPhSrvMessengerRequestManager
+//
+// Constructor.
+// -----------------------------------------------------------------------------
+//
+CPhSrvMessengerRequestManager::CPhSrvMessengerRequestManager(
+ CPhSrvServer& aServer )
+: iServer( aServer )
+ {
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhSrvMessengerRequestManager::~CPhSrvMessengerRequestManager
+//
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CPhSrvMessengerRequestManager::~CPhSrvMessengerRequestManager()
+ {
+ // Stub.
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhSrvMessengerRequestManager::ConstructL
+//
+// Complete construction.
+// -----------------------------------------------------------------------------
+//
+void CPhSrvMessengerRequestManager::ConstructL()
+ {
+ // Stub.
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhSrvMessengerRequestManager::NegotiatorRequest
+//
+// Initiate a messenger request - called by the external messenger interface.
+// -----------------------------------------------------------------------------
+//
+void CPhSrvMessengerRequestManager::NegotiatorRequest(
+ CPhSrvSubSessionBase& /*aSubSession*/,
+ const TPhCltMessengerParameters& /*aParameters*/,
+ const RMessage2& /*aMessage*/ )
+ {
+ // Stub.
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhSrvMessengerRequestManager::NegotiatorRequestCancel
+//
+// Cancel a messenger request handling.
+// -----------------------------------------------------------------------------
+//
+void CPhSrvMessengerRequestManager::NegotiatorRequestCancel(
+ CPhSrvSubSessionBase& /*aSubSession*/,
+ const TPhCltMessengerCommand /*aRequestType*/ )
+ {
+ // Stub.
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhSrvMessengerRequestManager::NegotiatorRequestConstructL
+//
+// Reserve all space needed for the subsession given as parameter.
+// -----------------------------------------------------------------------------
+//
+void CPhSrvMessengerRequestManager::NegotiatorRequestConstructL(
+ CPhSrvSubSessionBase& /*aSubSession*/,
+ const TPhCltMessengerParameters& /*aParameters*/,
+ const RMessage2& /*aMessage*/ )
+ {
+ // Stub.
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhSrvMessengerRequestManager::NegotiatorRequestDelete
+//
+// Delete all space reserved for the subsession given as parameter.
+// -----------------------------------------------------------------------------
+//
+void CPhSrvMessengerRequestManager::NegotiatorRequestDelete(
+ CPhSrvSubSessionBase& /*aSubSession*/ )
+ {
+ // Stub.
+ }
+
+
+// End of File
--- a/phoneclientserver/phoneserver/Src/Messenger/CPhSrvSubSessionMessenger.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Messenger/CPhSrvSubSessionMessenger.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,12 +20,12 @@
// INCLUDE FILES
-#include "CPhSrvSubSessionMessenger.h"
-#include "CPhSrvSession.h"
-#include "CPhSrvServer.h"
-#include <PhCltTypes.h>
-#include "MPhSrvMessengerNegotiators.h"
-#include "PhSrvMessengerTypes.h"
+#include "CPhSrvSubSessionMessenger.h"
+#include "CPhSrvSession.h"
+#include "CPhSrvServer.h"
+#include <phclttypes.h>
+#include "MPhSrvMessengerNegotiators.h"
+#include "PhSrvMessengerTypes.h"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phoneclientserver/phoneserver/Src/Messenger/CPhSrvSubSessionMessengerStub.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Sub Session Messenger.
+* The stub version of CPhSrvSubSessionMessenger.cpp
+*
+*/
+
+
+
+// INCLUDE FILES
+#include "cphsrvsubsessionmessenger.h"
+#include "phcltclientserver.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CPhSrvSubSessionMessenger::CPhSrvSubSessionMessenger
+//
+// Constructor.
+// -----------------------------------------------------------------------------
+//
+CPhSrvSubSessionMessenger::CPhSrvSubSessionMessenger(
+ CPhSrvSession& aSession )
+: CPhSrvSubSessionBase( aSession, EPhSrvSubSessionTypeMessenger )
+ {
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhSrvSubSessionMessenger::~CPhSrvSubSessionMessenger
+//
+// Destructor.
+// -----------------------------------------------------------------------------
+//
+CPhSrvSubSessionMessenger::~CPhSrvSubSessionMessenger()
+ {
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhSrvSubSessionMessenger::NewL
+//
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CPhSrvSubSessionBase* CPhSrvSubSessionMessenger::NewL(
+ CPhSrvSession& /*aSession*/ )
+ {
+ // Stub version, so not supported.
+ User::Leave( KErrNotSupported );
+
+ return NULL;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhSrvSubSessionMessenger::PhSrvMessageDecoderCanProcessMessage
+//
+// Framework function. Returns ETrue for the op codes that
+// this subsession can handle.
+// -----------------------------------------------------------------------------
+//
+TBool CPhSrvSubSessionMessenger::PhSrvMessageDecoderCanProcessMessage(
+ TInt aFunction )
+ {
+ switch( aFunction )
+ {
+ case EPhoneServerMessengerSubSessionOpen:
+ case EPhoneServerMessengerSubSessionClose:
+ case EPhoneServerMessengerSubSessionConstruct:
+ case EPhoneServerMessengerSubSessionReceive:
+ case EPhoneServerMessengerSubSessionSend:
+ case EPhoneServerMessengerSubSessionSkip:
+ case EPhoneServerMessengerSubSessionCancel:
+ return ETrue;
+
+ default:
+ return EFalse;
+ }
+ }
+
+
+// -----------------------------------------------------------------------------
+// CPhSrvSubSessionMessenger::PhSrvMessageProcessorHandleMessageL
+//
+// Framework function. Handle any op-codes here.
+// -----------------------------------------------------------------------------
+//
+void CPhSrvSubSessionMessenger::PhSrvMessageProcessorHandleMessageL(
+ const RMessage2& /*aMessage*/ )
+ {
+ // Stub implementation, i.e. functionality not supported.
+ User::Leave( KErrNotSupported );
+ }
+
+
+// End of File
--- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvEmergencyNumberManager.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvEmergencyNumberManager.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,10 +18,10 @@
// INCLUDE FILES
-#include "CPhSrvEmergencyNumberManager.h"
-#include "MPhSrvPhoneInterface.h"
-#include "PhSrvDebugInfo.h"
-#include <CEmergencyNumberPolicy.h>
+#include "CPhSrvEmergencyNumberManager.h"
+#include "MPhSrvPhoneInterface.h"
+#include "PhSrvDebugInfo.h"
+#include <cemergencynumberpolicy.h>
// CONSTANTS
_LIT(KPhSrvDosEnPolicyLibName, "DosEnPolicy.dll"); // DOS emergency number policy
--- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvPhoneController.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvPhoneController.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,7 +18,7 @@
// INCLUDE FILES
-#include "CPhSrvPhoneController.h"
+#include "CPhSrvPhoneController.h"
#include <mmtsy_names.h>
--- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvResourceManager.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvResourceManager.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "CPhSrvResourceManager.h"
-#include "PhCltClientServer.h"
+#include "CPhSrvResourceManager.h"
+#include "PhCltClientServer.h"
#include <bautils.h>
--- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvScheduler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvScheduler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,8 +17,8 @@
// INCLUDE FILES
-#include "CPhSrvScheduler.h"
-#include "PhSrvUtils.h"
+#include "CPhSrvScheduler.h"
+#include "PhSrvUtils.h"
--- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvServer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvServer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,24 +17,24 @@
// INCLUDE FILES
-#include "CPhSrvServer.h"
-#include "CPhSrvSession.h"
-#include "CPhSrvScheduler.h"
-#include "CPhSrvUssdManager.h"
-#include "CPhSrvResourceManager.h"
-#include "CPhSrvPhoneController.h"
-#include "CPhSrvCallRequestManager.h"
-#include "CPhSrvEmergencyRequestManager.h"
-#include "CPhSrvEmergencyNumberManager.h"
+#include "CPhSrvServer.h"
+#include "CPhSrvSession.h"
+#include "CPhSrvScheduler.h"
+#include "CPhSrvUssdManager.h"
+#include "CPhSrvResourceManager.h"
+#include "CPhSrvPhoneController.h"
+#include "CPhSrvCallRequestManager.h"
+#include "CPhSrvEmergencyRequestManager.h"
+#include "CPhSrvEmergencyNumberManager.h"
-#include "PhSrvUtils.h"
-#include "KPhSrvConfigure.h" // debugprints ON/OFF
-#include "PhSrvDebugInfo.h"
+#include "PhSrvUtils.h"
+#include "KPhSrvConfigure.h" // debugprints ON/OFF
+#include "PhSrvDebugInfo.h"
-#include "MPhSrvComHandNegotiators.h"
-#include "CPhSrvComHandRequestManager.h"
-#include "MPhSrvMessengerNegotiators.h"
-#include "CPhSrvMessengerRequestManager.h"
+#include "MPhSrvComHandNegotiators.h"
+#include "CPhSrvComHandRequestManager.h"
+#include "MPhSrvMessengerNegotiators.h"
+#include "CPhSrvMessengerRequestManager.h"
#include <featmgr.h>
--- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvSession.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvSession.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,11 +18,11 @@
// INCLUDE FILES
-#include "CPhSrvServer.h"
-#include "CPhSrvSession.h"
-#include "CPhSrvSubSessionBase.h"
-#include "PhSrvSubSessionFactory.h"
-#include "PhCltClientServer.h"
+#include "CPhSrvServer.h"
+#include "CPhSrvSession.h"
+#include "CPhSrvSubSessionBase.h"
+#include "PhSrvSubSessionFactory.h"
+#include "PhCltClientServer.h"
// CONSTANTS
@@ -181,18 +181,18 @@
if ( subSession )
{
- // Check that the subsession can handle this request
- if ( !subSession->PhSrvMessageDecoderCanProcessMessage( function ) )
- {
- PanicClient(
- aMessage,
- EPhCltServerInitiatedPanicInvalidHandle );
- }
- else
- {
- // Get it to process this request
- subSession->PhSrvMessageProcessorHandleMessageL( aMessage );
- }
+ // Check that the subsession can handle this request
+ if ( !subSession->PhSrvMessageDecoderCanProcessMessage( function ) )
+ {
+ PanicClient(
+ aMessage,
+ EPhCltServerInitiatedPanicInvalidHandle );
+ }
+ else
+ {
+ // Get it to process this request
+ subSession->PhSrvMessageProcessorHandleMessageL( aMessage );
+ }
}
}
}
--- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvSubSessionBase.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvSubSessionBase.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDE FILES
-#include "CPhSrvSubSessionBase.h"
-#include "CPhSrvSession.h"
-#include "CPhSrvSubSessionNotifier.h"
+#include "CPhSrvSubSessionBase.h"
+#include "CPhSrvSession.h"
+#include "CPhSrvSubSessionNotifier.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneserver/Src/Standard/CPhSrvSubSessionUssd.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/CPhSrvSubSessionUssd.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,17 +17,17 @@
// INCLUDE FILES
-#include "CPhSrvSubSessionUssd.h"
+#include "CPhSrvSubSessionUssd.h"
#include <etelmm.h> // ETel
-#include "PhSrvUtils.h"
-#include "CPhSrvSession.h"
-#include "CPhSrvServer.h"
+#include "PhSrvUtils.h"
+#include "CPhSrvSession.h"
+#include "CPhSrvServer.h"
-#include "CPhSrvUssdManager.h"
+#include "CPhSrvUssdManager.h"
-#include <PhCltTypes.h>
+#include <phclttypes.h>
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneserver/Src/Standard/PhSrvDebugInfo.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/PhSrvDebugInfo.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -22,8 +22,8 @@
#include <e32svr.h> // rdebug
#include <f32file.h> // file and FS
#include <utf.h> // converter
-#include "PhSrvDebugInfo.h" // this
-#include "KPhSrvConfigure.h" // defines
+#include "PhSrvDebugInfo.h" // this
+#include "KPhSrvConfigure.h" // defines
// Initialize
--- a/phoneclientserver/phoneserver/Src/Standard/PhSrvStartUp.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/PhSrvStartUp.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,10 +18,10 @@
// INCLUDE FILES
-#include "PhSrvStartUp.h"
-#include "CPhSrvScheduler.h"
-#include "CPhSrvServer.h"
-#include "PhSrvUtils.h"
+#include "PhSrvStartUp.h"
+#include "CPhSrvScheduler.h"
+#include "CPhSrvServer.h"
+#include "PhSrvUtils.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneserver/Src/Standard/PhSrvSubSessionFactory.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/PhSrvSubSessionFactory.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,16 +19,16 @@
// INCLUDES
-#include "PhCltClientServer.h"
+#include "PhCltClientServer.h"
-#include "PhSrvSubSessionFactory.h"
-#include "CPhSrvSubSessionNotifier.h"
-#include "CPhSrvSubSessionExtCall.h"
-#include "CPhSrvSubSessionUssd.h"
-#include "CPhSrvSubSessionEmergencyNum.h"
-#include "CPhSrvSubSessionCommandHandler.h"
-#include "CPhSrvSubSessionMessenger.h"
-#include "CPhSrvSubSessionImageHandler.h"
+#include "PhSrvSubSessionFactory.h"
+#include "CPhSrvSubSessionNotifier.h"
+#include "CPhSrvSubSessionExtCall.h"
+#include "CPhSrvSubSessionUssd.h"
+#include "CPhSrvSubSessionEmergencyNum.h"
+#include "CPhSrvSubSessionCommandHandler.h"
+#include "CPhSrvSubSessionMessenger.h"
+#include "CPhSrvSubSessionImageHandler.h"
// ============================ MEMBER FUNCTIONS ===============================
@@ -132,10 +132,10 @@
case EPhoneServerComHandNotifySubSessionOpen:
if ( aSID == KPhoneSecureId.iUid
#if defined(__WINSCW__)
- // To enable module testing using EUnit
- || aSID == KEunitExeRunnerId.iUid
+ // To enable module testing using EUnit
+ || aSID == KEunitExeRunnerId.iUid
#endif // __WINSCW__
- )
+ )
{
return ETrue;
}
--- a/phoneclientserver/phoneserver/Src/Standard/PhSrvUtils.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/PhSrvUtils.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,7 +18,7 @@
// INCLUDES
#include <e32base.h>
-#include "PhSrvUtils.h"
+#include "PhSrvUtils.h"
// CONSTANTS
--- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhCltExtPhoneDialData.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhCltExtPhoneDialData.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,7 +18,7 @@
// INCLUDE FILES
-#include <cphcltextphonedialdata.h>
+#include <CPhCltExtPhoneDialData.h>
#include <cphcltdialdata.h>
@@ -484,7 +484,7 @@
packageSize+=sizeof( iRedialMaximumDuration.Int() );
if ( iContactLink )
{
- packageSize += CalculateDescriptorSize( *iContactLink );
+ packageSize += CalculateDescriptorSize( *iContactLink );
}
packageSize += CalculateDescriptorSize( iSubAddress );
packageSize += sizeof( iShowNumber);
@@ -628,9 +628,9 @@
stream.WriteInt32L( iRedial );
stream.WriteInt32L( iRedialMaximumDuration.Int() );
if ( iContactLink )
- {
- WriteDescriptorToStreamL( stream, *iContactLink );
- }
+ {
+ WriteDescriptorToStreamL( stream, *iContactLink );
+ }
stream << iSubAddress;
stream.WriteInt32L( iShowNumber );
stream.WriteInt32L( iAllowMatch );
--- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvCallRequest.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvCallRequest.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "CPhSrvCallRequest.h"
-#include "PhSrvUtils.h"
+#include "CPhSrvCallRequest.h"
+#include "PhSrvUtils.h"
// ============================ MEMBER FUNCTIONS ===============================
@@ -35,7 +35,7 @@
const RMessage2& aMessage,
CPhCltExtPhoneDialData& aArguments,
TInt aSubSessionHandle )
- : iPendingRequestPointer( aMessage ),
+ : iPendingRequestPointer( aMessage ),
iSubSessionHandle( aSubSessionHandle )
{
iCallArguments = &aArguments;
@@ -153,7 +153,7 @@
TInt aSubSessionHandle)
{
- __ASSERT_ALWAYS( aArguments.TelephoneNumber() == KPhSrvUsedEmergencyCallNumber,
+ __ASSERT_ALWAYS( aArguments.TelephoneNumber() == KPhSrvUsedEmergencyCallNumber,
PhoneServerUtils::Panic(
EPhoneServerPanicEmergencyCallRequestFailure ) );
@@ -174,7 +174,7 @@
{
return;
}
- __ASSERT_ALWAYS(
+ __ASSERT_ALWAYS(
iCallArguments->TelephoneNumber() == KPhSrvUsedEmergencyCallNumber,
PhoneServerUtils::Panic(
EPhoneServerPanicEmergencyCallRequestFailure ) );
--- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvCallRequestManager.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvCallRequestManager.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,10 +18,10 @@
// INCLUDES
-#include "CPhSrvCallRequestManager.h"
-#include "CPhSrvCallRequest.h"
-#include "CPhSrvSubSessionBase.h"
-#include "PhSrvUtils.h"
+#include "CPhSrvCallRequestManager.h"
+#include "CPhSrvCallRequest.h"
+#include "CPhSrvSubSessionBase.h"
+#include "PhSrvUtils.h"
// CONSTANTS
--- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvEmergencyRequestManager.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvEmergencyRequestManager.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDES
-#include "CPhSrvEmergencyRequestManager.h"
-#include "CPhSrvSubSessionBase.h"
-#include "PhSrvUtils.h"
+#include "CPhSrvEmergencyRequestManager.h"
+#include "CPhSrvSubSessionBase.h"
+#include "PhSrvUtils.h"
// CONSTANTS
--- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionEmergencyNum.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionEmergencyNum.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,15 +18,15 @@
// INCLUDE FILES
-#include "CPhSrvSubSessionEmergencyNum.h"
+#include "CPhSrvSubSessionEmergencyNum.h"
#include <s32mem.h>
-#include <PhCltTypes.h>
-#include "CPhSrvSession.h"
-#include "CPhSrvServer.h"
-#include "MPhSrvPhoneInterface.h"
-#include "MPhSrvEmergencyNumberManager.h"
-#include "MPhSrvEmergencyNegotiators.h"
-#include "PhSrvDebugInfo.h"
+#include <phclttypes.h>
+#include "CPhSrvSession.h"
+#include "CPhSrvServer.h"
+#include "MPhSrvPhoneInterface.h"
+#include "MPhSrvEmergencyNumberManager.h"
+#include "MPhSrvEmergencyNegotiators.h"
+#include "PhSrvDebugInfo.h"
// CONSTANTS
--- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionExtCall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionExtCall.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,10 +17,10 @@
// INCLUDE FILES
-#include "CPhSrvSubSessionExtCall.h"
-#include "CPhSrvSession.h"
-#include "CPhSrvServer.h"
-#include "MPhSrvObjectNegotiators.h"
+#include "CPhSrvSubSessionExtCall.h"
+#include "CPhSrvSession.h"
+#include "CPhSrvServer.h"
+#include "MPhSrvObjectNegotiators.h"
// Hash mark
_LIT( KPhoneHash, "#" );
@@ -93,21 +93,21 @@
break;
case EPhoneServerExtCallSubSessionMakeCall:
CreateCallArgsL( aMessage );
- // Checks if telephone number contains dtmf string
- dtmfNumber = IsDtmfPhoneNumber( iCallArgs->TelephoneNumber());
- if ( !dtmfNumber )
- {
- // Checks if telephone number is USSD/SS string
- isSSUssd = ( iCallArgs->TelephoneNumber().Right( KPhoneHash().Length() ) == KPhoneHash );
- if ( isSSUssd )
- {
- // Capabilities needed if USSD/SS string
+ // Checks if telephone number contains dtmf string
+ dtmfNumber = IsDtmfPhoneNumber( iCallArgs->TelephoneNumber());
+ if ( !dtmfNumber )
+ {
+ // Checks if telephone number is USSD/SS string
+ isSSUssd = ( iCallArgs->TelephoneNumber().Right( KPhoneHash().Length() ) == KPhoneHash );
+ if ( isSSUssd )
+ {
+ // Capabilities needed if USSD/SS string
hasCapNetworkControlAndServices = aMessage.HasCapability( ECapabilityNetworkControl,
ECapabilityNetworkServices );
hasCapWriteAndReadDeviceData = aMessage.HasCapability( ECapabilityReadDeviceData, ECapabilityWriteDeviceData );
hasUssdSSCaps = hasCapNetworkControlAndServices && hasCapWriteAndReadDeviceData;
- }
- }
+ }
+ }
if ( ( hasCapNetworkServices && !isSSUssd ) || hasUssdSSCaps )
{
CmdSubSessionMakeCallL( aMessage );
@@ -160,7 +160,7 @@
//
void CPhSrvSubSessionExtCall::CmdSubSessionMakeCallL(
const RMessage2& aMessage )
- {
+ {
// Submit a new request to the call manager
MPhSrvNegotiatorCall& callNegotiator = PhoneSession().PhoneServer(
@@ -194,14 +194,14 @@
void CPhSrvSubSessionExtCall::CreateCallArgsL( const RMessage2& aMessage )
{
HBufC8* package = HBufC8::NewLC( aMessage.Int1() );
- TPtr8 calldata( package->Des() );
- PhoneSession().Read(
+ TPtr8 calldata( package->Des() );
+ PhoneSession().Read(
aMessage,
0,
calldata );
-
- iCallArgs = CPhCltExtPhoneDialData::NewL( *package );
- CleanupStack::PopAndDestroy( package );
+
+ iCallArgs = CPhCltExtPhoneDialData::NewL( *package );
+ CleanupStack::PopAndDestroy( package );
}
// -----------------------------------------------------------------------------
--- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionNotifier.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/CPhSrvSubSessionNotifier.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,13 +18,13 @@
// INCLUDE FILES
-#include <PhCltTypes.h>
-#include "CPhSrvSubSessionNotifier.h"
-#include "CPhSrvSession.h"
-#include "CPhSrvServer.h"
-#include "MPhSrvEmergencyNegotiators.h"
-#include "MPhSrvObjectNegotiators.h"
-#include "MPhSrvComHandNegotiators.h"
+#include <phclttypes.h>
+#include "CPhSrvSubSessionNotifier.h"
+#include "CPhSrvSession.h"
+#include "CPhSrvServer.h"
+#include "MPhSrvEmergencyNegotiators.h"
+#include "MPhSrvObjectNegotiators.h"
+#include "MPhSrvComHandNegotiators.h"
// CONSTANTS
// None.
@@ -211,7 +211,7 @@
iPendingDialRequestPointer.Complete( KErrNone );
}
iHavePendingDialRequestPointer = EFalse;
-
+
}
@@ -331,26 +331,26 @@
//
void CPhSrvSubSessionNotifier::CmdSubSessionCloneDialDataL(
CPhCltExtPhoneDialData& aArgs )
- {
- iDialData = CPhCltExtPhoneDialData::NewL();
- iDialData->SetTelephoneNumber( aArgs.TelephoneNumber() );
- iDialData->SetCallType( aArgs.CallType() );
- iDialData->SetNameL( aArgs.Name() );
- iDialData->SetWindowGroup( aArgs.WindowGroup() );
- iDialData->SetRedial( aArgs.Redial() );
- iDialData->SetRedialMaximumDuration( aArgs.RedialMaximumDuration() );
- iDialData->SetContactLinkL( aArgs.ContactLink() );
- iDialData->SetSubAddressL( aArgs.SubAddress() );
- iDialData->SetShowNumber( aArgs.ShowNumber() );
- iDialData->SetAllowMatch( aArgs.AllowMatch() );
- iDialData->SetSATCall( aArgs.SATCall() );
- iDialData->SetEndOtherCalls( aArgs.EndOtherCalls() );
- iDialData->SetBearerL( aArgs.Bearer() );
- iDialData->SetSendKeyPressed( aArgs.SendKeyPressed() );
- iDialData->SetInitiateCall( aArgs.InitiateCall() );
- iDialData->SetServiceId( aArgs.ServiceId() );
- iDialData->SetUUIL( aArgs.UUI() );
- }
+ {
+ iDialData = CPhCltExtPhoneDialData::NewL();
+ iDialData->SetTelephoneNumber( aArgs.TelephoneNumber() );
+ iDialData->SetCallType( aArgs.CallType() );
+ iDialData->SetNameL( aArgs.Name() );
+ iDialData->SetWindowGroup( aArgs.WindowGroup() );
+ iDialData->SetRedial( aArgs.Redial() );
+ iDialData->SetRedialMaximumDuration( aArgs.RedialMaximumDuration() );
+ iDialData->SetContactLinkL( aArgs.ContactLink() );
+ iDialData->SetSubAddressL( aArgs.SubAddress() );
+ iDialData->SetShowNumber( aArgs.ShowNumber() );
+ iDialData->SetAllowMatch( aArgs.AllowMatch() );
+ iDialData->SetSATCall( aArgs.SATCall() );
+ iDialData->SetEndOtherCalls( aArgs.EndOtherCalls() );
+ iDialData->SetBearerL( aArgs.Bearer() );
+ iDialData->SetSendKeyPressed( aArgs.SendKeyPressed() );
+ iDialData->SetInitiateCall( aArgs.InitiateCall() );
+ iDialData->SetServiceId( aArgs.ServiceId() );
+ iDialData->SetUUIL( aArgs.UUI() );
+ }
// -----------------------------------------------------------------------------
// CPhSrvSubSessionNotifier::CmdSubSessionDialDataL
--- a/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/cphcltdialdata.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Standard/Standard_Aiw/cphcltdialdata.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
// INCLUDE FILES
#include <cphcltdialdata.h>
-#include "cphcltextphonedialdata.h" // For correct default values
+#include "CPhCltExtPhoneDialData.h" // For correct default values
// ============================ MEMBER FUNCTIONS ===============================
--- a/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdManager.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdManager.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -16,26 +16,26 @@
*/
// INCLUDE FILES
-#include "CPhSrvUssdManager.h"
-#include "PhSrvUtils.h"
-#include "CPhSrvUssdSendHandler.h"
-#include "CPhSrvUssdReceiveHandler.h"
-#include "CPhSrvUssdNotifyNWRelease.h"
-#include "CPhSrvResourceManager.h"
-#include "CPhSrvUssdReplyTimer.h"
-#include "MPhSrvUssdMessageSentObserver.h"
-#include "MPhSrvPhoneInterface.h"
-#include "CPhSrvUssdSessionCancelWaiter.h"
+#include "CPhSrvUssdManager.h"
+#include "PhSrvUtils.h"
+#include "CPhSrvUssdSendHandler.h"
+#include "CPhSrvUssdReceiveHandler.h"
+#include "CPhSrvUssdNotifyNWRelease.h"
+#include "CPhSrvResourceManager.h"
+#include "CPhSrvUssdReplyTimer.h"
+#include "MPhSrvUssdMessageSentObserver.h"
+#include "MPhSrvPhoneInterface.h"
+#include "CPhSrvUssdSessionCancelWaiter.h"
-#include <AknGlobalNote.h>
+#include <AknGlobalNote.h>
#include <aknnotedialog.h>
#include <aknstaticnotedialog.h>
-#include <AknProgressDialog.h>
+#include <AknProgressDialog.h>
#include <apacmdln.h>
#include <apgtask.h>
#include <bautils.h>
-#include <StringLoader.h>
-#include <AknGlobalMsgQuery.h>
+#include <StringLoader.h>
+#include <AknGlobalMsgQuery.h>
#include <textresolver.h>
#include <charconv.h>
#include <gsmuelem.h>
@@ -44,24 +44,30 @@
#include <w32std.h>
#include <apgcli.h>
-#include <CPhCltUssd.h>
+#include <cphcltussd.h>
#include <avkon.rsg>
-#include <PhoneServer.rsg>
-#include <telephonyvariant.hrh>
-#include "PhSrvDebugInfo.h"
+#include <phoneserver.rsg>
+// <-- QT PHONE START-->
+//#include <telephonyvariant.hrh>
+// <-- QT PHONE END-->
+#include "PhSrvDebugInfo.h"
#include <e32property.h>
-
-#include <NcnListInternalPSKeys.h>
+// <-- QT PHONE START-->
+//#include <ncnlistinternalpskeys.h>
+// <-- QT PHONE END-->
#include <centralrepository.h>
-#include <telinternalcrkeys.h>
+// <-- QT PHONE START-->
+//#include <telinternalcrkeys.h>
+// <-- QT PHONE END-->
#include <coreapplicationuisdomainpskeys.h>
// CONSTANTS
const TInt KPhSrvDefaultValue = 0x00000000;
// const TInt KPhSrvUssdNoTone = 0; // See SharedDataKeysVariant.h or NcnListInternalPSKeys.h
-const TInt KPhSrvUssdTone = 2; // See SharedDataKeysVariant.h or NcnListInternalPSKeys.h
-
+// <-- QT PHONE START-->
+//const TInt KPhSrvUssdTone = 2; // See SharedDataKeysVariant.h or NcnListInternalPSKeys.h
+// <-- QT PHONE END-->
// const TInt KPhSrvUssdTimeOutObserverGranularity = 2;
// const TInt KPhSrvUssdSentMessageObserverGranularity = 2;
const TInt KPhSrvUssdAppUID = 0x10005955;
@@ -489,7 +495,7 @@
R_PHSRV_USSD_MESQUERY_MESSAGE);
CleanupStack::Pop( iMeQuHeaderText );
- _DDPRINT( 4, "PhSrv.ConstructL.iSatCanceled ", iSatCanceled );
+ _DDPRINT( 4, "PhSrv.ConstructL.iSatCanceled ", iSatCanceled );
_DDPRINT( 4, "PhSrv.ConstructL.iShowDone ", iShowDone );
iNotifyArray = new( ELeave ) CDesCArrayFlat( KPhrUssdNotifyArraySize );
_DPRINT( 4, "PhSrv.ConstructL.End" ); // debug print
@@ -581,7 +587,7 @@
if ( NetworkWaitingForAnAnswer() )
{
// Network is waiting for an answer
- _DPRINT( 4, "PhSrv.SendUssdL.EUssdMOReply" ); // debug print
+ _DPRINT( 4, "PhSrv.SendUssdL.EUssdMOReply" ); // debug print
aMsgAttribute.iType = RMobileUssdMessaging::EUssdMOReply;
}
else
@@ -781,15 +787,15 @@
// This always is either ongoing transaction or starting a new based
// on incoming message, mark transaction to be open.
iNetworkReleased = EFalse;
-
+
// 2. Complete Send with some positive value.
- if ( iObserver )
+ if ( iObserver )
{
// debug print
_DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.Observer" );
UssdNetworkObserverHandleSendEventL( 1 ); // some positive value
}
-
+
if ( aMsgAttributes.iFlags&RMobileUssdMessaging::KUssdMessageType &&
aMsgAttributes.iType == RMobileUssdMessaging::EUssdMTRequest )
{
@@ -842,7 +848,7 @@
}
else
{
- _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.String" );
+ _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.String" );
iNotifyMessage = ( aMsgAttributes.iType == RMobileUssdMessaging::EUssdMTNotify );
_DDPRINT( 4, "PhSrv.UssdHandleReceivedEventL.iNotifyMessage: ", iNotifyMessage );
_DDPRINT( 4, "PhSrv.UssdNOHREventL.iNotifyMessage: ", iNotifyMessage );
@@ -856,29 +862,29 @@
}
if ( iNotifyMessage || iMsgTypeReply )
- {
- //This is for reply message in notifyarray
- iNotifyMessage = ETrue;
- _DDPRINT( 4, "PhSrv.UssdHandleReceivedEventL.iNotifyMessage: ", iNotifyMessage );
+ {
+ //This is for reply message in notifyarray
+ iNotifyMessage = ETrue;
+ _DDPRINT( 4, "PhSrv.UssdHandleReceivedEventL.iNotifyMessage: ", iNotifyMessage );
- //Notify added to array
- iNotifyArray->AppendL( iReceivedMessage );
+ //Notify added to array
+ iNotifyArray->AppendL( iReceivedMessage );
- _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.AppendL" ); // debug print
- UpdateNotifyMessage();
+ _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.AppendL" ); // debug print
+ UpdateNotifyMessage();
- if ( !iSendRelease && NotifyCount() <= 1 )
- {
- _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.!SendRelease.Cancel" ); // debug print
- Cancel();
- }
- }
+ if ( !iSendRelease && NotifyCount() <= 1 )
+ {
+ _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.!SendRelease.Cancel" ); // debug print
+ Cancel();
+ }
+ }
else
- {
- // New message deletes old message, i.e. Cancel existing query.
- Cancel();
- _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.NewAnswerable" ); // debug print
- }
+ {
+ // New message deletes old message, i.e. Cancel existing query.
+ Cancel();
+ _DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.NewAnswerable" ); // debug print
+ }
if ( !iGlobalMsgQuery )
{
@@ -905,12 +911,15 @@
// Play the USSD tone if needed. Logically should be in RunL, but here
// to give better balancing with voice and visible message.
+ // <-- QT PHONE START-->
+ /*
if ( IsTelephonyFeatureSupported( KTelephonyLVFlagUssdTone ) )
{
_DPRINT( 4, "PhSrv.UssdHandleReceivedEventL.PlayTone" );
PlayUssdTone();
}
-
+ */
+ // <-- QT PHONE END-->
// Launch the new message query
if ( !IsActive() )
{
@@ -963,31 +972,31 @@
void CPhSrvUssdManager::UssdNetworkObserverHandleNotifyNWReleaseL(
const RMobilePhone::TMobilePhoneSendSSRequestV3 & aReturnResult,
TInt aError )
- {
- _DDPRINT( 4, "PhSrv.UssdNotifyNWRelease ##### ", aError ); // debug print
+ {
+ _DDPRINT( 4, "PhSrv.UssdNotifyNWRelease ##### ", aError ); // debug print
_DPRINT_FLAGS();
- TBool showNotes = ShowNotesL();
- iNetworkReleased = ETrue;
- iSendingAck = EFalse;
+ TBool showNotes = ShowNotesL();
+ iNetworkReleased = ETrue;
+ iSendingAck = EFalse;
iSendRelease = EFalse;
- iAcksToBeSent = 0;
-
- if ( iHavePendingSatMessagePointer )
- {
- iReturnResult = aReturnResult;
- if ( !iSatCanceled )
- {
- CompleteSatL(&iReceivedMessage, aError );
- _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleNotifyNWReleaseL.CompleteSat" ); // debug print
- }
- }
- if ( iUssdReplyTimer && iUssdReplyTimer->IsTimerActive() )
- {
- _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleNotifyNWReleaseL.Timer.Stop" );
- iUssdReplyTimer->Stop();
- Cancel();
- CheckArray();
- }
+ iAcksToBeSent = 0;
+
+ if ( iHavePendingSatMessagePointer )
+ {
+ iReturnResult = aReturnResult;
+ if ( !iSatCanceled )
+ {
+ CompleteSatL(&iReceivedMessage, aError );
+ _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleNotifyNWReleaseL.CompleteSat" ); // debug print
+ }
+ }
+ if ( iUssdReplyTimer && iUssdReplyTimer->IsTimerActive() )
+ {
+ _DPRINT( 4, "PhSrv.UssdNetworkObserverHandleNotifyNWReleaseL.Timer.Stop" );
+ iUssdReplyTimer->Stop();
+ Cancel();
+ CheckArray();
+ }
if ( showNotes && iShowDone )
{
ShowDoneNoteL();
@@ -1004,7 +1013,7 @@
_DPRINT( 4, "PhSrv.UssdNetworkObserverHandleNotifyNWReleaseL.Ending" );
_DPRINT_FLAGS();
_DPRINT( 4, "PhSrv.UssdNetworkObserverHandleNotifyNWReleaseL.End" );
- }
+ }
// -----------------------------------------------------------------------------
// CPhSrvUssdManager::ShowDoneNoteL
@@ -1483,74 +1492,74 @@
// -----------------------------------------------------------------------------
//
void CPhSrvUssdManager::CheckArray()
- {
- _DPRINT( 4, "PhSrv.CheckArray.Start" ); // debug print
- if (iNotifyArray && NotifyCount() > 0)
- {
- if ( !iNotifyMessage && !iClearArray )
- {
- iLaunchGMQ = ETrue;
- iNotifyMessage = ETrue;
- _DPRINT( 4, "PhSrv.CheckArray.iNotifyMessage.ETrue" );
- iTimer.After( iStatus , KPhSrvUssdMessageQueryInterval );
- _DDPRINT( 4, "PhSrv.CheckArray.SetActive.NoNotifyMessage ", iStatus.Int() );
- SetActive();
- }
- else if( NotifyCount() > 1 )
- {
- ( iNotifyArray )->Delete( 0 );
- ( iNotifyArray )->Compress();
- iLaunchGMQ = ETrue;
- iNotifyMessage = ETrue;
- _DPRINT( 4, "PhSrv.CheckArray.iNotifyMessage.ETrue" );
- iTimer.After( iStatus , KPhSrvUssdMessageQueryInterval );
- _DDPRINT( 4, "PhSrv.CheckArray.SetActive.NotifyCount>1 ", iStatus.Int() );
- SetActive();
- }
- else
- {
- iNotifyArray->Reset();
- iNotifyMessage = EFalse;
- _DPRINT( 4, "PhSrv.CheckArray.iNotifyMessage.EFalse" );
- }
- }
+ {
+ _DPRINT( 4, "PhSrv.CheckArray.Start" ); // debug print
+ if (iNotifyArray && NotifyCount() > 0)
+ {
+ if ( !iNotifyMessage && !iClearArray )
+ {
+ iLaunchGMQ = ETrue;
+ iNotifyMessage = ETrue;
+ _DPRINT( 4, "PhSrv.CheckArray.iNotifyMessage.ETrue" );
+ iTimer.After( iStatus , KPhSrvUssdMessageQueryInterval );
+ _DDPRINT( 4, "PhSrv.CheckArray.SetActive.NoNotifyMessage ", iStatus.Int() );
+ SetActive();
+ }
+ else if( NotifyCount() > 1 )
+ {
+ ( iNotifyArray )->Delete( 0 );
+ ( iNotifyArray )->Compress();
+ iLaunchGMQ = ETrue;
+ iNotifyMessage = ETrue;
+ _DPRINT( 4, "PhSrv.CheckArray.iNotifyMessage.ETrue" );
+ iTimer.After( iStatus , KPhSrvUssdMessageQueryInterval );
+ _DDPRINT( 4, "PhSrv.CheckArray.SetActive.NotifyCount>1 ", iStatus.Int() );
+ SetActive();
+ }
+ else
+ {
+ iNotifyArray->Reset();
+ iNotifyMessage = EFalse;
+ _DPRINT( 4, "PhSrv.CheckArray.iNotifyMessage.EFalse" );
+ }
+ }
_DPRINT_FLAGS();
- _DPRINT( 4, "PhSrv.CheckArray.End" ); // debug print
- }
+ _DPRINT( 4, "PhSrv.CheckArray.End" ); // debug print
+ }
// -----------------------------------------------------------------------------
// CPhSrvUssdManager::ClearArray()
// -----------------------------------------------------------------------------
//
void CPhSrvUssdManager::ClearArrayL()
- {
- _DPRINT( 4, "PhSrv.ClearArrayL.Start" ); // debug print
- if (iNotifyArray && NotifyCount() > 0)
- {
- if (iNotifyMessage && NotifyCount()== 1 )
- {
- iNotifyArray->Reset();
- }
- else
- {
- iReceivedMessage.Zero();
- HBufC* unreadText = iResourceManager.ReadResourceLC( R_PHSRV_TEXT_UNREAD );
- TPtr pMessage( unreadText->Des() );
- iReceivedMessage.Append( pMessage );
- iNotifyArray->InsertL( 0, iReceivedMessage );
- CleanupStack::PopAndDestroy( unreadText );
- iLaunchGMQ = ETrue;
- iNotifyMessage = ETrue;
- _DPRINT( 4, "PhSrv.ClearArrayL.iNotifyMessage.ETrue" );
- iClearArray = ETrue;
- iTimer.After( iStatus , KPhSrvUssdMessageQueryInterval );
- _DDPRINT( 4, "PhSrv.ClearArrayL.iTimer ", iStatus.Int() );
- SetActive();
- }
- }
+ {
+ _DPRINT( 4, "PhSrv.ClearArrayL.Start" ); // debug print
+ if (iNotifyArray && NotifyCount() > 0)
+ {
+ if (iNotifyMessage && NotifyCount()== 1 )
+ {
+ iNotifyArray->Reset();
+ }
+ else
+ {
+ iReceivedMessage.Zero();
+ HBufC* unreadText = iResourceManager.ReadResourceLC( R_PHSRV_TEXT_UNREAD );
+ TPtr pMessage( unreadText->Des() );
+ iReceivedMessage.Append( pMessage );
+ iNotifyArray->InsertL( 0, iReceivedMessage );
+ CleanupStack::PopAndDestroy( unreadText );
+ iLaunchGMQ = ETrue;
+ iNotifyMessage = ETrue;
+ _DPRINT( 4, "PhSrv.ClearArrayL.iNotifyMessage.ETrue" );
+ iClearArray = ETrue;
+ iTimer.After( iStatus , KPhSrvUssdMessageQueryInterval );
+ _DDPRINT( 4, "PhSrv.ClearArrayL.iTimer ", iStatus.Int() );
+ SetActive();
+ }
+ }
_DPRINT_FLAGS();
- _DPRINT( 4, "PhSrv.ClearArrayL.End" ); // debug print
- }
+ _DPRINT( 4, "PhSrv.ClearArrayL.End" ); // debug print
+ }
// -----------------------------------------------------------------------------
// CPhSrvUssdManager::NotifyCount()
@@ -1566,15 +1575,15 @@
// -----------------------------------------------------------------------------
//
void CPhSrvUssdManager:: UpdateNotifyMessage()
- {
- _DDPRINT( 4, "PhSrv.UpdateNotifyMessage.Start, clear: ", iClearArray ); // debug print
- if (NotifyCount() > 1 && !iClearArray )
- {
- _DPRINT( 4, "PhSrv.UpdateNotifyMessage" ); // debug print
- iGlobalMsgQuery->UpdateMsgQuery( R_AVKON_SOFTKEYS_NEXT_EXIT__NEXT );
- }
- _DPRINT( 4, "PhSrv.UpdateNotifyMessage.End" ); // debug print
- }
+ {
+ _DDPRINT( 4, "PhSrv.UpdateNotifyMessage.Start, clear: ", iClearArray ); // debug print
+ if (NotifyCount() > 1 && !iClearArray )
+ {
+ _DPRINT( 4, "PhSrv.UpdateNotifyMessage" ); // debug print
+ iGlobalMsgQuery->UpdateMsgQuery( R_AVKON_SOFTKEYS_NEXT_EXIT__NEXT );
+ }
+ _DPRINT( 4, "PhSrv.UpdateNotifyMessage.End" ); // debug print
+ }
// -----------------------------------------------------------------------------
// CPhSrvUssdManager::DoCancel
@@ -1883,8 +1892,8 @@
}
iHavePendingSatMessagePointer = EFalse;
}
- else
- {
+ else
+ {
_DPRINT( 4, "PhSrv.CompleteSatL.recString.Write" ); // debug print
iPendingSatMessagePointer.WriteL(
2,
@@ -1927,7 +1936,7 @@
TBool CPhSrvUssdManager::IsTelephonyFeatureSupported(
const TInt aFeatureId )
{
- return ( aFeatureId & iVariantReadOnlyValues );
+ return ( aFeatureId & iVariantReadOnlyValues );
}
@@ -1941,9 +1950,10 @@
_DPRINT( 4, "PhSrv.UssdM.PlayTone.start" ); // debug print
TInt err = KErrNone;
-
- RProperty::Define( KPSUidNcnList, KNcnPlayAlertTone, RProperty::EInt, ECapability_None , ECapabilityWriteDeviceData );
- RProperty::Set( KPSUidNcnList, KNcnPlayAlertTone, KPhSrvUssdTone );
+// <-- QT PHONE START-->
+// RProperty::Define( KPSUidNcnList, KNcnPlayAlertTone, RProperty::EInt, ECapability_None , ECapabilityWriteDeviceData );
+// RProperty::Set( KPSUidNcnList, KNcnPlayAlertTone, KPhSrvUssdTone );
+// <-- QT PHONE END-->
// debug print
_DDPRINT(
@@ -1962,7 +1972,8 @@
{
_DPRINT( 4, "PhSrv.UssdM.GetTelephonyVariantData.Start" );
TInt err = KErrNone;
-
+// <-- QT PHONE START-->
+/*
// Variation data should be unchangable during run-time,
// therefore, if once succesfully read, later reads are
// not allowed.
@@ -1981,6 +1992,8 @@
_DDPRINT( 4, "PhSrv.UssdM.variant", iVariantReadOnlyValues ); // debug print
_DPRINT( 4, "PhSrv.UssdM.GetTelephonyVariantData.End" );
+ */
+// <-- QT PHONE END-->
return err;
}
--- a/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdNotifyNWRelease.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdNotifyNWRelease.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,9 +18,9 @@
// INCLUDE FILES
-#include "CPhSrvUssdNotifyNWRelease.h"
-#include "MPhSrvUssdNetworkObserver.h"
-#include "PhSrvDebugInfo.h"
+#include "CPhSrvUssdNotifyNWRelease.h"
+#include "MPhSrvUssdNetworkObserver.h"
+#include "PhSrvDebugInfo.h"
// CONSTANTS
const TInt KPhSrvUssdReceiverPriority = CActive::EPriorityLow + 2;
--- a/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdReceiveHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdReceiveHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "CPhSrvUssdReceiveHandler.h"
-#include "MPhSrvUssdNetworkObserver.h"
+#include "CPhSrvUssdReceiveHandler.h"
+#include "MPhSrvUssdNetworkObserver.h"
// CONSTANTS
--- a/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdReplyTimer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdReplyTimer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,8 +18,8 @@
// INCLUDE FILES
-#include "CPhSrvUssdReplyTimer.h"
-#include "MPhSrvUssdReplyTimerObserver.h"
+#include "CPhSrvUssdReplyTimer.h"
+#include "MPhSrvUssdReplyTimerObserver.h"
// CONSTANTS
--- a/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdSendHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/Src/Ussd/CPhSrvUssdSendHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,11 +17,11 @@
// INCLUDE FILES
-#include "CPhSrvUssdSendHandler.h"
-#include "MPhSrvUssdNetworkObserver.h"
-#include "MPhSrvPhoneInterface.h"
-#include "CPhSrvUssdSessionCancelWaiter.h"
-#include "PhSrvDebugInfo.h" //debug prints
+#include "CPhSrvUssdSendHandler.h"
+#include "MPhSrvUssdNetworkObserver.h"
+#include "MPhSrvPhoneInterface.h"
+#include "CPhSrvUssdSessionCancelWaiter.h"
+#include "PhSrvDebugInfo.h" //debug prints
#include <gsmuelem.h>
#include <f32file.h>
@@ -188,19 +188,19 @@
// -----------------------------------------------------------------------------
//
void CPhSrvUssdSendHandler::SendReleaseSession()
- {
- _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession.Start" ); // debug print
- if ( !iSessionCancelWaiter->IsActive() )
- {
- _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession" ); // debug print
- iUssdMessaging.SendRelease(
+ {
+ _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession.Start" ); // debug print
+ if ( !iSessionCancelWaiter->IsActive() )
+ {
+ _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession" ); // debug print
+ iUssdMessaging.SendRelease(
iSessionCancelWaiter->iStatus,
iSessionCancelWaiter->iSSRequestPckg );
- _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession2" );
+ _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession2" );
iSessionCancelWaiter->SetActive();
_DDPRINT( 4, "PhSrv.Sendhandler.SRS.iUssdMessaging", iStatus.Int() );
- }
- _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession.End" ); // debug print
- }
+ }
+ _DPRINT( 4, "PhSrv.Sendhandler.SendReleaseSession.End" ); // debug print
+ }
// End of File
--- a/phoneclientserver/phoneserver/rom/PhoneServer.iby Tue Feb 02 01:11:09 2010 +0200
+++ b/phoneclientserver/phoneserver/rom/PhoneServer.iby Fri Mar 19 09:40:14 2010 +0200
@@ -25,6 +25,6 @@
define DATAZ_ EPOCROOT##epoc32\data\Z
#endif
- data = ZPRIVATE\10000850\backup_registration.xml PRIVATE\10000850\backup_registration.xml
+ data = ZPRIVATE\10000850\backup_registration.xml PRIVATE\10000850\backup_registration.xml
#endif
--- a/phonecmdhandler/phonecmdhnlr/group/PhoneCmdHandler.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/group/PhoneCmdHandler.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -23,35 +23,37 @@
UID 0x1000008d 0x10205046
CAPABILITY CAP_GENERAL_DLL
-VENDORID VID_DEFAULT
+VENDORID VID_DEFAULT
SOURCEPATH ../src
-SOURCE PhoneHandler.cpp
-SOURCE PhoneHandlerControl.cpp
-SOURCE PhoneHandlerActive.cpp
-SOURCE PhoneHandlerCallBase.cpp
-SOURCE PhoneHandlerAnswerCall.cpp
-SOURCE PhoneHandlerEndCall.cpp
-SOURCE PhoneHandlerDialCall.cpp
-SOURCE PhoneHandlerVoiceDial.cpp
-SOURCE PhoneHandlerRedial.cpp
-SOURCE PhoneHandlerMultipartyCall.cpp
-SOURCE PhoneHandlerDTMF.cpp
-SOURCE PhoneHandlerResponse.cpp
-SOURCE PhoneHandlerCallState.cpp
+SOURCE PhoneHandler.cpp
+SOURCE PhoneHandlerControl.cpp
+SOURCE PhoneHandlerActive.cpp
+SOURCE PhoneHandlerCallBase.cpp
+SOURCE PhoneHandlerAnswerCall.cpp
+SOURCE PhoneHandlerEndCall.cpp
+SOURCE PhoneHandlerDialCall.cpp
+SOURCE PhoneHandlerVoiceDial.cpp
+SOURCE PhoneHandlerRedial.cpp
+SOURCE PhoneHandlerMultipartyCall.cpp
+SOURCE PhoneHandlerDTMF.cpp
+SOURCE PhoneHandlerResponse.cpp
+SOURCE PhoneHandlerCallState.cpp
USERINCLUDE ../inc
APP_LAYER_SYSTEMINCLUDE
-LIBRARY euser.lib
-LIBRARY remconinterfacebase.lib
-LIBRARY remconextensionapi.lib
-LIBRARY phoneclient.lib
-LIBRARY logcli.lib
-LIBRARY efsrv.lib
-LIBRARY pbkeng.lib
+LIBRARY euser.lib
+LIBRARY remconinterfacebase.lib
+LIBRARY remconextensionapi.lib
+LIBRARY phoneclient.lib
+LIBRARY logcli.lib
+LIBRARY efsrv.lib
+// <-- QT PHONE START -->
+//LIBRARY pbkeng.lib
+// <-- QT PHONE END -->
MACRO API_TRACE_FLAG
MACRO COMPONENT_TRACE_FLAG
--- a/phonecmdhandler/phonecmdhnlr/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: Receives and executes call handling related key presses
-* (e.g. answer call, end call) from accessories.
+* (e.g. answer call, end call) from accessories.
*
*
*/
--- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerActive.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerActive.h Fri Mar 19 09:40:14 2010 +0200
@@ -42,79 +42,79 @@
* @since S60 3.1
*/
NONSHARABLE_CLASS( CPhoneHandlerActive ) : public CActive
- {
- public: // Constructors and destructor
-
- /**
+ {
+ public: // Constructors and destructor
+
+ /**
* Two-phased constructor.
*/
- static CPhoneHandlerActive* NewL( MPhoneHandlerObserver& aObserver );
-
- /**
+ static CPhoneHandlerActive* NewL( MPhoneHandlerObserver& aObserver );
+
+ /**
* Destructor.
*/
- ~CPhoneHandlerActive();
-
- public: // New functions
-
- /**
+ ~CPhoneHandlerActive();
+
+ public: // New functions
+
+ /**
* From CActive. Indicates that the active object has issued a request
* and that it is now outstanding.
* @since S60 3.1
* @return
*/
- void SetActive();
-
- public: // Functions from base classes
-
- protected: // New functions
+ void SetActive();
+
+ public: // Functions from base classes
+
+ protected: // New functions
protected: // Functions from base classes
- /**
+ /**
* From CActive. Handles an active object’s request completion event.
*/
- void RunL();
-
- /**
+ void RunL();
+
+ /**
* From CActive. Implements cancellation of an outstanding request.
*/
- void DoCancel();
-
- /**
+ void DoCancel();
+
+ /**
* From CActive. Handles a leave occurring in the request completion
* event handler RunL().
*/
- TInt RunError( TInt aError );
+ TInt RunError( TInt aError );
- private:
-
- /**
+ private:
+
+ /**
* C++ default constructor.
*/
- CPhoneHandlerActive( MPhoneHandlerObserver& aObserver );
-
- /**
+ CPhoneHandlerActive( MPhoneHandlerObserver& aObserver );
+
+ /**
* By default Symbian 2nd phase constructor is private.
*/
- void ConstructL();
-
- public: // Data
+ void ConstructL();
+
+ public: // Data
protected: // Data
private: // Data
-
- // Notifies caller of an asynchronous request when request has been
- // completed.
- MPhoneHandlerObserver& iObserver;
-
- public: // Friend classes
+
+ // Notifies caller of an asynchronous request when request has been
+ // completed.
+ MPhoneHandlerObserver& iObserver;
+
+ public: // Friend classes
protected: // Friend classes
private: // Friend classes
- };
+ };
#endif // CPHONEHANDLERACTIVE_H
--- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerAnswerCall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerAnswerCall.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
#define CPHONEHANDLERANSWERCALL_H
// INCLUDES
-#include "PhoneHandlerCallBase.h"
-#include <RemConExtensionApi.h>
+#include "PhoneHandlerCallBase.h"
+#include <RemConExtensionApi.h>
// CONSTANTS
@@ -43,7 +43,7 @@
* @since S60 3.1
*/
NONSHARABLE_CLASS( CPhoneHandlerAnswerCall ) : public CPhoneHandlerCallBase
-
+
{
public: // Constructors and destructor
@@ -51,9 +51,9 @@
* Two-phased constructor.
*/
static CPhoneHandlerAnswerCall* NewL(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation
- = ERemConExtAnswerCall );
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation
+ = ERemConExtAnswerCall );
/**
* Destructor.
@@ -97,8 +97,8 @@
* C++ default constructor.
*/
CPhoneHandlerAnswerCall(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation );
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation );
/**
* By default Symbian 2nd phase constructor is private.
--- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerCallBase.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerCallBase.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,10 +20,10 @@
#define CPHONEHANDLERCALLBASE
// INCLUDES
-#include "PhoneHandlerService.h"
-#include "PhoneHandlerObserver.h"
+#include "PhoneHandlerService.h"
+#include "PhoneHandlerObserver.h"
#include <e32base.h>
-#include <RPhCltServer.h>
+#include <rphcltserver.h>
// CONSTANTS
@@ -46,8 +46,8 @@
* @since S60 3.1
*/
NONSHARABLE_CLASS( CPhoneHandlerCallBase ) : public CBase,
- public MPhoneHandlerService,
- public MPhoneHandlerObserver
+ public MPhoneHandlerService,
+ public MPhoneHandlerObserver
{
protected: // Constructors and destructor
@@ -65,7 +65,7 @@
public: // Functions from base classes
- /**
+ /**
* From MPhoneHandlerService. Starts to process an asynchronous request.
* @since Series 60 3.1
* @param
@@ -81,7 +81,7 @@
*/
virtual void Delete() = 0;
- /**
+ /**
* From MPhoneHandlerObserver. Notifies when asynchronous request has
* been completed.
* @since S60 3.1
@@ -89,7 +89,7 @@
* @return void
*/
virtual void RequestCompleted( const TInt aError ) = 0;
-
+
protected: // New functions
/**
@@ -107,31 +107,31 @@
* @return void
*/
void NextState();
-
- /**
+
+ /**
* Called when service isn't running (e.g. when it's completed).
* @since S60 3.1
* @param void
* @return void
*/
- void IdleState();
-
- /**
+ void IdleState();
+
+ /**
* Returns an active object's TRequestStatus for asynchronous calls.
* @since S60 3.1
* @param void
* @return void
*/
- TRequestStatus& GetStatus();
-
- /**
+ TRequestStatus& GetStatus();
+
+ /**
* Activates an active object for asynchronous calls.
* @since S60 3.1
* @param void
* @return void
*/
- void Activate();
-
+ void Activate();
+
protected: // Functions from base classes
private:
@@ -140,20 +140,20 @@
protected: // Data
- // call handling service states
+ // call handling service states
enum TPhoneHandlerServiceState
- {
- EPhoneHandlerStateIdle = 0,
- EPhoneHandlerState1 = 1,
- EPhoneHandlerState2 = 2,
- EPhoneHandlerState3 = 3
- };
-
- // stores service state
- TPhoneHandlerServiceState iState;
-
- // pointer to API providing call handling services
- CPhCltCommandHandler* iCommandHandler; // owned
+ {
+ EPhoneHandlerStateIdle = 0,
+ EPhoneHandlerState1 = 1,
+ EPhoneHandlerState2 = 2,
+ EPhoneHandlerState3 = 3
+ };
+
+ // stores service state
+ TPhoneHandlerServiceState iState;
+
+ // pointer to API providing call handling services
+ CPhCltCommandHandler* iCommandHandler; // owned
private: // Data
--- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerCallState.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerCallState.h Fri Mar 19 09:40:14 2010 +0200
@@ -44,73 +44,73 @@
* @since S60 3.1
*/
NONSHARABLE_CLASS( CPhoneHandlerCallState ) : public CActive
- {
- public: // Constructors and destructor
-
- /**
+ {
+ public: // Constructors and destructor
+
+ /**
* Two-phased constructor.
*/
- static CPhoneHandlerCallState* NewL( CPhoneHandlerControl& aControl );
-
- /**
+ static CPhoneHandlerCallState* NewL( CPhoneHandlerControl& aControl );
+
+ /**
* Destructor.
*/
- ~CPhoneHandlerCallState();
-
- public: // New functions
-
- public: // Functions from base classes
-
- protected: // New functions
+ ~CPhoneHandlerCallState();
+
+ public: // New functions
+
+ public: // Functions from base classes
+
+ protected: // New functions
protected: // Functions from base classes
- /**
+ /**
* From CActive. Handles S60 start up state change event.
*/
- void RunL();
-
- /**
+ void RunL();
+
+ /**
* From CActive. Implements cancellation of an outstanding Subscibe()
* request.
*/
- void DoCancel();
-
- private:
-
- /**
+ void DoCancel();
+
+ private:
+
+ /**
* C++ default constructor.
*/
- CPhoneHandlerCallState( CPhoneHandlerControl& aControl );
-
- /**
+ CPhoneHandlerCallState( CPhoneHandlerControl& aControl );
+
+ /**
* By default Symbian 2nd phase constructor is private.
*/
- void ConstructL();
-
- /**
- * Starts to listen change in S60 start up state.
- **/
- void Subscribe();
-
- public: // Data
+ void ConstructL();
+
+ /**
+ * Starts to listen change in S60 start up state.
+ **/
+ void Subscribe();
+
+ public: // Data
protected: // Data
private: // Data
- // Publish and Subscribe handle used to listen changes in call states
- RProperty iProperty;
-
- // reference to control
+ // Publish and Subscribe handle used to listen changes in call states
+ RProperty iProperty;
+
+ // reference to control
CPhoneHandlerControl& iControl;
-
- public: // Friend classes
+
+ public: // Friend classes
protected: // Friend classes
private: // Friend classes
- };
+ };
#endif // CPHONEHANDLERCALLSTATE_H
--- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerControl.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerControl.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,11 +20,11 @@
#define CPHONEHANDLERCONTROL_H
// INCLUDES
-#include "PhoneHandlerService.h"
-#include <RemConExtensionApi.h>
-#include <RemConCallHandlingTargetObserver.h>
+#include "PhoneHandlerService.h"
+#include <RemConExtensionApi.h>
+#include <RemConCallHandlingTargetObserver.h>
#include <e32base.h>
-#include <PhCltTypes.h>
+#include <phclttypes.h>
#include <e32property.h>
// CONSTANTS
@@ -51,15 +51,15 @@
* @since S60 3.1
*/
NONSHARABLE_CLASS( CPhoneHandlerControl ) : public CBase,
- public MRemConCallHandlingTargetObserver
- {
+ public MRemConCallHandlingTargetObserver
+ {
public: // Constructors and destructor
/**
* Two-phased constructor.
*/
static CPhoneHandlerControl* NewL(
- CRemConInterfaceSelector* aIfSelector = NULL );
+ CRemConInterfaceSelector* aIfSelector = NULL );
/**
* Destructor.
@@ -68,7 +68,7 @@
public: // New functions
- /**
+ /**
* Returns phone number for dial or speed dial.
* @since S60 3.1
* @param void
@@ -107,36 +107,36 @@
* @return TChar DTMF tone
*/
const TChar& Tone() const;
-
- /**
+
+ /**
* Returns reference to API used to communicate with accessory who
* initiated key press.
* @since S60 3.1
* @param void
* @return CRemConCallHandlingTarget& reference to API
- */
- CRemConCallHandlingTarget& CommandInitiator() const;
-
- /**
+ */
+ CRemConCallHandlingTarget& CommandInitiator() const;
+
+ /**
* Informs the latest call state.
* @since S60 3.1
* @param aState Call state from KTelephonyCallState P&S key
* @return void
*/
- void NotifyCallState( const TInt aState );
+ void NotifyCallState( const TInt aState );
- /**
+ /**
* Get iSwitchCall flag, if this flag is ETrue, it means
* "Send" key in remote target is pressed in multiparty call,
* otherwise EFalse
* @since S60 3.1
* @return TBool
*/
- TBool SwitchCall();
+ TBool SwitchCall();
-
+
public: // Functions from base classes
-
+
protected: // New functions
protected: // Functions from base classes
@@ -152,93 +152,84 @@
* By default Symbian 2nd phase constructor is private.
*/
void ConstructL( CRemConInterfaceSelector* aIfSelector = NULL );
-
- /**
- * From MRemConCallHandlingTargetObserver. Answer an incoming phone call.
- */
- virtual void AnswerCall();
+
+ /**
+ * From MRemConCallHandlingTargetObserver. Answer an incoming phone call.
+ */
+ virtual void AnswerCall();
- /**
- * From MRemConCallHandlingTargetObserver. End an incoming/ongoing
- * phone call.
- */
- virtual void EndCall();
-
- /**
- * From MRemConCallHandlingTargetObserver. Answer an incoming phone call,
- * or end an ongoing call according to call status.
- */
- virtual void AnswerEndCall();
-
- /**
- * From MRemConCallHandlingTargetObserver. Make a voice call.
- */
- virtual void VoiceDial( const TBool aActivate );
-
- /**
- * From MRemConCallHandlingTargetObserver. Redial last phone call.
- */
- virtual void LastNumberRedial();
-
- /**
- * From MRemConCallHandlingTargetObserver. Dial a phone call.
- */
- virtual void DialCall( const TDesC8& aTelNumber );
-
- /**
- * From MRemConCallHandlingTargetObserver. Make multiparty call.
- */
- virtual void MultipartyCalling( const TDesC8& aData );
-
- /**
- * Generates DTMF signal.
- */
- virtual void GenerateDTMF( const TChar aChar );
-
- /**
- * From MRemConCallHandlingTargetObserver. Make a speed dial call.
- */
- virtual void SpeedDial( const TInt aIndex );
-
- /**
- * Starts processing service corresponding to key press.
- */
- void StartProcessing(
- const TRemConExtCallHandlingApiOperationId aOperation );
-
- /**
- * Creates service.
- */
- MPhoneHandlerService* CreateServiceL(
- const TRemConExtCallHandlingApiOperationId aOperation );
-
- /**
- * Initializes speed dial.
- */
- void InitializeSpeedDialL();
-
- /**
- * Returns call status.
- */
- void CallStatusL( RPhone::TLineInfo& aLineInfo );
-
- /**
- * Returns autolock status
+ /**
+ * From MRemConCallHandlingTargetObserver. End an incoming/ongoing
+ * phone call.
+ */
+ virtual void EndCall();
+
+ /**
+ * From MRemConCallHandlingTargetObserver. Answer an incoming phone call,
+ * or end an ongoing call according to call status.
+ */
+ virtual void AnswerEndCall();
+
+ /**
+ * From MRemConCallHandlingTargetObserver. Make a voice call.
+ */
+ virtual void VoiceDial( const TBool aActivate );
+
+ /**
+ * From MRemConCallHandlingTargetObserver. Redial last phone call.
+ */
+ virtual void LastNumberRedial();
+
+ /**
+ * From MRemConCallHandlingTargetObserver. Dial a phone call.
+ */
+ virtual void DialCall( const TDesC8& aTelNumber );
+
+ /**
+ * From MRemConCallHandlingTargetObserver. Make multiparty call.
*/
- TBool IsAutoLockOn() const;
-
- /**
- * Returns BT accessory command status
+ virtual void MultipartyCalling( const TDesC8& aData );
+
+ /**
+ * Generates DTMF signal.
+ */
+ virtual void GenerateDTMF( const TChar aChar );
+
+ /**
+ * From MRemConCallHandlingTargetObserver. Make a speed dial call.
+ */
+ virtual void SpeedDial( const TInt aIndex );
+
+ /**
+ * Starts processing service corresponding to key press.
*/
- TBool IsBTAccessoryCmd() const;
-
+ void StartProcessing(
+ const TRemConExtCallHandlingApiOperationId aOperation );
+
+ /**
+ * Creates service.
+ */
+ MPhoneHandlerService* CreateServiceL(
+ const TRemConExtCallHandlingApiOperationId aOperation );
+
+ /**
+ * Initializes speed dial.
+ */
+ void InitializeSpeedDialL();
+
+ /**
+ * Returns call status.
+ */
+ void CallStatusL( RPhone::TLineInfo& aLineInfo );
+
+
private: // Data
// Provides e.g. service to listen accessory key presses.
- CRemConInterfaceSelector* iInterfaceSelector; // owned
+ CRemConInterfaceSelector* iInterfaceSelector; // owned
// API notifying PhoneCmdHandler about call handling key presses.
- CRemConCallHandlingTarget* iTarget; // owned
+ CRemConCallHandlingTarget* iTarget; // owned
// Phone number for dial call/speed dial.
TPhCltTelephoneNumber iTelNumber;
--- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerDTMF.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerDTMF.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,8 +21,8 @@
#define CPHONEHANDLERDTMF_H
// INCLUDES
-#include "PhoneHandlerCallBase.h"
-#include <RemConExtensionApi.h>
+#include "PhoneHandlerCallBase.h"
+#include <RemConExtensionApi.h>
// CONSTANTS
@@ -44,7 +44,7 @@
* @since S60 3.1
*/
NONSHARABLE_CLASS( CPhoneHandlerDTMF ) : public CPhoneHandlerCallBase
-
+
{
public: // Constructors and destructor
@@ -52,10 +52,10 @@
* Two-phased constructor.
*/
static CPhoneHandlerDTMF* NewL(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation
- = ERemConExtGenerateDTMF
- );
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation
+ = ERemConExtGenerateDTMF
+ );
/**
* Destructor.
@@ -99,7 +99,7 @@
* C++ default constructor.
*/
CPhoneHandlerDTMF( CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation );
+ TRemConExtCallHandlingApiOperationId aOperation );
/**
* By default Symbian 2nd phase constructor is private.
--- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerDialCall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerDialCall.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,8 +21,8 @@
#define CPHONEHANDLERDIALCALL_H
// INCLUDES
-#include "PhoneHandlerCallBase.h"
-#include <RemConExtensionApi.h>
+#include "PhoneHandlerCallBase.h"
+#include <RemConExtensionApi.h>
// CONSTANTS
@@ -44,7 +44,7 @@
* @since S60 3.1
*/
NONSHARABLE_CLASS( CPhoneHandlerDialCall ) : public CPhoneHandlerCallBase
-
+
{
public: // Constructors and destructor
@@ -52,9 +52,9 @@
* Two-phased constructor.
*/
static CPhoneHandlerDialCall* NewL(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation
- = ERemConExtDialCall );
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation
+ = ERemConExtDialCall );
/**
* Destructor.
@@ -62,7 +62,7 @@
virtual ~CPhoneHandlerDialCall();
public: // New functions
-
+
public: // Functions from base classes
/**
@@ -97,15 +97,15 @@
/**
* C++ default constructor.
*/
- CPhoneHandlerDialCall(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation );
+ CPhoneHandlerDialCall(
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation );
/**
* By default Symbian 2nd phase constructor is private.
*/
void ConstructL();
-
+
public: // Data
protected: // Data
--- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerEndCall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerEndCall.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
#define CPHONEHANDLERENDCALL_H
// INCLUDES
-#include "PhoneHandlerCallBase.h"
-#include <RemConExtensionApi.h>
+#include "PhoneHandlerCallBase.h"
+#include <RemConExtensionApi.h>
// CONSTANTS
@@ -43,7 +43,7 @@
* @since S60 3.1
*/
NONSHARABLE_CLASS( CPhoneHandlerEndCall ) : public CPhoneHandlerCallBase
-
+
{
public: // Constructors and destructor
@@ -51,9 +51,9 @@
* Two-phased constructor.
*/
static CPhoneHandlerEndCall* NewL(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation
- = ERemConExtEndCall );
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation
+ = ERemConExtEndCall );
/**
* Destructor.
@@ -97,14 +97,14 @@
* C++ default constructor.
*/
CPhoneHandlerEndCall(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation );
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation );
/**
* By default Symbian 2nd phase constructor is private.
*/
void ConstructL();
-
+
public: // Data
protected: // Data
--- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerMultipartyCall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerMultipartyCall.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
#define CPHONEHANDLERMULTIPARTYCALL_H
// INCLUDES
-#include "PhoneHandlerCallBase.h"
-#include <RemConExtensionApi.h>
+#include "PhoneHandlerCallBase.h"
+#include <RemConExtensionApi.h>
// CONSTANTS
@@ -43,7 +43,7 @@
* @since S60 3.1
*/
NONSHARABLE_CLASS( CPhoneHandlerMultipartyCall ) : public CPhoneHandlerCallBase
-
+
{
public: // Constructors and destructor
@@ -51,10 +51,10 @@
* Two-phased constructor.
*/
static CPhoneHandlerMultipartyCall* NewL(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation
- = ERemConExt3WaysCalling
- );
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation
+ = ERemConExt3WaysCalling
+ );
/**
* Destructor.
@@ -98,8 +98,8 @@
* C++ default constructor.
*/
CPhoneHandlerMultipartyCall(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation );
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation );
/**
* By default Symbian 2nd phase constructor is private.
--- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerRedial.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerRedial.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,8 +21,8 @@
#define CPHONEHANDLERLASTNUMBERREDIAL_H
// INCLUDES
-#include "PhoneHandlerCallBase.h"
-#include <RemConExtensionApi.h>
+#include "PhoneHandlerCallBase.h"
+#include <RemConExtensionApi.h>
#include <f32file.h>
#include <logcli.h>
#include <logview.h>
@@ -47,19 +47,19 @@
* @since S60 3.1
*/
NONSHARABLE_CLASS( CPhoneHandlerLastNumberRedial ) : public CPhoneHandlerCallBase
-
+
{
- public: // Constructors and destructor
+ public: // Constructors and destructor
/**
* Two-phased constructor.
*/
static CPhoneHandlerLastNumberRedial*
- NewL( CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation
- = ERemConExtLastNumberRedial );
+ NewL( CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation
+ = ERemConExtLastNumberRedial );
- /**
+ /**
* Destructor.
*/
virtual ~CPhoneHandlerLastNumberRedial();
@@ -68,7 +68,7 @@
public: // Functions from base classes
- /**
+ /**
* From MPhoneHandlerService. Starts processing service.
* @since S60 3.1
* @return void
@@ -97,41 +97,41 @@
private:
- /**
+ /**
* C++ default constructor.
*/
CPhoneHandlerLastNumberRedial(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation );
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation );
- /**
+ /**
* By default Symbian 2nd phase constructor is private.
*/
void ConstructL();
-
- public: // Data
+
+ public: // Data
protected: // Data
private: // Data
- // A handle to a file server session.
+ // A handle to a file server session.
RFs iFsSession;
// Log Engine implementation
- CLogClient* iLogClientPtr; // owned
+ CLogClient* iLogClientPtr; // owned
// A view on a recent event list.
- CLogViewRecent* iLogViewRecentPtr; // owned
-
- // reference to control
- CPhoneHandlerControl& iControl;
-
- // iOperation is used to give response to exact RemConExtensionApi
+ CLogViewRecent* iLogViewRecentPtr; // owned
+
+ // reference to control
+ CPhoneHandlerControl& iControl;
+
+ // iOperation is used to give response to exact RemConExtensionApi
// command
TRemConExtCallHandlingApiOperationId iOperation;
-
- public: // Friend classes
+
+ public: // Friend classes
protected: // Friend classes
--- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerResponse.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerResponse.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,9 +20,9 @@
#define CPHONEHANDLERRESPONSE_H
// INCLUDES
-#include "PhoneHandlerService.h"
-#include "PhoneHandlerObserver.h"
-#include <RemConExtensionApi.h>
+#include "PhoneHandlerService.h"
+#include "PhoneHandlerObserver.h"
+#include <RemConExtensionApi.h>
// CONSTANTS
@@ -45,9 +45,9 @@
* @since S60 3.1
*/
NONSHARABLE_CLASS( CPhoneHandlerResponse ) : public CBase,
- public MPhoneHandlerService,
- public MPhoneHandlerObserver
-
+ public MPhoneHandlerService,
+ public MPhoneHandlerObserver
+
{
public: // Constructors and destructor
@@ -63,7 +63,7 @@
public: // New functions
- /**
+ /**
* Sets response message. This method has to be called before Process()
* is called.
* @since S60 3.1
@@ -72,8 +72,8 @@
* @return void
*/
void SetResponse( TRemConExtCallHandlingApiOperationId aOperation,
- TInt aError );
-
+ TInt aError );
+
public: // Functions from base classes
/**
--- a/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerVoiceDial.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/inc/PhoneHandlerVoiceDial.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
#define CPHONEHANDLERVOICEDIAL_H
// INCLUDES
-#include "PhoneHandlerCallBase.h"
-#include <RemConExtensionApi.h>
+#include "PhoneHandlerCallBase.h"
+#include <RemConExtensionApi.h>
// CONSTANTS
@@ -43,7 +43,7 @@
* @since S60 3.1
*/
NONSHARABLE_CLASS( CPhoneHandlerVoiceDial ) : public CPhoneHandlerCallBase
-
+
{
public: // Constructors and destructor
@@ -51,9 +51,9 @@
* Two-phased constructor.
*/
static CPhoneHandlerVoiceDial* NewL(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation =
- ERemConExtVoiceDial );
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation =
+ ERemConExtVoiceDial );
/**
* Destructor.
@@ -98,14 +98,14 @@
* C++ default constructor.
*/
CPhoneHandlerVoiceDial(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation );
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation );
/**
* By default Symbian 2nd phase constructor is private.
*/
void ConstructL();
-
+
public: // Data
protected: // Data
--- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "PhoneHandlerControl.h"
-#include "PhoneHandlerDebug.h"
-#include "PhoneHandler.h"
+#include "PhoneHandlerControl.h"
+#include "PhoneHandlerDebug.h"
+#include "PhoneHandler.h"
// EXTERNAL DATA STRUCTURES
@@ -60,9 +60,9 @@
void CPhoneHandler::ConstructL( CRemConInterfaceSelector* aIfSelector )
{
COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandler::ConstructL() *aIfSelector=%d", aIfSelector );
-
+
iControl = CPhoneHandlerControl::NewL( aIfSelector );
- }
+ }
// -----------------------------------------------------------------------------
// CPhoneHandler::NewL
@@ -86,9 +86,9 @@
// -----------------------------------------------------------------------------
//
EXPORT_C CPhoneHandler* CPhoneHandler::NewL(
- CRemConInterfaceSelector& aIfSelector )
- {
- CPhoneHandler* self = new ( ELeave ) CPhoneHandler();
+ CRemConInterfaceSelector& aIfSelector )
+ {
+ CPhoneHandler* self = new ( ELeave ) CPhoneHandler();
CleanupStack::PushL( self );
self->ConstructL( &aIfSelector );
--- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerActive.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerActive.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "PhoneHandlerActive.h"
-#include "PhoneHandlerObserver.h"
-#include "PhoneHandlerDebug.h"
+#include "PhoneHandlerActive.h"
+#include "PhoneHandlerObserver.h"
+#include "PhoneHandlerDebug.h"
// EXTERNAL DATA STRUCTURES
@@ -43,28 +43,28 @@
// ============================ MEMBER FUNCTIONS ===============================
CPhoneHandlerActive* CPhoneHandlerActive::NewL( MPhoneHandlerObserver& aObserver )
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::NewL() start" );
- CPhoneHandlerActive* self = new(ELeave) CPhoneHandlerActive( aObserver );
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::NewL() end" );
- return self;
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::NewL() start" );
+ CPhoneHandlerActive* self = new(ELeave) CPhoneHandlerActive( aObserver );
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::NewL() end" );
+ return self;
+ }
CPhoneHandlerActive::~CPhoneHandlerActive()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::~CPhoneHandlerActive() start" );
-
- Cancel();
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::~CPhoneHandlerActive() end" );
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::~CPhoneHandlerActive() start" );
+
+ Cancel();
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::~CPhoneHandlerActive() end" );
+ }
CPhoneHandlerActive::CPhoneHandlerActive( MPhoneHandlerObserver& aObserver )
-: CActive(CActive::EPriorityStandard),
- iObserver(aObserver)
- {
- CActiveScheduler::Add(this);
- }
+: CActive(CActive::EPriorityStandard),
+ iObserver(aObserver)
+ {
+ CActiveScheduler::Add(this);
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerActive::SetActive()
@@ -72,9 +72,9 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerActive::SetActive()
- {
- CActive::SetActive();
- }
+ {
+ CActive::SetActive();
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerActive::RunL()
@@ -83,13 +83,13 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerActive::RunL()
- {
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerActive::RunL() iStatus.Int()=%d", iStatus.Int() );
-
- TInt error( iStatus.Int() );
- iStatus = KErrNone;
- iObserver.RequestCompleted( error );
- }
+ {
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerActive::RunL() iStatus.Int()=%d", iStatus.Int() );
+
+ TInt error( iStatus.Int() );
+ iStatus = KErrNone;
+ iObserver.RequestCompleted( error );
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerActive::RunError
@@ -104,7 +104,7 @@
aError = KErrNone;
COM_TRACE_( "[AccFW:PHONECMDHANDLER] CPhoneHandlerActive::RunError() - return KErrNone" );
-
+
return aError;
}
@@ -115,11 +115,11 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerActive::DoCancel()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::DoCancel() start" );
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::DoCancel() end" );
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::DoCancel() start" );
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerActive::DoCancel() end" );
+ }
//
// End of file
--- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerAnswerCall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerAnswerCall.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,12 +17,12 @@
// INCLUDE FILES
-#include "PhoneHandlerAnswerCall.h"
-#include "PhoneHandlerControl.h"
-#include "PhoneHandlerDebug.h"
-#include <RemConCallHandlingTarget.h>
+#include "PhoneHandlerAnswerCall.h"
+#include "PhoneHandlerControl.h"
+#include "PhoneHandlerDebug.h"
+#include <RemConCallHandlingTarget.h>
-#include <CPhCltCommandHandler.h>
+#include <cphcltcommandhandler.h>
// EXTERNAL DATA STRUCTURES
@@ -51,8 +51,8 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerAnswerCall::CPhoneHandlerAnswerCall(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
: iControl( aControl ),
iOperation( aOperation )
{
@@ -66,11 +66,11 @@
void CPhoneHandlerAnswerCall::ConstructL()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::ConstructL() start" );
-
+
LoadServiceL();
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::ConstructL() end" );
- }
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerAnswerCall::NewL
@@ -78,21 +78,21 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerAnswerCall* CPhoneHandlerAnswerCall::NewL(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::NewL() start" );
-
+
CPhoneHandlerAnswerCall* self = new( ELeave ) CPhoneHandlerAnswerCall(
- aControl,
- aOperation );
+ aControl,
+ aOperation );
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::NewL() end" );
-
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::NewL() end" );
+
return self;
}
@@ -100,7 +100,7 @@
CPhoneHandlerAnswerCall::~CPhoneHandlerAnswerCall()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::~CPhoneHandlerAnswerCall()" );
-
+
}
// -----------------------------------------------------------------------------
@@ -110,12 +110,12 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerAnswerCall::Process()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::Process()" );
-
- iCommandHandler->Ata( GetStatus() );
- Activate();
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::Process()" );
+
+ iCommandHandler->Ata( GetStatus() );
+ Activate();
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerAnswerCall::Delete
@@ -123,11 +123,11 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerAnswerCall::Delete()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::Delete()" );
-
- delete this;
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::Delete()" );
+
+ delete this;
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerAnswerCall::RequestCompleted
@@ -138,33 +138,33 @@
void CPhoneHandlerAnswerCall::RequestCompleted( const TInt aError )
{
COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::RequestCompleted() aError=%d, iState=%d", aError, iState );
-
- switch( iState )
- {
- case EPhoneHandlerState1:
- {
- NextState();
- iControl.CommandInitiator().SendResponse( GetStatus(),
- iOperation,
- aError );
- Activate();
- break;
- }
-
- case EPhoneHandlerState2:
- {
- IdleState();
- delete this;
- break;
- }
-
- default:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::RequestCompleted() Unspecified state" );
- break;
- }
- };
- }
+
+ switch( iState )
+ {
+ case EPhoneHandlerState1:
+ {
+ NextState();
+ iControl.CommandInitiator().SendResponse( GetStatus(),
+ iOperation,
+ aError );
+ Activate();
+ break;
+ }
+
+ case EPhoneHandlerState2:
+ {
+ IdleState();
+ delete this;
+ break;
+ }
+
+ default:
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerAnswerCall::RequestCompleted() Unspecified state" );
+ break;
+ }
+ };
+ }
// ========================== OTHER EXPORTED FUNCTIONS =========================
--- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerCallBase.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerCallBase.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,11 +18,11 @@
// INCLUDE FILES
-#include "PhoneHandlerCallBase.h"
-#include "PhoneHandlerActive.h"
-#include "PhoneHandlerDebug.h"
+#include "PhoneHandlerCallBase.h"
+#include "PhoneHandlerActive.h"
+#include "PhoneHandlerDebug.h"
-#include <CPhCltCommandHandler.h>
+#include <cphcltcommandhandler.h>
// EXTERNAL DATA STRUCTURES
@@ -51,7 +51,7 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerCallBase::CPhoneHandlerCallBase()
- : iState( EPhoneHandlerState1 )
+ : iState( EPhoneHandlerState1 )
{
}
@@ -59,7 +59,7 @@
CPhoneHandlerCallBase::~CPhoneHandlerCallBase()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::~CPhoneHandlerCallBase()" );
-
+
iServer.Close();
delete iCommandHandler;
delete iActive;
@@ -85,7 +85,7 @@
iActive = CPhoneHandlerActive::NewL( *this );
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::LoadServiceL() end" );
- }
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerCallBase::NextState
@@ -94,16 +94,16 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerCallBase::NextState()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::NextState() start" );
-
- TInt temp = static_cast<TInt>( iState );
- ++temp;
- iState = static_cast<TPhoneHandlerServiceState>( temp );
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::NextState() end" );
- }
-
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::NextState() start" );
+
+ TInt temp = static_cast<TInt>( iState );
+ ++temp;
+ iState = static_cast<TPhoneHandlerServiceState>( temp );
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::NextState() end" );
+ }
+
// -----------------------------------------------------------------------------
// CPhoneHandlerCallBase::IdleState
// Sets a specific state when service has been completed.
@@ -111,13 +111,13 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerCallBase::IdleState()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::IdleState() start" );
-
- iState = EPhoneHandlerStateIdle;
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::IdleState() end" );
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::IdleState() start" );
+
+ iState = EPhoneHandlerStateIdle;
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::IdleState() end" );
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerCallBase::GetStatus
@@ -126,26 +126,26 @@
// -----------------------------------------------------------------------------
//
TRequestStatus& CPhoneHandlerCallBase::GetStatus()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::GetStatus() start" );
-
- return iActive->iStatus;
- }
-
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::GetStatus() start" );
+
+ return iActive->iStatus;
+ }
+
// -----------------------------------------------------------------------------
// CPhoneHandlerCallBase::Activate
// Activates an active object for asynchronous calls.
// (other items were commented in a header).
// -----------------------------------------------------------------------------
-//
+//
void CPhoneHandlerCallBase::Activate()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::Activate() start" );
-
- iActive->SetActive();
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::Activate() end" );
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::Activate() start" );
+
+ iActive->SetActive();
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallBase::Activate() end" );
+ }
// ========================== OTHER EXPORTED FUNCTIONS =========================
--- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerCallState.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerCallState.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "PhoneHandlerCallState.h"
-#include "PhoneHandlerControl.h"
-#include "PhoneHandlerDebug.h"
+#include "PhoneHandlerCallState.h"
+#include "PhoneHandlerControl.h"
+#include "PhoneHandlerDebug.h"
#include <ctsydomainpskeys.h>
// EXTERNAL DATA STRUCTURES
@@ -50,11 +50,11 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerCallState::CPhoneHandlerCallState( CPhoneHandlerControl& aControl )
-: CActive(CActive::EPriorityStandard),
- iControl( aControl )
- {
- CActiveScheduler::Add(this);
- }
+: CActive(CActive::EPriorityStandard),
+ iControl( aControl )
+ {
+ CActiveScheduler::Add(this);
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerCallState::ConstructL
@@ -62,45 +62,45 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerCallState::ConstructL()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::ConstructL() start" );
-
- // Allows CPhoneHandlerCallState to start to listen S60 call states.
- User::LeaveIfError(
- iProperty.Attach( KPSUidCtsyCallInformation, KCTsyCallState ) );
-
- Subscribe();
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::ConstructL() end" );
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::ConstructL() start" );
+
+ // Allows CPhoneHandlerCallState to start to listen S60 call states.
+ User::LeaveIfError(
+ iProperty.Attach( KPSUidCtsyCallInformation, KCTsyCallState ) );
+
+ Subscribe();
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::ConstructL() end" );
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerCallState::NewL
// Two-phased constructor.
// -----------------------------------------------------------------------------
CPhoneHandlerCallState* CPhoneHandlerCallState::NewL( CPhoneHandlerControl& aControl )
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::NewL()" );
-
- CPhoneHandlerCallState* self = new(ELeave) CPhoneHandlerCallState( aControl );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- return self;
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::NewL()" );
+
+ CPhoneHandlerCallState* self = new(ELeave) CPhoneHandlerCallState( aControl );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+
+ return self;
+ }
// Destructor
CPhoneHandlerCallState::~CPhoneHandlerCallState()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::~CPhoneHandlerCallState() start" );
-
- Cancel();
- iProperty.Cancel();
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::~CPhoneHandlerCallState() start" );
+
+ Cancel();
+ iProperty.Cancel();
iProperty.Close();
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::~CPhoneHandlerCallState() end" );
- }
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::~CPhoneHandlerCallState() end" );
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerCallState::RunL()
@@ -109,20 +109,20 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerCallState::RunL()
- {
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerCallState::RunL() - return code = %d", iStatus.Int() );
-
- TInt state( 0 );
- iProperty.Get( state );
-
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerCallState - KTelephonyCallState = %d", state );
-
- if( iStatus.Int() == KErrNone )
- {
- iControl.NotifyCallState( state );
- }
-
- Subscribe();
+ {
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerCallState::RunL() - return code = %d", iStatus.Int() );
+
+ TInt state( 0 );
+ iProperty.Get( state );
+
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerCallState - KTelephonyCallState = %d", state );
+
+ if( iStatus.Int() == KErrNone )
+ {
+ iControl.NotifyCallState( state );
+ }
+
+ Subscribe();
}
// -----------------------------------------------------------------------------
@@ -131,11 +131,11 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerCallState::DoCancel()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::DoCancel()" );
-
- iProperty.Cancel();
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::DoCancel()" );
+
+ iProperty.Cancel();
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerCallState::Subscribe
@@ -144,12 +144,12 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerCallState::Subscribe()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::Subscribe()" );
-
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerCallState::Subscribe()" );
+
iProperty.Subscribe( iStatus );
SetActive();
- }
+ }
//
// End of file
--- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerControl.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerControl.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -12,37 +12,38 @@
* Contributors:
*
* Description: Receives call handling related key presses from accessories and
-* executes them.
+* executes them.
*
*/
// INCLUDE FILES
-#include "PhoneHandlerControl.h"
-#include "PhoneHandlerService.h"
-#include "PhoneHandlerAnswerCall.h"
-#include "PhoneHandlerEndCall.h"
-#include "PhoneHandlerDialCall.h"
-#include "PhoneHandlerVoiceDial.h"
-#include "PhoneHandlerRedial.h"
-#include "PhoneHandlerMultipartyCall.h"
-#include "PhoneHandlerDTMF.h"
-#include "PhoneHandlerActive.h"
-#include "PhoneHandlerResponse.h"
-#include "PhoneHandlerCallState.h"
-#include "PhoneHandlerDebug.h"
+#include "PhoneHandlerControl.h"
+#include "PhoneHandlerService.h"
+#include "PhoneHandlerAnswerCall.h"
+#include "PhoneHandlerEndCall.h"
+#include "PhoneHandlerDialCall.h"
+#include "PhoneHandlerVoiceDial.h"
+#include "PhoneHandlerRedial.h"
+#include "PhoneHandlerMultipartyCall.h"
+#include "PhoneHandlerDTMF.h"
+#include "PhoneHandlerActive.h"
+#include "PhoneHandlerResponse.h"
+#include "PhoneHandlerCallState.h"
+#include "PhoneHandlerDebug.h"
#include <remconinterfaceselector.h>
-#include <RemConCallHandlingTarget.h>
-#include <CPbkContactEngine.h>
+#include <RemConCallHandlingTarget.h>
+// <-- QT PHONE START -->
+//#include <cpbkcontactengine.h>
+// <-- QT PHONE END-->
#include <ctsydomainpskeys.h>
#if 0
-#include <VoiceUIDomainPSKeys.h>
+#include <voiceuidomainpskeys.h>
#endif
#include <connect/sbdefs.h>
-#include <coreapplicationuisdomainpskeys.h>
// EXTERNAL DATA STRUCTURES
@@ -74,7 +75,7 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerControl::CPhoneHandlerControl()
- : iPrevState( EPSCTsyCallStateNone )
+ : iPrevState( EPSCTsyCallStateNone )
{
}
@@ -86,29 +87,29 @@
void CPhoneHandlerControl::ConstructL( CRemConInterfaceSelector* aIfSelector )
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() start" );
-
+
if( !aIfSelector )
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() Create connection to RemCon." );
-
- // Target connection to RemCon FW hasn't been done.
- iInterfaceSelector = CRemConInterfaceSelector::NewL();
- iTarget = CRemConCallHandlingTarget::NewL( *iInterfaceSelector, *this );
- iInterfaceSelector->OpenTargetL();
- }
- else
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() Don't create connection to RemCon." );
-
- // Connection to RemCon FW as target has already been done in a process.
- iTarget = CRemConCallHandlingTarget::NewL( *aIfSelector, *this );
- }
-
- iResponse = CPhoneHandlerResponse::NewL( *this );
- iCallStateObserver = CPhoneHandlerCallState::NewL( *this );
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() end" );
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() Create connection to RemCon." );
+
+ // Target connection to RemCon FW hasn't been done.
+ iInterfaceSelector = CRemConInterfaceSelector::NewL();
+ iTarget = CRemConCallHandlingTarget::NewL( *iInterfaceSelector, *this );
+ iInterfaceSelector->OpenTargetL();
+ }
+ else
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() Don't create connection to RemCon." );
+
+ // Connection to RemCon FW as target has already been done in a process.
+ iTarget = CRemConCallHandlingTarget::NewL( *aIfSelector, *this );
+ }
+
+ iResponse = CPhoneHandlerResponse::NewL( *this );
+ iCallStateObserver = CPhoneHandlerCallState::NewL( *this );
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::ConstructL() end" );
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerControl::NewL
@@ -116,7 +117,7 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerControl* CPhoneHandlerControl::NewL(
- CRemConInterfaceSelector* aIfSelector )
+ CRemConInterfaceSelector* aIfSelector )
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NewL() start" );
@@ -137,19 +138,19 @@
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::~CPhoneHandlerControl() start" );
if( iInterfaceSelector )
- {
- delete iInterfaceSelector;
- }
+ {
+ delete iInterfaceSelector;
+ }
if( iResponse )
- {
- iResponse->Delete();
- }
-
+ {
+ iResponse->Delete();
+ }
+
if( iCallStateObserver )
- {
- delete iCallStateObserver;
- }
+ {
+ delete iCallStateObserver;
+ }
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::~CPhoneHandlerControl() end" );
}
@@ -235,28 +236,28 @@
{
COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState() aState=%d", aState );
- if( aState == EPSCTsyCallStateConnected && iPrevState != EPSCTsyCallStateHold )
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState(): iActiveCalls++" );
-
- iActiveCalls++;
- }
- else if( aState == EPSCTsyCallStateDisconnecting &&
- ( iPrevState == EPSCTsyCallStateConnected || iPrevState == EPSCTsyCallStateHold ))
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState(): iActiveCalls--" );
-
- iActiveCalls--;
- }
- else if( aState == EPSCTsyCallStateNone )
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState(): iActiveCalls = 0" );
- iActiveCalls = 0;
- }
-
- iPrevState = aState;
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState() iActiveCalls=%d", iActiveCalls );
- }
+ if( aState == EPSCTsyCallStateConnected && iPrevState != EPSCTsyCallStateHold )
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState(): iActiveCalls++" );
+
+ iActiveCalls++;
+ }
+ else if( aState == EPSCTsyCallStateDisconnecting &&
+ ( iPrevState == EPSCTsyCallStateConnected || iPrevState == EPSCTsyCallStateHold ))
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState(): iActiveCalls--" );
+
+ iActiveCalls--;
+ }
+ else if( aState == EPSCTsyCallStateNone )
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState(): iActiveCalls = 0" );
+ iActiveCalls = 0;
+ }
+
+ iPrevState = aState;
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::NotifyCallState() iActiveCalls=%d", iActiveCalls );
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerControl::AnswerCall
@@ -264,26 +265,26 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerControl::AnswerCall()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerCall() start" );
-
- StartProcessing( ERemConExtAnswerCall );
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerCall() end" );
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerCall() start" );
+
+ StartProcessing( ERemConExtAnswerCall );
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerCall() end" );
}
-
+
// -----------------------------------------------------------------------------
// CPhoneHandlerControl::EndCall
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CPhoneHandlerControl::EndCall()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::EndCall() start" );
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::EndCall() start" );
StartProcessing( ERemConExtEndCall );
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::EndCall() end" );
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::EndCall() end" );
}
// -----------------------------------------------------------------------------
@@ -292,12 +293,12 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerControl::AnswerEndCall()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerEndCall() start" );
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerEndCall() start" );
StartProcessing( ERemConExtAnswerEnd );
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerEndCall() end" );
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::AnswerEndCall() end" );
}
// -----------------------------------------------------------------------------
@@ -305,7 +306,7 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-#if 0 // SCB CR EHSA-7APJWF: SIND subscribes to RemCon directly
+#if 0 // SCB CR EHSA-7APJWF: SIND subscribes to RemCon directly
void CPhoneHandlerControl::VoiceDial( const TBool aActivate )
{
COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::VoiceDial() aActivate=%d", aActivate );
@@ -322,17 +323,17 @@
iProperty.Get( KPSUidVoiceUiAccMonitor, KVoiceUiOpenKey, voiceUiState );
if( voiceUiState == KVoiceUiIsOpen )
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::VoiceDial() voice UI is open!" );
- iProperty.Set( KPSUidVoiceUiAccMonitor , KVoiceUiAccessoryEvent, ERemConExtVoiceDial );
- iResponse->SetResponse( ERemConExtVoiceDial, KErrNone );
- iResponse->Process();
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::VoiceDial() voice UI is open!" );
+ iProperty.Set( KPSUidVoiceUiAccMonitor , KVoiceUiAccessoryEvent, ERemConExtVoiceDial );
+ iResponse->SetResponse( ERemConExtVoiceDial, KErrNone );
+ iResponse->Process();
+ }
else
- {
- iActivate = aActivate;
- StartProcessing( ERemConExtVoiceDial );
- }
+ {
+ iActivate = aActivate;
+ StartProcessing( ERemConExtVoiceDial );
+ }
}
else
{
@@ -342,18 +343,11 @@
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::VoiceDial() end" );
}
-#else
+#else
void CPhoneHandlerControl::VoiceDial( const TBool /*aActivate*/ )
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::VoiceDial()" );
- if ( IsAutoLockOn() && !IsBTAccessoryCmd() )
- {
- iResponse->SetResponse( ERemConExtVoiceDial, KErrAccessDenied );
- iResponse->Process();
- return;
- }
-
iResponse->SetResponse( ERemConExtVoiceDial, KErrNone );
iResponse->Process();
@@ -366,20 +360,13 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerControl::LastNumberRedial( )
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::LastNumberRedial() start" );
-
- if ( IsAutoLockOn() && !IsBTAccessoryCmd() )
- {
- iResponse->SetResponse( ERemConExtLastNumberRedial, KErrAccessDenied );
- iResponse->Process();
- return;
- }
-
- StartProcessing( ERemConExtLastNumberRedial );
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::LastNumberRedial() end" );
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::LastNumberRedial() start" );
+
+ StartProcessing( ERemConExtLastNumberRedial );
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::LastNumberRedial() end" );
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerControl::DialCall
@@ -387,31 +374,24 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerControl::DialCall( const TDesC8& aTelNumber )
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::DialCall() start" );
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::DialCall() start" );
- if ( IsAutoLockOn() && !IsBTAccessoryCmd() )
- {
- iResponse->SetResponse( ERemConExtDialCall, KErrAccessDenied );
- iResponse->Process();
- return;
- }
-
// Check aTelNumber range
- if( KPhCltTelephoneNumberLength < aTelNumber.Length() )
- {
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::DialCall() number value=%d too long", aTelNumber.Size() );
- iResponse->SetResponse( ERemConExtDialCall, KErrArgument );
- iResponse->Process();
- return;
- }
-
- iTelNumber.Copy( aTelNumber );
-
+ if( KPhCltTelephoneNumberLength < aTelNumber.Length() )
+ {
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::DialCall() number value=%d too long", aTelNumber.Size() );
+ iResponse->SetResponse( ERemConExtDialCall, KErrArgument );
+ iResponse->Process();
+ return;
+ }
+
+ iTelNumber.Copy( aTelNumber );
+
StartProcessing( ERemConExtDialCall );
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::DialCall() end" );
- }
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::DialCall() end" );
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerControl::MultipartyCalling
@@ -439,85 +419,85 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerControl::MultipartyCalling( const TDesC8& aData )
- {
- TBool error( EFalse );
- iChldCommand = 0;
- iChldCallNumber = 0;
- TBuf8< KRemConExtParamMaxLength > buf( aData );
- buf.Trim();
- TInt length = buf.Length();
-
- // Check invalid number of characters
- if ( length < KMultipartyCallMinParam || length > KMultipartyCallMaxParam )
- {
- error = ETrue;
- }
- else
- {
- TLex8 param;
- // Set command
- param.Assign( buf.Mid( 0, 1 ) );
- if( param.Val( iChldCommand ) != KErrNone )
- {
- error = ETrue;
- }
- else if ( length == KMultipartyCallMaxParam )
- {
- // Set call number
- param.Assign( buf.Mid(1) );
- if( param.Val( iChldCallNumber ) != KErrNone )
- {
- error = ETrue;
- }
- }
- }
+ {
+ TBool error( EFalse );
+ iChldCommand = 0;
+ iChldCallNumber = 0;
+ TBuf8< KRemConExtParamMaxLength > buf( aData );
+ buf.Trim();
+ TInt length = buf.Length();
+
+ // Check invalid number of characters
+ if ( length < KMultipartyCallMinParam || length > KMultipartyCallMaxParam )
+ {
+ error = ETrue;
+ }
+ else
+ {
+ TLex8 param;
+ // Set command
+ param.Assign( buf.Mid( 0, 1 ) );
+ if( param.Val( iChldCommand ) != KErrNone )
+ {
+ error = ETrue;
+ }
+ else if ( length == KMultipartyCallMaxParam )
+ {
+ // Set call number
+ param.Assign( buf.Mid(1) );
+ if( param.Val( iChldCallNumber ) != KErrNone )
+ {
+ error = ETrue;
+ }
+ }
+ }
- if( error )
- {
- // Invalid command
- iResponse->SetResponse( ERemConExt3WaysCalling, KErrArgument );
- iResponse->Process();
- return;
- }
-
- COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerControl::MultipartyCalling() iChldCommand=%d, iChldCallNumber=%d", iChldCommand, iChldCallNumber );
-
- StartProcessing( ERemConExt3WaysCalling );
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::MultipartyCalling() end" );
- }
-
+ if( error )
+ {
+ // Invalid command
+ iResponse->SetResponse( ERemConExt3WaysCalling, KErrArgument );
+ iResponse->Process();
+ return;
+ }
+
+ COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerControl::MultipartyCalling() iChldCommand=%d, iChldCallNumber=%d", iChldCommand, iChldCallNumber );
+
+ StartProcessing( ERemConExt3WaysCalling );
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::MultipartyCalling() end" );
+ }
+
// -----------------------------------------------------------------------------
// CPhoneHandlerControl::GenerateDTMF
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CPhoneHandlerControl::GenerateDTMF( const TChar aChar )
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::GenerateDTMF() start" );
-
- iChar = aChar;
-
- StartProcessing( ERemConExtGenerateDTMF );
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::GenerateDTMF() end" );
- }
-
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::GenerateDTMF() start" );
+
+ iChar = aChar;
+
+ StartProcessing( ERemConExtGenerateDTMF );
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::GenerateDTMF() end" );
+ }
+
// -----------------------------------------------------------------------------
// CPhoneHandlerControl::SpeedDial
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CPhoneHandlerControl::SpeedDial( const TInt aIndex )
- {
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::SpeedDial() aIndex=%d", aIndex );
+ {
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::SpeedDial() aIndex=%d", aIndex );
- iIndex = aIndex;
-
- StartProcessing( ERemConExtSpeedDial );
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::SpeedDial() end" );
- }
+ iIndex = aIndex;
+
+ StartProcessing( ERemConExtSpeedDial );
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::SpeedDial() end" );
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerControl::StartProcessing
@@ -526,41 +506,41 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-void CPhoneHandlerControl::StartProcessing(
- const TRemConExtCallHandlingApiOperationId aOperation )
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::StartProcessing() start" );
-
- // Create a service
- MPhoneHandlerService* service = NULL;
- TInt error( KErrNone );
- TRAP( error, service = CreateServiceL( aOperation ) );
-
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() returned %d", error );
-
- if( error )
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::StartProcessing(): service wasn't created succesfully." );
-
- // An error happened. Delete service, if it exists.
- if( service )
- {
- service->Delete();
- service = NULL;
- }
-
- iResponse->SetResponse( aOperation, error );
- iResponse->Process();
- return;
- }
- else
- {
- // start service
- service->Process();
- iSwitchCall = EFalse;
- }
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::StartProcessing() end" );
+void CPhoneHandlerControl::StartProcessing(
+ const TRemConExtCallHandlingApiOperationId aOperation )
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::StartProcessing() start" );
+
+ // Create a service
+ MPhoneHandlerService* service = NULL;
+ TInt error( KErrNone );
+ TRAP( error, service = CreateServiceL( aOperation ) );
+
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() returned %d", error );
+
+ if( error )
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::StartProcessing(): service wasn't created succesfully." );
+
+ // An error happened. Delete service, if it exists.
+ if( service )
+ {
+ service->Delete();
+ service = NULL;
+ }
+
+ iResponse->SetResponse( aOperation, error );
+ iResponse->Process();
+ return;
+ }
+ else
+ {
+ // start service
+ service->Process();
+ iSwitchCall = EFalse;
+ }
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::StartProcessing() end" );
}
// -----------------------------------------------------------------------------
@@ -569,7 +549,7 @@
// -----------------------------------------------------------------------------
//
MPhoneHandlerService* CPhoneHandlerControl::
- CreateServiceL( const TRemConExtCallHandlingApiOperationId aOperation )
+ CreateServiceL( const TRemConExtCallHandlingApiOperationId aOperation )
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() start" );
@@ -578,162 +558,162 @@
switch( aOperation )
{
case ERemConExtAnswerCall:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtAnswerCall command" );
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - iActiveCalls is %d", iActiveCalls );
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtAnswerCall command" );
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - iActiveCalls is %d", iActiveCalls );
- /*
- if( iActiveCalls > 0 )
- {
- // Multiparty call
- iSwitchCall = ETrue;
- pService = CPhoneHandlerMultipartyCall::NewL( *this );
- }
- else
- {
- // non-multiparty call
- pService = CPhoneHandlerAnswerCall::NewL( *this );
- }
- */
- pService = CPhoneHandlerAnswerCall::NewL( *this );
+ /*
+ if( iActiveCalls > 0 )
+ {
+ // Multiparty call
+ iSwitchCall = ETrue;
+ pService = CPhoneHandlerMultipartyCall::NewL( *this );
+ }
+ else
+ {
+ // non-multiparty call
+ pService = CPhoneHandlerAnswerCall::NewL( *this );
+ }
+ */
+ pService = CPhoneHandlerAnswerCall::NewL( *this );
- break;
- }
-
+ break;
+ }
+
case ERemConExtEndCall:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtEndCall command" );
-
- pService = CPhoneHandlerEndCall::NewL( *this );
-
- break;
- }
-
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtEndCall command" );
+
+ pService = CPhoneHandlerEndCall::NewL( *this );
+
+ break;
+ }
+
case ERemConExtAnswerEnd:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtAnswerEnd command" );
-
- TInt callState( EPSCTsyCallStateUninitialized );
- iProperty.Get( KPSUidCtsyCallInformation, KCTsyCallState, callState );
-
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() call state = %d", callState );
-
- if( callState != EPSCTsyCallStateUninitialized &&
- callState != EPSCTsyCallStateNone &&
- callState != EPSCTsyCallStateDisconnecting )
- {
- if( callState == EPSCTsyCallStateAlerting ||
- callState == EPSCTsyCallStateDialling ||
- callState == EPSCTsyCallStateAnswering ||
- callState == EPSCTsyCallStateConnected ||
- callState == EPSCTsyCallStateHold )
- {
- pService = CPhoneHandlerEndCall::NewL( *this,
- aOperation );
- }
- // callState == EPSTelephonyCallStateRinging
- else
- {
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() iActiveCalls = %d", iActiveCalls );
- if( iActiveCalls > 0 )
- {
- // multicall case : End call that has existed longer.
- // (From UI viewpoint ringing call is in waiting state.)
- pService = CPhoneHandlerEndCall::NewL( *this,
- aOperation );
- if( callState == EPSCTsyCallStateRinging )
- {
- // In multiparty case the telephony key is not
- // updated. The call amount is updated manually.
- iActiveCalls--;
- }
- }
- else
- {
- pService = CPhoneHandlerAnswerCall::NewL(
- *this,
- aOperation );
- }
- }
- }
- else
- {
- // Send / end button was pressed when there were not
- // any calls active. Response has to be sent back to accessory
- // at least for following reasons:
-
- // 1. RemCon FW releases message related memory only when response
- // is sent back to accessory.
-
- // 2. BT accessory key press producing ERemConExtAnswerEnd
- // operation has some other meaning than answer/end call
- // and it's processed by proper client. However, there
- // might be a situation where proper client isn't active
- // and can't process command. In any case RemCon/BT accessory
- // requires response to command. That's why PhoneCmdHandler
- // sends reponse to command.
-
- iResponse->SetResponse( aOperation, KErrNone );
- pService = iResponse;
- }
- break;
- }
-
- case ERemConExtDialCall:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtDialCall command" );
-
- pService = CPhoneHandlerDialCall::NewL( *this );
- break;
- }
-
- case ERemConExtVoiceDial:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtVoiceDial command" );
-
- pService = CPhoneHandlerVoiceDial::NewL( *this );
- break;
- }
-
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtAnswerEnd command" );
+
+ TInt callState( EPSCTsyCallStateUninitialized );
+ iProperty.Get( KPSUidCtsyCallInformation, KCTsyCallState, callState );
+
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() call state = %d", callState );
+
+ if( callState != EPSCTsyCallStateUninitialized &&
+ callState != EPSCTsyCallStateNone &&
+ callState != EPSCTsyCallStateDisconnecting )
+ {
+ if( callState == EPSCTsyCallStateAlerting ||
+ callState == EPSCTsyCallStateDialling ||
+ callState == EPSCTsyCallStateAnswering ||
+ callState == EPSCTsyCallStateConnected ||
+ callState == EPSCTsyCallStateHold )
+ {
+ pService = CPhoneHandlerEndCall::NewL( *this,
+ aOperation );
+ }
+ // callState == EPSTelephonyCallStateRinging
+ else
+ {
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() iActiveCalls = %d", iActiveCalls );
+ if( iActiveCalls > 0 )
+ {
+ // multicall case : End call that has existed longer.
+ // (From UI viewpoint ringing call is in waiting state.)
+ pService = CPhoneHandlerEndCall::NewL( *this,
+ aOperation );
+ if( callState == EPSCTsyCallStateRinging )
+ {
+ // In multiparty case the telephony key is not
+ // updated. The call amount is updated manually.
+ iActiveCalls--;
+ }
+ }
+ else
+ {
+ pService = CPhoneHandlerAnswerCall::NewL(
+ *this,
+ aOperation );
+ }
+ }
+ }
+ else
+ {
+ // Send / end button was pressed when there were not
+ // any calls active. Response has to be sent back to accessory
+ // at least for following reasons:
+
+ // 1. RemCon FW releases message related memory only when response
+ // is sent back to accessory.
+
+ // 2. BT accessory key press producing ERemConExtAnswerEnd
+ // operation has some other meaning than answer/end call
+ // and it's processed by proper client. However, there
+ // might be a situation where proper client isn't active
+ // and can't process command. In any case RemCon/BT accessory
+ // requires response to command. That's why PhoneCmdHandler
+ // sends reponse to command.
+
+ iResponse->SetResponse( aOperation, KErrNone );
+ pService = iResponse;
+ }
+ break;
+ }
+
+ case ERemConExtDialCall:
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtDialCall command" );
+
+ pService = CPhoneHandlerDialCall::NewL( *this );
+ break;
+ }
+
+ case ERemConExtVoiceDial:
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtVoiceDial command" );
+
+ pService = CPhoneHandlerVoiceDial::NewL( *this );
+ break;
+ }
+
case ERemConExtLastNumberRedial:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtLastNumberRedial command" );
-
- pService = CPhoneHandlerLastNumberRedial::NewL( *this );
- break;
- }
-
- case ERemConExt3WaysCalling:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExt3WaysCalling command" );
-
- pService = CPhoneHandlerMultipartyCall::NewL( *this );
- break;
- }
-
- case ERemConExtGenerateDTMF:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtGenerateDTMF command" );
-
- pService = CPhoneHandlerDTMF::NewL( *this );
- break;
- }
-
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtLastNumberRedial command" );
+
+ pService = CPhoneHandlerLastNumberRedial::NewL( *this );
+ break;
+ }
+
+ case ERemConExt3WaysCalling:
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExt3WaysCalling command" );
+
+ pService = CPhoneHandlerMultipartyCall::NewL( *this );
+ break;
+ }
+
+ case ERemConExtGenerateDTMF:
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtGenerateDTMF command" );
+
+ pService = CPhoneHandlerDTMF::NewL( *this );
+ break;
+ }
+
case ERemConExtSpeedDial:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtSpeedDial command" );
-
- InitializeSpeedDialL();
- pService = CPhoneHandlerDialCall::NewL( *this,
- aOperation );
- break;
- }
-
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() - ERemConExtSpeedDial command" );
+
+ InitializeSpeedDialL();
+ pService = CPhoneHandlerDialCall::NewL( *this,
+ aOperation );
+ break;
+ }
+
default:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() Unspecified state" );
- break;
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() Unspecified state" );
+ break;
+ }
};
COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::CreateServiceL() end, %d", pService );
@@ -747,33 +727,38 @@
//
void CPhoneHandlerControl::InitializeSpeedDialL()
{
+
+// <-- QT PHONE START -->
+/*
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::InitializeSpeedDialL() start" );
// first check contack engine is not in busy
TInt cntEngState( 0 );
- TInt err = iProperty.Get( KUidSystemCategory, conn::KUidBackupRestoreKey, cntEngState );
+ TInt err = iProperty.Get( KUidSystemCategory, conn::KUidBackupRestoreKey, cntEngState );
- if( err == KErrNotFound || cntEngState == 0 ||
- cntEngState & conn::KBURPartTypeMask == conn::EBURNormal ||
- cntEngState & conn::KBackupIncTypeMask == conn::ENoBackup )
- {
- // Get phone number from phonebook by index
- CPbkContactEngine* ptr = CPbkContactEngine::NewL();
+ if( err == KErrNotFound || cntEngState == 0 ||
+ cntEngState & conn::KBURPartTypeMask == conn::EBURNormal ||
+ cntEngState & conn::KBackupIncTypeMask == conn::ENoBackup )
+ {
+ // Get phone number from phonebook by index
+ CPbkContactEngine* ptr = CPbkContactEngine::NewL();
CleanupStack::PushL( ptr );
- TRACE_ASSERT( ptr != NULL );
- ptr->GetSpeedDialFieldL( iIndex, iTelNumber );
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::InitializeSpeedDialL() speed dial number is %S", &iTelNumber );
- CleanupStack::PopAndDestroy( ptr );
- }
- else
- {
- // contact engine is in busy
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::InitializeSpeedDialL() contact engine is in backup/restore" );
- User::Leave( KErrInUse );
- }
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::InitializeSpeedDialL() end" );
- }
+ TRACE_ASSERT( ptr != NULL );
+ ptr->GetSpeedDialFieldL( iIndex, iTelNumber );
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::InitializeSpeedDialL() speed dial number is %S", &iTelNumber );
+ CleanupStack::PopAndDestroy( ptr );
+ }
+ else
+ {
+ // contact engine is in busy
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::InitializeSpeedDialL() contact engine is in backup/restore" );
+ User::Leave( KErrInUse );
+ }
+*/
+// <-- QT PHONE END -->
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::InitializeSpeedDialL() end" );
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerControl::SwitchCall
@@ -783,52 +768,7 @@
TBool CPhoneHandlerControl::SwitchCall()
{
return iSwitchCall;
- }
-
-// ---------------------------------------------------------
-// CPhoneHandlerControl::IsAutoLockOn
-// ---------------------------------------------------------
-//
-TBool CPhoneHandlerControl::IsAutoLockOn() const
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::IsAutoLockOn() start " );
- TInt err( KErrNone );
- TInt value( EAutolockStatusUninitialized );
-
- err = RProperty::Get( KPSUidCoreApplicationUIs, KCoreAppUIsAutolockStatus, value );
- if ( err != KErrNone )
- {
- value = err;
- }
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::IsAutoLockOn() autolock value = %d", value );
-
- return value > EAutolockOff ? ETrue : EFalse;
-
- }
-// ---------------------------------------------------------
-// CPhoneHandlerControl::IsBTAccessoryCmd
-// ---------------------------------------------------------
-//
-TBool CPhoneHandlerControl::IsBTAccessoryCmd() const
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerControl::IsBTAccessoryCmd() start " );
- TBool retval( EFalse );
-
- TRemConExtCmdSource source;
- iTarget->GetCommandSourceInfo( source );
- if ( source == ERemConExtCmdSourceBluetooth )
- {
- retval = ETrue;
- }
-
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerControl::IsBTAccessoryCmd() GetCommandSourceInfo = %d", source );
-
- return retval;
- }
-
-
-
-
+ }
// ======================== OTHER EXPORTED FUNCTIONS ===========================
// End of File
--- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerDTMF.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerDTMF.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,12 +17,12 @@
// INCLUDE FILES
-#include "PhoneHandlerDTMF.h"
-#include "PhoneHandlerControl.h"
-#include "PhoneHandlerDebug.h"
-#include <RemConCallHandlingTarget.h>
+#include "PhoneHandlerDTMF.h"
+#include "PhoneHandlerControl.h"
+#include "PhoneHandlerDebug.h"
+#include <RemConCallHandlingTarget.h>
-#include <CPhCltCommandHandler.h>
+#include <cphcltcommandhandler.h>
// EXTERNAL DATA STRUCTURES
@@ -52,8 +52,8 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerDTMF::CPhoneHandlerDTMF(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
: iControl( aControl ),
iOperation( aOperation )
{
@@ -67,11 +67,11 @@
void CPhoneHandlerDTMF::ConstructL()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::ConstructL() start" );
-
+
LoadServiceL();
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::ConstructL() end" );
- }
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerDTMF::NewL
@@ -79,13 +79,13 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerDTMF* CPhoneHandlerDTMF::NewL(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::NewL()" );
-
+
CPhoneHandlerDTMF* self = new( ELeave ) CPhoneHandlerDTMF( aControl,
- aOperation );
+ aOperation );
CleanupStack::PushL( self );
self->ConstructL();
@@ -99,7 +99,7 @@
CPhoneHandlerDTMF::~CPhoneHandlerDTMF()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::~CPhoneHandlerDTMF()" );
-
+
}
// -----------------------------------------------------------------------------
@@ -109,14 +109,14 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerDTMF::Process()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::Process()" );
-
- iCommandHandler->Vts( GetStatus(),
- iControl.Tone(),
- EPhCltDtmfNotUsed );
- Activate();
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::Process()" );
+
+ iCommandHandler->Vts( GetStatus(),
+ iControl.Tone(),
+ EPhCltDtmfNotUsed );
+ Activate();
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerDTMF::Delete
@@ -124,11 +124,11 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerDTMF::Delete()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::Delete()" );
-
- delete this;
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::Delete()" );
+
+ delete this;
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerDTMF::RequestCompleted
@@ -139,33 +139,33 @@
void CPhoneHandlerDTMF::RequestCompleted( const TInt aError )
{
COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerDTMF::RequestCompleted() aError=%d, iState=%d", aError, iState );
-
- switch( iState )
- {
- case EPhoneHandlerState1:
- {
- NextState();
- iControl.CommandInitiator().SendResponse( GetStatus(),
- iOperation,
- aError );
- Activate();
- break;
- }
-
- case EPhoneHandlerState2:
- {
- IdleState();
- delete this;
- break;
- }
-
- default:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::RequestCompleted() Unspecified state" );
- break;
- }
- };
- }
+
+ switch( iState )
+ {
+ case EPhoneHandlerState1:
+ {
+ NextState();
+ iControl.CommandInitiator().SendResponse( GetStatus(),
+ iOperation,
+ aError );
+ Activate();
+ break;
+ }
+
+ case EPhoneHandlerState2:
+ {
+ IdleState();
+ delete this;
+ break;
+ }
+
+ default:
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDTMF::RequestCompleted() Unspecified state" );
+ break;
+ }
+ };
+ }
// ========================== OTHER EXPORTED FUNCTIONS =========================
--- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerDialCall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerDialCall.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,13 +17,13 @@
// INCLUDE FILES
-#include "PhoneHandlerDialCall.h"
-#include "PhoneHandlerControl.h"
-#include "PhoneHandlerDebug.h"
+#include "PhoneHandlerDialCall.h"
+#include "PhoneHandlerControl.h"
+#include "PhoneHandlerDebug.h"
-#include <CPhCltCommandHandler.h>
-#include <PhCltTypes.h>
-#include <RemConCallHandlingTarget.h>
+#include <cphcltcommandhandler.h>
+#include <phclttypes.h>
+#include <RemConCallHandlingTarget.h>
// EXTERNAL DATA STRUCTURES
@@ -52,8 +52,8 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerDialCall::CPhoneHandlerDialCall(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
: iControl( aControl ),
iOperation( aOperation )
{
@@ -67,11 +67,11 @@
void CPhoneHandlerDialCall::ConstructL()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::ConstructL() start" );
-
+
LoadServiceL();
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::ConstructL() end" );
- }
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerDialCall::NewL
@@ -79,14 +79,14 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerDialCall* CPhoneHandlerDialCall::NewL(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::NewL()" );
-
+
CPhoneHandlerDialCall* self = new( ELeave ) CPhoneHandlerDialCall(
- aControl,
- aOperation );
+ aControl,
+ aOperation );
CleanupStack::PushL( self );
self->ConstructL();
@@ -100,7 +100,7 @@
CPhoneHandlerDialCall::~CPhoneHandlerDialCall()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::~CPhoneHandlerDialCall()" );
-
+
}
// -----------------------------------------------------------------------------
@@ -110,14 +110,14 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerDialCall::Process()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::Process()" );
-
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::Process()" );
+
COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerDialCall::Process() telephone number is %S", &(iControl.TelephoneNumber() ) );
- iCommandHandler->Atd( GetStatus(), iControl.TelephoneNumber() );
-
- Activate();
- }
+ iCommandHandler->Atd( GetStatus(), iControl.TelephoneNumber() );
+
+ Activate();
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerDialCall::Delete
@@ -125,11 +125,11 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerDialCall::Delete()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::Delete()" );
-
- delete this;
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::Delete()" );
+
+ delete this;
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerDialCall::RequestCompleted
@@ -140,33 +140,33 @@
void CPhoneHandlerDialCall::RequestCompleted( const TInt aError )
{
COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerDialCall::RequestCompleted() aError=%d, iState=%d", aError, iState );
-
- switch( iState )
- {
- case EPhoneHandlerState1:
- {
- NextState();
- iControl.CommandInitiator().SendResponse( GetStatus(),
- iOperation,
- aError );
- Activate();
- break;
- }
-
- case EPhoneHandlerState2:
- {
- IdleState();
- delete this;
- break;
- }
-
- default:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::AsynchronousRequestCompleted() Unspecified state" );
- break;
- }
- };
- }
+
+ switch( iState )
+ {
+ case EPhoneHandlerState1:
+ {
+ NextState();
+ iControl.CommandInitiator().SendResponse( GetStatus(),
+ iOperation,
+ aError );
+ Activate();
+ break;
+ }
+
+ case EPhoneHandlerState2:
+ {
+ IdleState();
+ delete this;
+ break;
+ }
+
+ default:
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerDialCall::AsynchronousRequestCompleted() Unspecified state" );
+ break;
+ }
+ };
+ }
// ========================== OTHER EXPORTED FUNCTIONS =========================
--- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerEndCall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerEndCall.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,12 +17,12 @@
// INCLUDE FILES
-#include "PhoneHandlerEndCall.h"
-#include "PhoneHandlerControl.h"
-#include "PhoneHandlerDebug.h"
-#include <RemConCallHandlingTarget.h>
+#include "PhoneHandlerEndCall.h"
+#include "PhoneHandlerControl.h"
+#include "PhoneHandlerDebug.h"
+#include <RemConCallHandlingTarget.h>
-#include <CPhCltCommandHandler.h>
+#include <cphcltcommandhandler.h>
// EXTERNAL DATA STRUCTURES
@@ -51,8 +51,8 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerEndCall::CPhoneHandlerEndCall(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
: iControl( aControl ),
iOperation( aOperation )
{
@@ -66,11 +66,11 @@
void CPhoneHandlerEndCall::ConstructL()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::ConstructL() start" );
-
+
LoadServiceL();
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::ConstructL() end" );
- }
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerEndCall::NewL
@@ -78,14 +78,14 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerEndCall* CPhoneHandlerEndCall::NewL(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::NewL()" );
-
+
CPhoneHandlerEndCall* self = new( ELeave ) CPhoneHandlerEndCall(
- aControl,
- aOperation );
+ aControl,
+ aOperation );
CleanupStack::PushL( self );
self->ConstructL();
@@ -99,7 +99,7 @@
CPhoneHandlerEndCall::~CPhoneHandlerEndCall()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::~CPhoneHandlerEndCall()" );
-
+
}
// -----------------------------------------------------------------------------
@@ -109,12 +109,12 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerEndCall::Process()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::Process()" );
-
- iCommandHandler->Chup( GetStatus() );
- Activate();
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::Process()" );
+
+ iCommandHandler->Chup( GetStatus() );
+ Activate();
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerEndCall::Delete
@@ -122,11 +122,11 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerEndCall::Delete()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::Delete()" );
-
- delete this;
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::Delete()" );
+
+ delete this;
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerEndCall::RequestCompleted
@@ -137,33 +137,33 @@
void CPhoneHandlerEndCall::RequestCompleted( const TInt aError )
{
COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerEndCall::RequestCompleted() aError=%d, iState=%d", aError, iState );
-
- switch( iState )
- {
- case EPhoneHandlerState1:
- {
- NextState();
- iControl.CommandInitiator().SendResponse( GetStatus(),
- iOperation,
- aError );
- Activate();
- break;
- }
-
- case EPhoneHandlerState2:
- {
- IdleState();
- delete this;
- break;
- }
-
- default:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::RequestCompleted() Unspecified state" );
- break;
- }
- };
- }
+
+ switch( iState )
+ {
+ case EPhoneHandlerState1:
+ {
+ NextState();
+ iControl.CommandInitiator().SendResponse( GetStatus(),
+ iOperation,
+ aError );
+ Activate();
+ break;
+ }
+
+ case EPhoneHandlerState2:
+ {
+ IdleState();
+ delete this;
+ break;
+ }
+
+ default:
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerEndCall::RequestCompleted() Unspecified state" );
+ break;
+ }
+ };
+ }
// ========================== OTHER EXPORTED FUNCTIONS =========================
--- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerMultipartyCall.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerMultipartyCall.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,11 +17,11 @@
// INCLUDE FILES
-#include "PhoneHandlerMultipartyCall.h"
-#include "PhoneHandlerControl.h"
-#include "PhoneHandlerDebug.h"
-#include <RemConCallHandlingTarget.h>
-#include <CPhCltCommandHandler.h>
+#include "PhoneHandlerMultipartyCall.h"
+#include "PhoneHandlerControl.h"
+#include "PhoneHandlerDebug.h"
+#include <RemConCallHandlingTarget.h>
+#include <cphcltcommandhandler.h>
// EXTERNAL DATA STRUCTURES
@@ -50,8 +50,8 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerMultipartyCall::CPhoneHandlerMultipartyCall(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
: iControl( aControl ),
iOperation( aOperation )
{
@@ -65,11 +65,11 @@
void CPhoneHandlerMultipartyCall::ConstructL()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::ConstructL() start" );
-
+
LoadServiceL();
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::ConstructL() end" );
- }
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerMultipartyCall::NewL
@@ -77,13 +77,13 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerMultipartyCall* CPhoneHandlerMultipartyCall::NewL(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::NewL()" );
-
+
CPhoneHandlerMultipartyCall* self =
- new( ELeave ) CPhoneHandlerMultipartyCall( aControl, aOperation );
+ new( ELeave ) CPhoneHandlerMultipartyCall( aControl, aOperation );
CleanupStack::PushL( self );
self->ConstructL();
@@ -97,7 +97,7 @@
CPhoneHandlerMultipartyCall::~CPhoneHandlerMultipartyCall()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::~CPhoneHandlerMultipartyCall()" );
-
+
}
// -----------------------------------------------------------------------------
@@ -107,29 +107,29 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerMultipartyCall::Process()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::Process()" );
-
- /*
- if( iControl.SwitchCall() )
- {
- iCommandHandler->Chld( GetStatus(), EPhCltChldTwo, 0 );
- }
- else
- { */
- // get command
- TInt command = const_cast<TInt&>( iControl.ChldCommand() );
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::Process()" );
+
+ /*
+ if( iControl.SwitchCall() )
+ {
+ iCommandHandler->Chld( GetStatus(), EPhCltChldTwo, 0 );
+ }
+ else
+ { */
+ // get command
+ TInt command = const_cast<TInt&>( iControl.ChldCommand() );
- // get number
- TInt number = const_cast<TInt&>( iControl.ChldCallNumber() );
-
- iCommandHandler->Chld( GetStatus(),
- static_cast<TPhCltChldCommand>( command ),
- number );
- //}
-
- Activate();
- }
+ // get number
+ TInt number = const_cast<TInt&>( iControl.ChldCallNumber() );
+
+ iCommandHandler->Chld( GetStatus(),
+ static_cast<TPhCltChldCommand>( command ),
+ number );
+ //}
+
+ Activate();
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerMultipartyCall::Delete
@@ -137,11 +137,11 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerMultipartyCall::Delete()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::Delete()" );
-
- delete this;
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::Delete()" );
+
+ delete this;
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerMultipartyCall::RequestCompleted
@@ -152,33 +152,33 @@
void CPhoneHandlerMultipartyCall::RequestCompleted( const TInt aError )
{
COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::RequestCompleted() aError=%d, iState=%d", aError, iState );
-
- switch( iState )
- {
- case EPhoneHandlerState1:
- {
- NextState();
- iControl.CommandInitiator().SendResponse( GetStatus(),
- iOperation,
- aError );
- Activate();
- break;
- }
-
- case EPhoneHandlerState2:
- {
- IdleState();
- delete this;
- break;
- }
-
- default:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::RequestCompleted() Unspecified state" );
- break;
- }
- };
- }
+
+ switch( iState )
+ {
+ case EPhoneHandlerState1:
+ {
+ NextState();
+ iControl.CommandInitiator().SendResponse( GetStatus(),
+ iOperation,
+ aError );
+ Activate();
+ break;
+ }
+
+ case EPhoneHandlerState2:
+ {
+ IdleState();
+ delete this;
+ break;
+ }
+
+ default:
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerMultipartyCall::RequestCompleted() Unspecified state" );
+ break;
+ }
+ };
+ }
// ========================== OTHER EXPORTED FUNCTIONS =========================
--- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerRedial.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerRedial.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,12 +18,12 @@
// INCLUDE FILES
-#include "PhoneHandlerRedial.h"
-#include "PhoneHandlerControl.h"
-#include "PhoneHandlerDebug.h"
-#include <RemConCallHandlingTarget.h>
-#include <CPhCltCommandHandler.h>
-#include <PhCltTypes.h>
+#include "PhoneHandlerRedial.h"
+#include "PhoneHandlerControl.h"
+#include "PhoneHandlerDebug.h"
+#include <RemConCallHandlingTarget.h>
+#include <cphcltcommandhandler.h>
+#include <phclttypes.h>
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
#include <logfilterandeventconstants.hrh>
@@ -36,8 +36,8 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerLastNumberRedial::CPhoneHandlerLastNumberRedial(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
: iControl( aControl ),
iOperation( aOperation )
{
@@ -67,11 +67,11 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerLastNumberRedial* CPhoneHandlerLastNumberRedial::NewL(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
{
CPhoneHandlerLastNumberRedial* self =
- new (ELeave) CPhoneHandlerLastNumberRedial( aControl, aOperation );
+ new (ELeave) CPhoneHandlerLastNumberRedial( aControl, aOperation );
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
@@ -87,7 +87,7 @@
delete iLogClientPtr;
iFsSession.Close();
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::CPhoneHandlerLastNumberRedial() end" );
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::CPhoneHandlerLastNumberRedial() end" );
}
// -----------------------------------------------------------------------------
@@ -97,13 +97,13 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerLastNumberRedial::Process()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() start" );
-
- TBool ret = EFalse;
-
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() start" );
+
+ TBool ret = EFalse;
+
TRAPD( err, ret = iLogViewRecentPtr->
- SetRecentListL( KLogRecentOutgoingCalls, GetStatus() ) );
+ SetRecentListL( KLogRecentOutgoingCalls, GetStatus() ) );
if( KErrNone == err && ret )
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() There is last redial number" );
@@ -112,15 +112,15 @@
else
{
if( err != KErrNone )
- {
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() failed err=%d", err );
- RequestCompleted( err );
- }
+ {
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() failed err=%d", err );
+ RequestCompleted( err );
+ }
else
- {
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() failed err=%d", KErrNotFound );
- RequestCompleted( KErrNotFound );
- }
+ {
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() failed err=%d", KErrNotFound );
+ RequestCompleted( KErrNotFound );
+ }
}
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Process() end" );
@@ -132,11 +132,11 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerLastNumberRedial::Delete()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Delete()" );
-
- delete this;
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::Delete()" );
+
+ delete this;
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerLastNumberRedial::RequestCompleted
@@ -146,54 +146,54 @@
//
void CPhoneHandlerLastNumberRedial::RequestCompleted( const TInt aError )
{
- COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() aError=%d, iState=%d", aError, iState );
-
- if( KErrNone != aError )
- {
- // cancel process and return an error code
- iState = EPhoneHandlerState2;
- }
-
- switch( iState )
- {
- case EPhoneHandlerState1:
- {
- NextState();
-
- const TDesC& number = iLogViewRecentPtr->Event().Number();
- COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() phone number is %S", &number );
- // make a call with last dialed phone number
- iCommandHandler->Atd( GetStatus(), number );
+ COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() aError=%d, iState=%d", aError, iState );
+
+ if( KErrNone != aError )
+ {
+ // cancel process and return an error code
+ iState = EPhoneHandlerState2;
+ }
+
+ switch( iState )
+ {
+ case EPhoneHandlerState1:
+ {
+ NextState();
+
+ const TDesC& number = iLogViewRecentPtr->Event().Number();
+ COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() phone number is %S", &number );
+ // make a call with last dialed phone number
+ iCommandHandler->Atd( GetStatus(), number );
- Activate();
- break;
- }
-
- case EPhoneHandlerState2:
- {
- NextState();
- iControl.CommandInitiator().SendResponse( GetStatus(),
- iOperation,
- aError );
- Activate();
- break;
- }
-
- case EPhoneHandlerState3:
- {
- IdleState();
- delete this;
- break;
- }
-
- default:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() Unspecified state" );
- break;
- }
- };
-
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() end" );
+ Activate();
+ break;
+ }
+
+ case EPhoneHandlerState2:
+ {
+ NextState();
+ iControl.CommandInitiator().SendResponse( GetStatus(),
+ iOperation,
+ aError );
+ Activate();
+ break;
+ }
+
+ case EPhoneHandlerState3:
+ {
+ IdleState();
+ delete this;
+ break;
+ }
+
+ default:
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() Unspecified state" );
+ break;
+ }
+ };
+
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerLastNumberRedial::RequestCompleted() end" );
}
// ========================== OTHER EXPORTED FUNCTIONS =========================
--- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerResponse.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerResponse.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,11 +17,11 @@
// INCLUDE FILES
-#include "PhoneHandlerResponse.h"
-#include "PhoneHandlerControl.h"
-#include "PhoneHandlerActive.h"
-#include "PhoneHandlerDebug.h"
-#include <RemConCallHandlingTarget.h>
+#include "PhoneHandlerResponse.h"
+#include "PhoneHandlerControl.h"
+#include "PhoneHandlerActive.h"
+#include "PhoneHandlerDebug.h"
+#include <RemConCallHandlingTarget.h>
// EXTERNAL DATA STRUCTURES
@@ -62,11 +62,11 @@
void CPhoneHandlerResponse::ConstructL()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::ConstructL() start" );
-
+
iActive = CPhoneHandlerActive::NewL( *this );
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::ConstructL() end" );
- }
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerResponse::NewL
@@ -74,19 +74,19 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerResponse* CPhoneHandlerResponse::NewL(
- CPhoneHandlerControl& aControl )
+ CPhoneHandlerControl& aControl )
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::NewL() start" );
-
+
CPhoneHandlerResponse* self =
- new( ELeave ) CPhoneHandlerResponse( aControl );
+ new( ELeave ) CPhoneHandlerResponse( aControl );
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::NewL() end" );
-
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::NewL() end" );
+
return self;
}
@@ -94,7 +94,7 @@
CPhoneHandlerResponse::~CPhoneHandlerResponse()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::~CPhoneHandlerResponse()" );
-
+
delete iActive;
}
@@ -105,14 +105,14 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerResponse::SetResponse(
- TRemConExtCallHandlingApiOperationId aOperation, TInt aError )
- {
- COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerResponse::Process(aOperation=%d,aError=%d)",aOperation, aError );
-
- iOperation = aOperation;
- iError = aError;
- }
-
+ TRemConExtCallHandlingApiOperationId aOperation, TInt aError )
+ {
+ COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerResponse::Process(aOperation=%d,aError=%d)",aOperation, aError );
+
+ iOperation = aOperation;
+ iError = aError;
+ }
+
// -----------------------------------------------------------------------------
// CPhoneHandlerResponse::SendResponse
// Sends response to RemCon FW.
@@ -120,14 +120,14 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerResponse::Process()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::Process()" );
-
- iControl.CommandInitiator().SendResponse( iActive->iStatus,
- iOperation,
- iError );
- iActive->SetActive();
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::Process()" );
+
+ iControl.CommandInitiator().SendResponse( iActive->iStatus,
+ iOperation,
+ iError );
+ iActive->SetActive();
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerLastNumberRedial::Delete
@@ -135,11 +135,11 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerResponse::Delete()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::Delete()" );
-
- delete this;
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerResponse::Delete()" );
+
+ delete this;
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerResponse::RequestCompleted
@@ -150,14 +150,14 @@
void CPhoneHandlerResponse::RequestCompleted( const TInt aError )
{
COM_TRACE_1( "[PHONECMDHANDLER] CPhoneHandlerResponse::RequestCompleted() aError=%d", aError );
-
- (void)aError; // avoid warning in WINSCW urel build
-
- // Think about adding value to TRemConExtCallHandlingApiOperationId
- // in RemConExtensionApi.h like "ERemConExtNoCallHandlingOperation".
- // In this method iOperation should be set to that value.
- iError = KErrNone;
- }
+
+ (void)aError; // avoid warning in WINSCW urel build
+
+ // Think about adding value to TRemConExtCallHandlingApiOperationId
+ // in RemConExtensionApi.h like "ERemConExtNoCallHandlingOperation".
+ // In this method iOperation should be set to that value.
+ iError = KErrNone;
+ }
// ========================== OTHER EXPORTED FUNCTIONS =========================
--- a/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerVoiceDial.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/phonecmdhandler/phonecmdhnlr/src/PhoneHandlerVoiceDial.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,11 +17,11 @@
// INCLUDE FILES
-#include "PhoneHandlerVoiceDial.h"
-#include "PhoneHandlerControl.h"
-#include "PhoneHandlerDebug.h"
-#include <RemConCallHandlingTarget.h>
-#include <CPhCltCommandHandler.h>
+#include "PhoneHandlerVoiceDial.h"
+#include "PhoneHandlerControl.h"
+#include "PhoneHandlerDebug.h"
+#include <RemConCallHandlingTarget.h>
+#include <cphcltcommandhandler.h>
// EXTERNAL DATA STRUCTURES
@@ -50,8 +50,8 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerVoiceDial::CPhoneHandlerVoiceDial(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
: iControl( aControl ),
iOperation( aOperation )
{
@@ -65,11 +65,11 @@
void CPhoneHandlerVoiceDial::ConstructL()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::ConstructL() start" );
-
+
LoadServiceL();
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::ConstructL() end" );
- }
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerVoiceDial::NewL
@@ -77,21 +77,21 @@
// -----------------------------------------------------------------------------
//
CPhoneHandlerVoiceDial* CPhoneHandlerVoiceDial::NewL(
- CPhoneHandlerControl& aControl,
- TRemConExtCallHandlingApiOperationId aOperation )
+ CPhoneHandlerControl& aControl,
+ TRemConExtCallHandlingApiOperationId aOperation )
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::NewL() start" );
-
+
CPhoneHandlerVoiceDial* self = new( ELeave ) CPhoneHandlerVoiceDial(
- aControl,
- aOperation );
+ aControl,
+ aOperation );
CleanupStack::PushL( self );
self->ConstructL();
CleanupStack::Pop( self );
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::NewL() end" );
-
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::NewL() end" );
+
return self;
}
@@ -100,7 +100,7 @@
CPhoneHandlerVoiceDial::~CPhoneHandlerVoiceDial()
{
COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::~CPhoneHandlerVoiceDial()" );
-
+
}
// -----------------------------------------------------------------------------
@@ -110,14 +110,14 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerVoiceDial::Process()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::Process()" );
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::Process()" );
-#if 0 // removed due to SCB CR PMEO-7JRFAX
- iCommandHandler->Bvra( GetStatus(), iControl.VoiceDialStatus() );
-#endif // #if 0
- Activate();
- }
+#if 0 // removed due to SCB CR PMEO-7JRFAX
+ iCommandHandler->Bvra( GetStatus(), iControl.VoiceDialStatus() );
+#endif // #if 0
+ Activate();
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerVoiceDial::Delete
@@ -125,11 +125,11 @@
// -----------------------------------------------------------------------------
//
void CPhoneHandlerVoiceDial::Delete()
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::Delete()" );
-
- delete this;
- }
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::Delete()" );
+
+ delete this;
+ }
// -----------------------------------------------------------------------------
// CPhoneHandlerVoiceDial::RequestCompleted
@@ -140,33 +140,33 @@
void CPhoneHandlerVoiceDial::RequestCompleted( const TInt aError )
{
COM_TRACE_2( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::RequestCompleted() aError=%d, iState=%d", aError, iState );
-
- switch( iState )
- {
- case EPhoneHandlerState1:
- {
- NextState();
- iControl.CommandInitiator().SendResponse( GetStatus(),
- iOperation,
- aError );
- Activate();
- break;
- }
-
- case EPhoneHandlerState2:
- {
- IdleState();
- delete this;
- break;
- }
-
- default:
- {
- COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::RequestCompleted() Unspecified state" );
- break;
- }
- };
- }
+
+ switch( iState )
+ {
+ case EPhoneHandlerState1:
+ {
+ NextState();
+ iControl.CommandInitiator().SendResponse( GetStatus(),
+ iOperation,
+ aError );
+ Activate();
+ break;
+ }
+
+ case EPhoneHandlerState2:
+ {
+ IdleState();
+ delete this;
+ break;
+ }
+
+ default:
+ {
+ COM_TRACE_( "[PHONECMDHANDLER] CPhoneHandlerVoiceDial::RequestCompleted() Unspecified state" );
+ break;
+ }
+ };
+ }
// ========================== OTHER EXPORTED FUNCTIONS =========================
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,31 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: Project file for building phonesrv components
+#
+#
+
+TEMPLATE = subdirs
+CONFIG += ordered
+
+symbian: {
+:BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"group/bld.inf\""
+SUBDIRS += telutils/xqtelephonyservice
+SUBDIRS += telutils/dialpad
+SUBDIRS += vmbx/vmbxcpplugin
+SUBDIRS += cellular/SSSettings/xqbindings/sssettingswrapper
+SUBDIRS += cellular/telephonysettings/xqbindings/psetwrapper
+SUBDIRS += cbs/cbsui
+SUBDIRS += satui/satapp
+}
+
--- a/phonesrv_plat/call_information_api/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/call_information_api/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: File that exports the files belonging to
- Call Information API
+ Call Information API
*
*/
@@ -23,7 +23,8 @@
DEFAULT
PRJ_EXPORTS
-../inc/mcall.h MW_LAYER_PLATFORM_EXPORT_PATH(mcall.h)
+../inc/mcall.h MW_LAYER_PLATFORM_EXPORT_PATH(mcall.h)
../inc/mcallinformationobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(mcallinformationobserver.h)
../inc/ccallinformation.h MW_LAYER_PLATFORM_EXPORT_PATH(ccallinformation.h)
-../inc/ccallinfoiter.h MW_LAYER_PLATFORM_EXPORT_PATH(ccallinfoiter.h)
\ No newline at end of file
+../inc/ccallinfoiter.h MW_LAYER_PLATFORM_EXPORT_PATH(ccallinfoiter.h)
+../inc/xqcallinfo.h MW_LAYER_PLATFORM_EXPORT_PATH(xqcallinfo.h)
\ No newline at end of file
--- a/phonesrv_plat/call_information_api/inc/ccallinformation.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/call_information_api/inc/ccallinformation.h Fri Mar 19 09:40:14 2010 +0200
@@ -106,8 +106,8 @@
private: // data
- CCallInformationImpl* iImpl;
-
+ CCallInformationImpl* iImpl;
+
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/call_information_api/inc/xqcallinfo.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,116 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Provides information about ongoing calls.
+*
+*/
+
+#ifndef XQCALLINFO_H
+#define XQCALLINFO_H
+
+#include <QObject>
+#include <QString>
+#include <ccpdefs.h>
+
+
+// forward declarations
+class XQCallInfoImpl;
+
+/*!
+ CallInfo
+ Holds calls information.
+*/
+NONSHARABLE_CLASS( CallInfo )
+ {
+public:
+ int callIndex() const { return m_Index; }
+ CCPCall::TCallType callType() const { return m_Type; }
+ CCPCall::TCallState callState() const { return m_State; }
+ unsigned int serviceId() const { return m_ServiceId; }
+ CCPCall::TCallDirection callDirection() const { return m_Direction; }
+
+ CCPCall::TCallState m_State;
+ CCPCall::TCallType m_Type;
+ CCPCall::TCallDirection m_Direction;
+ int m_Index;
+ unsigned int m_ServiceId;
+ };
+
+
+#ifdef BUILD_XQCALLINFO
+#define XQCALLINFO_EXPORT Q_DECL_EXPORT
+#else
+#define XQCALLINFO_EXPORT Q_DECL_IMPORT
+#endif
+/*!
+ XQCallInfo
+ Class to be used for receiving information about ongoing calls.
+
+ @code
+ XQCallInfo *callInfo = XQCallInfo::create();
+ @endcode
+
+*/
+class XQCALLINFO_EXPORT XQCallInfo: public QObject
+{
+ Q_OBJECT
+
+public:
+
+ /*!
+ \fn XQCallInfo *create
+
+ Creates XQCallInfo instance.
+ */
+ static XQCallInfo *create();
+
+ /*!
+ \fn void getCallsL(QList<CallInfo> &calls)
+
+ Gets the snapshot of ongoing calls.
+ */
+ virtual void getCalls(QList<CallInfo> &calls) = 0;
+
+ /*!
+ \fn bool isCallInState( CCPCall::TCallState state ) const
+
+ Returns information whether call in given state exist.
+ */
+ virtual bool isCallInState(CCPCall::TCallState state) const = 0;
+
+signals:
+
+ /*!
+ \fn void CallInformationChanged()
+
+ Signals that there are changes in ongoing calls. Client should fetch
+ the call infomations after receiving the notification.
+ */
+ void callInformationChanged();
+
+protected:
+
+ /*!
+ \fn void sendSignal()
+
+ Sends signal call info changed signal to client's.
+ */
+ void sendCallInfoChangedSignal();
+
+ /*!
+ Constructor
+ */
+ XQCallInfo();
+};
+
+#endif // XQCALLINFO_H
--- a/phonesrv_plat/call_remote_party_information_api/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/call_remote_party_information_api/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: File that exports the files belonging to
-* Call Remote Party Information API
+* Call Remote Party Information API
*
*/
--- a/phonesrv_plat/call_remote_party_information_api/inc/ccallremotepartyinformation.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/call_remote_party_information_api/inc/ccallremotepartyinformation.h Fri Mar 19 09:40:14 2010 +0200
@@ -88,8 +88,8 @@
private: // data
- CCallRemotePartyInformationImpl* iImpl;
-
+ CCallRemotePartyInformationImpl* iImpl;
+
};
#endif // CCALLREMOTEPARTYINFORMATION_H
--- a/phonesrv_plat/cenrep_database_api/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/cenrep_database_api/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -24,5 +24,5 @@
PRJ_EXPORTS
-../inc/cenrepdatabaseproperty.h MW_LAYER_PLATFORM_EXPORT_PATH( cenrepdatabaseproperty.h )
-../inc/cenrepdatabaseutil.h MW_LAYER_PLATFORM_EXPORT_PATH( cenrepdatabaseutil.h )
+../inc/cenrepdatabaseproperty.h MW_LAYER_PLATFORM_EXPORT_PATH( cenrepdatabaseproperty.h )
+../inc/cenrepdatabaseutil.h MW_LAYER_PLATFORM_EXPORT_PATH( cenrepdatabaseutil.h )
--- a/phonesrv_plat/cenrep_database_api/inc/cenrepdatabaseproperty.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/cenrep_database_api/inc/cenrepdatabaseproperty.h Fri Mar 19 09:40:14 2010 +0200
@@ -31,111 +31,111 @@
*/
NONSHARABLE_CLASS( CCenRepDatabaseProperty ): public CBase
{
- public: // Constructor and destructor
+ public: // Constructor and destructor
- /**
- * Two-phased constructor.
- */
- IMPORT_C static CCenRepDatabaseProperty* NewL();
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CCenRepDatabaseProperty* NewL();
- /**
- * Two-phased constructor.
- */
- IMPORT_C static CCenRepDatabaseProperty* NewLC();
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CCenRepDatabaseProperty* NewLC();
- /**
- * Destructors.
- */
- IMPORT_C virtual ~CCenRepDatabaseProperty();
+ /**
+ * Destructors.
+ */
+ IMPORT_C virtual ~CCenRepDatabaseProperty();
- public: // member functions
- /**
- * Returns the name of this property
- *
- * @since S60 V3.2
- * @return Name of property
- */
- IMPORT_C TUint32 GetName() const;
+ public: // member functions
+ /**
+ * Returns the name of this property
+ *
+ * @since S60 V3.2
+ * @return Name of property
+ */
+ IMPORT_C TUint32 GetName() const;
- /**
- * Sets the name for this property
- *
- * @since S60 V3.2
- * @param aPropertyname new property name
- */
- IMPORT_C void SetName( TUint32 aPropertyname );
+ /**
+ * Sets the name for this property
+ *
+ * @since S60 V3.2
+ * @param aPropertyname new property name
+ */
+ IMPORT_C void SetName( TUint32 aPropertyname );
- /**
- * Returns value of property
- *
- * @since S60 V3.2
- * @param aValue on return, TInt value
- * @return Error code
- */
- IMPORT_C TInt GetValue( TInt& aValue ) const;
+ /**
+ * Returns value of property
+ *
+ * @since S60 V3.2
+ * @param aValue on return, TInt value
+ * @return Error code
+ */
+ IMPORT_C TInt GetValue( TInt& aValue ) const;
- /**
- * Sets value of property. Value must match to datatype.
- *
- * @since S60 V3.2
- * @param aValue new TInt value to be set
- * @return Error code
- */
- IMPORT_C TInt SetValue( TInt aValue );
+ /**
+ * Sets value of property. Value must match to datatype.
+ *
+ * @since S60 V3.2
+ * @param aValue new TInt value to be set
+ * @return Error code
+ */
+ IMPORT_C TInt SetValue( TInt aValue );
- /**
- * Returns value of property
- *
- * @since S60 V3.2
- * @param aValue on return, descriptor value
- * @return Error code
- */
- IMPORT_C const TDesC& GetDesValue() const;
+ /**
+ * Returns value of property
+ *
+ * @since S60 V3.2
+ * @param aValue on return, descriptor value
+ * @return Error code
+ */
+ IMPORT_C const TDesC& GetDesValue() const;
- /**
- * Sets the value of property. Value must match to datatype.
- *
- * @since S60 V3.2
- * @param aValue new descriptor
- * @return Error code
- */
- IMPORT_C TInt SetValue( const TDesC& aValue );
+ /**
+ * Sets the value of property. Value must match to datatype.
+ *
+ * @since S60 V3.2
+ * @param aValue new descriptor
+ * @return Error code
+ */
+ IMPORT_C TInt SetValue( const TDesC& aValue );
- /**
- * Compares data of this property to another.
- *
- * @since S60 V3.2
- * @param aProperty property to be compared
- * @return ETrue if properties have same data
- */
- IMPORT_C TBool CCenRepDatabaseProperty::operator==(
- const CCenRepDatabaseProperty& aProperty ) const;
+ /**
+ * Compares data of this property to another.
+ *
+ * @since S60 V3.2
+ * @param aProperty property to be compared
+ * @return ETrue if properties have same data
+ */
+ IMPORT_C TBool CCenRepDatabaseProperty::operator==(
+ const CCenRepDatabaseProperty& aProperty ) const;
- private:
+ private:
- /**
- * C++ default constructor.
- */
- CCenRepDatabaseProperty();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
+ /**
+ * C++ default constructor.
+ */
+ CCenRepDatabaseProperty();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
- private: // data
+ private: // data
- /**
- * Descriptor of property value
- * Own.
- */
- RBuf iPropertyValue;
+ /**
+ * Descriptor of property value
+ * Own.
+ */
+ RBuf iPropertyValue;
- /**
- * Name of property
- */
- TUint32 iPropertyName;
+ /**
+ * Name of property
+ */
+ TUint32 iPropertyName;
private: // For testing
--- a/phonesrv_plat/cenrep_database_api/inc/cenrepdatabaseutil.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/cenrep_database_api/inc/cenrepdatabaseutil.h Fri Mar 19 09:40:14 2010 +0200
@@ -81,134 +81,134 @@
IMPORT_C virtual ~CCenRepDatabaseUtil();
public:
- /**
- * Start transaction in repository.
- * Note. Function leaves two cleanup items to cleanupstack and those
- * are freed when CommitTransaction or RollbackTransaction is called.
- *
- * @since S60 v3.2
- */
- IMPORT_C void BeginTransactionL();
+ /**
+ * Start transaction in repository.
+ * Note. Function leaves two cleanup items to cleanupstack and those
+ * are freed when CommitTransaction or RollbackTransaction is called.
+ *
+ * @since S60 v3.2
+ */
+ IMPORT_C void BeginTransactionL();
- /**
- * Commit changes in repository
- *
- * @since S60 v3.2
- * @return An error code
- */
- IMPORT_C TInt CommitTransaction();
-
- /**
- * Rollback changes in repository
- *
- * @since S60 v3.2
- */
- IMPORT_C void RollbackTransaction();
-
- /**
- * Store new entry to table.
- *
- * @since S60 v3.2
- * @param aEntryId Contains new ID when returns.
- * @param aArray Container for properties of this entry.
- */
- IMPORT_C void AddEntryL( TInt& aEntryId, const RIpAppPropArray& aArray );
+ /**
+ * Commit changes in repository
+ *
+ * @since S60 v3.2
+ * @return An error code
+ */
+ IMPORT_C TInt CommitTransaction();
+
+ /**
+ * Rollback changes in repository
+ *
+ * @since S60 v3.2
+ */
+ IMPORT_C void RollbackTransaction();
+
+ /**
+ * Store new entry to table.
+ *
+ * @since S60 v3.2
+ * @param aEntryId Contains new ID when returns.
+ * @param aArray Container for properties of this entry.
+ */
+ IMPORT_C void AddEntryL( TInt& aEntryId, const RIpAppPropArray& aArray );
- /**
- * Search entry by entry ID.
- *
- * @since S60 v3.2
- * @param aEntryId Id of requested entry
- * @param aArray on return, property array.
- * @return error code, KErrNotFound if unknown entry.
- */
- IMPORT_C TInt FindEntryL( TInt aEntryId, RIpAppPropArray& aArray );
+ /**
+ * Search entry by entry ID.
+ *
+ * @since S60 v3.2
+ * @param aEntryId Id of requested entry
+ * @param aArray on return, property array.
+ * @return error code, KErrNotFound if unknown entry.
+ */
+ IMPORT_C TInt FindEntryL( TInt aEntryId, RIpAppPropArray& aArray );
- /**
- * Updates entry to central repository
- *
- * @since S60 v3.2
- * @param aEntryId Id of requested entry
- * @param aArray Updated properties of entry
- * @return error code, KErrNotFound if unknown entry.
- */
- IMPORT_C TInt UpdateEntryL( TInt aEntryId,
- const RIpAppPropArray& aArray );
+ /**
+ * Updates entry to central repository
+ *
+ * @since S60 v3.2
+ * @param aEntryId Id of requested entry
+ * @param aArray Updated properties of entry
+ * @return error code, KErrNotFound if unknown entry.
+ */
+ IMPORT_C TInt UpdateEntryL( TInt aEntryId,
+ const RIpAppPropArray& aArray );
- /**
- * Deletes settings entry from storage by entry ID.
- *
- * @since S60 v3.2
- * @param aEntryId Id of entry which is going to be deleted
- * @return error code, KErrNone if delete succeeded, otherwise system wide error code
- */
- IMPORT_C TInt DeleteEntryL( TInt aEntryId );
+ /**
+ * Deletes settings entry from storage by entry ID.
+ *
+ * @since S60 v3.2
+ * @param aEntryId Id of entry which is going to be deleted
+ * @return error code, KErrNone if delete succeeded, otherwise system wide error code
+ */
+ IMPORT_C TInt DeleteEntryL( TInt aEntryId );
- /**
- * Search property of entry from storage.
- *
- * @since S60 v3.2
- * @param aEntryId The entry ID of requested entry
- * @param aPropertyName property name to be found
- * @param aProperty on return, requested property
- * @return error code, KErrNone if succeeded, otherwise system wide error code
- */
- IMPORT_C TInt FindPropertyL( TInt aEntryId,
- TUint32 aPropertyName,
- CCenRepDatabaseProperty& aProperty );
+ /**
+ * Search property of entry from storage.
+ *
+ * @since S60 v3.2
+ * @param aEntryId The entry ID of requested entry
+ * @param aPropertyName property name to be found
+ * @param aProperty on return, requested property
+ * @return error code, KErrNone if succeeded, otherwise system wide error code
+ */
+ IMPORT_C TInt FindPropertyL( TInt aEntryId,
+ TUint32 aPropertyName,
+ CCenRepDatabaseProperty& aProperty );
- /**
- * Add or update properties of entry in table.
- * Values of existing properties are overwritten.
- *
- * @since S60 v3.2
- * @param aEntryId The ID of updated entry
- * @param aArray new properties to be added or updated
+ /**
+ * Add or update properties of entry in table.
+ * Values of existing properties are overwritten.
+ *
+ * @since S60 v3.2
+ * @param aEntryId The ID of updated entry
+ * @param aArray new properties to be added or updated
* @return error code, KErrNotFound if unknown entry.
- */
- IMPORT_C TInt AddOrUpdatePropertiesL( TInt aEntryId,
- const RIpAppPropArray& aArray );
+ */
+ IMPORT_C TInt AddOrUpdatePropertiesL( TInt aEntryId,
+ const RIpAppPropArray& aArray );
- /**
- * Delete properties of entry in table.
- *
- * @since S60 v3.2
- * @param aEntryId The entry ID of requested entry
- * @param aNameArray name of properties to be deleted
- * @return error code, KErrNotFound if unknown entry.
- */
- IMPORT_C TInt DeletePropertiesL( TInt aEntryId,
- const RArray<TUint32>& aNameArray );
+ /**
+ * Delete properties of entry in table.
+ *
+ * @since S60 v3.2
+ * @param aEntryId The entry ID of requested entry
+ * @param aNameArray name of properties to be deleted
+ * @return error code, KErrNotFound if unknown entry.
+ */
+ IMPORT_C TInt DeletePropertiesL( TInt aEntryId,
+ const RArray<TUint32>& aNameArray );
- /**
- * Return count of entries in table.
- *
- * @since S60 v3.2
- * @return Count of stored settings.
- */
- IMPORT_C TInt EntryCountL( TInt& aCount );
+ /**
+ * Return count of entries in table.
+ *
+ * @since S60 v3.2
+ * @return Count of stored settings.
+ */
+ IMPORT_C TInt EntryCountL( TInt& aCount );
- /**
- * Search all entry IDs from storage
- *
- * @since S60 v3.2
- * @param aEntryIds An array containing returned entry IDs
- * @return error code
- */
- IMPORT_C TInt FindEntryIdsL( RArray<TInt>& aEntryIds );
+ /**
+ * Search all entry IDs from storage
+ *
+ * @since S60 v3.2
+ * @param aEntryIds An array containing returned entry IDs
+ * @return error code
+ */
+ IMPORT_C TInt FindEntryIdsL( RArray<TInt>& aEntryIds );
- /**
- * Find entry IDs with same properties
- *
- * @since S60 v3.2
- * @param aPropertyArray property array
- * @param aEntryIds on return, entry Ids with same properties
- * @return error code
- */
- IMPORT_C TInt FindEntryIdsFromPropertiesL( const RIpAppPropArray& aPropertyArray,
- RArray<TInt>& aEntryIds );
-
+ /**
+ * Find entry IDs with same properties
+ *
+ * @since S60 v3.2
+ * @param aPropertyArray property array
+ * @param aEntryIds on return, entry Ids with same properties
+ * @return error code
+ */
+ IMPORT_C TInt FindEntryIdsFromPropertiesL( const RIpAppPropArray& aPropertyArray,
+ RArray<TInt>& aEntryIds );
+
private:
@@ -226,113 +226,113 @@
*/
void ConstructL( TUid aUid );
- /**
- * Release semaphore, this function is used in custom cleanup
- *
- * @since S60 v3.2
- * @param aPtr Pointer to an object which is the target of the cleanup operation
- */
+ /**
+ * Release semaphore, this function is used in custom cleanup
+ *
+ * @since S60 v3.2
+ * @param aPtr Pointer to an object which is the target of the cleanup operation
+ */
static void ReleaseSemaphore( TAny* aPtr );
- /**
- * Release semaphore
- *
- * @since S60 v3.2
- */
+ /**
+ * Release semaphore
+ *
+ * @since S60 v3.2
+ */
void DoReleaseSemaphore();
- /**
- * Set new value for given key. Creates the key if it doesn't exists.
- *
- * @since S60 v3.2
- * @param aKey
- * @param aValue
- */
+ /**
+ * Set new value for given key. Creates the key if it doesn't exists.
+ *
+ * @since S60 v3.2
+ * @param aKey
+ * @param aValue
+ */
template<class T> void SetOrCreateKeyL( TUint32 aKey,
const T& aValue );
- /**
- * Create new ID for entry.
- *
- * @since S60 v3.2
- * @param aNewId Contains new ID when return.
- */
+ /**
+ * Create new ID for entry.
+ *
+ * @since S60 v3.2
+ * @param aNewId Contains new ID when return.
+ */
void CreateEntryIdL( TInt& aNewId );
- /**
- * Defines next available key for ID.
- *
- * @since S60 v3.2
- * @return New key for ID
- */
+ /**
+ * Defines next available key for ID.
+ *
+ * @since S60 v3.2
+ * @return New key for ID
+ */
TUint32 GetNewIdKeyL( );
- /**
- * Update given properties of entry.
- *
- * @since S60 v3.2
- * @param aIdKey
- * @param Array Contains updated properties and values
- */
+ /**
+ * Update given properties of entry.
+ *
+ * @since S60 v3.2
+ * @param aIdKey
+ * @param Array Contains updated properties and values
+ */
void UpdatePropertiesL( TUint32 aIdKey, const RIpAppPropArray& aArray );
- /**
- * Check if entry has given properties.
- *
- * @since S60 v3.2
- * @param aEntryId Id of entry.
- * @param aPropertyArray Properties to be checked.
+ /**
+ * Check if entry has given properties.
+ *
+ * @since S60 v3.2
+ * @param aEntryId Id of entry.
+ * @param aPropertyArray Properties to be checked.
* @param aOk Result
- */
+ */
void CheckEntryHasPropertiesL( TInt aEntryId, const RIpAppPropArray& aPropertyArray, TBool& aOk );
- /**
- * Custom cleanup for array.
- *
- * @since S60 v3.2
- * @param aPointer
- */
+ /**
+ * Custom cleanup for array.
+ *
+ * @since S60 v3.2
+ * @param aPointer
+ */
static void CleanupPointerArray( TAny* aPointer );
private: // data
- /**
- * Central Repository object.
- * Own.
- */
- CRepository* iRepository;
-
- /**
- * RSemaphore object.
- * Own.
- */
- RSemaphore iSemaphore;
-
- /**
- * Start key in first column( Id column )
- */
- TUint32 iStartKey;
+ /**
+ * Central Repository object.
+ * Own.
+ */
+ CRepository* iRepository;
+
+ /**
+ * RSemaphore object.
+ * Own.
+ */
+ RSemaphore iSemaphore;
+
+ /**
+ * Start key in first column( Id column )
+ */
+ TUint32 iStartKey;
- /**
- * Column increment
- */
- TUint32 iColIncrement;
+ /**
+ * Column increment
+ */
+ TUint32 iColIncrement;
- /**
- * Column mask
- */
- TUint32 iColMask;
-
- /**
- * Id counter key
- */
- TUint32 iIdCounterKey;
-
- /**
- * Column count
- */
- TInt iColCount;
+ /**
+ * Column mask
+ */
+ TUint32 iColMask;
+
+ /**
+ * Id counter key
+ */
+ TUint32 iIdCounterKey;
+
+ /**
+ * Column count
+ */
+ TInt iColCount;
private: // For testing
#ifdef TEST_EUNIT
--- a/phonesrv_plat/converged_call_engine_api/inc/ccce.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_engine_api/inc/ccce.h Fri Mar 19 09:40:14 2010 +0200
@@ -58,7 +58,7 @@
#ifndef RMMCUSTOMAPI_H
/** defenition for OG, most likely will be deprecated later on */
///_LIT(KTerminateAllCalls,"ALL_CALLS");
-#include <RMmCustomAPI.h> // Add reference there, cs classes need that too
+#include <rmmcustomapi.h> // Add reference there, cs classes need that too
#endif
/**
@@ -130,7 +130,7 @@
* @return none
*/
IMPORT_C void SetObserver( MCCEObserver& aObserver,
- MCCESsObserver& aSsObserver );
+ MCCESsObserver& aSsObserver );
/**
* Opens new call.
@@ -246,24 +246,24 @@
*/
IMPORT_C MCCEExtensionInterface& ExtensionInterfaceL( const MCCEExtensionObserver& aObserver );
- /**
- * This method gets the lifetime of the MS. The lifetime information
- * includes the manufacturing date of the MS and the total amount of airtime use,
- * from the manufacturing date until the call to this method. Calling this method
- * does not reset any data.
- * Forwarded to CS plugin.
- * @since S60 3.2
- * @param aLifeTimeInfo Life time information
- * @return Get succeeded or not.
- */
+ /**
+ * This method gets the lifetime of the MS. The lifetime information
+ * includes the manufacturing date of the MS and the total amount of airtime use,
+ * from the manufacturing date until the call to this method. Calling this method
+ * does not reset any data.
+ * Forwarded to CS plugin.
+ * @since S60 3.2
+ * @param aLifeTimeInfo Life time information
+ * @return Get succeeded or not.
+ */
IMPORT_C TBool GetLifeTime( TDes8& aLifeTimeInfo );
- /**
- * This method gets cs specific information from cs-plugin. This is used only CS,
- * @since S60 3.2
- * @param aCSInfo CS specific information from cs-plugin.
- * @return Get succeeded or not.
- */
+ /**
+ * This method gets cs specific information from cs-plugin. This is used only CS,
+ * @since S60 3.2
+ * @param aCSInfo CS specific information from cs-plugin.
+ * @return Get succeeded or not.
+ */
IMPORT_C TBool GetCSInfo( CSInfo& aCSInfo );
private:
--- a/phonesrv_plat/converged_call_engine_api/inc/cccecallparameters.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_engine_api/inc/cccecallparameters.h Fri Mar 19 09:40:14 2010 +0200
@@ -102,11 +102,11 @@
TBuf<KCCPUUSIdSize> iUUSId;
/** Capability configuration parameters for the first bearer. */
TBuf8<KCCEBearerMaxSize> iBearer;
- /** A buffer to hold the sub-address of a telephone number. */
- TBuf<KCCESubAddressMaxSize> iSubAddress;
- /** Call origin. */
- TCCECallOrigin iOrigin;
-
+ /** A buffer to hold the sub-address of a telephone number. */
+ TBuf<KCCESubAddressMaxSize> iSubAddress;
+ /** Call origin. */
+ TCCECallOrigin iOrigin;
+
};
#endif
\ No newline at end of file
--- a/phonesrv_plat/converged_call_engine_api/inc/mccecall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_engine_api/inc/mccecall.h Fri Mar 19 09:40:14 2010 +0200
@@ -52,7 +52,7 @@
- /**
+ /**
* Set new MCCECallObserver observer to MCCECall object.
* Called in case of incoming call. In that case call has no observer yet when it
* is created. In MO case observer is set when call is created. Repleces current observer
@@ -273,24 +273,24 @@
virtual const TDesC& DialledParty() const = 0;
/**
- * Set call parameters.
- * @since S60 3.2
- * @param aNewParams New call paramater information.
- * @return none
- */
+ * Set call parameters.
+ * @since S60 3.2
+ * @param aNewParams New call paramater information.
+ * @return none
+ */
virtual void SetParameters( const CCCECallParameters& aNewParams ) = 0;
/**
- * Get call parameters.
- * @since S60 3.2
- * @param None
- * @return Current call paramater information.
- */
+ * Get call parameters.
+ * @since S60 3.2
+ * @param None
+ * @return Current call paramater information.
+ */
virtual const CCCPCallParameters& Parameters() const = 0;
/**
* Returns the inband tone associated to an error condition or a state transition of a call.
- * See defenition for TCCPTone.
+ * See defenition for TCCPTone.
* @since S60 3.2
* @param None.
* @return TCCPTone Used tone.
@@ -298,13 +298,13 @@
virtual TCCPTone Tone() const = 0;
/**
- * Get call information. NOTE: will be removed shortly. Stop using this call use relevant getters instead!
- * TODO this needs to be rechecked if params are to be defined in CCE as a struct for example and to return that!
- * @since S60 3.2
- * @param aCallInfo TMobileCallInfoV3 - TODO check this
- * @return none
- */
- virtual void GetMobileCallInfo( TDes8& aCallInfo ) const = 0;
+ * Get call information. NOTE: will be removed shortly. Stop using this call use relevant getters instead!
+ * TODO this needs to be rechecked if params are to be defined in CCE as a struct for example and to return that!
+ * @since S60 3.2
+ * @param aCallInfo TMobileCallInfoV3 - TODO check this
+ * @return none
+ */
+ virtual void GetMobileCallInfo( TDes8& aCallInfo ) const = 0;
/************************************************************************/
/* Emergency call */
--- a/phonesrv_plat/converged_call_engine_api/inc/mccecallobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_engine_api/inc/mccecallobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -35,17 +35,17 @@
/** Tone to play enumeration. Used in MCCECallObserver::PlayInbandTone*/
enum TCCETone
{
- ECCENoTone,
- ECCEUserBusy,
- ECCERadioPathNotAvailable,
- ECCECongestion,
- ECCESpecialInformation,
- ECCEReorder,
- ECCERemoteAlerting,
- ECCEDataCallTone,
- ECCENoSoundSequence,
- ECCEBeepSequence, /** ENoSoundSequence handled the same way */
- ECCECallWaiting
+ ECCENoTone,
+ ECCEUserBusy,
+ ECCERadioPathNotAvailable,
+ ECCECongestion,
+ ECCESpecialInformation,
+ ECCEReorder,
+ ECCERemoteAlerting,
+ ECCEDataCallTone,
+ ECCENoSoundSequence,
+ ECCEBeepSequence, /** ENoSoundSequence handled the same way */
+ ECCECallWaiting
};
@@ -53,7 +53,7 @@
/** MCCE call events*/
enum TCCECallEvent
{
- /** The call has been placed on hold as a result of a local action. */
+ /** The call has been placed on hold as a result of a local action. */
ELocalHold,
/** The call has been placed on hold by the remote connected party. */
ERemoteHold,
@@ -77,7 +77,7 @@
ERemoteTerminated,
/** The call has been joined by the remote connected party to other call(s) to create/add
- * to a conference call. */
+ * to a conference call. */
/* Call has been added to remote conference call at remote end */
ERemoteConferenceCreate,
@@ -85,7 +85,7 @@
ERemoteBarred,
/** The call is being forwarded by the remote party. */
ERemoteForwarding,
- /** Call is waiting at the remote end. Obsolote, use supplementary service ESsCallWaiting */
+ /** Call is waiting at the remote end. Obsolote, use supplementary service ESsCallWaiting */
ERemoteWaiting,
/** The outgoing call has been barred by the local party. */
ELocalBarred,
@@ -107,19 +107,19 @@
// CS call specific events
///////////////////////////
- /** Call has been deflected to another remote party as a result of a local action. */
+ /** Call has been deflected to another remote party as a result of a local action. */
ECCECSLocalDeflectCall,
/** CS call specific event */
- ECCECSDataPortLoaned,
+ ECCECSDataPortLoaned,
/** CS call specific event */
- ECCECSDataPortRecovered,
+ ECCECSDataPortRecovered,
- /** One or more of following information has been changed
+ /** One or more of following information has been changed
* - Remote party name
* - Remote party number/address
* - Call parameters ( ie. service id )
- */
- ECCENotifyRemotePartyInfoChange,
+ */
+ ECCENotifyRemotePartyInfoChange,
/** Call secure status cannot be determined */
ECCESecureNotSpecified
@@ -145,7 +145,7 @@
/** The Loan Data Port request is currently a valid action. */
ECCECapsLoanDataPort = 0x00000080,
/** The Recover Data Port request is currently a valid action. */
- ECCECapsRecoverDataPort= 0x00000100,
+ ECCECapsRecoverDataPort= 0x00000100,
/** Indicates that this call can be put on hold. This implies that the call is currently
active and that there is no other held call. */
ECCECapsHold = 0x00000200,
@@ -157,11 +157,11 @@
in the opposite state and if this is the case then both calls will be simultaneously
swapped to their opposite state. */
ECCECapsSwap = 0x00000800,
- /** Indicates that this incoming call can be deflected to another destination.*/
+ /** Indicates that this incoming call can be deflected to another destination.*/
ECCECapsDeflect = 0x00001000,
/** Indicates that this call can be transferred to the remote party of another call.
For this capability to be set there must be one active call and one held or
- dialing call.*/
+ dialing call.*/
ECCECapsTransfer = 0x00002000,
/** Indicates that this call can be joined either to another single call to form
a conference call or to an existing conference call.*/
@@ -169,7 +169,7 @@
/** Indicates that this call (within a conference call) can go into One to One mode.
This action would put the rest of the conference call on hold. */
ECCECapsOneToOne = 0x00008000,
- /** Indicates that the user can activate a CCBS request on this failed call set-up.*/
+ /** Indicates that the user can activate a CCBS request on this failed call set-up.*/
ECCECapsActivateCCBS = 0x00010000,
/** Indicates that this call is part of an alternating call and the client can call
SwitchAlternatingCall() on this call in order to switch it to its other mode.*/
@@ -195,7 +195,7 @@
* @param aError Occurred error as integer,
* return none
*/
- virtual void ErrorOccurred( const TCCPError aError ) = 0;
+ virtual void ErrorOccurred( const TCCPError aError ) = 0;
/**
* Call state notificfation.
--- a/phonesrv_plat/converged_call_engine_api/inc/mcceconferencecall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_engine_api/inc/mcceconferencecall.h Fri Mar 19 09:40:14 2010 +0200
@@ -56,39 +56,39 @@
*/
virtual TInt Release() = 0;
- /**
- * Adds new call to conference call.
- * @since S60 3.2
- * @param aCall Call to be added to conference.
- * @return none
- * @leave In case of an error system wide error code
- * @leave KErrAlreadyExists call is already part of conference.
- * @leave KErrNotReady In case conference is not on hold or idle.
- * @pre Conference call state is MCCEConferenceCallObserver::ECCEConferenceHold or
- * MCCEConferenceCallObserver::ECCEConferenceIdle.
- * @post Added call is notified calling MCCEConferenceCallObserver::CallEventOccurred.
- * @post If conference becomes active regarding its internal plug-in based logic state is
- * MCCEConferenceCallObserver::ECCEConferenceActive.
- */
+ /**
+ * Adds new call to conference call.
+ * @since S60 3.2
+ * @param aCall Call to be added to conference.
+ * @return none
+ * @leave In case of an error system wide error code
+ * @leave KErrAlreadyExists call is already part of conference.
+ * @leave KErrNotReady In case conference is not on hold or idle.
+ * @pre Conference call state is MCCEConferenceCallObserver::ECCEConferenceHold or
+ * MCCEConferenceCallObserver::ECCEConferenceIdle.
+ * @post Added call is notified calling MCCEConferenceCallObserver::CallEventOccurred.
+ * @post If conference becomes active regarding its internal plug-in based logic state is
+ * MCCEConferenceCallObserver::ECCEConferenceActive.
+ */
virtual void AddCallL( MCCECall& aCall ) = 0;
- /**
- * Removes call from conference call.
- * @since S60 3.2
- * @param aCall Call to be removed from conference
- * @return none
- * @leave In case of an error system wide error code
- * @leave KErrNotFound call was not part of conference
- * @leave KErrNotReady In case conference is not connected
- * (MCCEConferenceCallObserver::ECCEConferenceActive) state.
- * @pre Conference call state is MCCEConferenceCallObserver::ECCEConferenceActive or
- * MCCEConferenceCallObserver::ECCEConferenceIdle.
- * @post Removed call is notified calling MCCEConferenceCallObserver::CallEventOccurred.
- * @post If conference becomes idle regarding its internal plug-in based logic state is
- * MCCEConferenceCallObserver::ECCEConferenceIdle.
- *
- */
- virtual void RemoveCallL( MCCECall& aCall ) = 0;
+ /**
+ * Removes call from conference call.
+ * @since S60 3.2
+ * @param aCall Call to be removed from conference
+ * @return none
+ * @leave In case of an error system wide error code
+ * @leave KErrNotFound call was not part of conference
+ * @leave KErrNotReady In case conference is not connected
+ * (MCCEConferenceCallObserver::ECCEConferenceActive) state.
+ * @pre Conference call state is MCCEConferenceCallObserver::ECCEConferenceActive or
+ * MCCEConferenceCallObserver::ECCEConferenceIdle.
+ * @post Removed call is notified calling MCCEConferenceCallObserver::CallEventOccurred.
+ * @post If conference becomes idle regarding its internal plug-in based logic state is
+ * MCCEConferenceCallObserver::ECCEConferenceIdle.
+ *
+ */
+ virtual void RemoveCallL( MCCECall& aCall ) = 0;
/**
* Returns call count of the conference call.
@@ -136,15 +136,15 @@
/**
* Private call with one call from conference call.
- * @since S60 3.2
- * @param aCall
+ * @since S60 3.2
+ * @param aCall
* @return none
- * @leave In case of an error system wide error code
- * @leave KErrNotFound call was not part of conference
- * @post After successful actions conference call state is MCCEConferenceCallObserver::ECCEConferenceHold
- * (if idle state will not be applied as call count decreases) and private call will become active one.
- */
- virtual void GoOneToOneL( MCCECall& aCall ) = 0;
+ * @leave In case of an error system wide error code
+ * @leave KErrNotFound call was not part of conference
+ * @post After successful actions conference call state is MCCEConferenceCallObserver::ECCEConferenceHold
+ * (if idle state will not be applied as call count decreases) and private call will become active one.
+ */
+ virtual void GoOneToOneL( MCCECall& aCall ) = 0;
/**
* Gets conference participants
@@ -165,15 +165,15 @@
*/
virtual void SetObserver( const MCCEConferenceCallObserver& aObserver ) = 0;
- /**
- * Returns duration of a conference call.
- * CCE will count duration from connected state to idle state.
- *
- * @since S60 v3.2
- * @param none
- * @return On return contains the call duration in seconds.
- */
- virtual TTimeIntervalSeconds CallDuration() const = 0;
+ /**
+ * Returns duration of a conference call.
+ * CCE will count duration from connected state to idle state.
+ *
+ * @since S60 v3.2
+ * @param none
+ * @return On return contains the call duration in seconds.
+ */
+ virtual TTimeIntervalSeconds CallDuration() const = 0;
};
--- a/phonesrv_plat/converged_call_engine_api/inc/mcceconferencecallobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_engine_api/inc/mcceconferencecallobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -40,15 +40,15 @@
/** A call has been removed from the conference. */
ECCEConferenceCallRemoved,
/** Names of the two calls used to build the conference call returned in aCallName. */
- ECCEConferenceBuilt,
+ ECCEConferenceBuilt,
/** No name provided */
ECCEConferenceTerminated,
/** No name provided. */
- ECCEConferenceSwapped,
+ ECCEConferenceSwapped,
/** Name of the call being seperated. */
- ECCEConferenceSplit
+ ECCEConferenceSplit
};
-
+
/** Conference call State. */
enum TCCEConferenceCallState
{
@@ -59,7 +59,7 @@
/** The conference call is in the held, connected state. */
ECCEConferenceHold
};
-
+
/** Conference call capabilities. */
enum TCCEConferenceCallCaps
{
@@ -117,15 +117,15 @@
*/
virtual void ErrorOccurred( TCCPConferenceCallError aError ) = 0;
- /**
- * Notifies observer the change in call duration.
- *
- * @since S60 v3.2
- * @param aDuration Duration of the call in seconds
- * return none
- */
- virtual void CallDurationChanged( const TTimeIntervalSeconds aDuration ) = 0;
- };
+ /**
+ * Notifies observer the change in call duration.
+ *
+ * @since S60 v3.2
+ * @param aDuration Duration of the call in seconds
+ * return none
+ */
+ virtual void CallDurationChanged( const TTimeIntervalSeconds aDuration ) = 0;
+ };
--- a/phonesrv_plat/converged_call_engine_api/inc/mccecscall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_engine_api/inc/mccecscall.h Fri Mar 19 09:40:14 2010 +0200
@@ -24,7 +24,7 @@
#include <mccecall.h>
// creates dependency ....
-// commented 3105 will be removed later #include <RMmCustomAPI.h>
+// commented 3105 will be removed later #include <rmmcustomapi.h>
/**
* Methods used only with CS Call.
@@ -32,37 +32,37 @@
* @since S60 3.2
*/
class MCCECSCall
- {
+ {
public:
- /**
- * Switch in the alternating call mode of an alternating call
- * @since S60 3.2
+ /**
+ * Switch in the alternating call mode of an alternating call
+ * @since S60 3.2
* @param none
- * @return none
- */
- virtual TInt SwitchAlternatingCall() = 0;
+ * @return none
+ */
+ virtual TInt SwitchAlternatingCall() = 0;
- /**
- * Gets the calls data call capabilities
- * @since S60 3.2
- * @param aCaps TMobileCallDataCapsV1
- * @return KErrNone if the function member was successful,
- * @return KErrNotSupported if call does not support circuit switched data,
- * @return KErrNotFound if this call is not a data call
- */
- virtual TInt GetMobileDataCallCaps( TDes8& aCaps ) const = 0;
-
- /**
- * Instruct to do no FDN checking when dialling.
- * Needs to be called before every dial for each call separately.
- * If this method is not called at all default is to use FDN.
- * Value will be reset to default when call goes back to disconnected state.
- * @since S60 v3.2
- * @param none
- * @return none
- */
- virtual void NoFDNCheck() = 0;
+ /**
+ * Gets the calls data call capabilities
+ * @since S60 3.2
+ * @param aCaps TMobileCallDataCapsV1
+ * @return KErrNone if the function member was successful,
+ * @return KErrNotSupported if call does not support circuit switched data,
+ * @return KErrNotFound if this call is not a data call
+ */
+ virtual TInt GetMobileDataCallCaps( TDes8& aCaps ) const = 0;
+
+ /**
+ * Instruct to do no FDN checking when dialling.
+ * Needs to be called before every dial for each call separately.
+ * If this method is not called at all default is to use FDN.
+ * Value will be reset to default when call goes back to disconnected state.
+ * @since S60 v3.2
+ * @param none
+ * @return none
+ */
+ virtual void NoFDNCheck() = 0;
/**
* Log dialed number. SAT related, check if dialed number is to be logged or not.
@@ -71,8 +71,8 @@
* @return Log dialed number or not.
*/
virtual TBool LogDialedNumber() const = 0;
-
- };
+
+ };
#endif //CCECSCALL_H
--- a/phonesrv_plat/converged_call_engine_api/inc/mcceextensioninterface.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_engine_api/inc/mcceextensioninterface.h Fri Mar 19 09:40:14 2010 +0200
@@ -34,14 +34,14 @@
* @since S60 3.2
*/
class MCCEExtensionInterface
- {
+ {
protected:
/**
* Protected destructor. Object cannot be deleted from client.
* @since S60 3.2
*/
virtual ~MCCEExtensionInterface() {};
-
+
public:
/**
@@ -62,7 +62,7 @@
* @return Other system wide error code.
*/
virtual TInt RequestCommand( TUint32 iServiceId,
- TInt aRequestId,
+ TInt aRequestId,
TDesC8& aData ) = 0;
/**
* Cancels request. See MCCEExtensionInterface::RequestCommand for explanation of service-id
@@ -76,8 +76,8 @@
* @return Other system wide error code.
*/
virtual TInt CancelRequest( TUint32 iServiceId,
- TInt aRequestId ) = 0;
- };
+ TInt aRequestId ) = 0;
+ };
#endif // MCCEEXTENSIONINTERFACE_H
--- a/phonesrv_plat/converged_call_engine_api/inc/mcceextensionobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_engine_api/inc/mcceextensionobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -48,7 +48,7 @@
* @return none
*/
virtual void HandleExtensionEvents( TUint32 aServiceId,
- TInt aEvent,
+ TInt aEvent,
TInt aStatus ) = 0;
};
--- a/phonesrv_plat/converged_call_engine_api/inc/mcceforwardinterface.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_engine_api/inc/mcceforwardinterface.h Fri Mar 19 09:40:14 2010 +0200
@@ -30,7 +30,7 @@
* @since S60 3.2
*/
class MCCEForwardInterface
- {
+ {
protected: // Constructors and destructor
/**
@@ -38,35 +38,35 @@
* @since S60 3.2
*/
virtual ~MCCEForwardInterface() {};
-
+
public:
- /**
- * Returns reference to array containing addresses of forward address choices.
- * Index starts from zero.
- * @since Series 60 3.2
- * @param none
- * @return array containing forward address choices
+ /**
+ * Returns reference to array containing addresses of forward address choices.
+ * Index starts from zero.
+ * @since Series 60 3.2
+ * @param none
+ * @return array containing forward address choices
* @leave KErrNotReady Call is not in forwarding state
* @leave KErrNotSupported If call is not mobile originated
* @leave system error code
* @pre Call state is MCCECallObserver::ECCEStateForwarding and call type is MO
* @pre Call MCCECallObserver::EVoIPEventMultipleChoices event is received
- */
- virtual const CDesC8Array& GetForwardAddressChoicesL() = 0;
+ */
+ virtual const CDesC8Array& GetForwardAddressChoicesL() = 0;
- /**
- * Forward call to selected address at given index in array received from GetForwardAddressChoicesL
- * @since Series 60 3.2
- * @param aIndex index in the address where the call is to be forwarded.
- * Index starts from zero.
- * @return none
- * @leave KErrArgument Index is not in array
+ /**
+ * Forward call to selected address at given index in array received from GetForwardAddressChoicesL
+ * @since Series 60 3.2
+ * @param aIndex index in the address where the call is to be forwarded.
+ * Index starts from zero.
+ * @return none
+ * @leave KErrArgument Index is not in array
* @leave KErrNotReady Call is not in forwarding state
* @leave KErrNotSupported If call is not mobile originated
* @pre Call state is MCCECallObserver::ECCEStateForwarding and call type is MO
- */
- virtual void ForwardToAddressL( const TInt aIndex ) = 0;
- };
+ */
+ virtual void ForwardToAddressL( const TInt aIndex ) = 0;
+ };
#endif // MCCEFORWARDINTERFACE_H
--- a/phonesrv_plat/converged_call_engine_api/inc/mcceobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_engine_api/inc/mcceobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -60,7 +60,7 @@
* @param aConferenceCall Created conference
* @return none
*/
- virtual void ConferenceCallCreated( MCCEConferenceCall& aConferenceCall ) = 0;
+ virtual void ConferenceCallCreated( MCCEConferenceCall& aConferenceCall ) = 0;
/**
* Notify data port information for video telephony. Information comes via CS only.
@@ -68,7 +68,7 @@
* @param Dataport information.
* @return none
*/
- virtual void DataPortName( TName& aPortName ) = 0;
+ virtual void DataPortName( TName& aPortName ) = 0;
};
#endif // MCCEOBSERVER_H
--- a/phonesrv_plat/converged_call_engine_api/inc/mccessobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_engine_api/inc/mccessobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -40,43 +40,43 @@
enum TCCESsBarringEvent
{
/** Incoming call is barred. (DoCoMo) */
- ECCESsIncomingCallBarred,
- /** Anonymous call barring. */
- ECCESsAnonymousCallBarred,
- /** Outgoing call barring */
- ECCESsOutgoingCallBarred,
- /** Barring active notification. */
- ECCESsActiveBarrings
- };
+ ECCESsIncomingCallBarred,
+ /** Anonymous call barring. */
+ ECCESsAnonymousCallBarred,
+ /** Outgoing call barring */
+ ECCESsOutgoingCallBarred,
+ /** Barring active notification. */
+ ECCESsActiveBarrings
+ };
/** CLI (Call Line Information) related event. */
enum TCCESsCLIEvent
{
/** Temporary CLIR suppression was unsuccessful */
- ECCESsTempClirSuppressUnsuccessful,
+ ECCESsTempClirSuppressUnsuccessful,
/** Temporary CLIR activation was unsuccessful*/
- ECCESsTempClirActivationUnsuccessful
+ ECCESsTempClirActivationUnsuccessful
};
/** Call forward related events that are not call related to an existing call. */
enum TCCESsCallForwardEvent
{
/** Incoming call is forwarded */
- ECCESsIncCallIsForw,
- /** Incoming call was forwarded because of user own settings. */
- ECCESsIncCallForwToC,
+ ECCESsIncCallIsForw,
+ /** Incoming call was forwarded because of user own settings. */
+ ECCESsIncCallForwToC,
/** Outgoing call was forwarded because of user own settings. */
- ECCESsOutCallForwToC,
+ ECCESsOutCallForwToC,
/** Forward unconditional mode active */
- ECCESsForwardUnconditionalModeActive,
- /** Forward unconditional mode deactive */
- ECCESsForwardUnconditionalModeNotActive,
- /** Forward conditional mode active */
- ECCESsForwardConditionallyModeActive,
- /** Forward conditional mode deactive */
- ECCESsForwardConditionallyModeNotActive,
- /** Remote call waiting. TODO rename TCCESsCallForwardEvent to TCCESsCallEvent*/
- ESsCallWaiting
+ ECCESsForwardUnconditionalModeActive,
+ /** Forward unconditional mode deactive */
+ ECCESsForwardUnconditionalModeNotActive,
+ /** Forward conditional mode active */
+ ECCESsForwardConditionallyModeActive,
+ /** Forward conditional mode deactive */
+ ECCESsForwardConditionallyModeNotActive,
+ /** Remote call waiting. TODO rename TCCESsCallForwardEvent to TCCESsCallEvent*/
+ ESsCallWaiting
};
/** Closed user group (Cug) */
@@ -94,27 +94,27 @@
* @return none
* @since S60 v3.2
*/
- virtual void BarringEventOccurred( const MCCESsObserver::TCCESsBarringEvent aBarringEvent ) = 0;
-
+ virtual void BarringEventOccurred( const MCCESsObserver::TCCESsBarringEvent aBarringEvent ) = 0;
+
/**
* Supplementary service call line identification event occurred.
* @param aCallLineEvent Event that occurred.
* @return none
* @since S60 v3.2
*/
- virtual void CLIEventOccurred( const MCCESsObserver::TCCESsCLIEvent aCallLineEvent ) = 0;
-
+ virtual void CLIEventOccurred( const MCCESsObserver::TCCESsCLIEvent aCallLineEvent ) = 0;
+
/**
* Supplementary service related call forward event occurred.
* @param aForwardMode Forward mode
- * @param aRemoteAddress Remote address.
+ * @param aRemoteAddress Remote address.
* @return none
* @since S60 v3.2
*/
- virtual void CallForwardEventOccurred(
- const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent,
- const TDesC& aRemoteAddress ) = 0;
+ virtual void CallForwardEventOccurred(
+ const MCCESsObserver::TCCESsCallForwardEvent aCallForwardEvent,
+ const TDesC& aRemoteAddress ) = 0;
/**
* Supplementary service related active closed user group indications.
@@ -122,16 +122,16 @@
* @return none
* @since S60 v3.2
*/
- virtual void CallCugEventOccurred( const MCCESsObserver::TCCESsCugEvent aCugEvent ) = 0;
+ virtual void CallCugEventOccurred( const MCCESsObserver::TCCESsCugEvent aCugEvent ) = 0;
/**
* Notifies active ALS line. CS plugin will notify this every time line changes
- * and at startup.
+ * and at startup.
* @param aLine Used ALS line.
* @return none
* @since S60 v3.2
*/
- virtual void NotifyCurrentActiveALSLine( TInt aLine ) = 0;
+ virtual void NotifyCurrentActiveALSLine( TInt aLine ) = 0;
};
--- a/phonesrv_plat/converged_call_engine_api/inc/mccetransferinterface.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_engine_api/inc/mccetransferinterface.h Fri Mar 19 09:40:14 2010 +0200
@@ -29,72 +29,72 @@
* @since S60 3.2
*/
class MCCETransferInterface
- {
+ {
protected:
- /**
- * Protected destructor. Object cannot be deleted from client.
- * @since S60 3.2
- */
- virtual ~MCCETransferInterface() {};
-
+ /**
+ * Protected destructor. Object cannot be deleted from client.
+ * @since S60 3.2
+ */
+ virtual ~MCCETransferInterface() {};
+
public:
- /**
- * Attended transfer to given address.
- * Actual result like status, events and errors come via MCCECallObserver class.
- * Afterwards both calls will be disconnected from CCE side.
- * @param aTransferTarget Transfer target address. Always takes active call, address is not used
- * at the moment!
- * @return KErrArgument transfer address was illegal.
- * @return KErrNotFound existing active call was not found with given address.
- * @return KErrNotReady if this call is not on-hold state and the other in connected state
- * @return KErrNotSupported Current plug-in does not support transfer functionality.
- * @pre Two calls exist. This call is in state MCCECallObserver::ECCEStateHold and the other in
- * MCCECallObserver::ECCEStateConnected
- * @since S60 3.2
- */
- virtual TInt AttendedTransfer( const TDesC& aTransferTarget ) = 0;
+ /**
+ * Attended transfer to given address.
+ * Actual result like status, events and errors come via MCCECallObserver class.
+ * Afterwards both calls will be disconnected from CCE side.
+ * @param aTransferTarget Transfer target address. Always takes active call, address is not used
+ * at the moment!
+ * @return KErrArgument transfer address was illegal.
+ * @return KErrNotFound existing active call was not found with given address.
+ * @return KErrNotReady if this call is not on-hold state and the other in connected state
+ * @return KErrNotSupported Current plug-in does not support transfer functionality.
+ * @pre Two calls exist. This call is in state MCCECallObserver::ECCEStateHold and the other in
+ * MCCECallObserver::ECCEStateConnected
+ * @since S60 3.2
+ */
+ virtual TInt AttendedTransfer( const TDesC& aTransferTarget ) = 0;
- /**
- * Unattended transfer to given address. Call is requested to be transferred to given address.
- * Afterwards call will be disconnected from CCE side. If transfer fails a new incoming call
- * will be received to reconnect to recipient. Reconnected call is initiated from recipient end.
- * Actual result like status, events and errors come via MCCECallObserver class.
- * This is not used for CS.
- * @since S60 3.2
- * @param aTransferTarget Address of the target
+ /**
+ * Unattended transfer to given address. Call is requested to be transferred to given address.
+ * Afterwards call will be disconnected from CCE side. If transfer fails a new incoming call
+ * will be received to reconnect to recipient. Reconnected call is initiated from recipient end.
+ * Actual result like status, events and errors come via MCCECallObserver class.
+ * This is not used for CS.
+ * @since S60 3.2
+ * @param aTransferTarget Address of the target
* @return KErrNone if request was started succesfully.
* @return KErrNotSupported Current plug-in does not support transfer functionality.
* @return KErrNotReady if call is not in connected or on-hold state.
* @return KErrArgument transfer address was illegal.
* @pre Call state is MCCECallObserver::ECCPStateConnected or MCCECallObserver::ECCEStateHold
- */
- virtual TInt UnattendedTransfer( const TDesC& aTransferTarget ) = 0;
+ */
+ virtual TInt UnattendedTransfer( const TDesC& aTransferTarget ) = 0;
- /**
- * Accept incoming unattended transfer request from the call remote party.
- * @since Series 60 3.2
- * @param aAccept Boolean value is transfer accepted or not.
+ /**
+ * Accept incoming unattended transfer request from the call remote party.
+ * @since Series 60 3.2
+ * @param aAccept Boolean value is transfer accepted or not.
* @return KErrNotSupported Current plug-in does not support transfer functionality.
* @return KErrNone if request was started succesfully.
* @return KErrNotReady if call is not in transferring state.
* @pre Call state is MCCECallObserver::ECCEStateTransferring
- */
- virtual TInt AcceptTransfer( const TBool aAccept ) = 0;
-
- /**
+ */
+ virtual TInt AcceptTransfer( const TBool aAccept ) = 0;
+
+ /**
* NOTE: Will be removed! MCCECallObserver::HandleTransfer contains remote party already.
* CCE will map the recipient in openNewCallL to pre-existing one
* CCECallCall::EventOccurred(ECCERemoteTransferring).
* The new recipient of the call can be fetched via this method.
- * @since Series 60 3.2
- * @param none
- * @return New recipient for the call after transfer
- */
- virtual const TDesC& TransferTarget() const = 0;
-
- };
+ * @since Series 60 3.2
+ * @param none
+ * @return New recipient for the call after transfer
+ */
+ virtual const TDesC& TransferTarget() const = 0;
+
+ };
#endif // MCCETRANSFERINTERFACE_H
--- a/phonesrv_plat/converged_call_provider_api/inc/cconvergedcallprovider.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/cconvergedcallprovider.h Fri Mar 19 09:40:14 2010 +0200
@@ -103,7 +103,7 @@
*/
virtual void InitializeL( const TUint32 aServiceId,
const MCCPObserver& aObserver,
- const MCCPSsObserver& aSsObserver );
+ const MCCPSsObserver& aSsObserver );
/**
* Initialize CConvergedCallProvider after it is created with NewL.
@@ -113,7 +113,7 @@
* @leave KErrAlreadyExists If this method has already been called.
*/
virtual void InitializeL( const MCCPObserver& aObserver,
- const MCCPSsObserver& aSsObserver ) = 0;
+ const MCCPSsObserver& aSsObserver ) = 0;
/**
* Creates a new call.
@@ -133,8 +133,8 @@
* @pre Initialize has been called.
*/
virtual MCCPCall* NewCallL( const CCCPCallParameters& aParameters,
- const TDesC& aRecipient,
- const MCCPCallObserver& aObserver ) = 0;
+ const TDesC& aRecipient,
+ const MCCPCallObserver& aObserver ) = 0;
/**
* Releases all bindings to call and deletes it.
* This will be called by CCE to free all the resources reserved for the call.
@@ -161,8 +161,8 @@
* Can be KNullDesC. Plug-in will use the given address and/or use its own information.
* @param aObserver Observer for the emergency call.
* @return MCCPEmergencyCall Created emergency call.
- * @leave plug-in does not support emergency calls.
- * @leave In case of failure system error code.
+ * @leave plug-in does not support emergency calls.
+ * @leave In case of failure system error code.
* @pre Emergency call object is created.
*/
virtual MCCPEmergencyCall* NewEmergencyCallL( const TUint32 aServiceId,
@@ -196,11 +196,11 @@
* @leave KErrNotReady Temporarily not able to create the requested conference.
* @leave KErrNoMemory Memory error.
* @leave KErrArgument Invalid service id.
- * @leave plug-in does not support conference calls.
+ * @leave plug-in does not support conference calls.
* @pre Initialize has been called.
*/
virtual MCCPConferenceCall* NewConferenceL( const TUint32 aServiceId,
- const MCCPConferenceCallObserver& aObserver ) = 0;
+ const MCCPConferenceCallObserver& aObserver ) = 0;
/**
* Releases all bindings to conference call. CCE will call this after receiving
@@ -233,50 +233,50 @@
virtual TUint32 Caps() const = 0;
/**
- * Request DTMF provider for dtmf functionality extension. Only one instance exist. Must return the
- * already created object if called again after initial creation.
+ * Request DTMF provider for dtmf functionality extension. Only one instance exist. Must return the
+ * already created object if called again after initial creation.
* @since Series 60 3.2
* @param aObserver Observer for DTMF events.
- * @return Pointer to MCCPDTMFProvider if plug-in support dtmf, returns NULL if not supported.
- * In not supported return NULL but do not leave.
+ * @return Pointer to MCCPDTMFProvider if plug-in support dtmf, returns NULL if not supported.
+ * In not supported return NULL but do not leave.
* @pre Initialize has been called.
* @leave KErrNoMemory Memory allocation error.
* @leave Other general system error.
- */
- virtual MCCPDTMFProvider* DTMFProviderL( const MCCPDTMFObserver& aObserver ) = 0;
+ */
+ virtual MCCPDTMFProvider* DTMFProviderL( const MCCPDTMFObserver& aObserver ) = 0;
- /**
- * Request extension provider for custom command handling features. Must return the
- * already created object if called again after initial creation.
- * @since Series 60 3.2
+ /**
+ * Request extension provider for custom command handling features. Must return the
+ * already created object if called again after initial creation.
+ * @since Series 60 3.2
* @param aObserver observer for extension(custom) events.
- * @return Pointer to MCCPExtensionProvider if plug-in support extensions, returns NULL if not supported.
- * In not supported return NULL but do not leave.
+ * @return Pointer to MCCPExtensionProvider if plug-in support extensions, returns NULL if not supported.
+ * In not supported return NULL but do not leave.
* @pre Initialize has been called.
* @leave KErrNoMemory Memory allocation error.
* @leave Other general system error.
- */
- virtual MCCPExtensionProvider* ExtensionProviderL( const MCCPExtensionObserver& aObserver ) = 0;
+ */
+ virtual MCCPExtensionProvider* ExtensionProviderL( const MCCPExtensionObserver& aObserver ) = 0;
- /**
- * This method gets the lifetime of the MS. The lifetime information
- * includes the manufacturing date of the MS and the total amount of airtime use,
- * from the manufacturing date until the call to this method. Calling this method
- * does not reset any data. This is used only CS, other plug-ins may ignore this method.
- * @since S60 3.2
- * @param aLifeTimeInfo Life time information
- * @return Get succeeded or not. Default if not implemeted return false.
- */
- virtual TBool GetLifeTime( TDes8& /*aLifeTimeInfo*/ ) { return EFalse; };
+ /**
+ * This method gets the lifetime of the MS. The lifetime information
+ * includes the manufacturing date of the MS and the total amount of airtime use,
+ * from the manufacturing date until the call to this method. Calling this method
+ * does not reset any data. This is used only CS, other plug-ins may ignore this method.
+ * @since S60 3.2
+ * @param aLifeTimeInfo Life time information
+ * @return Get succeeded or not. Default if not implemeted return false.
+ */
+ virtual TBool GetLifeTime( TDes8& /*aLifeTimeInfo*/ ) { return EFalse; };
- /**
- * This method gets cs specific information from cs-plugin. This is used only CS,
- * other plug-ins may ignore this method.
- * @since S60 3.2
- * @param aCSInfo CS specific information from cs-plugin.
- * @return Get succeeded or not. Default if not implemeted return false.
- */
- virtual TBool GetCSInfo( CSInfo& /*aCSInfo*/ ) { return EFalse; };
+ /**
+ * This method gets cs specific information from cs-plugin. This is used only CS,
+ * other plug-ins may ignore this method.
+ * @since S60 3.2
+ * @param aCSInfo CS specific information from cs-plugin.
+ * @return Get succeeded or not. Default if not implemeted return false.
+ */
+ virtual TBool GetCSInfo( CSInfo& /*aCSInfo*/ ) { return EFalse; };
private: // Data
--- a/phonesrv_plat/converged_call_provider_api/inc/cconvergedcallprovider.inl Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/cconvergedcallprovider.inl Fri Mar 19 09:40:14 2010 +0200
@@ -75,9 +75,9 @@
// -----------------------------------------------------------------------------
//
inline void CConvergedCallProvider::ListImplementationsL( RImplInfoPtrArray& aImplArray )
- {
+ {
REComSession::ListImplementationsL( KConvergedCallProviderUid, aImplArray );
- }
+ }
// -----------------------------------------------------------------------------
// CCCPInterface::InitializeL
@@ -86,7 +86,7 @@
//
inline void CConvergedCallProvider::InitializeL( const TUint32 /*aServiceId*/,
const MCCPObserver& aObserver,
- const MCCPSsObserver& aSsObserver )
+ const MCCPSsObserver& aSsObserver )
{
InitializeL( aObserver, aSsObserver );
}
--- a/phonesrv_plat/converged_call_provider_api/inc/mccpcallobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccpcallobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -33,28 +33,28 @@
class MCCPCallObserver
{
public:
- /** Call states */
- enum TCCPCallState
- {
- /** Indicates initial call state after call creation. Basic state. */
- ECCPStateIdle,
- /** Indicates that the MT call is ringing but not answered yet by the local user. Basic state.*/
- ECCPStateRinging,
- /** MO Call: the network notifies to the MS that the remote party is now ringing. Basic state.*/
- ECCPStateConnecting,
- /** Indicates that call is connected and active. Basic state.*/
- ECCPStateConnected,
- /** Indicates that call is disconnecting. Basic state.*/
- ECCPStateDisconnecting,
- /** Indicates that the call is connected but on hold. Basic state.*/
- ECCPStateHold,
+ /** Call states */
+ enum TCCPCallState
+ {
+ /** Indicates initial call state after call creation. Basic state. */
+ ECCPStateIdle,
+ /** Indicates that the MT call is ringing but not answered yet by the local user. Basic state.*/
+ ECCPStateRinging,
+ /** MO Call: the network notifies to the MS that the remote party is now ringing. Basic state.*/
+ ECCPStateConnecting,
+ /** Indicates that call is connected and active. Basic state.*/
+ ECCPStateConnected,
+ /** Indicates that call is disconnecting. Basic state.*/
+ ECCPStateDisconnecting,
+ /** Indicates that the call is connected but on hold. Basic state.*/
+ ECCPStateHold,
- /** Call is transfering. Optional state.*/
- ECCPStateTransferring,
- /** MO call is being forwarded at receiver end. Optional state. */
- ECCPStateForwarding,
- /** Call is queued locally. Optional state. */
- ECCPStateQueued,
+ /** Call is transfering. Optional state.*/
+ ECCPStateTransferring,
+ /** MO call is being forwarded at receiver end. Optional state. */
+ ECCPStateForwarding,
+ /** Call is queued locally. Optional state. */
+ ECCPStateQueued,
/** Indicates that the local user has answered the MT call but the network has not
acknowledged the call connection yet. Must be sent after MCCPCall::Answer method has been completed. */
@@ -62,189 +62,189 @@
/** Indicates that the call is dialing. Must be sent after MCCPCall::Dial method has been completed. */
ECCPStateDialling,
-
- };
+
+ };
- /** Describes the possible call events. */
- enum TCCPCallEvent
- {
- /** Call has been placed on hold as a result of a local action. */
- ECCPLocalHold,
- /** Call has been placed on hold by the remote connected party. */
- ECCPRemoteHold,
- /** Call has been resumed as a result of a local action. */
- ECCPLocalResume,
- /** Call has been resumed by the remote connected party. */
- ECCPRemoteResume,
- /** Outgoing call has been barred by the local party. */
- ECCPLocalBarred,
- /** Outgoing call has been barred by the remote party. */
- ECCPRemoteBarred,
- /** Call is waiting at the remote end. Obsolote, use supplementary service ESsCallWaiting */
- ECCPRemoteWaiting,
- /** Call has been terminated by the remote party. */
- ECCPRemoteTerminated,
- /** Call is in queue */
- ECCPQueued,
+ /** Describes the possible call events. */
+ enum TCCPCallEvent
+ {
+ /** Call has been placed on hold as a result of a local action. */
+ ECCPLocalHold,
+ /** Call has been placed on hold by the remote connected party. */
+ ECCPRemoteHold,
+ /** Call has been resumed as a result of a local action. */
+ ECCPLocalResume,
+ /** Call has been resumed by the remote connected party. */
+ ECCPRemoteResume,
+ /** Outgoing call has been barred by the local party. */
+ ECCPLocalBarred,
+ /** Outgoing call has been barred by the remote party. */
+ ECCPRemoteBarred,
+ /** Call is waiting at the remote end. Obsolote, use supplementary service ESsCallWaiting */
+ ECCPRemoteWaiting,
+ /** Call has been terminated by the remote party. */
+ ECCPRemoteTerminated,
+ /** Call is in queue */
+ ECCPQueued,
- /** VoIP specific */
- ECCCSPEarlyMediaStarted,
+ /** VoIP specific */
+ ECCCSPEarlyMediaStarted,
- /** Call is secure */
- ECCPSecureCall,
- /** Call is not secure */
- ECCPNotSecureCall,
-
- /** VoIP specific
- User has called with address containing "SIPS:" prefix. This event notifies that
- secure call signaling is not possible. **/
- ECCPNotSecureSessionWithSips,
+ /** Call is secure */
+ ECCPSecureCall,
+ /** Call is not secure */
+ ECCPNotSecureCall,
+
+ /** VoIP specific
+ User has called with address containing "SIPS:" prefix. This event notifies that
+ secure call signaling is not possible. **/
+ ECCPNotSecureSessionWithSips,
- /** Call has been added to remote conference call at remote end */
- ECCPRemoteConferenceCreate,
-
- ////////////////////////////
- // CS call specific events
- ///////////////////////////
-
- /** CS call specific event */
- ECCPCSDataPortLoaned,
- /** CS call specific event */
- ECCPCSDataPortRecovered,
+ /** Call has been added to remote conference call at remote end */
+ ECCPRemoteConferenceCreate,
+
+ ////////////////////////////
+ // CS call specific events
+ ///////////////////////////
+
+ /** CS call specific event */
+ ECCPCSDataPortLoaned,
+ /** CS call specific event */
+ ECCPCSDataPortRecovered,
- /** One or more of following information has been changed
+ /** One or more of following information has been changed
* - Remote party name
* - Remote party number/address
* - Call parameters ( ie. service id )
- */
- ECCPNotifyRemotePartyInfoChange,
+ */
+ ECCPNotifyRemotePartyInfoChange,
/** Call secure status cannot be determined */
ECCPSecureNotSpecified
- };
+ };
- /** Flags indicating all the possible call control capabilities. */
- enum TCCPCallControlCaps
- {
- /** Call supports data calls. */
- ECCPCapsData = 0x00000001,
- /** Call supports fax calls. */
- ECCPCapsFax = 0x00000002,
- /** Call supports voice calls. */
- ECCPCapsVoice = 0x00000004,
- /** The Dial request is currently a valid action. */
- ECCPCapsDial = 0x00000008,
- /** The Connect request is currently a valid action. */
- ECCPCapsConnect = 0x00000010,
- /** The Hang Up request is currently a valid action. */
- ECCPCapsHangUp = 0x00000020,
- /** The Answer request is currently a valid action. */
- ECCPCapsAnswer = 0x00000040,
- /** The Loan Data Port request is currently a valid action. */
- ECCPCapsLoanDataPort = 0x00000080,
- /** The Recover Data Port request is currently a valid action. */
- ECCPCapsRecoverDataPort= 0x00000100,
- /** Indicates that this call can be put on hold. This implies that the call is currently
- active and that there is no other held call. */
- ECCPCapsHold = 0x00000200,
- /** Indicates that this call can be resumed. This implies that the call is currently
- on hold and that there is no other active call. */
- ECCPCapsResume = 0x00000400,
- /** Indicates that this call's state can be swapped to the opposite state. This
- implies that this call is either active or held. There may be another call
- in the opposite state and if this is the case then both calls will be simultaneously
- swapped to their opposite state. */
- ECCPCapsSwap = 0x00000800,
- /** Indicates that this incoming call can be deflected to another destination.*/
- ECCPCapsDeflect = 0x00001000,
- /** Indicates that this call can be transferred to the remote party of another call.
- For this capability to be set there must be one active call and one held or
- dialing call.*/
- ECCPCapsTransfer = 0x00002000,
- /** Indicates that this call can be joined either to another single call to form
- a conference call or to an existing conference call.*/
- ECCPCapsJoin = 0x00004000,
- /** Indicates that this call (within a conference call) can go into One to One mode.
- This action would put the rest of the conference call on hold. */
- ECCPCapsOneToOne = 0x00008000,
- /** Indicates that the user can activate a CCBS request on this failed call set-up.*/
- ECCPCapsActivateCCBS = 0x00010000,
- /** Indicates that this call is part of an alternating call and the client can call
- SwitchAlternatingCall() on this call in order to switch it to its other mode.*/
- ECCPCapsSwitchAlternatingCall = 0x00020000,
- /** Indicates that this call can use/create a new bearer. This means that multiple
- calls (multicall) can be active at the same time using no more that 7 bearers
- simultaneously. The other option is to swap with an active call, therefore
- it becomes held and shares the same bearer.*/
- ECCPCapsMulticall = 0x00040000,
- /** Indicates that this call is an packet switched call */
- ECCPCapsPSCall = 0x00080000,
- /** Indicates that this call supports unattended transfer method and that this call
- is currently active */
- ECCPCapsUnattendedTransfer = 0x00100000,
- /** Indicates that a conference call can be created. */
- KCCPCapsCreate = 0x00200000
- };
+ /** Flags indicating all the possible call control capabilities. */
+ enum TCCPCallControlCaps
+ {
+ /** Call supports data calls. */
+ ECCPCapsData = 0x00000001,
+ /** Call supports fax calls. */
+ ECCPCapsFax = 0x00000002,
+ /** Call supports voice calls. */
+ ECCPCapsVoice = 0x00000004,
+ /** The Dial request is currently a valid action. */
+ ECCPCapsDial = 0x00000008,
+ /** The Connect request is currently a valid action. */
+ ECCPCapsConnect = 0x00000010,
+ /** The Hang Up request is currently a valid action. */
+ ECCPCapsHangUp = 0x00000020,
+ /** The Answer request is currently a valid action. */
+ ECCPCapsAnswer = 0x00000040,
+ /** The Loan Data Port request is currently a valid action. */
+ ECCPCapsLoanDataPort = 0x00000080,
+ /** The Recover Data Port request is currently a valid action. */
+ ECCPCapsRecoverDataPort= 0x00000100,
+ /** Indicates that this call can be put on hold. This implies that the call is currently
+ active and that there is no other held call. */
+ ECCPCapsHold = 0x00000200,
+ /** Indicates that this call can be resumed. This implies that the call is currently
+ on hold and that there is no other active call. */
+ ECCPCapsResume = 0x00000400,
+ /** Indicates that this call's state can be swapped to the opposite state. This
+ implies that this call is either active or held. There may be another call
+ in the opposite state and if this is the case then both calls will be simultaneously
+ swapped to their opposite state. */
+ ECCPCapsSwap = 0x00000800,
+ /** Indicates that this incoming call can be deflected to another destination.*/
+ ECCPCapsDeflect = 0x00001000,
+ /** Indicates that this call can be transferred to the remote party of another call.
+ For this capability to be set there must be one active call and one held or
+ dialing call.*/
+ ECCPCapsTransfer = 0x00002000,
+ /** Indicates that this call can be joined either to another single call to form
+ a conference call or to an existing conference call.*/
+ ECCPCapsJoin = 0x00004000,
+ /** Indicates that this call (within a conference call) can go into One to One mode.
+ This action would put the rest of the conference call on hold. */
+ ECCPCapsOneToOne = 0x00008000,
+ /** Indicates that the user can activate a CCBS request on this failed call set-up.*/
+ ECCPCapsActivateCCBS = 0x00010000,
+ /** Indicates that this call is part of an alternating call and the client can call
+ SwitchAlternatingCall() on this call in order to switch it to its other mode.*/
+ ECCPCapsSwitchAlternatingCall = 0x00020000,
+ /** Indicates that this call can use/create a new bearer. This means that multiple
+ calls (multicall) can be active at the same time using no more that 7 bearers
+ simultaneously. The other option is to swap with an active call, therefore
+ it becomes held and shares the same bearer.*/
+ ECCPCapsMulticall = 0x00040000,
+ /** Indicates that this call is an packet switched call */
+ ECCPCapsPSCall = 0x00080000,
+ /** Indicates that this call supports unattended transfer method and that this call
+ is currently active */
+ ECCPCapsUnattendedTransfer = 0x00100000,
+ /** Indicates that a conference call can be created. */
+ KCCPCapsCreate = 0x00200000
+ };
protected:
- /**
- * Protects the observer being deleted through the observer interface
- * @since S60 3.2
- */
- virtual inline ~MCCPCallObserver() {};
+ /**
+ * Protects the observer being deleted through the observer interface
+ * @since S60 3.2
+ */
+ virtual inline ~MCCPCallObserver() {};
public:
- /**
- * An error has occurred concerning a specific call.
- * @since S60 3.2
- * @param aError Error code.
- * @param aCall Pointer to used ccp call, can be NULL in emergency call
- * @return none
- */
- virtual void ErrorOccurred( const TCCPError aError, MCCPCall* aCall ) = 0;
+ /**
+ * An error has occurred concerning a specific call.
+ * @since S60 3.2
+ * @param aError Error code.
+ * @param aCall Pointer to used ccp call, can be NULL in emergency call
+ * @return none
+ */
+ virtual void ErrorOccurred( const TCCPError aError, MCCPCall* aCall ) = 0;
- /**
- * The state of the call has changed.
- * @since S60 3.2
- * @param aState Call state.
- * @param aCall Pointer to used ccp call, can be NULL in emergency call
- * @return none
- */
- virtual void CallStateChanged( const MCCPCallObserver::TCCPCallState aState,
- MCCPCall* aCall) = 0;
+ /**
+ * The state of the call has changed.
+ * @since S60 3.2
+ * @param aState Call state.
+ * @param aCall Pointer to used ccp call, can be NULL in emergency call
+ * @return none
+ */
+ virtual void CallStateChanged( const MCCPCallObserver::TCCPCallState aState,
+ MCCPCall* aCall) = 0;
- /**
- * The state of the call has changed with inband tone, meaning network is playing
- * the tone relating to the state.
- * @since S60 3.2
- * @param aState Call state.
- * @param aCall Pointer to used ccp call, can be NULL in emergency call
- * @return none
- */
- virtual void CallStateChangedWithInband( const MCCPCallObserver::TCCPCallState aState,
- MCCPCall* aCall ) = 0;
+ /**
+ * The state of the call has changed with inband tone, meaning network is playing
+ * the tone relating to the state.
+ * @since S60 3.2
+ * @param aState Call state.
+ * @param aCall Pointer to used ccp call, can be NULL in emergency call
+ * @return none
+ */
+ virtual void CallStateChangedWithInband( const MCCPCallObserver::TCCPCallState aState,
+ MCCPCall* aCall ) = 0;
- /**
- * An event has occurred concerning a specific call.
- * @since S60 3.2
- * @param aEvent Occurred event.
- * @param aCall Pointer to used ccp call, can be NULL in emergency call
- * @return none
- */
- virtual void CallEventOccurred( const MCCPCallObserver::TCCPCallEvent aEvent,
- MCCPCall* aCall ) = 0;
+ /**
+ * An event has occurred concerning a specific call.
+ * @since S60 3.2
+ * @param aEvent Occurred event.
+ * @param aCall Pointer to used ccp call, can be NULL in emergency call
+ * @return none
+ */
+ virtual void CallEventOccurred( const MCCPCallObserver::TCCPCallEvent aEvent,
+ MCCPCall* aCall ) = 0;
- /**
- * Notifies changed call capabilities.
- * @since S60 3.2
- * @param aCapsFlags New capabilities for the call
- * @param aCall Pointer to used ccp call, can be NULL in emergency call
- * @return none
- */
- virtual void CallCapsChanged( const TUint32 aCapsFlags,
- MCCPCall* aCall ) = 0;
+ /**
+ * Notifies changed call capabilities.
+ * @since S60 3.2
+ * @param aCapsFlags New capabilities for the call
+ * @param aCall Pointer to used ccp call, can be NULL in emergency call
+ * @return none
+ */
+ virtual void CallCapsChanged( const TUint32 aCapsFlags,
+ MCCPCall* aCall ) = 0;
};
#endif // MCCPCALLOBSERVER_H
--- a/phonesrv_plat/converged_call_provider_api/inc/mccpconferencecall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccpconferencecall.h Fri Mar 19 09:40:14 2010 +0200
@@ -31,7 +31,7 @@
* @since S60 3.2
*/
class MCCPConferenceCall
- {
+ {
protected:
/**
* Protected destructor. Object cannot be deleted from plug-in client (CCE).
@@ -53,8 +53,8 @@
* Ends an ongoing conference call.
* Does not delete the call. Call deletion is requested calling
* CConvergedCallProvider::ReleaseConferenceCall.
- * If the request cannot be started then an error will be returned immediately as return value.
- * In succesfull case KErrNone will be returned and the requested action has been started.
+ * If the request cannot be started then an error will be returned immediately as return value.
+ * In succesfull case KErrNone will be returned and the requested action has been started.
* @param None
* @return KErrNone if request was started succesfully.
* @return KErrAlreadyExists if conference is already in idle state.
@@ -65,8 +65,8 @@
/**
* Puts conference call on hold.
- * If the request cannot be started then an error will be returned immediately as return value.
- * In succesfull case KErrNone will be returned and the requested action has been started.
+ * If the request cannot be started then an error will be returned immediately as return value.
+ * In succesfull case KErrNone will be returned and the requested action has been started.
* @param None
* @return KErrNone if request was started succesfully.
* @return KErrNotReady if conferencel is not in connected state.
@@ -77,8 +77,8 @@
/**
* Resumes previously held conference call.
- * If the request cannot be started then an error will be returned immediately as return value.
- * In succesfull case KErrNone will be returned and the requested action has been started.
+ * If the request cannot be started then an error will be returned immediately as return value.
+ * In succesfull case KErrNone will be returned and the requested action has been started.
* @param None
* @return KErrNone if request was started succesfully.
* @return KErrNotReady if call is not in on-hold state.
@@ -89,8 +89,8 @@
/**
* Swaps a connected conference call between Hold and Resume.
- * If the request cannot be started then an error will be returned immediately as return value.
- * In succesfull case KErrNone will be returned and the requested action has been started.
+ * If the request cannot be started then an error will be returned immediately as return value.
+ * In succesfull case KErrNone will be returned and the requested action has been started.
* @param none
* @return KErrNone if request was started succesfully.
* @return KErrNotReady if call is not in on-hold state or connected state
@@ -100,84 +100,84 @@
*/
virtual TInt Swap() = 0;
- /**
- * Adds a new call to conference call.
- * When plug-in regards the call as added it will notify observer about it
- * with call added notification MCCPConferenceCallObserver::ECCPConferenceCallAdded.
- *
- * @since S60 3.2
- * @param aCall Call to be added to conference.
- * @return None
- * @leave In case of an error system wide error code.
- * @leave KErrAlreadyExists call is already part of conference.
- * @leave KErrNotReady In case conference is not on hold or idle.
- * @pre Conference call state is MCCPConferenceCallObserver::ECCPConferenceHold or
- * MCCPConferenceCallObserver::ECCPConferenceIdle.
- * @post Added call is notified calling MCCPConferenceCallObserver::ConferenceCallEventOccurred.
- * @post If conference becomes active regarding its internal plug-in based logic state is
- * MCCPConferenceCallObserver::ECCPConferenceActive.
- */
- virtual void AddCallL( MCCPCall* aCall ) = 0;
+ /**
+ * Adds a new call to conference call.
+ * When plug-in regards the call as added it will notify observer about it
+ * with call added notification MCCPConferenceCallObserver::ECCPConferenceCallAdded.
+ *
+ * @since S60 3.2
+ * @param aCall Call to be added to conference.
+ * @return None
+ * @leave In case of an error system wide error code.
+ * @leave KErrAlreadyExists call is already part of conference.
+ * @leave KErrNotReady In case conference is not on hold or idle.
+ * @pre Conference call state is MCCPConferenceCallObserver::ECCPConferenceHold or
+ * MCCPConferenceCallObserver::ECCPConferenceIdle.
+ * @post Added call is notified calling MCCPConferenceCallObserver::ConferenceCallEventOccurred.
+ * @post If conference becomes active regarding its internal plug-in based logic state is
+ * MCCPConferenceCallObserver::ECCPConferenceActive.
+ */
+ virtual void AddCallL( MCCPCall* aCall ) = 0;
- /**
- * Removes a call from conference call. Can be called on any state.
- * When plug-in regards the call as removed it will notify observer about it
- * with call removed notification MCCPConferenceCallObserver::ECCPConferenceCallRemoved.
- * @since S60 3.2
- * @param aCall Call to be removed from conference.
- * @return None
- * @leave In case of an error system wide error code.
- * @leave KErrNotFound call was not part of conference.
- * @leave KErrNotReady In case conference is not connected (MCCPConferenceCallObserver::ECCPConferenceActive) state.
- * @pre Conference call state is MCCPConferenceCallObserver::ECCPConferenceActive or
- * MCCPConferenceCallObserver::ECCPConferenceIdle.
- * @post Removed call is notified calling MCCPConferenceCallObserver::ConferenceCallEventOccurred.
- * @post If conference becomes idle regarding its internal plug-in based logic state is
- * MCCPConferenceCallObserver::ECCPConferenceIdle.
- */
- virtual void RemoveCallL( MCCPCall* aCall ) = 0;
-
- /**
- * Returns number of calls active calls in the conference.
- * @since S60 3.2
- * @param None
- * @return aCallCount Number of calls in conference.
- */
- virtual TInt CallCount() const = 0;
+ /**
+ * Removes a call from conference call. Can be called on any state.
+ * When plug-in regards the call as removed it will notify observer about it
+ * with call removed notification MCCPConferenceCallObserver::ECCPConferenceCallRemoved.
+ * @since S60 3.2
+ * @param aCall Call to be removed from conference.
+ * @return None
+ * @leave In case of an error system wide error code.
+ * @leave KErrNotFound call was not part of conference.
+ * @leave KErrNotReady In case conference is not connected (MCCPConferenceCallObserver::ECCPConferenceActive) state.
+ * @pre Conference call state is MCCPConferenceCallObserver::ECCPConferenceActive or
+ * MCCPConferenceCallObserver::ECCPConferenceIdle.
+ * @post Removed call is notified calling MCCPConferenceCallObserver::ConferenceCallEventOccurred.
+ * @post If conference becomes idle regarding its internal plug-in based logic state is
+ * MCCPConferenceCallObserver::ECCPConferenceIdle.
+ */
+ virtual void RemoveCallL( MCCPCall* aCall ) = 0;
/**
- * Switch to a private call with given call that is part of conference. When call is regared
- * as removed from conference it will be notified using
- * MCCPConferenceCallObserver::ECCPConferenceCallRemoved.
- * @since S60 3.2
- * @param aCall Call to go one-to-one with.
- * @return None
- * @leave KErrNotFound call was not part of conference.
- * @post After successful actions conference call state is MCCPConferenceCallObserver::ECCPConferenceHold
- * and private call will become active one.
- */
- virtual void GoOneToOneL( MCCPCall& aCall ) = 0;
+ * Returns number of calls active calls in the conference.
+ * @since S60 3.2
+ * @param None
+ * @return aCallCount Number of calls in conference.
+ */
+ virtual TInt CallCount() const = 0;
/**
- * Add all current calls in the plug-in to conference. Each succesfully added call will
- * be separately notified using MCCPConferenceCallObserver::ECCPConferenceCallAdded.
- * If call is not added to conference it is not notified and can be regareded as not
- * part of conference
- * @since S60 3.2
- * @param None
- * @return None
- * @leave In case of an error system wide error code.
- */
- virtual void CurrentCallsToConferenceL() = 0;
-
+ * Switch to a private call with given call that is part of conference. When call is regared
+ * as removed from conference it will be notified using
+ * MCCPConferenceCallObserver::ECCPConferenceCallRemoved.
+ * @since S60 3.2
+ * @param aCall Call to go one-to-one with.
+ * @return None
+ * @leave KErrNotFound call was not part of conference.
+ * @post After successful actions conference call state is MCCPConferenceCallObserver::ECCPConferenceHold
+ * and private call will become active one.
+ */
+ virtual void GoOneToOneL( MCCPCall& aCall ) = 0;
+
+ /**
+ * Add all current calls in the plug-in to conference. Each succesfully added call will
+ * be separately notified using MCCPConferenceCallObserver::ECCPConferenceCallAdded.
+ * If call is not added to conference it is not notified and can be regareded as not
+ * part of conference
+ * @since S60 3.2
+ * @param None
+ * @return None
+ * @leave In case of an error system wide error code.
+ */
+ virtual void CurrentCallsToConferenceL() = 0;
+
/**
* Gets conference participants
- * @since S60 3.2
- * @param aCallArray Reference to call array
+ * @since S60 3.2
+ * @param aCallArray Reference to call array
* @return Error code
- */
- virtual TInt GetCallArray( RPointerArray<MCCPCall>& aCallArray ) = 0;
-
+ */
+ virtual TInt GetCallArray( RPointerArray<MCCPCall>& aCallArray ) = 0;
+
/**
* Add an observer for conference call related events.
* Currently CCE will set only one observer.
@@ -197,7 +197,7 @@
* @return KErrNotFound if observer was not found.
*/
virtual TInt RemoveObserver( const MCCPConferenceCallObserver& aObserver ) = 0;
- };
+ };
#endif // MCCPCONFERENCECALL_H
--- a/phonesrv_plat/converged_call_provider_api/inc/mccpconferencecallobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccpconferencecallobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -115,8 +115,8 @@
* @param aCaps New capabilities for the conference call.
* @return none
*/
- virtual void ConferenceCallCapsChanged(
- const MCCPConferenceCallObserver::TCCPConferenceCallCaps aCaps ) = 0;
+ virtual void ConferenceCallCapsChanged(
+ const MCCPConferenceCallObserver::TCCPConferenceCallCaps aCaps ) = 0;
/**
* An error has occurred concerning a conference call.
--- a/phonesrv_plat/converged_call_provider_api/inc/mccpcscall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccpcscall.h Fri Mar 19 09:40:14 2010 +0200
@@ -30,57 +30,57 @@
*/
class MCCPCSCall : public MCCPCall
- {
+ {
public:
/**
- * Starts dialing to recipient
- * @since S60 3.2
- * @param aCallParams The call parameters used by the TSY (a TCallParamsPckg object)
+ * Starts dialing to recipient
+ * @since S60 3.2
+ * @param aCallParams The call parameters used by the TSY (a TCallParamsPckg object)
* @return KErrNone if request was started succesfully.
* @return KErrNotReady if call is not in idle state.
* @return KErrNotSupported If call is not mobile originated.
* @pre Call state is MCCPCallObserver::ECCPStateIdle and call type is MO.
* @since S60 3.2
- */
- virtual TInt Dial( const TDesC8& aCallParams ) = 0;
+ */
+ virtual TInt Dial( const TDesC8& aCallParams ) = 0;
- /**
- * Instruct to do no FDN checking when dialling.
- * Needs to be called before every dial for each call separately.
- * If this method is not called at all default is to use FDN.
- * Value will be reset to default when call goes back to disconnected state.
- * @since S60 v3.2
- * @param none
- * @return none
- */
- virtual void NoFDNCheck() = 0;
+ /**
+ * Instruct to do no FDN checking when dialling.
+ * Needs to be called before every dial for each call separately.
+ * If this method is not called at all default is to use FDN.
+ * Value will be reset to default when call goes back to disconnected state.
+ * @since S60 v3.2
+ * @param none
+ * @return none
+ */
+ virtual void NoFDNCheck() = 0;
- /**
- * Returns call information
- * @since S60 3.2
- * @param aCallInfo TMobileCallInfoV3
- * @return KErrNone if succesfull, otherwise another system wide error code
- */
- virtual TInt GetMobileCallInfo( TDes8& aCallInfo ) const = 0;
+ /**
+ * Returns call information
+ * @since S60 3.2
+ * @param aCallInfo TMobileCallInfoV3
+ * @return KErrNone if succesfull, otherwise another system wide error code
+ */
+ virtual TInt GetMobileCallInfo( TDes8& aCallInfo ) const = 0;
- /**
- * Switch in the alternating call mode of an alternating call
- * @since S60 3.2
- * @param None
+ /**
+ * Switch in the alternating call mode of an alternating call
+ * @since S60 3.2
+ * @param None
* @return KErrNone or system error code.
- */
- virtual TInt SwitchAlternatingCall() = 0;
+ */
+ virtual TInt SwitchAlternatingCall() = 0;
- /**
- * Gets the calls data call capabilities
- * @since S60 3.2
- * @param aCaps TMobileCallDataCapsV1
- * @return KErrNone if the function member was successful,
- * @return KErrNotSupported if call does not support circuit switched data,
- * @return KErrNotFound if this call is not a data call
- */
- virtual TInt GetMobileDataCallCaps( TDes8& aCaps ) const = 0;
+ /**
+ * Gets the calls data call capabilities
+ * @since S60 3.2
+ * @param aCaps TMobileCallDataCapsV1
+ * @return KErrNone if the function member was successful,
+ * @return KErrNotSupported if call does not support circuit switched data,
+ * @return KErrNotFound if this call is not a data call
+ */
+ virtual TInt GetMobileDataCallCaps( TDes8& aCaps ) const = 0;
/**
* Log dialed number. SAT related, check if dialed number is to be logged or not.
@@ -89,7 +89,7 @@
* @return Log dialed number or not.
*/
virtual TBool LogDialedNumber() const = 0;
- };
+ };
#endif // CCPCSCALL_H
--- a/phonesrv_plat/converged_call_provider_api/inc/mccpcsobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccpcsobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -57,7 +57,7 @@
* @param aConferenceCall Created conference
* @return none
*/
- virtual void ConferenceCallCreated( MCCPConferenceCall& aConferenceCall ) = 0;
+ virtual void ConferenceCallCreated( MCCPConferenceCall& aConferenceCall ) = 0;
/**
* Notify data port information for video telephony.
@@ -65,7 +65,7 @@
* @param aPortName Dataport information.
* @return none
*/
- virtual void DataPortName( TName& aPortName ) = 0;
+ virtual void DataPortName( TName& aPortName ) = 0;
};
#endif // MCCPCSOBSERVER_H
--- a/phonesrv_plat/converged_call_provider_api/inc/mccpdtmfprovider.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccpdtmfprovider.h Fri Mar 19 09:40:14 2010 +0200
@@ -31,63 +31,63 @@
* @since S60 3.2
*/
class MCCPDTMFProvider
- {
+ {
protected:
/**
* Protected destructor. Object cannot be deleted from plug-in client (CCE).
* @since S60 3.2
*/
virtual inline ~MCCPDTMFProvider() {};
-
+
public:
- /**
- * Cancels asynchronous DTMF string sending.
+ /**
+ * Cancels asynchronous DTMF string sending.
* @param none
- * @return KErrNone request was started successfully
- * @return KErrNotFound nothing found to cancel.
- * @since Series 60 3.2
- */
- virtual TInt CancelDtmfStringSending() = 0;
+ * @return KErrNone request was started successfully
+ * @return KErrNotFound nothing found to cancel.
+ * @since Series 60 3.2
+ */
+ virtual TInt CancelDtmfStringSending() = 0;
- /**
- * Starts the transmission of a single DTMF tone across a connected and active call.
- * @since S60 3.2
- * @param aTone tone to be played.
- * @return KErrNone request was started successfully
- * @return KErrArgument if the specified tone contains illegal dtmf character
- * @return in case of an error system wide error code
- */
- virtual TInt StartDtmfTone( const TChar aTone ) = 0;
+ /**
+ * Starts the transmission of a single DTMF tone across a connected and active call.
+ * @since S60 3.2
+ * @param aTone tone to be played.
+ * @return KErrNone request was started successfully
+ * @return KErrArgument if the specified tone contains illegal dtmf character
+ * @return in case of an error system wide error code
+ */
+ virtual TInt StartDtmfTone( const TChar aTone ) = 0;
- /**
- * Stops playing current DTMF tone.
- * @since S60 3.2
+ /**
+ * Stops playing current DTMF tone.
+ * @since S60 3.2
* @param none
- * @return KErrNone request was started successfully
+ * @return KErrNone request was started successfully
* @return KErrNotReady not ready to perform the requested action.
- */
- virtual TInt StopDtmfTone() = 0;
+ */
+ virtual TInt StopDtmfTone() = 0;
- /**
- * Plays DTMF string.
- * @since S60 3.2
- * @param aString String to be played.
- * @return KErrNone request was started successfully
- * @return KErrArgument if the specified string contains illegal dtmf characters
- */
- virtual TInt SendDtmfToneString( const TDesC& aString ) = 0;
+ /**
+ * Plays DTMF string.
+ * @since S60 3.2
+ * @param aString String to be played.
+ * @return KErrNone request was started successfully
+ * @return KErrArgument if the specified string contains illegal dtmf characters
+ */
+ virtual TInt SendDtmfToneString( const TDesC& aString ) = 0;
- /**
- * Continue or cancel sending DTMF string which was stopped with 'w'-character
- * in string.
- * @since S60 3.2
- * @param aContinue ETrue if sending of the DTMF string should continue,
- * EFalse if the rest of the DTMF string is to be discarded.
- * @return KErrNone request was started successfully
- * @return KErrNotFound no send existed which to continue
- */
- virtual TInt ContinueDtmfStringSending( const TBool aContinue ) = 0;
-
+ /**
+ * Continue or cancel sending DTMF string which was stopped with 'w'-character
+ * in string.
+ * @since S60 3.2
+ * @param aContinue ETrue if sending of the DTMF string should continue,
+ * EFalse if the rest of the DTMF string is to be discarded.
+ * @return KErrNone request was started successfully
+ * @return KErrNotFound no send existed which to continue
+ */
+ virtual TInt ContinueDtmfStringSending( const TBool aContinue ) = 0;
+
/**
* Add an observer for DTMF related events.
* Currently CCE will set only one observer.
@@ -107,7 +107,7 @@
*/
virtual TInt RemoveObserver( const MCCPDTMFObserver& aObserver ) = 0;
- };
+ };
#endif // MCCPDTMFPROVIDER_H
--- a/phonesrv_plat/converged_call_provider_api/inc/mccpemergencycall.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccpemergencycall.h Fri Mar 19 09:40:14 2010 +0200
@@ -28,17 +28,17 @@
* @since S60 3.2
*/
class MCCPEmergencyCall
- {
+ {
protected:
/**
* Protected destructor. Object cannot be deleted from plug-in client (CCE).
* @since S60 3.2
*/
virtual inline ~MCCPEmergencyCall() {};
-
+
public:
- /**
- * Dials an emergency call.
+ /**
+ * Dials an emergency call.
* @param aRecipient Emergency call address suggested to be used.
* Can be given also in CConvergedCallProvider::NewEmergencyCallL.
* Plug-in will use given address and/or its own known one.
@@ -49,42 +49,42 @@
* @return KErrNone if request was started succesfully.
* @return KErrNotReady If call is not in idle state.
* @return KErrNotSupported Emergency call is not supported.
- * @since S60 3.2
- */
- virtual TInt Dial( const TDesC& aRecipient=KNullDesC) = 0;
+ * @since S60 3.2
+ */
+ virtual TInt Dial( const TDesC& aRecipient=KNullDesC) = 0;
- /**
+ /**
* Called by CCE instead of HangUp when Dial has been called and state change to
* MCCPCallObserver::ECCPStateConnecting has not been received.
* Cancels the last ongoing request. Used for Dial only. Not supported for other actions.
- * If the request cannot be started then an error will be returned immediately as return value.
- * In succesfull case KErrNone will be returned and the requested action has been started.
+ * If the request cannot be started then an error will be returned immediately as return value.
+ * In succesfull case KErrNone will be returned and the requested action has been started.
* @param None.
* @return KErrNone if request was started succesfully.
* @since S60 3.2
* @pre MCCPEmergencyCall::Dial has been called and call state is MCCPCallObserver::ECCPIdle
*/
- virtual TInt Cancel() = 0;
+ virtual TInt Cancel() = 0;
- /**
- * Ends an ongoing call.
+ /**
+ * Ends an ongoing call.
* @param none
* @return KErrNone If request was started succesfully.
* @return KErrAlreadyExists If call is already in idle state.
- * @since S60 3.2
- */
- virtual TInt HangUp() = 0;
+ * @since S60 3.2
+ */
+ virtual TInt HangUp() = 0;
- /**
- * Answers to an incoming call.
- * TODO: remove as unneeded? no answer supported ?
+ /**
+ * Answers to an incoming call.
+ * TODO: remove as unneeded? no answer supported ?
* @param none
* @return KErrNone If request was started succesfully.
* @return KErrNotReady If call is not in ringing or queued state.
- * @since S60 3.2
- */
- virtual TInt Answer() = 0;
- };
+ * @since S60 3.2
+ */
+ virtual TInt Answer() = 0;
+ };
#endif // MCCPEMERGENCYCALL_H
--- a/phonesrv_plat/converged_call_provider_api/inc/mccpextensionobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccpextensionobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -48,8 +48,8 @@
* @return none
*/
virtual void HandleExtensionEvents( TUint32 aServiceId,
- TInt aEvent,
- TInt aStatus ) = 0;
+ TInt aEvent,
+ TInt aStatus ) = 0;
};
#endif // MCCPEXTENSIONOBSERVER_H
--- a/phonesrv_plat/converged_call_provider_api/inc/mccpextensionprovider.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccpextensionprovider.h Fri Mar 19 09:40:14 2010 +0200
@@ -33,14 +33,14 @@
* @since S60 3.2
*/
class MCCPExtensionProvider
- {
+ {
protected:
/**
* Protected destructor. Object cannot be deleted from plug-in client (CCE).
* @since S60 3.2
*/
virtual inline ~MCCPExtensionProvider() {};
-
+
public:
/**
* Request a custom command from the plug-in. Result returned via MCCPExtensionObserver.
@@ -78,7 +78,7 @@
*/
virtual TInt RemoveObserver( const MCCPExtensionObserver& aObserver ) = 0;
- };
+ };
#endif // MCCPEXTENSIONPROVIDER_H
--- a/phonesrv_plat/converged_call_provider_api/inc/mccpforwardobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccpforwardobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -32,35 +32,35 @@
class MCCPForwardObserver
{
public:
- enum TCCPForwardEvent
- {
- /** Call is being forwarded by the remote party. */
- ECCPRemoteForwarding,
- /** Call is forwarded */
- ECCPForwarded,
- /** Multiple call forward choices are available */
- ECCPMultipleChoices,
- /** Call moved temporarily */
- ECCPMovedTemporarily,
- /** Call moved permanently */
- ECCPMovedPermanentlyEvent
- };
+ enum TCCPForwardEvent
+ {
+ /** Call is being forwarded by the remote party. */
+ ECCPRemoteForwarding,
+ /** Call is forwarded */
+ ECCPForwarded,
+ /** Multiple call forward choices are available */
+ ECCPMultipleChoices,
+ /** Call moved temporarily */
+ ECCPMovedTemporarily,
+ /** Call moved permanently */
+ ECCPMovedPermanentlyEvent
+ };
protected:
- /**
- * Protects the observer being deleted through the observer interface
- * @since S60 3.2
- */
- virtual inline ~MCCPForwardObserver() {};
+ /**
+ * Protects the observer being deleted through the observer interface
+ * @since S60 3.2
+ */
+ virtual inline ~MCCPForwardObserver() {};
public:
- /**
- * A Forward event has occurred concerning a specific call.
- * @since S60 3.2
- * @param aEvent Occurred event.
- * @return none
- */
- virtual void ForwardEventOccurred(
+ /**
+ * A Forward event has occurred concerning a specific call.
+ * @since S60 3.2
+ * @param aEvent Occurred event.
+ * @return none
+ */
+ virtual void ForwardEventOccurred(
const MCCPForwardObserver::TCCPForwardEvent aEvent ) = 0;
};
--- a/phonesrv_plat/converged_call_provider_api/inc/mccpforwardprovider.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccpforwardprovider.h Fri Mar 19 09:40:14 2010 +0200
@@ -34,44 +34,44 @@
* @since S60 3.2
*/
class MCCPForwardProvider
- {
+ {
protected:
/**
* Protected destructor. Object cannot be deleted from plug-in client (CCE).
* @since S60 3.2
*/
virtual inline ~MCCPForwardProvider() {};
-
+
public:
/**
- * Returns pointer to array containing addresses to forward the call to.
- * Index zero contains the first address. If there are no addresses available
- * returns an empty array.
- * @since Series 60 3.2
- * @param none
- * @return Reference to array containing addresses
+ * Returns pointer to array containing addresses to forward the call to.
+ * Index zero contains the first address. If there are no addresses available
+ * returns an empty array.
+ * @since Series 60 3.2
+ * @param none
+ * @return Reference to array containing addresses
* @leave KErrNotReady call is not in forwarding state
* @leave KErrNotSupported if call is not mobile originated
* @leave system error code
* @pre Call state is MCCPCallObserver::ECCPStateForwarding and call type is MO
* @pre Call MCCPForwardObserver::ECCPMultipleChoices event is received
- */
- virtual const CDesC8Array& GetForwardAddressChoicesL() = 0;
+ */
+ virtual const CDesC8Array& GetForwardAddressChoicesL() = 0;
- /**
- * Forward call to address at given index.
- * @since Series 60 3.2
- * @param aIndex Index of address where the call is to be forwarded. Address is
- * found in the array received from GetForwardAddressChoicesL. Index starts from zero.
- * @return none
- * @leave KErrArgument Index is not in array
+ /**
+ * Forward call to address at given index.
+ * @since Series 60 3.2
+ * @param aIndex Index of address where the call is to be forwarded. Address is
+ * found in the array received from GetForwardAddressChoicesL. Index starts from zero.
+ * @return none
+ * @leave KErrArgument Index is not in array
* @leave KErrNotReady Call is not in forwarding state
* @leave KErrNotSupported If call is not mobile originated
* @pre Call state is MCCPCallObserver::ECCPStateForwarding and call type is MO
* @pre Call MCCPForwardObserver::ECCPMultipleChoices event is received
- */
- virtual void ForwardToAddressL( const TInt aIndex ) = 0;
-
+ */
+ virtual void ForwardToAddressL( const TInt aIndex ) = 0;
+
/**
* Add an observer for forward related events.
* Currently CCE will set only one observer.
@@ -90,7 +90,7 @@
* @return KErrNotFound if observer was not found.
*/
virtual TInt RemoveObserver( const MCCPForwardObserver& aObserver ) = 0;
- };
+ };
#endif // MCCPFORWARDPROVIDER_H
--- a/phonesrv_plat/converged_call_provider_api/inc/mccpobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccpobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -80,7 +80,7 @@
/**
* Incoming call invitation in attended transfer case. Occurs at transfer target end.
- * For incoming transfer at transferor end see MCCPObserver::CallCreated.
+ * For incoming transfer at transferor end see MCCPObserver::CallCreated.
* @since S60 3.2
* @param aCall IncomingCall transfer call.
* @param aTempCall Pointer to the held call.
@@ -89,11 +89,11 @@
MCCPCall& aTempCall ) = 0;
/**
- * Indicate an arrived transfer request.
- * Called at the transfer request receiver end, after receiving a transfer request .
- * For incoming transfer at transfer target end see MCCPObserver::IncomingCall with two call
- objects as parameters.
- * @since S60 3.2
+ * Indicate an arrived transfer request.
+ * Called at the transfer request receiver end, after receiving a transfer request .
+ * For incoming transfer at transfer target end see MCCPObserver::IncomingCall with two call
+ objects as parameters.
+ * @since S60 3.2
* @param aNewTransferCall The call that has been created with the new transfer target.
* @param aOriginator Pointer to originator of the transfer request.
* @param aAttended Transfer requested was attented (ETrue) or un-attented(EFalse)
--- a/phonesrv_plat/converged_call_provider_api/inc/mccpssobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccpssobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -42,43 +42,43 @@
enum TCCPSsBarringEvent
{
/** Incoming call is barred. (DoCoMo) */
- ECCPSsIncomingCallBarred,
- /** Anonymous call barring. */
- ECCPSsAnonymousCallBarred,
- /** Outgoing call barring */
- ECCPSsOutgoingCallBarred,
- /** Barring active notification. */
- ECCPSsActiveBarrings
- };
+ ECCPSsIncomingCallBarred,
+ /** Anonymous call barring. */
+ ECCPSsAnonymousCallBarred,
+ /** Outgoing call barring */
+ ECCPSsOutgoingCallBarred,
+ /** Barring active notification. */
+ ECCPSsActiveBarrings
+ };
/** CLI (Call Line Information) related event. */
enum TCCPSsCLIEvent
{
/** Temporary CLIR suppression was unsuccessful */
- ECCPSsTempClirSuppressUnsuccessful,
+ ECCPSsTempClirSuppressUnsuccessful,
/** Temporary CLIR activation was unsuccessful*/
- ECCPSsTempClirActivationUnsuccessful
+ ECCPSsTempClirActivationUnsuccessful
};
/** Call forward related events that are not call related to an existing call. */
enum TCCPSsCallForwardEvent
{
/** Incoming call is forwarded */
- ECCPSsIncCallIsForw,
- /** Incoming call was forwarded because of user own settings. */
- ECCPSsIncCallForwToC,
+ ECCPSsIncCallIsForw,
+ /** Incoming call was forwarded because of user own settings. */
+ ECCPSsIncCallForwToC,
/** Outgoing call was forwarded because of user own settings. */
ECCPSsOutCallForwToC,
/** Forward unconditional mode active */
- ECCPSsForwardUnconditionalModeActive,
- /** Forward unconditional mode deactive */
- ECCPSsForwardUnconditionalModeNotActive,
- /** Forward conditional mode active */
- ECCPSsForwardConditionallyModeActive,
- /** Forward conditional mode deactive */
- ECCPSsForwardConditionallyModeNotActive,
- /** Remote call waiting. TODO rename TCCPSsCallForwardEvent to TCCPSsCallEvent*/
- ESsCallWaiting
+ ECCPSsForwardUnconditionalModeActive,
+ /** Forward unconditional mode deactive */
+ ECCPSsForwardUnconditionalModeNotActive,
+ /** Forward conditional mode active */
+ ECCPSsForwardConditionallyModeActive,
+ /** Forward conditional mode deactive */
+ ECCPSsForwardConditionallyModeNotActive,
+ /** Remote call waiting. TODO rename TCCPSsCallForwardEvent to TCCPSsCallEvent*/
+ ESsCallWaiting
};
@@ -97,26 +97,26 @@
* @return none
* @since S60 v3.2
*/
- virtual void BarringEventOccurred( const MCCPSsObserver::TCCPSsBarringEvent aBarringEvent ) = 0;
-
+ virtual void BarringEventOccurred( const MCCPSsObserver::TCCPSsBarringEvent aBarringEvent ) = 0;
+
/**
* Supplementary service call line identification event occurred.
* @param aCallLineEvent Event that occurred.
* @return none
* @since S60 v3.2
*/
- virtual void CLIEventOccurred( const MCCPSsObserver::TCCPSsCLIEvent aCallLineEvent ) = 0;
+ virtual void CLIEventOccurred( const MCCPSsObserver::TCCPSsCLIEvent aCallLineEvent ) = 0;
/**
* Supplementary service related call forward event occurred.
* @param aCallForwardEvent Event that occurred.
- * @param aRemoteAddress Remote address.
+ * @param aRemoteAddress Remote address.
* @return none
* @since S60 v3.2
*/
- virtual void CallForwardEventOccurred(
- const MCCPSsObserver::TCCPSsCallForwardEvent aCallForwardEvent,
- const TDesC& aRemoteAddress ) = 0;
+ virtual void CallForwardEventOccurred(
+ const MCCPSsObserver::TCCPSsCallForwardEvent aCallForwardEvent,
+ const TDesC& aRemoteAddress ) = 0;
/**
* Supplementary service related active closed user group indications.
@@ -124,16 +124,16 @@
* @return none
* @since S60 v3.2
*/
- virtual void CallCugEventOccurred( const MCCPSsObserver::TCCPSsCugEvent aCugEvent ) = 0;
+ virtual void CallCugEventOccurred( const MCCPSsObserver::TCCPSsCugEvent aCugEvent ) = 0;
/**
* Notifies active ALS line. CS plugin must notify this every time line changes
- * and at startup.
+ * and at startup.
* @param aLine Used ALS line.
* @return none
* @since S60 v3.2
*/
- virtual void NotifyCurrentActiveALSLine( TInt aLine ) = 0;
+ virtual void NotifyCurrentActiveALSLine( TInt aLine ) = 0;
};
--- a/phonesrv_plat/converged_call_provider_api/inc/mccptransferprovider.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/converged_call_provider_api/inc/mccptransferprovider.h Fri Mar 19 09:40:14 2010 +0200
@@ -34,7 +34,7 @@
* @since S60 3.2
*/
class MCCPTransferProvider
- {
+ {
protected:
/**
@@ -42,80 +42,80 @@
* @since S60 3.2
*/
virtual inline ~MCCPTransferProvider() {};
-
+
public:
/**
- * Attended transfer to given call recipient.
- * There needs to exist two calls. a call between A-B and A-C. A wants to transfer the call to B-C.
- * Both calls A-B and A-C will be disconnected after transfer.
- * In above case C will be the aTransferTargetCall call recipient. B is the recipient of the
- * current call between A-B - called on A's call object transfer provider.
- * The A-B call is on hold.
+ * Attended transfer to given call recipient.
+ * There needs to exist two calls. a call between A-B and A-C. A wants to transfer the call to B-C.
+ * Both calls A-B and A-C will be disconnected after transfer.
+ * In above case C will be the aTransferTargetCall call recipient. B is the recipient of the
+ * current call between A-B - called on A's call object transfer provider.
+ * The A-B call is on hold.
* Actual request result indication comes via observer classes
- * @param aTransferTargetCall Call containing the transfer target info.
+ * @param aTransferTargetCall Call containing the transfer target info.
* @return KErrNone if request was started succesfully.
* @return KErrNotReady if call is not in connected or on-hold state.
* @return KErrArgument transfer traget address was illegal.
* @pre Call state is MCCPCallObserver::ECCPStateConnected or MCCPCallObserver::ECCPStateHold
- * @since S60 3.2
- */
- virtual TInt AttendedTransfer( MCCPCall& aTransferTargetCall ) = 0;
+ * @since S60 3.2
+ */
+ virtual TInt AttendedTransfer( MCCPCall& aTransferTargetCall ) = 0;
/**
* TODO is this used at all? remove? only the call param one is used?
- * Attended transfer to given address. There does not need to be
- * a current call between the given transfer target.
+ * Attended transfer to given address. There does not need to be
+ * a current call between the given transfer target.
* Actual request result indication comes via observer class
- * @param aTransferTarget Transfer target address
+ * @param aTransferTarget Transfer target address
* @return KErrNone if request was started succesfully.
* @return KErrNotReady if call is not in connected or on-hold state.
* @return KErrArgument transfer address was illegal.
* @pre Call state is MCCPCallObserver::ECCPStateConnected or MCCPCallObserver::ECCPStateHold
- * @since S60 3.2
- */
- virtual TInt AttendedTransfer( const TDesC& aTransferTarget ) = 0;
+ * @since S60 3.2
+ */
+ virtual TInt AttendedTransfer( const TDesC& aTransferTarget ) = 0;
- /**
- * Unattended transfer. Call is requested to be transferred to given address.
- * After MCCPTransferObserver::ECCPRemoteTransferring event current call will be
- * disconnected and no transfer status is checked from the operation.
+ /**
+ * Unattended transfer. Call is requested to be transferred to given address.
+ * After MCCPTransferObserver::ECCPRemoteTransferring event current call will be
+ * disconnected and no transfer status is checked from the operation.
* Actual request result indication comes via observer classes
- * @since S60 3.2
- * @param aTransferTarget Address of the target
+ * @since S60 3.2
+ * @param aTransferTarget Address of the target
* @return KErrNone if request was started succesfully.
* @return KErrNotReady if call is not in connected or on-hold state.
* @return KErrArgument transfer address was illegal.
* @pre Call state is MCCPCallObserver::ECCPStateConnected or MCCPCallObserver::ECCPStateHold
- */
- virtual TInt UnattendedTransfer( const TDesC& aTransferTarget ) = 0;
+ */
+ virtual TInt UnattendedTransfer( const TDesC& aTransferTarget ) = 0;
- /**
- * Accept incoming call transfer request from the call remote party.
+ /**
+ * Accept incoming call transfer request from the call remote party.
* Actual request result indication comes via observer class
- * @since Series 60 3.2
- * @param aAccept ETrue - accept transfer, EFalse do not accept transfer request.
+ * @since Series 60 3.2
+ * @param aAccept ETrue - accept transfer, EFalse do not accept transfer request.
* @return KErrNone if request was started succesfully.
* @return KErrNotReady if call is not in connected or on-hold state.
* @return KErrArgument transfer address was illegal.
* @pre Call state is MCCPCallObserver::ECCPStateConnected or MCCPCallObserver::ECCPStateHold
- * @pre MCCPObserver::CallCreated is called with the newly created call
- */
- virtual TInt AcceptTransfer( const TBool aAccept ) = 0;
-
+ * @pre MCCPObserver::CallCreated is called with the newly created call
+ */
+ virtual TInt AcceptTransfer( const TBool aAccept ) = 0;
+
/**
* When the other end of the call has requested call transfer to third party it is notified to
* MCCPTransferObserver::TransferEventOccurred(MCCPTransferObserver::ECCPRemoteTransferring).
* The new recipient of the call can be fetched via this method.
- * @since Series 60 3.2
- * @param none
- * @return new recipient for the call after transfer
- * @return KNullDesC if no transfer target is available
+ * @since Series 60 3.2
+ * @param none
+ * @return new recipient for the call after transfer
+ * @return KNullDesC if no transfer target is available
* @pre Call state is MCCPCallObserver::ECCPStateConnected or MCCPCallObserver::ECCPStateHold
- * @pre MCCPObserver::CallCreated is called with the newly created call
- */
- virtual const TDesC& TransferTarget() const = 0;
-
+ * @pre MCCPObserver::CallCreated is called with the newly created call
+ */
+ virtual const TDesC& TransferTarget() const = 0;
+
/**
* Add an observer for transfer related events.
* Currently CCE will set only one observer.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/dialpad_api/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,25 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Dialpad API (phone number editor + virtual keypad)
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+../inc/dialpad.h MW_LAYER_PLATFORM_EXPORT_PATH(dialpad.h)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/dialpad_api/inc/dialpad.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,97 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Dialpad popup
+*
+*/
+
+#ifndef DIALPAD_H
+#define DIALPAD_H
+
+#include <hbwidget.h>
+#include <QTime>
+#include <QTimeLine>
+
+class HbLineEdit;
+class HbFrameDrawer;
+class DialpadInputField;
+class DialpadKeypad;
+class DialpadMultitapHandler;
+
+#ifdef BUILD_DIALPAD
+#define DIALPAD_EXPORT Q_DECL_EXPORT
+#else
+#define DIALPAD_EXPORT Q_DECL_IMPORT
+#endif
+
+class DIALPAD_EXPORT Dialpad : public HbWidget
+{
+ Q_OBJECT
+
+public:
+ explicit Dialpad();
+ virtual ~Dialpad();
+
+ HbLineEdit& editor() const;
+
+public slots:
+ void openDialpad();
+
+ void closeDialpad();
+
+ void setCallButtonEnabled(bool enabled);
+
+protected:
+ void paint(QPainter* painter,
+ const QStyleOptionGraphicsItem* option,
+ QWidget* widget);
+
+ bool sceneEvent(QEvent *event);
+
+ bool sceneEventFilter(QGraphicsItem *watched, QEvent *event);
+
+ bool handleSceneEvent(QEvent *event);
+
+ void showEvent(QShowEvent *event);
+
+ void hideEvent(QHideEvent *event);
+
+ void closeEvent(QCloseEvent * event);
+
+protected slots:
+ void closeAnimValueChanged(qreal value);
+ void closeAnimFinished();
+ void openAnimValueChanged(qreal value);
+ void openAnimFinished();
+ void orientationChangeStarted();
+ void orientationChangeFinished();
+
+signals:
+ void aboutToClose();
+
+private:
+ HbFrameDrawer *mBackgroundDrawer;
+ HbFrameDrawer *mIconDrawer;
+ DialpadInputField* mInputField;
+ DialpadKeypad* mKeypad;
+ DialpadMultitapHandler* mMultitap;
+ int mMouseButtonPressedDown;
+ QTime mSwipeTimer;
+ QTimeLine mOpenTimeLine;
+ QTimeLine mCloseTimeLine;
+ bool mAnimationOngoing;
+ QPointF mPosition;
+ int mCloseHandleHeight;
+};
+
+#endif // DIALPAD_H
--- a/phonesrv_plat/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -55,4 +55,5 @@
#include "../call_information_api/group/bld.inf"
#include "../call_remote_party_information_api/group/bld.inf"
#include "../telephony_mediator_api/group/bld.inf"
+#include "../dialpad_api/group/bld.inf"
// End of file
--- a/phonesrv_plat/phone_client_api/inc/RPhCltServer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_client_api/inc/RPhCltServer.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32std.h>
-#include <PhCltTypes.h>
+#include <phclttypes.h>
// CONSTANTS
// A version must be specified when creating a session with the server
--- a/phonesrv_plat/phone_client_command_handler_api/inc/CPhCltCommandHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_client_command_handler_api/inc/CPhCltCommandHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
-#include <PhCltTypes.h>
+#include <phclttypes.h>
// FORWARD DECLARATIONS
@@ -131,8 +131,8 @@
TPhCltComHandCommand iCommandHandlerCommand;
// Dial command parameter.
- TPhCltTelephoneNumber iTelNumber;
-
+ TPhCltTelephoneNumber iTelNumber;
+
// Chld command parameter.
TPhCltChldCommand iChldCommand;
// Chld command parameter.
@@ -182,7 +182,7 @@
* KErrNone if successful, Symbian error code otherwise.
* @param aTelephoneNumber The dial information.
*/
- IMPORT_C virtual void Atd(
+ IMPORT_C virtual void Atd(
TRequestStatus& aStatus,
const TPhCltTelephoneNumber& aTelephoneNumber ) = 0;
--- a/phonesrv_plat/phone_client_image_handler_api/inc/CPhCltBaseImageParams.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_client_image_handler_api/inc/CPhCltBaseImageParams.h Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
#ifndef CPHCLTBASEPARAMS_H
#define CPHCLTBASEPARAMS_H
-#include <CPhCltImageParams.h>
+#include <cphcltimageparams.h>
#include <e32std.h>
#include <e32base.h>
--- a/phonesrv_plat/phone_client_image_handler_api/inc/CPhCltImageHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_client_image_handler_api/inc/CPhCltImageHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHCLTIMAGEHANDLER_H
#include <e32base.h>
-#include "CPhCltImageParams.h"
+#include "cphcltimageparams.h"
// FORWARD DECLARATIONS
class RPhCltServer;
--- a/phonesrv_plat/phone_client_notify_api/inc/CPhCltCallNotify.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_client_notify_api/inc/CPhCltCallNotify.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <e32base.h>
-#include <PhCltTypes.h>
+#include <phclttypes.h>
// FORWARD DECLARATIONS
@@ -78,7 +78,7 @@
* @param aObserver dial request observer
*/
IMPORT_C void NotifyDialRequest(
- MPhCltDialRequestObserver* aObserver );
+ MPhCltDialRequestObserver* aObserver );
/**
* Cancel pending call attempt notification.
@@ -104,14 +104,14 @@
/**
* Cancel pending emergency call attempt notification.
*/
- IMPORT_C void CancelNotifyEmergencyCall() const;
+ IMPORT_C void CancelNotifyEmergencyCall() const;
/**
* Respond to client request to make emergency call
*
* @param aResultCode Result of the response.
*/
- IMPORT_C TInt RespondEmergencyToClient( const TInt aResultCode );
+ IMPORT_C TInt RespondEmergencyToClient( const TInt aResultCode );
/**
* Notifies when a Command handler request arrives.
--- a/phonesrv_plat/phone_client_notify_api/inc/cphcltdialdata.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_client_notify_api/inc/cphcltdialdata.h Fri Mar 19 09:40:14 2010 +0200
@@ -24,7 +24,7 @@
#include <e32base.h>
#include <s32mem.h>
#include <bldvariant.hrh>
-#include <PhCltTypes.h>
+#include <phclttypes.h>
// Constant used as window group id to indicate that we wish to go to idle.
@@ -34,7 +34,7 @@
const TInt KPhCltRedialDefault = -1; // Default redial.
const TInt KPhCltRedialOff = -2; // Redial is off.
const TInt KPhCltRedialWithDefaultTime = -3; // Redial on, with default time.
-const TInt KPhCltRedial = 0; // Forced redial.
+const TInt KPhCltRedial = 0; // Forced redial.
// CONSTANTS
@@ -143,7 +143,7 @@
* End other calls param.
* @since Series 60 3.2
* @return Returns ETrue if other calls will be terminated.
- * EFalse if calls are not terminated.
+ * EFalse if calls are not terminated.
*/
virtual TBool EndOtherCalls() const = 0;
@@ -227,9 +227,9 @@
*/
virtual const TDesC& UUI() const = 0;
- public: // Access - Setters
-
- /**
+ public: // Access - Setters
+
+ /**
* Set whether the name entered in SetName should be matched
* against the personal directory.
* @since Series 60 3.2
@@ -239,8 +239,8 @@
* @param aAllowMatch Whether to allow matches.
*/
virtual void SetAllowMatch( TBool aAllowMatch ) = 0;
-
- /**
+
+ /**
* Set the bearer capability.
* @since Series 60 3.2
* @param aBearer The bearer capabilities as defined in GSM 04.08.
@@ -379,9 +379,9 @@
// Constructors
- protected:
-
- /**
+ protected:
+
+ /**
* C++ default constructor.
* @since Series 60 3.2
*/
@@ -419,7 +419,7 @@
//The contact Link storage.
- HBufC8* iContactLink;
+ HBufC8* iContactLink;
// The calling party subaddress.
TPhCltSubAddress iSubAddress;
@@ -447,10 +447,10 @@
//Intialization call
- TBool iInitCall;
+ TBool iInitCall;
// Flags value
- TUint iFlags;
+ TUint iFlags;
// service id
TUint32 iServiceId;
--- a/phonesrv_plat/phone_client_ussd_internal_api/inc/CPhCltUssdInt.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_client_ussd_internal_api/inc/CPhCltUssdInt.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <e32base.h>
-#include <CPhCltUssd.h>
+#include <cphcltussd.h>
// FORWARD DECLARATIONS
// CLASS DECLARATION
--- a/phonesrv_plat/phone_settings_api/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_api/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: File that exports the files belonging to
-: Phone Settings API
+: phone settings api
*
*/
@@ -24,7 +24,7 @@
PRJ_EXPORTS
-../inc/PSetConstants.h MW_LAYER_PLATFORM_EXPORT_PATH(PsetConstants.h)
+../inc/PSetConstants.h MW_LAYER_PLATFORM_EXPORT_PATH(PSetConstants.h)
../inc/PsetCallWaiting.h MW_LAYER_PLATFORM_EXPORT_PATH(PsetCallWaiting.h)
../inc/MPsetNetworkMode.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetNetworkMode.h)
../inc/MPsetCallWaiting.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetCallWaiting.h)
@@ -41,3 +41,9 @@
../inc/PsetSAObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(PsetSAObserver.h)
../inc/MPsetCallBarring.h MW_LAYER_PLATFORM_EXPORT_PATH(MPsetCallBarring.h)
../inc/PsetCli.h MW_LAYER_PLATFORM_EXPORT_PATH(PsetCli.h)
+../inc/psetcalldivertingwrapper.h MW_LAYER_PLATFORM_EXPORT_PATH(psetcalldivertingwrapper.h)
+../inc/psetcallwaitingwrapper.h MW_LAYER_PLATFORM_EXPORT_PATH(psetcallwaitingwrapper.h)
+../inc/psetcliwrapper.h MW_LAYER_PLATFORM_EXPORT_PATH(psetcliwrapper.h)
+../inc/psetnetworkwrapper.h MW_LAYER_PLATFORM_EXPORT_PATH(psetnetworkwrapper.h)
+../inc/psetwrapper.h MW_LAYER_PLATFORM_EXPORT_PATH(psetwrapper.h)
+../inc/psetwrappertypes.h MW_LAYER_PLATFORM_EXPORT_PATH(psetwrappertypes.h)
--- a/phonesrv_plat/phone_settings_api/inc/PSetRefreshHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_api/inc/PSetRefreshHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,8 +22,8 @@
// INCLUDES
-#include <MSSSettingsRefreshObserver.h>
-#include <MSatRefreshObserver.h>
+#include <msssettingsrefreshobserver.h>
+#include <msatrefreshobserver.h>
// DATA TYPES
@@ -55,25 +55,25 @@
public: // New functions
/**
- * Start the waiting for refresh events.
+ * Start the waiting for refresh events.
*
* @param aObserver The observer to handle refresh events.
* @param aObservedFile The file change to be observed.
* @param aObservedRefreshType The refresh type(s) to be observed.
- */
- virtual void NotifyFileChangeL(
+ */
+ virtual void NotifyFileChangeL(
MSSSettingsRefreshObserver& aObserver,
TSatElementaryFiles aObservedFile,
TSatRefreshType aObservedRefreshType ) = 0;
- /**
- * Cancel the notification started in NotifyFileChangeL.
+ /**
+ * Cancel the notification started in NotifyFileChangeL.
*
* @param aObserver The observer whose notify to be canceled.
* @param aObservedFile The file change to be canceled.
* @param aObservedRefreshType The refresh type to be canceled.
- */
- virtual void CancelNotify() = 0;
+ */
+ virtual void CancelNotify() = 0;
/**
* Get the changed CSP information after Refresh.
--- a/phonesrv_plat/phone_settings_api/inc/PsetCSP.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_api/inc/PsetCSP.h Fri Mar 19 09:40:14 2010 +0200
@@ -26,7 +26,7 @@
// INCLUDES
#include <e32base.h>
-#include <RCustomerServiceProfileCache.h>
+#include <rcustomerserviceprofilecache.h>
// CLASS DECLARATION
/**
--- a/phonesrv_plat/phone_settings_api/inc/PsetCallBarring.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_api/inc/PsetCallBarring.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,9 +21,9 @@
#define PSETCALLBARRING_H
// INCLUDES
-#include "MPsetBarringObs.h"
-#include "MPsetCallBarring.h"
-#include "MSSSettingsObserver.h"
+#include "mpsetbarringobs.h"
+#include "MPsetCallBarring.h"
+#include "msssettingsobserver.h"
#include "nwdefs.h"
#include <mmretrieve.h>
#include <etelmm.h>
@@ -39,8 +39,8 @@
* @since 1.0
*/
class CPsetCallBarring : public CActive,
- public MPsetCallBarring,
- public MSSSettingsObserver
+ public MPsetCallBarring,
+ public MSSSettingsObserver
{
public:
@@ -143,7 +143,7 @@
private:
- void ValidateBsc( TBasicServiceGroups& aBsc );
+ void ValidateBsc( TBasicServiceGroups& aBsc );
void SetObserver( MPsetBarringObserver& aObserver );
--- a/phonesrv_plat/phone_settings_api/inc/PsetCallDiverting.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_api/inc/PsetCallDiverting.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,8 +23,8 @@
// INCLUDES
#include <mmretrieve.h>
#include "nwdefs.h"
-#include "PsetConstants.h"
-#include "MPsetCallDiverting.h"
+#include "PSetConstants.h"
+#include "MPsetCallDiverting.h"
// FORWARD DECLARATIONS
class CDesC16ArrayFlat;
@@ -39,10 +39,10 @@
enum TSelectedLine
{
- EPrimaryLine, // ALS is supported by ME & SIM and Line 1 (Primary Line) is the current line
- EAuxiliaryLine, // ALS is supported by ME & SIM and Line 2 (Auxiliary Line) is the current line
- EUnknownLine, // ALS is supported by ME & SIM but TSY can not determine line selection
- ENotSupportedLine // ALS is not supported either by ME or SIM or both.
+ EPrimaryLine, // ALS is supported by ME & SIM and Line 1 (Primary Line) is the current line
+ EAuxiliaryLine, // ALS is supported by ME & SIM and Line 2 (Auxiliary Line) is the current line
+ EUnknownLine, // ALS is supported by ME & SIM but TSY can not determine line selection
+ ENotSupportedLine // ALS is not supported either by ME or SIM or both.
};
// CLASS DECLARATION
--- a/phonesrv_plat/phone_settings_api/inc/PsetCallWaiting.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_api/inc/PsetCallWaiting.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,11 +23,11 @@
// INCLUDES
#include <etelmm.h>
#include <mmretrieve.h>
-#include "MSSSettingsObserver.h"
+#include "msssettingsobserver.h"
#include "nwdefs.h"
-#include "MPsetCallWaiting.h"
-#include "MPsetCallWaitingObs.h"
-#include "PsetConstants.h"
+#include "MPsetCallWaiting.h"
+#include "mpsetcallwaitingobs.h"
+#include "PSetConstants.h"
// FORWARD DECLARATIONS
@@ -133,7 +133,7 @@
private: // constructors
- void ConstructL( MPsetCallWaitingObserver& aObserver );
+ void ConstructL( MPsetCallWaitingObserver& aObserver );
/*****************************************************
* Series 60 Customer / ETel
--- a/phonesrv_plat/phone_settings_api/inc/PsetCli.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_api/inc/PsetCli.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,8 +23,8 @@
// INCLUDES
#include <etelmm.h>
-#include "MPsetCliObserver.h"
-#include "MPsetCli.h"
+#include "mpsetcliobserver.h"
+#include "MPsetCli.h"
// FORWARD DECLARATIONS
--- a/phonesrv_plat/phone_settings_api/inc/PsetContainer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_api/inc/PsetContainer.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,12 +23,12 @@
#define PSETCONTAINER_H
// INCLUDES
-#include <PsetCallWaiting.h>
-#include <PsetCallDiverting.h>
-#include <PsetCallBarring.h>
-#include <PsetCli.h>
-#include <PsetNetwork.h>
-#include <PSetRefreshHandler.h>
+#include <PsetCallWaiting.h>
+#include <PsetCallDiverting.h>
+#include <PsetCallBarring.h>
+#include <PsetCli.h>
+#include <PsetNetwork.h>
+#include <PSetRefreshHandler.h>
// FORWARD DECLARATIONS
--- a/phonesrv_plat/phone_settings_api/inc/PsetNetwork.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_api/inc/PsetNetwork.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,12 +21,12 @@
#define PSETNETWORK_H
// INCLUDES
-#include "MPsetNetworkSelect.h"
-#include "MPsetNetworkInfoObs.h"
-#include "MPsetNetworkModeObs.h"
-#include "MPsetNetworkMode.h"
+#include "MPsetNetworkSelect.h"
+#include "mpsetnetworkinfoobs.h"
+#include "mpsetnetworkmodeobs.h"
+#include "MPsetNetworkMode.h"
#include <etelmm.h>
-#include <RMmCustomApi.h>
+#include <rmmcustomapi.h>
// FORWARD DECLARATIONS
class CPsetSAObserver;
--- a/phonesrv_plat/phone_settings_api/inc/PsetSAObserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_api/inc/PsetSAObserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
-#include <e32Property.h>
+#include <e32property.h>
#include <psetcalldiverting.h>
#include <psvariables.h>
#include <ctsydomaincrkeys.h>
--- a/phonesrv_plat/phone_settings_api/inc/nwdefs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_api/inc/nwdefs.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32std.h>
-#include "PsetConstants.h"
+#include "PSetConstants.h"
// DATA TYPES
//basic service groups
@@ -162,13 +162,13 @@
//call forwarding cenrep key statuses.
enum TCallForwardingStatus
- {
- EForwardingUnknown = 0x0,
- EForwardingActiveVoice = 0x01,
- EForwardingActiveFax = 0x02,
- EForwardingActiveData = 0x04
- };
-
+ {
+ EForwardingUnknown = 0x0,
+ EForwardingActiveVoice = 0x01,
+ EForwardingActiveFax = 0x02,
+ EForwardingActiveData = 0x04
+ };
+
// CLASS DEFINITIONS
// Supplemental class to contain all call barring settings.
class TCallBarringSetting
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/phone_settings_api/inc/psetcalldivertingwrapper.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,168 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef PSETCALLDIVERTINGWRAPPER_H_
+#define PSETCALLDIVERTINGWRAPPER_H_
+
+#include <QObject>
+#include <QList>
+#include <QStringList>
+#include <psetwrappertypes.h>
+
+// Forward declarations
+class CPsetCallDiverting;
+class CPsetContainer;
+class PSetCallDivertingWrapperPrivate;
+class CPhCltEmergencyCall;
+class CDesC16ArrayFlat;
+class TDesC16;
+
+// Call diverting command
+class PSCallDivertingCommand
+{
+public:
+ //member data
+ //Divert condition
+ PsCallDivertingCondition iCondition;
+ //Divert setting
+ PsCallDivertingSetting iSetting;
+ //Divert status
+ PsCallDivertingStatus iStatus;
+ //Divert service group
+ PsServiceGroup iServiceGroup;
+ //Diverted-to number
+ QString iNumber;
+ //Delay time before starting diverting
+ int iNoReplyTimer;
+};
+
+// Call diverting command
+class PSCallDivertingStatus
+{
+public:
+ //member data
+ //Divert condition
+ PsCallDivertingCondition iCondition;
+ // (RMobileCall::TMobileService)
+ // RMobileCall::EServiceUnspecified if not available
+ int iServiceGroup;
+ //Divert status
+ PsCallDivertingStatus iStatus;
+ //Diverted-to number
+ QString iNumber;
+ /** The "No Reply" time-out (in seconds) registered for the call forwarding no reply
+ condition.
+
+ Equals to -1 if this value is not applicable. In GSM mode, will be between
+ 5 and 30 and in steps of 5 if this value is applicable. */
+ int iTimeout;
+};
+
+#ifdef BUILD_PSETWRAPPER
+#define PSETWRAPPER_EXPORT Q_DECL_EXPORT
+#else
+#define PSETWRAPPER_EXPORT Q_DECL_IMPORT
+#endif
+
+class PSETWRAPPER_EXPORT PSetCallDivertingWrapper : public QObject
+{
+Q_OBJECT
+
+public:
+
+ explicit PSetCallDivertingWrapper(CPsetContainer &psetContainer,
+ QObject *parent = NULL);
+
+ virtual ~PSetCallDivertingWrapper();
+
+public:
+ // Functions (adaptees):
+
+ /**
+ * Sets call diverting to the network.
+ *
+ * @param aSetting New settings for the call diverting.
+ * @param aBsc Basic service group concerned.
+ * @return Error code.
+ */
+ int setCallDiverting(PSCallDivertingCommand& aSetting,
+ int aBasicServiceGroup);
+
+ /**
+ * Checks the call diverting status from network.
+ */
+ void getCallDivertingStatus(const PsServiceGroup aServiceGroup,
+ const PsCallDivertingCondition aCondition, int aBsc);
+
+ /**
+ * Cancels the call diverting-request process.
+ */
+ void cancelProcess();
+
+ /**
+ * Retrieve the default (last forwarded-to) numbers.
+ */
+ void getDefaultNumbers(QStringList &aDefNumbers); // QStringList
+
+ /**
+ * Sets new number to the default numbers (last forwarded-to) list.
+ */
+ void setNewDefaultNumber(QString aNumber);
+
+ /**
+ * Get voicemailbox number.
+ */
+ void getVoiceMailBoxNumber(QString &aNumber);
+
+
+signals: // Notify via signals
+
+ void handleDivertingChanged(const PSCallDivertingCommand& aSetting,
+ bool aPlural);
+
+ void handleDivertingStatus(QList<PSCallDivertingStatus*>& diverList,
+ bool aPlural);
+
+ void handleDivertingError(int aReason);
+
+ void handleCFRequesting(bool aOngoing, bool aInterrupted);
+
+ void requestDone();
+
+private:
+
+ int validateDivertNumber(const TDesC16& aDivertTo) const;
+ bool findPlus(const TDesC16& aDivertTo) const;
+
+private:
+ // Data:
+ // Phone setting handlers, own
+ CPsetCallDiverting* m_psetCallDiverting;
+
+ // Owned: Phone client emergency number session.
+ CPhCltEmergencyCall* m_emergencyCall;
+
+ // Own
+ CDesC16ArrayFlat* m_DefaultNumberListCDes;
+ QStringList m_DefaultnumberListQSList;
+
+ // Own
+ PSetCallDivertingWrapperPrivate* m_Priv;
+ friend class PSetCallDivertingWrapperPrivate;
+};
+
+#endif /* PSETCALLDIVERTINGWRAPPER_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/phone_settings_api/inc/psetcallwaitingwrapper.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef PSETCALLWAITINGWRAPPER_H_
+#define PSETCALLWAITINGWRAPPER_H_
+
+#include <QObject>
+#include <psetwrappertypes.h>
+
+// Forward declarations
+class CPsetContainer;
+class CPsetCallWaiting;
+class PSetCallWaitingWrapperPrivate;
+
+#ifdef BUILD_PSETWRAPPER
+#define PSETWRAPPER_EXPORT Q_DECL_EXPORT
+#else
+#define PSETWRAPPER_EXPORT Q_DECL_IMPORT
+#endif
+
+class PSETWRAPPER_EXPORT PSetCallWaitingWrapper:
+ public QObject
+{
+ Q_OBJECT
+
+public:
+
+ explicit PSetCallWaitingWrapper( CPsetContainer &psetContainer,
+ QObject *parent = NULL);
+
+ ~PSetCallWaitingWrapper();
+
+
+ // Call waiting status
+ enum PsCallWaitingStatus
+ {
+ StatusActive,
+ StatusDisabled,
+ StatusNotAvailable,
+ StatusNotProvisioned,
+ StatusUnknown
+ };
+
+ // Call waiting action
+ enum PsCallWaitingCommand
+ {
+ ActivateCallWaiting,
+ DeactivateCallWaiting,
+ CheckCallWaitingStatus
+ };
+
+public: // Functions (adaptees):
+
+ /**
+ * Sets call waiting to the network.
+ *
+ * @param aSetting New settings for the Call Waiting.
+ * @param aBsc Basic service group concerned.
+ */
+ void setCallWaiting( PsCallWaitingCommand aSetting,
+ int aBasicServiceGroup );
+
+ /**
+ * Checks the call waiting status from network.
+ */
+ void getCallWaitingStatus();
+
+ /**
+ * Cancels the call waiting-request process.
+ */
+ void cancelProcess();
+
+signals: // Notify via signals
+
+ void handleCallWaitingGetStatus(
+ PSetCallWaitingWrapper::PsCallWaitingStatus aStatus,
+ const QList<unsigned char> &basicServiceGroupIds);
+
+ void handleCallWaitingChanged(
+ PSetCallWaitingWrapper::PsCallWaitingCommand aSetting,
+ int aResult );
+
+ void handleCallWaitingRequesting( bool ongoing, bool interrupted );
+
+ void handleCallWaitingError( int aError );
+
+private: // Data:
+
+ // Phone setting handlers, own
+ CPsetCallWaiting *m_psetCallWaiting;
+
+ // Own
+ QScopedPointer<PSetCallWaitingWrapperPrivate> m_privateImpl;
+ friend class PSetCallWaitingWrapperPrivate;
+};
+
+
+#endif /* PSETCALLWAITINGWRAPPER_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/phone_settings_api/inc/psetcliwrapper.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,106 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef PSETCLIWRAPPER_H_
+#define PSETCLIWRAPPER_H_
+
+
+#include <QObject>
+#include <psetwrappertypes.h>
+
+// Forward declarations
+class CPsetContainer;
+class CPsetCli;
+class MPsetRequestObserver;
+class PSetCliWrapperPrivate;
+
+#ifdef BUILD_PSETWRAPPER
+#define PSETWRAPPER_EXPORT Q_DECL_EXPORT
+#else
+#define PSETWRAPPER_EXPORT Q_DECL_IMPORT
+#endif
+
+class PSETWRAPPER_EXPORT PSetCliWrapper:
+ public QObject
+{
+ Q_OBJECT
+
+public:
+
+ explicit PSetCliWrapper( CPsetContainer &psetContainer,
+ QObject *parent = NULL);
+
+ ~PSetCliWrapper();
+
+
+public: // Functions (adaptees):
+
+ /**
+ * Shows COLP (Connected Line Identification Presentation) mode.
+ */
+ void getColpMode();
+
+ /**
+ * Shows CLIP (Calling Line Identification Presentation) mode.
+ */
+ void getClipMode();
+
+ /**
+ * Shows CLIR (Calling Line Identification Restriction) mode.
+ */
+ void getClirMode();
+
+ /**
+ * Shows COLR (Connected Line Identification Restriction) mode.
+ */
+ void getColrMode();
+
+ /**
+ * Shows CNAP (Calling Number Presentation) mode.
+ *
+ */
+ void getCnap();
+
+ /**
+ * Cancels any (and all) request(s).
+ */
+ void cancelAll();
+
+signals: // Notify via signals
+
+ void handleCliRequesting( bool ongoing, bool interrupted );
+
+ void cliInformation( const PsCallLineIdentity& type );
+
+ void handleCliStatus(
+ unsigned char *bsc, int numberOfBsc, const PsCallLineIdentity& aMode );
+
+ void handleCnapStatus( int aStatus );
+
+ void handleCliError( int aError );
+
+private: // Data:
+ // Phone setting handlers
+ CPsetCli* m_psetCli;
+
+ // Own
+ QScopedPointer<PSetCliWrapperPrivate> m_privateImpl;
+ friend class PSetCliWrapperPrivate;
+};
+
+
+#endif /* PSETCLIWRAPPER_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/phone_settings_api/inc/psetnetworkwrapper.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,157 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef PSETNETWORKWRAPPER_H
+#define PSETNETWORKWRAPPER_H
+
+#include <QObject>
+
+class PSetNetworkWrapperPrivate;
+class CPsetContainer;
+class HbDialog;
+
+#ifdef BUILD_PSETWRAPPER
+#define PSETWRAPPER_EXPORT Q_DECL_EXPORT
+#else
+#define PSETWRAPPER_EXPORT Q_DECL_IMPORT
+#endif
+
+class PSETWRAPPER_EXPORT PSetNetworkWrapper : public QObject
+{
+ Q_OBJECT
+
+public:
+
+ enum ErrorCode {
+ ErrNoError = 0,
+ ErrGeneral,
+ ErrCauseCallActive,
+ ErrNoNetworkService,
+ ErrOfflineOpNotAllowed,
+ ErrNoNetworkAccess
+ };
+
+ enum RequestType {
+ RequestNone,
+ RequestEnumerateNetworks,
+ RequestGetNetworkInfo,
+ RequestGetCurrentNetworkInfo,
+ RequestGetNetworkSearchMode,
+ RequestSetNetwork,
+ RequestSetNetworkMode,
+ RequestSetNetworkAutomatic
+ };
+
+ enum RegistrationStatus {
+ RegisteredOnHomeNetwork,
+ RegisteredRoaming
+ };
+
+ enum NetworkAccessMode {
+ AccessModeDual,
+ AccessModeUmts,
+ AccessModeGsm
+ };
+
+ struct NetworkId{
+ /*! Country code. Maximum length is 4. */
+ QString m_countryCode;
+ /*! Network code. Maximum length is 8. */
+ QString m_networkCode;
+ };
+
+ enum NetworkSelectionMode {
+ SelectionModeManual,
+ SelectionModeAutomatic
+ };
+
+ enum NetworkStatus {
+ StatusUnknown,
+ StatusAvailable,
+ StatusCurrent,
+ StatusForbidden
+ };
+
+ enum NetworkAccessType {
+ AccessTypeGsm,
+ AccessTypeWcdma
+ };
+
+ struct NetworkInfo {
+ NetworkId m_id;
+ NetworkStatus m_status;
+ NetworkSelectionMode m_mode;
+ NetworkAccessType m_access;
+ /*! Short name. Maximum length is 20. */
+ QString m_shortName;
+ /*! Long name. Maximum length is 30. */
+ QString m_longName;
+ };
+
+public:
+
+ explicit PSetNetworkWrapper(CPsetContainer &psetContainer,
+ QObject *parent = NULL);
+
+ virtual ~PSetNetworkWrapper();
+
+public:
+
+ void getAvailableNetworks();
+
+ ErrorCode getNetworkSelectionMode(
+ PSetNetworkWrapper::NetworkSelectionMode& mode) const;
+
+ void selectNetwork(
+ const PSetNetworkWrapper::NetworkInfo& info);
+
+ void cancelRequest();
+
+public:
+
+ void getNetworkAccessMode() const;
+
+ void setNetworkAccessMode(PSetNetworkWrapper::NetworkAccessMode mode);
+
+signals:
+
+ // Real type of parameter mode is enum PSetNetworkWrapper::NetworkAccessMode.
+ void networkAccessModeGot(int mode);
+
+ void availableNetworksGot(QList<PSetNetworkWrapper::NetworkInfo*> &networkInfoList);
+
+ void networkReqestFailed(
+ PSetNetworkWrapper::ErrorCode error,
+ PSetNetworkWrapper::RequestType type);
+
+ void searchingNetworks(PSetNetworkWrapper::RequestType &type);
+
+ void requestingSelectedNetwork(bool ongoing);
+
+ void networkChanged(
+ PSetNetworkWrapper::NetworkInfo& currentInfo,
+ PSetNetworkWrapper::RegistrationStatus& status);
+
+private:
+
+ PSetNetworkWrapper(const PSetNetworkWrapper &);
+ PSetNetworkWrapper &operator=(const PSetNetworkWrapper &);
+ PSetNetworkWrapperPrivate* m_privateImpl;
+ friend class PSetNetworkWrapperPrivate;
+};
+
+#endif // PSETNETWORKWRAPPER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/phone_settings_api/inc/psetwrapper.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#ifndef PSETWRAPPER_H
+#define PSETWRAPPER_H
+
+#include <QObject>
+
+class CPsetContainer;
+class PSetCliWrapper;
+class PSetCallWaitingWrapper;
+class PSetCallDivertingWrapper;
+class PSetNetworkWrapper;
+
+#ifdef BUILD_PSETWRAPPER
+#define PSETWRAPPER_EXPORT Q_DECL_EXPORT
+#else
+#define PSETWRAPPER_EXPORT Q_DECL_IMPORT
+#endif
+
+class PSETWRAPPER_EXPORT PSetWrapper: public QObject
+{
+ Q_OBJECT
+
+public:
+
+ explicit PSetWrapper(QObject *parent = NULL);
+
+ ~PSetWrapper();
+
+public: // Functions:
+ /**
+ Returns reference to call line identification settings.
+ @exception bad alloc if creations fails
+ */
+ PSetCliWrapper& cliWrapper();
+
+ /**
+ Returns reference to call waiting settings.
+ @exception bad alloc, if creations fails.
+ */
+ PSetCallWaitingWrapper& callWaitingWrapper();
+
+ /**
+ Returns reference to call diverting settings.
+ @exception bad alloc, if creations fails.
+ */
+ PSetCallDivertingWrapper& callDivertingWrapper();
+
+ /**
+ Returns reference to network settings.
+ @exception bad alloc, if creations fails.
+ */
+ PSetNetworkWrapper& networkWrapper();
+
+private: // Data:
+ // Own
+ CPsetContainer *m_psetContainer;
+
+ // Phone setting handlers
+ PSetCliWrapper *m_wrapperCli;
+
+ PSetCallWaitingWrapper *m_callWaitingWrapper;
+
+ PSetCallDivertingWrapper *m_callDivertingWrapper;
+
+ PSetNetworkWrapper *m_networkWrapper;
+
+};
+#endif // PSETWRAPPER
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/phone_settings_api/inc/psetwrappertypes.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,85 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef PSETWRAPPERTYPES_H
+#define PSETWRAPPERTYPES_H
+
+#include <qglobal.h>
+
+const int maxBscNumber = 13; //max. number of basic service groups
+const int maxPsuiItemLength = 32;//max. length of text in PSUI note
+
+// Status of Calling Identity.
+enum PsCallLineIdentity
+{
+ ClirOn = 1,
+ ClirOff,
+ ClipOn,
+ ClipOff,
+ ColrOn,
+ ColrOff,
+ ColpOn,
+ ColpOff,
+ CliUnknown
+};
+
+//call forwarding statuses
+enum PsCallDivertingStatus
+{
+ DivertingStatusActive,
+ DivertingStatusInactive,
+ DivertingStatusNotRegistered,
+ DivertingStatusNotProvisioned,
+ DivertingStatusUnknown
+};
+
+//call forwarding conditions
+enum PsCallDivertingCondition
+{
+ DivertConditionUnknown,
+ DivertConditionUnconditional,
+ DivertConditionBusy,
+ DivertConditionNoReply,
+ DivertConditionNotReachable,
+ DivertConditionAllCalls,
+ DivertConditionAllConditionalCases
+};
+
+//call forwarding actions
+enum PsCallDivertingSetting
+{
+ ActivateDiverting,
+ CancelDiverting,
+ RegisterDiverting,
+ EraseDiverting,
+ CheckStatus
+};
+
+// basic teleservice groups (ETSI Gsm 02.03 and 02.04)
+enum PsService
+{
+ ServiceGroupUnknown = 0x00000000,
+ ServiceGroupVoice = 0x00000001,
+ ServiceGroupData = 0x00000002,
+ ServiceGroupFax = 0x00000004,
+ ServiceGroupAllTeleservices = ServiceGroupVoice | ServiceGroupData
+ | ServiceGroupFax
+};
+typedef QFlags<PsService> PsServiceGroup;
+
+
+#endif // PSETWRAPPERTYPES_H
--- a/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiBarringObs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiBarringObs.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
#define CPSUIBARRINGOBS_H
// INCLUDES
-#include <MPsetBarringObs.h>
-#include "PsuiConstants.h"
+#include <mpsetbarringobs.h>
+#include "psuiconstants.h"
// FORWARD DECLARATION
class MPsetCallBarring;
--- a/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiCliObserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiCliObserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,8 +21,8 @@
#define CPSUICLIOBSERVER_H
// INCLUDES
-#include <MPsetCliObserver.h>
-#include "PsuiConstants.h"
+#include <mpsetcliobserver.h>
+#include "psuiconstants.h"
// FORWARD DECLARATION
class CPsuiResourceLoader;
--- a/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiContainer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiContainer.h Fri Mar 19 09:40:14 2010 +0200
@@ -25,10 +25,10 @@
#define CPSUICONTAINER_H
// INCLUDES
-#include <PsuiWaitingObs.h>
-#include <PsuiDivertObs.h>
-#include <PsuiBarringObs.h>
-#include <PsuiCliObserver.h>
+#include <psuiwaitingobs.h>
+#include <psuidivertobs.h>
+#include <psuibarringobs.h>
+#include <psuicliobserver.h>
// FORWARD DECLARATIONS
class CPsuiResourceLoader;
--- a/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiDivertObs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiDivertObs.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
#define CPSUIDIVERTOBS_H
// INCLUDES
-#include <MPsetDivertObs.h>
-#include "PsuiConstants.h"
+#include <mpsetdivertobs.h>
+#include "psuiconstants.h"
// FORWARD DECLARATION
class MPsetCallDiverting;
--- a/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiWaitingObs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_notes_ui_api/inc/PsuiWaitingObs.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,8 +23,8 @@
#define CPSUIWAITINGOBS_H
// INCLUDES
-#include <MPsetCallWaitingObs.h>
-#include "PsuiConstants.h"
+#include <mpsetcallwaitingobs.h>
+#include "psuiconstants.h"
// FORWARD DECLARATION
class CPsuiResourceLoader;
--- a/phonesrv_plat/phone_settings_observer_api/inc/MPsetBarringObs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_observer_api/inc/MPsetBarringObs.h Fri Mar 19 09:40:14 2010 +0200
@@ -24,7 +24,7 @@
// INCLUDES
#include "nwdefs.h"
-#include "MPsetCallBarring.h"
+#include "mpsetcallbarring.h"
// CLASS DEFINITIONS
/**
--- a/phonesrv_plat/phone_settings_observer_api/inc/MPsetCallWaitingObs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_observer_api/inc/MPsetCallWaitingObs.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
#define MPSETCALLWAITINGOBS_H
// INCLUDES
-#include <MPsetCallWaiting.h>
+#include <mpsetcallwaiting.h>
// CLASS DEFINITIONS
class MPsetCallWaitingObserver
--- a/phonesrv_plat/phone_settings_observer_api/inc/MPsetCliObserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_observer_api/inc/MPsetCliObserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,9 +22,9 @@
// INCLUDES
#include <e32base.h>
-#include <Psuiconstants.h>
-#include "PSetConstants.h"
-#include "MPsetCli.h"
+#include <psuiconstants.h>
+#include "psetconstants.h"
+#include "mpsetcli.h"
// CLASS DEFINITIONS
/**
--- a/phonesrv_plat/phone_settings_observer_api/inc/MPsetDivertObs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_observer_api/inc/MPsetDivertObs.h Fri Mar 19 09:40:14 2010 +0200
@@ -24,7 +24,7 @@
// INCLUDES
#include <etelmm.h>
#include "nwdefs.h"
-#include "MPsetCallDiverting.h"
+#include "mpsetcalldiverting.h"
// FORWARD DECLARATIONS
class CMobilePhoneCFList;
--- a/phonesrv_plat/phone_settings_observer_api/inc/MPsetNetworkInfoObs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/phone_settings_observer_api/inc/MPsetNetworkInfoObs.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
#define MPSETNETWORKINFOOBS_H
// INCLUDES
-#include "MPsetNetworkSelect.h"
+#include "mpsetnetworkselect.h"
#include <etelmm.h>
// DATA TYPES
--- a/phonesrv_plat/service_provider_settings_api/inc/mspnotifychangeobserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/service_provider_settings_api/inc/mspnotifychangeobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -27,7 +27,7 @@
/**
* Call back interface for notify change events
*
- * Client has to implement this interface if client
+ * Client has to implement this interface if client
* need to receive settings notification change.
*
* @lib serviceprovidersettings.lib
@@ -35,23 +35,23 @@
*/
class MSPNotifyChangeObserver
{
- public:
+ public:
- /**
- * Handle notify change event
- *
- * @param aServiceId the service ID of added/changed/deleted service
- * @since S60 3.2
- */
- virtual void HandleNotifyChange( TServiceId aServiceId ) = 0;
-
- /**
- * Handle error
- *
- * @param aError error code
- * @since S60 3.2
- */
- virtual void HandleError( TInt aError ) = 0;
+ /**
+ * Handle notify change event
+ *
+ * @param aServiceId the service ID of added/changed/deleted service
+ * @since S60 3.2
+ */
+ virtual void HandleNotifyChange( TServiceId aServiceId ) = 0;
+
+ /**
+ * Handle error
+ *
+ * @param aError error code
+ * @since S60 3.2
+ */
+ virtual void HandleError( TInt aError ) = 0;
};
#endif // MSPNOTIFYCHANGEOBSERVER_H
\ No newline at end of file
--- a/phonesrv_plat/service_provider_settings_api/inc/spdefinitions.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/service_provider_settings_api/inc/spdefinitions.h Fri Mar 19 09:40:14 2010 +0200
@@ -24,29 +24,29 @@
/** Service attribute mask */
enum TPropertyServiceAttributes
- {
- ESupportsCSVoiceCall = 0x00000001, // Supports CS voice call
- ESupportsCSVideoCall = 0x00000002, // Supports CS video call
- ESupportsCSData = 0x00000004, // Supports CS data transfer
- ESupportsFax = 0x00000008, // Service supports fax
- ESupportsInternetCall = 0x00000010, // Service supports internet call
- ESupportsEmergencyCall = 0x00000020, // service supports emergency call
- ESupportsMSISDNAddressing = 0x00000040, // Service supports MSISDN addressing
- ESupportsAlphanumericAddressing = 0x00000080, // Service supports alphanumeric addressing
- EIsVisibleInCallMenu = 0x00000100, // Service is visible in call menu
- EBootstrapCallProvider = 0x00000200, // Boostrap call provider
- ESupportVoIPSS = 0x00000400, // Supports VoIP SS
- ESimplifiedConferenceCallBubble = 0x00000800 // Simplified conference call bubble
- };
-
-/** Supported feature check */
+ {
+ ESupportsCSVoiceCall = 0x00000001, // Supports CS voice call
+ ESupportsCSVideoCall = 0x00000002, // Supports CS video call
+ ESupportsCSData = 0x00000004, // Supports CS data transfer
+ ESupportsFax = 0x00000008, // Service supports fax
+ ESupportsInternetCall = 0x00000010, // Service supports internet call
+ ESupportsEmergencyCall = 0x00000020, // service supports emergency call
+ ESupportsMSISDNAddressing = 0x00000040, // Service supports MSISDN addressing
+ ESupportsAlphanumericAddressing = 0x00000080, // Service supports alphanumeric addressing
+ EIsVisibleInCallMenu = 0x00000100, // Service is visible in call menu
+ EBootstrapCallProvider = 0x00000200, // Boostrap call provider
+ ESupportVoIPSS = 0x00000400, // Supports VoIP SS
+ ESimplifiedConferenceCallBubble = 0x00000800 // Simplified conference call bubble
+ };
+
+/** Supported feature check */
enum TSPServiceFeature
- {
- ESupportInternetCallFeature, //ESupportsInternetCall + ESupportsAlphanumericAddressing + EIsVisibleInCallMenu
- ESupportCallOutFeature, //ESupportsInternetCall + ESupportsMSISDNAddressing + EIsVisibleInCallMenu
- ESupportVoIPSSFeature, //ESupportVoIPSS
- ESupportVoIPFeature //FeatureManager::FeatureSupported()+dynamic voip flag check+with subservice voip
- };
+ {
+ ESupportInternetCallFeature, //ESupportsInternetCall + ESupportsAlphanumericAddressing + EIsVisibleInCallMenu
+ ESupportCallOutFeature, //ESupportsInternetCall + ESupportsMSISDNAddressing + EIsVisibleInCallMenu
+ ESupportVoIPSSFeature, //ESupportVoIPSS
+ ESupportVoIPFeature //FeatureManager::FeatureSupported()+dynamic voip flag check+with subservice voip
+ };
/** Service provider ID not defined */
const TInt KSPNoId = 0;
@@ -135,7 +135,7 @@
EPropertyContactStoreId = 0x0002D000, // Virtual phonebook contact store ID. Set by RCSE
EPropertyServiceBookmarkUri = 0x0002E000, // Service provider bookmark URI. Set by VoIP adapter
EPropertyIncomingEmailserver = 0x0002F000, // Service incoming e-mail server
-
+
// Subproperties
// VoIP subproperties
@@ -190,7 +190,7 @@
ESubPropertyVccDtWLANHoHysteresis = 0x0004D000,
ESubPropertyVccDtWLANHoHysteresisTimerLow = 0x0004E000,
ESubPropertyVccDtWLANHoHysteresisTimerHigh = 0x0004F000,
- ESubPropertyVccHoNotificationToneMode = 0x00050000,
+ ESubPropertyVccHoNotificationToneMode = 0x00050000,
ESubPropertyVccDtVoipServiceId = 0x00051000,
ESubPropertyVccDtAllowedWhenCsOriginated = 0x00052000,
ESubPropertyVccAppId = 0x00053000,
@@ -218,11 +218,11 @@
/** List of subservice launching method */
enum TSPSubServiceLaunchMethod
- {
- ESPFrameWorkPlugin,
- ESPLauncherPlugin,
- ESPApplication
- };
+ {
+ ESPFrameWorkPlugin,
+ ESPLauncherPlugin,
+ ESPApplication
+ };
/** Service ID */
@@ -238,7 +238,7 @@
/** Array of service provider IDs */
typedef RArray<TServicePropertyName> RPropertyNameArray;
-/** central repsitory keys array */
+/** central repsitory keys array */
typedef RArray<TUint32> RKeyArray;
--- a/phonesrv_plat/service_provider_settings_api/inc/spentry.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/service_provider_settings_api/inc/spentry.h Fri Mar 19 09:40:14 2010 +0200
@@ -36,201 +36,201 @@
NONSHARABLE_CLASS( CSPEntry ): public CBase
{
- public: // Constructors and destructor
- /**
- * Two-phased constructor.
- */
- IMPORT_C static CSPEntry* NewL();
+ public: // Constructors and destructor
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CSPEntry* NewL();
- /**
- * Two-phased constructor.
- */
- IMPORT_C static CSPEntry* NewLC();
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CSPEntry* NewLC();
- /**
- * Destructors.
- */
- IMPORT_C virtual ~CSPEntry();
+ /**
+ * Destructors.
+ */
+ IMPORT_C virtual ~CSPEntry();
- public: // Member functions
- /**
- * Returns service Id of this entry.
- *
- * @since S60 V3.2
- * @return Service ID
- */
- IMPORT_C TServiceId GetServiceId() const;
+ public: // Member functions
+ /**
+ * Returns service Id of this entry.
+ *
+ * @since S60 V3.2
+ * @return Service ID
+ */
+ IMPORT_C TServiceId GetServiceId() const;
- /**
- * Sets unique service provider ID for this entry.
- * This ID is generated automatically when new entry is added.
- * Service ID is also required when user updates entry in service table
- *
- * @since S60 V3.2
- * @param aServiceId service ID
- */
- void SetServiceId( TServiceId aServiceId );
+ /**
+ * Sets unique service provider ID for this entry.
+ * This ID is generated automatically when new entry is added.
+ * Service ID is also required when user updates entry in service table
+ *
+ * @since S60 V3.2
+ * @param aServiceId service ID
+ */
+ void SetServiceId( TServiceId aServiceId );
- /**
- * Returns service name of this entry.
- *
- * @since S60 V3.2
- * @return Service name
- */
- IMPORT_C const TDesC& GetServiceName() const;
+ /**
+ * Returns service name of this entry.
+ *
+ * @since S60 V3.2
+ * @return Service name
+ */
+ IMPORT_C const TDesC& GetServiceName() const;
- /**
- * Sets service name for this entry.
- *
- * @since S60 V3.2
- * @param aServiceName service name
- */
- IMPORT_C TInt SetServiceName( const TDesC& aServiceName );
+ /**
+ * Sets service name for this entry.
+ *
+ * @since S60 V3.2
+ * @param aServiceName service name
+ */
+ IMPORT_C TInt SetServiceName( const TDesC& aServiceName );
- /**
- * Adds new property to this entry.
- *
- * @since S60 V3.2
- * @param aProperty new property pointer
- * @return KErrNone if addition succeeded,
- * system wide error code otherwise.
- */
- IMPORT_C TInt AddPropertyL( const CSPProperty& aProperty );
+ /**
+ * Adds new property to this entry.
+ *
+ * @since S60 V3.2
+ * @param aProperty new property pointer
+ * @return KErrNone if addition succeeded,
+ * system wide error code otherwise.
+ */
+ IMPORT_C TInt AddPropertyL( const CSPProperty& aProperty );
- /**
- * Updates content of property in this entry.
- *
- * @since S60 V3.2
- * @param aPropertyName property name
- * @param aValue new TInt value
- * @return KErrNone if update succeeded.
- */
- IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, TInt aValue );
+ /**
+ * Updates content of property in this entry.
+ *
+ * @since S60 V3.2
+ * @param aPropertyName property name
+ * @param aValue new TInt value
+ * @return KErrNone if update succeeded.
+ */
+ IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, TInt aValue );
- /**
- * Updates content of property in this entry.
- *
- * @since S60 V3.2
- * @param aPropertyName property name
- * @param aValue new TDesC value
- * @return KErrNone if update succeeded.
- */
- IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, const TDesC& aValue );
+ /**
+ * Updates content of property in this entry.
+ *
+ * @since S60 V3.2
+ * @param aPropertyName property name
+ * @param aValue new TDesC value
+ * @return KErrNone if update succeeded.
+ */
+ IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, const TDesC& aValue );
- /**
- * Updates content of property in this entry.
- *
- * @since S60 V3.2
- * @param aPropertyName property name
- * @param aValue new TOnOff value
- * @return KErrNone if update succeeded.
- */
- IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, TOnOff aValue );
+ /**
+ * Updates content of property in this entry.
+ *
+ * @since S60 V3.2
+ * @param aPropertyName property name
+ * @param aValue new TOnOff value
+ * @return KErrNone if update succeeded.
+ */
+ IMPORT_C TInt UpdateProperty( TServicePropertyName aPropertyName, TOnOff aValue );
- /**
- * Returns property of this entry by property name.
- *
- * @since S60 V3.2
- * @param aProperty On return, reference to requested property
- * @param aPropertyName Name of requested property
- * @return error code
- */
- IMPORT_C TInt GetProperty( const CSPProperty*& aProperty,
- TServicePropertyName aPropertyName ) const;
+ /**
+ * Returns property of this entry by property name.
+ *
+ * @since S60 V3.2
+ * @param aProperty On return, reference to requested property
+ * @param aPropertyName Name of requested property
+ * @return error code
+ */
+ IMPORT_C TInt GetProperty( const CSPProperty*& aProperty,
+ TServicePropertyName aPropertyName ) const;
- /**
- * Returns property of this entry by property index.
- *
- * @since S60 V3.2
- * @param aProperty On return, reference to requested property
- * @param aIndex index of requested property
- * @return error code
- */
- IMPORT_C TInt GetProperty( const CSPProperty*& aProperty,
- TInt aIndex ) const;
+ /**
+ * Returns property of this entry by property index.
+ *
+ * @since S60 V3.2
+ * @param aProperty On return, reference to requested property
+ * @param aIndex index of requested property
+ * @return error code
+ */
+ IMPORT_C TInt GetProperty( const CSPProperty*& aProperty,
+ TInt aIndex ) const;
- /**
- * Deletes property from this entry by index.
- *
- * @since S60 V3.2
- * @param aIndex index of requested property
- * @return error code
- */
- IMPORT_C TInt DeleteProperty( TInt aIndex );
+ /**
+ * Deletes property from this entry by index.
+ *
+ * @since S60 V3.2
+ * @param aIndex index of requested property
+ * @return error code
+ */
+ IMPORT_C TInt DeleteProperty( TInt aIndex );
- /**
- * Deletes property from this entry by property name.
- *
- * @since S60 V3.2
- * @param aProperty property name
- * @return error code
- */
- IMPORT_C TInt DeleteProperty( TServicePropertyName aProperty );
+ /**
+ * Deletes property from this entry by property name.
+ *
+ * @since S60 V3.2
+ * @param aProperty property name
+ * @return error code
+ */
+ IMPORT_C TInt DeleteProperty( TServicePropertyName aProperty );
- /**
- * Returns all properties of this entry.
- *
- * @since S60 V3.2
- * @return Reference to array of properties
- */
- IMPORT_C const RPropertyArray& GetAllProperties() const;
+ /**
+ * Returns all properties of this entry.
+ *
+ * @since S60 V3.2
+ * @return Reference to array of properties
+ */
+ IMPORT_C const RPropertyArray& GetAllProperties() const;
- /**
- * Returns count of properties in this entry
- *
- * @since S60 V3.2
- * @return Count of properties
- */
- IMPORT_C TInt PropertyCount() const;
-
- /**
- * reset service entry
- *
- * @since S60 V3.2
- * @return Count of properties
- */
- IMPORT_C void Reset();
-
+ /**
+ * Returns count of properties in this entry
+ *
+ * @since S60 V3.2
+ * @return Count of properties
+ */
+ IMPORT_C TInt PropertyCount() const;
+
+ /**
+ * reset service entry
+ *
+ * @since S60 V3.2
+ * @return Count of properties
+ */
+ IMPORT_C void Reset();
+
- private:
+ private:
- /**
- * C++ default constructor.
- */
- CSPEntry();
+ /**
+ * C++ default constructor.
+ */
+ CSPEntry();
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
- /**
- * Search index of requested property in iPropertyArray
- *
- * @since S60 ?S60_version
- * @param aProperty
- * @return Index of property or KErrNotFound
- */
- TInt SearchProperty( TServicePropertyName aProperty ) const;
+ /**
+ * Search index of requested property in iPropertyArray
+ *
+ * @since S60 ?S60_version
+ * @param aProperty
+ * @return Index of property or KErrNotFound
+ */
+ TInt SearchProperty( TServicePropertyName aProperty ) const;
- private: // data
+ private: // data
- /**
- * Id of service settings entry ( unique )
- */
- TServiceId iServiceId;
+ /**
+ * Id of service settings entry ( unique )
+ */
+ TServiceId iServiceId;
- /**
- * Name of settings entry ( unique )
- * Own.
- */
- RBuf iServiceName;
+ /**
+ * Name of settings entry ( unique )
+ * Own.
+ */
+ RBuf iServiceName;
- /**
- * Service settings properties owned by this entry
- * Own.
- */
- RPropertyArray iPropertyArray;
+ /**
+ * Service settings properties owned by this entry
+ * Own.
+ */
+ RPropertyArray iPropertyArray;
};
--- a/phonesrv_plat/service_provider_settings_api/inc/spnotifychange.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/service_provider_settings_api/inc/spnotifychange.h Fri Mar 19 09:40:14 2010 +0200
@@ -36,78 +36,78 @@
* @since S60 3.2
*/
NONSHARABLE_CLASS( CSPNotifyChange ): public CActive
- {
- public: // Constructor and destructor
-
- /**
- * Two-phased constructor.
- */
- IMPORT_C static CSPNotifyChange* NewL( MSPNotifyChangeObserver& aObserver );
+ {
+ public: // Constructor and destructor
+
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CSPNotifyChange* NewL( MSPNotifyChangeObserver& aObserver );
- /**
- * Destructors.
- */
- IMPORT_C virtual ~CSPNotifyChange();
+ /**
+ * Destructors.
+ */
+ IMPORT_C virtual ~CSPNotifyChange();
- public:
- /**
- * Issue notify service change rquest.
- *
- * @since S60 V3.2
- * @param aServiceIds The service ID array of monitored service entries
- */
- IMPORT_C void NotifyChangeL( const RIdArray& aServiceIds );
+ public:
+ /**
+ * Issue notify service change rquest.
+ *
+ * @since S60 V3.2
+ * @param aServiceIds The service ID array of monitored service entries
+ */
+ IMPORT_C void NotifyChangeL( const RIdArray& aServiceIds );
- /**
- * Cancel notify change.
- *
- * @since S60 V3.2
- */
- IMPORT_C void NotifyChangeCancel();
+ /**
+ * Cancel notify change.
+ *
+ * @since S60 V3.2
+ */
+ IMPORT_C void NotifyChangeCancel();
- protected: // from CActive
+ protected: // from CActive
- void DoCancel();
+ void DoCancel();
- void RunL();
-
- TInt RunError( TInt aError );
+ void RunL();
+
+ TInt RunError( TInt aError );
- void Subscribe();
- private:
+ void Subscribe();
+ private:
- /**
- * C++ default constructor.
- */
- CSPNotifyChange( MSPNotifyChangeObserver& aObserver );
+ /**
+ * C++ default constructor.
+ */
+ CSPNotifyChange( MSPNotifyChangeObserver& aObserver );
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
- private:
+ private:
- /**
- * Publish & Subscribe connection
- */
- RProperty iProperty;
+ /**
+ * Publish & Subscribe connection
+ */
+ RProperty iProperty;
- /**
- * Observer object
- */
- MSPNotifyChangeObserver& iObserver;
-
- /**
- * Id array
- */
- RIdArray iIdArray;
-
- /**
- * Contains buffered P&S data
- */
- CSpsBufferedPublisher* iData;
- };
+ /**
+ * Observer object
+ */
+ MSPNotifyChangeObserver& iObserver;
+
+ /**
+ * Id array
+ */
+ RIdArray iIdArray;
+
+ /**
+ * Contains buffered P&S data
+ */
+ CSpsBufferedPublisher* iData;
+ };
#endif // CSPNOTIFYCHANGE_H
--- a/phonesrv_plat/service_provider_settings_api/inc/spproperty.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/service_provider_settings_api/inc/spproperty.h Fri Mar 19 09:40:14 2010 +0200
@@ -34,217 +34,217 @@
NONSHARABLE_CLASS( CSPProperty ): public CBase
{
- public: // Constructor and destructor
+ public: // Constructor and destructor
- /**
- * Two-phased constructor.
- */
- IMPORT_C static CSPProperty* NewL();
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CSPProperty* NewL();
- /**
- * Two-phased constructor.
- */
- IMPORT_C static CSPProperty* NewLC();
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CSPProperty* NewLC();
- /**
- * Destructors.
- */
- IMPORT_C virtual ~CSPProperty();
+ /**
+ * Destructors.
+ */
+ IMPORT_C virtual ~CSPProperty();
- public: // member functions
- /**
- * Returns the name of this property
- *
- * @since S60 V3.2
- * @return Name of property
- */
- IMPORT_C TServicePropertyName GetName() const;
+ public: // member functions
+ /**
+ * Returns the name of this property
+ *
+ * @since S60 V3.2
+ * @return Name of property
+ */
+ IMPORT_C TServicePropertyName GetName() const;
- /**
- * Sets the name for this property
- *
- * @since S60 V3.2
- * @param aPropertyname new property name
- */
- IMPORT_C TInt SetName( TServicePropertyName aPropertyname );
+ /**
+ * Sets the name for this property
+ *
+ * @since S60 V3.2
+ * @param aPropertyname new property name
+ */
+ IMPORT_C TInt SetName( TServicePropertyName aPropertyname );
- /**
- * Returns the type of this property
- *
- * @since S60 V3.2
- * @return Type of property
- */
- IMPORT_C TSPItemType GetPropertyType() const;
+ /**
+ * Returns the type of this property
+ *
+ * @since S60 V3.2
+ * @return Type of property
+ */
+ IMPORT_C TSPItemType GetPropertyType() const;
- /**
- * Sets the type for this property
- *
- * @since S60 V3.2
- * @param aPropertyType property type
- */
- TInt SetPropertyType( TSPItemType aPropertyType );
+ /**
+ * Sets the type for this property
+ *
+ * @since S60 V3.2
+ * @param aPropertyType property type
+ */
+ TInt SetPropertyType( TSPItemType aPropertyType );
- /**
- * Returns the datatype of this property
- * No imported, set automatically.
- *
- * @since S60 V3.2
- * @return Datatype of property
- */
- IMPORT_C TPropertyDataType GetDataType() const;
+ /**
+ * Returns the datatype of this property
+ * No imported, set automatically.
+ *
+ * @since S60 V3.2
+ * @return Datatype of property
+ */
+ IMPORT_C TPropertyDataType GetDataType() const;
- /**
- * Sets the datatype of this property
- *
- * @since S60 V3.2
- * @param aDataType new data type
- */
- void SetDataType( TPropertyDataType aDataType );
+ /**
+ * Sets the datatype of this property
+ *
+ * @since S60 V3.2
+ * @param aDataType new data type
+ */
+ void SetDataType( TPropertyDataType aDataType );
- /**
- * Returns value of property
- *
- * @since S60 V3.2
- * @param aValue on return, TInt value
- * @return Error code
- */
- IMPORT_C TInt GetValue( TInt& aValue ) const;
+ /**
+ * Returns value of property
+ *
+ * @since S60 V3.2
+ * @param aValue on return, TInt value
+ * @return Error code
+ */
+ IMPORT_C TInt GetValue( TInt& aValue ) const;
- /**
- * Sets value of property. Value must match to datatype.
- *
- * @since S60 V3.2
- * @param aValue new TInt value to be set
- * @return Error code
- */
- IMPORT_C TInt SetValue( TInt aValue );
+ /**
+ * Sets value of property. Value must match to datatype.
+ *
+ * @since S60 V3.2
+ * @param aValue new TInt value to be set
+ * @return Error code
+ */
+ IMPORT_C TInt SetValue( TInt aValue );
- /**
- * Returns value of property
- *
- * @since S60 V3.2
- * @param aValue on return, descriptor value
- * @return Error code
- */
- IMPORT_C TInt GetValue( TDes& aValue ) const;
+ /**
+ * Returns value of property
+ *
+ * @since S60 V3.2
+ * @param aValue on return, descriptor value
+ * @return Error code
+ */
+ IMPORT_C TInt GetValue( TDes& aValue ) const;
- /**
- * Sets the value of property. Value must match to datatype.
- *
- * @since S60 V3.2
- * @param aValue new descriptor
- * @return Error code
- */
- IMPORT_C TInt SetValue( const TDesC& aValue );
+ /**
+ * Sets the value of property. Value must match to datatype.
+ *
+ * @since S60 V3.2
+ * @param aValue new descriptor
+ * @return Error code
+ */
+ IMPORT_C TInt SetValue( const TDesC& aValue );
- /**
- * Returns value of property
- *
- * @since S60 V3.2
- * @param aValue on return, On/Off value
- * @return Error code
- */
- IMPORT_C TInt GetValue( TOnOff& aValue ) const;
+ /**
+ * Returns value of property
+ *
+ * @since S60 V3.2
+ * @param aValue on return, On/Off value
+ * @return Error code
+ */
+ IMPORT_C TInt GetValue( TOnOff& aValue ) const;
- /**
- * Sets the value of property. Value must match to datatype.
- *
- * @since S60 V3.2
- * @param aValue new On/Off value
- * @return Error code
- */
- IMPORT_C TInt SetValue( TOnOff aValue );
+ /**
+ * Sets the value of property. Value must match to datatype.
+ *
+ * @since S60 V3.2
+ * @param aValue new On/Off value
+ * @return Error code
+ */
+ IMPORT_C TInt SetValue( TOnOff aValue );
- /**
- * Sets the value of this property without datatype check
- *
- * @since S60 V3.2
- * @param aValue new value
- * @return Error code
- */
- TInt SetValueNoDataTypeCheck( const TDesC& aValue );
+ /**
+ * Sets the value of this property without datatype check
+ *
+ * @since S60 V3.2
+ * @param aValue new value
+ * @return Error code
+ */
+ TInt SetValueNoDataTypeCheck( const TDesC& aValue );
- /**
- * Returns datatype of given property
- *
- * @since S60 V3.2
- * @param aProperty property name
- * @return Datatype of given property
- */
- IMPORT_C static TPropertyDataType DataType( TServicePropertyName aProperty );
-
- /**
- * Returns property type of given property
- *
- * @since S60 V3.2
- * @param aProperty property name
- * @return property type of given property
- */
- IMPORT_C static TSPItemType PropertyType( TServicePropertyName aProperty );
+ /**
+ * Returns datatype of given property
+ *
+ * @since S60 V3.2
+ * @param aProperty property name
+ * @return Datatype of given property
+ */
+ IMPORT_C static TPropertyDataType DataType( TServicePropertyName aProperty );
+
+ /**
+ * Returns property type of given property
+ *
+ * @since S60 V3.2
+ * @param aProperty property name
+ * @return property type of given property
+ */
+ IMPORT_C static TSPItemType PropertyType( TServicePropertyName aProperty );
- /**
- * Copies data from source property // to be removed?
- *
- * @since S60 V3.2
- * @param aSource source property
- */
- IMPORT_C void CopyL( const CSPProperty& aSource );
+ /**
+ * Copies data from source property // to be removed?
+ *
+ * @since S60 V3.2
+ * @param aSource source property
+ */
+ IMPORT_C void CopyL( const CSPProperty& aSource );
- /**
- * Compares data of this property to another.
- *
- * @since S60 V3.2
- * @param aProperty property to be compared
- * @return ETrue if properties have same data
- */
- IMPORT_C TBool operator==(
- const CSPProperty& aProperty ) const;
+ /**
+ * Compares data of this property to another.
+ *
+ * @since S60 V3.2
+ * @param aProperty property to be compared
+ * @return ETrue if properties have same data
+ */
+ IMPORT_C TBool operator==(
+ const CSPProperty& aProperty ) const;
- private:
+ private:
- /**
- * C++ default constructor.
- */
- CSPProperty();
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
+ /**
+ * C++ default constructor.
+ */
+ CSPProperty();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
- /**
- * Sets default value of property if defined
- *
- * @since S60 V3.2
- * @param aProperty property name
- * @return An error code
- */
- TInt SetDefaultValue( TServicePropertyName aProperty );
+ /**
+ * Sets default value of property if defined
+ *
+ * @since S60 V3.2
+ * @param aProperty property name
+ * @return An error code
+ */
+ TInt SetDefaultValue( TServicePropertyName aProperty );
- private: // data
+ private: // data
- /**
- * Descriptor of property value
- * Own.
- */
- RBuf iPropertyValue;
+ /**
+ * Descriptor of property value
+ * Own.
+ */
+ RBuf iPropertyValue;
- /**
- * Name of property
- */
- TServicePropertyName iPropertyName;
+ /**
+ * Name of property
+ */
+ TServicePropertyName iPropertyName;
- /**
- * Datatype of property
- */
- TPropertyDataType iDataType;
-
- /**
- * Property type
- */
- TSPItemType iPropertyType;
+ /**
+ * Datatype of property
+ */
+ TPropertyDataType iDataType;
+
+ /**
+ * Property type
+ */
+ TSPItemType iPropertyType;
};
--- a/phonesrv_plat/service_provider_settings_api/inc/spsettings.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/service_provider_settings_api/inc/spsettings.h Fri Mar 19 09:40:14 2010 +0200
@@ -50,259 +50,259 @@
NONSHARABLE_CLASS( CSPSettings ): public CBase
{
- public: // Constructors and destructor
+ public: // Constructors and destructor
- /**
- * Two-phased constructor.
- */
- IMPORT_C static CSPSettings* NewL();
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CSPSettings* NewL();
- /**
- * Two-phased constructor.
- */
- IMPORT_C static CSPSettings* NewLC();
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CSPSettings* NewLC();
- /**
- * Destructors.
- */
- IMPORT_C virtual ~CSPSettings();
+ /**
+ * Destructors.
+ */
+ IMPORT_C virtual ~CSPSettings();
- public:
+ public:
- /**
- * Stores new service provider settings entry,
- * service Id is returned inside aEntry object
- *
- * @since S60 v3.2
- * @param aEntry New service provider settings entry, on return service Id is filled in
- * @return error code
- */
- IMPORT_C TInt AddEntryL( CSPEntry& aEntry );
+ /**
+ * Stores new service provider settings entry,
+ * service Id is returned inside aEntry object
+ *
+ * @since S60 v3.2
+ * @param aEntry New service provider settings entry, on return service Id is filled in
+ * @return error code
+ */
+ IMPORT_C TInt AddEntryL( CSPEntry& aEntry );
- /**
- * Search service provider settings entry by service ID.
- *
- * @since S60 v3.2
- * @param aServiceId Id of requested xSP settings entry
- * @param aEntry on return, SP settings entry corresponding to aServiceId.
- * @return error code, KErrNone if succeeded, otherwise system wide error code
- */
- IMPORT_C TInt FindEntryL( TServiceId aServiceId, CSPEntry& aEntry );
+ /**
+ * Search service provider settings entry by service ID.
+ *
+ * @since S60 v3.2
+ * @param aServiceId Id of requested xSP settings entry
+ * @param aEntry on return, SP settings entry corresponding to aServiceId.
+ * @return error code, KErrNone if succeeded, otherwise system wide error code
+ */
+ IMPORT_C TInt FindEntryL( TServiceId aServiceId, CSPEntry& aEntry );
- /**
- * Updates service provider settings entry to settings storage.
- * Service ID must be set to entry before update.
- *
- * @since S60 v3.2
- * @param aEntry Updated service provider settings entry
- * @return error code, KErrNone if update succeeded, otherwise system wide error code
- */
- IMPORT_C TInt UpdateEntryL( const CSPEntry& aEntry );
+ /**
+ * Updates service provider settings entry to settings storage.
+ * Service ID must be set to entry before update.
+ *
+ * @since S60 v3.2
+ * @param aEntry Updated service provider settings entry
+ * @return error code, KErrNone if update succeeded, otherwise system wide error code
+ */
+ IMPORT_C TInt UpdateEntryL( const CSPEntry& aEntry );
- /**
- * Deletes service provider settings entry from storage by service ID.
- *
- * @since S60 v3.2
- * @param aEntryId Id of settings entry which is going to be deleted
- * @return error code, KErrNone if delete succeeded, otherwise system wide error code
- */
- IMPORT_C TInt DeleteEntryL( TServiceId aServiceId );
+ /**
+ * Deletes service provider settings entry from storage by service ID.
+ *
+ * @since S60 v3.2
+ * @param aEntryId Id of settings entry which is going to be deleted
+ * @return error code, KErrNone if delete succeeded, otherwise system wide error code
+ */
+ IMPORT_C TInt DeleteEntryL( TServiceId aServiceId );
- /**
- * Search property of service provider settings entry from storage.
- *
- * @since S60 v3.2
- * @param aServiceId The service ID of requested service entry
- * @param aPropertyName property name to be found
- * @param aProperty on return, requested property
- * @return error code, KErrNone if succeeded, otherwise system wide error code
- */
- IMPORT_C TInt FindPropertyL( TServiceId aServiceId,
- TServicePropertyName aPropertyName,
- CSPProperty& aProperty );
+ /**
+ * Search property of service provider settings entry from storage.
+ *
+ * @since S60 v3.2
+ * @param aServiceId The service ID of requested service entry
+ * @param aPropertyName property name to be found
+ * @param aProperty on return, requested property
+ * @return error code, KErrNone if succeeded, otherwise system wide error code
+ */
+ IMPORT_C TInt FindPropertyL( TServiceId aServiceId,
+ TServicePropertyName aPropertyName,
+ CSPProperty& aProperty );
- /**
- * Add or update properties of service provider settings entry to storage.
- * If property name exists, update property. If property doesn't exist,
- * add property
- *
- * @since S60 v3.2
- * @param aServiceId The ID of updated service entry
- * @param aPropertyArray new properties to be added or updated
- * @return error code, KErrNone if update succeeded, otherwise system wide error code
- */
- IMPORT_C TInt AddOrUpdatePropertiesL( TServiceId aServiceId,
- const RPropertyArray& aPropertyArray );
+ /**
+ * Add or update properties of service provider settings entry to storage.
+ * If property name exists, update property. If property doesn't exist,
+ * add property
+ *
+ * @since S60 v3.2
+ * @param aServiceId The ID of updated service entry
+ * @param aPropertyArray new properties to be added or updated
+ * @return error code, KErrNone if update succeeded, otherwise system wide error code
+ */
+ IMPORT_C TInt AddOrUpdatePropertiesL( TServiceId aServiceId,
+ const RPropertyArray& aPropertyArray );
- /**
- * Add or update one property of service provider settings entry to storage.
- * If property name exists, update property. If property doesn't exist,
- * add property
- *
- * @since S60 v3.2
- * @param aServiceId The ID of updated service entry
- * @param aProperty new property to be added or updated
- * @return error code, KErrNone if update succeeded, otherwise system wide error code
- */
- IMPORT_C TInt AddOrUpdatePropertyL( TServiceId aServiceId,
- const CSPProperty& aProperty );
+ /**
+ * Add or update one property of service provider settings entry to storage.
+ * If property name exists, update property. If property doesn't exist,
+ * add property
+ *
+ * @since S60 v3.2
+ * @param aServiceId The ID of updated service entry
+ * @param aProperty new property to be added or updated
+ * @return error code, KErrNone if update succeeded, otherwise system wide error code
+ */
+ IMPORT_C TInt AddOrUpdatePropertyL( TServiceId aServiceId,
+ const CSPProperty& aProperty );
- /**
- * Return count of service provider settings entries in storage.
- *
- * @since S60 v3.2
- * @return Count of stored service provider settings.
- */
- IMPORT_C TInt SettingsCountL();
+ /**
+ * Return count of service provider settings entries in storage.
+ *
+ * @since S60 v3.2
+ * @return Count of stored service provider settings.
+ */
+ IMPORT_C TInt SettingsCountL();
- /**
- * Search all service provider IDs from storage
- *
- * @since S60 v3.2
- * @param aServiceIds An array containing returned service IDs
- * @return error code
- */
- IMPORT_C TInt FindServiceIdsL( RIdArray& aServiceIds );
+ /**
+ * Search all service provider IDs from storage
+ *
+ * @since S60 v3.2
+ * @param aServiceIds An array containing returned service IDs
+ * @return error code
+ */
+ IMPORT_C TInt FindServiceIdsL( RIdArray& aServiceIds );
- /**
- * Search all service names from settings storage by given service IDs.
- * Removes ID from array if it is not found from settings storage.
- *
- * @since S60 v3.2
- * @param aServiceIds An array of service IDs
- * @param aServiceNames on return, array which saves found service names
- * @return error code
- */
- IMPORT_C TInt FindServiceNamesL( RIdArray& aServiceIds,
- CDesCArray& aServiceNames );
+ /**
+ * Search all service names from settings storage by given service IDs.
+ * Removes ID from array if it is not found from settings storage.
+ *
+ * @since S60 v3.2
+ * @param aServiceIds An array of service IDs
+ * @param aServiceNames on return, array which saves found service names
+ * @return error code
+ */
+ IMPORT_C TInt FindServiceNamesL( RIdArray& aServiceIds,
+ CDesCArray& aServiceNames );
- /**
- * Search subservice properties of requested service provider settings entry by ID
- * and subservice type
- *
- * @since S60 v3.2
- * @param aServiceId The ID of requested service entry
- * @param aPropertyType property type of sub service
- * @param aPropertyArray on return, array which saves found subservice properties
- * @return error code
- */
- IMPORT_C TInt FindSubServicePropertiesL( TServiceId aServiceId,
- TSPItemType aPropertyType,
- RPropertyArray& aPropertyArray );
+ /**
+ * Search subservice properties of requested service provider settings entry by ID
+ * and subservice type
+ *
+ * @since S60 v3.2
+ * @param aServiceId The ID of requested service entry
+ * @param aPropertyType property type of sub service
+ * @param aPropertyArray on return, array which saves found subservice properties
+ * @return error code
+ */
+ IMPORT_C TInt FindSubServicePropertiesL( TServiceId aServiceId,
+ TSPItemType aPropertyType,
+ RPropertyArray& aPropertyArray );
- /**
- * Deletes service properties by service ID and property name.
- *
- * @since S60 v3.2
- * @param aServiceId The service ID of requested service entry
- * @param aNameArray name of properties to be deleted
- * @return error code
- */
- IMPORT_C TInt DeleteServicePropertiesL( TServiceId aServiceId,
- const RPropertyNameArray& aNameArray );
-
- /**
- * Find service IDs with same properties
- *
- * @since S60 v3.2
- * @param aPropertyArray property array
- * @param on return, service Ids with same properties
- * @return error code
- */
- IMPORT_C TInt FindServiceIdsFromPropertiesL( const RPropertyArray& aPropertyArray,
- RIdArray& aServiceIds );
+ /**
+ * Deletes service properties by service ID and property name.
+ *
+ * @since S60 v3.2
+ * @param aServiceId The service ID of requested service entry
+ * @param aNameArray name of properties to be deleted
+ * @return error code
+ */
+ IMPORT_C TInt DeleteServicePropertiesL( TServiceId aServiceId,
+ const RPropertyNameArray& aNameArray );
+
+ /**
+ * Find service IDs with same properties
+ *
+ * @since S60 v3.2
+ * @param aPropertyArray property array
+ * @param on return, service Ids with same properties
+ * @return error code
+ */
+ IMPORT_C TInt FindServiceIdsFromPropertiesL( const RPropertyArray& aPropertyArray,
+ RIdArray& aServiceIds );
- /**
- * Get SIP VoIP software version.
- *
- * @since S60 v3.2
- * @return SIP VoIP software version
- */
- IMPORT_C static const TDesC& GetSIPVoIPSWVersion();
-
- /**
- * Check feature is supported or not
- *
- * @since S60 v3.2
- * @return SIP VoIP software version
- */
- IMPORT_C TBool IsFeatureSupported( TSPServiceFeature aFeature );
+ /**
+ * Get SIP VoIP software version.
+ *
+ * @since S60 v3.2
+ * @return SIP VoIP software version
+ */
+ IMPORT_C static const TDesC& GetSIPVoIPSWVersion();
+
+ /**
+ * Check feature is supported or not
+ *
+ * @since S60 v3.2
+ * @return SIP VoIP software version
+ */
+ IMPORT_C TBool IsFeatureSupported( TSPServiceFeature aFeature );
- private:
+ private:
- /**
- * C++ default constructor.
- */
- CSPSettings();
+ /**
+ * C++ default constructor.
+ */
+ CSPSettings();
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Commit or rollback transaction
- * @since S60 v3.2
- * @param aError error code of CenRep operation
- * @param aServiceId changed service Id
- * @return error code
- */
- TInt CommitOrRollbackL( TInt aError, TServiceId aServiceId );
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+ /**
+ * Commit or rollback transaction
+ * @since S60 v3.2
+ * @param aError error code of CenRep operation
+ * @param aServiceId changed service Id
+ * @return error code
+ */
+ TInt CommitOrRollbackL( TInt aError, TServiceId aServiceId );
- /**
- * Check is VoIP Service Id and then are Properties VoIP related
- *
- * @since S60 v3.2.3
- * @return KErrNotSupported if VoIP not supported and checking
- * of Service Id and Properties gives true
- */
- TInt CheckSupportedL( TServiceId aServiceId, const RPropertyNameArray& aNameArray );
-
- /**
- * Check is VoIP Service Id
- *
- * @since S60 v3.2.3
- * @return KErrNotSupported if VoIP not supported and checking
- * of Service Id gives true
- */
- TInt CheckSupportedL( TServiceId aServiceId );
+ /**
+ * Check is VoIP Service Id and then are Properties VoIP related
+ *
+ * @since S60 v3.2.3
+ * @return KErrNotSupported if VoIP not supported and checking
+ * of Service Id and Properties gives true
+ */
+ TInt CheckSupportedL( TServiceId aServiceId, const RPropertyNameArray& aNameArray );
+
+ /**
+ * Check is VoIP Service Id
+ *
+ * @since S60 v3.2.3
+ * @return KErrNotSupported if VoIP not supported and checking
+ * of Service Id gives true
+ */
+ TInt CheckSupportedL( TServiceId aServiceId );
- /**
- * Check is SP item type VoIP related
- *
- * @since S60 v3.2.3
- * @return KErrNotSupported if VoIP not supported and checking
- * of SP item type gives true
- */
- TInt CheckSupportedL( TSPItemType aPropertyType );
-
- /**
- * Check does an array have Properties VoIP related
- *
- * @since S60 v3.2.3
- * @return KErrNotSupported if VoIP not supported and checking
- * of the array gives true
- */
- TInt CheckSupportedL( const RPropertyArray& aPropertyArray );
+ /**
+ * Check is SP item type VoIP related
+ *
+ * @since S60 v3.2.3
+ * @return KErrNotSupported if VoIP not supported and checking
+ * of SP item type gives true
+ */
+ TInt CheckSupportedL( TSPItemType aPropertyType );
+
+ /**
+ * Check does an array have Properties VoIP related
+ *
+ * @since S60 v3.2.3
+ * @return KErrNotSupported if VoIP not supported and checking
+ * of the array gives true
+ */
+ TInt CheckSupportedL( const RPropertyArray& aPropertyArray );
- private: // data
+ private: // data
- /**
- * Settings engine
- * Own.
- */
- CSPSettingsEngine* iSettingsEngine;
+ /**
+ * Settings engine
+ * Own.
+ */
+ CSPSettingsEngine* iSettingsEngine;
- /**
- * Feature manager support VoIP
- * Own.
- */
- TBool iFeatureManagerSupportVoIP;
+ /**
+ * Feature manager support VoIP
+ * Own.
+ */
+ TBool iFeatureManagerSupportVoIP;
/**
* Writing settings allowed
*/
--- a/phonesrv_plat/service_provider_settings_api/inc/spsettingsvoiputils.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/service_provider_settings_api/inc/spsettingsvoiputils.h Fri Mar 19 09:40:14 2010 +0200
@@ -33,51 +33,51 @@
*/
NONSHARABLE_CLASS( CSPSettingsVoIPUtils ): public CBase
{
- public: // Constructors and destructor
+ public: // Constructors and destructor
- /**
- * Two-phased constructor.
- */
- IMPORT_C static CSPSettingsVoIPUtils* NewL();
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CSPSettingsVoIPUtils* NewL();
- /**
- * Two-phased constructor.
- */
- IMPORT_C static CSPSettingsVoIPUtils* NewLC();
+ /**
+ * Two-phased constructor.
+ */
+ IMPORT_C static CSPSettingsVoIPUtils* NewLC();
- /**
- * Destructors.
- */
- IMPORT_C virtual ~CSPSettingsVoIPUtils();
+ /**
+ * Destructors.
+ */
+ IMPORT_C virtual ~CSPSettingsVoIPUtils();
- public:
+ public:
- /**
- * Checks is there any VoIP profiles available in service table.
- *
- * @since S60 v3.2
- * @return ETrue if there is at least one VoIP profile.
- */
- IMPORT_C TBool VoIPProfilesExistL() const;
+ /**
+ * Checks is there any VoIP profiles available in service table.
+ *
+ * @since S60 v3.2
+ * @return ETrue if there is at least one VoIP profile.
+ */
+ IMPORT_C TBool VoIPProfilesExistL() const;
- /**
- * Checks is VoIP supported.
- *
- * @since S60 v3.2
- * @return ETrue if Common Voip and Dynamic VoIP are ON
-. */
- IMPORT_C TBool IsVoIPSupported() const;
+ /**
+ * Checks is VoIP supported.
+ *
+ * @since S60 v3.2
+ * @return ETrue if Common Voip and Dynamic VoIP are ON
+. */
+ IMPORT_C TBool IsVoIPSupported() const;
- /**
- * Checks the preferred telephony
- *
- * @since S60 v3.2
- * @return ETrue if Common Voip (Feature Manager),
- * Dynamic VoIP (Telephony settings) and
- * Preferred telephony (Rich call settings) are ON and
- * there is at least one SIP-VoIP profile stored
- */
- IMPORT_C TBool IsPreferredTelephonyVoIP() const;
+ /**
+ * Checks the preferred telephony
+ *
+ * @since S60 v3.2
+ * @return ETrue if Common Voip (Feature Manager),
+ * Dynamic VoIP (Telephony settings) and
+ * Preferred telephony (Rich call settings) are ON and
+ * there is at least one SIP-VoIP profile stored
+ */
+ IMPORT_C TBool IsPreferredTelephonyVoIP() const;
/**
* Get the preferred service id
@@ -86,41 +86,41 @@
* @return KErrNone if preferred service found.
*/
IMPORT_C TInt GetPreferredService( TUint& aServiceId ) const;
-
- private:
+
+ private:
- /**
- * C++ default constructor.
- */
- CSPSettingsVoIPUtils();
+ /**
+ * C++ default constructor.
+ */
+ CSPSettingsVoIPUtils();
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
- /**
- * Checks is there any VoIP profiles available in service table.
- */
- TBool IsVoIPSupportedL() const;
+ /**
+ * Checks is there any VoIP profiles available in service table.
+ */
+ TBool IsVoIPSupportedL() const;
- /**
- * Checks the preferred telephony.
- */
- TBool IsPreferredTelephonyVoIPL() const;
+ /**
+ * Checks the preferred telephony.
+ */
+ TBool IsPreferredTelephonyVoIPL() const;
/**
* Gets the preferred service id.
*/
void DoGetPreferredServiceL( TUint& aServiceId ) const;
- private: // data
+ private: // data
- /**
- * Settings engine
- * Own.
- */
- CSPSettingsEngine* iSettingsEngine;
+ /**
+ * Settings engine
+ * Own.
+ */
+ CSPSettingsEngine* iSettingsEngine;
};
--- a/phonesrv_plat/ss_settings_api/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/ss_settings_api/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -28,3 +28,5 @@
../inc/MSSSettingsObserver.h MW_LAYER_PLATFORM_EXPORT_PATH(MSSSettingsObserver.h)
../inc/RCustomerServiceProfileCache.h MW_LAYER_PLATFORM_EXPORT_PATH(RCustomerServiceProfileCache.h)
../inc/RSSSettings.h MW_LAYER_PLATFORM_EXPORT_PATH(RSSSettings.h)
+../inc/sssettingswrappertypes.h MW_LAYER_PLATFORM_EXPORT_PATH(sssettingswrappertypes.h)
+../inc/sssettingswrapper.h MW_LAYER_PLATFORM_EXPORT_PATH(sssettingswrapper.h)
\ No newline at end of file
--- a/phonesrv_plat/ss_settings_api/inc/MSSSettingsObserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/ss_settings_api/inc/MSSSettingsObserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define MSSSETTINGSOBSERVER_H
// INCLUDES
-#include <RSSSettings.h>
+#include <RSSSettings.h>
// CLASS DECLARATION
--- a/phonesrv_plat/ss_settings_api/inc/MSSSettingsRefreshObserver.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/ss_settings_api/inc/MSSSettingsRefreshObserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -24,7 +24,7 @@
// INCLUDES
#include <e32std.h>
#include <etelsat.h>
-#include <MSatRefreshObserver.h>
+#include <msatrefreshobserver.h>
// DATA TYPES
--- a/phonesrv_plat/ss_settings_api/inc/RSSSettings.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/ss_settings_api/inc/RSSSettings.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,7 +23,7 @@
// INCLUDES
#include <etelmm.h>
-#include <RCustomerServiceProfileCache.h>
+#include <RCustomerServiceProfileCache.h>
// DATA TYPES
@@ -193,7 +193,7 @@
* @param aObserver observer.
* @return error code. KErrNone: observer is added
* KErrAlreadyExists: observer is already added
- * KErrNotReady: Possible when BT SAP is on.
+ * KErrNotReady: Possible when BT SAP is on.
* KErrNotSupported: Possible with ALS.
* other: observer not registered
*/
@@ -301,8 +301,8 @@
*/
TInt IsALSSupported( TInt aPpAlsValue, TInt aSimAlsValue,
TBool aAlsCspSupport, TInt aAlsCspError ) const;
-
- // Gets ALS setting value.
+
+ // Gets ALS setting value.
TInt GetALSSettingValue( TInt& aValue, const TInt aSimState );
// Prohibit copy constructor if not deriving from CBase.
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/ss_settings_api/inc/sssettingswrapper.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef SSSETTINGSWRAPPER_H
+#define SSSETTINGSWRAPPER_H
+
+
+#include <QObject>
+#include <sssettingswrappertypes.h>
+
+class RSSSettings;
+class SsSettingsWrapperPrivate;
+
+#ifdef BUILD_SSSETTINGSWRAPPER
+#define SSSETTINGSWRAPPER_EXPORT Q_DECL_EXPORT
+#else
+#define SSSETTINGSWRAPPER_EXPORT Q_DECL_IMPORT
+#endif
+
+class SSSETTINGSWRAPPER_EXPORT SsSettingsWrapper: public QObject
+{
+ Q_OBJECT
+
+public:
+ explicit SsSettingsWrapper(QObject *parent = NULL);
+ virtual ~SsSettingsWrapper();
+
+public: // Functions:
+ /**
+ Getter for supplementary service setting values.
+ @param setting Enumeration of which setting is get.
+ @param value Setting value.
+ @return Zero if no error occurred.
+ */
+ int get(SsSettingsWrapperSettings setting, int &value);
+
+ /**
+ Setter for supplementary service setting values.
+ @param setting Enumeration of which setting is set.
+ @param value Setting value.
+ @return Zero if no error occurred.
+ */
+ int set(SsSettingsWrapperSettings setting, int value );
+
+signals:
+ /**
+ Signals when supplementary setting value changes.
+ @param setting Enumeration of which setting is changed.
+ @param value Setting value.
+ */
+ void phoneSettingChanged(
+ SsSettingsWrapperSettings setting,
+ int newValue );
+
+private: // Data:
+ // Own
+ RSSSettings *m_ssSettings;
+
+ // Wrapper
+ // Own
+ SsSettingsWrapperPrivate* m_Priv;
+ friend class SsSettingsWrapperPrivate;
+
+};
+#endif // SSSETTINGSWRAPPER
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/ss_settings_api/inc/sssettingswrappertypes.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#ifndef SSSETTINGSWRAPPERTYPES_H_
+#define SSSETTINGSWRAPPERTYPES_H_
+
+
+/**
+* It enumerates all SSSettings settings.
+*
+* Cug - closed user group setting,
+* for some values see TSSSettingsCugValue.
+* Clir - default setting for calling line identification
+* restriction, see SsSettingsWrapperClirValue.
+* Als - selected line, see SsSettingsWrapperAlsValue.
+* AlsBlocking - line selection blocking, see SsSettingsWrapperAlsBlockingValue.
+* DefaultCug - value for cug default.
+*/
+typedef enum {
+ Cug = 0, // == ESSSettingsCug
+ Clir = 1, // == ESSSettingsClir
+ Als = 2, // == ESSSettingsAls
+ AlsBlocking = 3, // == ESSSettingsAlsBlocking
+ DefaultCug = 4 // == ESSSettingsCugDefault
+ } SsSettingsWrapperSettings;
+
+/**
+* Translation table for TSSSettingsAlsValue
+* It enumerates all values for ALS.
+*
+* AlsNotSupported - ALS not supported, always primary line.
+* AlsPrimary - ALS supported, primary line selected.
+* AlsAlternate - ALS supported, alternate line selected.
+*/
+typedef enum {
+ AlsNotSupported = 0, // == TSSSettingsAlsValue::ESSSettingsAlsNotSupported
+ AlsPrimary = 1, // == TSSSettingsAlsValue::ESSSettingsAlsPrimary
+ AlsAlternate = 2 // == TSSSettingsAlsValue::ESSSettingsAlsAlternate
+ } SsSettingsWrapperAlsValue;
+
+/**
+* Translation table for TSSSettingsAlsBlockingValue
+* It enumerates all values for ALS blocking.
+*
+* AlsBlockingNotSupported - ALS blocking not supported.
+* AlsBlockingOff - ALS blocking off.
+* AlsBlockingOn - ALS blocking on.
+*/
+typedef enum {
+ AlsBlockingNotSupported = 0, // == ESSSettingsAlsBlockingNotSupported,
+ AlsBlockingOff, // == ESSSettingsAlsBlockingOff
+ AlsBlockingOn // == ESSSettingsAlsBlockingOn
+ } SsSettingsWrapperAlsBlockingValue;
+
+/**
+* It enumerates all values for CLIR.
+*
+* ClirNetworkDefault - use network default
+* ClirExplicitInvoke - by default, invoke CLIR
+* ClirExplicitSuppress - by default, suppress CLIR
+*/
+typedef enum {
+ ClirNetworkDefault, // == ESSSettingsClirNetworkDefault
+ ClirExplicitInvoke, // == ESSSettingsClirExplicitInvoke
+ ClirExplicitSuppress // == ESSSettingsClirExplicitSuppress
+ } SsSettingsWrapperClirValue;
+
+#endif /* SSSETTINGSWRAPPERTYPES_H_ */
--- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmEmergencyNumberHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmEmergencyNumberHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMEMERGENCYNUMBERHANDLER_H
// INCLUDES
-#include "CPhoneGsmHandlerBase.h"
+#include "cphonegsmhandlerbase.h"
// CLASS DECLARATION
--- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmHandlerContainer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmHandlerContainer.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <e32base.h>
-#include "CPhoneGsmHandlerBase.h"
+#include "cphonegsmhandlerbase.h"
// CLASS DECLARATION
--- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmManufacturerHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmManufacturerHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMMANUFACTURERHANDLER_H
// INCLUDES
-#include "CPhoneGsmHandlerBase.h"
+#include "cphonegsmhandlerbase.h"
// CLASS DECLARATION
--- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmMiscHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmMiscHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMMISCHANDLER_H
// INCLUDES
-#include "CPhoneGsmHandlerBase.h"
+#include "cphonegsmhandlerbase.h"
// CLASS DECLARATION
--- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmParserResult.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmParserResult.h Fri Mar 19 09:40:14 2010 +0200
@@ -135,7 +135,7 @@
};
-#include "CPhoneGsmParserResult.inl"
+#include "cphonegsmparserresult.inl"
#endif // CPHONEGSMPARSERRESULT_H
--- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmPcnProcedureHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmPcnProcedureHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMPCNPROCEDUREHANDLER_H
// INCLUDES
-#include "CPhoneGsmHandlerBase.h"
+#include "cphonegsmhandlerbase.h"
// CLASS DECLARATION
--- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmPhoneNumberHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmPhoneNumberHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMPHONENUMBERHANDLER_H
// INCLUDES
-#include "CPhoneGsmHandlerBase.h"
+#include "cphonegsmhandlerbase.h"
// CLASS DECLARATION
--- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmSimControlHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmSimControlHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMSIMCONTROLHANDLER_H
// INCLUDES
-#include "CPhoneGsmHandlerBase.h"
+#include "cphonegsmhandlerbase.h"
// CLASS DECLARATION
--- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmSsCallHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmSsCallHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMSSCALLHANDLER_H
// INCLUDES
-#include "CPhoneGsmHandlerBase.h"
+#include "cphonegsmhandlerbase.h"
// CLASS DECLARATION
--- a/phonesrv_plat/string_parser_api/inc/CPhoneGsmSsHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/string_parser_api/inc/CPhoneGsmSsHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMSSHANDLER_H
// INCLUDES
-#include "CPhoneGsmHandlerBase.h"
+#include "cphonegsmhandlerbase.h"
// FORWARD DECLARATIONS
class CPhoneGsmParserResult;
--- a/phonesrv_plat/string_parser_api/inc/CPhoneVoipNumberHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/string_parser_api/inc/CPhoneVoipNumberHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEVOIPNUMBERHANDLER_H
// INCLUDES
-#include "CPhoneGsmHandlerBase.h"
+#include "cphonegsmhandlerbase.h"
// CLASS DECLARATION
--- a/phonesrv_plat/telephony_mediator_api/inc/callremotepartyinformation.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/telephony_mediator_api/inc/callremotepartyinformation.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CALLREMOTEPARTYINFORMATION_H
#include <e32base.h>
-#include <MCallRemotePartyInfo.h>
+#include <mcallremotepartyinfo.h>
class RWriteStream;
--- a/phonesrv_plat/telephony_network_information_api/inc/NetworkHandlingDomainPSKeys.h Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/telephony_network_information_api/inc/NetworkHandlingDomainPSKeys.h Fri Mar 19 09:40:14 2010 +0200
@@ -33,9 +33,9 @@
enum KNWZoneStatus
{
- ENWNone,
- ENWCityZone,
- ENWHomeZone
+ ENWNone,
+ ENWCityZone,
+ ENWHomeZone
};
/**
--- a/phonesrv_plat/voice_mailbox_number_api/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/voice_mailbox_number_api/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -10,13 +10,11 @@
* Nokia Corporation - initial contribution.
*
* Contributors:
-*
-* Description: File that exports the files belonging to
-: Voice Mailbox Number API
+ *
+* Description:
*
*/
-
#include <platform_paths.hrh>
PRJ_PLATFORMS
@@ -24,4 +22,7 @@
PRJ_EXPORTS
-../inc/vmnumber.h MW_LAYER_PLATFORM_EXPORT_PATH(vmnumber.h)
+../inc/cvoicemailbox.h MW_LAYER_PLATFORM_EXPORT_PATH(cvoicemailbox.h)
+../inc/voicemailboxdefs.h MW_LAYER_PLATFORM_EXPORT_PATH(voicemailboxdefs.h)
+../inc/mvoicemailboxobserver.h MW_LAYER_PLATFORM_EXPORT_PATH(mvoicemailboxobserver.h)
+../inc/cvoicemailboxentry.h MW_LAYER_PLATFORM_EXPORT_PATH(cvoicemailboxentry.h)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/voice_mailbox_number_api/inc/cvoicemailbox.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,373 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Interface for fetching/saving the vmbx entries.
+* Also notify on a number change is supported.
+* Interface : External, CVoiceMailbox
+*
+*/
+
+#ifndef C_VOICEMAILBOX_H
+#define C_VOICEMAILBOX_H
+
+// INCLUDES
+#include <voicemailboxdefs.h>
+
+// FORWARD DECLARATIONS
+class MVoiceMailboxObserver;
+class CVoiceMailboxImpl;
+class CVoiceMailboxEntry;
+
+/**
+ * Parameter package for Voice Mailbox API operations.
+ *
+ * @lib vmbxengine.lib
+ * @since S60 v5.2
+ */
+class TVoiceMailboxParams
+ {
+public:
+ /**
+ * Version of parameter package.
+ */
+ IMPORT_C TInt Version();
+
+ /**
+ * Default constructor.
+ */
+ IMPORT_C TVoiceMailboxParams();
+
+ /**
+ * Constructor for CVoiceMailboxEntry
+ */
+ IMPORT_C TVoiceMailboxParams( const CVoiceMailboxEntry& aEntry );
+
+public:
+
+ /**
+ * Mailbox type.
+ */
+ TVmbxType iType;
+
+ /**
+ * Mailbox service id.
+ */
+ TServiceId iServiceId;
+
+ /**
+ * Mailbox line type.
+ * Initialized to EVmbxAlsLineDefault.
+ */
+ TVmbxAlsLineType iLineType;
+
+protected:
+
+ /**
+ * TVoiceMailboxParams package version.
+ */
+ TInt iVersion;
+
+};
+
+/**
+ * CVoiceMailbox offers an interface for fetching and saving
+ * voice mailbox entries.
+ * The API offers also services for querying a new number or to
+ * change an existing one.
+ *
+ * @code
+ *
+ * In this example user selects type of a mailbox to use. Then number
+ * of selected mailbox is fetched. If number wasn't set, then user
+ * is queried to enter a number for the selected mailbox.
+ *
+ * // Creates instance of CVoiceMailbox
+ * CVoiceMailbox* voicemailbox = CVoiceMailbox::NewLC();
+ *
+ * // Selected mailbox type
+ * TVoiceMailboxParams vmbxParams;
+ *
+ * //Launch type selection query
+ * TInt error = voicemailbox->QueryVmbxType( vmbxParams );
+ *
+ * CVoiceMailboxEntry* vmbxEntry = NULL;
+ *
+ * if ( KErrNone == error )
+ * {
+ * if ( KErrNone ==
+ * voicemailbox->GetStoredEntry( vmbxParams, vmbxEntry ) )
+ * {
+ * // Number retrieved succesfully, do appropriate tasks, e.g.:
+ * TPtrC ptrNumber( KNullDesC );
+ * TInt numError = vmbxEntry->GetVmbxNumber( ptrNumber );
+ * if ( KErrNone == numError && ptrNumber.Length() )
+ * {
+ * // Do appropriate tasks, e.g dial a call.
+ * }
+ * }
+ * }
+ * else if ( KErrNotFound == error )
+ * {
+ * // No number defined, query new entry from user
+ * error = voicemailbox->QueryNewEntry( vmbxParams, vmbxEntry );
+ * if ( KErrNone == error )
+ * {
+ * // Do appropriate tasks, e.g. save and dial a call.
+ * error = voicemailbox->SaveEntry( *vmbxEntry );
+ * // For example get the number/address using
+ * // vmbxEntry->GetVmbxNumber() and then dial a call
+ * }
+ * // else: problem getting the new number/address, e.g. skip
+ * }
+ *
+ * else
+ * {
+ * // User cancelled or no supported mailboxes configured
+ * }
+ *
+ * delete vmbxEntry; // Entry ownership was transferred
+ * vmbxEntry = NULL;
+ * CleanupStack::PopAndDestroy( voicemailbox );
+ * voicemailbox = NULL;
+ * @endcode
+ *
+ * @lib vmbxengine.lib
+ * @since S60 v5.2
+ */
+
+class CVoiceMailbox : public CBase
+ {
+public:
+
+ /**
+ * Static constructor.
+ * @return New instance of the object. Ownership transferred.
+ */
+ IMPORT_C static CVoiceMailbox* NewL();
+
+ /**
+ * Static constructor.
+ * @return New instance of the object. Ownership transferred.
+ */
+ IMPORT_C static CVoiceMailbox* NewLC();
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVoiceMailbox();
+
+public:
+
+ /**
+ * Retrieves voice mailbox entry for the specified service.
+ *
+ * @since S60 v5.2
+ * @param in Params Service id and type of the mailbox for which
+ * a number/address should be defined.
+ * @param out aEntry If successful, a new result container is
+ * created and ownership passed to the caller.
+ * @return - KErrNone if an entry is found.
+ * - KErrNotFound if no entry available
+ * - KErrArgument when illegal argument
+ * - Other system wide errors.
+ */
+ IMPORT_C virtual TInt GetStoredEntry(
+ const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry ) const;
+
+ /**
+ * Saves the vmbx entry to its storage.
+ *
+ * Some mailbox types may not support saving all arguments.
+ * In that case unsupported arguments are ignored.
+ * This method may display related UI notes or queries.
+ *
+ * @since S60 v5.2
+ * @param in aEntry The vmbx entry to save.
+ * @return - KErrNone if the entry was saved
+ * - KErrNotSupported if not capable or allowed to execute this
+ * for the specified mailbox service.
+ * - KErrArgument When illegal argument was passed.
+ * - Other system wide errors.
+ */
+ IMPORT_C virtual TInt SaveEntry( const CVoiceMailboxEntry& aEntry );
+
+ /**
+ * Displays a query asking the user to define a mailbox number/address.
+ * Returns the input which the user entered, but does not save it.
+ * For that caller has to use SaveEntry().
+ * This method may display related UI notes or queries.
+ *
+ * If editing for the specified mailbox service is not allowed,
+ * this method displays an error note and returns an error.
+ * If client is interested, CheckConfiguration()
+ * can be used to check permissions.
+ *
+ *
+ * @since S60 v5.2
+ * @param in aParams Service id and type of the mailbox for which
+ * a number/address should be defined.
+ * @param out aEntry If successful, a new result container is
+ * created and ownership passed to the caller.
+ * @return - KErrNone if the number was entered.
+ * - KErrNotFound if the number is not defined
+ * (user entered no number or selected Cancel)
+ * - KErrArgument When illegal argument.
+ * - KErrNotSupported if not capable or allowed to execute this
+ * for the specified mailbox.
+ * - Other system wide errors.
+ */
+ IMPORT_C virtual TInt QueryNewEntry(
+ const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry );
+
+ /**
+ * Displays a query asking the user to change a mailbox number/address.
+ * Returns the input from user, but does not save it.
+ * For that caller has to use SaveEntry().
+ *
+ * If editing for the specified mailbox service is not allowed,
+ * this method displays an error note and returns an error.
+ * If client is interested, CheckConfiguration()
+ * can be used to check permissions.
+ *
+ * @since S60 v5.2
+ * @param in aParams Service id and type of the mailbox.
+ * @param out aEntry If successful, a new result container is
+ * created and ownership passed to the caller.
+ * @return - KErrNone if the number was entered.
+ * aNumber will contain the vmbx number.
+ * - KErrCancel If the user selected Cancel.
+ * - KErrArgument When illegal argument.
+ * - KErrNotSupported if not capable or allowed to execute this
+ * for the specified mailbox.
+ * - Other system wide errors.
+ */
+ IMPORT_C virtual TInt QueryChangeEntry(
+ const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry );
+
+ /**
+ * Displays a query on the screen asking the user to select a
+ * Voice Mailbox service.
+ *
+ * @since S60 v5.2
+ * @param out aParams If successful,
+ * contains selected mailbox info.
+ * @return - KErrNone if successful.
+ * - KErrCancel if user selected Cancel
+ * - KErrNotFound if there is no defined voice number and
+ * user have selected the type to define or the default
+ * type given.
+ * - Other system wide errors.
+ */
+ IMPORT_C virtual TInt QueryVmbxType(
+ TVoiceMailboxParams& aParams );
+
+ /**
+ * Issues a notify request on a vmbx number/address change.
+ *
+ * The observer callback will be called whenever any vmbx number/address
+ * has changed on those mailboxes which support observing.
+ *
+ * Only one notify request can be pending. Method will leave with KErrInUse
+ * if a second request is issued while one is active already.
+ * Leaves if the notify request could not be served.
+ *
+ * @since S60 v5.2
+ * @param in aObserver The observer for the notification.
+ * @param in aNotifyOnActiveLineOnly if this is ETrue, notify events will
+ * be generated only if the vmbx number of the active ALS line is
+ * changed, not if the number of the other line is changed. When
+ * there is no ALS support, this has no effect ie. notification
+ * will be generated always.
+ */
+ IMPORT_C virtual void NotifyVmbxNumberChangeL(
+ MVoiceMailboxObserver& aObserver,
+ const TBool aNotifyOnActiveLineOnly );
+
+ /**
+ * Cancels a notify request on a vmbx number change.
+ *
+ * @since S60 v5.2
+ */
+ IMPORT_C virtual void NotifyVmbxNumberChangeCancel();
+
+ /**
+ * Checks the Voice Mailbox configuration to find out if a features
+ * are disabled or enabled.
+ *
+ * @since S60 v5.2
+ * @param in aParams Specifies which mailbox capabilities,
+ * the caller wants to check.
+ * @param in aFlags Use TVmbxFeatureCapabilityFlag values
+ * for this parameter.
+ * Specifies what features client wants to check.
+
+ * @return True if feature(s) enabled.
+ */
+ IMPORT_C virtual TBool CheckConfiguration(
+ const TVoiceMailboxParams& aParams,
+ const TInt aFlags );
+
+
+ /**
+ * Checks the Voice Mailbox how many VoIP service Ids
+ *
+ * @since S60 v5.2
+ * @param out aProfileIds
+ * @return KErrNone if get service Ids successfully.
+ */
+ IMPORT_C virtual TInt GetServiceIds( RIdArray& aProfileIds ) const;
+
+ /**
+ * Saves provisioned entry to corresponding storage.
+ *
+ * Some mailbox types may not support saving all arguments.
+ * In that case unsupported arguments are ignored.
+ *
+ * @since S60 v5.2
+ * @param in aEntry The provisioned vmbx entry to save.
+ * @return - KErrNone if the entry was saved
+ * - KErrNotSupported if not capable or allowed to execute this
+ * for the specified mailbox service.
+ * - KErrArgument When illegal argument was passed.
+ * - Other system wide errors.
+ */
+ IMPORT_C TInt SaveProvisionedEntry( const CVoiceMailboxEntry& aEntry );
+
+protected:
+
+ /**
+ * Second phase constructor.
+ *
+ * @since S60 v5.2
+ */
+ void ConstructL();
+
+ /**
+ * Default constructor.
+ *
+ * @since S60 v5.2
+ */
+ CVoiceMailbox();
+
+private: // data
+
+ /**
+ * Implementation of the client API.
+ * Own.
+ **/
+ CVoiceMailboxImpl* iBody;
+ };
+
+#endif // C_VOICEMAILBOX_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/voice_mailbox_number_api/inc/cvoicemailboxentry.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,248 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: External, CVoiceMailboxEntry
+*
+*/
+
+#ifndef C_VOICEMAILBOXENTRY_H
+#define C_VOICEMAILBOXENTRY_H
+
+#include <e32base.h>
+#include <voicemailboxdefs.h>
+
+/**
+ * Container class for Voice Mailbox info.
+ * @lib vmbxengine.lib
+ * @since S60 v5.2
+ */
+
+class CVoiceMailboxEntry : public CBase
+ {
+public:
+
+ /**
+ * Static constructor.
+ * @return New instance of the object. Ownership transferred.
+ */
+ IMPORT_C static CVoiceMailboxEntry* NewL();
+
+ /**
+ * Static constructor.
+ * @return New instance of the object. Ownership transferred.
+ */
+ IMPORT_C static CVoiceMailboxEntry* NewLC();
+
+ /**
+ * Destructor
+ * @since S60 v5.2
+ *
+ */
+ virtual ~CVoiceMailboxEntry();
+
+ /**
+ * Gets the Voice Mailbox service.
+ *
+ * @since S60 v5.2
+ * @return Mailbox service.
+ */
+ IMPORT_C virtual TServiceId ServiceId() const;
+
+ /**
+ * Sets the Voice Mailbox service to container.
+ *
+ * @since S60 v5.2
+ * @param in aVmbxServiceId Voice Mailbox service.
+ */
+ virtual void SetServiceId(
+ const TServiceId& aVmbxServiceId );
+
+ /**
+ * Gets the Voice Mailbox type.
+ *
+ * @since S60 v5.2
+ * @return Mailbox type.
+ */
+ IMPORT_C virtual TVmbxType VoiceMailboxType() const;
+
+ /**
+ * Sets the Voice Mailbox type to container.
+ *
+ * @since S60 v5.2
+ * @param in aVmbxType Voice Mailbox type.
+ */
+ IMPORT_C virtual void SetVoiceMailboxType(
+ const TVmbxType& aVmbxType );
+
+ /**
+ * Gets the Voice Mailbox line type.
+ *
+ * @since S60 v5.2
+ * @return Mailbox line type.
+ * EVmbxAlsLineDefault is returned if mailbox does not
+ * support several lines.
+ */
+ IMPORT_C virtual TVmbxAlsLineType VmbxAlsLineType() const;
+
+ /**
+ * Sets the Voice Mailbox line type to container.
+ * EVmbxAlsLineDefault is used by default.
+ *
+ * @since S60 v5.2
+ * @param in aLine Selected Voice Mailbox line type.
+ */
+ virtual void SetVmbxAlsLineType(
+ const TVmbxAlsLineType& aLine );
+
+ /**
+ * Gets the Voice Mailbox number or address.
+ *
+ * @since S60 v5.2
+ * @param out aVmbxNumber If successful, contains the returned
+ * mailbox number or address.
+ * @return One of the system wide error codes.
+ */
+ IMPORT_C virtual TInt GetVmbxNumber( TPtrC& aVmbxNumber ) const;
+
+ /**
+ * Sets the Voice Mailbox number or address to container.
+ *
+ * @since S60 v5.2
+ * @param in aVmbxNumber New Voice Mailbox number or address.
+ * @return One of the system wide error codes.
+ */
+ IMPORT_C virtual TInt SetVmbxNumber( const TDesC& aVmbxNumber );
+
+ /**
+ * Gets the Voice Mailbox brand id.
+ *
+ * @since S60 v5.2
+ * @param out aBrandId If successful, contains the returned Brand id.
+ * @return One of the system wide error codes.
+ */
+ IMPORT_C virtual TInt GetBrandId( TPtrC8& aBrandId ) const;
+
+ /**
+ * Sets the Voice Mailbox Brand Id to container.
+ *
+ * @since S60 v5.2
+ * @param in aBrandId New Brand Id.
+ * @return One of the system wide error codes.
+ */
+ virtual TInt SetBrandId(
+ const TDesC8& aBrandId );
+
+ /**
+ * Gets the VoIp name.
+ *
+ * @since S60 v5.2
+ * @param out aVmbxName If successful, contains the returned mailbox name.
+ * @return One of the system wide error codes.
+ */
+ IMPORT_C virtual TInt GetVmbxName( TPtrC& aVmbxName ) const;
+
+ /**
+ * Sets the VoIp name to container.
+ *
+ * @since S60 v5.2
+ * @param in aVmbxName New Voice Mailbox name.
+ * @return One of the system wide error codes.
+ */
+ IMPORT_C virtual TInt SetVmbxName( const TDesC& aVmbxName );
+
+ /**
+ * Gets the type of memory location.
+ *
+ * @since S60 v5.2
+ * @return Memory location type.
+ */
+ IMPORT_C virtual TVmbxMemoryLocation UsingMemoryLocation( ) const;
+
+ /**
+ * Resets the container to initial state.
+ *
+ * @since S60 v5.2
+ */
+ IMPORT_C virtual void Reset();
+
+ /**
+ * Sets the using memory location to entry.
+ *
+ * @since S60 v5.2
+ * @param in aType Memory location type.
+ */
+ virtual void SetUsingMemoryLocation(
+ const TVmbxMemoryLocation& aType );
+
+protected:
+
+ /**
+ * Second phase constructor.
+ *
+ * @since S60 v5.2
+ */
+ void ConstructL();
+
+private:
+
+ /**
+ * Default constructor.
+ *
+ * @since S60 v5.2
+ */
+
+ CVoiceMailboxEntry();
+
+private: // data
+
+ /**
+ * Mailbox service id.
+ */
+ TServiceId iVmbxServiceId;
+
+ /**
+ * Mailbox type.
+ */
+ TVmbxType iVmbxType;
+
+ /**
+ * Mailbox als line type.
+ */
+ TVmbxAlsLineType iVmbxLineType;
+
+ /**
+ * Number of vmbx.
+ * Own.
+ */
+ HBufC* ivmbxNumber;
+
+ /**
+ * Brand id of vmbx.
+ * Own.
+ */
+ HBufC8* iVmbxBrandId;
+
+ /**
+ * Name of vmbx.
+ * Own.
+ */
+ HBufC* ivmbxName;
+
+ /**
+ * Mailbox Memory location.
+ */
+ TVmbxMemoryLocation iUsingMemory;
+
+ };
+
+#endif // C_VOICEMAILBOXENTRY_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/voice_mailbox_number_api/inc/mvoicemailboxobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Notifies when mailbox numbers are changed
+* Interface : External, MVoiceMailboxObserver
+*
+*/
+
+#ifndef M_VOICEMAILBOXOBSERVER_H
+#define M_VOICEMAILBOXOBSERVER_H
+
+class CVoiceMailboxEntry;
+
+// INCLUDES
+/**
+ * Notifier for vmbx number/address changes
+ *
+ * @since S60 v5.2
+ * @lib vmbxengine.lib
+ *
+ */
+class MVoiceMailboxObserver
+ {
+public:
+
+ /**
+ * Observer callback function which is called when
+ * changes to voice mailbox entries occur.
+ *
+ * @since S60 5.2
+ * @param aVmbxEntry The new vmbx entry.
+ */
+ virtual void HandleNotifyL( const CVoiceMailboxEntry& aVmbxEntry ) = 0;
+
+ };
+
+#endif // M_VOICEMAILBOXOBSERVER_H
--- a/phonesrv_plat/voice_mailbox_number_api/inc/vmnumber.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1416 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Interface for fetching/saving the vmbx number and querying
-* for it.
-* Also notify on a number change is supported.
-*
-*/
-
-
-#ifndef VMNUMBER_H
-#define VMNUMBER_H
-
-// INCLUDES
-/*****************************************************
-* Series 60 Customer / ETel
-* Series 60 ETel API
-*****************************************************/
-#include <etelmm.h>
-#include <etelsat.h>
-#include <mmtsy_names.h>
-
-#include <PhCltTypes.h> // from PhoneClient
-
-#include <MSSSettingsObserver.h>
-#include <MSatRefreshObserver.h>
-#include <RSatSession.h>
-#include <RSatRefresh.h>
-#include <centralrepository.h>
-#include <CenRepNotifyHandler.h>
-#include <aknappui.h>
-#include <AknQueryDialog.h>
-#include <CPhCltEmergencyCall.h> // CPhCltEmergencyCall
-#include <MPhCltEmergencyCallObserver.h>
-
-// FORWARD DECLARATIONS
-
-class CVmSPSHandler;
-
-// CONSTANTS
-
-
-_LIT( KEmptyVoiceMailNumber, "" );
-
-enum TVmbxQueryType
- {
- EVmbxNotDefinedQuery, // use this
- EVmbxChangeNumberQuery // this is only for vmbx application
- };
-
-enum TVmbxNumberEntry
- {
- EAlsActiveLineEntry = 0, // currently active ALS line
- EAlsLine1Entry = 1, // ALS primary line
- EAlsLine2Entry = 2 // ALS auxiliary line
- };
-
-enum TVmbxAlsLine
- {
- EAlsLine1 = 1,
- EAlsLine2 = 2
- };
-
-enum TVmbxPhonebookOperation
- {
- EVmbxPhonebookGetInfo,
- EVmbxPhonebookRead,
- EVmbxPhonebookWrite,
- EVmbxPhonebookDelete
- };
-
-
-enum TVmbxMemoryLocation
- {
- EVmbxSimMemory = 0,
- EVmbxPhoneMemory
- };
-
-_LIT( KVmbxPanicCategory, "RVmbxNumber");
-
-enum TVmbxPanic
- {
- EVmbxNotConnected = 0,
- EVmbxDescriptorTooSmall = 1,
- EVmbxNumberTooLong = 2,
- EVmbxNoNotifyHandler = 3,
- EVmbxNoCoeEnv = 4,
- EVmbxUnhandledOperation = 5
- };
-
-enum TVmbxSimNumAcceptance
- {
- EVmbxSimNumNotAccepted = 0,
- EVmbxSimNumAccepted
- };
-
-enum TVmbxUserEditIndicator
- {
- EVmbxNotUserEdit = 0,
- EVmbxUserEdit,
- EvmbxPhoneMemForcedEdit
- };
-
-const TInt KVmbxMaxNumberLength = KPhCltTelephoneNumberLength;
-const TInt KVmbxMaxAddressLength = 100;
-
-// Phonebook entry name length
-const TInt KVmbxPhoneBookEntryNameLength = 5;
-
-// Branding id
-const TInt KVmSettingsUiBrandingIdLength = 512;
-
-// Publish & Subscribe property category definition
-
-enum TVmbxNumType
- {
- EVmbxMDN,
- EVmbxMIN
- };
-
-enum TVmbxType
- {
- EVmbx,
- EVmbxIP,
- EVmbxVideo,
- EVmbxNone
- };
-
-enum TVmbxTitle
- {
- EVmbxCall,
- EVmbxDefine
- };
-
-// Phonebook types (VMBX = 6f17)
-enum TVmSimPhoneBookTypes
- {
- EVMBXPhoneBook = 0,
- EMBDNPhoneBook
- };
-
-
-// FORWARD DECLARATIONS
-class CVmTextQueryDialog;
-class CCoeEnv;
-class CVPbkContactManager;
-class CPhCntSingleItemFetch;
-class CVMSimQueryDilaog;
-class CVmListQueryDialog;
-class CVmBSHandler;
-// CLASS DECLARATION
-
-/**
-* TVmbxEntry
-* Contains vmbx sim entry data.
-*
-* @lib vmbx.lib
-* @since 2.0
-**/
-class TVmbxEntry
- {
- public: // Constructors and destructor
-
- /**
- * C++ default constructor.
- */
- TVmbxEntry() : iIndex( 0 )
- {
- iTelNumber.FillZ();
- iTelNumber.Zero();
- };
-
- public: // Data
-
- // Data index
- TInt iIndex;
-
- // Telefony number
- TBuf16<KVmbxMaxNumberLength> iTelNumber;
-
- // Phonebook entry name
- TBuf16<KVmbxPhoneBookEntryNameLength> iText;
- };
-
-/**
-* MVmbxNotifyHandler
-*
-* @lib vmbx.lib
-* @since
-**/
-class MVmbxNotifyHandler
- {
- public:
- /**
- * Does the action user wants when a vmbx number has been changed.
- * If the parameter aNotifyOnActiveLineOnly was ETrue in notify request,
- * only a change of the vmbx number of the active ALS line causes
- * calling this.
- *
- * @param aLine ALS line of which number was changed ( 1 or 2 )
- * @param aValue the new vmbx number of that line.
- * (this reference is only valid in scope of this method)
- */
- virtual void HandleNotifyL( TInt aLine, const TDesC& aValue ) = 0;
- };
-
-
-/**
- * Observer interface for ServiceNotifier.
- *
- * @since S60 3.2
- **/
-class MServiceNotifyHandler
- {
- public:
-
- /**
- * Called when a Service profile has been changed.
- */
- virtual void HandleServiceNotifyL() = 0;
- };
-
-/**
-* MVmbxAlsObserver
-*
-* @lib vmbx.lib
-* @since
-**/
-class MVmbxAlsObserver
- {
- public:
- /**
- * Does the action user wants when the active ALS line has been changed.
- *
- * @param aLine new ALS line number ( 1 or 2 )
- **/
- virtual void HandleAlsChangeL( TVmbxAlsLine aLine ) = 0;
-
- };
-
-
-/**
- * TVmbxServiceInfo, contains Service information.
- *
- * @since S60 3.2
- **/
-class TVmbxServiceInfo
- {
- public: // Constructors and destructor
-
- TVmbxServiceInfo()
- {
- iServiceId = 0;
- iSnapId = 0;
- }
-
- public: // Data
-
- // Service's Id
- TUint iServiceId;
-
- // Service's SNAP Id
- TUint32 iSnapId;
-
- // Service's name.
- TBuf<64> iName;
-
- // Service's address.
- TBuf<KVmbxMaxAddressLength> iAddress;
- };
-
-
-/**
- * TVmbxServiceSelection, contains selected service information.
- *
- * @since S60 3.2
- **/
-class TVmbxServiceSelection
- {
- public: // Constructors and destructor
-
- TVmbxServiceSelection( TVmbxType aServiceType = EVmbxNone,
- TUint aServiceId = 0 )
- {
- iServiceType = aServiceType;
- iServiceId = aServiceId;
- }
-
- public: // Data
-
- // Service type
- TVmbxType iServiceType;
-
- // Service Id
- TUint iServiceId;
-
- };
-
-
-/**
-* RVmbxNumber
-*
-* @lib vmbx.lib
-* @since
-**/
-class RVmbxNumber : public MCenRepNotifyHandlerCallback,
- public MSSSettingsObserver,
- public MSatRefreshObserver,
- public MPhCltEmergencyCallObserver
- {
- public:
- /**
- * status for QueryNumberL.
- * EVmQueryNormal Query number running normal case
- * EVmQueryProcess Query number running FOREVER case
- */
- enum TVmVmQueryStatusType
- {
- EVmQueryNormal = 0,
- EVmQueryProcess
- };
-
- public:
-
- /**
- * C++ default constructor.
- */
- IMPORT_C RVmbxNumber();
-
- /**
- * Destructor.
- */
- IMPORT_C ~RVmbxNumber();
-
- public: // New functions
-
- /**
- * Opens the resources needed. This or the other overloaded Open() has to
- * be called successfully before doing anything else.
- *
- * ----------------------------------------------------------------------
- * A new ETel connection is opened when using this method!
- * ----------------------------------------------------------------------
- *
- * @return Symbian OS error code (KErrNone is successful)
- **/
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- IMPORT_C TInt Open();
-
- /**
- * Opens the resources needed. This or the other overloaded Open() has to
- * be called successfully before doing anything else.
- *
- * Use this overload if you already have ETel connection.
- *
- * ----------------------------------------------------------------------
- * An existing ETel connection is used when using this method!
- * ----------------------------------------------------------------------
- *
- * @param aPhone Phone client
- * @return Symbian OS error code (KErrNone is successful)
- **/
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- IMPORT_C TInt Open( RMobilePhone& aPhone );
-
- /**
- * Fetches the specified vmbx number. If there is no vmbx number
- * saved for the specified ALS line, parameter aNumber remains unchanged
- * and the return value is KErrNotFound.
- *
- * @param aNumber vmbx number is saved here (must be room for at least
- * KVmbxMaxNumberLength characters)
- *
- * @param aEntry determines which vmbx number entry is used:
- * EAlsLine1Entry = vmbx number entry of primary line
- * EAlsLine2Entry = vmbx number entry of secondary line
- * EAlsActiveLineEntry = entry of currently active line
- *
- * @return - KErrNone if the number was found.
- * aNumber will contain the vmbx number.
- *
- * - KErrNotFound if the number is not defined
- *
- * - Other error code if there was a problem in getting
- * the number. Clients should show error note if this happens.
- **/
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- IMPORT_C TInt GetVmbxNumber( TDes& aNumber,
- TVmbxNumberEntry aEntry = EAlsActiveLineEntry );
-
- /**
- * Check wether the voice mailbox number can be changed. If the number
- * cannot be edited, the QueryNumberL leaves with and SaveVmbxNumber
- * returns KErrAccessDenied.
- * @since 2.7
- * @return ETrue if editing is allowed.
- * EFalse if editing is forbidden.
- */
- IMPORT_C TBool AllowedToChangeTheNumber();
-
- /**
- * Puts a query on the screen asking for a voice mailbox number.
- *
- * IMPORTANT:
- *
- * Other subsystems than voice mailbox application should call this
- * ONLY IF GetVmbxNumber() returned KErrNotFound. Also, only the
- * parameter EVmbxNotDefinedQuery should be used outside the voice
- * mailbox application.
- *
- * @param aQueryType type of the query, alternatives:
- * - EVmbxNotDefinedQuery
- * (use this when no vmbx number is defined)
- *
- * - EVmbxChangeNumberQuery
- * @param aNumber Initial value for the query, AND the result value
- * of an accepted query. (must be room for at least
- * KVmbxMaxNumberLength characters. Not allowed to
- * contain longer initial value than
- * KVmbxMaxNumberLength)
- * @param aShowQuery When this is set and the sim has support for vmbx
- * number the user is shown a list query by which the
- * storage of sim number can be decided
- *
- * @return ETrue if the query was accepted and the vmbx number saved.
- * This is the case also when user saves empty number!
- * EFalse if the user canceled the query. No vmbx number changed.
- **/
- IMPORT_C TBool QueryNumberL( TVmbxQueryType aQueryType, TDes& aNumber,
- TBool aShowQuery = EFalse );
-
- /**
- * Saves the vmbx number. (in phone file system and SIM)
- *
- * @param aNumber vmbx number ( max length is KVmbxMaxNumberLength )
- * @param aEntry determines in which entry the number is saved:
- * EAlsLine1Entry = vmbx number entry of ALS primary line
- * EAlsLine2Entry = vmbx number entry of ALS secondary line
- * EAlsActiveLineEntry = entry of currently active ALS line
- *
- * @return Symbian OS error code (KErrNone is successful)
- **/
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- IMPORT_C TInt SaveVmbxNumber( const TDesC& aNumber,
- TVmbxNumberEntry aEntry );
-
- /**
- * Saves vmbx number to Sim
- * @since
- * @param aNumber Vmbx number
- * @param aEntry Als line entry
- * @return Symbian OS error code (KErrNone is successful)
- */
- TInt SaveVmbxNumberToSim( const TDesC& aNumber,
- TVmbxNumberEntry aEntry );
-
- /**
- * Saves vmbx number to phone memory
- * @since
- * @param aNumber Vmbx number
- * @param aEntry Als line entry
- * @return Symbian OS error code (KErrNone is successful)
- */
- TInt SaveVmbxNumberToPhone( const TDesC& aNumber,
- TVmbxNumberEntry aEntry );
-
- /**
- * Issues a notify request on a vmbx number change.
- * User's HandleNotifyL() will be called whenever the vmbx number has
- * been changed by any subsystem. Only one notify request can be done
- * per one RVmbxNumber object simultaneously. When issuing a notify
- * request while one is active already, only parameters aHandler and
- * aNotifyOnActiveLineOnly are updated in existing request.
- *
- * @param aHandler user's notify handler
- * @param aNotifyOnActiveLineOnly if this is ETrue, notify events will
- * be generated only if the vmbx number of the active ALS line is
- * changed, not if the number of the other line is changed. When
- * there is no ALS support, this has no effect ie. notification
- * will be generated always.
- *
- * Leaves if the notify request could not be done.
- **/
- IMPORT_C void NotifyVmbxNumberChangeL( MVmbxNotifyHandler* aHandler,
- TBool aNotifyOnActiveLineOnly );
-
- /**
- * Cancels a notify request on a vmbx number change.
- **/
- IMPORT_C void NotifyVmbxNumberChangeCancel();
-
- /**
- * Gets the currently active ALS line number ( 1 or 2 ).
- * Information is fetched from supplementary settings client.
- * @param aLineNumber line number is returned here. If ALS is not
- * supported, value 1 is returned.
- * @return Symbian OS error code (KErrNone is successful)
- **/
- IMPORT_C TInt GetAlsLine( TInt& aLineNumber ) const;
-
- /**
- * Issues a notify request on active ALS line change. A callback to
- * user's code is made when the ALS line is changed. The notify request
- * remains active as long as it is canceled with
- * NotifyAlsLineChangeCancel(), ie. it is not canceled when the ALS line
- * is changed. Implementation uses SharedData's notify system.
- * Leaves if the notify request could not be done.
- * @param aObserver user's observer
- **/
- IMPORT_C void NotifyAlsLineChangeL( MVmbxAlsObserver* aObserver );
-
- /**
- * Cancels a notify request on ALS line change.
- **/
- IMPORT_C void NotifyAlsLineChangeCancel();
-
- /**
- * Closes the resources allocated in Open().
- *
- * Cancels all issued notify requests.
- **/
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- IMPORT_C void Close();
-
-
- /**
- * Puts a query on the screen asking for a voice mailbox address.
- * @since 3.0
- *
- * IMPORTANT:
- *
- * Other subsystems than voice mailbox application should call this
- * ONLY IF GetVmbxNumber() returned KErrNotFound. Also, only the
- * parameter EVmbxNotDefinedQuery should be used outside the voice
- * mailbox application.
- *
- * @param aQueryType type of the query, alternatives:
- * - EVmbxNotDefinedQuery
- * (use this when no vmbx address is defined)
- *
- * - EVmbxChangeNumberQuery
- * @param aNumber Initial value for the query, AND the result value
- * of an accepted query. (must be room for at least
- * KVmbxMaxAddressLength characters. Not allowed to
- * contain longer initial value than
- * KVmbxMaxAddressLength)
- * @return ETrue if the query was accepted and the vmbx address saved.
- * This is the case also when user saves empty address!
- * EFalse if the user canceled the query. No vmbx address
- * changed.
- **/
- IMPORT_C TBool QueryAddressL( TVmbxQueryType aQueryType,
- TDes& aNumber );
-
- /**
- * Puts a popup on the screen asking for which type of Vmbx is used.
- * @since 3.0
- * @param aTitle Vmbx title type ( call / define ).
- * @return which type of Vmbx is selected.
- */
- IMPORT_C TInt SelectTypeL( TBool aTitle );
-
- /**
- * Save address.
- * @since 3.0
- * @param aAddress includes saved vmbx address
- * @return Symbian OS error code (KErrNone is successful)
- **/
- IMPORT_C TInt SaveVmbxAddressL( TDes& aAddress );
-
- /**
- * Check if VoIP profiles exists.
- * @since 3.0
- * @return ETrue if there is at least one VoIP profile, otherwise EFalse
- */
- IMPORT_C TBool IsVoIPProfilesFound();
-
- /**
- * Check if VoIP voice mailbox services exists
- * @since 5.0
- * @return ETrue if there is at least one service, otherwise EFalse
- */
- IMPORT_C TBool IsIpVoiceMailboxServices();
-
- /**
- * Fetches the specified video mailbox number. If there is no video
- * mailbox number saved for the specified ALS line, parameter aNumber
- * remains unchanged and the return value is KErrNotFound.
- * @since 3.1
- * @param aNumber video mailbox number is saved here (must be room for
- * at least KVmbxMaxNumberLength characters)
- * @param aEntry determines which video mbx number entry is used:
- * EAlsLine1Entry = video mbx number entry of primary line
- * EAlsLine2Entry = video mbx number entry of secondary line
- * EAlsActiveLineEntry = entry of currently active line
- * @return - KErrNone if the number was found.
- * aNumber will contain the video mbx number.
- *
- * - KErrNotFound if the number is not defined
- *
- * - Other error code if there was a problem in getting
- * the number. Clients should show error note if this happens.
- **/
- IMPORT_C TInt GetVideoMbxNumber( TDes& aNumber,
- TVmbxNumberEntry aEntry = EAlsActiveLineEntry );
-
- /**
- * Puts a query on the screen asking for a video mailbox number.
- * @since 3.1
- *
- * IMPORTANT:
- *
- * Other subsystems than voice mailbox application should call this
- * ONLY IF GetVideoMbxNumber() returned KErrNotFound. Also, only the
- * parameter EVmbxNotDefinedQuery should be used outside the voice
- * mailbox application.
- *
- * @param aQueryType type of the query, alternatives:
- * - EVmbxNotDefinedQuery
- * (use this when no vmbx number is defined)
- * - EVmbxChangeNumberQuery
- * @param aNumber Initial value for the query, AND the result value
- * of an accepted query. (must be room for at least
- * KVmbxMaxNumberLength characters. Not allowed to
- * contain longer initial value than
- * KVmbxMaxNumberLength)
- * @return ETrue if the query was accepted and the vmbx number saved.
- * This is the case also when user saves empty number!
- * EFalse if the user canceled the query. No vmbx number changed.
- **/
- IMPORT_C TBool QueryVideoMbxNumberL( TVmbxQueryType aQueryType,
- TDes& aNumber );
-
- /**
- * Saves the vmbx number. (in phone file system)
- * @since 3.1
- * @param aNumber video mbx number ( max length is KVmbxMaxNumberLength )
- * @param aEntry determines in which entry the number is saved:
- * EAlsLine1Entry = video mbx number entry of ALS primary
- * line
- * EAlsLine2Entry = video mbx number entry of ALS secondary
- * line
- * EAlsActiveLineEntry = entry of currently active ALS line
- * @return Standard Symbian OS errorcode.
- * KErrNone if number was successfully saved.
- **/
- IMPORT_C TInt SaveVideoMbxNumber( const TDesC& aNumber,
- TVmbxNumberEntry aEntry );
-
- /**
- * Returns if the memory location for vmbx is sim memory
- * @since 3.0
- * @return ETrue if the vmbx number should be stored in the SIM
- * EFalse otherwise.
- */
- IMPORT_C TBool IsSimMemory();
-
- /**
- * Fetches vmbx address from SPS.
- * @since 3.0
- * @param aAddress vmbx address is saved here (must be room for at least
- * KVmbxMaxAddressLength characters).
- * @return - KErrNone if the address was found.
- * aNumber will contain the vmbx address.
- *
- * - KErrNotFound if the address is not defined
- *
- * - Other error code if there was a problem in getting
- * the address. Clients should show error note if this happens.
- */
- IMPORT_C TInt GetVmbxAddressL( TDes& aAddress );
-
- /**
- * Fetches vmbx address from SPS.
- * @since 3.2
- * @param aAddress vmbx address is saved here (must be room for at least
- * KVmbxMaxAddressLength characters).
- * @param aServiceId Used Service Id
- * @return General symbian error code.
- */
- IMPORT_C TInt GetVmbxAddress( TDes& aAddress, TUint aServiceId );
-
- /**
- * Puts a popup on the screen asking for which type of Vmbx is used.
- * @since 3.2
- * @param aTitle Vmbx title type ( call / define ).
- * @param aServiceId On completion, contains selected service's
- * Service Id. If CS or Video Vmbx selected, value is 1, otherwise
- * service's value is dynamic.
- * @return which type of Vmbx is selected.
- */
- IMPORT_C TInt SelectTypeL( TBool aTitle, TUint& aServiceId );
-
- /**
- * Service Ids getter
- * @since 3.2
- * @param aProfileIds On completion, contains all Service Ids.
- * @return General symbian error code.
- */
- IMPORT_C TInt GetServiceIds( RArray<TUint>& aProfileIds );
-
- /**
- * Service info getter
- * @since 3.2
- * @param aServiceInfo On completion, contains Service information
- * @return General symbian error code.
- */
- IMPORT_C TInt GetServiceInfo( TVmbxServiceInfo& aServiceInfo );
-
- /**
- * Issues a notify request on a Service profile change.
- * @param aHandler User's notify handler
- */
- IMPORT_C void NotifyServiceChange( MServiceNotifyHandler* aHandler );
-
- /**
- * Cancels a notify request on a Service profile change.
- */
- IMPORT_C void NotifyServiceChangeCancel();
-
- /**
- * Get Service's Brand Id
- * @since S60 3.2
- * @param aServiceId Used Service Id
- * @param aBrandId On completion, contains Brand Id
- */
- IMPORT_C void BrandIdL( TInt aServiceId, TDes8& aBrandId );
-
- /**
- * Branded icon getter
- * @since S60 3.2
- * @param aBrandingId Used branding Id
- * @param aBrandedBitmap Bitmap for branded icon
- * @param aBrandedBitmapMask Mask to branded icon
- */
- IMPORT_C void GetBrandedIconL( const TDesC8& aBrandingId,
- CFbsBitmap*& aBrandedBitmap,
- CFbsBitmap*& aBrandedBitmapMask );
-
- /**
- * Construct default icons(CS, Video and VoIP)
- * @since S60 3.2
- * @param aIcons On completion, contains created icons
- */
- IMPORT_C void ConstructDefaultIconsL( CArrayPtr<CGulIcon>* aIcons );
-
- private:
-
- /**
- * Add brand icon if it exist.
- * @since S60 3.2
- * @param aIcons On completion, contains new brand icon
- * @param aServiceId Used Service Id
- * @param aIconId On completion, contains branded icon's icon list id
- */
- void AddBrandIconL( CArrayPtr<CGulIcon>* aIcons, TUint aServiceId, TInt& aIconId );
-
- public: // Functions from base classes
-
- /**
- * From MCenRepNotifyHandlerCallback, to notify the client about
- * changes for string value keys
- **/
- void HandleNotifyString( TUint32 aKey, const TDesC16& aValue );
-
- /**
- * From MCenRepNotifyHandlerCallback, to notify the client about
- * changes in keys when the whole repository is listened for.
- **/
- void HandleNotifyGeneric( TUint32 aKey );
-
- /**
- * From MSSSettingsObserver, to notify changes in SS settings in phone
- **/
- void PhoneSettingChanged( TSSSettingsSetting aSetting, TInt aNewValue );
-
- /**
- * From MVmbxAlsObserver:
- **/
- void HandleAlsChangeL( TVmbxAlsLine aLine );
- /**
- * Refresh query. Client should determine whether it allow the
- * refresh to happen.
- * @since 2.6
- * @param aType Refresh type.
- * @param aFiles Elementary files which are to be changed.
- * May be zero length.
- * @return ETrue to allow refresh, EFalse to decline refresh.
- */
- TBool AllowRefresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles ) ;
-
- /**
- * Notification of refresh.
- * @since 2.6
- * @param aType Type of refresh which has happened.
- * @param aFiles List of elementary files which has been changed.
- * May be zero length.
- */
- void Refresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles );
-
- private: // New functions
-
- /**
- * Routine to query SIM number
- * @since
- * @param aNumber Vmbx number
- * @param aEntry Als line entry
- * @return ETrue if user inserted number
- **/
- TBool QuerySimNumberL( TDes& aNumber,
- TVmbxNumberEntry aEntry = EAlsActiveLineEntry );
-
-
- /**
- * Loads the resources needed for queries and confirmation notes.
- * @since
- **/
- void LoadResourceL();
-
- /**
- * Shows a confirmation note after a saved vmbx number.
- * @param aResourceId Resource id
- **/
- void ShowConfirmationNoteL( TInt aResourceId ) const;
-
- /**
- * Verifies that the given string is a valid phone number.
- * Rules:
- *
- * - '+' is only allowed as the first character
- * - The phone number part must have 3-21 digits
- * @since
- * @param aNumber Vmbx number
- * @return ETrue if valid number
- **/
- TBool IsValidPhoneNumber( const TDesC& aNumber ) const;
-
- /**
- * Checks if a number is an emergency number.
- * @since
- * @param aNumber Vmbx number
- * @return ETrue if emergency number
- **/
- TBool IsEmergencyNumberL( const TDesC& aNumber );
-
- /**
- * Fetches information about the SIM phonebook for vmbx numbers.
- * Updates internal flags KVmFlagSimSupport and
- * KVmFlagPhonebookBeingCached.
- *
- * @return Phonebook's GetInfo() return code.
- **/
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- TInt PhoneBookInfo();
-
- /**
- * Does a vmbx phonebook operation
- *
- * If the phonebook is being cached, defined amount of retries are
- * made with 0.2 second delay in between.
- * @param aOperation Operation identifier
- * @param aEntry Vmbx entry (NULL)
- * @return Phonebook error code. Specifically, KErrInUse, if
- * the phonebook is still being cached after retries.
- **/
- TInt DoPhonebookOperation( TVmbxPhonebookOperation aOperation,
- TVmbxEntry* aEntry = NULL );
-
- // Prohibit copy constructor
- RVmbxNumber( const RVmbxNumber& );
-
- // Prohibit assigment operator
- RVmbxNumber& operator = ( const RVmbxNumber& );
-
- /**
- * Reads an entry from the ICC-based phonebook.
- * @since
- * @param aEntry Vmbx sim entry data
- **/
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- void PhonebookReadL( TVmbxEntry& aEntry );
-
- /**
- * Writes an entry into ICC-based phonebook.
- * @since
- * @param aEntry Vmbx sim entry data
- * @return Completion status of a request
- **/
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- TInt PhonebookWrite( TVmbxEntry& aEntry );
-
- /**
- * Removes an entry from ICC-based phonebook.
- * @since
- * @param aEntry Vmbx sim entry data
- * @return Completion status of a request
- **/
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- TInt PhonebookDelete( TVmbxEntry& aEntry );
-
- /**
- * Converts a phone number to western format
- * @param aDes Parameter to change
- **/
- void ConvertToWesternDigits( TDes& aDes ) const;
-
- /**
- * Create connection to ETel server
- * @since
- * @return KErrNone if success
- **/
- TInt ConnectETelServer();
-
- /**
- * Open phonebook's Single Fetch Dialog
- * @since
- * @param aPhoneNumber Phone number
- */
- void FetchNumberFromPhonebook2L( TDes& aPhoneNumber );
-
- /**
- * Handling of emergency dial result.
- * @since 3.2
- * @see MPhCltEmergencyCallObserver::HandleEmergencyDialL().
- */
- void HandleEmergencyDialL( const TInt aStatus );
-
- /**
- * Retrieves voice mailbox number from SIM/R-UIM
- * @since
- * @param aNumber Number
- * @param aLineNumber Line 1 or 2
- * @return Symbian OS error code (KErrNone is successful)
- */
- TInt GetVmNumFromSIM( TDes& aNumber, TInt aLineNumber );
-
- /**
- * Retrieves voice mailbox number from VMN summary info
- * @since
- * @param aNumber Number
- * @return Symbian OS error code (KErrNone is successful)
- */
- TInt GetVmNumFromVMN( TDes& aNumber );
-
- /**
- * Retrieves voice mailbox number from NAM
- * @since
- * @param aNumber Number
- * @param aNumType Number type (EVmbxMDN)
- * @return Symbian OS error code (KErrNone is successful)
- */
- TInt GetVmNumFromNamStore( TDes& aNumber, TInt aNumType = EVmbxMDN );
-
- /**
- * Retrieves voice mailbox number from Shared Data
- * @since
- * @param aNumber Number
- * @param aLineNumber Line 1 or 2
- * @return Symbian OS error code (KErrNone is successful)
- */
- TInt GetVmNumFromSD( TDes& aNumber, TInt aLineNumber );
-
- /**
- * Closes ETel resources
- * @since
- */
- void CloseETel();
-
- /**
- * Appends string from resource to descriptor array
- * @since
- * @param aResourceId Resource id
- * @param aArray String array
- */
- void AppendStrToArrayL( TInt aResourceId, CDesCArray& aArray );
-
- /**
- * Set query dialog header text from resource string
- * @since
- * @param aResourceId Resource id
- * @param aDlg Query dialog
- */
- void SetHeaderFromResourceL( TInt aResourceId, CAknQueryDialog& aDlg );
- /**
- * Checks whether there is support for USIM(WCDMA)
- * @since
- * @return ETrue if USim is used
- */
- TBool IsUsimSupport();
-
- /**
- * Subscribe SAT notifications
- * @since
- */
- void SubscribeSATNotificationsL();
-
- /**
- * Gets MBI-file settings from Sim. MBI-file identifies the usage
- * of the mailbox records settings
- * @since
- * @return ETrue if successed
- */
- TInt MailboxNumbersIdentifiers();
-
- /**
- * Reading and writing to sim are tested
- * @since
- */
- void TestAndSetSimAccessFlags();
-
- /**
- * The actual size for number must be determine from max length
- * returned from GetInfo-method and saved number length on Sim.
- * @param aSimNumberLength The length of the number read from sim.
- * @since
- */
- void CalculateActualMaxLengthOnSim( TInt aSimNumberLength );
-
- /**
- * Returns video support state
- * @since S60 3.2
- * return ETrue if supported
- */
- TBool VideoSupported();
-
- /**
- * Checks if writing to sim is prohibited
- * @since S60 3.2
- * return ETrue if writing is not allowed
- */
- TBool IsReadOnlySIM();
-
- /**
- * Checks is VMBX number defined in phone memory
- * @since S60 3.2
- * @param aLineNumber Line 1 or 2
- * @return ETrue if VMBX number defined in Phone memory
- */
- TBool VmbxNumDefInPhoneMemory( TInt aLineNumber);
-
- /**
- * Checks is the given number stored in phone memory
- * @since S60 3.2
- * @param aNumber The number checked
- * @param aLineNumber Line 1 or 2
- * @return ETrue if number stored in Phone memory
- */
- TBool NumStoredInPhone( const TDesC& aNumber, TInt aLineNumber );
-
- /**
- * Saves VMBX number to the backup store
- * @since S60 3.2
- * @param aNumber The number to be saved
- * @param aLineNumber Line 1 or 2
- * @return Symbian OS error code (KErrNone is successful)
- */
- TInt BackUpSimNumber( const TDesC& aNumber, TInt aLineNumber );
-
- /**
- * Fetches VMBX number from backup store
- * @since S60 3.2
- * @param aNumber number
- * @param aLineNumber Line 1 or 2
- * @return Symbian OS error code (KErrNone is successful)
- */
- TInt FetchSimNumberBackUp( TDes& aNumber, TInt aLineNumber );
-
- /**
- * Clears VMBX number from the phone memory
- * @since S60 3.2
- * @param aLineNumber Line 1 or 2
- * @return Symbian OS error code (KErrNone is successful)
- */
- TInt ClearVMBXNumberFromPhone( TInt aLineNumber );
-
- /**
- * Indicates if user has edited VMBX number
- * @since S60 3.2
- * @param aLineNumber Line 1 or 2
- * @return ETrue if VMBX is edited by user
- */
- TBool UserEditNumber( TInt aLineNumber );
-
- /**
- * Sets the flag indicating that the user has edited
- * VMBX number
- * @since S60 3.2
- * @param aLineNumber Line 1 or 2
- * @return Symbian OS error code (KErrNone is successful)
- */
- TInt SetUserEditNumber( TInt aLineNumber );
-
- /**
- * Resets the flag that indicates that the user has edited
- * VMBX number
- * @since S60 3.2
- * @param aLineNumber Line 1 or 2
- * @return Symbian OS error code (KErrNone is successful)
- */
- TInt ResetUserEditNumber( TInt aLineNumber );
-
- /**
- * Fetches VMBX number stored in SIM if number is
- * available
- * @since S60 3.2
- * @param aNumber number
- * @param aLineNumber Line 1 or 2
- * @return ETrue if number is fetched
- */
- TBool UseSimNumIfAvailable( TDes& aNumber, TInt aLineNumber );
-
- /**
- * Handles the updating of a number stores in phone memory
- * @since S60 3.2
- * @param aLineNumber Line 1 or 2
- * @return Symbian OS error code (KErrNone is successful)
- */
- TInt HandleNumberStores( TInt aLineNumber );
-
- /**
- * Returns if the SIM memory is used on ALS 1
- * @since 3.2
- * @return ETrue if the SIM memory is used to store ALS1 number
- * EFalse otherwise.
- */
- TBool UsesSimMemory();
-
- /**
- * check count of VMBX number
- * available
- * @since S60 3.2.2
- * @param out aDefinedNumber a count of defined numbers
- * @param out aDefinedFlag a flag of which voice mail services are defined
- * @param out aServiceId Id of selected service is set
- *
- * @return Type of Vmbx, if there is only one mailbox configured, otherwise EVmbxNone
- */
- TInt CheckDefinedNumberCountL( TInt& aDefinedNumber,
- TInt& aDefinedFlag, TUint& aServiceId );
-
- /**
- * Returns if VMBX number stored in phone memory via external clients
- * @since S60 3.2.3
- * @param aLineNumber Line 1 or 2
- * @return ETrue if number is stored in phone memory via
- * external clients
- * EFalse number is stored in phone memory via internal clients
- */
- TBool IsPhoneMemForcedEdit( const TInt aLineNumber );
-
- /**
- * Sets the flag indicating that external clients has edited
- * VMBX number
- * @since S60 3.2.3
- * @param aLineNumber Line 1 or 2
- * @return Symbian OS error code (KErrNone is successful)
- */
- TInt SetPhoneMemForcedEdit( TInt aLineNumber );
-
- /**
- * Displays a note with a text loaded from resource file.
- * @since S60 v5.2
- * @param aResourceId Resource id for loading text for note
- */
- void ShowInformationNoteL( const TInt aResourceId ) const;
-
- /**
- * Check whether the note should be shown
- * this check is done because phone client calls GetVmbxNumber
- * and then SelectTypeL, which causes note qtn_... to be shown twice
- * @since S60 v5.2
- * @return ETrue if the note should be shown
- */
- TBool IsNoNumberNoteAllowed();
-
- private: // data
-
- // Observer for user action for saved vmbx number
- MVmbxNotifyHandler* iNotifyCallBack;
-
- // Observer for user action for als line
- MVmbxAlsObserver* iUserAlsObserver;
-
-
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- // Root telephony server session
- RTelServer iTelServer;
-
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- //Mobile phone client
- RMobilePhone iPhone;
-
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- //Phonebook client
- RMobilePhoneBookStore iPhoneBook;
-
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- // Multimode ETel phone book info structure that will
- // be used to retrieve data from phone book store.
- RMobilePhoneBookStore::TMobilePhoneBookInfoV1 iPhoneBookInfo;
-
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- // A package for the iPhoneBookInfo.
- RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg iPhoneBookInfoPckg;
-
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- // A package for the iPhoneVoicemailInfo.
- RMobilePhone::TMobilePhoneVoicemailIdsV3 iPhoneVoicemailInfo;
-
- /*****************************************************
- * Series 60 Customer / ETel
- * Series 60 ETel API
- *****************************************************/
- // A package for the iPhoneVoicemailInfoPckg.
- RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg iPhoneVoicemailInfoPckg;
-
- /*****************************************************
- * Series 60 Customer / RSAT
- * Series 60 RSAT API
- *****************************************************/
- RSatSession iRSatSession; //// Root RSATsession opening RSatClient
-
- /*****************************************************
- * Series 60 Customer / RSAT
- * Series 60 RSAT API
- *****************************************************/
- RSatRefresh iRSatClient; //RSatClient for notification of file changed.
-
- /*****************************************************
- * Series 60 Customer / RSAT
- * Series 60 RSAT API/ ETel
- * Series 60 ETel API
- *****************************************************/
- // A package for the TRefreshFileList.
- // list of files, waiting for notification.
- RSat::TRefreshFileList iObservedFileList;
-
- //Central repository observer
- CCenRepNotifyHandler* iNotifyHandler;
-
- //Central repository session
- CRepository* iSession;
-
- //SS setting
- RSSSettings iSsSettings;
-
- // Offset in resourse file
- TInt iResourceFileOffset;
-
- // Vmbx state flags
- TInt iFlags;
-
- // text query dialog
- CVmTextQueryDialog* iQuery; // owned
-
- // indicates if the RVmbxNumber was closed during a dialog
- TBool* iClosedPtr;
-
- // Control enviroment
- CCoeEnv* iCoeEnv; // not owned
-
- //PRI settings
- // nNumber options
- TInt iVmNumOpts;
-
- //Ui options
- TInt iVmUiOpts;
-
- // Synchronization state
- TBool iSynchronize;
-
- // Vmbx type
- TInt iType;
-
- // Memory location (sim/phone)
- TInt iMemoryLocation;
-
- // Sim query dialog
- CVMSimQueryDilaog* iVMSimQueryDialog;
-
- // USim supported when true
- TBool iUSimSupport;
-
- // Text query dialog
- CVmTextQueryDialog* iVideoQuery; // owned
-
- // voice mailbox type selection dialog
- CAknListQueryDialog* iTypeSelectionQuery; //owned
-
-
- TBool iAlphaStringFound;
- // Alpha string which is read from the SIM card
- HBufC* iAlphaStringFromSIM;
- // True if number in sim
- TBool iNumberFound;
- //Phonebook type
- TUint8 iPhoneBookType;
- //Number fetched from Sim when checking write protection
- TBuf<KVmbxMaxNumberLength> iNumberFromSim;
-
- //ETrue when first USim phonebook type is tested
- TBool iUSimFirstRoundTest;
-
-
- private:
-
- /**
- * True if Sim access rights are tested
- */
- TBool iStartUpTest;
-
- /**
- * For single item fetch
- */
- CPhCntSingleItemFetch* iCntFetch;
-
- /**
- * To test if mbdn number doesn't exist
- */
- TBool iNoNumberFound;
-
- /**
- * To test if number can be found from vmbx-phonebook
- */
- TBool iMbdnPhonebookOk;
-
- /**
- * querying state of QueryNumberL
- */
- TVmVmQueryStatusType iQueryingState;
-
- /**
- * Type and Id of mailboxes to list in iTypeSelectionQuery, Own
- */
- RArray<TVmbxServiceSelection> iVmbxServiceSelection;
-
- /**
- * Handles Service proviver Settings, Own.
- */
- CVmSPSHandler* iVmSpsHandler;
-
- /**
- * Handles Branding Server, Own.
- */
- CVmBSHandler* iVmBsHandler;
-
- /**
- * Feature manager is initialized
- */
- TBool iFeatMgrInitialized;
-
- /**
- * Sim card is whether found in ME
- */
- TBool iSimCardFound;
-
- };
-
-#endif // VMNUMBER_H
-
-// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/voice_mailbox_number_api/inc/voicemailboxdefs.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,108 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Constant used for vmbx engine
+*
+*/
+
+#ifndef VOICEMAILBOXDEFS_H
+#define VOICEMAILBOXDEFS_H
+
+// INCLUDES
+#include <e32base.h>
+#include <spdefinitions.h>
+
+/** Null service id, i.e. not specified service. */
+const TServiceId KVmbxServiceIdNone( 0 );
+/** Service id for CS voice mailbox */
+const TServiceId KVmbxServiceVoice( 0x01 );
+/** Service id for CS video mailbox */
+const TServiceId KVmbxServiceVideo( 0x01 );
+/** The max length of voice mailbox number */
+const TInt KVmbxMaxNumberLength = 100;
+
+/** Vmbx ALS line determination */
+enum TVmbxAlsLineType
+ {
+ /**
+ * Default line, meaning current active line.
+ */
+ EVmbxAlsLineDefault,
+ /**
+ * Current ALS line is Line1.
+ */
+ EVmbxAlsLine1,
+ /**
+ * Current ALS line is Line2.
+ */
+ EVmbxAlsLine2
+ };
+
+/** Type of Voice Mailbox. */
+enum TVmbxType
+ {
+ /**
+ * None vmbx type.
+ */
+ EVmbxNone = 0,
+ /**
+ * Voice type.
+ */
+ EVmbxVoice,
+ /**
+ * Video type.
+ */
+ EVmbxVideo,
+ /**
+ * Voip type.
+ */
+ EVmbxVoip
+ };
+
+/** Voice Mailbox feature flag definitions */
+enum TVmbxFeatureCapabilityFlag
+ {
+ /**
+ * When flag is enabled the user is not allowed to define or
+ * modify the voice mailbox number.
+ */
+ EVmbxChangeNbrNotAllowedOnUi = 0x01,
+ };
+
+/** Vmbx Memory location which is currently used */
+enum TVmbxMemoryLocation
+ {
+ /**
+ * Using phone memory.
+ */
+ EVmbxPhoneMemory,
+ /**
+ * Using Sim memory.
+ */
+ EVmbxSimMemory
+ };
+
+/** Vmbx query type which currently wanted */
+enum TVmbxQueryMode
+ {
+ /**
+ * User want to define number.
+ */
+ EVmbxDefineMode,
+ /**
+ * User want to change number.
+ */
+ EVmbxChangeMode
+ };
+
+#endif // VOICEMAILBOXDEFS_H
--- a/phonesrv_plat/voice_mailbox_number_api/tsrc/bwins/vmbxenginetestu.def Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
-
--- a/phonesrv_plat/voice_mailbox_number_api/tsrc/conf/ui_vmbxenginetest.cfg Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,210 +0,0 @@
-[Test]
-title Test "Connect and Close VMBX engine"
-create vmbxenginetest test
-
-// Connecting and closing. If this fails nothing can be tested.
-test Connect
-test Close
-
-delete test
-[Endtest]
-
-[Test]
-title Test "GetNumFromSpecialMem 111111"
-create vmbxenginetest test
-
-test Connect
-bringtoforeground
-
-test InitGetNumFromSpecialMem 111111 // save a number to the sim/phone memory
-test TestGetNumFromSpecialMem 111111 // get the number we had just saved from the sim/phone memory,
- // if not, the number should be saved to the incorect location in last step.
-
-test CleanupGetNumFromSpecialMem // revert the source number to sim/phone memory
-
-sendtobackground
-test Close
-delete test
-[Endtest]
-
-[Test]
-title Test "SelectTypeL"
-create vmbxenginetest test
-
-test Connect
-bringtoforeground
-
-test SelectTypeL
-
-sendtobackground
-test Close
-delete test
-[Endtest]
-
-[Test]
-title Test "Editing allowed" (Default configuration)
-create vmbxenginetest test
-
-test Connect
-bringtoforeground
-
-test ConfCenRepForEditAllowedL
-
-allownextresult 1 // must return 1 as user is allowed to change number
-test AllowedToChangeTheNumber
-
-sendtobackground
-test Close
-delete test
-[Endtest]
-
-// This case can be never passed on emulator,
-// because the updating central repository is not supported by emulator.
-// It has to be done on hardware.
-[Test]
-title Test "Editing not allowed" (Configuration needed)
-create vmbxenginetest test
-
-test ConfCenRepForEditNotAllowedL // cenreq configuration need to be set '1'
-
-test Connect
-bringtoforeground
-
-allownextresult 0 // must return 0 as user is not allowed to change number
-test AllowedToChangeTheNumber
-
-sendtobackground
-test Close
-
-test RevertCenRepEditNotAllowedL // revert cenreq key
-
-delete test
-[Endtest]
-
-// This case can be never passed on emulator, because sim feature is not supported.
-// And the updating central repository is not supported by emulator.
-// It has to be done on hardware.
-[Test]
-title Test "SIM only + note" (Operator configuration)
-create vmbxenginetest test
-
-test ConfCenRepForEditNotAllowedL // cenreq configuration need to be set '1'
-
-test Connect
-bringtoforeground
-
-allownextresult 1
-test IsSimMemory // should return 1 in this config
-
-allownextresult 0
-test AllowedToChangeTheNumber // must return 0 as user is not allowed to change number
-
-test InitGetNumFromSpecialMem // This method should save a empty number to trigger a note to UI
-
-allownextresult -1
-test TestGetNumFromSpecialMem
-
-test CleanupGetNumFromSpecialMem // revert the source number to sim/phone memory
-
-sendtobackground
-test Close
-
-test RevertCenRepEditNotAllowedL // revert cenreq key
-
-delete test
-[Endtest]
-
-// This case can be never passed on emulator, because sim feature is not supported.
-// And the updating central repository is not supported by emulator.
-// It has to be done on hardware.
-[Test]
-title Test "SIM only: Saving number to the sim memory according to simulate OMA" (Operator configuration)
-create vmbxenginetest test
-
-test ConfCenRepForEditNotAllowedL // cenreq configuration need to be set '1'
-
-test Connect
-bringtoforeground
-
-allownextresult 1
-test IsSimMemory // should return 1 in this config
-
-allownextresult 0
-test AllowedToChangeTheNumber // must return 0 as user is not allowed to change number
-
-test InitGetNumFromSpecialMem 123456 // save the number to sim memory
-test TestGetNumFromSpecialMem 123456 // get the number we had just saved from the sim memory,
- // if not, the number should be saved to the incorect location in last step.
-test CleanupGetNumFromSpecialMem // revert the source number to sim memory
-
-sendtobackground
-test Close
-
-test RevertCenRepEditNotAllowedL // revert cenreq key
-
-delete test
-[Endtest]
-
-// This case can be never passed on emulator, because sim feature is not supported.
-// And the updating central repository is not supported by emulator.
-// It has to be done on hardware.
-[Test]
-title Test "SIM only: QueryVideoMbxNumber" (Operator configuration)
-create vmbxenginetest test
-
-test ConfCenRepForEditNotAllowedL // cenreq configuration need to be set '1'
-
-test Connect
-bringtoforeground
-
-allownextresult -21
-test QueryVideoMbxNumber 0 // Should leave with KErrAccessDenied
-
-sendtobackground
-test Close
-
-test RevertCenRepEditNotAllowedL // revert cenreq key
-
-delete test
-[Endtest]
-
-// This case can be never passed on emulator, because sim feature is not supported.
-// And the updating central repository is not supported by emulator.
-// It has to be done on hardware.
-[Test]
-title Test "SIM only: QueryNumberL" (Operator configuration)
-create vmbxenginetest test
-
-test ConfCenRepForEditNotAllowedL // cenreq configuration need to be set '1'
-
-test Connect
-bringtoforeground
-
-allownextresult -21
-test QueryNumberL 0 // Should leave with KErrAccessDenied
-
-sendtobackground
-test Close
-
-test RevertCenRepEditNotAllowedL // revert cenreq key
-
-delete test
-[Endtest]
-
-// This case can be never passed on emulator,
-// because the video feature is not supported.
-// It has to be done on hardware.
-[Test]
-title Test "GetVideoMbxNumber"
-create vmbxenginetest test
-
-test Connect
-bringtoforeground
-
-test GetVideoMbxNumber
-
-sendtobackground
-test Close
-delete test
-[Endtest]
-
--- a/phonesrv_plat/voice_mailbox_number_api/tsrc/eabi/vmbxenginetestu.def Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
- _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
- _ZTI15CVmbxEngineTest @ 2 NONAME
- _ZTV15CVmbxEngineTest @ 3 NONAME
-
--- a/phonesrv_plat/voice_mailbox_number_api/tsrc/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: For packing VMBXEngine test component.
-*
-*/
-
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_EXPORTS
-
-PRJ_TESTMMPFILES
-vmbxenginetest.mmp
-
-PRJ_MMPFILES
-
-
--- a/phonesrv_plat/voice_mailbox_number_api/tsrc/group/vmbxenginetest.mmp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: For packing VMBXEngine test component.
-*
-*/
-
-
-// To get the MW_LAYER_SYSTEMINCLUDE-definition
-#include <platform_paths.hrh>
-
-TARGET vmbxenginetest.dll
-TARGETTYPE dll
-DEFFILE vmbxenginetest.def
-
-CAPABILITY ALL -TCB
-VENDORID 0x101FB657
-SECUREID 0x102073DB
-
-LIBRARY euser.lib
-LIBRARY stiftestinterface.lib
-LIBRARY vmbx.lib
-
-LIBRARY centralrepository.lib
-LIBRARY cenrepnotifhandler.lib
-
-SOURCEPATH ..\src
-SOURCE vmbxenginetest.cpp
-
-USERINCLUDE ..\inc
-
-MW_LAYER_SYSTEMINCLUDE
-
-// First UID is DLL UID, Second UID is STIF Test Framework UID
-UID 0x1000A834 0x101FB3E7
-
-
--- a/phonesrv_plat/voice_mailbox_number_api/tsrc/group/vmbxenginetest.pkg Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: For packing VMBXEngine test component.
-
-;*Languages
-&EN
-;
-;*Standard SIS file header. This section specifies the package name,
-;application UID, and version/build numbers. Add the package TYPE here if needed.
-#{"VMBX Engine test"},(0x1000A834),1,0,1;
-;
-
-;*Unique (Non-Localised) Vendor name
-;This is used in combination with signing to prevent the unauthroized
-;upgrade ofa a package by someone other than the rightful vendor.
-:"Nokia"
-
-;*Localized Vendor Name
-;This specifies the localised vendor name(s) correspodning to language(s).
-%{"Nokia Test EN"}
-
-;*Files To Copy...<src> <destination>
-"\epoc32\release\armv5\urel\vmbxenginetest.dll"-"c:\sys\bin\vmbxenginetest.dll"
-"..\conf\ui_vmbxenginetest.cfg"-"c:\TestFramework\ui_vmbxenginetest.cfg"
-;"..\init\TestFramework.ini"-"C:\TestFramework\TestFramework.ini"
--- a/phonesrv_plat/voice_mailbox_number_api/tsrc/inc/vmbxenginetest.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: For packing VMBXEngine test component.
-*
-*/
-
-#ifndef CVMBXENGINETEST_H
-#define CVMBXENGINETEST_H
-
-#define STIFTEST
-
-#include <stiflogger.h>
-#include <testscripterinternal.h>
-#include <stiftestmodule.h>
-
-class RVmbxNumber;
-
-class CRepository;
-class MCenRepNotifyHandlerCallback;
-class CCenRepNotifyHandler;
-
-// Logging path
-_LIT( KLogPath, "\\logs\\testframework\\vmbxenginetest\\" );
-// Log file
-_LIT( KLogFile, "vmbxenginetest.txt" );
-
-
-/**
-* Test class for VMBX Engine
-*
-* @lib vmbxenginetest.dll
-* @since S60 5.1
-*/
-class CVmbxEngineTest : public CScriptBase, public MCenRepNotifyHandlerCallback
- {
-public:
-
- /**
- * Two-phased constructor.
- */
- static CVmbxEngineTest* NewL( CTestModuleIf& aTestModuleIf );
-
- /**
- * Destructor.
- */
- virtual ~CVmbxEngineTest();
-
- /**
- * From CScriptBase Runs a script line.
- *
- * @since S60 5.1
- * @param aItem Script line containing method name and parameters
- * @return Symbian OS error code
- */
- TInt RunMethodL( CStifItemParser& aItem );
-
-private: // Methods for engine
-
- /**
- * C++ default constructor.
- */
- CVmbxEngineTest( CTestModuleIf& aTestModuleIf );
-
- /**
- * By default Symbian 2nd phase constructor is private.
- */
- void ConstructL();
-
- /**
- * Calls RVmbxNumber::Connect
- *
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt Connect( CStifItemParser& aItem );
-
- /**
- * Calls RVmbxNumber::Close
- *
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt Close( CStifItemParser& aItem );
-
- /**
- * Calls RVmbxNumber::AllowedToChangeTheNumber
- *
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt AllowedToChangeTheNumber( CStifItemParser& aItem );
-
- /**
- * Calls RVmbxNumber::SelectTypeL
- *
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt SelectTypeL( CStifItemParser& aItem );
-
- /**
- * Calls RVmbxNumber::IsSimMemory
- *
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt IsSimMemory( CStifItemParser& aItem );
-
- /**
- * Calls RVmbxNumber::QueryVideoMbxNumber
- *
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt QueryVideoMbxNumber( CStifItemParser& aItem );
-
- /**
- * Calls RVmbxNumber::QueryNumberL
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt QueryNumberL( CStifItemParser& aItem );
-
- /**
- * Calls RVmbxNumber::GetVideoMbxNumber
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt GetVideoMbxNumber( CStifItemParser& aItem );
-
-private:
- /**
- * Calls ConfCenRepForEditNotAllowedL
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt ConfCenRepForEditNotAllowedL( CStifItemParser& aItem );
-
- /**
- * Calls RevertCenRepEditNotAllowedL
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt RevertCenRepEditNotAllowedL( CStifItemParser& aItem );
-
- /**
- * Calls ConfCenRepForEditAllowedL
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt ConfCenRepForEditAllowedL( CStifItemParser& aItem );
-
- /**
- * Calls InitGetNumFromSpecialMem
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt InitGetNumFromSpecialMem( CStifItemParser& aItem );
-
- /**
- * Calls TestGetNumFromSpecialMem
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt TestGetNumFromSpecialMem( CStifItemParser& aItem );
-
- /**
- * Calls CleanupGetNumFromSpecialMem
- * @since S60 5.1
- * @param aItem, Script line containing method name and parameters
- * @return TInt, KErrNone if OK, other values if a failure happens
- */
- TInt CleanupGetNumFromSpecialMem( CStifItemParser& aItem );
-
- /**
- * Save the source number temporarily
- * @since S60 5.1
- */
- void SaveSourceNumber();
-
- /**
- * Create central repository for session and handler
- * @since S60 5.1
- */
- void CreateCentralRepositoryL();
-
-private: // Data
-
- /**
- * Pointer to logger
- * Own.
- */
- CStifLogger * iLog;
-
- /**
- * Pointer to engine
- * Own.
- */
- RVmbxNumber *iVmbxNumber;
-
- /**
- * Pointer to repository
- * Own.
- */
- CRepository* iSession;
-
- /**
- * Pointer to cenreqnotifyhandler
- * Own.
- */
- CCenRepNotifyHandler* iNotifyHandler;
-
- /**
- * Pointer to HBufC for mailbox number
- * Own.
- */
- HBufC* iNumberBuf;
- };
-
-#endif // CVMBXEngineTestTEST_H
--- a/phonesrv_plat/voice_mailbox_number_api/tsrc/init/TestFramework.ini Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,219 +0,0 @@
-#
-# This is STIF initialization file
-# Comment lines start with '#'-character.
-# See STIF TestFramework users guide.doc for instructions
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set following test engine settings:
-# - Set Test Reporting mode. TestReportMode's possible values are:
-# + 'Summary': Summary of the tested test cases.
-# + 'Environment': Hardware and software info.
-# + 'TestCases': Test case report.
-# + 'FullReport': Set of all above ones.
-# + Example 'TestReportMode= Summary TestCases'
-#
-# - CreateTestReport setting controls report creation mode
-# + YES, Test report will created.
-# + NO, No Test report.
-#
-# - File path indicates the base path of the test report.
-# - File name indicates the name of the test report.
-#
-# - File format indicates the type of the test report.
-# + TXT, Test report file will be txt type, for example 'TestReport.txt'.
-# + HTML, Test report will be html type, for example 'TestReport.html'.
-# + XML, Test report will be xml type, for example 'TestReport.xml'.
-# Note, that xml format is available only when output is set to FILE.
-#
-# - File output indicates output source of the test report.
-# + FILE, Test report logging to file.
-# + RDEBUG, Test report logging to using rdebug.
-#
-# - File Creation Mode indicates test report overwriting if file exist.
-# + OVERWRITE, Overwrites if the Test report file exist.
-# + APPEND, Continue logging after the old Test report information if
-# report exist.
-# - Sets a device reset module's dll name(Reboot).
-# + If Nokia specific reset module is not available or it is not correct one
-# StifHWResetStub module may use as a template for user specific reset
-# module.
-# - Sets STIF test measurement disable options. e.g. pluging1 and pluging2 disablation
-# DisableMeasurement= stifmeasurementplugin01 stifmeasurementplugin02
-#
-
-[Engine_Defaults]
-
-TestReportMode= FullReport # Possible values are: 'Empty', 'Summary', 'Environment',
- # 'TestCases' or 'FullReport'
-
-CreateTestReport= YES # Possible values: YES or NO
-
-TestReportFilePath= C:\LOGS\TestFramework\
-TestReportFileName= TestReport
-
-TestReportFormat= TXT # Possible values: TXT, HTML or XML
-TestReportOutput= FILE # Possible values: FILE or RDEBUG
-TestReportFileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-DeviceResetDllName= StifResetForNokia.dll # e.g. 'StifHWResetStub.dll' for user specific reseting
-
-DisableMeasurement= stifmeasurementdisablenone # Possible values are:
- # 'stifmeasurementdisablenone', 'stifmeasurementdisableall'
- # 'stifmeasurementplugin01', 'stifmeasurementplugin02',
- # 'stifmeasurementplugin03', 'stifmeasurementplugin04',
- # 'stifmeasurementplugin05' or 'stifbappeaprofiler'
-
-Timeout= 0 # Default timeout value for each test case. In milliseconds
-UITestingSupport= YES # Possible values: YES or NO
-#SeparateProcesses= YES # Possible values: YES or NO (default: NO)
-[End_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Module configurations start
-# Modules are added between module tags
-# tags. Module name is specified after ModuleName= tag, like
-# ModuleName= XXXXXXXXX
-# Modules might have initialisation file, specified as
-# IniFile= c:\testframework\YYYYYY
-# Modules might have several configuration files, like
-# TestCaseFile= c:\testframework\NormalCases.txt
-# TestCaseFile= c:\testframework\SmokeCases.txt
-# TestCaseFile= c:\testframework\ManualCases.txt
-
-# (TestCaseFile is synonym for old term ConfigFile)
-
-# Following case specifies demo module settings. Demo module
-# does not read any settings from file, so tags
-# IniFile and TestCaseFile are not used.
-# In the simplest case it is enough to specify only the
-# name of the test module when adding new test module
-
-[New_Module]
-ModuleName= testscripter
-TestCaseFile= c:\testframework\ui_vmbxenginetest.cfg
-
-[End_Module]
-
-
-# Load testmoduleXXX, optionally with initialization file and/or test case files
-#[New_Module]
-#ModuleName= testmodulexxx
-
-#TestModuleXXX used initialization file
-#IniFile= c:\testframework\init.txt
-
-#TestModuleXXX used configuration file(s)
-#TestCaseFile= c:\testframework\testcases1.cfg
-#TestCaseFile= c:\testframework\testcases2.cfg
-#TestCaseFile= c:\testframework\manualtestcases.cfg
-
-#[End_Module]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set STIF logging overwrite parameters for Logger.
-# Hardware and emulator environment logging path and styles can
-# be configured from here to overwrite the Logger's implemented values.
-#
-# Settings description:
-# - Indicates option for creation log directory/directories. If log directory/directories
-# is/are not created by user they will make by software.
-# + YES, Create log directory/directories if not allready exist.
-# + NO, Log directory/directories not created. Only created one is used.
-#
-# - Overwrite emulator path setting.
-# + Example: If 'EmulatorBasePath= C:\LOGS\TestFramework\' and in code is defined
-# Logger's path 'D:\\LOGS\\Module\\' with those definition the path
-# will be 'C:\LOGS\TestFramework\LOGS\Module\'
-#
-# - Overwrite emulator's logging format.
-# + TXT, Log file(s) will be txt type(s), for example 'Module.txt'.
-# + HTML, Log file(s) will be html type(s), for example 'Module.html'.
-#
-# - Overwrited emulator logging output source.
-# + FILE, Logging to file(s).
-# + RDEBUG, Logging to using rdebug(s).
-#
-# - Overwrite hardware path setting (Same description as above in emulator path).
-# - Overwrite hardware's logging format(Same description as above in emulator format).
-# - Overwrite hardware's logging output source(Same description as above in emulator output).
-#
-# - File Creation Mode indicates file overwriting if file exist.
-# + OVERWRITE, Overwrites if file(s) exist.
-# + APPEND, Continue logging after the old logging information if file(s) exist.
-#
-# - Will thread id include to the log filename.
-# + YES, Thread id to log file(s) name, Example filename 'Module_b9.txt'.
-# + NO, No thread id to log file(s), Example filename 'Module.txt'.
-#
-# - Will time stamps include the to log file.
-# + YES, Time stamp added to each line in log file(s). Time stamp is
-# for example'12.Nov.2003 115958 LOGGING INFO'
-# + NO, No time stamp(s).
-#
-# - Will line breaks include to the log file.
-# + YES, Each logging event includes line break and next log event is in own line.
-# + NO, No line break(s).
-#
-# - Will event ranking include to the log file.
-# + YES, Event ranking number added to each line in log file(s). Ranking number
-# depends on environment's tics, for example(includes time stamp also)
-# '012 12.Nov.2003 115958 LOGGING INFO'
-# + NO, No event ranking.
-#
-# - Will write log file in unicode format.
-# + YES, Log file will be written in unicode format
-# + NO, Log will be written as normal, not unicode, file.
-#
-
-[Logger_Defaults]
-
-#NOTE: If you want to set Logger using next setting(s) remove comment(s)'#'
-#NOTE: TestEngine and TestServer logging settings cannot change here
-
-#CreateLogDirectories= YES # Possible values: YES or NO
-
-#EmulatorBasePath= C:\LOGS\TestFramework\
-#EmulatorFormat= HTML # Possible values: TXT or HTML
-#EmulatorOutput= FILE # Possible values: FILE or RDEBUG
-
-#HardwareBasePath= D:\LOGS\TestFramework\
-#HardwareFormat= HTML # Possible values: TXT or HTML
-#HardwareOutput= FILE # Possible values: FILE or RDEBUG
-
-#FileCreationMode= OVERWRITE # Possible values: OVERWRITE or APPEND
-
-#ThreadIdToLogFile= YES # Possible values: YES or NO
-#WithTimeStamp= YES # Possible values: YES or NO
-#WithLineBreak= YES # Possible values: YES or NO
-#WithEventRanking= YES # Possible values: YES or NO
-
-#FileUnicode= YES # Possible values: YES or NO
-#AddTestCaseTitle= YES # Possible values: YES or NO
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-
-
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-# Set filters to be used by ConsoleUI.
-# If you want to use filter with ConsoleUI, simply remove comments
-# from section below and provide valid filter entries.
-# Each filter line has to start with "filter= " keyword.
-# Filter can contain special wildcard characters:
-# * which stands for none or any literal;
-# ? which stands for single character.
-# Filters are not case-sensitive.
-
-#[Filters]
-#filter= *math*
-#filter= *radio*
-#[End_Filters]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,434 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the Mt_vmbxEngine class
+*
+*/
+
+//qt
+#include <QtGui>
+//hb
+#include <hbapplication.h>
+#include <hbmainwindow.h>
+#include <hbview.h>
+//symbian
+#include <e32base.h>
+
+#include <cvoicemailbox.h>
+#include <cvoicemailboxentry.h>
+#include <voicemailboxdefs.h>
+#include <mvoicemailboxobserver.h>
+
+#include "mt_vmbxengine.h"
+
+
+/*------------------------------------------------------------------------------
+This module testing project links to vmbxengine.dll.
+------------------------------------------------------------------------------*/
+
+// -----------------------------------------------------------------------------
+// Constants for verifying test case results
+// -----------------------------------------------------------------------------
+//
+_LIT(KVmbxNumber,"123456789");
+
+ // -----------------------------------------------------------------------------
+// Mt_SatAppEngine::Mt_vmbxEngine
+// Default constructor, remember to null new members here.
+// -----------------------------------------------------------------------------
+//
+Mt_vmbxEngine::Mt_vmbxEngine()
+{
+ qDebug("Mt_vmbxEngine::Mt_vmbxEngine >");
+ qDebug("Mt_vmbxEngine::Mt_vmbxEngine <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_SatAppEngine::~Mt_SatAppEngine
+// -----------------------------------------------------------------------------
+Mt_vmbxEngine::~Mt_vmbxEngine()
+{
+ qDebug("Mt_vmbxEngine::~Mt_vmbxEngine >");
+ qDebug("Mt_vmbxEngine::~Mt_vmbxEngine <");
+}
+
+
+// -----------------------------------------------------------------------------
+// Mt_SatAppEngine::initTestCase
+// QTestLib initialization method, called for each test case.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::initTestCase()
+{
+ qDebug("Mt_vmbxEngine::initTestCase >");
+ qDebug("Mt_vmbxEngine::initTestCase <");
+}
+
+
+// -----------------------------------------------------------------------------
+// Mt_SatAppEngine::cleanupTestCase
+// QTestLib cleanup method, called for each test case.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::cleanupTestCase()
+{
+ qDebug("Mt_SatAppEngine::cleanupTestCase >");
+ qDebug("Mt_SatAppEngine::cleanupTestCase <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testCreateVmbxEntry
+// testCreateVmbxEntry test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testCreateVmbxEntry()
+{
+ qDebug("Mt_vmbxEngine::testCreateVmbxEntry >");
+ TRAPD( err, mVmbxEntry = CVoiceMailboxEntry::NewL());
+ QVERIFY2(KErrNone == err, "create CVoiceMailboxEntry failed ");
+ qDebug("Mt_vmbxEngine::testCreateVmbxEntry <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testCreateVmbxMailbox
+// CreateVmbxMailbox test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testCreateVmbxMailbox()
+{
+ qDebug("Mt_vmbxEngine::testCreateVmbxMailbox >");
+ TRAPD( err, mVmbxEngine = CVoiceMailbox::NewL());
+ QVERIFY2(KErrNone == err, "create CVoiceMailbox failed ");
+ qDebug("Mt_vmbxEngine::testCreateVmbxMailbox <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testVmbxType
+// testVmbxType test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testVmbxType()
+{
+ qDebug("Mt_vmbxEngine::testVmbxType >");
+ QVERIFY(mVmbxEntry);
+ mVmbxEntry->SetVoiceMailboxType(EVmbxVoice);
+ QCOMPARE(mVmbxEntry->VoiceMailboxType(), EVmbxVoice);
+ qDebug("Mt_vmbxEngine::testVmbxType <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testServiceId
+// testServiceId test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testServiceId()
+{
+ qDebug("Mt_vmbxEngine::testServiceId >");
+ QVERIFY(mVmbxEntry);
+ mVmbxEntry->SetServiceId(KVmbxServiceIdNone);
+ QCOMPARE(mVmbxEntry->ServiceId(), KVmbxServiceIdNone);
+ qDebug("Mt_vmbxEngine::testServiceId <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testAlsLineType
+// testAlsLineType test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testAlsLineType()
+{
+ qDebug("Mt_vmbxEngine::testAlsLineType >");
+ QVERIFY(mVmbxEntry);
+ mVmbxEntry->SetVmbxAlsLineType(EVmbxAlsLine1);
+ QCOMPARE(mVmbxEntry->VmbxAlsLineType(), EVmbxAlsLine1);
+ qDebug("Mt_vmbxEngine::testAlsLineType <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testVmbxNumber
+// testVmbxNumber test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testVmbxNumber()
+{
+ qDebug("Mt_vmbxEngine::testVmbxNumber >");
+ QVERIFY(mVmbxEntry);
+ TInt result= mVmbxEntry->SetVmbxNumber(KVmbxNumber);
+ QCOMPARE(result, KErrNone);
+ TPtrC vmbxNumber(KNullDesC);
+ result = mVmbxEntry->GetVmbxNumber(vmbxNumber);
+ QVERIFY2(KErrNone == result, "GetVmbxNumber failed");
+ QVERIFY2(vmbxNumber.Compare(KVmbxNumber) == 0, "Get wrong vmbxnumber");
+ qDebug("Mt_vmbxEngine::testVmbxNumber <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testReset
+// testReset test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testReset()
+{
+ qDebug("Mt_vmbxEngine::testReset >");
+ QVERIFY(mVmbxEntry);
+ mVmbxEntry->Reset();
+ QCOMPARE(mVmbxEntry->VmbxAlsLineType(), EVmbxAlsLineDefault);
+ QCOMPARE(mVmbxEntry->ServiceId(), KVmbxServiceIdNone);
+ QCOMPARE(mVmbxEntry->VoiceMailboxType(), EVmbxNone);
+ QCOMPARE(mVmbxEntry->UsingMemoryLocation(),EVmbxSimMemory);
+ TPtrC vmbxNumber(KNullDesC);
+ TInt result = mVmbxEntry->GetVmbxNumber(vmbxNumber);
+ QCOMPARE(result, KErrNone);
+ QVERIFY(vmbxNumber.Compare(KNullDesC)==0);
+ // mVmbxEntry's vmbxname don't be set before
+ TPtrC vmbxName(KNullDesC);
+ result = mVmbxEntry->GetVmbxName(vmbxName);
+ QVERIFY2(KErrNotFound==result, "GetVmbxName failed");
+ QVERIFY2(vmbxName.Compare(KNullDesC) == 0, "Get wrong vmbxname");
+ qDebug("Mt_vmbxEngine::testReset <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testCheckConfiguration
+// CreateVmbxMailbox test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testCheckConfiguration()
+{
+ qDebug("Mt_vmbxEngine::testCheckConfiguration >");
+ TVoiceMailboxParams params;
+ params.iType = EVmbxVoice;
+ TBool result =
+ mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrNotAllowedOnUi);
+ if (!result) {
+ qDebug("Mt_vmbxEngine::testCheckConfiguration: voice not allowed changed");
+ QEXPECT_FAIL("","testCheckConfiguration voice not allowed changed", Continue);
+ }
+ params.iType = EVmbxVideo;
+ result =
+ mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrNotAllowedOnUi);
+ if (!result) {
+ qDebug( "Mt_vmbxEngine::testCheckConfiguration: video not allowed changed");
+ QEXPECT_FAIL("","testCheckConfiguration video not allowed changed", Continue);
+ }
+ params.iType = EVmbxVoip;
+ result =
+ mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrNotAllowedOnUi);
+ if (result) {
+ QFAIL ("testCheckConfiguration voip failed");
+ }
+ qDebug("Mt_vmbxEngine::testCheckConfiguration <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testCreateWindow
+// testCreateWindow test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testCreateWindow()
+{
+ qDebug("Mt_vmbxEngine::testCreateWindow >");
+ mWindow = new HbMainWindow();
+ QVERIFY(mWindow);
+ mWindow->show();
+ qDebug("Mt_vmbxEngine::testCreateWindow <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testNotifyVmbxNumberChange
+// testNotifyVmbxNumberChange test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testNotifyVmbxNumberChange()
+{
+ qDebug("Mt_vmbxEngine::testNotifyVmbxNumberChange >");
+ QVERIFY(mVmbxEngine);
+ //const bool test = true;
+ //mVmbxEngine->NotifyVmbxNumberChangeL(*this, true);
+ qDebug("Mt_vmbxEngine::testNotifyVmbxNumberChange <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testSaveProvisionedEntry
+// testSaveProvisionedEntry test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testSaveProvisionedEntry()
+{
+ qDebug("Mt_vmbxEngine::testSaveProvisionedEntry >");
+ QVERIFY(mVmbxEngine);
+ QVERIFY(mVmbxEntry);
+ TVoiceMailboxParams params;
+ params.iType = EVmbxVoice;
+ CVoiceMailboxEntry* storedEntry = 0;
+ TInt result(0);
+ if (mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrNotAllowedOnUi)) {
+ qDebug("Mt_vmbxEngine::testSaveProvisionedEntry voice");
+ result = mVmbxEngine->GetStoredEntry(params,storedEntry);
+ if (KErrNotFound == result) {
+ mVmbxEntry->SetVmbxNumber(KNullDesC);
+ } else if(KErrNone == result) {
+ mVmbxEntry->SetVmbxNumber(KVmbxNumber);
+ } else {
+ QFAIL("Mt_vmbxEngine::testSaveProvisionedEntry: voice \
+ GetStoredEntry failed");
+ }
+ mVmbxEntry->SetVoiceMailboxType(EVmbxVoice);
+ result = mVmbxEngine->SaveProvisionedEntry(*mVmbxEntry);
+ QCOMPARE(result, KErrNone);
+ }
+ params.iType = EVmbxVideo;
+ if (mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrNotAllowedOnUi)) {
+ qDebug("Mt_vmbxEngine::testSaveProvisionedEntry video");
+ result = mVmbxEngine->GetStoredEntry(params,storedEntry);
+ if (KErrNotFound == result) {
+ mVmbxEntry->SetVmbxNumber(KNullDesC);
+ } else if (KErrNone == result){
+ TPtrC vmbxNumber(KNullDesC);
+ storedEntry->GetVmbxNumber(vmbxNumber);
+ mVmbxEntry->SetVmbxNumber(vmbxNumber);
+ } else {
+ QFAIL("Mt_vmbxEngine::testSaveProvisionedEntry video \
+ GetStoredEntry failed");
+ }
+ mVmbxEntry->SetVoiceMailboxType(EVmbxVideo);
+ result = mVmbxEngine->SaveProvisionedEntry(*mVmbxEntry);
+ QCOMPARE(result, KErrNone);
+ }
+ delete storedEntry;
+ storedEntry = 0;
+ qDebug("Mt_vmbxEngine::testSaveProvisionedEntry <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testQueryVmbxMailbox
+// CreateVmbxMailbox test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testQueryVmbxMailbox()
+{
+ qDebug("Mt_vmbxEngine::testQueryVmbxMailbox >");
+ TVoiceMailboxParams params;
+ // test QueryVmbxType
+ TInt result = mVmbxEngine->QueryVmbxType(params);
+ CVoiceMailboxEntry* vmbxEntry = 0;
+ if (KErrNotFound == result) {
+ qDebug("Mt_vmbxEngine::testQueryVmbxMailbox no number defined");
+ // test QueryNewEntry
+ result = mVmbxEngine->QueryNewEntry( params, vmbxEntry );
+ QVERIFY2(KErrNone == result, "QueryNewEntry Failed.");
+ if (mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrNotAllowedOnUi)) {
+ // test SaveEntry
+ result = mVmbxEngine->SaveEntry( *vmbxEntry );
+ QVERIFY2(KErrNone == result, "SaveEntry Failed.");
+ }
+ } else if (KErrNone == result) {
+ qDebug("Mt_vmbxEngine::testQueryVmbxMailbox change number");
+ // test change entry
+ result = mVmbxEngine->QueryChangeEntry( params, vmbxEntry );
+ QVERIFY2(KErrNone == result, "QueryChangeEntry Failed.");
+ if (mVmbxEngine->CheckConfiguration(params,EVmbxChangeNbrNotAllowedOnUi)) {
+ result = mVmbxEngine->SaveEntry( *vmbxEntry );
+ QVERIFY2(KErrNone == result, "SaveEntry Failed.");
+ // test GetStoredEntry
+ CVoiceMailboxEntry* storedEntry = 0;
+ result = mVmbxEngine->GetStoredEntry(params,storedEntry);
+ QVERIFY2(KErrNone == result, "GetStoredEntry Failed.");
+ TPtrC storedNumber(KNullDesC);
+ result = storedEntry->GetVmbxNumber(storedNumber);
+ QVERIFY2(KErrNone == result, "GetVmbxNumber Failed.");
+ TPtrC vmbxNumber(KNullDesC);
+ vmbxEntry->GetVmbxNumber(vmbxNumber);
+ QVERIFY2(storedNumber.Compare(vmbxNumber)==0, "number not match");
+ delete storedEntry;
+ storedEntry = 0;
+ }
+ } else {
+ QFAIL("Mt_vmbxEngine::testQueryVmbxMailbox: QueryVmbxType failed");
+ }
+ delete vmbxEntry;
+ vmbxEntry = 0;
+ qDebug("Mt_vmbxEngine::testQueryVmbxMailbox <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testNotifyVmbxNumberChange
+// testNotifyVmbxNumberChange test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testNotifyVmbxNumberChangeCancel()
+{
+ qDebug("Mt_vmbxEngine::testNotifyVmbxNumberChangeCancel >");
+ mVmbxEngine->NotifyVmbxNumberChangeCancel();
+ qDebug("Mt_vmbxEngine::testNotifyVmbxNumberChangeCancel <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testDeleteWindow
+// testDeleteWindow test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testDeleteWindow()
+{
+ qDebug("Mt_vmbxEngine::testDeleteWindow >");
+ delete mWindow;
+ mWindow = 0;
+ qDebug("Mt_vmbxEngine::testDeleteWindow <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testDeleteVmbxMailbox
+// testDeleteVmbxMailbox test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testDeleteVmbxMailbox()
+{
+ qDebug("Mt_vmbxEngine::testDeleteVmbxMailbox >");
+ delete mVmbxEngine;
+ mVmbxEngine = 0;
+ qDebug("Mt_vmbxEngine::testDeleteVmbxMailbox <");
+}
+
+// -----------------------------------------------------------------------------
+// Mt_vmbxEngine::testDeleteVmbxEntry
+// testDeleteVmbxEntry test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Mt_vmbxEngine::testDeleteVmbxEntry()
+{
+ qDebug("Mt_vmbxEngine::testDeleteVmbxEntry >");
+ delete mVmbxEntry;
+ mVmbxEntry = 0;
+ qDebug("Mt_vmbxEngine::testDeleteVmbxEntry <");
+}
+
+// -----------------------------------------------------------------------------
+// main()
+// Main method implemented for directing test output to a file.
+// -----------------------------------------------------------------------------
+int main(int argc, char *argv[])
+ {
+ qDebug("Mt_vmbxEngine.cpp: main() >");
+ QApplication app(argc, argv);
+
+ qDebug("Mt_vmbxEngine.cpp: Mt_vmbxEngine");
+ Mt_vmbxEngine tc;
+ char *pass[3];
+ pass[0] = argv[0];
+ pass[1] = "-o";
+ pass[2] = "c:\\logs\\vmbx\\mt_vmbxengine.txt";
+ const int result = QTest::qExec(&tc, 3, pass);
+
+ qDebug("Mt_vmbxEngine.cpp: main() <, result=%d", result);
+ return result;
+ }
+
+//End file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,192 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the Mt_vmbxEngine class
+*
+*/
+
+
+#ifndef _MT_VMBXENGINE_H
+#define _MT_VMBXENGINE_H
+
+#include <QtTest/QtTest>
+#include <QString>
+#include <QStringList>
+#include <QSignalSpy>
+#include <QMetaType>
+#include <QObject>
+
+
+// Class forwards
+class CVoiceMailboxEntry;
+class CVoiceMailbox;
+class HbMainWindow;
+
+
+/**
+ * Mt_vmbxEngine module test class.
+ *
+ * Tests Mt_vmbxEngine interface.
+ * See cpp file for more information.
+ *
+ * @lib mt_vmbxngine.lib
+ * @since S60 <TB10.1>
+ */
+class Mt_vmbxEngine : public QObject
+{
+ Q_OBJECT
+
+public:
+ Mt_vmbxEngine();
+
+ virtual ~Mt_vmbxEngine();
+
+private slots:
+
+ /**
+ * Called before the first testfunction is executed.
+ * Handles the SetUpMenu command.
+ */
+ void initTestCase();
+
+ /**
+ * Called after the last testfunction has been executed.
+ *
+ */
+ void cleanupTestCase();
+
+ // Called before each testfunction is executed. Currently not needed
+ //void init();
+
+ /**
+ * Called after every testfunction. Currently not needed
+ *
+ */
+ //void cleanup();
+
+ /**
+ * Test first case,Create testCreateVmbxEntry
+ *
+ */
+ void testCreateVmbxEntry();
+
+ /**
+ * Test second case,Create CVoiceMailbox
+ *
+ */
+ void testCreateVmbxMailbox();
+
+ /**
+ * Test middle case,vmbx type
+ *
+ */
+ void testVmbxType();
+
+ /**
+ * Test middle case,ServiceId
+ *
+ */
+ void testServiceId();
+
+ /**
+ * Test middle case, AlsLine Type
+ *
+ */
+ void testAlsLineType();
+
+ /**
+ * Test middle case, VmbxNumber
+ *
+ */
+ void testVmbxNumber();
+
+ /**
+ * Test middle case, reset
+ *
+ */
+ void testReset();
+
+ /**
+ * Test middle case,CheckConfiguration
+ *
+ */
+ void testCheckConfiguration();
+
+ /**
+ * Test middle case,CreateWindow
+ *
+ * provide window for UI
+ */
+ void testCreateWindow();
+
+ /**
+ * Test middle case,regsit observer for vmbx number changed
+ *
+ */
+ void testNotifyVmbxNumberChange();
+
+ /**
+ * Test middle case,SaveProvisionedEntry
+ *
+ */
+ void testSaveProvisionedEntry();
+
+ /**
+ * Test middle case,query VmbxMailbox
+ *
+ */
+ void testQueryVmbxMailbox();
+
+ /**
+ * Test middle case,cancel observer for vmbx number changed
+ *
+ */
+ void testNotifyVmbxNumberChangeCancel();
+
+ /**
+ * Test middle case,delete HbMainWindow
+ *
+ */
+ void testDeleteWindow();
+
+ /**
+ * Test middle case,delete CVoiceMailbox
+ *
+ */
+ void testDeleteVmbxMailbox();
+
+ /**
+ * Test last case,delete CVoiceMailboxEntry
+ *
+ */
+ void testDeleteVmbxEntry();
+
+private: //data
+
+ /**
+ * Own.
+ */
+ CVoiceMailboxEntry* mVmbxEntry;
+
+ /**
+ * Own.
+ */
+ CVoiceMailbox* mVmbxEngine;
+
+ /**
+ * Own.
+ */
+ HbMainWindow* mWindow;
+};
+
+#endif // _MT_VMBXENGINE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/phonesrv_plat/voice_mailbox_number_api/tsrc/mt_vmbxengine.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,42 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+CONFIG += hb
+CONFIG += qtestlib
+
+symbian: {
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
+}
+
+symbian {
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+ /epoc32/include/mw/QtTest \
+ ../../inc
+
+ LIBS += -lvmbxengine.dll\
+ -lflogger.dll
+
+
+}
+
+# Input
+HEADERS += mt_vmbxengine.h
+SOURCES += mt_vmbxengine.cpp
+
--- a/phonesrv_plat/voice_mailbox_number_api/tsrc/src/vmbxenginetest.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,453 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: For packing VMBXEngine test component.
-*
-*/
-
-
-// INCLUDE FILES
-#include <stiftestinterface.h>
-#include <stifparser.h>
-#include <e32math.h>
-#include <centralrepository.h>
-#include <cenrepnotifyhandler.h>
-
-#include "vmnumber.h"
-#include "vmbxenginetest.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-const TUid KUidVoiceMailbox = {0x101F874F};
-const TUint32 KVmUIKeyOpts = 0x00000010;
-
-
-const TInt KVmUIKeyOptsForSimOnly = 1;
-const TInt KVmDefaultUIKeyOpts = 0;
-
-// ---------------------------------------------------------------------------
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// ---------------------------------------------------------------------------
-//
-CVmbxEngineTest::CVmbxEngineTest( CTestModuleIf& aTestModuleIf ) :
- CScriptBase( aTestModuleIf ), iSession( NULL ), iNotifyHandler( NULL )
- {
- }
-
-// ---------------------------------------------------------------------------
-// ConstructL
-// ---------------------------------------------------------------------------
-//
-void CVmbxEngineTest::ConstructL()
- {
- // Constructing static buffer size logger, needed with OOM testing because
- // normally logger allocates memory from heap!
- iLog = CStifLogger::NewL( KLogPath,
- KLogFile,
- CStifLogger::ETxt,
- CStifLogger::EFile,
- EFalse,
- ETrue,
- ETrue,
- EFalse,
- ETrue,
- EFalse,
- 100 );
- iLog->Log( _L( "CVmbxEngineTest logging starts!" ) );
- }
-
-// ---------------------------------------------------------------------------
-// NewL creates a new test module
-// ---------------------------------------------------------------------------
-//
-CVmbxEngineTest* CVmbxEngineTest::NewL( CTestModuleIf& aTestModuleIf )
- {
- CVmbxEngineTest* self = new ( ELeave ) CVmbxEngineTest( aTestModuleIf );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop();
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CVmbxEngineTest::~CVmbxEngineTest()
- {
- if ( iLog )
- {
- iLog->Log( _L( "###### TEST MODULE CLOSED #######" ) );
- delete iLog;
- }
-
- delete iVmbxNumber;
-
- if ( iNotifyHandler )
- {
- iNotifyHandler->StopListening();
- delete iNotifyHandler;
- }
-
- delete iSession;
- delete iNumberBuf;
- }
-
-// ---------------------------------------------------------------------------
-// From class CScriptBase.
-// Runs a script line
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::RunMethodL( CStifItemParser& aItem )
- {
- static TStifFunctionInfo const KFunctions[] =
- {
- ENTRY( "Connect", CVmbxEngineTest::Connect ),
- ENTRY( "Close", CVmbxEngineTest::Close ),
- // test RVmbxNumber APIs
- ENTRY( "AllowedToChangeTheNumber",
- CVmbxEngineTest::AllowedToChangeTheNumber ),
- ENTRY( "SelectTypeL", CVmbxEngineTest::SelectTypeL ),
- ENTRY( "IsSimMemory", CVmbxEngineTest::IsSimMemory ),
- ENTRY( "QueryVideoMbxNumber", CVmbxEngineTest::QueryVideoMbxNumber ),
- ENTRY( "QueryNumberL", CVmbxEngineTest::QueryNumberL ),
- ENTRY( "GetVideoMbxNumber", CVmbxEngineTest::GetVideoMbxNumber ),
- ENTRY( "ConfCenRepForEditNotAllowedL",
- CVmbxEngineTest::ConfCenRepForEditNotAllowedL ),
- ENTRY( "RevertCenRepEditNotAllowedL",
- CVmbxEngineTest::RevertCenRepEditNotAllowedL ),
- ENTRY( "ConfCenRepForEditAllowedL",
- CVmbxEngineTest::ConfCenRepForEditAllowedL ),
- ENTRY( "InitGetNumFromSpecialMem",
- CVmbxEngineTest::InitGetNumFromSpecialMem ),
- ENTRY( "TestGetNumFromSpecialMem",
- CVmbxEngineTest::TestGetNumFromSpecialMem ),
- ENTRY( "CleanupGetNumFromSpecialMem",
- CVmbxEngineTest::CleanupGetNumFromSpecialMem )
- };
-
- const TInt count = sizeof( KFunctions ) /
- sizeof( TStifFunctionInfo );
-
- return RunInternalL( KFunctions, count, aItem );
- }
-
-// ---------------------------------------------------------------------------
-// Calls CVmbxEngineTest::Connect method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::Connect( CStifItemParser& /*aItem*/ )
- {
- TInt error = KErrAlreadyExists;
- if ( !iVmbxNumber )
- {
- iVmbxNumber = new RVmbxNumber();
- if ( iVmbxNumber )
- {
- iLog->Log( _L( "Opening.." ) );
- error = iVmbxNumber->Open();
- if ( KErrNone == error )
- {
- // save the source number temporarily
- // so that it will be used while some cases are reverted.
- SaveSourceNumber();
- }
- }
- }
- iLog->Log( _L( "Connecting done, %d" ), error );
- return error;
- }
-
-// ---------------------------------------------------------------------------
-// Calls CVmbxEngineTest::Close method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::Close( CStifItemParser& /*aItem*/ )
- {
- iLog->Log( _L( "Closing.." ) );
-
- if ( iVmbxNumber )
- {
- iVmbxNumber->Close();
- delete iVmbxNumber;
- iVmbxNumber = NULL;
-
- if ( iNumberBuf )
- {
- delete iNumberBuf;
- iNumberBuf = NULL;
- }
- }
- return KErrNone;
- }
-
-// ---------------------------------------------------------------------------
-// CVmbxEngineTest::AllowedToChangeTheNumber method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::AllowedToChangeTheNumber( CStifItemParser& /*aItem*/ )
- {
- TInt result( KErrNone );
- result = iVmbxNumber->AllowedToChangeTheNumber();
-
- iLog->Log( _L( "AllowedToChangeTheNumber return %d" ), result);
- return result;
- }
-
-// ---------------------------------------------------------------------------
-// CVmbxEngineTest::SelectTypeL method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::SelectTypeL( CStifItemParser& /*aItem*/ )
- {
- TInt result( KErrNone );
- TRAP( result, iVmbxNumber->SelectTypeL( EVmbxDefine ) );
-
- iLog->Log( _L( "SelectTypeL return result %d" ), result );
- return result;
- }
-
-// ---------------------------------------------------------------------------
-// CVmbxEngineTest::IsSimMemory method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::IsSimMemory( CStifItemParser& /*aItem*/ )
- {
- // Use allownextresult keyword in config file to control what is expected
- // return value in your test case.
- TInt result( KErrNone );
- result = iVmbxNumber->IsSimMemory();
- iLog->Log( _L( "IsSimMemory return %d" ), result );
- return result;
- }
-
-// ---------------------------------------------------------------------------
-// CVmbxEngineTest::QueryVideoMbxNumber method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::QueryVideoMbxNumber( CStifItemParser& aItem )
- {
- // Use allownextresult keyword in config file to control what is expected
- // return value in your test case.
- TInt result( KErrNone );
- TBuf< KVmbxMaxNumberLength > number;
-
- TInt queryType( KErrNone );
- aItem.GetNextInt( queryType );
-
- TRAP( result, iVmbxNumber->QueryVideoMbxNumberL(
- ( TVmbxQueryType )queryType, number ) );
-
- iLog->Log( _L( "QueryVideoMbxNumber return %d" ), result );
- return result;
- }
-
-// ---------------------------------------------------------------------------
-// CVmbxEngineTest::QueryNumberL method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::QueryNumberL( CStifItemParser& aItem )
- {
- // Use allownextresult keyword in config file to control what is expected
- // return value in your test case.
- TInt result( KErrNone );
- TBuf< KVmbxMaxNumberLength > number;
-
- TInt queryType( KErrNone );
- aItem.GetNextInt( queryType );
-
- TRAP( result, iVmbxNumber->QueryNumberL( ( TVmbxQueryType )queryType,
- number, EFalse ) );
-
- iLog->Log( _L( "QueryNumberL return %d" ), result );
- return result;
- }
-
-// ---------------------------------------------------------------------------
-// CVmbxEngineTest::GetVideoMbxNumber method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::GetVideoMbxNumber( CStifItemParser& /*aItem*/ )
- {
- // Use allownextresult keyword in config file to control what is expected
- // return value in your test case.
- TInt result( KErrNone );
- TBuf< KVmbxMaxNumberLength > number;
-
- result = iVmbxNumber->GetVideoMbxNumber( number );
-
- iLog->Log( _L( "GetVideoMbxNumber return %d" ), result );
- return result;
- }
-
-// ---------------------------------------------------------------------------
-// Calls CVmbxEngineTest::ConfCenRepForEditNotAllowedL method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::ConfCenRepForEditNotAllowedL( CStifItemParser& /*aItem*/ )
- {
- TInt ret( KErrNone );
- // create central repository for session and handler
- CreateCentralRepositoryL();
-
- // configurate the key for the special condition like "sim only"
- ret = iSession->Set( KVmUIKeyOpts, KVmUIKeyOptsForSimOnly );
-
- iLog->Log( _L( "ConfCenRepForEditNotAllowedL %d" ), ret );
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// Calls CVmbxEngineTest::RevertCenRepEditNotAllowedL method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::RevertCenRepEditNotAllowedL( CStifItemParser& /*aItem*/ )
- {
- TInt ret( KErrNone );
- // reset the key to default value
- ret = iSession->Set( KVmUIKeyOpts, KVmDefaultUIKeyOpts );
- iLog->Log( _L( "RevertCenRepEditNotAllowedL %d" ), ret );
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// Calls CVmbxEngineTest::ConfCenRepForEditAllowedL method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::ConfCenRepForEditAllowedL( CStifItemParser& /*aItem*/ )
- {
- TInt ret( KErrNone );
- // create central repository for session and handler
- CreateCentralRepositoryL();
-
- // configurate the key for the special condition like "sim only"
- ret = iSession->Set( KVmUIKeyOpts, KVmDefaultUIKeyOpts );
-
- iLog->Log( _L( "ConfCenRepForEditAllowedL %d" ), ret );
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// Calls CVmbxEngineTest::InitGetNumFromSpecialMem method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::InitGetNumFromSpecialMem( CStifItemParser& aItem )
- {
- TInt ret( KErrNone );
-
- // Get number from Script file
- TPtrC numberFromScript;
- aItem.GetNextString( numberFromScript );
- iLog->Log( _L( "InitGetNumFromSpecialMem saving number %S" ),
- &numberFromScript );
-
- // the number need to be saved to the sim/phone memory
- // to init the special case
- ret = iVmbxNumber->SaveVmbxNumber( numberFromScript,
- EAlsActiveLineEntry );
-
- iLog->Log( _L( "InitGetNumFromSpecialMem return %d" ), ret );
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// Calls CVmbxEngineTest::TestGetNumFromSpecialMem method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::TestGetNumFromSpecialMem( CStifItemParser& aItem )
- {
- TInt ret( KErrNotFound );
- TBuf< KVmbxMaxNumberLength > number;
- // Use allownextresult keyword in config file to control what is expected
- // return value in your test case.
-
- TPtrC numberFromScript;
- aItem.GetNextString( numberFromScript );
- iLog->Log( _L( "TestGetNumFromSpecialMem saving number %S" ),
- &numberFromScript );
-
- ret = iVmbxNumber->GetVmbxNumber( number );
- if ( KErrNone == ret && KErrNone == number.Compare( numberFromScript ) )
- {
- ret = KErrNone;
- }
-
- iLog->Log( _L( "TestGetNumFromSpecialMem number %S" ), &number );
- iLog->Log( _L( "TestGetNumFromSpecialMem return %d" ), ret );
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// Calls CVmbxEngineTest::CleanupGetNumFromSpecialMem method
-// ---------------------------------------------------------------------------
-//
-TInt CVmbxEngineTest::CleanupGetNumFromSpecialMem( CStifItemParser& /*aItem*/ )
- {
- TInt ret( KErrNone );
- // revert the source number to sim/phone memory
- ret = iVmbxNumber->SaveVmbxNumber( *iNumberBuf,
- EAlsActiveLineEntry );
-
- iLog->Log( _L( "CleanupGetNumFromSpecialMem return %d" ), ret );
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// Save the source number temporarily
-// ---------------------------------------------------------------------------
-//
-void CVmbxEngineTest::SaveSourceNumber()
- {
- iNumberBuf = HBufC::New( KVmbxMaxNumberLength );
- if ( iNumberBuf )
- {
- TPtr ptr( iNumberBuf->Des() );
- iVmbxNumber->GetVmbxNumber( ptr );
- }
- }
-
-// ---------------------------------------------------------------------------
-// Create central repository for session and handler
-// ---------------------------------------------------------------------------
-//
-void CVmbxEngineTest::CreateCentralRepositoryL()
- {
- if ( !iSession )
- {
- // create central repository
- iSession = CRepository::NewL( KUidVoiceMailbox );
- }
-
- if ( !iNotifyHandler )
- {
- // set notify handler, when the key had been changed
- // in the whole repository
- iNotifyHandler = CCenRepNotifyHandler::NewL( *this, *iSession );
- if ( iNotifyHandler )
- {
- iNotifyHandler->StartListeningL();
- }
- }
- }
-
-// ======== GLOBAL FUNCTIONS ========
-// -----------------------------------------------------------------------------
-// LibEntryL is a polymorphic Dll entry point
-// Returns: CScriptBase*: Pointer to Test Module object
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CScriptBase* LibEntryL( CTestModuleIf& aTestModuleIf )
- {
- return CVmbxEngineTest::NewL( aTestModuleIf );
- }
--- a/phonesrv_plat/voice_mailbox_number_api/voice_mailbox_number_api.metaxml Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-<?xml version="1.0" ?>
-<api id="8ba7be52cd2856e89b176dcabc91df05" dataversion="1.0">
- <name>Voice Mailbox Number API</name>
- <description>An interface for fetching/saving the vmbx number and querying for it</description>
- <type>c++</type>
- <subsystem>phoneuis</subsystem>
- <libs>
- <lib name="vmbx.lib" />
- </libs>
- <release category="domain"/>
- <attributes>
- <!-- This indicates wether the api provedes separate html documentation -->
- <!-- or is the additional documentation generated from headers. -->
- <!-- If you are unsuere then the value is "no" -->
- <htmldocprovided>yes</htmldocprovided>
- <adaptation>no</adaptation>
- </attributes>
-</api>
--- a/phonesrv_plat/voice_mailbox_settings_api/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/phonesrv_plat/voice_mailbox_settings_api/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -12,7 +12,7 @@
* Contributors:
*
* Description: File that exports the files belonging to
-: Voice Mailbox Settings API
+* voice mailbox settings api
*
*/
--- a/satengine/SatServer/Commands/SendSSCmd/group/SendSsCmd.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SendSSCmd/group/SendSsCmd.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -15,7 +15,6 @@
*
*/
-
#include <data_caging_paths.hrh>
#include <platform_paths.hrh>
#include "../../../inc/SatMacroes.h"
@@ -45,18 +44,17 @@
USERINCLUDE ../../../inc
USERINCLUDE ../inc
-// The application domain layer systeminclude is needed as PhoneParser and PhoneSettings are used in SS.
+// The application domain layer systeminclude is needed as PhoneParser is used
APP_LAYER_SYSTEMINCLUDE
SYSTEMINCLUDE /epoc32/include/ecom
-SYSTEMINCLUDE ../../../../../inc // Domain telephony
-SYSTEMINCLUDE ../../../../inc // Subsystem satengine
+SYSTEMINCLUDE ../../../../../inc // Domain telephony
+SYSTEMINCLUDE ../../../../inc // Subsystem satengine
LIBRARY euser.lib
LIBRARY etelsat.lib
LIBRARY SatEngine.lib
LIBRARY PhoneParser.lib
-LIBRARY customAPI.lib // RMmCustomAPI
-LIBRARY psui.lib
+LIBRARY customAPI.lib // RMmCustomAPI
LIBRARY etel.lib
LIBRARY etelmm.lib
LIBRARY phonesettings.lib
--- a/satengine/SatServer/Commands/SendSSCmd/inc/csatsendssbarringnouiobs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SendSSCmd/inc/csatsendssbarringnouiobs.h Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
#ifndef CSATSENDSSBARRINGNOUIOBS_H
#define CSATSENDSSBARRINGNOUIOBS_H
-#include <MPsetBarringObs.h>
+#include <mpsetbarringobs.h>
/**
* Implements MPsetBarringObserver and gets notifications of the barring process
--- a/satengine/SatServer/Commands/SendSSCmd/inc/csatsendsscallwaitingnouiobs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SendSSCmd/inc/csatsendsscallwaitingnouiobs.h Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
#ifndef CSATSENDSSCALLWAITINGNOUIOBS_H
#define CSATSENDSSCALLWAITINGNOUIOBS_H
-#include <MPsetCallWaitingObs.h>
+#include <mpsetcallwaitingobs.h>
/**
* Implements MPsetCallWaitingObserver and gets notifications
--- a/satengine/SatServer/Commands/SendSSCmd/inc/csatsendssclinouiobs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SendSSCmd/inc/csatsendssclinouiobs.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#ifndef CSATSENDSSCLINOUIOBS_H
#define CSATSENDSSCLINOUIOBS_H
-#include <MPsetCliObserver.h>
+#include <mpsetcliobserver.h>
/**
* Implements MPsetCliObserver and is responsible for handling notes related
--- a/satengine/SatServer/Commands/SendSSCmd/inc/csatsendssdivertnouiobs.h Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SendSSCmd/inc/csatsendssdivertnouiobs.h Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
#ifndef CSATSENDSSDIVERTNOUIOBS_H
#define CSATSENDSSDIVERTNOUIOBS_H
-#include <MPsetDivertObs.h>
+#include <mpsetdivertobs.h>
/**
* Implements MPsetDivertObserver and gets notifications of
--- a/satengine/SatServer/Commands/SendSSCmd/inc/csatsendsshandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SendSSCmd/inc/csatsendsshandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -19,14 +19,14 @@
#ifndef CSATSENDSSHANDLER_H
#define CSATSENDSSHANDLER_H
-#include <CPhoneGsmSsHandler.h>
+#include <cphonegsmsshandler.h>
#include <nwdefs.h>
-#include <PsetCallWaiting.h>
-#include <PsetContainer.h>
-#include <PsetCallBarring.h>
-#include <PsetCallDiverting.h>
-#include <PsetCli.h>
-#include <MPsetRequestObs.h>
+#include <psetcallwaiting.h>
+#include <psetcontainer.h>
+#include <psetcallbarring.h>
+#include <psetcalldiverting.h>
+#include <psetcli.h>
+#include <mpsetrequestobs.h>
class CSatSendSsBarringNoUiObs;
class CSatSendSsCliNoUiObs;
--- a/satengine/SatServer/Commands/SendSSCmd/src/CSendSsHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SendSSCmd/src/CSendSsHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -16,10 +16,10 @@
*/
-#include <CPhoneGsmParserBase.h>
-#include <CPhoneGsmParserResult.h>
-#include <PhoneGsmParser.h>
-#include <CPhoneGsmOptionContainerBase.h>
+#include <cphonegsmparserbase.h>
+#include <cphonegsmparserresult.h>
+#include <phonegsmparser.h>
+#include <cphonegsmoptioncontainerbase.h>
#include "MSatSystemState.h"
#include "MSatApi.h"
--- a/satengine/SatServer/Commands/SendSSCmd/src/csatsendsshandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SendSSCmd/src/csatsendsshandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -15,18 +15,12 @@
*
*/
-
#include "csatsendsshandler.h"
-#include <PsuiWaitingObs.h>
-#include <PsuiContainer.h>
#include <PsetCallWaiting.h>
#include <PsetContainer.h>
#include <PsetCallBarring.h>
-#include <PsuiBarringObs.h>
#include <PsetCallDiverting.h>
-#include <PsuiDivertObs.h>
#include <PsetCli.h>
-#include <PsuiCliObserver.h>
#include "csatsendssbarringnouiobs.h"
#include "csatsendssdivertnouiobs.h"
--- a/satengine/SatServer/Commands/SendUSSDCmd/src/CSendUssdHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SendUSSDCmd/src/CSendUssdHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -16,8 +16,8 @@
*/
-#include <CPhCltUssdSatClient.h>
-#include <CPhCltUssd.h>
+#include <cphcltussdsatclient.h>
+#include <cphcltussd.h>
#include "MSatSystemState.h"
#include "MSatApi.h"
--- a/satengine/SatServer/Commands/SetUpCallCmd/group/SetUpCallCmd.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SetUpCallCmd/group/SetUpCallCmd.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -30,6 +30,8 @@
SOURCEPATH ../src
SOURCE std.cpp
SOURCE CSetUpCallHandler.cpp
+SOURCE csetupcallrequesthandler.cpp
+SOURCE csetupcallstatushandler.cpp
START RESOURCE 1000f005.rss
TARGET SetUpCallCmd.rsc
@@ -43,11 +45,10 @@
SYSTEMINCLUDE ../../../../../inc // Domain telephony
SYSTEMINCLUDE ../../../../inc // Subsystem satengine
-LIBRARY aiwdialdata.lib
-LIBRARY ServiceHandler.lib
-LIBRARY phoneclient.lib
LIBRARY euser.lib
LIBRARY etelsat.lib
+LIBRARY etelmm.lib
+LIBRARY etel.lib
LIBRARY SatEngine.lib
#ifdef ENABLE_SAT_LOGGING
--- a/satengine/SatServer/Commands/SetUpCallCmd/group/UT_CSetUpCallHandler.pkg Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SetUpCallCmd/group/UT_CSetUpCallHandler.pkg Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
* Name : UT_CSetUpCallHandler.pkg
* Part of : SatServer / SetUpCallCmd
* Description : Project package file for project SetUpCall plug-in
-* Version : %version: e003sa18#4 %
+* Version : %version: e003sa17#6 %
*
* Copyright (C) 2002-2008 Nokia. All rights reserved.
* This material, including documentation and any related computer
--- a/satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SetUpCallCmd/inc/CSetUpCallHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -21,22 +21,18 @@
#include <etelsat.h>
-#include <AiwServiceHandler.h>
-#include <CPhCltEmergencyCall.h>
-#include <MPhCltEmergencyCallObserver.h>
-
#include "CSatCommandHandler.h"
#include "SatSTypes.h"
+class CSetupCallRequestHandler;
+
/**
* Command handler for SetUpCall command.
*
* @lib SetUpCallCmd.lib
* @since S60 v3.0
*/
-class CSetUpCallHandler : public CSatCommandHandler,
- public MAiwNotifyCallback,
- public MPhCltEmergencyCallObserver
+class CSetUpCallHandler : public CSatCommandHandler
{
public:
@@ -64,6 +60,28 @@
*/
void ClientResponse();
+ /**
+ * Handle the setup call Request Complete.
+ *
+ * @param aErrCode Result of ETelMM Api calling.
+ */
+ void SetupCallRequestComplete( const TInt aErrCode );
+
+ /**
+ * TSetupCallStatus
+ * setup call status, when there is an asynchronous
+ * operation is handling by the CSetupCallCallRequestHandler
+ * we will save some status information
+ */
+ enum TSetupCallStatus
+ {
+ ESetupCallIdle = 0,
+ ESetupCallDialWaiting,
+ ESetupCallTerminateWaiting,
+ ESetupCallEmergencyWaiting
+ };
+
+
protected:
// from base class CActive
@@ -115,33 +133,6 @@
*/
void UiLaunchFailed();
-// from base class MAiwNotifyCallback
-
- /**
- * From MAiwNotifyCallback
- * Called when dial request is completed.
- *
- * @param aCmdId Identifier of requested Aiw operation.
- * @param aEventId Identifier of status event.
- * @param aEventParamList Parameters of status event.
- * @param aInParamList Parameters of Aiw operation.
- */
- TInt HandleNotifyL(
- const TInt aCmdId,
- const TInt aEventId,
- CAiwGenericParamList& aEventParamList,
- const CAiwGenericParamList& aInParamList );
-
-// from base class MPhCltEmergencyCallObserver
-
- /**
- * From MPhCltEmergencyCallObserver
- * Called when emergency dial request is completed.
- *
- * @param aStatus Non zero value means failure.
- */
- void HandleEmergencyDialL( const TInt aStatus );
-
private:
CSetUpCallHandler();
@@ -153,7 +144,7 @@
*
* @since S60 3.2
*/
- void DoSetupCallL();
+ void DoSetupCall( CSetupCallRequestHandler& aHandler );
/**
* Return terminal response filled according to dial result.
@@ -192,21 +183,11 @@
* @param aNumber dialling number string
*/
void CheckNumber( TDes& aNumber ) const;
-
- /**
- * Converts a TCCP error to the corresponding symbian error.
- *
- * @param aTccpError A TCCP error number to be converted into
- * a symbian one.
- *
- * @return The corresponding symbian error from TCCP error.
- */
- TInt TccpErrorToSymbianError( const TInt aTccpError ) const;
-
+
/**
* Create emergency call
*/
- void CreateEmergencyCallL();
+ void CreateEmergencyCall( CSetupCallRequestHandler& aHandler );
private: // data
@@ -251,15 +232,10 @@
TSatQueryRspV1Pckg iQueryRspPckg;
/**
- * Service handler to make normal call.
+ * Handing the asynchronous request
*/
- CAiwServiceHandler* iServiceHandler;
-
- /**
- * Utility to handle emergency calls.
- */
- CPhCltEmergencyCall* iEmergencyCallApi;
-
+ CSetupCallRequestHandler* iRequestHandler;
+
/**
* Current call is an emergency call.
*/
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satengine/SatServer/Commands/SetUpCallCmd/inc/csetupcallrequesthandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,145 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Create the call and emergency call to ETelMM
+*
+*/
+
+
+#ifndef CSETUPCALLREQUESTHANDLER_H
+#define CSETUPCALLREQUESTHANDLER_H
+
+#include <e32base.h>
+#include "msatmultimodeapi.h"
+
+#include "csetupcallstatushandler.h"
+
+class CSetUpCallHandler;
+class MSatAsyncToSync;
+
+/**
+* This is the handler for the ETel MM api Request.
+* This active objects is registered with ETelMM Api to send request and
+* receive notifications about some Request Complete.
+*
+* @lib CallControlCmd
+* @since S60 v5.0.1
+*/
+
+class CSetupCallRequestHandler : public CActive,
+ public MSetupCallStatusObserver
+ {
+
+public:
+
+ /**
+ * Two-phased constructor.
+ * @param aPhone A reference to the MSatMultiModeApi.
+ * @param aDispatcher Pointer to Ss handler
+ * @return a pointer to the newly created object.
+ */
+ static CSetupCallRequestHandler* NewL( MSatMultiModeApi& aPhone,
+ CSetUpCallHandler* aDispatcher );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CSetupCallRequestHandler();
+
+ /**
+ * Access RMobileCall::DialNoFdnCheck by MSatMultiModeApi
+ * for the paramter information please see the etelmm.h
+ */
+ void DialNumber( const TDesC8& aCallParams, const TDesC& aTelNumber,
+ TBool aTerminateOtherCall, MSatAsyncToSync* aAsyncToSync );
+
+ /**
+ * Access RMobileCall::DialEmergencyCall by MSatMultiModeApi
+ * for the paramter information please see the etelmm.h
+ */
+ void DialEmergencyCall( const TDesC& aTelNumber );
+
+ /**
+ * Cancel the asynchronous operations that required to the ETel MM api
+ */
+ void CancelOperation();
+
+ /**
+ * From MSetupCallStatusObserver
+ * The call status update notification from ETel MM
+ */
+ void CallSatatusChanged( const TInt status );
+
+protected:
+
+ /**
+ * From CActive, handles the request completion.
+ */
+ void RunL();
+
+
+ /**
+ * From CActive, handle the request cancel
+ */
+ void DoCancel();
+
+private:
+
+ /**
+ * C++ default constructor.
+ * @param aPriority An active object priority value.
+ * @param aPhone A reference to MSatMultiModeApi.
+ */
+ CSetupCallRequestHandler( MSatMultiModeApi& aPhone,
+ CSetUpCallHandler* aDispatcher );
+
+ /**
+ * Two phase contruction.
+ */
+ void ConstructL();
+
+private: //new method
+
+ void HandleSetupCallStatusChange();
+
+private: // Data
+
+ /**
+ * Reference to the MSatMultiModeApi
+ */
+ MSatMultiModeApi& iPhone;
+
+ /**
+ * Pointer to SendSs command handler
+ */
+ CSetUpCallHandler* iDispatcher;
+
+ /**
+ * Use to monite the status of call
+ * Own
+ */
+ CSetupCallStatusHandler *iStatusHandler;
+
+ /**
+ * Current call is an emergency call.
+ */
+ TBool iEmergencyCall;
+
+ /**
+ * Terminal response to the SIM has been send
+ */
+ TBool iResponsed;
+
+ };
+
+#endif // CSETUPCALLREQUESTHANDLER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satengine/SatServer/Commands/SetUpCallCmd/inc/csetupcallstatushandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,120 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Minite the call creating status by ETelMM
+*
+*/
+
+
+
+#ifndef CSETUPCALLSTATUSHANDLER_H
+#define CSETUPCALLSTATUSHANDLER_H
+
+#include <e32base.h>
+#include "msatmultimodeapi.h"
+
+
+class MSetupCallStatusObserver
+ {
+public:
+ /**
+ * The call status update notification from ETel MM
+ */
+ virtual void CallSatatusChanged( const TInt status ) = 0;
+ };
+
+/**
+* This is the handler for the ETel MM api Request.
+* This active objects is registered with ETelMM Api to send request and
+* receive notifications about some Request Complete.
+*
+* @lib SetupCallCmd
+* @since S60 v5.0.1
+*/
+
+class CSetupCallStatusHandler : public CActive
+ {
+
+public:
+
+ /**
+ * Two-phased constructor.
+ * @param aPhone A reference to the MSatMultiModeApi.
+ * @param aDispatcher Pointer to Ss handler
+ * @return a pointer to the newly created object.
+ */
+ static CSetupCallStatusHandler* NewL( MSatMultiModeApi& aPhone,
+ MSetupCallStatusObserver* aDispatcher );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CSetupCallStatusHandler();
+
+ /**
+ * Start to monite the call status by using ETel MM api
+ */
+ void Start();
+ /**
+ * Cancel the asynchronous operations that required to the ETel MM api
+ */
+ void CancelOperation();
+
+protected:
+
+ /**
+ * From CActive, handles the request completion.
+ */
+ void RunL();
+
+
+ /**
+ * From CActive, handle the request cancel
+ */
+ void DoCancel();
+
+private:
+
+ /**
+ * C++ default constructor.
+ * @param aPriority An active object priority value.
+ * @param aPhone A reference to MSatMultiModeApi.
+ */
+ CSetupCallStatusHandler( MSatMultiModeApi& aPhone,
+ MSetupCallStatusObserver* aDispatcher );
+
+private: //new method
+
+ void HandleConnectingStatusChange();
+
+private: // Data
+
+ /**
+ * Reference to the MSatMultiModeApi
+ */
+ MSatMultiModeApi& iPhone;
+
+ /**
+ * Pointer to SendSs command handler
+ */
+ MSetupCallStatusObserver* iDispatcher;
+
+ /**
+ * Use this to get the RMobileCall status in
+ *
+ */
+ RMobileCall::TMobileCallStatus iMobileCallStatus;
+
+ };
+
+#endif // CSETUPCALLSTATUSHANDLER_H
--- a/satengine/SatServer/Commands/SetUpCallCmd/src/CSetUpCallHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SetUpCallCmd/src/CSetUpCallHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -14,13 +14,9 @@
* Description: Handles SetUpCall command
*
*/
-
-
-#include <aiwinternaldialdata.h>
-#include <aiwdialdataext.h>
-
+#include <e32base.h>
+#include <etelmm.h>
#include <exterror.h>
-#include <ccpdefs.h>
#include "MSatApi.h"
#include "MSatUtils.h"
@@ -28,6 +24,7 @@
#include "MSatUiSession.h"
#include "SatSOpcodes.h"
#include "MSatSUiClientHandler.h"
+#include "csetupcallrequesthandler.h"
#include "CSetUpCallHandler.h"
#include "TSatExtErrorUtils.h"
#include "SatLog.h"
@@ -45,9 +42,6 @@
const TUint8 KExpansionChar( 0x2E );
_LIT( KFixedSimEmergencyNumber, "112" );
-_LIT8( KContentType, "*" );
-// 3GPP TS 24.008
-const TInt KMaximumPhoneNumberLength( 80 );
// ======== MEMBER FUNCTIONS ========
@@ -80,17 +74,9 @@
Cancel();
- if ( iServiceHandler )
- {
- delete iServiceHandler;
- iServiceHandler = NULL;
- }
-
- if ( iEmergencyCallApi )
- {
- delete iEmergencyCallApi;
- iEmergencyCallApi = NULL;
- }
+
+ delete iRequestHandler;
+ iRequestHandler = NULL;
LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::~CSetUpCallHandler exiting" )
}
@@ -145,15 +131,15 @@
if ( iQueryRsp.iAccepted )
{
// User accepted the call, make the call
- TRAPD( error, DoSetupCallL() );
-
- if ( KErrNone != error )
+ if( iRequestHandler )
{
- LOG2( NORMAL,
- "SETUPCALL: CSetUpCallHandler::ClientResponse Dial failed: %i",
- error )
-
- CompleteSetupCall( RSat::KCmdDataNotUnderstood );
+ DoSetupCall( *iRequestHandler );
+ }
+ else
+ {
+ CompleteSetupCall(
+ RSat::KMeUnableToProcessCmd,
+ RSat::KNoSpecificMeProblem );
}
}
else
@@ -188,6 +174,10 @@
LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoCancel calling" )
iUtils->USatAPI().NotifySetUpCallCancel();
+ if( iRequestHandler )
+ {
+ iRequestHandler->Cancel();
+ }
LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoCancel exiting" )
}
@@ -391,15 +381,13 @@
{
LOG( SIMPLE,
"SETUPCALL: CSetUpCallHandler::HandleCommand iEmergencyCall true" )
- TRAPD( err, CreateEmergencyCallL() );
- if ( KErrNone != err )
+ if ( iRequestHandler )
{
- LOG2( SIMPLE,
- "SETUPCALL: CSetUpCallHandler::HandleCommand DialEmergencyCallL \
- failed: %d", err )
-
+ CreateEmergencyCall( *iRequestHandler );
+ }
+ else
+ {
iEmergencyCall = EFalse;
-
// Set the terminal response info.
CompleteSetupCall(
RSat::KMeUnableToProcessCmd,
@@ -520,123 +508,52 @@
}
// -----------------------------------------------------------------------------
-// From class MAiwNotifyCallback.
-// Called when dial request is completed.
+// CSetUpCallHandler::SetupCallRequestComplete
+// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-TInt CSetUpCallHandler::HandleNotifyL(
- const TInt aCmdId,
- const TInt aEventId,
- CAiwGenericParamList& aEventParamList,
- const CAiwGenericParamList& /*aInParamList*/ )
+void CSetUpCallHandler::SetupCallRequestComplete( TInt aErrCode )
{
- LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::HandleNotifyL calling" )
-
- if ( KAiwCmdCall == aCmdId )
- {
- LOG2( SIMPLE,
- "SETUPCALL: CSetUpCallHandler::HandleNotifyL event: %d", aEventId )
- switch ( aEventId )
- {
- case KAiwEventError:
- case KAiwEventCompleted:
- case EGenericParamError: // This is due CCaUiPlugin behaviour.
- // Also overlaps event KAiwEventStarted.
- {
- LOG( SIMPLE,
- "SETUPCALL: CSetUpCallHandler::HandleNotifyL SetupCall \
- Completed" )
-
- // Fetch completion status.
- TInt index( 0 );
- const TAiwGenericParam* param = aEventParamList.FindFirst(
- index, EGenericParamError );
-
- if ( param )
- {
- LOG( SIMPLE,
- "SETUPCALL: CSetUpCallHandler::HandleNotifyL param true" )
-
- // Converts error number to symbian-formatted before
- // calling CompleteSetupCallWithStatus.
- TInt error = TccpErrorToSymbianError(
- param->Value().AsTInt32() );
- CompleteSetupCallWithStatus( error );
- }
- else
- {
- CompleteSetupCall( RSat::KSuccess );
- }
- }
- break;
+ LOG( SIMPLE,
+ "SETUPCALL: CSetUpCallHandler::SetupCallRequestComplete calling" )
- case KAiwEventCanceled:
- case KAiwEventStopped:
- case KAiwEventQueryExit:
- {
- LOG( SIMPLE,
- "SETUPCALL: CSetUpCallHandler::HandleNotifyL SetupCall \
- cancelled" )
-
- CompleteSetupCallWithStatus( KErrAbort );
- }
- break;
-
- case KAiwEventOutParamCheck:
- case KAiwEventInParamCheck:
- {
- LOG( SIMPLE,
- "SETUPCALL: CSetUpCallHandler::HandleNotifyL SetupCall param \
- fail" )
-
- CompleteSetupCall( RSat::KCmdDataNotUnderstood );
- }
- break;
-
- default:
- {
- LOG( SIMPLE,
- "SETUPCALL: CSetUpCallHandler::HandleNotifyL Unknown event \
- id" )
- }
- break;
-
- }
- }
-
- LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::HandleNotifyL exiting" )
- return KErrNone;
- }
-
-// -----------------------------------------------------------------------------
-// From class MAiwNotifyCallback.
-// Called when dial request is completed.
-// -----------------------------------------------------------------------------
-//
-void CSetUpCallHandler::HandleEmergencyDialL( const TInt aStatus )
- {
- LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::HandleEmergencyDialL calling" )
-
- iEmergencyCall = EFalse;
-
- if ( KErrNone == aStatus )
+ LOG2( NORMAL,
+ "SETUPCALL: CSetUpCallHandler::SetupCallRequestComplete aErrCode %d",
+ aErrCode )
+
+ if( !iEmergencyCall )
{
- // Set result
- CompleteSetupCall( RSat::KSuccess );
+ iSetUpCallStatus = ESetupCallIdle;
+ CompleteSetupCallWithStatus( aErrCode );
}
else
{
- CompleteSetupCall(
- RSat::KNetworkUnableToProcessCmd,
- RSat::KNoSpecificMeProblem );
+ iEmergencyCall = EFalse;
- LOG( SIMPLE,
- "SETUPCALL: CSetUpCallHandler::HandleEmergencyDialL Network unable \
- to process this" )
+ if ( KErrNone == aErrCode )
+ {
+ // Set result
+ CompleteSetupCall( RSat::KSuccess );
+ }
+ else
+ {
+ // The emergency call implementation
+ // before S60 SAT migration from AIW to EtelMM
+ // According current information, no requirement for this.
+ // We don't return extended network error.
+ CompleteSetupCall(
+ RSat::KNetworkUnableToProcessCmd,
+ RSat::KNoSpecificMeProblem );
+
+ LOG( SIMPLE,
+ "SETUPCALL: CSetUpCallHandler::HandleEmergencyDialL Network unable \
+ to process this" )
+ }
}
+ LOG2( NORMAL,
+ "SETUPCALL: CSetUpCallHandler::SetupCallRequestComplete exiting %d", aErrCode )
+ }
- LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::HandleEmergencyDialL exiting" )
- }
// -----------------------------------------------------------------------------
// C++ default constructor can NOT contain any code, that
@@ -669,6 +586,9 @@
{
LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::ConstructL calling" )
+
+ iRequestHandler = CSetupCallRequestHandler::NewL( iUtils->MultiModeApi(),
+ this );
// Create request handler. This is same that LaunchBrowser uses, so this
// is needed also in HandleCommand - function.
iUtils->RegisterServiceRequestL(
@@ -679,27 +599,6 @@
iUtils->RegisterL( this, MSatUtils::ECallControlExecuting );
iUtils->RegisterL( this, MSatUtils::ECallControlDone );
- // Create service handler for normal call setup.
- iServiceHandler = CAiwServiceHandler::NewL();
-
- // Create dynamic resource to attach service handler.
- RCriteriaArray interest;
- CAiwCriteriaItem* item = CAiwCriteriaItem::NewLC(
- KAiwCmdCall,
- KAiwCmdCall,
- KContentType );
-
- TUid serviceClassBase;
- serviceClassBase.iUid = KAiwClassBase;
- item->SetServiceClass( serviceClassBase );
-
- interest.AppendL( item );
-
- // Attach to call service.
- iServiceHandler->AttachL( interest );
-
- CleanupStack::PopAndDestroy( item );
-
LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::ConstructL exiting" )
}
@@ -707,7 +606,24 @@
// Performs the request to dial
// -----------------------------------------------------------------------------
//
-void CSetUpCallHandler::DoSetupCallL()
+//ETel MM API Usage for SAT Todo
+//
+//2 RSAT::TSetUpCallV6 iCapabilityConfigParams we only have one TCcp and there
+// are two in RMobilePhone::TMobileCallParamsV7 ( according the study of tommi
+// the second TCcp in in TMobileCallParamsV7 will be ignored )
+//3 RMobilePhone::TMobileCallParamsV7 has TBCRepeatIndicator iBCRepeatIndicator
+// RSat::TSetUpCallV6 don't have it. Does it needed from RSat
+//4 RMobilePhone::TMobileCallParamsV7 has TMobileCallMulticallBearerMode
+// iBearerMode, RSat::TSetUpCallV6 does not have it. can we just use the
+// default value?
+//5 SetShowNumber in AIW not provided by ETel MM, support needed?
+//6 SetAllowMach in AIW not provided by ETel MM, support needed?
+//8 Convert the return value from RMobilePhone::DialNoFdnCheck to the SAT error
+// code, the return value is not enough, we need get more information from
+// GetLineInfo.
+
+
+void CSetUpCallHandler::DoSetupCall( CSetupCallRequestHandler& aHandler )
{
LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL calling" )
@@ -716,79 +632,44 @@
TDes& telNumber( iSetUpCallData.iAddress.iTelNumber );
CheckNumber( telNumber );
- // 80 is max length in SAT calls, AIW max length is 100
- if ( telNumber.Length() > KMaximumPhoneNumberLength )
- {
- LOG( SIMPLE,
- "SETUPCALL: CSetUpCallHandler::DoSetupCallL telNumber too long" )
- User::Leave( KErrArgument );
- }
+ RMobileCall::TMobileCallParamsV7 dialParams;
+ RMobileCall::TMobileCallParamsV7Pckg package( dialParams );
- TBuf< AIWDialDataExt::KMaximumNameLength > name;
- if ( RSat::EAlphaIdProvided ==
- iSetUpCallData.iAlphaIdCallSetUpPhase.iStatus )
- {
- LOG( SIMPLE,
- "SETUPCALL: CSetUpCallHandler::DoSetupCallL EAlphaIdProvided" )
- name = iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId;
- }
- else
- {
- LOG( SIMPLE,
- "SETUPCALL: CSetUpCallHandler::DoSetupCallL set AlphaId" )
- name = iUtils->SatAppName();
- }
-
- // Make the phone call parameters.
- CAiwInternalDialData* dialData = CAiwInternalDialData::NewLC();
-
- dialData->SetCallType( CAiwDialData::EAIWVoice );
- dialData->SetWindowGroup( AIWDialData::KAiwGoToIdle );
- dialData->SetPhoneNumberL( telNumber );
- dialData->SetSATCall( ETrue );
- dialData->SetShowNumber( EFalse );
- dialData->SetNameL( name );
- dialData->SetAllowMatch( EFalse );
- // Remove the redial mechanism from S60 5.x.
- dialData->SetRedial( AIWDialDataExt::KAIWRedialOff );
-
+ //Redail has been removed from MCL, no redail support.
+ dialParams.iAutoRedial = EFalse;
+ //TODO: check do we need to set bearer model
+ dialParams.iBearerMode = RMobileCall::EMulticallNewBearer;
+ dialParams.iCallParamOrigin = RMobileCall::EOriginatorSIM;
+ dialParams.iSubAddress = iSetUpCallData.iSubAddress;
+ dialParams.iBearerCap1 = iSetUpCallData.iCapabilityConfigParams;
+
+ dialParams.iBCRepeatIndicator = RMobileCall::EBCAlternateMode;
+
+ dialParams.iIconId.iQualifier = RMobileCall::ENoIconId;
+
+
+ dialParams.iAlphaId = iSetUpCallData.iAlphaIdCallSetUpPhase.iAlphaId;
+ LOG2( NORMAL,
+ "SETUPCALL: CSetUpCallHandler::DoSetupCallL id:%S",
+ &dialParams.iAlphaId )
+
+ LOG2( NORMAL,
+ "SETUPCALL: CSetUpCallHandler::DoSetupCallL number:%S",
+ &iSetUpCallData.iAddress.iTelNumber )
+
+ TBool terminateOtherCall( EFalse );
// check if we need to disconnect other calls
if ( ( RSat::EDisconnectOtherCalls == callType ) ||
( RSat::EDisconnectOtherCallsWithRedial == callType ) )
{
LOG( SIMPLE,
"SETUPCALL: CSetUpCallHandler::DoSetupCallL end other call" )
- dialData->SetEndOtherCalls( ETrue );
- }
-
- if ( AIWInternalDialData::KAiwBearerLength >=
- iSetUpCallData.iCapabilityConfigParams.Length() )
- {
- LOG( NORMAL,
- "SETUPCALL: CSetUpCallHandler::DoSetupCallL SetBearerL" )
- dialData->SetBearerL( iSetUpCallData.iCapabilityConfigParams );
+ terminateOtherCall = ETrue ;
}
-
- if ( AIWInternalDialData::KAiwSubAddressLength >=
- iSetUpCallData.iSubAddress.Length() )
- {
- LOG( NORMAL,
- "SETUPCALL: CSetUpCallHandler::DoSetupCallL SetSubAddressL" )
- dialData->SetSubAddressL( iSetUpCallData.iSubAddress );
- }
-
- CAiwGenericParamList& paramList = iServiceHandler->InParamListL();
- dialData->FillInParamListL( paramList );
-
- iServiceHandler->ExecuteServiceCmdL(
- KAiwCmdCall,
- paramList,
- iServiceHandler->OutParamListL(),
- 0,
- this );
-
- CleanupStack::PopAndDestroy( dialData );
-
+
+ aHandler.DialNumber( package, iSetUpCallData.iAddress.iTelNumber,
+ terminateOtherCall, iUtils->CreateAsyncToSyncHelper() );
+
LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::DoSetupCallL exiting" )
}
@@ -930,6 +811,8 @@
else if ( ( RSat::ESelfExplanatory == qualifier2 ) ||
( RSat::ENotSelfExplanatory == qualifier2 ) )
{
+ // Until 2009-10 the phone and NTSY not support the icon.
+ // to be updated after the updating of the phone and NTSY
result = RSat::KSuccessRequestedIconNotDisplayed;
LOG( SIMPLE,
"SETUPCALL: CSetUpCallHandler::CompleteSetupCallWithStatus Icon \
@@ -951,7 +834,6 @@
result = RSat::KSuccessRequestedIconNotDisplayed;
}
}
-
// Set result
CompleteSetupCall( result );
}
@@ -1059,297 +941,17 @@
}
// -----------------------------------------------------------------------------
-// Converts a TCCP error to the corresponding symbian error.
-// -----------------------------------------------------------------------------
-//
-TInt CSetUpCallHandler::TccpErrorToSymbianError( const TInt aTccpError ) const
- {
- LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::TccpErrorToSymbianError \
- calling" )
-
- // Error to be returned after mapped from aTccpError;
- // Initialized with default value KErrAccessDenied.
- TInt retValue( KErrAccessDenied );
-
- // Convert TCCP Error to Symbian Error in the switch braces.
- switch ( aTccpError )
- {
- case ECCPErrorNone:
- case ECCPErrorNotFound:
- case ECCPErrorGeneral:
- case ECCPErrorCancel:
- case ECCPErrorNoMemory:
- case ECCPErrorNotSupported:
- case ECCPErrorAlreadyInUse:
- case ECCPErrorNotReady:
- {
- retValue = aTccpError;
- break;
- }
-
- case ECCPErrorCCCallRejected:
- {
- retValue = KErrGsmCCCallRejected;
- break;
- }
-
- case ECCPRequestFailure:
- {
- retValue = KErrGsmMMCongestion;
- break;
- }
-
- case ECCPErrorCCBearerCapabilityNotAuthorised:
- case ECCPErrorBadRequest:
- {
- retValue = KErrGsmCCBearerCapabilityNotAuthorised;
- break;
- }
-
- case ECCPErrorAccessDenied:
- {
- retValue = KErrAccessDenied;
- break;
- }
-
- //The following are KErrGsmCallControlBase group.
- case ECCPErrorNotReached:
- {
- retValue = KErrGsmCCUnassignedNumber;
- break;
- }
-
- case ECCPErrorBusy:
- {
- retValue = KErrGsmCCUserBusy;
- break;
- }
-
- case ECCPErrorMovedPermanently:
- {
- retValue = KErrGsmCCNumberChanged;
- break;
- }
-
- case ECCPErrorInvalidURI:
- {
- retValue = KErrGsmCCInvalidNumberFormat;
- break;
- }
-
- case ECCPErrorNetworkOutOfOrder:
- {
- retValue = KErrGsmCCNetworkOutOfOrder;
- break;
- }
-
- case ECCPErrorCCNoRouteToDestination:
- {
- retValue = KErrGsmCCNoRouteToDestination;
- break;
- }
-
- case ECCPErrorCCDestinationOutOfOrder:
- {
- retValue = KErrGsmCCDestinationOutOfOrder;
- break;
- }
-
- case ECCPErrorCCResourceNotAvailable:
- {
- retValue = KErrGsmCCResourceNotAvailable;
- break;
- }
-
-
- case ECCPErrorCCInvalidTransitNetworkSelection:
- {
- retValue = KErrGsmCCInvalidTransitNetworkSelection;
- break;
- }
-
- case ECCPErrorCCIncompatibleDestination:
- {
- retValue = KErrGsmCCIncompatibleDestination;
- break;
- }
-
- case ECCPErrorCCIncompatibleMessageInCallState:
- {
- retValue = KErrGsmCCIncompatibleMessageInCallState;
- break;
- }
-
- case ECCPErrorCCIncompatibleMessageInProtocolState:
- {
- retValue = KErrGsmCCIncompatibleMessageInProtocolState;
- break;
- }
-
- case ECCPErrorCCNormalCallClearing:
- {
- retValue = KErrGsmCCNormalCallClearing;
- break;
- }
-
- case ECCPErrorCCUserAlertingNoAnswer:
- {
- retValue = KErrGsmCCUserAlertingNoAnswer;
- break;
- }
-
- case ECCPErrorCCUserNotResponding:
- {
- retValue = KErrGsmCCUserNotResponding;
- break;
- }
-
- case ECCPErrorCCPreemption:
- {
- retValue = KErrGsmCCPreemption;
- break;
- }
-
- case ECCPErrorCCFacilityRejected:
- {
- retValue = KErrGsmCCFacilityRejected;
- break;
- }
-
- case ECCPErrorCCResponseToStatusEnquiry:
- {
- retValue = KErrGsmCCResponseToStatusEnquiry;
- break;
- }
-
- case ECCPErrorCCInvalidMandatoryInformation:
- {
- retValue = KErrGsmCCInvalidMandatoryInformation;
- break;
- }
-
- case ECCPErrorCCNonExistentMessageType:
- {
- retValue = KErrGsmCCNonExistentMessageType;
- break;
- }
-
- case ECCPErrorCCNonExistentInformationElement:
- {
- retValue = KErrGsmCCNonExistentInformationElement;
- break;
- }
-
- case ECCPErrorCCNoChannelAvailable:
- {
- retValue = KErrGsmCCNoChannelAvailable;
- break;
- }
-
- case ECCPErrorCCRequestedFacilityNotSubscribed:
- {
- retValue = KErrGsmCCRequestedFacilityNotSubscribed;
- break;
- }
-
- case ECCPErrorCCIncomingCallsBarredInCug:
- {
- retValue = KErrGsmCCIncomingCallsBarredInCug;
- break;
- }
-
- case ECCPErrorUserNotInCug:
- {
- retValue = KErrGsmCCUserNotInCug;
- break;
- }
-
- case ECCPErrorCCRecoveryOnTimerExpiry:
- {
- retValue = KErrGsmCCRecoveryOnTimerExpiry;
- break;
- }
-
- case ECCPErrorCCBearerCapabilityNotCurrentlyAvailable:
- {
- retValue = KErrGsmCCBearerCapabilityNotCurrentlyAvailable;
- break;
- }
-
- case ECCPErrorCCServiceNotAvailable:
- {
- retValue = KErrGsmCCServiceNotAvailable;
- break;
- }
-
- case ECCPErrorCCBearerServiceNotImplemented:
- {
- retValue = KErrGsmCCBearerServiceNotImplemented;
- break;
- }
-
- case ECCPErrorCCOnlyRestrictedDigitalInformationBCAvailable:
- {
- retValue = KErrGsmCCOnlyRestrictedDigitalInformationBCAvailable;
- break;
- }
-
- case ECCPErrorCCServiceNotImplemented:
- {
- retValue = KErrGsmCCServiceNotImplemented;
- break;
- }
-
- case ECCPErrorCCUnspecifiedInterworkingError:
- {
- retValue = KErrGsmCCUnspecifiedInterworkingError;
- break;
- }
-
- case ECCPErrorSatControl:
- {
- retValue = KErrSatControl;
- break;
- }
-
- default:
- {
- retValue = KErrAccessDenied;
- break;
- }
- }
-
- LOG2( SIMPLE,
- "SETUPCALL: CSetUpCallHandler::TccpErrorToSymbianError TCCP error:%d",
- aTccpError)
- LOG2( SIMPLE,
- "SETUPCALL: CSetUpCallHandler::TccpErrorToSymbianError \
- mapped Symbian Error:%d", retValue)
- LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::TccpErrorToSymbianError \
- exiting" )
-
- return retValue;
- }
-
-// -----------------------------------------------------------------------------
// Create emergency call
// -----------------------------------------------------------------------------
//
-void CSetUpCallHandler::CreateEmergencyCallL()
+void CSetUpCallHandler::CreateEmergencyCall(
+ CSetupCallRequestHandler& aHandler )
{
- LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCallL calling" )
+ LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCall calling" )
+
+ aHandler.DialEmergencyCall( iSetUpCallData.iAddress.iTelNumber );
- if( !iEmergencyCallApi )
- {
- // Create service handler for emergency call setup..
- LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCallL\
- create emergency call handler" )
- iEmergencyCallApi = CPhCltEmergencyCall::NewL( this );
- }
-
- iEmergencyCallApi->DialEmergencyCallL(
- iSetUpCallData.iAddress.iTelNumber );
- LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCallL exiting" )
+ LOG( SIMPLE, "SETUPCALL: CSetUpCallHandler::CreateEmergencyCall exiting" )
}
// End Of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satengine/SatServer/Commands/SetUpCallCmd/src/csetupcallrequesthandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,286 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Create the call and emergency call to ETelMM
+*
+*/
+
+
+#include <etelmm.h>
+#include <mmtsy_names.h>
+
+
+#include "csetupcallrequesthandler.h"
+#include "CSetUpCallHandler.h"
+#include "msatasynctosync.h"
+#include "SatLog.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// CSetupCallRequestHandler::CSetupCallRequestHandler
+// The class constructor.
+// -----------------------------------------------------------------------------
+//
+CSetupCallRequestHandler::CSetupCallRequestHandler(
+ MSatMultiModeApi& aPhone, CSetUpCallHandler* aDispatcher )
+ : CActive( EPriorityStandard ), iPhone( aPhone ),
+ iDispatcher( aDispatcher )
+ {
+ LOG( SIMPLE,
+ "SETUPCALL: CSetupCallRequestHandler::CSetupCallRequestHandler \
+ calling" )
+
+ CActiveScheduler::Add( this );
+
+ LOG( SIMPLE,
+ "SETUPCALL: CSetupCallRequestHandler::CSetupCallRequestHandler \
+ exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSetupCallRequestHandler::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CSetupCallRequestHandler* CSetupCallRequestHandler::NewL(
+ MSatMultiModeApi& aPhone, CSetUpCallHandler* aDispatcher )
+ {
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::NewL calling" )
+
+ CSetupCallRequestHandler* self =
+ new ( ELeave ) CSetupCallRequestHandler( aPhone, aDispatcher );
+
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::NewL exiting" )
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CSetupCallRequestHandler::ConstructL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+void CSetupCallRequestHandler::ConstructL()
+ {
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::ConstructL calling" )
+ iStatusHandler = CSetupCallStatusHandler::NewL( iPhone, this );
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::ConstructL exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSetupCallRequestHandler::~CSetupCallRequestHandler
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CSetupCallRequestHandler::~CSetupCallRequestHandler()
+ {
+ LOG( SIMPLE, "SETUPCALL: \
+ CSetupCallRequestHandler::~CSetupCallRequestHandler calling" )
+ Cancel();
+ iDispatcher = NULL;
+ delete iStatusHandler;
+
+ LOG( SIMPLE, "SETUPCALL: \
+ CSetupCallRequestHandler::~CSetupCallRequestHandler exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSetupCallRequestHandler::DialNumber
+// -----------------------------------------------------------------------------
+//
+void CSetupCallRequestHandler::DialNumber( const TDesC8& aCallParams,
+ const TDesC& aTelNumber, TBool aTerminateOtherCall,
+ MSatAsyncToSync* aAsyncToSync )
+ {
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DialNumber calling" )
+
+ TInt terminateRes ( KErrNone );
+
+ if( aTerminateOtherCall )
+ {
+ if( aAsyncToSync )
+ {
+ iPhone.TerminateAllCalls( aAsyncToSync->RequestStatus() );
+ terminateRes = aAsyncToSync->SetActiveAndWait();
+ }
+ else
+ {
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DialNumber \
+ bad MSatAsyncToSync pointer" )
+ terminateRes = KErrGeneral;
+ }
+ }
+
+ if( !IsActive() )
+ {
+ if( KErrNone == terminateRes )
+ {
+ iPhone.DialNoFdnCheck( iStatus, aCallParams, aTelNumber );
+ if ( iStatusHandler )
+ {
+ iStatusHandler->Start();
+ }
+ SetActive();
+ }
+ else
+ {
+ iDispatcher->SetupCallRequestComplete( terminateRes );
+ }
+ }
+ else
+ {
+ iDispatcher->SetupCallRequestComplete( KErrInUse );
+ }
+
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DialNumber exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSetupCallRequestHandler::DialEmergencyCall
+// -----------------------------------------------------------------------------
+//
+void CSetupCallRequestHandler::DialEmergencyCall( const TDesC& aTelNumber )
+ {
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DialNumber calling" )
+
+ if( !IsActive() )
+ {
+ iEmergencyCall = ETrue;
+ iPhone.DialEmergencyCall( iStatus, aTelNumber );
+ SetActive();
+ }
+ else
+ {
+ iDispatcher->SetupCallRequestComplete( KErrInUse );
+ }
+
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DialEmergencyCall exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSetupCallRequestHandler::RunL
+// Handles the command.
+// -----------------------------------------------------------------------------
+//
+void CSetupCallRequestHandler::RunL()
+ {
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::RunL calling" )
+
+ LOG2( NORMAL, "SETUPCALL: CSetupCallRequestHandler::RunL\
+ iStatus == %i", iStatus.Int() )
+
+ if( !iResponsed )
+ {
+ if ( iEmergencyCall || KErrNone == iStatus.Int() )
+ {
+ iEmergencyCall = EFalse;
+ iDispatcher->SetupCallRequestComplete( iStatus.Int() );
+ }
+ else
+ {
+ RMobileCall::TMobileCallInfoV8 info;
+ RMobileCall::TMobileCallInfoV8Pckg infoPkg( info );
+ TInt res = iPhone.GetMobileCallInfo( infoPkg );
+
+ LOG2( NORMAL, "SETUPCALL: CSetupCallRequestHandler::\
+ HandleSetupCallStatusChange exit code == %i",
+ info.iExitCode )
+
+ if( ( KErrNone == res ) &&
+ (KErrNone != info.iExitCode) &&
+ (KErrNotFound != info.iExitCode) )
+ {
+ iDispatcher->SetupCallRequestComplete( info.iExitCode );
+ }
+ else
+ {
+ iDispatcher->SetupCallRequestComplete( iStatus.Int() );
+ }
+ }
+ }
+
+ if( iStatusHandler )
+ {
+ iStatusHandler->Cancel();
+ }
+ iResponsed = EFalse;
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::RunL exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSetupCallRequestHandler::CancelOperation
+// -----------------------------------------------------------------------------
+//
+void CSetupCallRequestHandler::CancelOperation()
+ {
+ LOG( SIMPLE, "SETUPCALL: \
+ CSetupCallRequestHandler::CancelOperation calling" )
+ iPhone.DialCancel();
+ if( iStatusHandler )
+ {
+ iStatusHandler->Cancel();
+ }
+ LOG( SIMPLE,
+ "SETUPCALL: CSetupCallRequestHandler::CancelOperation exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// From class CActive.
+// Cancels the sat request.
+// -----------------------------------------------------------------------------
+//
+void CSetupCallRequestHandler::DoCancel()
+ {
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DoCancel calling" )
+ CancelOperation();
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::DoCancel exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSetupCallRequestHandler::HandleConnectingStatusChange
+// -----------------------------------------------------------------------------
+//
+void CSetupCallRequestHandler::CallSatatusChanged( const TInt aStatus )
+ {
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::\
+ CallSatatusChanged calling" )
+
+ LOG2( NORMAL, "SETUPCALL: CSetupCallRequestHandler::\
+ CallSatatusChanged status == %i", aStatus )
+ // We only care about the connecting status, after call is
+ // connecting, we can send the respones to the SIM. For other status we will
+ // waiting for the status of DialNumber.
+ if( ( aStatus == RMobileCall::EStatusConnected )
+ || ( aStatus == RMobileCall::EStatusConnecting ))
+ {
+ iResponsed = ETrue;
+ iDispatcher->SetupCallRequestComplete( KErrNone );
+ }
+ else
+ {
+ if ( iStatusHandler )
+ {
+ iStatusHandler->Start();
+ }
+ }
+
+ LOG( SIMPLE, "SETUPCALL: CSetupCallRequestHandler::\
+ CallSatatusChanged exiting" )
+ }
+
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satengine/SatServer/Commands/SetUpCallCmd/src/csetupcallstatushandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,148 @@
+/*
+* Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Minite the call creating status by ETelMM
+*
+*/
+
+
+#include <etelmm.h>
+#include <mmtsy_names.h>
+
+#include "csetupcallstatushandler.h"
+#include "CSetUpCallHandler.h"
+#include "msatasynctosync.h"
+#include "SatLog.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// -----------------------------------------------------------------------------
+// CSetupCallStatusHandler::CSetupCallStatusHandler
+// The class constructor.
+// -----------------------------------------------------------------------------
+//
+CSetupCallStatusHandler::CSetupCallStatusHandler(
+ MSatMultiModeApi& aPhone, MSetupCallStatusObserver* aDispatcher )
+ : CActive( EPriorityStandard ), iPhone( aPhone ),
+ iDispatcher( aDispatcher )
+ {
+ LOG( SIMPLE,
+ "SETUPCALL: CSetupCallStatusHandler::CSetupCallStatusHandler \
+ calling" )
+
+ CActiveScheduler::Add( this );
+
+ LOG( SIMPLE,
+ "SETUPCALL: CSetupCallStatusHandler::CSetupCallStatusHandler \
+ exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSetupCallStatusHandler::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CSetupCallStatusHandler* CSetupCallStatusHandler::NewL(
+ MSatMultiModeApi& aPhone, MSetupCallStatusObserver* aDispatcher )
+ {
+ LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::NewL calling" )
+
+ CSetupCallStatusHandler* self =
+ new ( ELeave ) CSetupCallStatusHandler( aPhone, aDispatcher );
+
+ LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::NewL exiting" )
+ return self;
+ }
+
+
+// -----------------------------------------------------------------------------
+// CSetupCallStatusHandler::~CSetupCallStatusHandler
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CSetupCallStatusHandler::~CSetupCallStatusHandler()
+ {
+ LOG( SIMPLE, "SETUPCALL: \
+ CSetupCallStatusHandler::~CSetupCallStatusHandler calling" )
+ Cancel();
+
+ LOG( SIMPLE, "SETUPCALL: \
+ CSetupCallStatusHandler::~CSetupCallStatusHandler exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSetupCallStatusHandler::DialNumber
+// -----------------------------------------------------------------------------
+//
+void CSetupCallStatusHandler::Start()
+ {
+ LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::Start calling" )
+ if( !IsActive() )
+ {
+ iPhone.NotifyMobileCallStatusChange( iStatus,
+ iMobileCallStatus );
+ SetActive();
+ }
+ LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::Start exiting" )
+
+ }
+
+// -----------------------------------------------------------------------------
+// CSetupCallStatusHandler::RunL
+// Handles the command.
+// -----------------------------------------------------------------------------
+//
+void CSetupCallStatusHandler::RunL()
+ {
+ LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::RunL calling" )
+
+ LOG2( NORMAL, "SETUPCALL: CSetupCallStatusHandler::RunL\
+ iStatus == %i", iStatus.Int() )
+
+ LOG2( NORMAL, "SETUPCALL: CSetupCallStatusHandler::RunL\
+ iMobileCallStatus == %i", iMobileCallStatus )
+
+ if( ( KErrNone == iStatus.Int() ) && iDispatcher )
+ {
+ iDispatcher->CallSatatusChanged ( iMobileCallStatus );
+ }
+
+ LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::RunL exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSetupCallStatusHandler::CancelOperation
+// -----------------------------------------------------------------------------
+//
+void CSetupCallStatusHandler::CancelOperation()
+ {
+ LOG( SIMPLE, "SETUPCALL: \
+ CSetupCallStatusHandler::CancelOperation calling" )
+ iPhone.NotifyCallStatusChangeCancel();
+ LOG( SIMPLE,
+ "SETUPCALL: CSetupCallStatusHandler::CancelOperation exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// From class CActive.
+// Cancels the sat request.
+// -----------------------------------------------------------------------------
+//
+void CSetupCallStatusHandler::DoCancel()
+ {
+ LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::DoCancel calling" )
+ CancelOperation();
+ LOG( SIMPLE, "SETUPCALL: CSetupCallStatusHandler::DoCancel exiting" )
+ }
+
+// End of File
--- a/satengine/SatServer/Commands/SetUpIdleModeTextCmd/src/CSetUpIdleModeTextHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SetUpIdleModeTextCmd/src/CSetUpIdleModeTextHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -18,7 +18,7 @@
#include <e32property.h>
#include <centralrepository.h>
-#include <NetworkHandlingDomainPSKeys.h>
+#include <networkhandlingdomainpskeys.h>
#include "SATPrivateCRKeys.h"
#include "MSatApi.h"
#include "MSatUtils.h"
--- a/satengine/SatServer/Commands/SetUpMenuCmd/group/UT_CSetUpMenuHandler.pkg Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Commands/SetUpMenuCmd/group/UT_CSetUpMenuHandler.pkg Fri Mar 19 09:40:14 2010 +0200
@@ -19,7 +19,7 @@
* Name : UT_CSetUpMenuHandler.mmp
* Part of : SatServer / SetUpMenuCmd
* Description : Project package file for project SetUpMenu plug-in
-* Version : %version: e003sa18#4 %
+* Version : %version: e003sa17#6 %
*
* Copyright (c)2002-2008 Nokia. All rights reserved.
* This material, including documentation and any related computer
--- a/satengine/SatServer/Engine/inc/csatmultimodeapi.h Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Engine/inc/csatmultimodeapi.h Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -148,12 +148,39 @@
void GetCurrentActiveUSimApplication( TRequestStatus& aReqStatus,
RMobilePhone::TAID& aAID );
-
/**
* Check if there is an incoming call
* @return ETrue if there is an incoming call
*/
TBool IsCallIncoming();
+
+ /**
+ * Access RMobileCall::NotifyMobileCallStatusChange
+ */
+ void NotifyMobileCallStatusChange( TRequestStatus& aReqStatus,
+ RMobileCall::TMobileCallStatus& aStatus) ;
+
+ /**
+ * Access RMobileCall::NotifyStatusChangeCancel
+ */
+ void NotifyCallStatusChangeCancel();
+ /**
+ * Access RMobilePhone::TerminateAllCalls NotifyMobileCallStatusChange
+ */
+ void TerminateAllCalls(TRequestStatus& aReqStatus);
+
+
+ /**
+ * Access RMboileCall::GetMobileCallInfo
+ */
+ TInt GetMobileCallInfo(TDes8& aCallInfo);
+
+ /**
+ * Access RMboileCall::DialEmergencyCall
+ */
+ virtual void DialEmergencyCall(TRequestStatus& aReqStatus,
+ const TDesC& aNumber);
+
private:
/**
@@ -181,17 +208,17 @@
*/
void LoadPhoneModuleL( RMobilePhone& aPhone, const TDesC& aModuleName,
const TDesC& aPhoneName );
-
- /**
- * Open the RMobileCall
- */
- void LoadMobileCallL();
-
+
/**
* Open the RMobileUssdMessaging
*/
void LoadUssdMessagingL();
+ /**
+ * Open the RMobileCall
+ */
+ TInt LoadMobileCall();
+
private: // data
--- a/satengine/SatServer/Engine/src/CSatApnHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Engine/src/CSatApnHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -15,8 +15,6 @@
*
*/
-
-
// INCLUDE FILES
#include <cmmanager.h>
#include <cmmanagerext.h>
@@ -29,13 +27,7 @@
#include "CSatApnHandler.h"
#include "SatLog.h"
-
-const TInt KMaxAccessPointName( 50 );
-// Granularity for getting connection methods from CM session
const TUint32 KSatCMGranularity( 5 );
-// The max length of access point name
-const TUint32 KSatMaxApnName( 236 );
-
// ============================ MEMBER FUNCTIONS ===============================
--- a/satengine/SatServer/Engine/src/csatmediatoreventprovider.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Engine/src/csatmediatoreventprovider.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -15,13 +15,11 @@
*
*/
-
-
#include <featmgr.h>
#include <centralrepository.h>
#include <MediatorDomainUIDs.h>
#include <MediatorEventProvider.h>
-#include <SecondaryDisplay/secondarydisplaysatapi.h>
+#include <secondarydisplay/secondarydisplaysatapi.h>
#include "SATPrivateCRKeys.h"
#include "csatmediatoreventprovider.h"
--- a/satengine/SatServer/Engine/src/csatmultimodeapi.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/Engine/src/csatmultimodeapi.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -226,6 +226,9 @@
const TDesC8& aCallParams, const TDesC& aTelNumber)
{
LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialNoFdnCheck calling" )
+ TInt err = LoadMobileCall();
+ LOG2( SIMPLE, "SATENGINE: CSatMultiModeApi::DialNoFdnCheck err %d", err )
+
iCall.DialNoFdnCheck( aStatus, aCallParams, aTelNumber );
LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialNoFdnCheck exiting" )
}
@@ -309,7 +312,7 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-TBool CSatMultiModeApi::IsCallIncoming( )
+TBool CSatMultiModeApi::IsCallIncoming()
{
LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::IsCallIncoming entering" )
TInt lines( 0 );
@@ -356,8 +359,77 @@
callIncoming )
return callIncoming;
}
+
// -----------------------------------------------------------------------------
-// CSatMultiModeApi::SetActiveAndWait
+// CSatMultiModeApi::NotifyMobileCallStatusChange
+// -----------------------------------------------------------------------------
+//
+void CSatMultiModeApi::NotifyMobileCallStatusChange (
+ TRequestStatus& aReqStatus, RMobileCall::TMobileCallStatus& aStatus )
+ {
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::NotifyMobileCallStatusChange \
+ calling" )
+ iCall.NotifyMobileCallStatusChange( aReqStatus, aStatus );
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::NotifyMobileCallStatusChange \
+ exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSatMultiModeApi::NotifyCallStatusChangeCancel
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CSatMultiModeApi::NotifyCallStatusChangeCancel()
+ {
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialCancel calling" )
+ iCall.NotifyStatusChangeCancel();
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialCancel exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSatMultiModeApi::NotifyMobileCallStatusChange
+// -----------------------------------------------------------------------------
+//
+void CSatMultiModeApi::TerminateAllCalls(TRequestStatus& aReqStatus)
+ {
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::TerminateAllCalls calling" )
+ // RMobilePhone::TerminateAllCalls don't work.
+ TName allCalls;
+ allCalls.Copy( KTerminateAllCalls );
+ iCustomPhone.TerminateCall( aReqStatus, allCalls );
+
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::TerminateAllCalls exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSatMultiModeApi::GetMobileCallInfo
+// -----------------------------------------------------------------------------
+//
+TInt CSatMultiModeApi::GetMobileCallInfo(TDes8& aCallInfo)
+ {
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::GetMobileCallInfo calling" )
+ TInt ret = iCall.GetMobileCallInfo( aCallInfo );
+ LOG2( SIMPLE, "SATENGINE: CSatMultiModeApi::GetMobileCallInfo exiting %d",
+ ret )
+ return ret;
+ }
+
+// -----------------------------------------------------------------------------
+// CSatMultiModeApi::GetMobileCallInfo
+// -----------------------------------------------------------------------------
+//
+void CSatMultiModeApi::DialEmergencyCall(TRequestStatus& aReqStatus,
+ const TDesC& aNumber)
+ {
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialEmergencyCall calling" )
+ TInt err = LoadMobileCall();
+ LOG2( SIMPLE, "SATENGINE: CSatMultiModeApi::DialEmergencyCall err %d", err )
+ iCall.DialEmergencyCall( aReqStatus, aNumber );
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::DialEmergencyCall exiting" )
+ }
+
+// -----------------------------------------------------------------------------
+// CSatMultiModeApi::ConstructL
// -----------------------------------------------------------------------------
//
void CSatMultiModeApi::ConstructL()
@@ -369,7 +441,6 @@
#if !defined ( __WINSCW__ )
//On the emulator the load will leave. We can not use the functionaly
//on enmulator
- LoadMobileCallL();
LoadUssdMessagingL();
#endif
@@ -550,14 +621,24 @@
}
// -----------------------------------------------------------------------------
-// CSatMultiModeApi::LoadMobileCallL
+// CSatMultiModeApi::LoadMobileCall
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-void CSatMultiModeApi::LoadMobileCallL()
+TInt CSatMultiModeApi::LoadMobileCall()
{
LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadMobileCallL calling" )
+ if ( iCallOpened )
+ {
+ iCall.Close();
+ }
+
+ if ( iLineOpened )
+ {
+ iLine.Close();
+ }
+
TInt numberOfTries( 1 ); // Indicates loop tryouts
TBool loopSuccess( EFalse ); // Loop stopper, if this is ETrue
TInt error = KErrNone; // Error that is Leave'd
@@ -582,13 +663,11 @@
LOG2( NORMAL, "SATENGINE: CSatMultiModeApi::LoadMobileCallL \
iLine error: %i", error )
- User::LeaveIfError( error );
numberOfTries = 1;
loopSuccess = EFalse;
- error = KErrNone;
- while ( !loopSuccess && numberOfTries <= KLoopMaxTryouts )
+ while ( iLineOpened &&!loopSuccess && numberOfTries <= KLoopMaxTryouts )
{
error = iCall.OpenNewCall( iLine );
if ( KErrNone == error )
@@ -609,9 +688,8 @@
LOG2( NORMAL, "SATENGINE: CSatMultiModeApi::LoadMobileCallL \
iCall error: %i", error )
- User::LeaveIfError( error );
-
- LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadMobileCallL exiting" )
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadMobileCallL exiting" )
+ return error;
}
// -----------------------------------------------------------------------------
@@ -651,7 +729,7 @@
User::LeaveIfError( error );
- LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadUssdMessagingL exiting" )
+ LOG( SIMPLE, "SATENGINE: CSatMultiModeApi::LoadUssdMessagingL exiting" )
}
--- a/satengine/SatServer/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
DEFAULT
PRJ_EXPORTS
-SatServer_Stub.SIS /epoc32/data/z/system/install/SatServer_stub.sis
+satserver_stub.sis /epoc32/data/z/system/install/SatServer_stub.sis
../rom/satserver.iby CORE_MW_LAYER_IBY_EXPORT_PATH( satserver.iby )
../rom/SatServerResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH( SatServerResources.iby )
--- a/satengine/SatServer/inc/CSatCommandHandler.h Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/inc/CSatCommandHandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -15,15 +15,13 @@
*
*/
-
-
#ifndef CSATCOMMANDHANDLER_H
#define CSATCOMMANDHANDLER_H
// INCLUDES
#include <e32base.h>
#include <etelsat.h>
-#include <SecondaryDisplay/secondarydisplaysatapi.h>
+#include <secondarydisplay/secondarydisplaysatapi.h>
#include "MSatUtils.h"
#include "MSatEventObserver.h"
#include "MSatCommand.h"
--- a/satengine/SatServer/inc/msatmultimodeapi.h Tue Feb 02 01:11:09 2010 +0200
+++ b/satengine/SatServer/inc/msatmultimodeapi.h Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -138,6 +138,34 @@
* @return ETrue if there is an incoming call
*/
virtual TBool IsCallIncoming() = 0;
+
+ /**
+ * Access RMobileCall::NotifyMobileCallStatusChange
+ */
+ virtual void NotifyMobileCallStatusChange( TRequestStatus& aReqStatus,
+ RMobileCall::TMobileCallStatus& aStatus) = 0;
+
+ /**
+ * Access RMobileCall::NotifyStatusChangeCancel
+ */
+ virtual void NotifyCallStatusChangeCancel() = 0;
+
+ /**
+ * Access RMobilePhone::TerminateAllCalls
+ */
+ virtual void TerminateAllCalls(TRequestStatus& aReqStatus) = 0;
+
+ /**
+ * Access RMboileCall::GetMobileCallInfo
+ */
+ virtual TInt GetMobileCallInfo(TDes8& aCallInfo) = 0;
+
+ /**
+ * Access RMboileCall::DialEmergencyCall
+ */
+ virtual void DialEmergencyCall(TRequestStatus& aReqStatus,
+ const TDesC& aNumber) = 0;
+
};
#endif // MSATMULTIMODEAPI_H
--- a/satui/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/satui/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -1,5 +1,5 @@
/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
@@ -11,13 +11,13 @@
*
* Contributors:
*
-* Description: Build information file for project SatApp
+* Description: Build information file for project SATUI
*
*/
+
PRJ_PLATFORMS
DEFAULT
-#include "../satapp/Group/bld.inf"
-#include "../satplugin/group/bld.inf"
+#include "../satshellcontroller/group/bld.inf"
--- a/satui/satapp/EABI/SatShellCntrlU.DEF Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-EXPORTS
- _Z16NewSatControllerv @ 1 NONAME
- _ZTI19CSatShellController @ 2 NONAME ; #<TI>#
- _ZTV19CSatShellController @ 3 NONAME ; #<VT>#
-
--- a/satui/satapp/Group/SatApp_stub.pkg Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: For packing sat application stub.
-;
-; Languages
-&EN
-
-; Header
-#{"satui"}, (0x101f4ce0), 1, 0, 0, TYPE=SA
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Files
-""-"z:\sys\bin\SatUi.exe"
-""-"z:\sys\bin\SatShellCntrl.dll"
-""-"z:\resource\apps\satui.mbm"
-""-"z:\resource\apps\Satui_aif.mif"
-""-"z:\resource\apps\Satui.rsc"
-""-"z:\private\10003a3f\import\apps\Satui_reg.rsc"
\ No newline at end of file
--- a/satui/satapp/Group/SatShellCntrl.mmp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +0,0 @@
-/*
-* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: SatShellCntrl mmp- file
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-TARGET SatShellCntrl.dll
-TARGETTYPE dll
-UID 0x1000008D 0x1000A835
-SECUREID 0x1000A835
-
-CAPABILITY CAP_GENERAL_DLL
-VENDORID VID_DEFAULT
-
-SOURCEPATH ../SATShellControllerSrc
-SOURCE CSatShellController.cpp
-
-USERINCLUDE ../SATShellControllerInc
-
-// Application layer system include is needed due MenuSatInterface provided by AppShell
-APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE ../../../inc // Domain telephony
-SYSTEMINCLUDE ../../inc // Subsystem satui
-
-LIBRARY euser.lib
-LIBRARY apparc.lib // RApaLsSession
-LIBRARY apgrfx.lib // CApaCommandLine
-LIBRARY ws32.lib // RWsSession
-LIBRARY menuinterface.lib
-LIBRARY flogger.lib
-
-
--- a/satui/satapp/Group/SatUI.mmp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project SatUi
-*
-*/
-
-
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-
-TARGET SATUI.exe
-TARGETTYPE exe
-UID 0x100039CE 0x101f4ce0
-
-CAPABILITY CAP_APPLICATION NetworkControl
-VENDORID VID_DEFAULT
-
-SECUREID 0x101f4ce0
-EPOCSTACKSIZE 0x5000
-
-SOURCEPATH ../SATUISrc
-
-SOURCE ../SATUISrc/CSatUiApplication.cpp
-SOURCE ../SATUISrc/CSatUiDocument.cpp
-SOURCE ../SATUISrc/CSatUiViewAppUi.cpp
-SOURCE ../SATUISrc/CSatUiActionPerformer.cpp
-SOURCE ../SATUISrc/CSatUiView.cpp
-SOURCE ../SATUISrc/CSatUiViewContainer.cpp
-SOURCE ../SATUISrc/CSatUiTextQueryDialog.cpp
-SOURCE ../SATUISrc/CSatUiMessageQueryIcon.cpp
-SOURCE ../SATUISrc/CSatUiWaitDialog.cpp
-SOURCE ../SATUISrc/csatuiiconhandler.cpp
-
-// Application layer system include needed due Browser and ProfileEngine CR keys
-APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE ../../../inc // Domain telephony
-SYSTEMINCLUDE ../../inc // Subsystem satui
-
-START RESOURCE ../data/SatUi.rss
-HEADER // Build the .rsg file.
-TARGETPATH APP_RESOURCE_DIR
-LANGUAGE_IDS
-END // ../Data/SatUi RESOURCE
-
-START RESOURCE ../data/Satui_reg.rss
-DEPENDS satui.rsg
-// Do not change the UID below.
-TARGETPATH /private/10003a3f/apps
-END
-
-USERINCLUDE ../SATUIInc
-
-LIBRARY euser.lib
-LIBRARY apparc.lib
-LIBRARY cone.lib
-LIBRARY eikcore.lib
-LIBRARY avkon.lib
-LIBRARY eikdlg.lib
-LIBRARY eikcoctl.lib
-LIBRARY bafl.lib
-LIBRARY SatInternalClient.lib
-LIBRARY SatClient.lib
-LIBRARY Commonengine.lib
-LIBRARY MediaClientAudio.lib
-LIBRARY aknnotify.lib
-LIBRARY aknicon.lib
-LIBRARY ws32.lib
-LIBRARY apgrfx.lib
-LIBRARY fbscli.lib
-LIBRARY eikctl.lib
-LIBRARY egul.lib
-LIBRARY etext.lib // for CRichText
-LIBRARY gdi.lib // for CPicture
-LIBRARY estor.lib // for TSwizzle
-LIBRARY CdlEngine.lib // for AknLayout2Def
-LIBRARY AknLayout2Scalable.lib
-LIBRARY hlplch.lib
-LIBRARY activitymanager.lib
-LIBRARY Flogger.lib
-LIBRARY CentralRepository.lib
-LIBRARY CenRepNotifHandler.lib
-LIBRARY ProfileEng.lib
-LIBRARY FeatMgr.lib // for FeatureManager
--- a/satui/satapp/Group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Build information file for project SATUI
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-DEFAULT
-
-// Help exports
-#include "../help/group/bld.inf"
-
-PRJ_EXPORTS
-../data/SatApp_stub.SIS /epoc32/data/z/system/install/SatApp_stub.sis
-../loc/satui.loc MW_LAYER_LOC_EXPORT_PATH( satui.loc )
-../rom/satui.iby CORE_MW_LAYER_IBY_EXPORT_PATH( satui.iby )
-../rom/SatUiResources.iby LANGUAGE_MW_LAYER_IBY_EXPORT_PATH( SatUiResources.iby )
-
-PRJ_EXTENSIONS
-START EXTENSION s60/mifconv
- OPTION TARGETFILE satui.mif
- OPTION HEADERFILE satui.mbg
- OPTION SOURCES -c8,8 qgn_menu_sat_cxt -c8,8 qgn_menu_sat_lst -c8,8 qgn_note_sim
-END
-
-START EXTENSION s60/mifconv
- OPTION TARGETFILE satui_aif.mif
- OPTION SOURCES -c8,8 qgn_menu_sat
-END
-
-PRJ_MMPFILES
-
-./SatUI.mmp
-./SatShellCntrl.mmp
-
-PRJ_TESTMMPFILES
-
--- a/satui/satapp/Group/satui_icons.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-#
-# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: Make file for satui icons.
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-TARGETDIR=$(ZDIR)\SYSTEM\APPS\Satui
-HEADERDIR=\epoc32\include
-ICONTARGETFILENAME=$(TARGETDIR)\satui.mif
-HEADERFILENAME=$(HEADERDIR)\satui.mbg
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# NOTE 1: MASK FILE NAMES ARE NOT DEFINED!
-# 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.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
- /c8,8 qgn_menu_sat_cxt.bmp \
- /c8,8 qgn_menu_sat_lst.bmp \
- /c8,8 qgn_note_sim.bmp
-
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(HEADERFILENAME)&& \
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/satui/satapp/Group/satui_icons_aif_bitmaps.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-#
-# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: Make file for satui icons.
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-TARGETDIR=$(ZDIR)\SYSTEM\APPS\Satui
-ICONTARGETFILENAME=$(TARGETDIR)\satui_aif.mbm
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# NOTE 1: MASK FILE NAMES ARE NOT DEFINED!
-# 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.
-# ----------------------------------------------------------------------------
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_sat_lst.bmp \
- /c8,8 qgn_menu_sat_cxt.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/satui/satapp/Group/satui_icons_aif_bitmaps_dc.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-#
-# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: Make file for satui icons.
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-TARGETDIR=$(ZDIR)\RESOURCE\APPS
-ICONTARGETFILENAME=$(TARGETDIR)\satui_aif.mbm
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_sat_lst.bmp \
- /c8,8 qgn_menu_sat_cxt.bmp
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/satui/satapp/Group/satui_icons_aif_scalable.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +0,0 @@
-#
-# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: Make file for satui icons.
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-TARGETDIR=$(ZDIR)\SYSTEM\APPS\Satui
-ICONTARGETFILENAME=$(TARGETDIR)\satui_aif.mif
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-# ----------------------------------------------------------------------------
-# NOTE 1: MASK FILE NAMES ARE NOT DEFINED!
-# 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.
-# ----------------------------------------------------------------------------
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_sat.svg
-
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/satui/satapp/Group/satui_icons_aif_scalable_dc.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-#
-# Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: Make file for satui icons.
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-TARGETDIR=$(ZDIR)\RESOURCE\APPS
-ICONTARGETFILENAME=$(TARGETDIR)\satui_aif.mif
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) \
- /c8,8 qgn_menu_sat.svg
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
-
--- a/satui/satapp/Group/satui_icons_dc.mk Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-#
-# Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-# All rights reserved.
-# This component and the accompanying materials are made available
-# under the terms of "Eclipse Public License v1.0"
-# which accompanies this distribution, and is available
-# at the URL "http://www.eclipse.org/legal/epl-v10.html".
-#
-# Initial Contributors:
-# Nokia Corporation - initial contribution.
-#
-# Contributors:
-#
-# Description: Make file for satui icons.
-#
-
-ifeq (WINS,$(findstring WINS, $(PLATFORM)))
-ZDIR=\epoc32\release\$(PLATFORM)\$(CFG)\Z
-else
-ZDIR=\epoc32\data\z
-endif
-
-
-TARGETDIR=$(ZDIR)\RESOURCE\APPS
-HEADERDIR=\epoc32\include
-ICONTARGETFILENAME=$(TARGETDIR)\satui.mif
-HEADERFILENAME=$(HEADERDIR)\satui.mbg
-
-do_nothing :
- @rem do_nothing
-
-MAKMAKE : do_nothing
-
-BLD : do_nothing
-
-CLEAN : do_nothing
-
-LIB : do_nothing
-
-CLEANLIB : do_nothing
-
-
-RESOURCE :
- mifconv $(ICONTARGETFILENAME) /h$(HEADERFILENAME) \
- /c8,8 qgn_menu_sat_cxt.bmp \
- /c8,8 qgn_menu_sat_lst.bmp \
- /c8,8 qgn_note_sim.bmp
-
-
-FREEZE : do_nothing
-
-SAVESPACE : do_nothing
-
-RELEASABLES :
- @echo $(HEADERFILENAME)&& \
- @echo $(ICONTARGETFILENAME)
-
-FINAL : do_nothing
--- a/satui/satapp/SATShellControllerInc/CSatShellController.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +0,0 @@
-/*
-* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This file contains the SAT Shell Controller class that is responsible
-* for the actual implementation of the following functionality:
-* - add SAT UI application to Desk (or similar)
-* - remove SAT UI application from Desk (or similar)
-* - bring SAT UI application to foreground if it already is up
-* and running
-* - launching the SAT UI application
-* - launching the Browser
-* - resolving default access point
-* - bring Browser to the foreground
-*
-*
-*/
-
-
-#ifndef CSATSHELLCONTROLLER_H
-#define CSATSHELLCONTROLLER_H
-
-// INCLUDES
-#include <e32base.h>
-#include <MSatShellController.h>
-
-// CONSTS
-const TInt KSatAppNameSize = 255; //Context pane max
-
-// CLASS DECLARATION
-
-// DESCRIPTION
-// This class is used to control adding, removing and launching of
-// the SAT UI Client application. It connects to appropriate module
-// and is used by the SAT Server.
-
-class CSatShellController : public CBase,
- public MSatShellController
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CSatShellController* NewL();
-
- /**
- * Destructor.
- */
- virtual ~CSatShellController();
-
- public: // New functions
-
- /**
- * Adds SAT UI Client to the Application Shell (or similar).
- * @param aName Name of the entry
- * @param aUid UID of the SAT UI Application
- * @return Nothing
- */
- void AddSatUiL( TDesC& aName );
-
- /**
- * Adds SAT UI Client to the Application Shell (or similar).
- * @param aName Name of the entry
- * @param aIconId Id for icons
- * @return Nothing
- */
- void AddSatUiL( TDesC& aName, TUint8 aIconId );
-
- /**
- * Removes SAT UI Client from the Application Shell (or similar).
- * @param aUid UID of the SAT UI Application
- * @return Nothing
- */
- void RemoveSatUiL();
-
- /**
- * Launches the SAT UI Client.
- * @param aUid UID of the SAT UI Application
- * @return Nothing
- */
- void LaunchSatUiL();
-
- /**
- * Brings Browser to foreground after period of time.
- * @param Nothing
- * @return Nothing
- */
- void BringBrowserToForegroundAfterPeriod();
-
- /**
- * Bring the SAT UI Application to foreground.
- * @param Nothing
- * @return Nothing
- */
- void BringSatUiToForeground();
-
- /**
- * Sets SAT UI Application to background if needed.
- */
- void SetSatUiToBackground() const;
-
- /**
- * Launch XHTML-browser
- * @param aUrl URL to be opened when launching browser
- * @param aAccessPointUid ID number of access point in CommDb
- * @return The result of the operation
- */
- TInt LaunchBrowserL( const TDesC& aUrl, TUid aAccessPointUid );
-
- /**
- * This callback function is used to call Browser to the foreground
- * after short while.
- * @param aObject Pointer to caller is passed to callback function.
- * @return Callback function should return TInt.
- */
- static TInt TimerCompleted( TAny* aObject );
-
- private:
-
- /**
- * C++ default constructor.
- */
- CSatShellController();
-
- /**
- * By default EPOC constructor is private.
- */
- void ConstructL();
-
- /**
- * Bring the SAT UI Application to foreground.
- * @param aAppUid The UID value of application.
- * @return Nothing
- */
- void BringApplicationToForeground( const TUid& aAppUid ) const;
-
- /**
- * Brings Browser to foreground.
- * @param Nothing
- * @return Nothing
- */
- void BringBrowserToForeground() const;
-
- /**
- * Checks if Browser is not foreground and starts that if needed.
- * @param Nothing
- * @return Nothing
- */
- void CycleSatUiBackwards();
-
- /**
- * Check if SatUi is needed to set to background.
- * @param Nothing
- * @return Nothing
- */
- void CheckSatUiStatus();
-
- private: // Data
-
- TBufC<KSatAppNameSize> iSimAppName;
- TUid iUidWmlBrowser;
- RWsSession iWsSession;
- RApaLsSession iApaLsSession;
- // Timer for checking Browser start.
- CPeriodic* iTimer;
- TBool iSetSatUiToBackground;
-
- };
-
-#endif // CSATSHELLCONTROLLER_H
-
-// End of File
--- a/satui/satapp/SATShellControllerInc/tflogger.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Defines logging macroes
-*
-*/
-
-
-#ifndef __TFLOGGER_H__
-#define __TFLOGGER_H__
-
-#include <flogger.h>
-#include <e32svr.h>
-
-_LIT( KTfLogFolder, "sat" );
-_LIT( KTfLogFile, "satui.TXT" );
-
-/**
-* ------------------------------------------------------------------------------
-*
-* Remove #define LOGGING_ENABLED from comments to enable logging
-*
-* ------------------------------------------------------------------------------
-*/
-
-//#define LOGGING_ENABLED
-
-/**
-* ------------------------------------------------------------------------------
-*
-* LOGGING MACROs
-*
-* USE THESE MACROS IN YOUR CODE
-*
-* Example: TFLOGTEXT( own_desc )
-* Example: TFLOGSTRING( "Test" )
-* Example: TFLOGSTRING( "Test %i", aValue )
-* Example: TFLOGSTRING( "Test %i %i", aValue1, aValue2 )
-*
-* ------------------------------------------------------------------------------
-*/
-
-#ifdef LOGGING_ENABLED
-
- #define TFLOGTEXT( TEXT ) \
- { \
- RFileLogger::Write( KTfLogFolder,KTfLogFile, \
- EFileLoggingModeAppend, TEXT ); \
- RDebug::Print( TEXT ); \
- }
-
- #define TFLOGSTRING( TEXT ) \
- { \
- _LIT( tempLogDes, TEXT ); \
- RFileLogger::Write( \
- KTfLogFolder, \
- KTfLogFile, \
- EFileLoggingModeAppend, \
- tempLogDes() ); \
- RDebug::Print( _L( TEXT ) ); \
- }
-
- #define TFLOGSTRING2( TEXT, VAR1 ) \
- { \
- _LIT( tempLogDes, TEXT ); \
- RFileLogger::WriteFormat( \
- KTfLogFolder, \
- KTfLogFile, \
- EFileLoggingModeAppend, \
- TRefByValue<const TDesC>( tempLogDes() ), VAR1 ); \
- RDebug::Print( _L( TEXT ), VAR1 ); \
- }
-
- #define TFLOGSTRING3( TEXT, VAR1, VAR2 ) \
- { \
- _LIT( tempLogDes, TEXT ); \
- RFileLogger::WriteFormat( \
- KTfLogFolder, \
- KTfLogFile, \
- EFileLoggingModeAppend, \
- TRefByValue<const TDesC>( tempLogDes() ), VAR1, VAR2 ); \
- RDebug::Print( _L( TEXT ), VAR1, VAR2 ); \
- }
-
-#else
-
- #define TFLOGTEXT( TEXT )
- #define TFLOGSTRING( TEXT )
- #define TFLOGSTRING2( TEXT, VAR1 )
- #define TFLOGSTRING3( TEXT, VAR1, VAR2 )
-
-#endif // LOGGING_ENABLED
-
-#endif // __TFLOGGER_H__
--- a/satui/satapp/SATShellControllerSrc/CSatShellController.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,515 +0,0 @@
-/*
-* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This file contains the SAT Shell Controller class that is responsible
-* for the actual implementation of the following functionality:
-* - add SAT UI application to Desk (or similar)
-* - remove SAT UI application from Desk (or similar)
-* - bring SAT UI application to foreground if it already is up
-* and running
-* - launching the SAT UI application
-* - launching the Browser
-* - resolving default access point
-* - bring Browser to the foreground
-*
-*
-*/
-
-
-// INCLUDE FILES
-#include <w32std.h> // RWsSession
-#include <apaid.h> // TApaAppInfo
-#include <apacmdln.h> // CApaCommandLine
-#include <apgcli.h> // RApaLsSession
-#include <apgtask.h> // TApaTaskList
-#include <apgwgnam.h> // CApaWindowGroupName
-#include <MenuSatInterface.h> // CMenuSATInterface
-#include <DocumentHandler.h> // KWmlcHandler
-#include "CSatShellController.h"
-
-// Browser Cen Rep Keys.
-#ifdef __SERIES60_NATIVE_BROWSER
- #include <browseruisdkcrkeys.h>
- #include <BrowserUiInternalCRKeys.h>
-#endif // __SERIES60_NATIVE_BROWSER
-#include "tflogger.h"
-
-// CONSTANTS
-const TUid KUidSatUi = { 0x101f4ce0 };
-_LIT( KFour, "4" ); // Browser parameter.
-_LIT( KFive, "5" ); // Browser parameter.
-_LIT( KSpace, " " ); // Used as Browser parameter.
-static const TUid KEmptyUid = { KErrNotFound };
-static const TUid KUidBrowser = { KWmlcHandler };
-const TInt KTimerTime( 2000000 ); // 2 seconds.
-const TInt KBrowserParamAndTwoSpaces( 3 );
-#ifndef __SERIES60_NATIVE_BROWSER
- const TUid KCRUidBrowser = { 0x10008D39 };
- const TUint32 KBrowserDefaultAccessPoint( 0x0000000E );
-#endif // __SERIES60_NATIVE_BROWSER
-
-// ================= MEMBER FUNCTIONS =======================================
-
-// C++ default constructor can NOT contain any code that
-// might leave.
-//
-CSatShellController::CSatShellController():
- iUidWmlBrowser( TUid::Uid( KWmlcHandler ))
- {
- TFLOGSTRING( "CSatShellController::CSatShellController called-exit" )
- }
-
-// Symbian OS constructor
-void CSatShellController::ConstructL()
- {
- TFLOGSTRING( "CSatShellController::ConstructL called" )
-
- // Timer is used to get the Browser application to the foreground.
- iTimer = CPeriodic::NewL( EPriorityNormal );
-
- TFLOGSTRING( "CSatShellController::ConstructL exit" )
- }
-
-// Two-phased constructor.
-CSatShellController* CSatShellController::NewL()
- {
- TFLOGSTRING( "CSatShellController::NewL called" )
-
- CSatShellController* self = new ( ELeave ) CSatShellController;
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- TFLOGSTRING( "CSatShellController::NewL exit" )
- return self;
- }
-
-
-// Destructor
-CSatShellController::~CSatShellController()
- {
- TFLOGSTRING( "CSatShellController::~CSatShellController called" )
-
- // Frees resources.
- if ( iTimer )
- {
- iTimer->Cancel();
- }
- delete iTimer;
-
- TFLOGSTRING( "CSatShellController::~CSatShellController exit" )
- }
-
-// ---------------------------------------------------------
-// CSatShellController::AddSatUiL
-// Adds SAT UI Client application to phone's
-// Application Shell (or similar).
-// ---------------------------------------------------------
-//
-void CSatShellController::AddSatUiL(
- TDesC& aName )
- {
- TFLOGSTRING( "CSatShellController::AddSatUiL(name) called" )
-
- iSimAppName = aName;
-
- CMenuSATInterface* menu = new ( ELeave ) CMenuSATInterface;
- menu->MakeSatUiVisible( ETrue, aName );
- delete menu;
-
- TFLOGSTRING( "CSatShellController::AddSatUiL exit" )
- }
-
-//------------------------------------------------------------
-// CSatShellController::AddSatUiL
-// Adds SAT UI Client application to phone's
-// Application Shell (or similar).
-// ---------------------------------------------------------
-//
-void CSatShellController::AddSatUiL(
- TDesC& aName, TUint8 aIconId )
- {
- TFLOGSTRING( "CSatShellController::AddSatUiL(name,icon) called" )
-
- iSimAppName = aName;
-
- CMenuSATInterface* menu = new ( ELeave ) CMenuSATInterface;
- menu->MakeSatUiVisible( ETrue, aName, aIconId );
- delete menu;
-
- TFLOGSTRING( "CSatShellController::AddSatUiL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatShellController::RemoveSatUiL
-// Removes SAT UI Client application from phone's
-// Application Shell (or similar).
-// ---------------------------------------------------------
-//
-
-void CSatShellController::RemoveSatUiL()
- {
- TFLOGSTRING( "CSatShellController::RemoveSatUiL called" )
-
- CMenuSATInterface* menu = new ( ELeave ) CMenuSATInterface;
- menu->MakeSatUiVisible( EFalse, iSimAppName );
- delete menu;
-
- TFLOGSTRING( "CSatShellController::RemoveSatUiL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatShellController::LaunchSatUiL
-// Launches SAT UI Client application.
-// ---------------------------------------------------------
-//
-void CSatShellController::LaunchSatUiL()
- {
- TFLOGSTRING( "CSatShellController::LaunchSatUiL called" )
-
- RApaLsSession rapaLsSession;
- User::LeaveIfError( rapaLsSession.Connect() );
- CleanupClosePushL( rapaLsSession );
- TThreadId id( static_cast<TInt64>( 0 ) );
- TApaAppInfo appInfo;
-
- User::LeaveIfError( rapaLsSession.GetAppInfo( appInfo, KUidSatUi ) );
- CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
- cmdLine->SetExecutableNameL( appInfo.iFullName );
- cmdLine->SetCommandL( EApaCommandOpen );
- rapaLsSession.StartApp( *cmdLine, id );
-
- CleanupStack::PopAndDestroy( cmdLine );
- CleanupStack::PopAndDestroy( &rapaLsSession );
-
- TFLOGSTRING( "CSatShellController::LaunchSatUiL exit" )
- }
-
-
-// ---------------------------------------------------------
-// CSatShellController::BringBrowserToForeground
-// Brings the Browser to foreground.
-// ---------------------------------------------------------
-//
-void CSatShellController::BringBrowserToForeground() const
- {
- TFLOGSTRING( "CSatShellController::BringBrowserToForeground called" )
-
- BringApplicationToForeground( iUidWmlBrowser );
-
- TFLOGSTRING( "CSatShellController::BringBrowserToForeground exit" )
- }
-
-// ---------------------------------------------------------
-// CSatShellController::BringBrowserToForegroundAfterPeriod
-// Brings the Browser to foreground after time has passed.
-// ---------------------------------------------------------
-//
-void CSatShellController::BringBrowserToForegroundAfterPeriod()
- {
- TFLOGSTRING(
- "CSatShellController::BringBrowserToForegroundAfterPeriod called" )
-
- if ( !iTimer->IsActive() )
- {
- TFLOGSTRING(
- "CSatShellController::BringBrowserToForegroundAfterPeriod \
- start iTimer" )
- iTimer->Start( KTimerTime,
- KTimerTime,
- TCallBack( TimerCompleted, this ) );
- }
-
- TFLOGSTRING(
- "CSatShellController::BringBrowserToForegroundAfterPeriod exit" )
- }
-
-// ---------------------------------------------------------
-// CSatShellController::BringSatUiToForeground
-// Brings the SAT UI application to foreground.
-// ---------------------------------------------------------
-//
-void CSatShellController::BringSatUiToForeground()
- {
- TFLOGSTRING( "CSatShellController::BringSatUiToForeground called" )
-
- CheckSatUiStatus();
- BringApplicationToForeground( KUidSatUi );
-
- TFLOGSTRING( "CSatShellController::BringSatUiToForeground exit" )
- }
-
-// ---------------------------------------------------------
-// CSatShellController::BringApplicationToForeground
-// Brings the SAT UI application to foreground.
-// ---------------------------------------------------------
-//
-void CSatShellController::BringApplicationToForeground(
- const TUid& aAppUid ) const
- {
- TFLOGSTRING( "CSatShellController::BringApplicationToForeground called" )
-
- RWsSession wsSession;
- // Open the WS server session.
- if ( KErrNone == wsSession.Connect() )
- {
- TFLOGSTRING( "CSatShellController::BringApplicationToForeground \
- open WS server session" )
- TApaTaskList tasklist( wsSession );
- // Find the task with uid
- TApaTask task = tasklist.FindApp( aAppUid );
- task.BringToForeground();
- wsSession.Close();
- }
-
- TFLOGSTRING( "CSatShellController::BringApplicationToForeground exit" )
- }
-
-// ---------------------------------------------------------
-// CSatShellController::SetSatUiToBackground
-// Sets SAT UI Application to background if needed.
-// ---------------------------------------------------------
-//
-void CSatShellController::SetSatUiToBackground() const
- {
- TFLOGSTRING( "CSatShellController::SetSatUiToBackground called" )
-
- if ( iSetSatUiToBackground )
- {
- RWsSession wsSession;
- // Open the WS server session.
- if ( KErrNone == wsSession.Connect() )
- {
- TFLOGSTRING( "CSatShellController::SetSatUiToBackground \
- open WS server session" )
- TApaTaskList tasklist( wsSession );
- // Find the task with uid
- TApaTask task = tasklist.FindApp( KUidSatUi );
- task.SendToBackground();
- wsSession.Close();
- }
- }
-
- TFLOGSTRING( "CSatShellController::SetSatUiToBackground exit" )
- }
-
-// ---------------------------------------------------------
-// CSatShellController::CycleSatUiBackwards
-// Brings the SAT UI application to foreground.
-// ---------------------------------------------------------
-//
-void CSatShellController::CycleSatUiBackwards()
- {
- TFLOGSTRING( "CSatShellController::BringSatUiToForeground called" )
-
- RWsSession wsSession;
- // Open the WS server session.
- if ( KErrNone == wsSession.Connect() )
- {
- TFLOGSTRING( "CSatShellController::CycleSatUiBackwards \
- open WS server session" )
- TApaTaskList taskList( wsSession );
- // Finds topmost application.
- TApaTask task = taskList.FindByPos(0);
- iTimer->Cancel();
-
- CApaWindowGroupName* name = 0;
- TRAPD( err,
- name = CApaWindowGroupName::NewL( wsSession, task.WgId() ) );
-
- if ( name )
- {
- // Check is that Browser is foremost application.
- if ( !err && ( name->AppUid() == KUidBrowser ) )
- {
- TFLOGSTRING(
- "CSatShellController::BSUTF Browser is in foreground" )
- }
- else
- {
- TFLOGSTRING(
- "CSatShellController::BSUTF Browser isn't in foreground" )
- TApaTask browserTask = taskList.FindApp( KUidBrowser );
- browserTask.BringToForeground();
- iTimer->Start(
- KTimerTime, KTimerTime, TCallBack( TimerCompleted, this ) );
- }
-
- delete name;
- }
-
- wsSession.Close();
- }
-
- TFLOGSTRING( "CSatShellController::BringSatUiToForeground exit" )
- }
-
-// ---------------------------------------------------------
-// CSatShellController::TimerCompleted
-// Callback function. Completes after predefined
-// time has passed
-// ---------------------------------------------------------
-//
-TInt CSatShellController::TimerCompleted( TAny* aObject )
- {
- TFLOGSTRING( "CSatShellController::TimerCompleted called" )
-
- if ( aObject )
- {
- STATIC_CAST( CSatShellController*, aObject )->CycleSatUiBackwards();
- }
-
- TFLOGSTRING( "CSatShellController::TimerCompleted exit" )
- return KErrNone;
- }
-
-// ---------------------------------------------------------
-// CSatShellController::LaunchBrowserL
-// Launch XHTML-browser
-// Browser launched with parameter
-// "4" + "<Space>" + "<Url>" + "<Space>" + "<UID of App>" or "5"
-// More information see Browser API Specification Document
-// ---------------------------------------------------------
-//
-TInt CSatShellController::LaunchBrowserL( const TDesC& aUrl,
- TUid aAccessPointUid )
- {
- TFLOGSTRING( "CSatShellController::LaunchBrowserL called" )
-
- TInt errorCode( KErrNone );
- HBufC* param = HBufC::NewLC( aUrl.Length() + KMaxUidName +
- KBrowserParamAndTwoSpaces );
-
- TFLOGSTRING2( "CSatShellController::LaunchBrowserL length of aUrl: %d", \
- aUrl.Length() )
- if ( aUrl.Length() > 0 )
- {
- param->Des().Copy( KFour );
- param->Des().Append( KSpace );
- param->Des().Append( aUrl );
- TFLOGSTRING2( "CSatShellController::LaunchBrowserL \
- aAccessPointUid: %d", aAccessPointUid )
- // Create script for Browser if not empty accesspoint UID.
- if ( aAccessPointUid != KEmptyUid )
- {
- TFLOGSTRING( "CSatShellController::LaunchBrowserL not empty \
- accesspoint" )
- // Uid is in decimal format
- param->Des().Append( KSpace );
- param->Des().AppendNum( aAccessPointUid.iUid );
- }
-
- }
- else
- {
- param->Des().Copy( KFive );
- }
-
- User::LeaveIfError( iWsSession.Connect() );
-
- TFLOGSTRING2( "CSatShellController::LaunchBrowserL \
- param string: %S", param )
- TApaTaskList taskList( iWsSession );
- TApaTask task = taskList.FindApp( iUidWmlBrowser );
-
- // If browser already open.
- if ( task.Exists() )
- {
- TFLOGSTRING( "CSatShellController::LaunchBrowserL browser open" )
- HBufC8* param8 = HBufC8::NewLC( param->Length() );
- param8->Des().Append( *param );
- errorCode = task.SendMessage( TUid::Uid( 0 ), param8->Des() );
- CleanupStack::PopAndDestroy( param8 );
- }
- else
- {
- TFLOGSTRING( "CSatShellController::LaunchBrowserL launch browser" )
- // Launch the Browser.
- TThreadId id( static_cast<TInt64>( 0 ) );
- RApaLsSession rapaLsSession;
- User::LeaveIfError( rapaLsSession.Connect() );
- errorCode = rapaLsSession.StartDocument( *param, iUidWmlBrowser, id );
- rapaLsSession.Close();
- }
-
- BringBrowserToForeground();
-
- iWsSession.Close();
- CleanupStack::PopAndDestroy( param );
-
- TFLOGSTRING2( "CSatShellController::LaunchBrowserL exit %d", errorCode )
- return errorCode;
- }
-
-// -----------------------------------------------------------------------------
-// CSatShellController::CheckSatUiStatus
-// Check if SatUi is needed to set to background.
-// -----------------------------------------------------------------------------
-//
-void CSatShellController::CheckSatUiStatus()
- {
- TFLOGSTRING( "CSatShellController::CheckSatUiStatus called" )
-
- // if SatUi task is found and SatUi is not in foreground flag is set ETrue
- iSetSatUiToBackground = EFalse;
-
- RWsSession wsSession;
- // Open the WS server session.
- if ( KErrNone == wsSession.Connect() )
- {
- TFLOGSTRING( "CSatShellController::CheckSatUiStatus \
- open WS server session" )
- TApaTaskList tasklist( wsSession );
- TApaTask satUiTask = tasklist.FindApp( KUidSatUi );
-
- if ( satUiTask.Exists() )
- {
- TFLOGSTRING(
- "CSatShellController::CheckSatUiStatus task exists" )
- TApaTask topMostTask = tasklist.FindByPos( 0 );
-
- if ( topMostTask.ThreadId() != satUiTask.ThreadId() )
- {
- TFLOGSTRING(
- "CSatShellController::CheckSatUiStatus set SatUI to BG" )
- iSetSatUiToBackground = ETrue;
- }
- }
-
- wsSession.Close();
- }
-
- TFLOGSTRING( "CSatShellController::CheckSatUiStatus exit" )
- }
-
-// ================= OTHER EXPORTED FUNCTIONS ===============================
-
-EXPORT_C MSatShellController* NewSatController()
- {
- TFLOGSTRING( "CSatShellController::NewSatController called" )
-
- MSatShellController* satController = NULL;
- TRAPD( err, satController = CSatShellController::NewL() )
- if ( KErrNone != err )
- {
- TFLOGSTRING2( " CSatShellController::NewSatController \
- failed: %d", err )
- satController = NULL;
- }
-
- TFLOGSTRING( "CSatShellController::NewSatController exit" )
- return satController;
- }
-
-// End of File
--- a/satui/satapp/SATUIInc/CSatUiActionPerformer.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,390 +0,0 @@
-/*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class handles the communication between server and user
-* interface
-*
-*/
-
-
-#ifndef CSATUIACTIONPERFORMER_H
-#define CSATUIACTIONPERFORMER_H
-
-// INCLUDES
-#include <msatuiobserver.h>
-#include <rsatuisession.h>
-#include <RSatSession.h>
-
-#include <cenrepnotifyhandler.h>
-
-// CONSTANTS
-//256 max length-header information fields
-const TInt KAdditionalInfoMaxSize = 244;
-const TInt KMaxPlayToneLength = 50;
-
-enum TIconCommand
- {
- EIconSetUpMenuContext = 1,
- EIconSetUpMenuItems,
- EIconDisplayText,
- EIconGetInput,
- EIconGetInkey,
- EIconGetYesNo,
- EIconPlayTone,
- EIconNotification,
- EIconConfirmCommand
- };
-
-// FORWARD DECLARATIONS
-class MSatUiAdapter;
-class MSatUiActionImplementer;
-class CPhoneGsmHandlerContainer;
-class CSatUiSsAdditionalInfoHandler;
-class CSatUiSsRequestCompleteHandler;
-class CCenRepNotifyHandler;
-class CSatUiIconHandler;
-class CRepository;
-
-
-// CLASS DECLARATION
-
-/**
-* This class implements the methods specified in the MSatUiObserver.
-*/
-
-class CSatUiActionPerformer : public CBase,
- public MCenRepNotifyHandlerCallback,
- public MSatUiObserver
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CSatUiActionPerformer* NewL();
-
- /**
- * Destructor.
- */
- virtual ~CSatUiActionPerformer();
-
- public: // New functions
-
- /**
- * Sets the UI.
- * @param aImplementer Pointer to be set.
- */
- void SetImplementer(MSatUiActionImplementer* aImplementer);
-
- /**
- * Returns the adapter provided by SatCli.
- */
- MSatUiAdapter* Adapter();
-
- public: // Functions from base classes
-
- /**
- * From MSatUiObserver Notification of the SAT Display Text command.
- * @param aText The text string to be displayed.
- * @param aSimApplicationName Sim Application name
- * @param aIconId The id of icon.
- * @param aRequestedIconDisplayed Informs if icon is not used.
- * @param aSustainedText Indicates is this text sustained ie. no timers
- * used if ETrue.
- * @param aDuration Duration for showing the text
- * @param aWaitUserToClear Indication if user is needed to clear
- * message
- * @return The response to this command.
- */
- TSatUiResponse DisplayTextL( const TDesC& aText,
- const TDesC& aSimApplicationName,
- const TSatIconId& aIconId,
- TBool& aRequestedIconDisplayed,
- const TBool aSustainedText,
- const TTimeIntervalSeconds aDuration,
- const TBool aWaitUserToClear );
-
- /**
- * From MSatUiObserver Notification of the SAT Get Inkey command.
- * @param aText The query text.
- * @param aCharacterSet The character range allowed.
- * @param aInput The input character.
- * @param aHelpIsAvailable A flag indicating if SAT help is available
- * @param aIconId The id of icon.
- * @param aRequestedIconDisplayed Informs if icon is not used.
- * @param aDuration Duration for showing the dialog.
- * @param aImmediateDigitResponse Indication if Immediate digit response
- * is needed.
- * @return The response of to this command.
- */
- TSatUiResponse GetInkeyL( const TDesC& aText,
- const TSatCharacterSet aCharacterSet, TChar& aInput,
- const TBool aHelpIsAvailable,
- const TSatIconId& aIconId,
- TBool& aRequestedIconDisplayed,
- TUint& aDuration,
- const TBool aImmediateDigitResponse );
-
- /**
- * From MSatUiObserver Notification of the SAT Get Input command.
- * @param aText The query text.
- * @param aCharacterSet The character range allowed.
- * @param aInput The input string.
- * @param aMinLength The minimum length of the input allowed.
- * @param aMaxLength The maximum length of the input allowed.
- * @param aHideInput A flag indicating if the input should be hidden.
- * @param aHelpIsAvailable A flag indicating if SAT help is available.
- * @param aIconId The id of icon.
- * @param aRequestedIconDisplayed Informs if icon is not used.
- * @return The response to this command.
- */
- TSatUiResponse GetInputL( const TDesC& aText,
- const TSatCharacterSet aCharacterSet, TDes& aInput,
- const TInt aMinLength, const TInt aMaxLength,
- const TBool aHideInput,
- const TBool aHelpIsAvailable,
- const TSatIconId& aIconId,
- TBool& aRequestedIconDisplayed );
-
- /**
- * From MSatUiObserver Notification of the SAT Set Up Menu command.
- * @param aText The title text.
- * @param aMenuItems The array of menu item captions.
- * @param aMenuItemNextActions The array of menu item next action
- * indicator codes.
- * @param aHelpIsAvailable A flag indicating if SAT help is available.
- * @param aIconId The id of title icon.
- * @param aMenuIcons List of icon identifiers for menu items.
- * @param aIconListQualifier Indicates how to use icons in the icon list.
- * @param aSelectionPreference Specifies is the soft keys preferred.
- * @return The response to this command.
- */
- TSatUiResponse SetUpMenuL( const TDesC& aText,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const TBool aHelpIsAvailable,
- const TSatIconId& aIconId,
- const CArrayFixFlat<TInt>* aMenuIcons,
- const enum TSatIconQualifier aIconListQualifier,
- const enum TSatSelectionPreference aSelectionPreference );
-
- /**
- * From MSatUiObserver Notification of the SAT Select Item command.
- * @param aText The title text.
- * @param aMenuItems The array of menu item captions.
- * @param aMenuItemNextActions The array of menu item next action
- * indicator codes.
- * @param aDefaultItem The item selected by default.
- * @param aSelection The item index selected by the user.
- * @param aHelpIsAvailable A flag indicating if help is available.
- * @param aIconId The id of title icon.
- * @param aMenuIcons List of icon identifiers for menu items.
- * @param aIconListQualifier Indicates how to use icons in the icon list.
- * @param aRequestedIconDisplayed Informs if icon is not used.
- * @param aSelectionPreference Specifies is the soft keys preferred.
- * @return The response to this command.
- */
- TSatUiResponse SelectItemL( const TDesC& aText,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const TInt aDefaultItem, TUint8& aSelection,
- const TBool aHelpIsAvailable,
- const TSatIconId& aIconId,
- const CArrayFixFlat<TInt>* aMenuIcons,
- const enum TSatIconQualifier aIconListQualifier,
- TBool& aRequestedIconDisplayed,
- const enum TSatSelectionPreference aSelectionPreference );
-
- /**
- * From MSatUiObserver Notification of the SAT Play Tone command.
- * @param aText The text to be displayed.
- * @param aTone The tone to be played.
- * @param aDuration The duration of the tone to be played.
- * @param aIconId The id of icon.
- * @param aRequestedIconDisplayed Informs if icon is not used.
- * @return The response to this command.
- */
- TSatUiResponse PlayTone( const TDesC& aText,
- const TSatTone aTone,
- const TTimeIntervalMicroSeconds aDuration,
- const TSatIconId& aIconId,
- TBool& aRequestedIconDisplayed );
-
- /**
- * From MSatUiObserver General confirmation request
- * @param aCommandId ID of the quering command
- * @param aAlphaIdStatus Alpha Identifier status
- * @param aText The text to be displayed.
- * @param aAdditionalText Additional text to be used in queries.
- * @param aActionAccepted Indicates whether the command was accepted.
- * @param aIconId The id of icon.
- * @param aRequestedIconDisplayed Informs if icon is not used.
- * @param aTerminatedByUser Informs if end key is used.
- */
- void ConfirmCommand(
- const TSatSQueryCommand aCommandId,
- const TSatAlphaIdStatus aAlphaIdStatus,
- const TDesC& aText,
- const TDesC& aAdditionalText,
- TBool& aActionAccepted,
- const TSatIconId& aIconId,
- TBool& aRequestedIconDisplayed,
- TBool& aTerminatedByUser );
-
- /**
- * From MSatUiObserver General notification
- * @param aCommandId ID of the notifying command
- * @param aAlphaIdStatus Alpha Identifier status
- * @param aText Alpha Identifier
- * @param aIconId The id of icon.
- * @param aRequestedIconDisplayed Informs if icon is not used.
- * @param aControlResult Control result of the MoSm and CallControl
- * @return The response of the UI to this command.
- */
- TSatUiResponse Notification(
- const TSatSNotifyCommand aCommandId,
- const TSatAlphaIdStatus aAlphaIdStatus,
- const TDesC& aText,
- const TSatIconId& aIconId,
- TBool& aRequestedIconDisplayed,
- const TSatControlResult aControlResult );
-
- /**
- * From MSatUiObserverGeneral event notification. Used for example to
- * tell UI that command has completed its execution.
- * @param aEventId, identifies the event
- * @param aEventStatus, status of the event, used as additional info for
- * the event
- * @param aError, possible error code that may affect on event handling.
- * This is also used as additional info
- */
- void EventNotification(
- const TSatSEvent aEventId,
- const TSatSEventStatus aEventStatus,
- const TInt aError );
-
- private:
-
- /**
- * C++ default constructor.
- */
- CSatUiActionPerformer();
-
- /**
- * Symbian OS constructor.
- */
- void ConstructL();
-
- /**
- * Fetch icon information.
- * @param aIconId Id for icons
- * @param aIconCommand Command type for icon.
- * @return Pointer to selected FbsBitmap icon
- */
- CFbsBitmap* FetchIcon( const TUint8 aIconId,
- const enum TIconCommand aIconCommand );
-
- /**
- * Gets default text's resource id
- * @param aCommandId Identifies the command
- * @param aControl Used only for MoSm and Call Control
- * @return Resource id for the default text
- */
- TInt DefaultAlphaIdL(
- const TSatSNotifyCommand aCommandId,
- const TSatControlResult aControlResult) const;
-
- /**
- * Get size for the icon in popup window.
- * @param aSize Reference to the size of icon place.
- * @param aIconCommand Dialog information
- * @return TBool Returns EFalse if popup window is not supported
- * in current layout.
- */
- TBool GetPopUpWindowIconSize( TSize& aSize,
- const TIconCommand aIconCommand );
-
- /**
- * Creates scalable bitmap.
- * @param aBitMapToConvert Reference icon to be scaled.
- * @param aIconCommand Dialog information
- */
- void GetScalableBitmapL( CFbsBitmap*& aBitMapToConvert,
- const TIconCommand aIconCommand );
-
- /**
- * Handles scalable bitmap.
- * @param aBitMapToConvert Reference icon to be scaled.
- * @param aIconCommand Dialog information
- * @param aRequestedIconDisplayed Informs if icon is not shown.
- */
- void GetScalableBitmap(
- CFbsBitmap*& aBitMapToConvert,
- const TIconCommand aIconCommand,
- TBool& aRequestedIconDisplayed );
-
- /**
- * Handles scalable bitmap.
- * @param aBitMapToConvert Reference icon to be scaled.
- * @param aIconCommand Dialog information
- */
- void GetScalableBitmap(
- CFbsBitmap*& aBitMapToConvert,
- const TIconCommand aIconCommand );
-
- public: // Data
-
- //wait scheduler
- CActiveSchedulerWait iWait;
-
- private: // Data
-
- // play tone sequence
- TBuf8<KMaxPlayToneLength> iSequence;
-
-
- //Ref: Interface to the UI-part
- MSatUiActionImplementer* iActionImplementer;
-
- // own: used with refresh started and finished
- TBool iRefresh;
-
- // own: session to sat client
- RSatUiSession iSat;
-
- //Ref: Adapter provided by SAT Client
- MSatUiAdapter* iAdapter;
-
- //Own: Session
- RSatSession iSatSession;
-
- //Own: Current Iconididentifier
- TInt iIconIdIdentifier;
-
- //Own: SetupMenu and SelectItem items icon
- CAknIconArray* iItemIcons;
-
- //Own: Icon fetching handler
- CSatUiIconHandler* iIconHandler;
-
- // own: used to signal that icons are supported
- TBool iIconSupport;
-
- //Own: used to indicate if ESatSClearScreenEvent occurs
- TBool iClearScreenEvent;
-
- };
-
-#endif // CSATUIACTIONPERFORMER_H
-
-// End of File
--- a/satui/satapp/SATUIInc/CSatUiApplication.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Defines CSatUiApplication class
-*
-*
-*/
-
-
-#ifndef CSATUIAPPLICATION_H
-#define CSATUIAPPLICATION_H
-
-#include <aknapp.h>
-
-// CONSTANTS
-const TUid KUidSATUI = { 0x101f4ce0 }; // UID of app
-
-// CLASS DECLARATION
-
-/**
-* SatUi Application class.
-*/
-class CSatUiApplication : public CAknApplication
- {
- private: // Functions from base classes
-
- /**
- * From CAknApplication Returns the UId of the application.
- * @return The UId of the application.
- */
- TUid AppDllUid() const;
-
- /**
- * From CAknApplication Creates document object.
- * @return The pointer to the created object.
- */
- CApaDocument* CreateDocumentL();
- };
-
-#endif // CSATUIAPPLICATION_H
-
-// End of File
--- a/satui/satapp/SATUIInc/CSatUiDocument.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Defines CSatUiDocument class
-*
-*
-*/
-
-
-#ifndef CSATUIDOCUMENT_H
-#define CSATUIDOCUMENT_H
-
-// INCLUDES
-#include <AknDoc.h>
-
-// FORWARD DECLARATIONS
-class CSatUiActionPerformer;
-class CSatUiViewAppUi;
-
-// CLASS DECLARATION
-
-/**
-* SatUi Document class.
-*/
-class CSatUiDocument : public CAknDocument
- {
- public: // Constructors and destructor
-
- /**
- * C++ default constructor.
- */
- CSatUiDocument(CEikApplication& aApp): CAknDocument(aApp) {};
-
- /**
- * Symbian OS constructor.
- */
- void ConstructL();
-
- /**
- * Destructor.
- */
- virtual ~CSatUiDocument();
-
- private:
-
- /**
- * From CEikDocument Creates ViewAppUi object.
- * @return The pointer to the created object.
- */
- CEikAppUi* CreateAppUiL();
-
- private://Data
-
- //Own: Command receiver
- CSatUiActionPerformer *iActionPerformer;
-
- // application UI pointer
- CSatUiViewAppUi* iApplicationUi;
- };
-
-#endif // CSATUIDOCUMENT_H
-
-// End of File
--- a/satui/satapp/SATUIInc/CSatUiMessageQueryIcon.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +0,0 @@
-/*
-* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* CPicture derived class. For DisplayText to show icon and text
-*
-*
-*/
-
-
-#ifndef CSATUIMESSAGEQUERYICON_H
-#define CSATUIMESSAGEQUERYICON_H
-
-// INCLUDES
-#include <gdi.h>
-
-// FORWARD DECLARATIONS
-class TSize;
-class CFbsBitmap;
-
-// CLASS DECLARATION
-
-class CSatUiMessageQueryIcon :public CPicture
- {
-
- public: // Constructors and destructor
-
- /**
- * C++ default constructor.
- * @param aSize Size of the picture in twips.
- * @param aBitmap Bitmap
- */
- CSatUiMessageQueryIcon( TSize aSize, CFbsBitmap& aBitmap );
-
- /**
- * Destructor.
- */
- virtual ~CSatUiMessageQueryIcon();
-
- public: // From CPicture
-
- /**
- * Draw the picture.
- * @param aGc Graphic context.
- * @param aTopLeft Co-ordinates of left corner.
- * @param aClipRect Clipping rectangle.
- * @param aMap Device map.
- */
- virtual void Draw( CGraphicsContext& aGc,
- const TPoint& aTopLeft,
- const TRect& aClipRect,
- MGraphicsDeviceMap* aMap ) const;
- /**
- * From CPicture.
- * A derived class must implement this function.
- */
- virtual void ExternalizeL( RWriteStream& aStream ) const;
-
- /**
- * Get the picture's size in twips.
- * @param aSize Size.
- */
- virtual void GetOriginalSizeInTwips( TSize& aSize ) const;
-
- protected: // Data
-
- TSize iSizeInTwips;
- CFbsBitmap* iBitmap;
- };
-
-#endif
-
--- a/satui/satapp/SATUIInc/CSatUiTextQueryDialog.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implements the feature for investigating length of the input. Softkeys
-* are set based on this information.
-*
-*
-*/
-
-
-#ifndef CSATUITEXTQUERYDIALOG_H
-#define CSATUITEXTQUERYDIALOG_H
-
-// INCLUDES
-#include <AknQueryDialog.h>
-
-// CLASS DECLARATION
-
-/**
-* Defines the SAT spesific data query class.
-*/
-class CSatUiTextQueryDialog : public CAknTextQueryDialog
- {
- public: // Constructors and destructor
-
- /**
- * C++ default constructor.
- */
- CSatUiTextQueryDialog(TDes& aDataText, const TTone aTone,
- TInt aMinLength, TInt aMaxLength);
-
- /**
- * Destructor.
- */
- virtual ~CSatUiTextQueryDialog();
-
- public: // Functions from base classes
-
- /**
- * From CAknQueryDialog
- * @param aQueryControl
- * @param aEventType
- * @param aStatus
- * @return
- */
- TBool HandleQueryEditorStateEventL(CAknQueryControl* aQueryControl,
- TQueryControlEvent aEventType, TQueryValidationStatus aStatus);
-
- protected: // Functions from base classes
-
- /**
- * From CEikDialog, gets called when dialog initializations are done
- */
- void PostLayoutDynInitL();
-
- /**
- * From CEikDialog, gets called before initializations
- */
- void PreLayoutDynInitL();
-
- /**
- * From CAknDialog, Hash key is accepted
- */
- TBool NeedToDismissQueryL( const TKeyEvent& aKeyEvent );
-
- /**
- * From CAknDialog, Hash key not ignored (workaround)
- */
- TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
- TEventCode aType );
-
-
- private: // Data
-
- //Minimum length of input
- TInt iTextMinLength;
- };
-
-#endif // CSATUITEXTQUERYDIALOG_H
-
-// End of File
--- a/satui/satapp/SATUIInc/CSatUiView.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,289 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Defines CSatUiView class
-*
-*
-*/
-
-
-#ifndef CSATUIVIEW_H
-#define CSATUIVIEW_H
-
-// INCLUDES
-#include <msatuiobserver.h>
-#include <aknview.h> // For CAknView class
-
-// CONSTANTS
-static const TInt KTabLength = 4; // Items tab length
-
-// FORWARD DECLARATIONS
-class AknStaticNoteDialog;
-class MSatUiAdapter;
-class CSatUiViewContainer;
-class CSatUiViewAppUi;
-
-// CLASS DECLARATION
-
-/**
-* SatUi view (SetUpMenu and SelectItem).
-*/
-class CSatUiView : public CAknView,
- public MEikListBoxObserver
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- */
- static CSatUiView* NewL( TBool aSetUpMenu,
- CSatUiViewAppUi* aAppUi,
- TBool aEmpty );
-
- /*
- * Destructor.
- */
- virtual ~CSatUiView();
-
- public: // New functions
-
- /**
- * Sets the title needed for showing the view.
- * @param aTitle The Title pane text.
- */
- void SetTitle( const HBufC* aTitle );
-
- /**
- * Sets all parameters needed for showing the view.
- * @param aTitle The Title pane text.
- * @param aMenuItems The Main pane list items.
- * @param aMenuItemNextActions The Options items.
- * @param aHelpIsAvailable The help flag.
- * @return Operation result.
- */
- TSatUiResponse SetItemsL( HBufC* aTitle,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const TBool aHelpIsAvailable );
-
- /**
- * Activates SetUpMenu view.
- * @param aTitle The Title pane text.
- * @param aMenuItems The Main pane list items.
- * @param aMenuItemNextActions The Options items.
- * @param aHelpIsAvailable The help flag.
- * @return Operation result.
- */
- TSatUiResponse SetUpMenuL( HBufC* aTitle,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const TBool aHelpIsAvailable );
-
- /**
- * Activates SelectItem view.
- * @param aTitle The Title pane text.
- * @param aMenuItems The Main pane list items.
- * @param aMenuItemNextActions The Options items.
- * @param aDefaultItem The item in focus.
- * @param aSelection The selected item.
- * @param aHelpIsAvailable The help flag.
- * @return Operation result.
- */
- TSatUiResponse SelectItemL( HBufC* aTitle,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const TInt aDefaultItem, TUint8& aSelection,
- const TBool aHelpIsAvailable );
-
- /**
- * Sets the pointer to adapter provided by SatCli.
- * @param aAdapter A pointer to an abstract adapter interface.
- */
- void SetAdapter( MSatUiAdapter* aAdapter );
-
- /**
- * Sets the icon bitmap pointer.
- * @param aIconBitmap Context Pane icon.
- */
- void SetIconL( const CFbsBitmap* aIconBitmap );
-
- /**
- * Sets the items icon array.
- * @param aItemsIconArray Items iconarray.
- * @param aSelfExplanatoryItems Indicate if only icons are shown
- */
- void SetItemsIconL( const CAknIconArray* aItemsIconArray,
- const TBool aSelfExplanatoryItems );
-
- /**
- * Hides and makes list box visible if needed.
- * @param aVisible Visible or hidden
- */
- void MakeListBoxVisible( TBool aVisible );
-
- /**
- * Updates CBA according to current next action
- * @param aIndex current row on the list
- * @param aNew is the view just created
- */
- void UpdateMskL( TInt aIndex, TBool aNew );
-
- public: // Functions from base classes
-
- /**
- * From CAknView Returns the UId of the view.
- * @return The UId of the view.
- */
- TUid Id() const;
-
- /**
- * From CAknView Handles view commands.
- * @param aCommand The command identifier.
- */
- void HandleCommandL(TInt aCommand);
-
- /**
- * From CAknView Handles the options menu.
- * @param aResourceId Resource id of the menu pane.
- * @param aMenuPane The menu pane.
- */
- void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
- protected: // New functions
-
- /**
- * Updates the view container.
- */
- void RefreshL();
-
- /**
- * Draws the title and list items of the view.
- */
- void DrawL();
-
- protected: // Functions from base classes
-
- /**
- * From MEikListBoxObserver Handles list box events.
- * @param aEventType The event identifier.
- */
- void HandleListBoxEventL( CEikListBox* /*aListBox*/,
- TListBoxEvent aEventType );
-
- /**
- * From CAknView Activates the view.
- */
- void DoActivateL( const TVwsViewId& /*PrevViewId*/,
- TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/);
-
- /**
- * From CAknView Deactivates the view.
- */
- void DoDeactivate();
-
- private:
-
- /**
- * called when user has been
- * inactive for a pre-defined period
- */
- static TInt DispatchUserInactive( TAny* aPtr );
-
- /**
- * C++ default constructor.
- */
- CSatUiView( TBool aSetUpMenu, CSatUiViewAppUi* aAppUi, TBool aEmpty );
-
- /**
- * Symbian OS constructor.
- */
- void ConstructL();
-
- public: //Data
-
- //CUserActivityManager user response wait scheduler
- CActiveSchedulerWait iWait;
-
- private: //Data
-
- // Own: indicates that a note was cleared after a delay
- TBool iNoResponseFromUserAfterDelay;
-
- //Ref: adapter provided by SatCli
- MSatUiAdapter* iAdapter;
-
- //To block the keypad abter the user action and unblock when
- //the new SatServer command comes
- TBool iKeypadBlocked;
-
- //Type of the view (SetUpMenu or SelectItem)
- TBool iSetUpMenu;
-
- //Ref: UI object
- CSatUiViewAppUi* iSatUiAppUi;
-
- //Own: items of the main pain list
- CDesCArrayFlat* iMenuItems;
- //Own: codes of options menu items
- CArrayFixFlat<TSatAction>* iMenuItemNextActions;
-
- //Number of items in the maind pane
- TInt iNItems;
-
- //Ref: view title text
- const HBufC* iTitle;
-
- TBool iHelpIsAvailable;
-
- //Own: view container
- CSatUiViewContainer* iContainer;
-
- //Ref: list box model
- CTextListBoxModel* iModel;
-
- //The response to SatServer
- TSatUiResponse iResponse;
-
- //default item in the Select Item list
- TInt iDefaultItem;
-
- //selected item in the list
- TInt iSelection;
-
- //client rectangle
- TRect iRect;
-
- //Items icon array
- CAknIconArray* iItemsIconArray;
-
- //Icons exists on view
- TBool iIconsOn;
-
- //Icons state changed
- TBool iIconStateChange;
-
- //If only icons are shown
- TBool iSelfExplanatoryItems;
-
- //Value for displaying list box.
- TBool iListBoxVisible;
-
- //Indication that view is first created empty view
- TBool iEmpty;
-
- };
-
-#endif // CSATUIVIEW_H
-
-// End of File
--- a/satui/satapp/SATUIInc/CSatUiViewAppUi.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,765 +0,0 @@
-/*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Defines CSatUiViewAppUi class
-*
-*/
-
-
-#ifndef CSATUIVIEWAPPUI_H
-#define CSATUIVIEWAPPUI_H
-
-// INCLUDES
-#include <aknViewAppUi.h>
-#include <mdaaudiotoneplayer.h>
-#include <mdaaudiosampleplayer.h>
-#include "MSatUiActionImplementer.h"
-#include "CSatUiActionPerformer.h"
-
-// CONSTANTS
-const TUid KSetUpMenuViewId={1};
-const TUid KSelectItemViewId={2};
-
-// FORWARD DECLARATIONS
-class CSatUiView;
-class MSatUiAdapter;
-class CAknMessageQueryDialog;
-class CAknWaitDialog;
-class CSatUiTextQueryDialog;
-class CAknQueryDialog;
-class CSatUiInactivityMonitor;
-class CAknIconArray;
-class CAknPopupForm;
-class CAknGlobalNote;
-class CSatUiWaitDialog;
-
-// CLASS DECLARATION
-
-/**
-* Implements the UI and methods from the MSatUiActionImplementer.
-*/
-class CSatUiViewAppUi : public CAknViewAppUi,
- public MSatUiActionImplementer,
- public MMdaAudioToneObserver,
- public MMdaAudioPlayerCallback
- {
- public: // Constructors and destructor
-
- /**
- * C++ default constructor.
- */
- CSatUiViewAppUi();
-
- /**
- * Destructor.
- */
- ~CSatUiViewAppUi();
-
- public: // New functions
-
- /**
- * Sets the pointer to adapter provided by SatCli.
- * @param aAdapter SAT Client part object.
- */
- void SetAdapter( MSatUiAdapter* aAdapter );
-
- public: // Functions from base classes
-
- /**
- * From CAknViewAppUi Called when view is brought to
- * foreground or put into background
- * @param aForeground A flag to indicate is SAT background or foreground
- */
- void HandleForegroundEventL( TBool aForeground );
-
- /**
- * From MMdaAudioToneObserver Called by the player object when
- * it has been initialised.
- * @param aError Error type.
- */
- void MatoPrepareComplete( TInt aError );
-
- /**
- * From MMdaAudioToneObserver Called by the player object when
- * the playback has been terminated.
- * @param aError Error type.
- */
- void MatoPlayComplete( TInt aError );
-
- /**
- * From MSatUiActionImplementer Shows the wait note.
- */
- void ShowWaitNoteL();
-
- /**
- * From MSatUiActionImplementer Shows the wait note without delay.
- */
- void ShowWaitNoteWithoutDelayL();
-
- /**
- * From MSatUiActionImplementer Removes the wait note from the screen.
- */
- void StopShowWaitNote();
-
- /**
- * Checks that is BT SAP connection active.
- * @return BT SAP activation status.
- */
- TBool BTSAPActivatedL();
-
- /**
- * From MSatUiActionImplementer
- * @return CoeEnv.
- */
- CCoeEnv* CoeEnv();
-
- /**
- * From MSatUiActionImplementer Displays given text on the screen.
- * @param aText Text to be shown.
- * @param aSimApplicationName Sim Application name
- * @param aIconBitmapDisplayText Icon for dialog
- * @param aSelfExplanatoryIcon If selfexplanatory icon
- * @param aSustainedText Indicates is this text sustained ie. no timers
- * used if ETrue.
- * @param aDuration Duration for showing the text
- * @param aWaitUserToClear Indication if user is needed to clear
- * message
- * @return Operation result.
- */
- TSatUiResponse DisplayTextL( const TDesC& aText,
- const TDesC& aSimApplicationName,
- CFbsBitmap* aIconBitmapDisplayText,
- const TBool aSelfExplanatoryIcon,
- const TBool aSustainedText,
- const TTimeIntervalSeconds aDuration,
- const TBool aWaitUserToClear );
-
- /**
- * From MSatUiActionImplementer Removes Display Text Dialog from
- * the screen.
- */
- void ClearScreen();
-
- /**
- * From MSatUiActionImplementer Asks a Yes/No answer from the user.
- * @param aText A question to be shown.
- * @param aCharacterSet The character range allowed.
- * @param aInkey Character user feeds.
- * @param aIconBitmap Icon for query dialog.
- * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
- * @param aDuration Duration for showing the dialog.
- * @param aImmediateDigitResponse Indication if Immediate digit response
- * is needed.
- * @return Operation result.
- */
- TSatUiResponse GetYesNoL( const TDesC& aText,
- const TSatCharacterSet aCharacterSet,
- TChar& aInkey,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory,
- TUint& aDuration,
- const TBool aImmediateDigitResponse );
-
- /**
- * From MSatUiActionImplementer Asks input from the user.
- * @param aText A question to be shown.
- * @param aCharacterSet The character range allowed.
- * @param aInput The input string.
- * @param aMinLength The minimum length of the input allowed.
- * @param aMaxLength The maximum length of the input allowed.
- * @param aHideInput A flag indicating if the input should be hidden.
- * @param aGetInkey A flag indicating GetInkey command.
- * @param aIconBitmapGetInput Icon for query dialog.
- * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
- * @param aDuration Duration for showing the dialog.
- * @return Operation result.
- */
- TSatUiResponse GetInputL( const TDesC& aText,
- const TSatCharacterSet aCharacterSet,
- TDes& aInput,
- const TInt aMinLength,
- const TInt aMaxLength,
- const TBool aHideInput,
- const TBool aGetInkey,
- const CFbsBitmap* aIconBitmapGetInput,
- const TBool aSelfExplanatory,
- TUint& aDuration );
-
- /**
- * From MSatUiActionImplementer Prepares the SetUpMenu view and
- * calls the method of the view class.
- * @param aText The title text.
- * @param aMenuItems The array of menu items.
- * @param aMenuItemNextActions The array of next action indicators.
- * @param aIconBitmap The Context Pane icon.
- * @param aItemsIconArray Array of item icons
- * @param aSelfExplanatoryItems A flag indicating if only icons are shown.
- * @param aHelpIsAvailable A flag indicating if SAT help is available.
- * @return Operation result.
- */
- TSatUiResponse SetUpMenuL( const TDesC& aText,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const CFbsBitmap* aIconBitmap,
- const CAknIconArray* aItemsIconArray,
- const TBool aSelfExplanatoryItems,
- const TBool aHelpIsAvailable );
-
- /**
- * From MSatUiActionImplementer Prepares the SelectItem view and
- * calls the method of the view class.
- * @param aText The title text.
- * @param aMenuItems The array of menu items.
- * @param aMenuItemNextActions The array of next action indicators.
- * @param aDefaultItem The item in focus.
- * @param aSelection The item index selected by the user.
- * @param aIconBitmap The Context Pane icon.
- * @param aItemsIconArray Array of item icons
- * @param aSelfExplanatoryItems A flag indicating if only icons are shown.
- * @param aHelpIsAvailable A flag indicating if SAT help is available.
- * @return Operation result.
- */
- TSatUiResponse SelectItemL( const TDesC& aText,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const TInt aDefaultItem,
- TUint8& aSelection,
- const CFbsBitmap* aIconBitmap,
- const CAknIconArray* aItemsIconArray,
- const TBool aSelfExplanatoryItems,
- const TBool aHelpIsAvailable );
-
- /**
- * From MSatUiActionImplementer Plays Standard Tone.
- * @param aText The text to be displayed.
- * @param aSequence The name of the file to be played.
- * @param aDuration The duration of the tone to be played.
- * @param aIconBitmap The tone playing note icon
- * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
- * @return Operation result.
- */
- TSatUiResponse PlayStandardToneL( const TDesC& aText,
- const TDesC8& aSequence,
- TTimeIntervalMicroSeconds aDuration,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory );
-
- /**
- * From MSatUiActionImplementer Shows a query to get confirmation
- * for Send SMS, Send SS or Send USSD command.
- * @param aText The text to be displayed.
- * @param aActionAccepted Indicates whether the command was accepted.
- * @param aType Type of the command (SMS, SS or USSD).
- * @return Operation result.
- */
- TSatUiResponse ConfirmSendL( const TDesC& aText,
- TBool& aActionAccepted, TInt aType );
-
- /**
- * From MSatUiActionImplementer Shows a wait note indicating
- * Send SMS command.
- * @param aText The text to be displayed.
- * @param aIconBitmapSendSM Sending dialog icon.
- * @param aSelfExplanatoryIcon A flag indicating if only icon is shown.
- */
- void ShowSmsWaitNoteL( const TDesC& aText,
- const CFbsBitmap* aIconBitmapSendSM,
- const TBool aSelfExplanatoryIcon );
-
- /**
- * From MSatUiActionImplementer Shows a wait note indicating
- * Send SS command.
- * @param aText The text to be displayed.
- * @param aIconBitmap Sending dialog icon.
- * @param aSelfExplanatoryIcon A flag indicating if only icon is shown.
- */
- void ShowSsWaitNoteL( const TDesC& aText,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatoryIcon );
-
- /**
- * From MSatUiActionImplementer Shows the query to confirm the
- * Refresh command.
- * @param aActionAccepted Indicates whether the command was accepted.
- * @return Operation result.
- */
- TSatUiResponse ConfirmRefreshL( TBool& aActionAccepted );
-
- /**
- * Notification of the SAT Call Control command.
- * @param aText The text string to be displayed.
- * @param aAlphaIdStatus Alpha Identifier status
- * @param aControlResult Call control general result
- * @return The response from the UI
- */
- TSatUiResponse CallControlL( const TDesC& aText,
- const TSatAlphaIdStatus aAlphaIdStatus );
-
- /**
- * Notification of the SAT Launch browser confirmation request
- * @param aText The text to be displayed.
- * @param aActionAccepted Indicates whether the command was accepted.
- * @param aIconBitmap The confirm note icon
- * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
- */
- void ConfirmLaunchBrowserL(
- const TDesC& aText,
- TBool& aActionAccepted,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory );
-
- /**
- * Status of help support
- * @param aStatus status of help
- */
- void HelpStatus( TBool aStatus );
-
- /**
- * Notification of the SAT Mo Sm Control command.
- * @param aText The text string to be displayed.
- * @param aAlphaIdStatus Alpha Identifier status
- * @param aControlResult Mo Sm control general result
- * @return The response from the UI
- */
- TSatUiResponse MoSmControlL( const TDesC& aText,
- const TSatAlphaIdStatus aAlphaIdStatus );
-
- /**
- * From MSatUiActionImplementer Shows the wait note while DTMF are being
- * sent.
- * @param aText The text to be displayed.
- * @param aIconBitmap The confirm note icon
- * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
- * @return Information on the operation result.
- */
- TSatUiResponse ShowDtmfWaitNoteL( const TDesC& aText,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatoryIcon );
-
- /**
- * Dispatch iWait to action implementer.
- * @param aWait Timer.
- */
- void DispatchTimer( CActiveSchedulerWait& aWait );
-
- /**
- * Get a flag which is indicating if end key is pressed.
- * @return A Boolean flag which is indicating if end key is pressed.
- */
- TBool GetEndKey();
-
- /**
- * Set a flag which is indicating if end key is pressed.
- * @param aValue Status of end key
- */
- void SetEndKey( TBool aValue );
-
- /**
- * Set a flag which is indicating if proactive command is pending.
- * @param aValue Status of proactive command
- */
- void SetCommandPending( TBool aValue );
-
- /**
- * Plays user selected tone.
- * @param aText The text to be displayed.
- * @param aDuration The duration of the tone to be played.
- * @param aTone Tone type.
- * @param aIconBitmap The tone playing note icon
- * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
- * @return Operation result.
- */
- TSatUiResponse PlayUserSelectedToneL(
- const TDesC& aText,
- TTimeIntervalMicroSeconds aDuration,
- TSatTone aTone,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory );
-
- /**
- * Confirm user permission for Open Channel.
- * @param aText The text to be displayed.
- * @param aActionAccepted Indicates whether the command was accepted.
- * @param aIconBitmapOpenChannel Icon for query dialog
- * @param aSelfExplanatory A flag indicating if icon is self-explanatory
- * @return Operation result
- */
- TSatUiResponse ConfirmOpenChannelL(
- const TDesC& aText,
- TBool& aActionAccepted,
- const CFbsBitmap* aIconBitmapOpenChannel,
- const TBool aSelfExplanatory );
-
- /**
- * From MSatUiActionImplementer Shows the wait note while BIP packets
- * are sent.
- * @param aCommand Command type.
- * @param aText The text to be displayed.
- * @param aIconBitmap Icon for query dialog
- * @param aSelfExplanatory A flag indicating if icon is self-explanatory
- */
- void ShowBIPNoteL(
- TInt aCommand,
- const TDesC& aText,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory );
-
- /**
- * From MSatUiActionImplementer Confirm user permission for SetUpCall
- * @param aText The text to be displayed.
- * @param aSimAppName Header for th equery
- * @param aActionAccepted Indicates whether the command was accepted.
- * @param aIconBitmap Icon for query dialog
- * @param aSelfExplanatory A flag indicating if icon is self-explanatory
- */
- void ConfirmSetUpCallL(
- const TDesC& aText,
- const TDesC& aSimAppName,
- TBool& aActionAccepted,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory );
-
- /**
- * From MSatUiActionImplementer Show note indicating SAT is not
- * available.
- */
- void ShowNotAvailableNoteL();
-
-
- /**
- * From MSatUiActionImplementer Show the Ss error note.
- */
- void ShowSsErrorNoteL();
-
- /**
- * Start SatUi closing process
- */
- void CloseSatUI();
-
- /**
- * Get settings from current profile like volume, warning tones on/off etc.
- * @param aTone, optional specifies the type of needed tone if necessary
- * @param aToneName, optional buffer to get a soundfile name from
- * the active profile if necessary
- */
- void GetProfileParamsL( TSatTone aTone = ESatToneNotSet, TDes* aToneName = NULL );
-
-
- /**
- * Return current profile state.
- * @return current profile state.
- */
- TInt ProfileState();
-
- public: // Functions from base classes
-
- /**
- * From CAknViewAppUi Handles UI commands.
- * @param aCommand Command to be handled.
- */
- void HandleCommandL( TInt aCommand );
-
- protected:
-
- /**
- * From CEikAppUi. Takes care of commandline parameter.
- * @param aCommand Indicate the way an application is to be launched.
- * @param aDocumentName A document file name.
- * @param aTail Command line parameter.
- */
- TBool ProcessCommandParametersL(
- TApaCommand aCommand,
- TFileName& aDocumentName,
- const TDesC8& aTail );
-
- private:
-
- /**
- * Symbian OS default constructor.
- */
- void ConstructL();
-
- private: // functions
-
- /**
- * Creates empty menu. This is needed in SIM originated commands.
- */
- void CreateEmptyMenuL();
-
- /**
- * called when user has been
- * inactive for a pre-defined period
- * @param aPtr PPointer to creato
- * @return Error value
- */
- static TInt DispatchUserInactive( TAny* aPtr );
-
- /**
- * Delay callback function. Called when predefined time
- * has passed
- * @param Pointer to creator
- * @return whetwer to call function again after an interval
- */
- static TInt DelayCallback( TAny* aPtr );
-
- /**
- * Delay callback function. Called when predefined time
- * has passed
- * @param Pointer to creator
- * @return whetwer to call function again after an interval
- */
- static TInt CloseCallControlNoteL( TAny* aPtr );
-
- /**
- * Creates a callback timer
- * @param aDelay delay after callback function is called
- * @param aCallBack Callback function
- */
- void CreateCallBackTimerL( const TInt aDelay,
- TInt (*aFunction)(TAny* aPtr) );
-
- /**
- * Destroys the callback timer
- */
- void DestroyCallBackTimer( );
-
- /**
- * Make a mask for get input icon bitmap
- * @param aMask Mask for Get inpupt icon bitmap
- * @param aSize Size for mask
- */
- void MakeGetInputBitmapMask( CFbsBitmap* aMask, TSize aSize ) const;
-
- /**
- * Handles a exit softkey.
- */
- void HandleExitCommandL();
-
- /**
- * From CAknViewAppUi Handles window server events..
- * @param aEvent The window server event that occurred.
- * @param aDestination The control associated with the event.
- */
- void HandleWsEventL( const TWsEvent& aEvent,
- CCoeControl* aDestination );
-
- /**
- * Close all existing dialogs.
- */
- void CloseDialogs();
-
- /**
- * Initialisation of an audio sample has completed.
- * @param aError The status of the audio sample after initialisation.
- * @param aDuration The duration of the audio sample.
- */
- void MapcInitComplete(
- TInt aError,
- const TTimeIntervalMicroSeconds& /*aDuration*/ );
-
- /**
- * Play of an audio sample has completed.
- * @param aError The status of playback.
- */
- void MapcPlayComplete( TInt aError );
-
- /**
- * Remove null characters from text.
- * @param aText Text to be cleaned from NULLs
- */
- void RemoveNullCharacters( HBufC* aText );
-
- /**
- * Make and run note dialog with an icon
- * @param aResourceId Resource id of the dialog to be created
- * @param aText Text to the dialog
- * @param aIconBitmap Pointer to the icon bitmap
- * @param aSelfExplanatory Whether text is showed or not
- * @param aIconCommand Layout of dialog for scaling
- * @param aMskCommand middle softkey command
- * @return The user response to the note
- */
- TInt RunQueryDialogL(
- TInt aResourceId,
- const TDesC& aText,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory,
- TInt aMskCommand );
-
- /**
- * Check if it is allowed to change view or SAT UI is in
- * view activation loop.
- * @param aForeground ETrue if the application is in the foreground.
- * @param aActiveView TUid of active view.
- * @return ETrue if view activation is allowed.
- */
- TBool ViewActivationAllowed( const TBool aForeground,
- const TUid aActiveView );
-
- /**
- * Handle received key event in immediate digit response case.
- * @param aScanCode Received key event code.
- */
- void HandleImmediateDigitResponse( TInt aScanCode );
-
- /**
- * Handle closing display text in high priority events
- * @param aEvent The window server event that occurred.
- */
- void PriorityVerifyAndClose( const TWsEvent& aEvent );
-
- /**
- * Stop playing PLAY TONE command.
- */
- void StopPlayToneL();
-
- private: //Data
-
- // Own: use timer repeat
- TBool iTimerRepeatOn;
-
- // Own: repeat count for timer
- TInt iTimerRepeatCount;
-
- TBool iHelp;
-
- // Session Terminated
- TBool iSelectItemPending;
-
- // select item command pending
- TBool iSessionTerminated;
-
- // delay timer
- CPeriodic* iTimer;
-
- // Own: indicates that note was cleared after a delay
- TBool iNoteClearedAfterDelay;
-
- // Own: indicates that a note was cleared after a delay
- TBool iNoResponseFromUserAfterDelay;
-
- //Ref: SatClient abstract adapter interface
- MSatUiAdapter* iAdapter;
-
- //Own: SetUpMenu view
- CSatUiView* iSetUpMenuView;
-
- //Own: SelectItem view
- CSatUiView* iSelectItemView;
-
- //The command comes first time, so the view should be created
- TBool iSetUpMenuFirst;
- TBool iSelectItemFirst;
-
- // Own: SIM application name
- HBufC* iAppName;
- // Own: view title
- HBufC* iTitle;
-
- //Own: Display Text dialog and text+icon
- CAknMessageQueryDialog* iDisplayTextDialog;
- CAknPopupForm* iDisplayTextIconDialog;
-
- //Own: get input dialog
- CSatUiTextQueryDialog* iGetInputDialog;
-
- //Own: Wait note
- CAknWaitDialog* iWaitNote;
-
- //Own: BIP Wait note
- CSatUiWaitDialog* iBipWaitNote;
-
- //Own: Refresh note
- CAknWaitDialog* iRefreshNote;
-
- //Own: Media server interface to play rtf file
- CMdaAudioToneUtility *iPlayer;
-
- //Failure while playing tone
- TSatUiResponse iPlayToneError;
-
- //wait scheduler
- CActiveSchedulerWait* iWait;
-
- // Flag for indicating end key status
- TBool iEndKeyPressed;
-
- // Status of view, select item or setup menu
- TUid iActiveView;
-
- // Flag for indicating if command is pending
- TBool iCommandPending;
-
- // Own: query dialog
- CAknQueryDialog* iQueryDialog;
-
- // Own: Inform dialog
- CAknNoteDialog* iNoteDialog;
-
- // Own: note dialog
- CAknStaticNoteDialog* iPermanentNote;
-
- // Player for user selected tones.
- CMdaAudioPlayerUtility* iAudioPlayer;
-
- // Volume for user selected tones.
- TInt iVolume;
-
- // Note for call control.
- CAknGlobalNote* iCcNote;
-
- // The note's ID in call control.
- TInt iCcNoteId;
-
- // Flag for indicating SatUI foreground status
- TBool iForeground;
-
- // Flag indicating previous SatUI foreground status
- TBool iPreviousForeground;
-
- // Counter for possible view activation loop
- TInt iViewLoopCounter;
-
- // Duration of tone
- TTimeIntervalMicroSeconds iDuration;
-
- // Used key value for immediate digit response
- TChar iKey;
-
- // Indicate if immediate digit response is requested
- TBool iImmediateDigitResponse;
-
- // Indication for End key case that wait note existed
- TBool iWaitNoteInUse;
-
- // Request ID for increased buffer size.
- TInt iReqWSBufferID;
-
- // Indication that warning and game tones are in use
- TBool iWarningAndPlayTones;
-
- // Not Own
- // Use to keep track of the dialog which is on the screen
- CCoeControl* iForegroundControl;
-
- // Indication that high priority event occured, used in DisplayText
- TBool iHighPriorityEvent;
-
- // Indication that immediate response TLV, used in DisplayText
- TBool iImmediateRsp;
-
- };
-
-#endif // CSATUIVIEWAPPUI_H
-
-// End of File
--- a/satui/satapp/SATUIInc/CSatUiViewContainer.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Defines CSatUiViewContainer class
-*
-*
-*/
-
-
-#ifndef CSATUIVIEWCONTAINER_H
-#define CSATUIVIEWCONTAINER_H
-
-// FORWARD DECLARATIONS
-class CCoeControl;
-class CAknView;
-class MSatUiAdapter;
-class CEikTextListBox;
-class MEikListBoxObserver;
-class CSatUiView;
-
-class CSatUiTest;
-
-// CLASS DECLARATION
-
-/**
-* Container for SatUi View.
-*/
-class CSatUiViewContainer : public CCoeControl
- {
- public: // Constructors and destructor
-
- /**
- * Two-phased constructor.
- * @param aIconOn If item icons available
- * @param aView Pointer to view
- */
- static CSatUiViewContainer* NewL( TBool aIconOn,
- CSatUiView* aView );
-
- /**
- * Destructor.
- */
- virtual ~CSatUiViewContainer();
-
- public: // New functions
-
- /**
- * Returns a pointer to the listbox object.
- * @return The listbox object pointer.
- */
- CAknColumnListBox* ListBox();
-
- public: // Functions from base classes
-
- /**
- * From CCoeControl Counts controls.
- * @return A number of controls.
- */
- TInt CountComponentControls() const;
-
- /**
- * From CCoeControl Provides a pointer to a control.
- * @param aIndex Index of the control.
- * @return A pointer to a control.
- */
- CCoeControl* ComponentControl(TInt aIndex) const;
-
- /**
- * From CCoeControl Sets the size of the main pane.
- */
- void SizeChanged();
-
- /**
- * From CCoeControl Handles list box key events.
- * @param aKeyEvent The key event.
- * @param aType The type of key event.
- * @return Was a key consumed or not.
- */
- TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,
- TEventCode aType);
-
- /**
- * From CCoeControl Returns SatUi help context.
- * @param aContext Help context.
- */
- void GetHelpContext(TCoeHelpContext& aContext) const;
-
- /**
- * From CCoeControl Handles a change to the control's resources.
- * @param aType The messages type id
- */
- void HandleResourceChange( TInt aType );
-
- /**
- * From CCoeControl Indicate the requirements for control redrawing.
- * @param aDrawNow Control redraw flags.
- */
- void FocusChanged( TDrawNow aDrawNow );
-
- private:
-
- /**
- * C++ default constructor.
- */
- CSatUiViewContainer( CSatUiView* aView );
-
- /**
- * Symbian OS constructor.
- */
- void ConstructL( TBool aIconOn );
-
- private: //Data
-
- //Own: listbox for SetUpMenu and SelectItem view
- CAknColumnListBox* iListBox;
-
- //If item icons available
- TBool iIconOn;
-
- //Pointer to view
- CSatUiView* iView;
-
- };
-
-#endif // CSATUIVIEWCONTAINER_H
-
-// End of File
--- a/satui/satapp/SATUIInc/CSatUiWaitDialog.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,72 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implements the feature for investigating length of the input. Softkeys
-* are set based on this information.
-*
-*
-*/
-
-
-#ifndef CSATUIWAITDIALOG_H
-#define CSATUIWAITDIALOG_H
-
-// INCLUDES
-#include <AknWaitDialog.h>
-
-// FORWARD DECLARATION
-class MSatUiAdapter;
-
-// CLASS DECLARATION
-
-/**
- * Defines the SAT spesific data query class.
- */
-class CSatUiWaitDialog : public CAknWaitDialog
- {
- public: // Constructors and destructor
-
- /**
- * C++ default constructor.
- */
- CSatUiWaitDialog(
- CEikDialog** aSelfPtr,
- MSatUiAdapter& aAdapter,
- TBool aVisibilityDelayOff );
-
- /**
- * Destructor.
- */
- virtual ~CSatUiWaitDialog();
-
- public: // Override functions from base classes
-
- /**
- * From @c CEikDialog.
- * Handles a dialog button press for the specified button.
- * @param aButtonId The ID of the button that was activated
- * @return ETrue to validate and exit the dialog
- */
- TBool CSatUiWaitDialog::OkToExitL( TInt aButtonId );
-
- private: // Data
-
- // Reference to adapter. Used to inform SAT Client if user
- // presses Cancel during dialog is showing
- MSatUiAdapter& iAdapter;
- };
-
-#endif // CSATUIWAITDIALOG_H
-
-// End of File
--- a/satui/satapp/SATUIInc/MSatUiActionImplementer.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,373 +0,0 @@
-/*
-* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: An interface class to the UI side. Through this interface it
-* is possible to perform actual operations
-*
-*/
-
-
-#ifndef MSATUIACTIONIMPLEMENTER_H
-#define MSATUIACTIONIMPLEMENTER_H
-
-// INCLUDES
-#include <msatuiobserver.h>
-
-// CLASS DECLARATION
-class CAknIconArray;
-
-/**
-* This class defines the interface between engine and UI.
-*/
-class MSatUiActionImplementer
- {
- public:
-
- /**
- * Returns CoeEnv.
- */
- virtual CCoeEnv* CoeEnv() = 0;
-
- /**
- * Shows the wait note.
- */
- virtual void ShowWaitNoteL() = 0;
-
- /**
- * Shows the wait note without delay
- */
- virtual void ShowWaitNoteWithoutDelayL() = 0;
-
- /**
- * Removes the wait note from the screen.
- */
- virtual void StopShowWaitNote() = 0;
-
- /**
- * Handles the DisplayText operation.
- * @param aText Text to be shown.
- * @param aSimApplicationName Sim Application name
- * @param aIconBitmapDisplayText Icon for dialog
- * @param aSustainedText Indicates is this text sustained ie. no timers
- * used if ETrue.
- * @param aDuration Duration for showing the text
- * @param aWaitUserToClear Indication if user is needed to clear
- * message
- * @return Information of the operation result.
- */
- virtual TSatUiResponse DisplayTextL( const TDesC& aText,
- const TDesC& aSimApplicationName,
- CFbsBitmap* aIconBitmapDisplayText,
- const TBool aSelfExplanatoryIcon,
- const TBool aSustainedText,
- const TTimeIntervalSeconds aDuration,
- const TBool aWaitUserToClear ) = 0;
-
- /**
- * Removes Display Text Dialog from the screen.
- */
- virtual void ClearScreen() = 0;
-
- /**
- * Asks a Yes/No answer from the user.
- * @param aText A question to be shown.
- * @param aCharacterSet The character range allowed.
- * @param aInkey Character user feeds.
- * @param aIconBitmap Icon for query dialog.
- * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
- * @param aDuration Duration for showing the dialog.
- * @param aImmediateDigitResponse Indication if Immediate digit response
- * is needed.
- * @return Information of the operation result.
- */
- virtual TSatUiResponse GetYesNoL( const TDesC& aText,
- const TSatCharacterSet aCharacterSet,
- TChar& aInkey,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory,
- TUint& aDuration,
- const TBool aImmediateDigitResponse ) = 0;
-
- /**
- * Asks input from the user.
- * @param aText A question to be shown.
- * @param aCharacterSet The character range allowed.
- * @param aInput The input string.
- * @param aMinLength The minimum length of the input allowed.
- * @param aMaxLength The maximum length of the input allowed.
- * @param aHideInput A flag indicating if the input should be hidden.
- * @param aGetInkey A flag indicating if GetInkey command is used.
- * @param aIconBitmapGetInput Icon for query dialog.
- * @param aSelfExplanatory A flag indicating if icon is self-explanatory.
- * @param aDuration Duration for showing the dialog.
- * @return Information of the operation result.
- */
- virtual TSatUiResponse GetInputL( const TDesC& aText,
- const TSatCharacterSet aCharacterSet, TDes& aInput,
- const TInt aMinLength, const TInt aMaxLength,
- const TBool aHideInput, const TBool aGetInkey,
- const CFbsBitmap* aIconBitmapGetInput,
- const TBool aSelfExplanatory,
- TUint& aDuration ) = 0;
-
- /**
- * Handles the SetUpMenu view.
- * @param aText The title text.
- * @param aMenuItems The array of menu item captions.
- * @param aMenuItemNextActions The array of menu item next action
- * indicator captions.
- * @param aIconBitmap The Context pane icon.
- * @param aItemsIconArray Array of item icons
- * @param aSelfExplanatoryItems Flag indicating if only icons are shown.
- * @param aHelpIsAvailable A flag indicating if SAT help is available.
- * @return Information of the operation result.
- */
- virtual TSatUiResponse SetUpMenuL( const TDesC& aText,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const CFbsBitmap* aIconBitmap,
- const CAknIconArray* aItemIconsArray,
- const TBool aSelfExplanatoryItems,
- const TBool aHelpIsAvailable ) = 0;
-
- /**
- * Handles the SelectItem view.
- * @param aText The title text.
- * @param aMenuItems The array of menu items.
- * @param aMenuItemNextActions The array of next action indicators.
- * @param aDefaultItem The item in focus.
- * @param aSelection The item index selected by the user.
- * @param aIconBitmap The Context Pane icon.
- * @param aItemsIconArray Array of item icons
- * @param aSelfExplanatoryItems Flag indicating if only icons are shown.
- * @param aHelpIsAvailable A flag indicating if SAT help is available.
- * @return Information of the operation result.
- */
- virtual TSatUiResponse SelectItemL( const TDesC& aText,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const TInt aDefaultItem,
- TUint8& aSelection,
- const CFbsBitmap* aIconBitmap,
- const CAknIconArray* aItemsIconArray,
- const TBool aSelfExplanatoryItems,
- const TBool aHelpIsAvailable ) = 0;
-
- /**
- * Handles Standard Tone playing.
- * @param aText The text to be displayed.
- * @param aFileName The name of the file corresponding to the tone.
- * @param aDuration The duration of the tone to be played.
- * @param aIconBitmap The tone playing note icon
- * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
- * @return Information of the operation result.
- */
- virtual TSatUiResponse PlayStandardToneL( const TDesC& aText,
- const TDesC8& aSequence,
- TTimeIntervalMicroSeconds aDuration,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory ) = 0;
-
- /**
- * Shows the confirmation note about the SAT Send SMS, Send SS or
- * Send USSD command.
- * @param aText The text to be displayed.
- * @param aActionAccepted Indicates whether the command was accepted.
- * @param aType Type of the request (SMS, SS, USSD).
- * @return Information of the operation result.
- */
- virtual TSatUiResponse ConfirmSendL( const TDesC& aText,
- TBool& aActionAccepted, TInt aType ) = 0;
-
- /**
- * Shows the wait note about the Send SMS command.
- * @param aText The text to be displayed.
- * @param aIconBitmapSendSM Sending dialog icon.
- * @param aSelfExplanatoryIcon A flag indicating if only icon is shown.
- */
- virtual void ShowSmsWaitNoteL( const TDesC& aText,
- const CFbsBitmap* aIconBitmapSendSM,
- const TBool aSelfExplanatoryIcon ) = 0;
-
- /**
- * Shows the wait note about the Send SS command.
- * @param aText The text to be displayed.
- * @param aIconBitmap Sending dialog icon.
- * @param aSelfExplanatoryIcon A flag indicating if only icon is shown.
- */
- virtual void ShowSsWaitNoteL( const TDesC& aText,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatoryIcon ) = 0;
-
- /**
- * Shows the confirmation note about the SAT Refresh command.
- * @param aActionAccepted Indicates whether the command was accepted.
- * @return Information of the operation result.
- */
- virtual TSatUiResponse ConfirmRefreshL(
- TBool& aActionAccepted) = 0;
-
- /**
- * Notification of the SAT Call Control command.
- * @param aText The text string to be displayed.
- * @param aAlphaIdStatus Alpha Identifier status
- * @param aControlResult Call control general result
- * @return The response from the UI
- */
- virtual TSatUiResponse CallControlL(
- const TDesC& aText,
- const TSatAlphaIdStatus aAlphaIdStatus ) = 0;
-
- /**
- * Notification of the SAT Launch browser confirmation request
- * @param aText The text to be displayed.
- * @param aActionAccepted Indicates whether the command was accepted.
- * @param aIconBitmap The confirm note icon
- * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
- */
- virtual void ConfirmLaunchBrowserL(
- const TDesC& aText,
- TBool& aActionAccepted,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory ) = 0;
-
- /**
- * Notification of the SAT Mo Sm Control command.
- * @param aText The text string to be displayed.
- * @param aAlphaIdStatus Alpha Identifier status
- * @param aControlResult Mo Sm control general result
- * @return The response from the UI
- */
- virtual TSatUiResponse MoSmControlL(
- const TDesC& aText,
- const TSatAlphaIdStatus aAlphaIdStatus ) = 0;
-
- /**
- * Shows the wait note while DTMF are being sent.
- * @param aText The text to be displayed.
- * @param aIconBitmap The confirm note icon
- * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
- * @return Information on the operation result.
- */
- virtual TSatUiResponse ShowDtmfWaitNoteL( const TDesC& aText,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatoryIcon ) = 0;
-
- /** Dispatch iWait to action implementer.
- * @param aWait Timer.
- */
- virtual void DispatchTimer( CActiveSchedulerWait& aWait ) = 0;
-
- /**
- * Get flag which is indicating if end key is pressed.
- * @return A Boolean flag which is indicating if end key is pressed.
- */
- virtual TBool GetEndKey() = 0;
-
- /**
- * Set a flag which is indicating if end key is pressed.
- * @param aValue Status of end key
- */
- virtual void SetEndKey( TBool aValue ) = 0;
-
- /**
- * Set a flag which is indicating if proactive command is pending.
- * @param aValue Status of proactive command
- */
- virtual void SetCommandPending( TBool aValue ) = 0;
-
- /**
- * Plays user selected tone.
- * @param aText The text to be displayed.
- * @param aDuration Play duration.
- * @param aTone Tone to be played.
- * @param aIconBitmap The tone playing note icon
- * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
- * @return Information on the operation result.
- */
- virtual TSatUiResponse PlayUserSelectedToneL(
- const TDesC& aText,
- TTimeIntervalMicroSeconds aDuration,
- TSatTone aTone,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory ) = 0;
-
- /**
- * Confirm user permission for Open Channel.
- * @param aText The text to be displayed.
- * @param aActionAccepted Indicates whether the command was accepted.
- * @param aIconBitmapOpenChannel Icon for query dialog
- * @param aSelfExplanatory A flag indicating if icon is self-explanatory
- * @return Operation result
- */
- virtual TSatUiResponse ConfirmOpenChannelL(
- const TDesC& aText,
- TBool& aActionAccepted,
- const CFbsBitmap* aIconBitmapOpenChannel,
- const TBool aSelfExplanatory ) = 0;
-
- /**
- * Shows the wait note while BIP packets are sent.
- * @param aCommand Command type.
- * @param aText The text to be displayed.
- * @param aIconBitmap Icon for query dialog
- * @param aSelfExplanatory A flag indicating if icon is self-explanatory
- */
- virtual void ShowBIPNoteL(
- TInt aCommand,
- const TDesC& aText,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory ) = 0;
-
- /**
- * Confirm user permission for SetUpCall
- * @param aText The text to be displayed.
- * @param aSimAppName Header for th equery
- * @param aActionAccepted Indicates whether the command was accepted.
- * @param aIconBitmap Icon for query dialog
- * @param aSelfExplanatory A flag indicating if icon is self-explanatory
- */
- virtual void ConfirmSetUpCallL(
- const TDesC& aText,
- const TDesC& aSimAppName,
- TBool& aActionAccepted,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory ) = 0;
-
- /**
- * Show note indicating SAT is not available.
- */
- virtual void ShowNotAvailableNoteL() = 0;
-
- /**
- * Show the Ss error note.
- */
- virtual void ShowSsErrorNoteL() = 0;
-
- /**
- * Start SatUi closing process.
- */
- virtual void CloseSatUI() = 0;
-
- /**
- * Return current profile state.
- * @return current profile state.
- */
- virtual TInt ProfileState() = 0;
-
-
- };
-
-#endif // MSATUIACTIONIMPLEMENTER_H
-
-// End of File
--- a/satui/satapp/SATUIInc/csatuiiconhandler.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,112 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Introduces CSatUiIconHandler class, which handles
-* icon fetching for SatUi.
-*
-*/
-
-
-#ifndef CSATUIICONHANDLER_H
-#define CSATUIICONHANDLER_H
-
-#include <e32base.h>
-#include <rsatservice.h>
-
-class CFbsBitmap;
-class RSatSession;
-
-/**
- * Handles asynchronous icon fetching for SatUi.
- *
- * Opens connection to SatClient by using received session attribute.
- * Receives icon information and does the selection based on received icon id
- * attribute. Asks the handle of the icon bitmap from the SatClient's
- * RSatIcon class by giving the icon information and the package for handle,
- * which is done asynchronously. For mean time, this class is waiting for
- * completion of request by starting CActiveSchedulerWait, which is stopped
- * when request is completed. After that the icon is duplicated via RSatIcon
- * by giving the handle information. This is also an asynchronous call and
- * CActiveSchedulerWait is started again. When completed the pointer to the
- * bitmap is returned.
- *
- * @lib satui.exedll
- * @since S60 v3.1
- */
-class CSatUiIconHandler : public CBase
- {
-
-public: // Constructors and destructor
-
- /**
- * Constructor.
- */
- static CSatUiIconHandler* NewL();
-
- /*
- * Destructor.
- */
- virtual ~CSatUiIconHandler();
-
-public: // New functions
-
- /**
- * The method, which fetches the icon.
- *
- * @since S60 v3.1
- * @param aSatSession Session information for SatClient interface.
- * @param aIconId Id for icon to be fetched.
- * @param aOptWidth Optimal width of the icon to be fetched.
- * @param aOptHeight Optimal height of the icon to be fetched.
- * @param aIconSupport Flag to signal if icons are not supported at all
- * @return A pointer to the icon bitmap.
- */
- CFbsBitmap* FetchIconL( const RSatSession& aSatSession,
- const TUint8 aIconId,
- const TInt aOptWidth,
- const TInt aOptHeight,
- TBool& aIconSupport );
-
-private:
-
- /**
- * C++ default constructor.
- *
- * @since S60 v3.1
- */
- CSatUiIconHandler();
-
- /**
- * Sorts the icons into order of superiority and saves the order into a list
- *
- * @since S60 v3.1
- * @param aIconEf List of icons
- * @param aSelectedIcons List into which order is saved
- * @param aOptWidth Optimal width of the icon to be fetched.
- * @param aOptHeight Optimal height of the icon to be fetched.
- */
- void SortIconsL( const RIconEf& aIconEf,
- RArray<TInt>& aSelectedIcons,
- const TInt aOptWidth,
- const TInt aOptHeight ) const;
-
-private: // data
-
- /**
- * RSatService of the SatClient.
- */
- RSatService iSatService;
-
- };
-
-#endif // CSATUIICONHANDLER_H
--- a/satui/satapp/SATUIInc/satui.hrh Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,69 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This file contains declarations for resources of SatUi.
-* The file can be included in C++ or resource file.
-*
-*/
-
-
-#ifndef SATUI_HRH
-#define SATUI_HRH
-
-// CONSTANTS
-
-enum
- {
- ESatUiCmdSelect = 1,
- ESatUiCmdExit
- };
-
-enum
- {
- ESatUiSoftkeySend = 10,
- ESatUiSoftkeyCall,
- ESatUiSoftkeyQuit
- };
-
-enum
- {
- ESatUiWaitNote = 1,
- ESatUiWaitNoteWithCancel,
- ESatUiRefreshWaitNote,
- ESatUiSmsWaitNote,
- ESatUiSsWaitNote,
- ESatUiDtmfWaitNote,
- ESatUiPermanentNote,
- ESatUiMessage,
- ESatUiInformationNote
- };
-
-enum
- {
- ESatUiConfirmSendSms = 1,
- ESatUiConfirmSendSs,
- ESatUiConfirmSendUssd,
- ESatUiConfirmSetUpCall
- };
-
-enum
- {
- ESatUiDisplayTextIconLabel=50,
- ESatUiDisplayTextIconSpacer,
- ESatUiDisplayTextIconRTxtEd
- };
-
-#endif // SATUI_HRH
-
-// End of File
--- a/satui/satapp/SATUIInc/tflogger.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2002-2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Defines logging macroes
-*
-*/
-
-
-#ifndef __TFLOGGER_H__
-#define __TFLOGGER_H__
-
-#include <flogger.h>
-#include <e32svr.h>
-
-_LIT( KTfLogFolder, "sat" );
-_LIT( KTfLogFile, "satui.TXT" );
-
-/**
-* ------------------------------------------------------------------------------
-*
-* Remove #define LOGGING_ENABLED from comments to enable logging
-*
-* ------------------------------------------------------------------------------
-*/
-
-//#define LOGGING_ENABLED
-
-/**
-* ------------------------------------------------------------------------------
-*
-* LOGGING MACROs
-*
-* USE THESE MACROS IN YOUR CODE
-*
-* Example: TFLOGTEXT( own_desc )
-* Example: TFLOGSTRING( "Test" )
-* Example: TFLOGSTRING( "Test %i", aValue )
-* Example: TFLOGSTRING( "Test %i %i", aValue1, aValue2 )
-*
-* ------------------------------------------------------------------------------
-*/
-
-#ifdef LOGGING_ENABLED
-
- #define TFLOGTEXT( TEXT ) \
- { \
- RFileLogger::Write( KTfLogFolder,KTfLogFile, \
- EFileLoggingModeAppend, TEXT ); \
- RDebug::Print( TEXT ); \
- }
-
- #define TFLOGSTRING( TEXT ) \
- { \
- _LIT( tempLogDes, TEXT ); \
- RFileLogger::Write( \
- KTfLogFolder, \
- KTfLogFile, \
- EFileLoggingModeAppend, \
- tempLogDes() ); \
- RDebug::Print( _L( TEXT ) ); \
- }
-
- #define TFLOGSTRING2( TEXT, VAR1 ) \
- { \
- _LIT( tempLogDes, TEXT ); \
- RFileLogger::WriteFormat( \
- KTfLogFolder, \
- KTfLogFile, \
- EFileLoggingModeAppend, \
- TRefByValue<const TDesC>( tempLogDes() ), VAR1 ); \
- RDebug::Print( _L( TEXT ), VAR1 ); \
- }
-
- #define TFLOGSTRING3( TEXT, VAR1, VAR2 ) \
- { \
- _LIT( tempLogDes, TEXT ); \
- RFileLogger::WriteFormat( \
- KTfLogFolder, \
- KTfLogFile, \
- EFileLoggingModeAppend, \
- TRefByValue<const TDesC>( tempLogDes() ), VAR1, VAR2 ); \
- RDebug::Print( _L( TEXT ), VAR1, VAR2 ); \
- }
-
-#else
-
- #define TFLOGTEXT( TEXT )
- #define TFLOGSTRING( TEXT )
- #define TFLOGSTRING2( TEXT, VAR1 )
- #define TFLOGSTRING3( TEXT, VAR1, VAR2 )
-
-#endif // LOGGING_ENABLED
-
-#endif // __TFLOGGER_H__
--- a/satui/satapp/SATUISrc/CSatUiActionPerformer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1837 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This class handles the communication between server and
-* user interface
-*
-*/
-
-
-// INCLUDE FILES
-#include <aknenv.h>
-#include <StringLoader.h>
-#include <SatUi.rsg>
-#include <e32test.h>
-
-#include <msatuiadapter.h>
-
-#include <AknIconArray.h> //for itemsicon
-#include <gulicon.h> //for itemsicon
-#include <aknlayout.cdl.h> //for TAknWindowLineLayout
-#include <aknlayoutscalable_avkon.cdl.h> //for scalable layouts
-#include <AknUtils.h>
-#include <AknIconUtils.h>
-#include <aknnotedialog.h>
-
-#include "CSatUiActionPerformer.h"
-#include "MSatUiActionImplementer.h"
-#include "csatuiiconhandler.h"
-#include "tflogger.h"
-
-#include "satui.hrh"
-
-#include <ProfileEngineSDKCRKeys.h>
-#include <centralrepository.h>
-#include <cenrepnotifyhandler.h>
-
-// General Settings Cen Rep Keys.
-#include <SettingsInternalCRKeys.h>
-
-// CONSTANTS
-
-const TInt KSatActiveProfileOffline = 5; // value from ProfileEngine
-
-// PlayTone durations
-const TInt64 KSatDur170ms = 170000; // 170ms
-const TInt64 KSatDur200ms = 200000; // 200ms
-const TInt64 KSatDur250ms = 250000; // 250ms
-const TInt64 KSatDur1200ms = 1200000; // 1200ms
-
-// play tone tones
-_LIT8( KNetToneSeqNetBusy, "\x00\x11\x05\x4E\x30\x40\x30\x07\x0B" );
-
-_LIT8( KNetToneSeqNetCallWaiting, "\x00\x11\x05\x4E\x14\x40\x3C\x4E\x14\
-\x40\x64\x40\x64\x40\x64\x4E\x14\x40\x3C\x4E\x14\x40\x64\x40\x64\x40\x64\
-\x07\x0B" );
-
-_LIT8( KNetToneSeqNetCongestion, "\x00\x11\x05\x4E\x14\x40\x14\x07\x0B" );
-
-_LIT8( KNetToneSeqNetSpecialInformation, "\x00\x11\x05\x4F\x21\x50\
-\x21\x51\x21\x40\x64\x07\x0B" );
-
-_LIT8( KNetToneSeqDial,"\x00\x11\x05\x4E\xFE\x4E\xFE\x4E\xFE\x4E\xFE\x4E\xFE\
-\x4E\xFE\x4E\xFE\x4E\xFE\x07\x0B");
-
-_LIT8( KNetToneSeqRingGoing, "\x00\x11\x05\x4E\x64\x05\x04\x40\x64\06\x07\x0B" );
-
-// General Beep is set for forever duration. Instead of AVKON definition 170ms.
-_LIT8( KGeneralBeep, "\x00\x11\x0A\x76\x00\x0B" );
-_LIT8( KErrorTone, "\x00\x11\x0A\x6C\x19\x0B" );
-_LIT8( KRadioPathNotAvailable, "\x00\x11\x0A\x05\x03\x4E\x14\x40\x14\x06\x0B" );
-_LIT8( KRadioPathAck, "\x00\x11\x0A\x02\xFC\x0A\x80\x4E\x14\x0A\x7f\x0B" );
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CSatUiActionPerformer::CSatUiActionPerformer():
- iRefresh( EFalse ),
- iIconSupport( ETrue ),
- iClearScreenEvent( EFalse )
- {
- }
-
-// Symbian OS default constructor can leave.
-void CSatUiActionPerformer::ConstructL()
- {
- TFLOGSTRING( "CSatUiActionPerformer::ConstructL called" )
-
- //Register to Server as subsession
- //If Server is not up, this function call may take time
- iSatSession.ConnectL();
-
- iSat.RegisterL( iSatSession, this );
- iAdapter = iSat.Adapter();
- if ( !iAdapter )
- {
- User::Leave( KErrNotFound );
- }
-
- // create icon handler
- iIconHandler = CSatUiIconHandler::NewL();
-
- //Item icons
- iItemIcons = new ( ELeave ) CAknIconArray( 1 );
-
- TFLOGSTRING( "CSatUiActionPerformer::ConstructL exit" )
- }
-
-// Two-phased constructor.
-CSatUiActionPerformer* CSatUiActionPerformer::NewL()
- {
- TFLOGSTRING( "CSatUiActionPerformer::NewL() called" )
- CSatUiActionPerformer* self = new ( ELeave ) CSatUiActionPerformer;
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- TFLOGSTRING( "CSatUiActionPerformer::NewL() exit" )
- return self;
- }
-
-// Destructor.
-CSatUiActionPerformer::~CSatUiActionPerformer()
- {
- TFLOGSTRING( "CSatUiActionPerformer::~CSatUiActionPerformer() called" )
-
- iSat.Close();
- iSatSession.Close();
-
- if ( iItemIcons )
- {
- iItemIcons->ResetAndDestroy();
- delete iItemIcons;
- }
-
- // delete icon handler
- delete iIconHandler;
- iIconHandler = NULL;
-
- iActionImplementer = NULL;
- iAdapter = NULL;
-
- TFLOGSTRING( "CSatUiActionPerformer::~CSatUiActionPerformer() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::SetImplementer
-// Sets a pointer to CSatUiViewAppUi object.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiActionPerformer::SetImplementer(
- MSatUiActionImplementer* aImplementer )
- {
- TFLOGSTRING( "CSatUiActionPerformer::SetImplementer calling" )
- iActionImplementer = aImplementer;
- TFLOGSTRING( "CSatUiActionPerformer::SetImplementer exiting" )
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::Adapter
-// Returns a pointer to MSatUiAdapter provided by SatCli.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-MSatUiAdapter* CSatUiActionPerformer::Adapter()
- {
- TFLOGSTRING( "CSatUiActionPerformer::Adapter calling-exiting" )
- return iAdapter;
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::DisplayTextL
-// Checks length of the text and calls method from
-// the CSatUiViewAppUi class if the length is OK.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiActionPerformer::DisplayTextL(
- const TDesC& aText,
- const TDesC& aSimApplicationName,
- const TSatIconId& aIconId,
- TBool& aRequestedIconDisplayed,
- const TBool aSustainedText,
- const TTimeIntervalSeconds aDuration,
- const TBool aWaitUserToClear )
- {
- TFLOGSTRING( "CSatUiActionPerformer::DisplayText called" )
- TSatUiResponse response( ESatFailure );
- aRequestedIconDisplayed = ETrue;
- TBool selfExplanatoryIcon( EFalse );
-
- TInt textLength( aText.Length() );
-
- if ( ( !textLength ) || ( textLength > RSat::KTextToDisplayMaxSize ) )
- {
- TFLOGSTRING( "CSatUiActionPerformer::DisplayText no text" )
- aRequestedIconDisplayed = EFalse;
- return response;
- }
-
- CFbsBitmap* iconBitmapDisplayText = NULL;
- iActionImplementer->SetCommandPending( ETrue );
-
- //if icon is available for command
- if ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) ||
- ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) &&
- ( iIconSupport ) )
- {
- TFLOGSTRING( "CSatUiActionPerformer::DisplayText have icon" )
- iconBitmapDisplayText = FetchIcon( aIconId.iIdentifier,
- EIconDisplayText );
-
- if ( ESatSelfExplanatory == aIconId.iIconQualifier )
- {
- TFLOGSTRING( "CSatUiActionPerformer::DisplayText self \
- explanatory icon" )
- selfExplanatoryIcon = ETrue;
- }
- }
-
- //icon not found not shown
- if ( !iconBitmapDisplayText )
- {
- aRequestedIconDisplayed = EFalse;
- }
-
- iActionImplementer->DispatchTimer( iWait );
-
- TRAPD( err,
- response = iActionImplementer->DisplayTextL( aText, aSimApplicationName,
- iconBitmapDisplayText, selfExplanatoryIcon,
- aSustainedText, aDuration, aWaitUserToClear );
- );
-
- if ( err != KErrNone )
- {
- response = ESatFailure;
- aRequestedIconDisplayed = EFalse;
- }
-
- if ( iActionImplementer->GetEndKey() )
- {
- response = ESatSessionTerminatedByUser;
- iActionImplementer->SetEndKey( EFalse );
- }
-
- iActionImplementer->SetCommandPending( EFalse );
-
- TFLOGSTRING2( "CSatUiActionPerformer::DisplayText exit, return: %d", \
- response )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::GetInkeyL
-// Checks type of the input wanted and calls right method
-// from the CSatUiViewAppUi class.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiActionPerformer::GetInkeyL(
- const TDesC& aText,
- const TSatCharacterSet aCharacterSet,
- TChar& aInput,
- const TBool /*aHelpIsAvailable*/,
- const TSatIconId& aIconId,
- TBool& aRequestedIconDisplayed,
- TUint& aDuration,
- const TBool aImmediateDigitResponse )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetInkey called" )
-
- TSatUiResponse response( ESatSuccess );
- aRequestedIconDisplayed = EFalse;
- TBuf<1> input;
-
- if ( aInput.IsAssigned() )
- {
- input.Fill( aInput, 1 );
- }
-
- if ( ( aCharacterSet == ESatYesNo ) && ( aText.Length() == 0 ) )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetInkey return ESatFailure" )
- return ESatFailure;
- }
-
- CFbsBitmap* iconBitmapGetInkey = NULL;
- iActionImplementer->SetCommandPending( ETrue );
-
- // If icon is available for command
- if ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) ||
- ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) &&
- ( iIconSupport ) )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetInkey have icon" )
- TIconCommand iconCommand ( EIconGetInkey );
-
- if ( ESatYesNo == aCharacterSet )
- {
- iconCommand = EIconGetYesNo;
- }
-
- iconBitmapGetInkey = FetchIcon( aIconId.iIdentifier,
- iconCommand );
- GetScalableBitmap( iconBitmapGetInkey, iconCommand,
- aRequestedIconDisplayed );
- }
-
- TBool selfExplanatory( EFalse );
-
- // Icon is self-explanatory
- if ( ESatSelfExplanatory == aIconId.iIconQualifier )
- {
- selfExplanatory = ETrue;
- }
-
- iActionImplementer->DispatchTimer( iWait );
-
- TRAPD( err,
-
- if ( ESatYesNo == aCharacterSet || aImmediateDigitResponse )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetInkey digit response" )
- response = iActionImplementer->GetYesNoL( aText, aCharacterSet,
- aInput, iconBitmapGetInkey, selfExplanatory, aDuration,
- aImmediateDigitResponse );
- }
- else //ESatCharSmsDefaultAlphabet, ESatCharUcs2Alphabet, ESatDigitOnly
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetInkey other conditions" )
- response = iActionImplementer->GetInputL(
- aText, aCharacterSet, input, 1, 1, EFalse, ETrue,
- iconBitmapGetInkey, selfExplanatory, aDuration );
-
- if ( ESatSuccess == response )
- {
- if ( input.Length() )
- {
- aInput = input[0];
- }
- }
- }
- );
-
- if ( err != KErrNone )
- {
- response = ESatFailure;
- }
-
- if ( iActionImplementer->GetEndKey() )
- {
- response = ESatSessionTerminatedByUser;
- iActionImplementer->SetEndKey( EFalse );
- }
- iActionImplementer->SetCommandPending( EFalse );
-
- TFLOGSTRING2( "CSatUiActionPerformer::GetInkey exit, return: %d", \
- response )
- return response;
- }
-
-// --------------------------------------------------------
-// CSatUiActionPerformer::GetInputL
-// Checks type of the input wanted and whether it should be
-// hidden and calls right method from the CSatUiViewAppUi class.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiActionPerformer::GetInputL(
- const TDesC& aText,
- const TSatCharacterSet aCharacterSet,
- TDes& aInput,
- const TInt aMinLength,
- const TInt aMaxLength,
- const TBool aHideInput,
- const TBool /*aHelpIsAvailable*/,
- const TSatIconId& aIconId,
- TBool& aRequestedIconDisplayed )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetInput called" )
- TSatUiResponse response( ESatSuccess );
- aRequestedIconDisplayed = EFalse;
-
- if ( ( ( aCharacterSet == ESatCharSmsDefaultAlphabet ) ||
- ( aCharacterSet == ESatCharUcs2Alphabet ) ) &&
- ( aHideInput ) )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetInput return ESatFailure" )
- return ESatFailure;
- }
-
- CFbsBitmap* iconBitmapGetInput = NULL;
- iActionImplementer->SetCommandPending( ETrue );
-
- // If icon is available for command
- if ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) ||
- ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) &&
- ( iIconSupport ) )
- {
- iconBitmapGetInput = FetchIcon( aIconId.iIdentifier, EIconGetInput );
- GetScalableBitmap( iconBitmapGetInput, EIconGetInput,
- aRequestedIconDisplayed );
- }
-
- TBool selfExplanatory( EFalse );
-
- // Icon is self-explanatory
- if ( ESatSelfExplanatory == aIconId.iIconQualifier )
- {
- selfExplanatory = ETrue;
- }
-
- iActionImplementer->DispatchTimer( iWait );
-
- TUint duration ( 0 );
- TRAPD( err,
- response = iActionImplementer->GetInputL(
- aText, aCharacterSet, aInput, aMinLength, aMaxLength,
- aHideInput, EFalse, iconBitmapGetInput, selfExplanatory,
- duration );
- );
-
- if ( err != KErrNone )
- {
- TFLOGSTRING2( "CSatUiActionPerformer::GetInput err:%d", err )
- response = ESatFailure;
- aRequestedIconDisplayed = EFalse;
- }
-
- if ( iActionImplementer->GetEndKey() )
- {
- response = ESatSessionTerminatedByUser;
- iActionImplementer->SetEndKey( EFalse );
- }
- iActionImplementer->SetCommandPending( EFalse );
-
- TFLOGSTRING2( "CSatUiActionPerformer::GetInput response:%d", response )
- TFLOGSTRING2( "CSatUiActionPerformer::GetInput aRequestedIconDisplayed:%d",
- aRequestedIconDisplayed )
- TFLOGSTRING( "CSatUiActionPerformer::GetInput exit" )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::SetUpMenuL
-// Calls the method from the CSatUiViewAppUi class to show
-// a SetUpMenu view.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiActionPerformer::SetUpMenuL(
- const TDesC& aText,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const TBool aHelpIsAvailable,
- const TSatIconId& aIconId,
- const CArrayFixFlat<TInt>* aMenuIcons,
- const enum TSatIconQualifier aIconListQualifier,
- const enum TSatSelectionPreference /*aSelectionPreference*/ )
- {
- TFLOGSTRING( "CSatUiActionPerformer::SetUpMenu called" )
- TSatUiResponse response( ESatSuccess );
- TBool selfExplanatoryItems( EFalse );
- CFbsBitmap* iconTitleBitmap = NULL;
- iActionImplementer->SetCommandPending( ETrue );
-
- if ( !aMenuItems.MdcaCount() ||
- ( KSatActiveProfileOffline ==
- iActionImplementer->ProfileState() ) )
- {
- iActionImplementer->SetCommandPending( EFalse );
- iActionImplementer->ShowNotAvailableNoteL();
- iActionImplementer->CloseSatUI();
- return response;
- }
-
- //if contextpane icon available for command
- if ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) ||
- ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) &&
- ( iIconSupport ) )
- {
- iconTitleBitmap = FetchIcon( aIconId.iIdentifier,
- EIconSetUpMenuContext );
- GetScalableBitmap( iconTitleBitmap, EIconSetUpMenuContext );
- }
-
- iItemIcons->ResetAndDestroy();
- TInt iconCount( 0 );
-
- if ( aMenuIcons )
- {
- iconCount = aMenuIcons->Count();
- }
-
- //if icons are available for item list
- if ( ( aMenuItems.MdcaCount() == iconCount ) &&
- ( ( aIconListQualifier == ESatSelfExplanatory ) ||
- ( aIconListQualifier == ESatNotSelfExplanatory ) ) &&
- ( iIconSupport ) )
- {
- TFLOGSTRING( "CSatUiActionPerformer::SetUpMenu have icon" )
- if ( aIconListQualifier == ESatSelfExplanatory )
- {
- selfExplanatoryItems = ETrue;
- }
-
- TBool continueLoop( ETrue );
- TInt count( 0 );
- for ( count = 0; ( count < iconCount ) && continueLoop; count++ )
- {
- CGulIcon* gulIcon = CGulIcon::NewLC();
- TUint8 itemIconId( STATIC_CAST( TUint8,
- aMenuIcons->operator[]( count ) ) );
- CFbsBitmap* iconItemBitmap = NULL;
- iconItemBitmap = FetchIcon( itemIconId, EIconSetUpMenuItems );
-
- if ( !iconItemBitmap &&
- ( aIconListQualifier == ESatSelfExplanatory ) )
- {
- TFLOGSTRING( "CSatUiActionPerformer::SetUpMenu \
- SelfExplanatory " )
- CleanupStack::PopAndDestroy( gulIcon ); // gulIcon
- iItemIcons->ResetAndDestroy();
- continueLoop = EFalse;
- }
- else
- {
- if ( !iconItemBitmap &&
- ( aIconListQualifier == ESatNotSelfExplanatory ) )
- {
- TFLOGSTRING( "CSatUiActionPerformer::SetUpMenu \
- not SelfExplanatory " )
- iconItemBitmap = new( ELeave )CFbsBitmap();
- }
- else
- {
- TFLOGSTRING( "CSatUiActionPerformer::SetUpMenu \
- other conditions " )
- GetScalableBitmap( iconItemBitmap, EIconSetUpMenuItems );
- }
-
- gulIcon->SetBitmap( iconItemBitmap );
- iItemIcons->AppendL( gulIcon );
- CleanupStack::Pop( gulIcon );
- }
- }
- TFLOGSTRING2( "CSatUiActionPerformer::SetUpMenu count: %d", count )
- }
-
- TRAPD( err,
- response = iActionImplementer->SetUpMenuL(
- aText, aMenuItems, aMenuItemNextActions, iconTitleBitmap,
- iItemIcons, selfExplanatoryItems, aHelpIsAvailable );
- );
-
- if ( KErrNone != err )
- {
- response = ESatFailure;
- }
-
- if ( iActionImplementer->GetEndKey() )
- {
- response = ESatSessionTerminatedByUser;
- iActionImplementer->SetEndKey( EFalse );
- }
-
- iActionImplementer->SetCommandPending( EFalse );
- TFLOGSTRING2( "CSatUiActionPerformer::SetUpMenu exit, \
- return:%i", response )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::SelectItemL
-// Calls the method from the CSatUiViewAppUi class to show
-// a SelectItem view.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiActionPerformer::SelectItemL(
- const TDesC& aText,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const TInt aDefaultItem,
- TUint8& aSelection,
- const TBool aHelpIsAvailable,
- const TSatIconId& aIconId,
- const CArrayFixFlat<TInt>* aMenuIcons,
- const enum TSatIconQualifier aIconListQualifier,
- TBool& aRequestedIconDisplayed,
- const enum TSatSelectionPreference /*aSelectionPreference*/ )
- {
- TFLOGSTRING( "CSatUiActionPerformer::SelectItem called" )
- TSatUiResponse response( ESatSuccess );
- aRequestedIconDisplayed = ETrue;
- TBool selfExplanatoryItems( EFalse );
-
- CFbsBitmap* iconTitleBitmap = NULL;
- iActionImplementer->SetCommandPending( ETrue );
-
- //if contextpane icon available for command
- if ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) ||
- ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) &&
- ( iIconSupport ) )
- {
- TFLOGSTRING( "CSatUiActionPerformer::SelectItem icon available" )
- iconTitleBitmap = FetchIcon( aIconId.iIdentifier,
- EIconSetUpMenuContext );
- GetScalableBitmap( iconTitleBitmap, EIconSetUpMenuContext,
- aRequestedIconDisplayed );
- }
-
- iItemIcons->ResetAndDestroy();
-
- TInt iconCount( 0 );
-
- if ( aMenuIcons )
- {
- iconCount = aMenuIcons->Count();
- }
-
- TFLOGSTRING2( "CSatUiActionPerformer::SelectItem iconCount:%d", iconCount )
-
- //if icons are available for item list
- if ( ( aMenuItems.MdcaCount() == iconCount ) &&
- ( ( aIconListQualifier == ESatSelfExplanatory ) ||
- ( aIconListQualifier == ESatNotSelfExplanatory ) ) &&
- ( iIconSupport ) )
- {
- TFLOGSTRING(
- "CSatUiActionPerformer::SelectItem icon available for item list" )
-
- if ( aIconListQualifier == ESatSelfExplanatory )
- {
- selfExplanatoryItems = ETrue;
- }
-
- TBool continueLoop( ETrue );
- TInt count( 0 );
- for ( count = 0; ( count < iconCount ) && continueLoop; count++ )
- {
- CGulIcon* gulIcon = CGulIcon::NewLC();
- TUint8 itemIconId = STATIC_CAST( TUint8,
- aMenuIcons->operator[]( count ) );
- CFbsBitmap* iconItemBitmap = NULL;
- iconItemBitmap = FetchIcon( itemIconId, EIconSetUpMenuItems );
-
- // when icon can't be received and is set to self explanatory, we
- // iqnore all icons and show only text
- if ( !iconItemBitmap &&
- ( aIconListQualifier == ESatSelfExplanatory ) )
- {
- TFLOGSTRING( "CSatUiActionPerformer::SelectItem \
- SelfExplanatory " )
- CleanupStack::PopAndDestroy( gulIcon ); // gulIcon
- iItemIcons->ResetAndDestroy();
- continueLoop = EFalse;
- aRequestedIconDisplayed = EFalse;
- }
- else
- {
- // when icon can't be received and is set to not self
- // explanatory, we replace it with empty icon
- if ( !iconItemBitmap &&
- ( aIconListQualifier == ESatNotSelfExplanatory ) )
- {
- TFLOGSTRING( "CSatUiActionPerformer::SelectItem \
- not SelfExplanatory " )
- iconItemBitmap = new( ELeave )CFbsBitmap();
- aRequestedIconDisplayed = EFalse;
- }
- // when icon was able to receive, we scale it
- // if every prior icon is correctly received
- else if ( aRequestedIconDisplayed )
- {
- TFLOGSTRING( "CSatUiActionPerformer::SelectItem \
- receive icon " )
- GetScalableBitmap( iconItemBitmap, EIconSetUpMenuItems,
- aRequestedIconDisplayed );
- }
- // if aRequestIconDisplayed is false, at least one prior icon
- // fetch had problems and thus we must report that by not
- // updating aRequestedIconDisplayed
- else
- {
- TFLOGSTRING( "CSatUiActionPerformer::SelectItem \
- aRequestIconDisplayed false " )
- GetScalableBitmap( iconItemBitmap, EIconSetUpMenuItems );
- }
-
- gulIcon->SetBitmap( iconItemBitmap );
- iItemIcons->AppendL( gulIcon );
- CleanupStack::Pop( gulIcon );
- }
- }
- TFLOGSTRING2( "CSatUiActionPerformer::SelectItem count: %d", count )
- }
-
- TRAPD( err,
- response = iActionImplementer->SelectItemL( aText, aMenuItems,
- aMenuItemNextActions, aDefaultItem, aSelection, iconTitleBitmap,
- iItemIcons, selfExplanatoryItems, aHelpIsAvailable );
- );
-
- if ( err != KErrNone )
- {
- response = ESatFailure;
- aRequestedIconDisplayed = EFalse;
- }
-
- if ( iActionImplementer->GetEndKey() )
- {
- response = ESatSessionTerminatedByUser;
- iActionImplementer->SetEndKey( EFalse );
- }
-
- iActionImplementer->SetCommandPending( EFalse );
-
- TFLOGSTRING2( "CSatUiActionPerformer::SelectItem response:%d", response )
- TFLOGSTRING( "CSatUiActionPerformer::SelectItem exit" )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::PlayTone
-// Checks type of the tone wanted and calls right method
-// from the CSatUiViewAppUi class.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiActionPerformer::PlayTone(
- const TDesC& aText,
- const TSatTone aTone,
- const TTimeIntervalMicroSeconds aDuration,
- const TSatIconId& aIconId,
- TBool& aRequestedIconDisplayed )
- {
- TFLOGSTRING( "CSatUiActionPerformer::PlayTone called" )
- TFLOGSTRING2( "CSatUiActionPerformer::PlayTone tone is %i", aTone )
-
- aRequestedIconDisplayed = EFalse;
-
- iSequence.Zero();
- TTimeIntervalMicroSeconds duration( aDuration.Int64() );
- iActionImplementer->SetCommandPending( ETrue );
- // This is used to determine zero length duration.
- const TTimeIntervalMicroSeconds zeroDuration( static_cast<TInt64>( 0 ) );
-
- CFbsBitmap* iconBitmap = NULL;
- // If icon is available for command
- if ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) ||
- ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) &&
- ( iIconSupport ) )
- {
- iconBitmap = FetchIcon( aIconId.iIdentifier, EIconPlayTone );
- GetScalableBitmap( iconBitmap, EIconPlayTone,
- aRequestedIconDisplayed );
- }
-
- TBool selfExplanatory( EFalse );
-
- // Icon is self-explanatory
- if ( ESatSelfExplanatory == aIconId.iIconQualifier )
- {
- selfExplanatory = ETrue;
- }
-
- // Check if the current Profile is Meeting
- TInt errCR( KErrNone );
- TInt profileId( 0 );
-
- CRepository* repository = NULL;
- TSatTone tone = aTone;
-
- // Which UID to monitor.
- TRAP( errCR, repository = CRepository::NewL( KCRUidProfileEngine ) );
-
- if ( !errCR && repository )
- {
- errCR = repository->StartTransaction(
- CRepository::EReadWriteTransaction );
- errCR = repository->Get( KProEngActiveProfile, profileId );
- }
-
- delete repository;
-
- TFLOGSTRING2( "CSatUiActionPerformer::PlayTone(): err = %d", errCR )
-
- TFLOGSTRING2( "SCSatUiActionPerformer::PlayTone() profileId: %d",
- profileId )
-
- switch ( tone )
- {
- case ESatGeneralBeep:
- case ESatPositiveTone:
- case ESatToneNotSet:
- if ( zeroDuration == duration )
- {
- duration = KSatDur170ms; // 170ms
- }
- iSequence.Copy( KGeneralBeep );
- break;
- case ESatNegativeTone:
- if ( zeroDuration == duration )
- {
- duration = KSatDur250ms; // 250ms
- }
- iSequence.Copy( KErrorTone );
- break;
- case ESatRadioPathNotAvailableCallDropped:
- if ( zeroDuration == duration )
- {
- duration = KSatDur1200ms; // 1200ms
- }
- iSequence.Copy( KRadioPathNotAvailable );
- break;
- case ESatRadioPathAcknowledge:
- if ( zeroDuration == duration )
- {
- duration = KSatDur200ms; // 200ms
- }
- iSequence.Copy( KRadioPathAck );
- break;
- case ESatDialTone:
- {
- if ( zeroDuration == duration )
- {
- TFLOGSTRING( "CSatUiActionPerformer::PlayTone() ESatDialTone" )
- return ESatCmdDataNotUnderstood;
- }
- else
- {
- iSequence.Copy( KNetToneSeqDial );
- }
- }
- break;
- case ESatCalledSubscriberBusy:
- {
- if ( zeroDuration == duration )
- {
- return ESatCmdDataNotUnderstood;
- }
- else
- {
- iSequence.Copy( KNetToneSeqNetBusy );
- }
- }
- break;
- case ESatCongestion:
- {
- if ( zeroDuration == duration )
- {
- return ESatCmdDataNotUnderstood;
- }
- else
- {
- iSequence.Copy( KNetToneSeqNetCongestion );
- }
- }
- break;
- case ESatErrorSpecialInfo:
- {
- if ( zeroDuration == duration )
- {
- return ESatCmdDataNotUnderstood;
- }
- else
- {
- iSequence.Copy( KNetToneSeqNetSpecialInformation );
- }
- }
- break;
- case ESatCallWaitingTone:
- {
- if ( zeroDuration == duration )
- {
- return ESatCmdDataNotUnderstood;
- }
- else
- {
- iSequence.Copy( KNetToneSeqNetCallWaiting );
- }
- }
- break;
- case ESatRingingTone:
- {
- if ( zeroDuration == duration )
- {
- return ESatCmdDataNotUnderstood;
- }
- else
- {
- iSequence.Copy( KNetToneSeqRingGoing );
- }
- }
- break;
- case ESatUserSelectedToneIncomingSpeech:
- case ESatUserSelectedToneIncomingSms:
- {
- // These are handled later.
- }
- break;
- default:
- TFLOGSTRING( "CSatUiActionPerformer::PlayTone Default" )
- return ESatCmdDataNotUnderstood;
- }
-
- TSatUiResponse response( ESatFailure );
-
- iActionImplementer->DispatchTimer( iWait );
-
- // ESatSClearScreenEvent doesn't occur,clear displaytext on screen.
- if ( EFalse == iClearScreenEvent )
- {
- // Clear displaytext on the screen.
- TFLOGSTRING( "CSatUiActionPerformer::PlayTone clear screen" )
- iActionImplementer->ClearScreen();
- }
-
- if ( 0 != iSequence.Length() )
- {
- TFLOGSTRING2( "CSatUiActionPerformer::PlayTone duration microseconds %d",
- aDuration.Int64() )
- TRAPD( err,
- response = iActionImplementer->PlayStandardToneL(
- aText,
- iSequence,
- duration,
- iconBitmap,
- selfExplanatory );
- );
-
- if ( KErrNone != err )
- {
- response = ESatFailure;
- TFLOGSTRING2( "CSatUiActionPerformer::PlayTone error %i", err )
- }
- TFLOGSTRING( "CSatUiActionPerformer::PlayTone StandardTone exit" )
- }
- else
- {
- TFLOGSTRING( "CSatUiActionPerformer::PlayTone length of sequence \
- is zero" )
-
- TRAPD( err,
- response = iActionImplementer->PlayUserSelectedToneL(
- aText,
- aDuration.Int64(),
- tone,
- iconBitmap,
- selfExplanatory );
- );
-
- if ( KErrNone != err )
- {
- response = ESatFailure;
- TFLOGSTRING2( "CSatUiActionPerformer::PlayTone error %i", err )
- }
-
- TFLOGSTRING( "CSatUiActionPerformer::PlayTone UserSelectedTone exit" )
- }
-
- if ( iActionImplementer->GetEndKey() )
- {
- response = ESatSessionTerminatedByUser;
- iActionImplementer->SetEndKey( EFalse );
- }
-
- iActionImplementer->SetCommandPending( EFalse );
-
- TFLOGSTRING( "CSatUiActionPerformer::PlayTone iClearScreenEvent false" )
- iClearScreenEvent = EFalse;
-
- TFLOGSTRING2( "CSatUiActionPerformer::PlayTone response: %d", response )
- TFLOGSTRING( "CSatUiActionPerformer::PlayTone exit" )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::ConfirmCommand
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiActionPerformer::ConfirmCommand(
- const TSatSQueryCommand aCommandId,
- const TSatAlphaIdStatus aAlphaIdStatus,
- const TDesC& aText,
- const TDesC& aAdditionalText,
- TBool& aActionAccepted,
- const TSatIconId& aIconId,
- TBool& aRequestedIconDisplayed,
- TBool& aTerminatedByUser )
- {
- TFLOGSTRING( "CSatUiActionPerformer::ConfirmCommand calling" )
- aRequestedIconDisplayed = EFalse;
- TInt error( KErrNone );
- TBool selfExplanatory( EFalse );
-
- // Icon is self-explanatory
- if ( ESatSelfExplanatory == aIconId.iIconQualifier )
- {
- selfExplanatory = ETrue;
- }
-
- aActionAccepted = ETrue;
-
- iActionImplementer->SetCommandPending( ETrue );
-
- iActionImplementer->StopShowWaitNote();
-
- CFbsBitmap* iconBitmap = NULL;
- // If icon is available for command
- if ( ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) ||
- ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) &&
- ( ( ESatOpenChannelQuery == aCommandId ) ||
- ( ESatSLaunchBrowserQuery == aCommandId ) ||
- ( ESatSSetUpCallQuery == aCommandId ) ) ) &&
- ( iIconSupport ) )
- {
- iconBitmap = FetchIcon( aIconId.iIdentifier,
- EIconConfirmCommand );
- GetScalableBitmap( iconBitmap, EIconConfirmCommand,
- aRequestedIconDisplayed );
- }
- TFLOGSTRING2( "CSatUiActionPerformer::ConfirmCommand aCommandId: %d",
- aCommandId )
- // Check quering command
- switch ( aCommandId )
- {
- case ESatOpenChannelQuery:
- {
- TFLOGSTRING( " Quering OpenChannel" )
- TRAP( error, iActionImplementer->ConfirmOpenChannelL(
- aText, aActionAccepted, iconBitmap, selfExplanatory ) );
- break;
- }
-
- case ESatSRefreshQuery:
- {
- TFLOGSTRING( " Quering Refresh" )
- TRAP(
- error, iActionImplementer->ConfirmRefreshL( aActionAccepted );
- );
- break;
- }
-
- case ESatSLaunchBrowserQuery:
- {
- TFLOGSTRING( " Quering LaunchBrowser" )
- HBufC* textHolder = NULL;
-
- TRAP( error,
- if ( ESatAlphaIdNull != aAlphaIdStatus )
- {
- TFLOGSTRING( " CSatUiActionPerformer::ConfirmCommand AlphaId \
- isn't null" )
- if ( ESatAlphaIdNotProvided == aAlphaIdStatus )
- {
- TFLOGSTRING( " CSatUiActionPerformer::ConfirmCommand \
- AlphaId not provided" )
- textHolder = StringLoader::LoadLC(
- R_QTN_SAT_CONF_LAUNCH_BROW,
- iActionImplementer->CoeEnv() );
- }
- else
- {
- TFLOGSTRING( " CSatUiActionPerformer::ConfirmCommand \
- AlphaId provided" )
- textHolder = HBufC::NewLC( aText.Length() );
- TPtr ptr = textHolder->Des();
- ptr.Append( aText );
- }
-
- iActionImplementer->ConfirmLaunchBrowserL( *textHolder,
- aActionAccepted, iconBitmap, selfExplanatory );
- // Clean textHolder
- CleanupStack::PopAndDestroy( textHolder );
- }
-
- ); // TRAP
- break;
- }
-
- case ESatSSendSmQuery:
- {
- TFLOGSTRING( " Quering SendSm" )
- TRAP( error, iActionImplementer->ConfirmSendL( aText,
- aActionAccepted, ESatUiConfirmSendSms ) );
- break;
- }
-
- case ESatSSendSsQuery:
- {
- TFLOGSTRING( " Quering SendSs" )
- TRAP( error, iActionImplementer->ConfirmSendL( aText,
- aActionAccepted, ESatUiConfirmSendSs ) );
- break;
- }
-
- case ESatSSendUssdQuery:
- {
- TFLOGSTRING( " Quering SendUssd" )
- TRAP( error, iActionImplementer->ConfirmSendL( aText,
- aActionAccepted, ESatUiConfirmSendUssd ) );
- break;
- }
-
- case ESatSSetUpCallQuery:
- {
- TFLOGSTRING( " Quering SetUpCall" )
- TRAP( error, iActionImplementer->ConfirmSetUpCallL(
- aText, aAdditionalText, aActionAccepted, iconBitmap,
- selfExplanatory ) );
- break;
- }
-
- default:
- {
- TFLOGSTRING( " Unknown quering command" )
- aActionAccepted = EFalse;
- }
- }
-
- if ( KErrNone != error )
- {
- TFLOGSTRING2( "CSatUiActionPerformer::ConfirmCommand error:%d", error )
- aActionAccepted = EFalse;
- }
- else if ( iActionImplementer->GetEndKey() )
- {
- TFLOGSTRING( "CSatUiActionPerformer::ConfirmCommand press endkey" )
- aTerminatedByUser = ETrue;
- aActionAccepted = EFalse;
- iActionImplementer->SetEndKey( EFalse );
- }
- else
- {
- // Meaningless else
- }
-
- iActionImplementer->SetCommandPending( EFalse );
- TFLOGSTRING( "CSatUiActionPerformer::ConfirmCommand exiting" )
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::Notification
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiActionPerformer::Notification(
- const TSatSNotifyCommand aCommandId,
- const TSatAlphaIdStatus aAlphaIdStatus,
- const TDesC& aText,
- const TSatIconId& aIconId,
- TBool& aRequestedIconDisplayed,
- const TSatControlResult aControlResult )
- {
- TFLOGSTRING( "CSatUiActionPerformer::Notification calling" )
- TSatUiResponse response = ESatSuccess;
- TInt error( KErrNone );
- aRequestedIconDisplayed = EFalse;
- iActionImplementer->SetCommandPending( ETrue );
-
- HBufC* textHolder = NULL;
-
- // In case where command id is SendDtmf and alphaID is not provided,
- // DTMF string to be sent is shown in dialog along with default text.
- if ( ( ESatSSendDtmfNotify == aCommandId ) &&
- ( ESatAlphaIdNotProvided == aAlphaIdStatus ) )
- {
- TFLOGSTRING( "CSatUiActionPerformer::Notification SendDtmf" )
- TRAP( error,
- TInt resource = DefaultAlphaIdL( aCommandId, aControlResult );
- // Now that resource is defined, get default text
- textHolder = StringLoader::LoadL(
- resource, aText )
- );
- }
- // Get default text, if alpha not provided or it is NULL
- else if ( aText.Length() == 0 && ESatAlphaIdNotNull != aAlphaIdStatus )
- {
- TFLOGSTRING( "CSatUiActionPerformer::Notification alpha is null" )
- TRAP( error,
- TInt resource = DefaultAlphaIdL( aCommandId, aControlResult );
- // Now that resource is defined, get default text
- textHolder = StringLoader::LoadL(
- resource, iActionImplementer->CoeEnv() )
- );
- }
- // else use given text
- else
- {
- TFLOGSTRING( "CSatUiActionPerformer::Notification alpha is provided" )
- TRAP( error,
- textHolder = HBufC::NewL( aText.Length() );
- TPtr ptr = textHolder->Des();
- ptr.Copy( aText );
- );
- }
-
- if ( !textHolder )
- {
- TRAP( error, textHolder = HBufC::NewL( 0 ) );
- }
-
- // No need to add textHolder into CleanupStack, since this is
- // not a leaving function
-
- if ( ( KErrNone == error || KErrArgument == error ) && textHolder )
- {
- TFLOGSTRING( "CSatUiActionPerformer::Notification none error " )
- CFbsBitmap* iconBitmap = NULL;
- TBool selfExplanatoryIcon( EFalse );
- // Fetch icon
- // Icons not supported for sending and receiving data
- if ( ( ( ( ESatSelfExplanatory == aIconId.iIconQualifier ) ||
- ( ESatNotSelfExplanatory == aIconId.iIconQualifier ) ) &&
- ( ( ESatSSendDataNotify != aCommandId ) &&
- ( ESatSReceiveDataNotify != aCommandId ) ) ) &&
- ( iIconSupport ) )
- {
- iconBitmap = FetchIcon( aIconId.iIdentifier,
- EIconNotification );
- GetScalableBitmap( iconBitmap, EIconNotification,
- aRequestedIconDisplayed );
- }
-
- if ( ESatSelfExplanatory == aIconId.iIconQualifier )
- {
- selfExplanatoryIcon = ETrue;
- }
-
- // Check notifying command
- switch ( aCommandId )
- {
- case ESatSSendDataNotify:
- {
- TFLOGSTRING( " Notifying SendData" )
- TRAP( error,
- iActionImplementer->ShowBIPNoteL(
- ESendDataIdentier, *textHolder, iconBitmap,
- selfExplanatoryIcon )
- );
- break;
- }
- case ESatSReceiveDataNotify:
- {
- TFLOGSTRING( " Notifying ReceiveData" )
- TRAP( error,
- iActionImplementer->ShowBIPNoteL(
- EReceiveDataIdentifier, *textHolder, iconBitmap,
- selfExplanatoryIcon )
- );
- break;
- }
- case ESatSCloseChannelNotify:
- {
- TFLOGSTRING( " Notifying CloseChannel" )
- iActionImplementer->StopShowWaitNote();
- TRAP( error,
- iActionImplementer->ShowBIPNoteL(
- ECloseChannelIdentifier, *textHolder, iconBitmap,
- selfExplanatoryIcon )
- );
- break;
- }
- case ESatSMoSmControlNotify:
- {
- TFLOGSTRING( " Notifying MoSmControl" )
- TRAP( error,
- iActionImplementer->MoSmControlL(
- *textHolder, aAlphaIdStatus )
- );
- iActionImplementer->SetCommandPending( EFalse );
- break;
- }
- case ESatSCallControlNotify:
- {
- TFLOGSTRING( " Notifying CallControl" )
- iActionImplementer->DispatchTimer( iWait );
- TRAP( error,
- iActionImplementer->CallControlL(
- *textHolder, aAlphaIdStatus )
- );
- iActionImplementer->SetCommandPending( EFalse );
- break;
- }
- case ESatSSendUssdNotify: // fall through
- case ESatSSendSsNotify:
- {
- TFLOGSTRING( " Notifying SendSs / SendUssd" )
- iActionImplementer->StopShowWaitNote();
- TRAP( error,
- if ( ( ESatAlphaIdNotNull == aAlphaIdStatus ) ||
- ( ESatAlphaIdNotProvided == aAlphaIdStatus ) )
- {
- iActionImplementer->ShowSsWaitNoteL( *textHolder,
- iconBitmap, selfExplanatoryIcon );
- }
- else
- {
- iActionImplementer->ShowWaitNoteWithoutDelayL();
- }
- );
- break;
- }
- case ESatSSendDtmfNotify:
- {
- TFLOGSTRING( " Notifying SendDtmf" )
- iActionImplementer->StopShowWaitNote();
- TRAP( error, response = iActionImplementer->ShowDtmfWaitNoteL(
- *textHolder, iconBitmap, selfExplanatoryIcon ) );
- break;
- }
- case ESatSSendSmsNotify:
- {
- TFLOGSTRING( " Notifying SendSms" )
- iActionImplementer->StopShowWaitNote();
-
- if ( KErrNone == error )
- {
- // Show Sms wait note
- TRAP( error,
- iActionImplementer->ShowSmsWaitNoteL( *textHolder,
- iconBitmap, selfExplanatoryIcon ) );
- }
-
- break;
- }
- default:
- {
- TFLOGSTRING( " Unkown notification" )
- response = ESatFailure;
- break;
- }
- }
- }
-
- delete textHolder;
- textHolder = NULL;
-
- if ( KErrNone != error )
- {
- TFLOGSTRING2( "CSatUiActionPerformer::Notification error:%d", error )
- response = ESatFailure;
- }
- else if ( iActionImplementer->GetEndKey() )
- {
- TFLOGSTRING( "CSatUiActionPerformer::Notification terminated by user" )
- response = ESatSessionTerminatedByUser;
- iActionImplementer->SetEndKey( EFalse );
- }
- else
- {
- TFLOGSTRING( "CSatUiActionPerformer::Notification success" )
- response = ESatSuccess;
- }
-
-
- TFLOGSTRING2( "CSatUiActionPerformer::Notification exiting, return: %d", \
- response )
- return response;
- }
-
-// -----------------------------------------------------------------------------
-// CSatUiActionPerformer::EventNotification
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CSatUiActionPerformer::EventNotification(
- const TSatSEvent aEventId,
- const TSatSEventStatus /*aEventStatus*/,
- const TInt /*aError*/ )
- {
- TFLOGSTRING( "CSatUiActionPerformer::EventNotification calling" )
-
- iActionImplementer->SetCommandPending( EFalse );
- switch ( aEventId )
- {
- case ESatSSmEndEvent:
- {
- TFLOGSTRING( " SmsEnd event" )
- iActionImplementer->StopShowWaitNote();
- break;
- }
- case ESatSClearScreenEvent:
- {
- TFLOGSTRING( " ClearScreen event" )
- iClearScreenEvent = ETrue;
- iActionImplementer->ClearScreen();
- break;
- }
- case ESatSsEndEvent:
- {
- TFLOGSTRING( " Ss end event" )
- iActionImplementer->StopShowWaitNote();
- break;
- }
- case ESatSsErrorEvent:
- {
- TFLOGSTRING( " Notifying Ss error" )
- // If error occurred (and Alpha ID provided), notify user
- TRAPD( err, iActionImplementer->ShowSsErrorNoteL() )
-
- if ( err )
- {
- TFLOGSTRING( " Error Note could not be created!" )
- }
- break;
- }
- case ESatSDtmfEndEvent:
- {
- TFLOGSTRING( " DTMF End event" )
- iActionImplementer->StopShowWaitNote();
- break;
- }
- case ESatSCloseSatUiAppEvent:
- {
- TFLOGSTRING( " Close UI event" )
- // Handle this similar way when End key is used
- if ( KSatActiveProfileOffline ==
- iActionImplementer->ProfileState() )
- {
- iActionImplementer->SetEndKey( ETrue );
- TRAP_IGNORE( iActionImplementer->ShowNotAvailableNoteL() )
- }
- iActionImplementer->CloseSatUI();
- break;
- }
- default:
- {
- TFLOGSTRING2( " Unknown event occured: %i", aEventId )
- break;
- }
- }
-
- TFLOGSTRING( "CSatUiActionPerformer::EventNotification exiting" )
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::DefaultAlphaIdL
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TInt CSatUiActionPerformer::DefaultAlphaIdL(
- const TSatSNotifyCommand aCommandId,
- const TSatControlResult aControlResult ) const
- {
- TFLOGSTRING( "CSatUiActionPerformer::DefaultAlphaIdL calling" )
- TInt resource( 0 );
-
- switch ( aCommandId )
- {
- case ESatSSendDataNotify: // SendData
- {
- TFLOGSTRING( " SendData default" )
- resource = R_QTN_SAT_CONF_SEND_DATA_BIP;
- break;
- }
-
- case ESatSReceiveDataNotify: // ReceiveData
- {
- TFLOGSTRING( " ReceiveData default" )
- resource = R_QTN_SAT_CONF_RECEIVE_DATA_BIP;
- break;
- }
-
- case ESatSCloseChannelNotify: // CloseChannel
- {
- TFLOGSTRING( " CloseChannel default" )
- resource = R_QTN_SAT_CONF_CLOSE_CHANNEL_BIP;
- break;
- }
-
- case ESatSMoSmControlNotify: // MoSmControl
- {
- if ( ESatNotAllowed == aControlResult )
- {
- TFLOGSTRING( " MoSmcontrol Not allowed default" )
- resource = R_QTN_SAT_MOSM_NOT_ALLOWED;
- }
- else if ( ESatAllowedWithModifications == aControlResult )
- {
- TFLOGSTRING( " MoSmcontrol Modified default" )
- resource = R_QTN_SAT_MOSM_MODIFIED;
- }
- else
- {
- TFLOGSTRING( " MoSmcontrol No default" )
- resource = 0; // Allowed, default alpha -> no info
- }
- break;
- }
-
- case ESatSCallControlNotify: // CallControl
- {
- if ( ESatNotAllowed == aControlResult )
- {
- TFLOGSTRING( " CallControl Not allowed default" )
- resource = R_QTN_SAT_CC_NOT_ALLOWED;
- }
- else if ( ESatAllowedWithModifications == aControlResult )
- {
- TFLOGSTRING( " CallControl Modified default" )
- resource = R_QTN_SAT_CC_MODIFIED;
- }
- else
- {
- TFLOGSTRING( " CallControl No default" )
- resource = 0; // Allowed, default alpha -> no info
- }
- break;
- }
-
- case ESatSSendSmsNotify: // SendSm
- {
- TFLOGSTRING( " SendSms default" )
- resource = R_QTN_SAT_SENDING_SMS;
- break;
- }
-
- case ESatSSendDtmfNotify: // SendDtmf
- {
- TFLOGSTRING( " SendDTMF default" )
- resource = R_QTN_SAT_NOTE_SENDING_DTMF_TEMPLATE;
- break;
- }
-
- default:
- {
- TFLOGSTRING2( " Unknown command id: %i", aCommandId )
- User::Leave( KErrArgument );
- }
- }
-
- TFLOGSTRING2( "CSatUiActionPerformer::DefaultAlphaIdL exiting, resource: \
- %d", resource )
- return resource;
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::FetchIcon
-// Fetch the icon information.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-CFbsBitmap* CSatUiActionPerformer::FetchIcon( const TUint8 aIconId,
- const enum TIconCommand aIconCommand )
- {
- TFLOGSTRING( "CSatUiActionPerformer::FetchIcon called" )
- CFbsBitmap* iconBitmap = NULL;
-
- TSize layoutSize( 0, 0 );
-
- // Set icon max size according the command
- if ( GetPopUpWindowIconSize( layoutSize, aIconCommand ) )
- {
- TFLOGSTRING( "CSatUiActionPerformer::FetchIcon max size" )
- TRAPD( err, iconBitmap = iIconHandler->FetchIconL( iSatSession,
- aIconId, layoutSize.iWidth, layoutSize.iHeight, iIconSupport ) );
-
- if ( err != KErrNone )
- {
- #if defined _DEBUG
- _LIT( KFetchIcon, "CSatUiActionPerformer::FetchIcon" );
- User::Panic( KFetchIcon, err );
- #endif
- }
- }
- else
- {
- TFLOGSTRING( "CSatUiActionPerformer::FetchIcon not supported" )
- }
-
- TFLOGSTRING( "CSatUiActionPerformer::FetchIcon exit" )
- return iconBitmap;
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::GetPopUpWindowIconSize
-// Get size for the icon in popup window.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TBool CSatUiActionPerformer::GetPopUpWindowIconSize( TSize& aSize,
- const TIconCommand aIconCommand )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetPopUpWindowIconSize called" )
-
- TRect rect( TSize( 0, 0 ) );
- TBool supported( ETrue );
- TAknLayoutRect opLogoLayout;
-
- TFLOGSTRING2( "CSatUiActionPerformer::GetPopUpWindowIconSize, \
- aIconCommand: %i", aIconCommand )
- // depending on the command, get correct layout and
- // Calculate rectangle based on LAF specification.
- switch ( aIconCommand )
- {
- case EIconSetUpMenuContext:
- {
- opLogoLayout.LayoutRect( rect,
- AknLayoutScalable_Avkon::context_pane_g1().LayoutLine() );
- break;
- }
- case EIconSetUpMenuItems:
- {
- opLogoLayout.LayoutRect( rect,
- AknLayout::List_pane_elements__single_graphic__Line_1() );
- break;
- }
- case EIconDisplayText:
- {
- // layout borrowed from video
- opLogoLayout.LayoutRect( rect, AknLayoutScalable_Avkon::
- popup_query_sat_info_window( 0 ).LayoutLine() );
- break;
- }
- case EIconPlayTone:
- {
- opLogoLayout.LayoutRect( rect, AknLayoutScalable_Avkon::
- popup_note_window_g1( 0 ).LayoutLine() );
- break;
- }
- case EIconConfirmCommand: // fall through
- case EIconGetInput: // fall through
- case EIconGetYesNo: // fall through
- case EIconGetInkey:
- {
- opLogoLayout.LayoutRect( rect, AknLayout::Icon( 0 ) );
- break;
- }
- case EIconNotification:
- {
- opLogoLayout.LayoutRect( rect, AknLayout::
- Wait_or_progress_note_pop_up_window_elements_Line_1() );
- break;
- }
- default:
- {
- TFLOGSTRING(
- "CSatUiActionPerformer::GetPopUpWindowIconSize not supported" )
- supported = EFalse;
- break;
- }
- }
-
- aSize = opLogoLayout.Rect().Size();
-
- // Layout for title icon gives incorrect width
- // but since it is square height can be set to width
- if ( EIconSetUpMenuContext == aIconCommand )
- {
- aSize.iWidth = aSize.iHeight;
- }
-
- TFLOGSTRING3( "CSatUiActionPerformer::GetPopUpWindowIconSize %dx%d exit",
- aSize.iWidth, aSize.iHeight )
- return supported;
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::GetScalableBitmap
-// Creates scalable bitmap
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiActionPerformer::GetScalableBitmapL(
- CFbsBitmap*& aBitMapToConvert,
- const TIconCommand aIconCommand )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap called" )
- TSize layoutSize( 0, 0 );
- CFbsBitmap* bitmap = NULL;
-
- // If scalable icon is supported in current layout then
- // makes the scalable icon.
- if ( GetPopUpWindowIconSize( layoutSize, aIconCommand ) )
- {
- bitmap = new ( ELeave ) CFbsBitmap;
- CleanupStack::PushL( bitmap );
- // CAknIcon takes ownership of bitmaps.
- CFbsBitmap* dupMain = new ( ELeave ) CFbsBitmap;
- CleanupStack::PushL( dupMain );
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap duplicate original" )
- User::LeaveIfError(
- dupMain->Duplicate( aBitMapToConvert->Handle() ) );
-
- CAknIcon* bitmapIcon = CAknIcon::NewL();
- // Mask is not set because skins are not used.
- // Ownership is transferred.
- bitmapIcon->SetBitmap( dupMain );
- CleanupStack::Pop( dupMain );
- CleanupStack::PushL( bitmapIcon );
- CAknIcon* scalableIcon = AknIconUtils::CreateIconL( bitmapIcon );
- CleanupStack::Pop( bitmapIcon );
- CleanupStack::PushL( scalableIcon );
-
- // fetch the size of icon
- TSize iconSize = dupMain->SizeInPixels();
-
- // At first we assume that width is scaled to layout maximum and
- // thus height is set so that the ratio of the image remains correct
-
- TInt newHeight =
- ( layoutSize.iWidth * iconSize.iHeight ) / iconSize.iWidth;
-
- // If the new height is larger than the height of the layout
- // we scale height to maximum and set the width so that the ratio of
- // the image remains correct
- if ( newHeight > layoutSize.iHeight )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap \
- larger than layout height" )
- layoutSize.iWidth =
- ( layoutSize.iHeight * iconSize.iWidth ) / iconSize.iHeight;
- }
- // If the new height is smaller or the same as the height of the
- // layout, the image is scaled according to it
- else
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap \
- smaller than layout height" )
- layoutSize.iHeight = newHeight;
- }
-
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap resize scaled icon" )
- AknIconUtils::SetSize( scalableIcon->Bitmap(), layoutSize );
-
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap duplicate scaled" )
- User::LeaveIfError( bitmap->Duplicate(
- scalableIcon->Bitmap()->Handle() ) );
-
- CleanupStack::PopAndDestroy( scalableIcon );
-
- // Uses scaled icon if scalable bitmap is supported.
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap Show Scaled" )
- delete aBitMapToConvert;
- aBitMapToConvert = bitmap;
- CleanupStack::Pop( bitmap );
- }
-
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::GetScalableBitmap
-// Handles scalable bitmap
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiActionPerformer::GetScalableBitmap(
- CFbsBitmap*& aBitMapToConvert,
- const TIconCommand aIconCommand,
- TBool& aRequestedIconDisplayed )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap called" )
-
- if ( aBitMapToConvert )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap bitmap \
- to convert" )
- // Scale icon
- TRAPD( err, GetScalableBitmapL( aBitMapToConvert, aIconCommand ); );
-
- if ( KErrNoMemory == err )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap memory \
- low" )
- // Memory low, command is done without icon
- delete aBitMapToConvert;
- aBitMapToConvert = NULL;
- aRequestedIconDisplayed = EFalse;
- }
- else
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap have \
- memory" )
- aRequestedIconDisplayed = ETrue;
- }
- }
- else
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap no bitmap" )
- // Icon not received
- aRequestedIconDisplayed = EFalse;
- }
-
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiActionPerformer::GetScalableBitmap
-// Handles scalable bitmap
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiActionPerformer::GetScalableBitmap(
- CFbsBitmap*& aBitMapToConvert,
- const TIconCommand aIconCommand )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap called" )
-
- if ( aBitMapToConvert )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap bitmap \
- to convert" )
- // Scale icon
- TRAPD( err, GetScalableBitmapL( aBitMapToConvert, aIconCommand ); );
-
- if ( KErrNoMemory == err )
- {
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap memory \
- low" )
- // Memory low, command is done without icon
- delete aBitMapToConvert;
- aBitMapToConvert = NULL;
- }
- }
-
- TFLOGSTRING( "CSatUiActionPerformer::GetScalableBitmap exit" )
- }
-
-// End of File
--- a/satui/satapp/SATUISrc/CSatUiApplication.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Defines CSatUiApplication class
-*
-*
-*/
-
-
-// INCLUDE FILES
-#include "CSatUiDocument.h"
-#include "CSatUiApplication.h"
-#include <eikpanic.h>
-#include <eikstart.h>
-#include "tflogger.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------
-// CSatUiApplication::AppDllUid
-// Returns application UID.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TUid CSatUiApplication::AppDllUid() const
- {
- TFLOGSTRING( "CSatUiApplication::AppDllUid() called" )
- return KUidSATUI;
- }
-
-// ---------------------------------------------------------
-// CSatUiApplication::CreateDocumentL
-// Creates the document object.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-CApaDocument* CSatUiApplication::CreateDocumentL()
- {
- TFLOGSTRING( "CSatUiApplication::CreateDocumentL() called" )
- CSatUiDocument* document = new ( ELeave ) CSatUiDocument( *this );
- CleanupStack::PushL( document );
- document->ConstructL();
- CleanupStack::Pop( document );
- TFLOGSTRING( "CSatUiApplication::CreateDocumentL() exit" )
- return( document );
- }
-
-// ================= OTHER EXPORTED FUNCTIONS ==============
-
-LOCAL_C CApaApplication* NewApplication()
- {
- TFLOGSTRING( "NewApplication() called" )
- return new CSatUiApplication;
- }
-
-GLDEF_C TInt E32Main()
- {
- TFLOGSTRING( "E32Main() called" )
- return EikStart::RunApplication(NewApplication);
- }
-
-//
-// ---------------------------------------------------------
-// Panic
-// The needed panic method.
-// Returns: void
-//
-GLREF_C void Panic(
- TEikPanic aPanic)
- {
- _LIT(KPanicText,"satui.app");
- User::Panic(KPanicText,aPanic);
- }
-
-// End of File
--- a/satui/satapp/SATUISrc/CSatUiDocument.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Defines CSatUiDocument class
-*
-*
-*/
-
-
-// INCLUDE
-#include <apgwgnam.h>
-#include <aknnotedialog.h>
-#include <aknstaticnotedialog.h>
-#include "CSatUiViewAppUi.h"
-#include "CSatUiActionPerformer.h"
-#include "CSatUiDocument.h"
-#include "tflogger.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// Symbian OS default constructor can leave.
-void CSatUiDocument::ConstructL()
- {
- TFLOGSTRING( "CSatUiDocument::ConstructL() called" )
- iActionPerformer = CSatUiActionPerformer::NewL();
- TFLOGSTRING( "CSatUiDocument::ConstructL() exit" )
- }
-
-// Destructor.
-CSatUiDocument::~CSatUiDocument()
- {
- TFLOGSTRING( "CSatUiDocument::~CSatUiDocument called" )
- delete iActionPerformer;
- TFLOGSTRING( "CSatUiDocument::~CSatUiDocument exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiDocument::CreateAppUiL
-// Constructs App Ui object.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-CEikAppUi* CSatUiDocument::CreateAppUiL()
- {
- TFLOGSTRING( "CSatUiDocument::CreateAppUiL called" )
- iApplicationUi = new (ELeave) CSatUiViewAppUi;
- // Set adapter into SetUpMenu view.
- iApplicationUi->SetAdapter( iActionPerformer->Adapter() );
-
- iActionPerformer->SetImplementer( iApplicationUi );
- TFLOGSTRING( "CSatUiDocument::CreateAppUiL exit" )
- return iApplicationUi;
- }
-
-// End of File
--- a/satui/satapp/SATUISrc/CSatUiMessageQueryIcon.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* CPicture derived class. For DisplayText to show icon and text
-*
-*
-*/
-
-
-// INCLUDE FILES
-#include <fbs.h>
-
-#include "CSatUiMessageQueryIcon.h"
-#include "tflogger.h"
-
-
-// ---------------------------------------------------------
-// CSatUiMessageQueryIcon::CSatUiMessageQueryIcon
-// Constructor
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-CSatUiMessageQueryIcon::CSatUiMessageQueryIcon( TSize aSize,
- CFbsBitmap& aBitmap ):
- iSizeInTwips( aSize ),
- iBitmap( &aBitmap )
- {
- }
-
-// Destructor
-CSatUiMessageQueryIcon::~CSatUiMessageQueryIcon()
- {
- delete iBitmap;
- iBitmap = NULL;
- }
-
-// ---------------------------------------------------------
-// CSatUiMessageQueryIcon::Draw
-// Draw the picture.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiMessageQueryIcon::Draw( CGraphicsContext& aGc,
- const TPoint& aTopLeft, const TRect& aClipRect,
- MGraphicsDeviceMap* aMap ) const
- {
- TFLOGSTRING( "CSatUiMessageQueryIcon::Draw called" )
- TRect bitmapRect=aMap->TwipsToPixels( TRect(TPoint(), iSizeInTwips ) );
- bitmapRect.Move( aTopLeft );
- aGc.Reset();
- aGc.SetClippingRect( aClipRect );
- aGc.DrawBitmap( bitmapRect, iBitmap );
- TFLOGSTRING( "CSatUiMessageQueryIcon::Draw exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiMessageQueryIcon::ExternalizeL
-// From CPicture
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiMessageQueryIcon::ExternalizeL( RWriteStream& /*aStream*/ ) const
- {
- }
-
-// ---------------------------------------------------------
-// CSatUiMessageQueryIcon::GetOriginalSizeInTwips
-// Get the picture's size in twips..
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiMessageQueryIcon::GetOriginalSizeInTwips( TSize& aSize ) const
- {
- TFLOGSTRING( "CSatUiMessageQueryIcon::GetOriginalSizeInTwips called" )
- aSize = iSizeInTwips;
- TFLOGSTRING( "CSatUiMessageQueryIcon::GetOriginalSizeInTwips exit" )
- }
-
--- a/satui/satapp/SATUISrc/CSatUiTextQueryDialog.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,283 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implements the feature for investigating length of the input. Softkeys
-* are set based on this information.
-*
-*
-*/
-
-
-// INCLUDE FILES
-#include <eikenv.h>
-#include <barsread.h>
-#include <badesca.h> // for descriptor arrays
-#include <e32std.h>
-#include <StringLoader.h>
-#include <AknQueryDialog.h>
-#include <aknQueryControl.h>
-#include <eikcapc.h>
-#include <avkon.hrh>
-#include <fepbase.h>
-#include <Aknnumseced.h>
-#include <aknedsts.h>
-#include <featmgr.h> // Used for FeatureManager
-
-#include "CSatUiTextQueryDialog.h"
-#include "tflogger.h"
-
-const TInt KSatMinTextLengthForT9 = 1;
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CSatUiTextQueryDialog::CSatUiTextQueryDialog(
- TDes& aDataText,
- const TTone aTone,
- TInt aMinLength,
- TInt aMaxLength) :
- CAknTextQueryDialog(aDataText, aTone),
- iTextMinLength(aMinLength)
- {
- SetMaxLength( aMaxLength );
- }
-
-// Destructor.
-CSatUiTextQueryDialog::~CSatUiTextQueryDialog()
- {
- }
-
-// ---------------------------------------------------------
-// CSatUiTextQueryDialog::HandleQueryEditorStateEventL
-// Show left CBA only if editor text is valid
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TBool CSatUiTextQueryDialog::HandleQueryEditorStateEventL(
- CAknQueryControl* aQueryControl,
- TQueryControlEvent /*aEventType*/,
- TQueryValidationStatus /*aStatus*/)
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::HandleQueryEditorStateEventL calling" )
- if ( aQueryControl->GetTextLength() < iTextMinLength )
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::HandleQueryEditorStateEventL \
- hide softkey" )
- // Hide both left and middle softkey
- ButtonGroupContainer().MakeCommandVisibleByPosition(
- CEikButtonGroupContainer::ELeftSoftkeyPosition, EFalse );
- ButtonGroupContainer().MakeCommandVisibleByPosition(
- CEikButtonGroupContainer::EMiddleSoftkeyPosition, EFalse );
- }
- else
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::HandleQueryEditorStateEventL \
- reveal softkey" )
- // Reveal both left and middle softkey
- ButtonGroupContainer().MakeCommandVisibleByPosition(
- CEikButtonGroupContainer::ELeftSoftkeyPosition, ETrue );
- ButtonGroupContainer().MakeCommandVisibleByPosition(
- CEikButtonGroupContainer::EMiddleSoftkeyPosition, ETrue );
- }
- TFLOGSTRING( "CSatUiTextQueryDialog::HandleQueryEditorStateEventL exiting" )
- return ETrue;
- }
-
-
-// ---------------------------------------------------------
-// CSatUiTextQueryDialog::PostLayoutDynInitL
-// Checks if min length was 0 and shows the OK key
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiTextQueryDialog::PostLayoutDynInitL()
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::PostLayoutDynInitL calling" )
- CAknTextQueryDialog::PostLayoutDynInitL();
- if ( iTextMinLength == 0 )
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::PostLayoutDynInitL \
- reveal softkey" )
- // Reveal both left and middle softkey
- ButtonGroupContainer().MakeCommandVisibleByPosition(
- CEikButtonGroupContainer::ELeftSoftkeyPosition, ETrue );
- ButtonGroupContainer().MakeCommandVisibleByPosition(
- CEikButtonGroupContainer::EMiddleSoftkeyPosition, ETrue );
- }
- TFLOGSTRING( "CSatUiTextQueryDialog::PostLayoutDynInitL exiting" )
- }
-
-// ---------------------------------------------------------
-// CSatUiTextQueryDialog::PreLayoutDynInitL
-// Initializations needed to accept sathidden keymap
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiTextQueryDialog::PreLayoutDynInitL()
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL calling" )
- CAknTextQueryDialog::PreLayoutDynInitL();
-
- // Get KFeatureIdAvkonApac value
- FeatureManager::InitializeLibL();
-
- TBool isApac( FeatureManager::FeatureSupported( KFeatureIdAvkonApac ) );
-
- FeatureManager::UnInitializeLib();
-
- CAknQueryControl* control = QueryControl();
-
- if ( control )
- {
- CCoeControl* controlByLayout = NULL;
-
- if ( EPinLayout == control->QueryType() )
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL \
- EPinLayout" )
- controlByLayout =
- QueryControl()->ControlByLayoutOrNull( EPinLayout );
- if ( controlByLayout )
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL \
- controlByLayout" )
- CEikSecretEditor* editor =
- ( CEikSecretEditor* ) controlByLayout;
- CAknEdwinState* editorState = new(ELeave) CAknEdwinState();
-
- editorState->SetFlags(
- EAknEditorFlagNoLRNavigation | EAknEditorFlagNoT9 );
- editorState->SetDefaultInputMode( EAknEditorNumericInputMode );
- editorState->SetCurrentInputMode( EAknEditorNumericInputMode );
- editorState->SetPermittedInputModes(
- EAknEditorNumericInputMode );
- editorState->SetDefaultCase( EAknEditorLowerCase );
- editorState->SetCurrentCase( EAknEditorLowerCase );
- editorState->SetPermittedCases(
- EAknEditorLowerCase|EAknEditorUpperCase );
- editorState->SetSpecialCharacterTableResourceId( 0 );
- editorState->SetNumericKeymap(
- EAknEditorSATHiddenNumberModeKeymap );
- editorState->SetObjectProvider( editor );
-
- // ...............
- MCoeFepAwareTextEditor_Extension1 *ext
- = ( MCoeFepAwareTextEditor_Extension1* )editor;
- CleanupStack::PushL( ext );
- CleanupStack::PushL( editorState );
- ext->SetStateTransferingOwnershipL( editorState, KNullUid );
- CleanupStack::Pop( editorState ); // editorState
- CleanupStack::Pop( ext ); // ext
- }
- }
- else if ( EDataLayout == control->QueryType() )
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL \
- EDataLayout" )
- controlByLayout =
- QueryControl()->ControlByLayoutOrNull( EDataLayout );
- if ( controlByLayout )
- {
- CEikEdwin* editor = ( CEikEdwin* ) controlByLayout;
- if ( !isApac )
- {
- if ( KSatMinTextLengthForT9 >= iTextMaxLength )
- {
- editor->SetAknEditorFlags( EAknEditorFlagNoT9 );
- }
- editor->AddFlagToUserFlags( EEikEdwinNoHorizScrolling );
- editor->AddFlagToUserFlags( EEikEdwinResizable );
- editor->SetAknEditorInputMode( EAknEditorTextInputMode );
- editor->SetAknEditorAllowedInputModes(
- EAknEditorTextInputMode );
- }
- else
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL \
- isApac ETrue" )
- if ( KSatMinTextLengthForT9 >= iTextMaxLength )
- {
- editor->SetAknEditorFlags( EAknEditorFlagNoT9 );
- }
- else
- {
- editor->SetAknEditorFlags( 0 );
- }
- }
- }
- }
- else if ( EPhoneLayout == control->QueryType() )
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL \
- EPhoneLayout" )
- controlByLayout =
- QueryControl()->ControlByLayoutOrNull( EPhoneLayout );
- if ( controlByLayout )
- {
- CEikEdwin* editor = ( CEikEdwin* ) controlByLayout;
-
- if ( !isApac )
- {
- editor->AddFlagToUserFlags( EEikEdwinNoHorizScrolling );
- editor->AddFlagToUserFlags( EEikEdwinResizable );
- editor->AddFlagToUserFlags( EEikEdwinAlternativeWrapping );
- }
- else
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL \
- isApac ETrue" )
- editor->SetAknEditorFlags( 0 );
- }
- }
- }
- }
- TFLOGSTRING( "CSatUiTextQueryDialog::PreLayoutDynInitL exiting" )
- }
-
-// ---------------------------------------------------------
-// CSatUiTextQueryDialog::NeedToDismissQueryL
-// Checks for hash key (workaround)
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TBool CSatUiTextQueryDialog::NeedToDismissQueryL( const TKeyEvent& /* aKeyEvent */ )
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::NeedToDismissQueryL calling-exiting" )
- return EFalse;
- }
-
-// ---------------------------------------------------------
-// CSatUiTextQueryDialog::OfferKeyEventL
-// Hash key accepted (workaround)
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TKeyResponse CSatUiTextQueryDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent,
- TEventCode aType )
- {
- TFLOGSTRING( "CSatUiTextQueryDialog::OfferKeyEventL calling" )
- TKeyEvent keyEvent = aKeyEvent;
- if ( aKeyEvent.iScanCode == EStdKeyHash && aType==EEventKey )
- {
- keyEvent.iScanCode = 0;
- }
-
- TFLOGSTRING( "CSatUiTextQueryDialog::OfferKeyEventL exiting" )
- return CAknTextQueryDialog::OfferKeyEventL( keyEvent, aType );
- }
-
-
-// End of File
--- a/satui/satapp/SATUISrc/CSatUiView.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1134 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Defines CSatUiView class
-*
-*
-*/
-
-
-// INCLUDE FILES
-#include <coecntrl.h> //for CCoeControl class
-#include <akntitle.h>
-#include <eikmenup.h>
-#include <barsread.h>
-#include <badesca.h> // for descriptor arrays
-#include <aknlists.h>
-#include <eiktxlbx.h>
-#include <akncontext.h> //for Context pane
-#include <fbs.h> //for iocn bitmap
-#include <StringLoader.h>
-#include <avkon.hrh>
-#include "satui.hrh"
-#include <SatUi.rsg>
-#include <AknIconArray.h>
-#include <gulicon.h>
-#include <eikclbd.h>
-#include <msatuiadapter.h>
-#include <aknnotedialog.h>
-#include <aknstaticnotedialog.h>
-#include <featmgr.h> // Used for FeatureManager
-#include <activitymanager.h>
-
-#include "CSatUiApplication.h"
-#include "CSatUiViewAppUi.h"
-#include "CSatUiViewContainer.h"
-#include "CSatUiView.h"
-#include "tflogger.h"
-
-// CONSTANTS
-// From Ui spec 60 sec delay user response
-const TInt KNoResponseFromUserDelay = 60;
-
-_LIT( KTab, "\t" );
-_LIT( KIconTab, "%d\t" );
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CSatUiView::CSatUiView( TBool aSetUpMenu, CSatUiViewAppUi* aAppUi,
- TBool aEmpty ):
- iSetUpMenu( aSetUpMenu ),
- iSatUiAppUi( aAppUi ),
- iModel( NULL ),
- iIconsOn( EFalse ),
- iIconStateChange( EFalse ),
- iSelfExplanatoryItems( EFalse ),
- iListBoxVisible( ETrue ),
- iEmpty( aEmpty )
- {
- }
-
-// Symbian OS default constructor can leave.
-void CSatUiView::ConstructL()
- {
- TFLOGSTRING( "CSatUiView::ConstructL() called" )
-
- TInt recource( R_SATUI_SELECTITEM_VIEW );
-
- if ( iSetUpMenu )
- {
- if ( iEmpty )
- {
- recource = R_SATUI_EMPTYMENU_VIEW;
- }
- else
- {
- recource = R_SATUI_SETUPMENU_VIEW;
- }
- }
-
- BaseConstructL( recource );
-
- iItemsIconArray = new(ELeave) CAknIconArray( 1 );
- TFLOGSTRING( "CSatUiView::ConstructL() exit" )
- }
-
-// Two-phased constructor.
-CSatUiView* CSatUiView::NewL( TBool aSetUpMenu,
- CSatUiViewAppUi* aAppUi,
- TBool aEmpty )
- {
- TFLOGSTRING( "CSatUiView::NewL called" )
- CSatUiView* self = new ( ELeave ) CSatUiView( aSetUpMenu, aAppUi, aEmpty );
-
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
- TFLOGSTRING( "CSatUiView::NewL exit" )
- return self;
- }
-
-// Destructor.
-CSatUiView::~CSatUiView()
- {
- TFLOGSTRING( "CSatUiView::~CSatUiView() called" )
-
- delete iContainer;
- delete iMenuItemNextActions;
- delete iMenuItems;
-
- if ( iItemsIconArray )
- {
- iItemsIconArray->ResetAndDestroy();
- delete iItemsIconArray;
- iItemsIconArray = NULL;
- }
-
- TFLOGSTRING( "CSatUiView::~CSatUiView() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiView::SetTitle
-// Sets the title needed for showing the view.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiView::SetTitle( const HBufC* aTitle )
- {
- TFLOGSTRING( "CSatUiView::SetTitle called" )
- iTitle = aTitle;
- TFLOGSTRING( "CSatUiView::SetTitle exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiView::SetIconL
-// Sets the icon needed to the view.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiView::SetIconL( const CFbsBitmap* aIconBitmap )
- {
- TFLOGSTRING( "CSatUiView::SetIconL called" )
- if ( StatusPane()->PaneCapabilities( TUid::Uid(
- EEikStatusPaneUidContext ) ).IsPresent() )
- {
- TFLOGSTRING( "CSatUiView::SetIconL pane is present" )
- CEikStatusPane* sp=iEikonEnv->AppUiFactory()->StatusPane();
- CleanupStack::PushL( sp );
- CAknContextPane* contextPane=( CAknContextPane * )sp->
- ControlL( TUid::Uid( EEikStatusPaneUidContext ) );
- CleanupStack::Pop( sp ); //sp
- if ( aIconBitmap ) //icon from SIM
- {
- TFLOGSTRING( "CSatUiView::SetIconL icon from SIM" )
- contextPane->SetPicture( aIconBitmap );
- }
- else //set default icon
- {
- TFLOGSTRING( "CSatUiView::SetIconL default icon" )
- contextPane->SetPictureToDefaultL();
- }
- }
- TFLOGSTRING( "CSatUiView::SetIconL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiView::SetItemsIconL
-// Sets the items icon array.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiView::SetItemsIconL(
- const CAknIconArray* aItemsIconArray,
- const TBool aSelfExplanatoryItems )
- {
- TFLOGSTRING( "CSatUiView::SetItemsIconL called" )
- iItemsIconArray->ResetAndDestroy();
- //if items icon array available
- if ( aItemsIconArray->Count() )
- {
- TFLOGSTRING( "CSatUiView::SetItemsIconL icon array available" )
- if( !iIconsOn )
- {
- //last view not with icons
- iIconStateChange = ETrue;
- }
- iItemsIconArray->InsertL( 0, &aItemsIconArray->operator[]( 0 ),
- aItemsIconArray->Count() );
- iIconsOn = ETrue;
- iSelfExplanatoryItems = aSelfExplanatoryItems;
- }
- else
- {
- TFLOGSTRING( "CSatUiView::SetItemsIconL icon array not available" )
- if( iIconsOn )
- {
- TFLOGSTRING( "CSatUiView::SetItemsIconL iIconsOn true" )
- iIconStateChange = ETrue;
- }
- else
- {
- TFLOGSTRING( "CSatUiView::SetItemsIconL iIconsOn false" )
- iIconStateChange = EFalse;
- }
- iIconsOn = EFalse;
- iSelfExplanatoryItems = EFalse;
- }
- TFLOGSTRING( "CSatUiView::SetItemsIconL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiView::SetItemsL
-// Sets all parameters needed for showing the view.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiView::SetItemsL(
- HBufC* aTitle,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const TBool aHelpIsAvailable )
- {
- TFLOGSTRING( "CSatUiView::SetItemsL called" )
- iKeypadBlocked = EFalse;
-
- delete iMenuItemNextActions;
- iMenuItemNextActions = NULL;
-
- if( !iMenuItems )
- {
- iMenuItems = new ( ELeave ) CDesCArrayFlat( 1 );
- }
- // This reset is required
- iMenuItems->Reset();
-
- // Remove NULL characters from title
- TPtr titleptr = aTitle->Des();
- TInt nullLocation;
- while ( ( nullLocation = titleptr.Locate( NULL ) ) >= 0 )
- {
- titleptr.Delete( nullLocation, 1 );
- }
-
- iTitle = aTitle;
-
- //no memory is allocated to the array buffers here:
- iMenuItemNextActions = new ( ELeave ) CArrayFixFlat<TSatAction>( 1 );
-
- iNItems = aMenuItems.MdcaCount();
-
- TBool nextActions( EFalse );
-
- TFLOGSTRING2( "CSatUiView::SetItemsL, iNItems: %d", iNItems )
- if ( iNItems == ( aMenuItemNextActions->Count() ) )
- {
- nextActions = ETrue;
- }
-
- if (iNItems > 0)
- {
- for ( TInt i(0); i < iNItems; i++ )
- {
- TInt itemLength = aMenuItems.MdcaPoint(i).Length();
- HBufC* tmpBuf = HBufC::NewLC(
- aMenuItems.MdcaPoint(i).Length() + KTabLength );
- TPtr tmpPtr( tmpBuf->Des() );
-
- // Item text
- TPtrC16 text ( aMenuItems.MdcaPoint(i) );
-
- // Needed for NULL check
- HBufC* correctText = HBufC::NewLC( itemLength );
- TPtr ptr = correctText->Des();
-
- // Check item text through
- for ( TInt j(0); j < itemLength; j++)
- {
- TChar ch = text[j];
- // Remove NULL characters from item text
- if ( ch )
- {
- ptr.Append( ch );
- }
- }
-
- //if view includes icons
- if( iIconsOn )
- {
- TFLOGSTRING( "CSatUiView::SetItemsL iIconsOn true" )
- //with icons
- TBuf<KTabLength> lineTab;
- lineTab.Format( KIconTab,i );
- tmpPtr.Copy( lineTab );
- }
- else
- {
- TFLOGSTRING( "CSatUiView::SetItemsL iIconsOn false" )
- //without icons
- tmpPtr.Copy( KTab );
- }
-
- if( !iSelfExplanatoryItems )
- {
- //icons not selfexplanatory show text
- tmpPtr.Append( ptr );
- }
-
- //memory is allocated here:
- TRAPD( err, iMenuItems->AppendL(tmpPtr) );
-
- if ( err )
- {
- iMenuItems->Reset();
- iMenuItemNextActions->Reset();
- CleanupStack::PopAndDestroy( correctText );
- CleanupStack::PopAndDestroy( tmpBuf ); //tmpBuf, correctText
- TFLOGSTRING( "CSatUiView::SetItemsL having error" )
- return ESatFailure;
- }
- TFLOGSTRING2( "CSatUiView::SetItemsL tmpPtr=%S", &tmpPtr )
- CleanupStack::PopAndDestroy( correctText );
- CleanupStack::PopAndDestroy( tmpBuf ); //tmpBuf, correctText
- //select options menu command
- if ( nextActions )
- {
- TRAP( err, iMenuItemNextActions->AppendL(
- aMenuItemNextActions->At( i ) ) );
-
- if ( err )
- {
- iMenuItems->Reset();
- iMenuItemNextActions->Reset();
- TFLOGSTRING( "CSatUiView::SetItemsL return ESatFailure" )
- return ESatFailure;
- }
- }
- }
- }
-
- iHelpIsAvailable = aHelpIsAvailable;
-
- TFLOGSTRING( "CSatUiView::SetItemsL return ESatSuccess" )
- return ESatSuccess;
- }
-
-// ---------------------------------------------------------
-// CSatUiView::SetUpMenuL
-// Checks whether the same view should be refreshed or another
-// one activated and do it.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiView::SetUpMenuL(
- HBufC* aTitle,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const TBool aHelpIsAvailable )
- {
- TFLOGSTRING( "CSatUiView::SetUpMenuL called" )
- iDefaultItem = 0; //could be iSelection
-
- CSatUiView* setUpMenuView = STATIC_CAST( CSatUiView*,
- AppUi()->View( KSetUpMenuViewId ) );
-
- TVwsViewId setUpMenuViewId( KUidSATUI, KSetUpMenuViewId );
- TVwsViewId viewId;
-
- AppUi()->GetActiveViewId( viewId );
-
- setUpMenuView->SetItemsL( aTitle, aMenuItems, aMenuItemNextActions,
- aHelpIsAvailable );
-
- // Incase empty view is created before the actual SetUpMenu view
- // CBA resource has to be updated
- if ( iEmpty )
- {
- TFLOGSTRING( "CSatUiView::SetUpMenuL empty view" )
- iEmpty = EFalse;
- CEikButtonGroupContainer* cba = Cba();
-
- if ( cba )
- {
- TFLOGSTRING( "CSatUiView::SetUpMenuL cba" )
- cba->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_EXIT );
- cba->DrawDeferred();
- }
- }
-
- if ( viewId.iAppUid == setUpMenuViewId.iAppUid )
- {
- TFLOGSTRING( "CSatUiView::SetUpMenuL activate SetUpMenuView" )
- //Activate SetUpMenuView
- AppUi()->ActivateLocalViewL( KSetUpMenuViewId );
-
- if ( iContainer )
- {
- RefreshL();
- }
- }
- TFLOGSTRING( "CSatUiView::SetUpMenuL return ESatSuccess" )
- return ESatSuccess;
- }
-
-// ---------------------------------------------------------
-// CSatUiView::SetAdapter
-// Sets a pointer to MSatUiAdapter provided by SatCli.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiView::SetAdapter( MSatUiAdapter* aAdapter )
- {
- TFLOGSTRING( "CSatUiView::SetAdapter called" )
- iAdapter = aAdapter;
- TFLOGSTRING( "CSatUiView::SetAdapter exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiSelectItemView::SelectItemL
-// Checks whether the same view should be refreshed or another
-// one activated and do it.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiView::SelectItemL(
- HBufC* aTitle,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const TInt aDefaultItem, TUint8& aSelection,
- const TBool aHelpIsAvailable )
- {
- TFLOGSTRING( "CSatUiView::SelectItemL called" )
- iDefaultItem = aDefaultItem;
- TFLOGSTRING2( "CSatUiView::SelectItemL in aDefaultItem = %d", aDefaultItem )
- CSatUiView* selectItemView = STATIC_CAST( CSatUiView*,
- AppUi()->View( KSelectItemViewId ) );
-
- TVwsViewId selectItemViewId( KUidSATUI,KSelectItemViewId );
- TVwsViewId viewId;
-
- AppUi()->GetActiveViewId( viewId );
-
- selectItemView->SetItemsL( aTitle, aMenuItems, aMenuItemNextActions,
- aHelpIsAvailable);
-
- if ( viewId.iAppUid == selectItemViewId.iAppUid )
- {
- TFLOGSTRING( "CSatUiView::SelectItemL activate SelectItemview" )
- //Activate SelectItemview
- AppUi()->ActivateLocalViewL( KSelectItemViewId );
-
- if ( iContainer )
- {
- RefreshL();
- }
- }
-
- iResponse = ESatSuccess;
-
- iNoResponseFromUserAfterDelay = EFalse;
-
- //activitymanager for wait user actions
- CUserActivityManager* activityManager =
- CUserActivityManager::NewL( EPriorityNormal );
-
- CleanupStack::PushL( activityManager );
-
- User::ResetInactivityTime();
- activityManager->Start( TTimeIntervalSeconds( KNoResponseFromUserDelay ),
- TCallBack( DispatchUserInactive, this ), 0 );
-
- if ( !iWait.IsStarted() )
- {
- TFLOGSTRING( "CSatUiView::SelectItemL start iWait" )
- iSatUiAppUi->DispatchTimer( iWait );
- iWait.Start();
- }
-
- CleanupStack::PopAndDestroy( activityManager ); // activityManager
-
- if ( iNoResponseFromUserAfterDelay )
- {
- iResponse = ESatNoResponseFromUser;
- }
-
- aSelection= STATIC_CAST(TUint8,iSelection);
- TFLOGSTRING2( "CSatUiView::SelectItemL out aDefaultItem = %d", aDefaultItem )
- TFLOGSTRING2( "CSatUiView::SelectItemL exit, return: %d", iResponse )
- return iResponse;
- }
-
-// ---------------------------------------------------------
-// CSatUiView::Id
-// Returns the id of the view.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TUid CSatUiView::Id() const
- {
- TFLOGSTRING( "CSatUiView::Id() called" )
- //this should be an UID.
- if ( iSetUpMenu )
- {
- TFLOGSTRING( "CSatUiView::Id() setupmenu-exit" )
- return KSetUpMenuViewId;
- }
- else
- {
- TFLOGSTRING( "CSatUiView::Id() selectitem-exit" )
- return KSelectItemViewId;
- }
- }
-
-// ---------------------------------------------------------
-// CSatUiView::HandleCommandL
-// Called by the UI framework when a command has been issued.
-// A command can originate by pressing a softkey or
-// by selection of the options menu item.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiView::HandleCommandL(
- TInt aCommandId)
- {
- TFLOGSTRING( "CSatUiView::HandleCommandL called" )
- if ( iKeypadBlocked || ( EAknSoftkeyEmpty == aCommandId ) )
- {
- return;
- }
-
- TFLOGSTRING2( "CSatUiView::HandleCommandL iNItems: %d", iNItems )
- if ( iNItems > 0 )
- {
- iSelection = iContainer->ListBox()->CurrentItemIndex();
- }
-
- TBool taskSwapper ( EFalse );
-
- TFLOGSTRING2( "CSatUiView::HandleCommandL aCommandId: %d", aCommandId )
- switch ( aCommandId )
- {
- case ESatUiCmdSelect:
- {
- iSatUiAppUi->HelpStatus( EFalse );
-
- if ( iSetUpMenu )
- {
- TFLOGSTRING( "CSatUiView::HandleCommandL setupmenu" )
- iSatUiAppUi->ShowWaitNoteL();
- iAdapter->MenuSelection( iSelection, EFalse );
- }
- else
- {
- TFLOGSTRING( "CSatUiView::HandleCommandL others" )
- iResponse = ESatSuccess;
- iWait.AsyncStop();
- }
- break;
- }
-
- case EAknSoftkeyBack:
- {
- iResponse = ESatBackwardModeRequestedByUser;
- iWait.AsyncStop();
- break;
- }
-
- case EAknSoftkeyExit:
- case EEikCmdExit:
- {
- AknSelectionService::HandleMarkableListProcessCommandL(
- EAknCmdExit, iContainer->ListBox() );
- STATIC_CAST( CSatUiViewAppUi*,
- AppUi())->HandleCommandL( EEikCmdExit );
- break;
- }
- case ESatUiCmdExit:
- {
- TFLOGSTRING( "CSatUiView::HandleCommandL ESatUiCmdExit" )
- iResponse = ESatSessionTerminatedByUser;
- if ( iWait.IsStarted() )
- {
- iWait.AsyncStop();
- TFLOGSTRING( "CSatUiView::HandleCommandL iWait stopped" )
- }
- break;
- }
- case EAknCmdHelp:
- if ( iHelpIsAvailable )
- {
- TFLOGSTRING( "CSatUiView::HandleCommandL help available" )
- iSatUiAppUi->HelpStatus( ETrue );
-
- if ( iSetUpMenu )
- {
- TFLOGSTRING( "CSatUiView::HandleCommandL setupmenu" )
- iAdapter->MenuSelection( iSelection, ETrue );
- }
- else
- {
- TFLOGSTRING( "CSatUiView::HandleCommandL others" )
- iResponse = EHelpRequestedByUser;
- iWait.AsyncStop();
- }
- }
- else
- {
- TFLOGSTRING( "CSatUiView::HandleCommandL help not available" )
- // Show Help
- STATIC_CAST( CSatUiViewAppUi*,
- AppUi())->HandleCommandL( EAknCmdHelp );
- }
- break;
- case EAknCmdTaskSwapper:
- {
- taskSwapper = ETrue;
- break;
- }
- default:
- break;
- }
-
- if ( ( ( iNItems > 0 )) && ( iContainer->ListBox()->ScrollBarFrame() ) )
- {
- iContainer->ListBox()->ScrollBarFrame()->MoveVertThumbTo(
- iSelection );
- }
-
- if ( ( ( EAknCmdHelp == aCommandId ) && !iHelpIsAvailable ) || taskSwapper )
- {
- TFLOGSTRING( "CSatUiView::HandleCommandL iKeypadBlocked false" )
- iKeypadBlocked = EFalse;
- }
- else
- {
- TFLOGSTRING( "CSatUiView::HandleCommandL iKeypadBlocked true" )
- iKeypadBlocked = ETrue;
- }
-
- TFLOGSTRING( "CSatUiView::HandleCommandL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiView::DynInitMenuPaneL
-// Update the options menu when opened.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiView::DynInitMenuPaneL(
- TInt aResourceId,
- CEikMenuPane* aMenuPane )
- {
- TFLOGSTRING( "CSatUiView::DynInitMenuPaneL called" )
- if (( aResourceId == R_SATUI_SETUPMENU_OPTIONS_MENU ) ||
- ( aResourceId == R_SATUI_SELECTITEM_OPTIONS_MENU ) )
- {
-
- FeatureManager::InitializeLibL();
-
- if ( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
- {
- aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
- }
-
- FeatureManager::UnInitializeLib();
-
- TInt nItems( aMenuPane->NumberOfItemsInPane() );
-
- TFLOGSTRING2( "CSatUiView::DynInitMenuPaneL nItems: %d", nItems )
- if ( nItems > 0 ) //number of items in the options menu
- {
- TFLOGSTRING2( "CSatUiView::DynInitMenuPaneL iNItems: %d", \
- iNItems )
- if ( iNItems > 0 ) //number of items in the main pane
- {
- TInt sItem = iContainer->ListBox()->CurrentItemIndex();
- TFLOGSTRING2( "CSatUiView::DynInitMenuPaneL sItem: %d", sItem )
- HBufC* menuItemNextActions;
- TInt resource( R_QTN_SAT_OPTION_SELECT );
-
- if ( iMenuItems->MdcaCount() ==
- iMenuItemNextActions->Count() )
- {
- switch ( ( *iMenuItemNextActions )[ sItem ] )
- {
- case ESatSetUpCallAction:
- {
- TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \
- setupcall" )
- resource = R_QTN_SAT_OPTION_CALL;
- break;
- }
- case ESatSendSsAction: // flow through
- case ESatSendUssdAction: // flow through
- case ESatSendSmAction:
- {
- TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \
- sendss,sendussd or sendsm" )
- resource = R_QTN_SAT_OPTION_SEND;
- break;
- }
- case ESatPlayToneAction:
- {
- TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \
- playtone" )
- resource = R_QTN_SAT_OPTION_PLAY_TONE;
- break;
- }
- case ESatDisplayTextAction:
- {
- TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \
- displaytext" )
- resource = R_QTN_SAT_OPTION_READ;
- break;
- }
- case ESatSetUpMenuAction:
- case ESatSelectItemAction:
- {
- TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \
- setupmenu or selectitem" )
- resource = R_QTN_SAT_OPTION_OPEN;
- break;
- }
- case ESatLaunchBrowserAction:
- {
- TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \
- launchbrowser" )
- resource = R_QTN_SAT_OPTION_GOTO;
- break;
- }
- default:
- {
- TFLOGSTRING( "CSatUiView::DynInitMenuPaneL \
- others" )
- resource = R_QTN_SAT_OPTION_SELECT;
- break;
- }
- }
- }
- menuItemNextActions = StringLoader::LoadLC(
- resource, iCoeEnv );
- aMenuPane->SetItemTextL( ESatUiCmdSelect,
- *menuItemNextActions );
- aMenuPane->SetItemSpecific( ESatUiCmdSelect, ETrue );
- // menuItemNextActions
- CleanupStack::PopAndDestroy( menuItemNextActions );
- }
- else
- {
- aMenuPane->SetItemDimmed( ESatUiCmdSelect, ETrue );
- aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
- }
- }
- }
- TFLOGSTRING( "CSatUiView::DynInitMenuPaneL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiView::HandleListBoxEventL
-// Handles events that occur by selection of the menu item.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiView::HandleListBoxEventL(
- CEikListBox* /*aListBox*/,
- TListBoxEvent aEventType)
- {
- TFLOGSTRING( "CSatUiView::HandleListBoxEventL called" )
-
- if ( iKeypadBlocked ||
- ( EEventEnterKeyPressed != aEventType &&
- EEventItemSingleClicked != aEventType ) )
- {
- return;
- }
-
- TFLOGSTRING2( "CSatUiView::HandleListBoxEventL aEventType: %d", \
- aEventType )
- switch ( aEventType )
- {
- case EEventItemSingleClicked:
- case EEventEnterKeyPressed:
-
- iSatUiAppUi->HelpStatus( EFalse );
-
- if ( iNItems > 0 )
- {
- iSelection = iContainer->ListBox()->CurrentItemIndex();
- }
-
- if ( iSetUpMenu )
- {
- TFLOGSTRING( "CSatUiView::HandleListBoxEventL setupmenu" )
- iSatUiAppUi->ShowWaitNoteL();
- iAdapter->MenuSelection( iSelection, EFalse );
- }
- else
- {
- TFLOGSTRING( "CSatUiView::HandleListBoxEventL others" )
- iResponse = ESatSuccess;
-
- iWait.AsyncStop();
- }
- break;
-
- default:
- break;
- }
-
- iKeypadBlocked = ETrue;
-
- TFLOGSTRING( "CSatUiView::HandleListBoxEventL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiView::DoActivateL
-// Called by the view framework when this view is activated.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiView::DoActivateL(
- const TVwsViewId& PrevViewId,
- TUid /*aCustomMessageId*/,
- const TDesC8& /*aCustomMessage*/)
- {
- TFLOGSTRING( "CSatUiView::DoActivateL called" )
-
- TVwsViewId viewId;
- AppUi()->GetActiveViewId( viewId );
-
- if ( ( viewId == PrevViewId ) && ( !iIconStateChange ) )
- {
- TFLOGSTRING( "CSatUiView::DoActivateL refresh" )
- //if selectitems and icon state changed
- RefreshL();
- }
- else
- {
- TFLOGSTRING( "CSatUiView::DoActivateL draw" )
- iContainer = CSatUiViewContainer::NewL( iIconsOn, this );
-
- iContainer->SetMopParent( this );
- iContainer->ListBox()->SetListBoxObserver( this );
-
- iModel = STATIC_CAST( CTextListBoxModel*,
- iContainer->ListBox()->Model() );
-
- if ( !iMenuItems )
- {
- //no memory is allocated to the array buffers here:
- iMenuItems = new (ELeave) CDesCArrayFlat(1);
- iMenuItemNextActions = new (ELeave) CArrayFixFlat<TSatAction>( 1 );
- }
-
- iRect = ClientRect();
-
- AppUi()->AddToStackL( iContainer );
-
- DrawL();
- }
- TFLOGSTRING( "CSatUiView::DoActivateL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiView::DoDeactivateL
-// Called by the view framework when this view is deactivated.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiView::DoDeactivate()
- {
- TFLOGSTRING( "CSatUiView::DoDeactivate() called" )
- if ( iContainer )
- {
- TFLOGSTRING( "CSatUiView::DoActivateL iContainer" )
- AppUi()->RemoveFromStack( iContainer );
- delete iContainer;
- iContainer = NULL;
- }
- TFLOGSTRING( "CSatUiView::DoDeactivate() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiView::MakeListBoxVisible
-// Hides and makes list box visible if needed.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiView::MakeListBoxVisible( TBool aVisible )
- {
-
- TFLOGSTRING( "CSatUiView::MakeListBoxVisible() called" )
- iListBoxVisible = aVisible;
- TFLOGSTRING( "CSatUiView::MakeListBoxVisible() exit" )
-
- }
-
-// ---------------------------------------------------------
-// CSatUiView::RefreshL
-// Called by SetUpMenuL and SelectItemL when view is the same but
-// data is changed.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiView::RefreshL()
- {
- TFLOGSTRING( "CSatUiView::RefreshL() called" )
- if ( !iIconStateChange )
- {
- TFLOGSTRING( "CSatUiView::RefreshL() iIconStateChange false" )
- iRect = ClientRect();
- DrawL();
- }
- else
- {
- TFLOGSTRING( "CSatUiView::RefreshL() iIconStateChange true" )
- //deactivate last selectitem view with other icon state
- DoDeactivate();
-
- iContainer = CSatUiViewContainer::NewL( iIconsOn, this );
-
- iContainer->SetMopParent( this );
- iContainer->ListBox()->SetListBoxObserver( this );
-
- iModel = STATIC_CAST( CTextListBoxModel*,
- iContainer->ListBox()->Model() );
-
- if ( !iMenuItems )
- {
- //no memory is allocated to the array buffers here:
- iMenuItems = new ( ELeave ) CDesCArrayFlat(1);
- iMenuItemNextActions = new ( ELeave ) CArrayFixFlat<TSatAction>( 1 );
- }
-
- iRect = ClientRect();
-
- AppUi()->AddToStackL( iContainer );
-
- DrawL();
- }
- TFLOGSTRING( "CSatUiView::RefreshL() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiView::DrawL
-// Called by DoActivateL and RefreshL to draw the view.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiView::DrawL()
- {
- TFLOGSTRING( "CSatUiView::DrawL() called" )
-
- if ( iContainer )
- {
- TFLOGSTRING( "CSatUiView::DrawL make ListBox visible" )
- iContainer->ListBox()->MakeVisible( iListBoxVisible );
- }
-
- if ( ( iTitle ) && ( StatusPane()->PaneCapabilities( TUid::Uid(
- EEikStatusPaneUidTitle ) ).IsPresent() )
- && iListBoxVisible )
- {
- TFLOGSTRING( "CSatUiView::DrawL set title pane" )
- CAknTitlePane* titlePane = STATIC_CAST( CAknTitlePane*,
- StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
- titlePane->SetTextL( *iTitle );
- titlePane->DrawNow();
- }
-
- if( iIconsOn )
- {
- TFLOGSTRING( "CSatUiView::DrawL set icons" )
- //set icons to view
- CAknIconArray* itemIconsArray = new( ELeave ) CAknIconArray(1);
- CleanupStack::PushL( itemIconsArray );
- itemIconsArray->InsertL( 0, &iItemsIconArray->operator[]( 0 ),
- iItemsIconArray->Count() );
- iContainer->ListBox()->ItemDrawer()->ColumnData()->
- SetIconArray( itemIconsArray );
- CleanupStack::Pop( itemIconsArray );
- iItemsIconArray->Reset();
- }
-
- iModel->SetItemTextArray( iMenuItems );
- iModel->SetOwnershipType( ELbmDoesNotOwnItemArray );
-
- iContainer->MakeVisible( ETrue );
- iContainer->SetRect( iRect );
- iContainer->ActivateL();
-
- if ( iSetUpMenu )
- {
- TFLOGSTRING( "CSatUiView::DrawL() SetupMenu" )
- UpdateMskL( 0, ETrue ); // SetupMenu starts at beginning
- }
- else
- {
- TFLOGSTRING( "CSatUiView::DrawL() others" )
- UpdateMskL( iDefaultItem, ETrue ); // SelectItem may have default item
- }
- iContainer->ListBox()->SetCurrentItemIndex( iDefaultItem );
- iContainer->ListBox()->DrawNow();
- TFLOGSTRING2( "CSatUiView::DrawL() iDefaultItem=%d", iDefaultItem )
- TFLOGSTRING( "CSatUiView::DrawL() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiView::DispatchUserInactive
-// Called when user has been inactive for a pre-defined time period
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TInt CSatUiView::DispatchUserInactive( TAny* aPtr )
- {
- TFLOGSTRING( "CSatUiView::DispatchUserInactive called-exit" )
- if ( ( ( CSatUiView* )aPtr )->iWait.IsStarted() )
- {
- ( ( CSatUiView* )aPtr )->iNoResponseFromUserAfterDelay = ETrue;
- ( ( CSatUiView* )aPtr )->iWait.AsyncStop();
- }
- return ( EFalse );
- }
-
-
-// ---------------------------------------------------------
-// CSatUiView::UpdateMskL
-// Updates the middle soft key
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiView::UpdateMskL( TInt aIndex, TBool aNew )
- {
- TFLOGSTRING( "CSatUiView::UpdateMskL() enter" )
- CEikButtonGroupContainer* cba = Cba();
-
- if ( cba && ( aNew || ( iMenuItems->MdcaCount() ==
- iMenuItemNextActions->Count() ) ) )
- {
- TInt resource ( R_QTN_MSK_SELECT );
- TInt commandId ( ESatUiCmdSelect );
-
- if ( iEmpty )
- {
- TFLOGSTRING( "CSatUiView::UpdateMskL iEmpty" )
- resource = R_TEXT_SOFTKEY_EMPTY;
- commandId = EAknSoftkeyEmpty;
- }
- else if ( iMenuItems->MdcaCount() ==
- iMenuItemNextActions->Count() && iNItems )
- {
- switch ( ( *iMenuItemNextActions )[ aIndex ] )
- {
- case ESatSetUpCallAction:
- {
- TFLOGSTRING( "CSatUiView::UpdateMskL \
- setupcall" )
- resource = R_QTN_MSK_CALL_SAT;
- break;
- }
- case ESatSendSsAction: // flow through
- case ESatSendUssdAction: // flow through
- case ESatSendSmAction:
- {
- TFLOGSTRING( "CSatUiView::UpdateMskL \
- sendss,sendussd or sendsm" )
- resource = R_QTN_MSK_SEND;
- break;
- }
- case ESatPlayToneAction:
- {
- TFLOGSTRING( "CSatUiView::UpdateMskL \
- playtone" )
- resource = R_QTN_MSK_PLAY;
- break;
- }
- case ESatDisplayTextAction:
- {
- TFLOGSTRING( "CSatUiView::UpdateMskL \
- displaytext" )
- resource = R_QTN_MSK_READ_SAT;
- break;
- }
- case ESatSetUpMenuAction:
- case ESatSelectItemAction:
- {
- TFLOGSTRING( "CSatUiView::UpdateMskL \
- setupmenu or selectitem" )
- resource = R_QTN_MSK_OPEN;
- break;
- }
- case ESatLaunchBrowserAction:
- {
- TFLOGSTRING( "CSatUiView::UpdateMskL \
- launchbrowser" )
- resource = R_QTN_MSK_GOTO_SAT;
- break;
- }
- default:
- {
- TFLOGSTRING( "CSatUiView::UpdateMskL \
- others" )
- resource = R_QTN_MSK_SELECT ;
- break;
- }
- }
- TFLOGSTRING2( "CSatUiView::UpdateMskL:aIndex=%d", aIndex )
- }
- else // Basic aNew
- {
- // No need to to do anything here, default values are used
- }
-
- HBufC* msk = StringLoader::LoadLC( resource, iCoeEnv );
- cba->SetCommandL( CEikButtonGroupContainer::EMiddleSoftkeyPosition,
- commandId, *msk );
- cba->DrawDeferred();
- CleanupStack::PopAndDestroy( msk );
- }
-
- TFLOGSTRING( "CSatUiView::UpdateMskL() exit" )
- }
-
--- a/satui/satapp/SATUISrc/CSatUiViewAppUi.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3502 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implements the application UI and the methods derived from
-* MSatUiActionImplementer i.e. showing messages and asking input.
-*
-*
-*/
-
-
-// INCLUDE FILES
-#include <barsread.h>
-#include <badesca.h> // for descriptor arrays
-#include <e32std.h>
-#include <eikenv.h>
-#include <eikapp.h>
-#include <StringLoader.h>
-#include <aknview.h>
-#include <aknnotedialog.h>
-#include <aknstaticnotedialog.h>
-#include <AknGlobalNote.h>
-#include <AknQueryDialog.h>
-#include <aknmessagequerydialog.h>
-#include <AudioPreference.h>
-#include <mdaaudiotoneplayer.h>
-#include <activitymanager.h>
-#include <AknIconArray.h>
-#include <AknPopupform.h> //DisplayText icon popupform
-#include <eikcapc.h> //CEikCaptionedControl
-#include <txtrich.h> //CRichText
-#include <eikrted.h> //CEikRichTextEditor
-#include <hlplch.h>
-#include <aknsoundsystem.h>
-#include <AknWaitDialog.h>
-#include <akntitle.h>
-#include <AknUtils.h>
-#include <AknIconUtils.h>
-#include <aknconsts.h>
-#include <avkon.hrh>
-#include <SatUi.rsg>
-#include <msatuiadapter.h>
-#include <aknkeylock.h>
-
-#include "satui.hrh"
-#include "CSatUiApplication.h"
-#include "CSatUiViewAppUi.h"
-#include "CSatUiView.h"
-#include "CSatUiTextQueryDialog.h"
-#include "CSatUiMessageQueryIcon.h"
-#include "CSatUiWaitDialog.h"
-#include "tflogger.h"
-
-#include <MProfile.h>
-#include <MProfileEngine.h>
-#include <MProfileTones.h>
-#include <TProfileToneSettings.h>
-#include <MProfileName.h>
-#include <MProfileExtraTones.h>
-#include <featmgr.h> // Used for FeatureManager
-#include <BTSapDomainPSKeys.h> // For BT SAP connection state keys.
-#include <e32property.h> // Used for RProperty
-#include <aknnotewrappers.h>
-
-#include <aknlayout.cdl.h>
-#include <aknlayoutscalable_avkon.cdl.h>
-#include <ctsydomainpskeys.h>
-#include <mda/common/resource.h>
-
-#include <ProfileEngineSDKCRKeys.h>
-#include <centralrepository.h>
-
-
-// CONSTANTS
-const TInt KSatActiveProfileOffline = 5; // value from ProfileEngine
-const TInt K32TIntMaxValue = 0x7FFFFFFF;
-// From UI spec 60 sec delay user response.
-const TInt KNoResponseFromUserDelay = 60;
-const TInt KMicroSecondsInSecond = 1000000;
-const TInt KClearScreenDelay = 3;
-const TInt KMicroSecondsInTenthOfSecond = 100000;
-const TInt K3Seconds = 3000000;
-
-// Maximum length for sound file.
-const TInt KMaxSoundFileLength = 256;
-// Audio sample is repeated indefinitely.
-const TInt KSoundPlayerRepeatForever = KMdaRepeatForever;
-// Used when dividing some values. Used only for preventing the use of magic
-// numbers
-const TInt KDivideByEight = 8;
-
-const TUint8 KGetInputStringMaxSize = 0xEF;
-
-_LIT( K3Spaces, " " ); // Used for empty title.
-const TInt KEmptyTitleLength( 3 ); // Length of empty title.
-_LIT( KSatEmptySpace, " " ); // Used for empty item.
-_LIT( KSatEmptyDes, "" );
-
-const TUint8 KKeyZero = 0x30;
-const TUint8 KKeyNine = 0x39;
-const TUint8 KHwAsterisk = 0x2a; // In hw scan code value for asterisk
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CSatUiViewAppUi::CSatUiViewAppUi():
- iHelp( EFalse ),
- iSetUpMenuFirst( ETrue ),
- iSelectItemFirst( ETrue ),
- iPreviousForeground( EFalse ),
- iViewLoopCounter( 0 ),
- iDuration( TTimeIntervalMicroSeconds( static_cast<TInt64>( 0 ) ) ),
- iReqWSBufferID( KErrNone )
- {
- }
-
-// Symbian OS default constructor can leave.
-void CSatUiViewAppUi::ConstructL()
- {
- TFLOGSTRING( "CSatUiViewAppUi::ConstructL() called" )
- BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
-
- // Requests Window Server client buffer used by the application to
- // be of at least the given size.
- iReqWSBufferID = CAknEnv::Static()->RequestWsBuffer( KAknMaxWsBufferSize );
- TFLOGSTRING2( "iReqWSBufferID is %d", iReqWSBufferID )
-
- if ( BTSAPActivatedL() )
- {
- HBufC* sapText =
- iCoeEnv->AllocReadResourceLC( R_QTN_OFFLINE_NOT_POSSIBLE_SAP );
- CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue );
- iForegroundControl = note;
- note->ExecuteLD( *sapText );
- iForegroundControl = NULL;
- CleanupStack::PopAndDestroy( sapText );
- Exit();
- }
-
- if ( ProfileState() == KSatActiveProfileOffline )
- {
- ShowNotAvailableNoteL();
- Exit();
- }
-
-
- if ( StatusPane()->PaneCapabilities( TUid::Uid(
- EEikStatusPaneUidTitle ) ).IsPresent() )
- {
- CAknTitlePane* titlePane = STATIC_CAST( CAknTitlePane*,
- StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
- titlePane->SetTextL( KNullDesC );
- titlePane->DrawNow();
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::ConstructL() exit" )
- }
-
-// Destructor.
-CSatUiViewAppUi::~CSatUiViewAppUi()
- {
- TFLOGSTRING( "CSatUiViewAppUi::~CSatUiViewAppUi() called" )
- this->StopShowWaitNote();
-
- delete iTitle;
- delete iAppName;
- delete iPlayer;
- delete iTimer;
-
- TFLOGSTRING( "CSatUiViewAppUi::~CSatUiViewAppUi() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::CreateEmptyMenuL
-// Creates empty menu. This is used in SIM originated commands.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::CreateEmptyMenuL()
- {
- TFLOGSTRING( "CSatUiViewAppUi::CreateEmptyMenuL() called" )
-
- // Create the menu item array with no content.
- CDesCArrayFlat* menuItems = new( ELeave ) CDesCArrayFlat( 1 );
- CleanupStack::PushL( menuItems );
- menuItems->Reset();
- menuItems->AppendL( KSatEmptySpace );
-
- // Create the empty next action indicator array.
- CArrayFixFlat<TSatAction>* menuActions =
- new( ELeave ) CArrayFixFlat<TSatAction>( 1 );
- CleanupStack::PushL( menuActions );
- menuActions->Reset();
-
- // Create empty title pane.
- HBufC* satTitle = HBufC::NewLC( KEmptyTitleLength );
- satTitle->Des().Append( K3Spaces );
-
- iSetUpMenuFirst = EFalse;
- iSetUpMenuView = CSatUiView::NewL( ETrue, this, ETrue );
- iSetUpMenuView->SetItemsL( satTitle,
- *menuItems,
- menuActions,
- EFalse );
-
- // Hide list box.
- iSetUpMenuView->MakeListBoxVisible( EFalse );
-
- // Transfer ownership to CAknViewAppUi.
- AddViewL( iSetUpMenuView );
-
- iSetUpMenuView->SetAdapter( iAdapter );
- iActiveView = KSetUpMenuViewId;
-
- // satTitle, menuActions, menuItems
- CleanupStack::PopAndDestroy( satTitle );
- CleanupStack::PopAndDestroy( menuActions );
- CleanupStack::PopAndDestroy( menuItems );
- TFLOGSTRING( "CSatUiViewAppUi::CreateEmptyMenuL() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::SetAdapter
-// Sets the pointer to MSatUiAdapter object.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::SetAdapter(
- MSatUiAdapter* aAdapter )
- {
- iAdapter = aAdapter;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ShowWaitNoteL
-// Displays the wait note.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::ShowWaitNoteL()
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowWaitNoteL() called" )
- if ( !iWaitNote )
- {
- iWaitNote = new(ELeave)CAknWaitDialog(
- (REINTERPRET_CAST(CEikDialog**,&iWaitNote)));
- iForegroundControl = iWaitNote;
- iWaitNote->ExecuteLD( R_SATUI_WAIT_NOTE );
- // iForegroundControl won't be clear until the wait dialog
- // closed. It will avoid we lose the chance to set focus for
- // the wait dialog when the switch of foreground/background
- // happened.
- }
- TFLOGSTRING( "CSatUiViewAppUi::ShowWaitNoteL() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ShowWaitNoteWithoutDelayL
-// Displays the wait note without delay
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::ShowWaitNoteWithoutDelayL()
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowWaitNoteWithoutDelayL() called" )
- if ( !iWaitNote )
- {
- iWaitNote = new(ELeave)CAknWaitDialog(
- (REINTERPRET_CAST(CEikDialog**,&iWaitNote)), ETrue );
- iForegroundControl = iWaitNote;
- iWaitNote->ExecuteLD( R_SATUI_WAIT_NOTE );
- // iForegroundControl won't be clear until the wait dialog
- // closed. It will avoid we lose the chance to set focus for
- // the wait dialog when the switch of foreground/background
- // happened.
- }
- TFLOGSTRING( "CSatUiViewAppUi::ShowWaitNoteWithoutDelayL() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::StopShowWaitNote
-// Removes the wait note from the screen.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::StopShowWaitNote()
- {
- TFLOGSTRING( "CSatUiViewAppUi::StopShowWaitNote() called" )
-
- if ( iNoteDialog )
- {
- iForegroundControl = NULL;
-
- TFLOGSTRING( "CSatUiViewAppUi::StopShowWaitNote() Closing \
- NoteDialog" )
- delete iNoteDialog;
- iNoteDialog = NULL;
- }
-
- if ( iWaitNote )
- {
- iForegroundControl = NULL;
-
- TFLOGSTRING( "CSatUiViewAppUi::StopShowWaitNote() Closing WaitNote" )
- // Process finished. The function was either ExecuteLD or RunLD.
- // This function call stops the execution of these function and
- // causes the deletion of object
- TInt err(0);
- TRAP( err, iWaitNote->ProcessFinishedL() )
- TFLOGSTRING2(" 2nd: iWaitNote: %x ", iWaitNote )
- TFLOGSTRING2( "TRAP: %d", err )
- // Delete the object just in case. Seems that above method does not
- // delete the object in some cases. e.g in very fast execution
- delete iWaitNote;
- iWaitNote = NULL;
- }
- if ( iBipWaitNote )
- {
- iForegroundControl = NULL;
-
- TFLOGSTRING( "CSatUiViewAppUi::StopShowWaitNote() Closing BIP note" )
- delete iBipWaitNote;
- iBipWaitNote = NULL;
- }
-
- if ( iPermanentNote )
- {
- TFLOGSTRING( "CSatUiViewAppUi::StopShowWaitNote() \
- iPermanentNote cleared" )
- // If iPermanentNote exists until wait note is stopped,
- // then dialog has been already removed.
- iPermanentNote->ExitSleepingDialog();
- delete iPermanentNote;
- iPermanentNote = NULL;
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::StopShowWaitNote() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::BTSAPActivatedL
-// Check that if BT SAP connection activated.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TBool CSatUiViewAppUi::BTSAPActivatedL()
- {
-
- TFLOGSTRING( "CSatUiViewAppUi::BTSAPActivated() called" )
-
- TBool isActive( EFalse );
- FeatureManager::InitializeLibL();
- if ( FeatureManager::FeatureSupported( KFeatureIdBtSap ) )
- {
- TFLOGSTRING( "BTSAP is supported by ME" )
- TInt status( EBTSapNotConnected );
- TInt err = RProperty::Get( KPSUidBluetoothSapConnectionState,
- KBTSapConnectionState,
- status );
-
- if ( EBTSapNotConnected != status && !err )
- {
- TFLOGSTRING( "BTSAP is connected" )
- isActive = ETrue;
- }
- else
- {
- TFLOGSTRING3( "BTSAP status %d and error %d", status, err )
- }
- }
- else
- {
- TFLOGSTRING( "BTSAP is not supported by ME" )
- }
-
- FeatureManager::UnInitializeLib();
- TFLOGSTRING( "CSatUiViewAppUi::BTSAPActivated() exit" )
- return isActive;
-
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::CoeEnv
-// Returns CoeEnv.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-CCoeEnv* CSatUiViewAppUi::CoeEnv()
- {
- return iCoeEnv;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::DisplayTextL
-// Displays the text in a note.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiViewAppUi::DisplayTextL(
- const TDesC& aText,
- const TDesC& aSimApplicationName,
- CFbsBitmap* aIconBitmapDisplayText,
- const TBool aSelfExplanatoryIcon,
- const TBool aSustainedText,
- const TTimeIntervalSeconds aDuration,
- const TBool aWaitUserToClear )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL called" )
- StopShowWaitNote();
-
- TSatUiResponse response( ESatSuccess );
- iHighPriorityEvent = EFalse;
-
- // Indication immediate response TLV for Display Text during MT call,
- // if it is immediate response, close dialog, otherwise leave it alone.
- iImmediateRsp = aSustainedText;
- TFLOGSTRING2( "CSatUiViewAppUi::DisplayTextL immediate rsp: %d",
- iImmediateRsp )
-
- HBufC* header;
-
- if ( iHelp )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL iHelp ETrue" )
- header = StringLoader::LoadLC(
- R_QTN_SAT_HELP_HEADER, iCoeEnv );
- iHelp = EFalse;
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL iHelp EFalse" )
- TFLOGSTRING2( "CSatUiViewAppUi::DisplayTextL length of \
- aSimApplicationName: %d", aSimApplicationName.Length() )
- if ( aSimApplicationName.Length() > 0 )
- {
- header = aSimApplicationName.AllocLC();
- }
- else
- {
- //Reads a resource string with memory allocation
- header = StringLoader::LoadLC( R_QTN_SAT_MESSAGE_HEADER, iCoeEnv );
- }
- }
-
- // Remove NULL characters from title
- RemoveNullCharacters( header );
-
- if ( aIconBitmapDisplayText )
- {
- //icon available use querydialog
- iDisplayTextIconDialog = CAknPopupForm::NewL();
- }
-
- CUserActivityManager* activityManager =
- CUserActivityManager::NewL( EPriorityNormal );
-
- CleanupStack::PushL( activityManager );
-
- // Duration handling:
- // If duration is given use that value for timeout.
- TTimeIntervalSeconds duration ( aDuration );
-
- // If user is expected to clear shown dialog and
- // duration is NOT given use 60s timeout.
- if ( aWaitUserToClear && !aDuration.Int() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL wait user to clear" )
- duration = TTimeIntervalSeconds( KNoResponseFromUserDelay );
- }
- // If user is NOT expected to clear shown dialog and
- // duration is NOT given use 3s timeout.
- else if ( !aDuration.Int() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL don't wait user \
- to clear" )
- duration = TTimeIntervalSeconds( KClearScreenDelay );
- }
-
- // If not sustained or Clear after delay requested start timer
- if ( !aSustainedText || aDuration.Int() || !aWaitUserToClear )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL No sustained text" )
- TFLOGSTRING2( "CSatUiViewAppUi::DisplayTextL duration: %d",
- duration.Int() )
-
- // If duration is given start timer which doesn't
- // care about user activity.
- if ( aDuration.Int() )
- {
- CreateCallBackTimerL( duration.Int() * KMicroSecondsInSecond,
- DelayCallback );
- }
- // Otherwise start timer which takes account user activity.
- else
- {
- User::ResetInactivityTime();
- activityManager->Start( duration,
- TCallBack( DispatchUserInactive, this ), 0 );
- }
- }
-
- TInt userResponse;
-
- if ( aIconBitmapDisplayText )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL have IconBitmap" )
- // Prepare dialog with icon
- iDisplayTextIconDialog->SetPopupFormType( EAknQuery );
- iDisplayTextIconDialog->PrepareLC( R_SATUI_MESSAGE_TEXT_ICON );
- iDisplayTextIconDialog->SetTitleL( *header );
-
- // Get richtext control
- CEikCaptionedControl* capControl =
- iDisplayTextIconDialog->GetControlByControlType
- ( EEikCtRichTextEditor );
- CCoeControl* coeControl = capControl->iControl;
- CEikRichTextEditor* rtxtEditor =
- reinterpret_cast<CEikRichTextEditor*>( coeControl );
-
- if ( !aSelfExplanatoryIcon )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL not \
- SelfExplanatoryIcon" )
- // Not selfexplanatory icon, add text
- // Get font
- const CFont* logicalFont = AknLayoutUtils::FontFromId(
- EAknLogicalFontSecondaryFont );
-
- // Extract font information
- TFontSpec fontspec = logicalFont->FontSpecInTwips();
- TCharFormat charFormat( fontspec.iTypeface.iName,
- fontspec.iHeight );
-
- // Make the font to be anti-aliased
- TFontStyle style;
- style.SetBitmapType( EAntiAliasedGlyphBitmap );
- charFormat.iFontSpec.iFontStyle = style;
-
- // Set mask (which settings are set)
- TCharFormatMask charFormatMask;
- charFormatMask.SetAttrib( EAttColor );
- charFormatMask.SetAttrib( EAttFontTypeface );
- charFormatMask.SetAttrib( EAttFontHeight );
-
- // Apply settings
- rtxtEditor->RichText()->ApplyCharFormatL(
- charFormat, charFormatMask, 0, 0 );
-
- // One space between icon and text
- rtxtEditor->RichText()->InsertL( 0, KSatEmptySpace );
- rtxtEditor->RichText()->InsertL( 1, aText );
- }
-
- // Count icon size in twips
- CWsScreenDevice* device = CCoeEnv::Static()->ScreenDevice();
- TInt width = device->HorizontalPixelsToTwips(
- aIconBitmapDisplayText->SizeInPixels().iWidth );
- TInt height = device->VerticalPixelsToTwips(
- aIconBitmapDisplayText->SizeInPixels().iHeight );
- TSize twipsSize( width, height );
-
- // Create picture
- CSatUiMessageQueryIcon* picture = new( ELeave )
- CSatUiMessageQueryIcon( twipsSize, *aIconBitmapDisplayText );
- TPictureHeader pictureHeader;
- pictureHeader.iPicture = TSwizzle<CPicture>( picture );
- //Insert picture
- rtxtEditor->RichText()->InsertL( 0, pictureHeader );
- //Needed to show whole picture
- _LIT( KString, "\f\f\f");
- rtxtEditor->RichText()->InsertL( rtxtEditor->Text()->DocumentLength(),
- KString );
-
- // Set MSK same as LSK without any text causing the icon drawing
- iDisplayTextIconDialog->ButtonGroupContainer().SetCommandL(
- CEikButtonGroupContainer::EMiddleSoftkeyPosition, EAknSoftkeyOk,
- KSatEmptyDes );
- iForegroundControl = iDisplayTextIconDialog;
- userResponse = iDisplayTextIconDialog->RunLD();
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL don't have IconBitmap" )
- // Dialog without icon
- iDisplayTextDialog = new (ELeave) CAknMessageQueryDialog();
- iDisplayTextDialog->PrepareLC( R_SATUI_MESSAGE );
- iDisplayTextDialog->SetMessageTextL( aText );
- iDisplayTextDialog->QueryHeading()->SetTextL( *header );
-
- // Set MSK same as LSK without any text causing the icon drawing
- iDisplayTextDialog->ButtonGroupContainer().SetCommandL(
- CEikButtonGroupContainer::EMiddleSoftkeyPosition, EAknSoftkeyOk,
- KSatEmptyDes );
- iForegroundControl = iDisplayTextDialog;
- userResponse = iDisplayTextDialog->RunLD();
- }
- iForegroundControl = NULL;
-
- CleanupStack::PopAndDestroy( activityManager );
- CleanupStack::PopAndDestroy( header ); // header,activityManager
- // After duration call back timer is destroyed
- DestroyCallBackTimer();
-
- // If user is not expected to clear message used response is success
- // in timeout case.
- if ( userResponse
- || ( iNoteClearedAfterDelay && !aWaitUserToClear ) )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL successful response" )
- response = ESatSuccess;
- }
- else if ( iNoResponseFromUserAfterDelay ||
- ( aWaitUserToClear && iHighPriorityEvent ) )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL no user response" )
- // User did not close the text, closed by the timer or MT call
- response = ESatNoResponseFromUser;
- }
- else
- {
- if ( IsAppShutterRunning() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL satsession \
- terminated by user " )
- response = ESatSessionTerminatedByUser;
- iSessionTerminated = ETrue;
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::DisplayTextL backward \
- requested by user " )
- response = ESatBackwardModeRequestedByUser;
- }
- }
-
- if ( iDisplayTextDialog )
- {
- iDisplayTextDialog = NULL;
- }
- if ( iDisplayTextIconDialog )
- {
- iDisplayTextIconDialog = NULL;
- }
-
- iNoteClearedAfterDelay = EFalse;
- iNoResponseFromUserAfterDelay = EFalse;
-
- ShowWaitNoteL();
-
- TFLOGSTRING2( "CSatUiViewAppUi::DisplayTextL exit, return: %d", response )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ClearScreen
-// Displays yes/no confirmation query.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::ClearScreen()
- {
- TFLOGSTRING( "CSatUiViewAppUi::ClearScreen() called" )
-
- iNoteClearedAfterDelay = ETrue;
- CloseDialogs();
-
- TFLOGSTRING( "CSatUiViewAppUi::ClearScreen() exit" )
- }
-// ---------------------------------------------------------
-// CSatUiViewAppUi::GetYesNoL
-// Displays yes/no confirmation query.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiViewAppUi::GetYesNoL(
- const TDesC& aText,
- const TSatCharacterSet aCharacterSet,
- TChar& aInkey,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory,
- TUint& aDuration,
- const TBool aImmediateDigitResponse )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL called" )
- TSatUiResponse response( ESatSuccess );
-
- StopShowWaitNote();
-
- CUserActivityManager* activityManager =
- CUserActivityManager::NewL( EPriorityNormal );
- CleanupStack::PushL( activityManager );
-
- // Start time for duration
- TTime startTime;
- iImmediateDigitResponse = aImmediateDigitResponse;
-
- TFLOGSTRING2( "CSatUiViewAppUi::GetYesNoL duration in 1/10 sec: %d",
- aDuration )
-
- // If duration is given use that value for timeout.
- // Start timer which doesn't care about user activity.
- if ( aDuration )
- {
- TInt duration ( 0 );
-
- TTimeIntervalMicroSeconds max32Bit(
- static_cast<TInt64>( K32TIntMaxValue ) );
- TTimeIntervalMicroSeconds durationInTenthOfSeconds(
- static_cast<TInt64>( aDuration ) );
- TTimeIntervalMicroSeconds durationInus(
- durationInTenthOfSeconds.Int64() * KMicroSecondsInTenthOfSecond );
-
- if ( durationInus > max32Bit )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL durationInus bigger \
- than max32Bit" )
- // since timers can only handle 32-bit values,
- // let's break the aDuration to smaller bits.
- // we break it here to 8 bits to fit in 32-bit value
- duration = durationInus.Int64() / KDivideByEight;
- iTimerRepeatOn = ETrue;
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL durationInus less \
- than max32Bit" )
- duration = durationInus.Int64();
- }
-
- CreateCallBackTimerL( duration, DelayCallback );
- startTime.HomeTime();
- }
- // Otherwise start timer which takes account user activity.
- else
- {
- User::ResetInactivityTime();
- activityManager->Start(
- TTimeIntervalSeconds( KNoResponseFromUserDelay ),
- TCallBack( DispatchUserInactive, this ), 0 );
- }
-
- TInt resource( 0 );
-
- if ( aIconBitmap )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL iGetYesNoIconDialog" )
-
- if ( ESatYesNo == aCharacterSet )
- {
- resource = R_SATUI_CONFIRM_YES_NO_QUERY_WITH_ICON;
- }
- else
- {
- resource = R_SATUI_IMMEDIATE_DIGIT_NOTE_WITH_ICON;
- }
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL iGetYesNoDialog" )
-
- if ( ESatYesNo == aCharacterSet )
- {
- resource = R_SATUI_CONFIRM_YES_NO_QUERY;
- }
- else
- {
- resource = R_SATUI_IMMEDIATE_DIGIT_QUERY;
- }
- }
-
- TInt userResponse = RunQueryDialogL( resource , aText, aIconBitmap,
- aSelfExplanatory, EAknSoftkeyYes );
-
- iImmediateDigitResponse = EFalse;
-
- // set received immediate digit response
- aInkey = iKey;
- iKey = 0;
-
- if ( aDuration )
- {
- TTime endTime;
- endTime.HomeTime();
- TTimeIntervalMicroSeconds timeDifference( 0 );
- timeDifference = endTime.MicroSecondsFrom( startTime );
- aDuration = timeDifference.Int64() / KMicroSecondsInTenthOfSecond;
-
- // After duration call back timer is destroyed
- DestroyCallBackTimer();
- }
-
- CleanupStack::PopAndDestroy( activityManager );
-
- // Timeout
- if ( iNoResponseFromUserAfterDelay )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL no response from user" )
- response = ESatNoResponseFromUser;
- }
- // Cancel is pressed if immediate digit response without Yes/No
- else if ( !userResponse && ESatYesNo != aCharacterSet && !aInkey )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL backward request by user" )
- response = ESatBackwardModeRequestedByUser;
- }
- // Yes button is used
- else if ( userResponse && !aInkey)
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL button used" )
- aInkey = 1;
- }
- // No button is used
- else if ( !aInkey )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetYesNoL no button used" )
- aInkey = 0;
- }
-
- iNoResponseFromUserAfterDelay = EFalse;
-
- ShowWaitNoteL();
-
- TFLOGSTRING2( "CSatUiViewAppUi::GetYesNoL exit, return: %d", response )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::GetInputL
-// Displays data query.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiViewAppUi::GetInputL(
- const TDesC& aText,
- const TSatCharacterSet aCharacterSet,
- TDes& aInput,
- const TInt aMinLength,
- const TInt aMaxLength,
- const TBool aHideInput,
- const TBool aGetInkey,
- const CFbsBitmap* aIconBitmapGetInput,
- const TBool aSelfExplanatory,
- TUint& aDuration )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetInputL called" )
- StopShowWaitNote();
-
- TSatUiResponse response( ESatSuccess );
-
- TPtrC textPtr( aText );
-
- TInt minLength( 0 );
- TInt maxLength( 1 );
-
- TFLOGSTRING2( "CSatUiViewAppUi::GetInputL aMinLength %d", aMinLength )
- TFLOGSTRING2( "CSatUiViewAppUi::GetInputL aMaxLength %d", aMaxLength )
- //lint -e{961} else block not needed, minLength initialized.
- if ( aMinLength <= KGetInputStringMaxSize && aMinLength > 0 )
- {
- minLength = aMinLength;
- }
- else if ( aMinLength > KGetInputStringMaxSize )
- {
- minLength = KGetInputStringMaxSize;
- }
-
- //lint -e{961} else block not needed, maxLength initialized.
- if ( aMaxLength < minLength )
- {
- maxLength = minLength;
- }
- else if ( aMaxLength <= KGetInputStringMaxSize && aMaxLength > 1 )
- {
- maxLength = aMaxLength;
- }
- else if ( aMaxLength > KGetInputStringMaxSize )
- {
- maxLength = KGetInputStringMaxSize;
- }
-
- HBufC* input = HBufC::NewLC( KGetInputStringMaxSize );
- TPtr inputPtr(input->Des());
-
- HBufC* textHolder = NULL;
-
- TFLOGSTRING2( "CSatUiViewAppUi::GetInputL aInput.Length %d",\
- aInput.Length() )
-
- if ( ( aInput.Length() >= minLength )
- && ( aInput.Length() <= maxLength ) )
- {
- inputPtr = aInput;
- }
-
- TInt userResponse;
-
- CUserActivityManager* activityManager =
- CUserActivityManager::NewL( EPriorityNormal );
-
- CleanupStack::PushL( activityManager );
-
- // Start time for timer
- TTime startTime;
-
- // If duration is given use that value for timeout.
- // Start timer which doesn't care about user activity.
- if ( aDuration && aGetInkey )
- {
- TFLOGSTRING2( "CSatUiViewAppUi::GetInputL duration in 1/10 sec: %d",
- aDuration )
-
- TInt duration ( 0 );
-
- TTimeIntervalMicroSeconds max32Bit(
- static_cast<TInt64>( K32TIntMaxValue ) );
- TTimeIntervalMicroSeconds durationInTenthOfSeconds(
- static_cast<TInt64>( aDuration ) );
- TTimeIntervalMicroSeconds durationInus(
- durationInTenthOfSeconds.Int64() * KMicroSecondsInTenthOfSecond );
-
- if ( durationInus > max32Bit )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetInputL durationInus bigger \
- than max32Bit" )
- // since timers can only handle 32-bit values,
- // let's break the aDuration to smaller bits.
- // we break it here to 8 bits to fit in 32-bit value
- duration = durationInus.Int64() / KDivideByEight;
- iTimerRepeatOn = ETrue;
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetInputL durationInus less \
- than max32Bit" )
- duration = durationInus.Int64();
- }
-
- CreateCallBackTimerL( duration, DelayCallback );
- startTime.HomeTime();
- }
- // Otherwise start timer which takes account user activity.
- else
- {
- User::ResetInactivityTime();
- activityManager->Start(
- TTimeIntervalSeconds( KNoResponseFromUserDelay ),
- TCallBack( DispatchUserInactive, this ), 0 );
- }
-
- CEikImage* image = new(ELeave) CEikImage;
- CleanupStack::PushL( image );
-
- if ( aIconBitmapGetInput )
- {
- image->SetBitmap( aIconBitmapGetInput );
-
- // Create mask for icon bitmap
- CFbsBitmap* mask = new(ELeave) CFbsBitmap;
-
- TSize size = aIconBitmapGetInput->SizeInPixels();
- CleanupStack::PushL( mask );
- MakeGetInputBitmapMask( mask, size );
-
- image->SetMask( mask );
- CleanupStack::Pop( mask );
- }
-
- TInt resource( 0 );
- TInt textResource( 0 );
- // Query dialog
- iGetInputDialog = new (ELeave) CSatUiTextQueryDialog( inputPtr,
- CAknQueryDialog::ENoTone, minLength, maxLength );
- iForegroundControl = iGetInputDialog;
-
- if ( aCharacterSet == ESatDigitOnly )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetInputL ESatDigitOnly" )
- if ( aText.Length() == 0 )
- {
- if ( aGetInkey )
- {
- textResource = R_TEXT_SIMATK_ENTER_NBR;
- }
- else
- {
- textResource = R_TEXT_SIMATK_ENTER_NBR_STRING;
- }
- }
-
- // Hidden digit as input
- if ( aHideInput )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetInputL Hidden digit" )
- if ( aIconBitmapGetInput )
- {
- resource = R_SATUI_HIDDEN_NUMBER_QUERY_WITH_LABEL_AND_ICON;
- }
- else
- {
- resource = R_SATUI_HIDDEN_NUMBER_QUERY_WITHOUT_LABEL;
- }
- }
- // Normal number query
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetInputL normal digit" )
- if ( aIconBitmapGetInput )
- {
- resource = R_SATUI_NUMBER_QUERY_WITH_LABEL_AND_ICON;
- }
- else
- {
- resource = R_SATUI_NUMBER_QUERY_WITHOUT_LABEL;
- }
- }
- }
-
- else // ESatCharSmsDefaultAlphabet or ESatCharUcs2Alphabet
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetInputL ESatCharSmsDefaultAlphabet \
- or ESatCharUcs2Alphabet" )
- if ( aText.Length() == 0 )
- {
- if ( aGetInkey )
- {
- textResource = R_TEXT_SIMATK_ENTER_CHAR;
- }
- else
- {
- textResource = R_TEXT_SIMATK_ENTER_CHAR_STRING;
- }
- }
-
- if ( !aGetInkey )
- {
- iGetInputDialog->SetPredictiveTextInputPermitted( ETrue );
- }
-
- iGetInputDialog->SetMaxLength( maxLength );
-
- if ( aIconBitmapGetInput )
- {
- resource = R_SATUI_TEXT_QUERY_WITH_LABEL_AND_ICON;
- }
- else
- {
- resource = R_SATUI_TEXT_QUERY_WITHOUT_LABEL;
- }
- }
-
- // Read default text if sim doesn't provide text to dialog
- if ( aText.Length() == 0 )
- {
- // Reads a resource string with memory allocation
- // and pushes the string onto the cleanup stack.
- textHolder = StringLoader::LoadLC( textResource, iCoeEnv);
- textPtr.Set( *textHolder );
- }
-
- // Icon is used and command is get input
- if ( aIconBitmapGetInput )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetInputL icon is used" )
- iGetInputDialog->PrepareLC( resource );
- if ( !aSelfExplanatory )
- {
- // Icon is not self-explanatory, show also text
- iGetInputDialog->SetPromptL( textPtr );
- }
- // Add icon to query
- iGetInputDialog->QueryHeading()->SetHeaderImageL( image );
- // Set MSK same as LSK without any text causing the icon drawing
- iGetInputDialog->ButtonGroupContainer().SetCommandL(
- CEikButtonGroupContainer::EMiddleSoftkeyPosition, EAknSoftkeyOk,
- KSatEmptyDes );
- userResponse = iGetInputDialog->RunLD();
- TFLOGSTRING2( "CSatUiViewAppUi::GetInputL userResponse is: %d",
- userResponse )
- }
- // No icon in use
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetInputL icon isn't used" )
- iGetInputDialog->PrepareLC( resource );
- iGetInputDialog->SetPromptL( textPtr );
- // Set MSK same as LSK without any text causing the icon drawing
- iGetInputDialog->ButtonGroupContainer().SetCommandL(
- CEikButtonGroupContainer::EMiddleSoftkeyPosition, EAknSoftkeyOk,
- KSatEmptyDes );
- userResponse = iGetInputDialog->RunLD();
- TFLOGSTRING2( "CSatUiViewAppUi::GetInputL userResponse is: %d",
- userResponse )
- }
- iForegroundControl = NULL;
-
- if ( textHolder )
- {
- CleanupStack::PopAndDestroy( textHolder );
- }
-
- if ( aDuration && aGetInkey )
- {
- TTime endTime;
- endTime.HomeTime();
- TTimeIntervalMicroSeconds timeDifference( 0 );
- timeDifference = endTime.MicroSecondsFrom( startTime );
- aDuration = timeDifference.Int64() / KMicroSecondsInTenthOfSecond;
-
- // After duration call back timer is destroyed
- DestroyCallBackTimer();
- }
-
- CleanupStack::PopAndDestroy( image );
- CleanupStack::PopAndDestroy( activityManager ); // image, activityManager
- iGetInputDialog = NULL;
-
- if ( iNoResponseFromUserAfterDelay )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetInputL no response from user" )
- response = ESatNoResponseFromUser;
- }
- else if ( userResponse )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetInputL successful response" )
- if ( inputPtr.Length() )
- {
- aInput.Copy( inputPtr );
- }
- response = ESatSuccess;
- }
- else
- {
- if ( IsAppShutterRunning() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetInputL satsession \
- terminated by user " )
- response = ESatSessionTerminatedByUser;
- iSessionTerminated = ETrue;
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetInputL backward \
- requested by user " )
- response = ESatBackwardModeRequestedByUser;
- }
- }
-
- iNoResponseFromUserAfterDelay = EFalse;
-
- CleanupStack::PopAndDestroy( input ); // input
-
- ShowWaitNoteL();
-
- TFLOGSTRING2( "CSatUiViewAppUi::GetInputL exit, return: %d", response )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::SetUpMenuL
-// Sets the parameters for SetUpMenu view and calls the method
-// from the CSatUiView class.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiViewAppUi::SetUpMenuL(
- const TDesC& aText,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const CFbsBitmap* aIconBitmap,
- const CAknIconArray* aItemsIconArray,
- const TBool aSelfExplanatoryItems,
- const TBool aHelpIsAvailable )
- {
- TFLOGSTRING( "CSatUiViewAppUi::SetUpMenuL called" )
- StopShowWaitNote();
- TSatUiResponse response( ESatSuccess );
-
- delete iTitle;
- iTitle = NULL;
-
- delete iAppName;
- iAppName = NULL;
-
- TFLOGSTRING2( "CSatUiViewAppUi::SetUpMenuL length of aText %d", \
- aText.Length() )
- if ( aText.Length() > 0 )
- {
- iTitle = aText.AllocL();
- iAppName = aText.AllocL();
- }
- else
- {
- //Reads a resource string with memory allocation
- iTitle = StringLoader::LoadL( R_QTN_SAT_TITLE, iCoeEnv );
- }
-
- if ( iSetUpMenuFirst )
- {
- iSetUpMenuFirst = EFalse;
- iSetUpMenuView = CSatUiView::NewL( ETrue, this, EFalse );
-
- // transfer ownership to CAknViewAppUi:
- AddViewL( iSetUpMenuView );
-
- iSetUpMenuView->SetAdapter( iAdapter );
- }
-
- // Make list box visible.
- iSetUpMenuView->MakeListBoxVisible( ETrue );
-
- //set contextpane icon and item icons
- iSetUpMenuView->SetIconL( aIconBitmap );
- iSetUpMenuView->SetItemsIconL( aItemsIconArray, aSelfExplanatoryItems );
- iSetUpMenuView->SetTitle( iTitle );
-
- response = iSetUpMenuView->SetUpMenuL( iTitle, aMenuItems,
- aMenuItemNextActions, aHelpIsAvailable );
-
- iActiveView = KSetUpMenuViewId;
-
- // Reset counter for detecting possible loop in HandleForegroundEventL.
- iViewLoopCounter = 0;
-
- TFLOGSTRING2( "CSatUiViewAppUi::SetUpMenuL exit, return: %d", response )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::HandleForegroundEventL
-// Called when satui is brought to foreground or put into
-// background
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::HandleForegroundEventL( TBool aForeground )
- {
- TFLOGSTRING2( "CSatUiViewAppUi::HandleForegroundEventL called \
- value %d", aForeground )
-
- iForeground = aForeground;
-
- // Check whether it is only need to display a dialog.
- if ( iForeground && ( iForegroundControl || iCcNote ) )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleForegroundEventL \
- need to display a dialog" )
- if ( iForegroundControl )
- {
- iForegroundControl->SetFocus( ETrue, EDrawNow );
- }
- }
- // Check is it allowed to activate local view.
- // Removes possibility of view activation loop for example when
- // launching Browser.
- else if ( ViewActivationAllowed( aForeground, iActiveView ) )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleForegroundEventL \
- activate local view allowed" )
- TVwsViewId viewId;
- GetActiveViewId( viewId );
- TFLOGSTRING2( "CSatUiViewAppUi::HandleForegroundEventL called \
- appUid %x", viewId.iAppUid )
- TFLOGSTRING2( "CSatUiViewAppUi::HandleForegroundEventL called \
- viewUid %x", viewId.iViewUid )
-
- if( ( KUidSATUI != viewId.iAppUid ) ||
- ( ( KUidSATUI == viewId.iAppUid )
- && ( viewId.iViewUid != iActiveView ) ) )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleForegroundEventL \
- activate local view executing" )
- if ( KSetUpMenuViewId == iActiveView )
- {
- ActivateLocalViewL( KSetUpMenuViewId );
- }
- else
- {
- ActivateLocalViewL( KSelectItemViewId );
- }
- }
-
- }
- // Forwards event to the base class.
- CAknViewAppUi::HandleForegroundEventL( aForeground );
- TFLOGSTRING( "CSatUiViewAppUi::HandleForegroundEventL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ViewActivationAllowed
-// Sets the parameters for SelectItem view and calls the method
-// from the CSatUiView class.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TBool CSatUiViewAppUi::ViewActivationAllowed( const TBool aForeground,
- const TUid aActiveView )
- {
-
- TFLOGSTRING( "CSatUiViewAppUi::ViewActivationAllowed called" )
- TBool activationAllowed( EFalse );
- // Value for detecting view activation loop.
- const TInt certainViewLoopCount( 6 );
-
- // Check for foreground event, background event,
- // foreground event, background event, ... sequence.
- if ( aForeground ^ iPreviousForeground )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ViewActivationAllowed \
- check foreground event" )
- iViewLoopCounter++;
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::ViewActivationAllowed \
- no foreground event" )
- iViewLoopCounter = 0;
- }
-
- // Store information is application in foreground or
- // in background for next evaluation round.
- iPreviousForeground = aForeground;
-
- // Check that there is no loop.
- if ( aForeground && aActiveView.iUid )
- {
- if ( iViewLoopCounter < certainViewLoopCount )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ViewActivationAllowed \
- there are loops" )
- activationAllowed = ETrue;
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::ViewActivationAllowed \
- no loop" )
- // Counter is reset in case of foreground event
- // because of background event does not draw anything.
- iViewLoopCounter = 0;
- }
-
- }
-
- if ( iDisplayTextDialog || iDisplayTextIconDialog )
- {
- activationAllowed = EFalse;
- }
-
- TFLOGSTRING2( "CSatUiViewAppUi::ViewActivationAllowed exit, return: %d",\
- activationAllowed )
- return activationAllowed;
-
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::SelectItemL
-// Sets the parameters for SelectItem view and calls the method
-// from the CSatUiView class.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiViewAppUi::SelectItemL(
- const TDesC& aText,
- const MDesCArray& aMenuItems,
- const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
- const TInt aDefaultItem,
- TUint8& aSelection,
- const CFbsBitmap* aIconBitmap,
- const CAknIconArray* aItemsIconArray,
- const TBool aSelfExplanatoryItems,
- const TBool aHelpIsAvailable )
- {
- TFLOGSTRING( "CSatUiViewAppUi::SelectItemL called" )
- StopShowWaitNote();
-
- TSatUiResponse response( ESatSuccess );
-
- delete iTitle;
- iTitle = NULL;
-
- TFLOGSTRING2( "CSatUiViewAppUi::SelectItemL length of aText %d",
- aText.Length() )
- if ( aText.Length() > 0 )
- {
- iTitle = aText.AllocL();
- }
- else if ( iAppName )
- {
- TFLOGSTRING( "CSatUiViewAppUi::SelectItemL there is appname" )
- iTitle = iAppName->AllocL();
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::SelectItemL read appname" )
- //Reads a resource string with memory allocation
- iTitle = StringLoader::LoadL( R_QTN_SAT_TITLE, iCoeEnv );
- }
-
- if ( iSelectItemFirst )
- {
- iSelectItemFirst = EFalse;
- iSelectItemView = CSatUiView::NewL( EFalse, this, EFalse );
-
- // transfer ownership to CAknViewAppUi:
- AddViewL( iSelectItemView );
- }
-
- iSelectItemPending = ETrue;
- iActiveView = KSelectItemViewId;
-
- //set contextpane icon and item icons
- iSelectItemView->SetIconL( aIconBitmap );
- iSelectItemView->SetItemsIconL( aItemsIconArray, aSelfExplanatoryItems );
- response = iSelectItemView->SelectItemL( iTitle, aMenuItems,
- aMenuItemNextActions, aDefaultItem, aSelection, aHelpIsAvailable );
-
- iSelectItemPending = EFalse;
-
- if ( iEndKeyPressed )
- {
- response = ESatSessionTerminatedByUser;
- }
-
- if ( response != ESatSessionTerminatedByUser )
- {
- ShowWaitNoteL();
- }
-
- TFLOGSTRING2( "CSatUiViewAppUi::SelectItemL exit, return: %d", response )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::MatoPrepareComplete
-// Indicates success or failure.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::MatoPrepareComplete(TInt aError)
- {
- TFLOGSTRING( "CSatUiViewAppUi::MatoPrepareComplete called" )
- TFLOGSTRING2( "CSatUiViewAppUi::MatoPrepareComplete error %i", aError )
- if ( KErrNone == aError )
- {
- iPlayToneError = ESatSuccess;
-
- TTimeIntervalMicroSeconds zero( static_cast<TInt64>( 0 ) );
-
- iPlayer->SetPriority( KAudioPriorityLowLevel,
- STATIC_CAST( TMdaPriorityPreference, KAudioPrefConfirmation ) );
-
- iPlayer->SetRepeats( KMdaAudioToneRepeatForever, zero );
-
- iPlayer->Play();
- }
- else
- {
- iPlayToneError = ESatFailure;
- }
- TFLOGSTRING( "CSatUiViewAppUi::MatoPrepareComplete exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::MatoPlayComplete
-// Indicates success or failure.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::MatoPlayComplete( TInt aError )
- {
- TFLOGSTRING( "CSatUiViewAppUi::MatoPlayComplete calling" )
- if ( KErrNone == aError && iPlayer )
- {
- TFLOGSTRING( "CSatUiViewAppUi::MatoPlayComplete play" )
- iPlayer->Play();
- }
- else if ( iWait && iWait->IsStarted() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::MatoPlayComplete stop playing" )
- // Stops playing if error.
- iWait->AsyncStop();
- }
- TFLOGSTRING2( "CSatUiViewAppUi::MatoPlayComplete exit, error %i", aError )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::PlayStandardToneL
-// Plays Standard Tone. If needed displays the text in a note
-// while playing.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiViewAppUi::PlayStandardToneL(
- const TDesC& aText,
- const TDesC8& aSequence,
- TTimeIntervalMicroSeconds aDuration,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory )
- {
- TFLOGSTRING( "CSatUiViewAppUi::PlayStandardToneL called" )
- StopShowWaitNote();
- // Delete timer just in case e.g. if DisplayText was on the screen
- DestroyCallBackTimer();
-
- iPermanentNote = NULL;
- iTimerRepeatOn = EFalse;
-
- TFLOGSTRING2( "CSatUiViewAppUi::PlayStandardToneL length of aText %i", \
- aText.Length() )
- if (aText.Length() != 0)
- {
- iPermanentNote = new (ELeave) CAknStaticNoteDialog();
- iPermanentNote->PrepareLC( R_SATUI_PERMANENT_NOTE );
-
- if ( ( !aSelfExplanatory ) || ( !aIconBitmap ) )
- {
- // Set text
- iPermanentNote->SetTextL( aText );
- }
-
- if ( aIconBitmap )
- {
- //Set image
- TFLOGSTRING( "CSatUiViewAppUi::PlayStandardToneL SetImage" )
- // Get scalable bitmap if available.
- CEikImage* image = new ( ELeave ) CEikImage();
- CleanupStack::PushL( image );
- image->SetBitmap( aIconBitmap );
- iPermanentNote->SetImageL( image );
- CleanupStack::Pop( image );
- }
-
- iForegroundControl = iPermanentNote;
- iPermanentNote->RunLD();
- iPermanentNote->DrawNow();
- iCoeEnv->WsSession().Flush();
- }
-
- iPlayer = CMdaAudioToneUtility::NewL(*this);
-
- TInt volume( iPlayer->MaxVolume() );
- iPlayer->SetVolume( volume );
-
- iPlayer->PrepareToPlayDesSequence( aSequence );
-
- TTimeIntervalMicroSeconds max32Bit(
- static_cast<TInt64>( K32TIntMaxValue ) );
-
- if ( aDuration > max32Bit )
- {
- // since timers can only handle 32-bit values,
- // let's break the aDuration to smaller bits.
- // we break it here to 8 bits to fit in 32-bit value
- aDuration = aDuration.Int64() / KDivideByEight;
- iTimerRepeatOn = ETrue;
- }
-
- CreateCallBackTimerL( I64INT( aDuration.Int64() ), DelayCallback );
-
- if ( !iWait->IsStarted() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::PlayStandardToneL starting iWait" )
- iWait->Start();
- TFLOGSTRING( "CSatUiViewAppUi::PlayStandardToneL strarting done" )
- }
-
- iPlayer->CancelPlay();
-
- DestroyCallBackTimer();
-
- delete iPlayer;
- iPlayer = NULL;
-
- if ( iPermanentNote )
- {
- iPermanentNote->ExitSleepingDialog();
- delete iPermanentNote;
- iPermanentNote = NULL;
- }
- iForegroundControl = NULL;
-
- if ( !iEndKeyPressed )
- {
- ShowWaitNoteL();
- }
-
- //get warning and game tones setting from active profile
- GetProfileParamsL();
-
- if( ( EFalse == iWarningAndPlayTones ) &&
- ( ESatSuccess == iPlayToneError ) )
- {
- iPlayToneError = ESatSuccessToneNotPlayed;
- }
-
- TFLOGSTRING2( "CSatUiViewAppUi::PlayStandardToneL exit,return: %d", \
- iPlayToneError )
- return iPlayToneError;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ConfirmSendL
-// Displays a query to get confirmation for Send SMS,
-// Send SS or Send USSD command.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiViewAppUi::ConfirmSendL(
- const TDesC& /* aText */,
- TBool& aActionAccepted,
- TInt aType)
- {
- TFLOGSTRING2( "CSatUiViewAppUi::ConfirmSendL called, aType: %d", \
- aType )
- HBufC* textHolder = NULL;
-
- switch ( aType )
- {
- case ESatUiConfirmSendSms:
- textHolder = StringLoader::LoadLC( R_TEXT_SIMATK_SEND_SMS,
- iCoeEnv );
- break;
- case ESatUiConfirmSendSs:
- case ESatUiConfirmSendUssd: //the same string for SS and USSD
- textHolder = StringLoader::LoadLC( R_TEXT_SIMATK_SEND_SS,
- iCoeEnv );
- break;
- default:
- return ESatFailure;
- }
-
- TInt userResponse = RunQueryDialogL( R_SATUI_CONFIRM_SEND_CANCEL_QUERY,
- *textHolder, NULL, EFalse, ESatUiSoftkeySend );
-
- TFLOGSTRING2( "CSatUiViewAppUi::ConfirmSendL userResponse: %d", \
- userResponse )
- if ( userResponse )
- {
- aActionAccepted = ETrue;
- }
- else
- {
- aActionAccepted = EFalse;
- }
-
- if ( textHolder )
- {
- CleanupStack::PopAndDestroy( textHolder ); //textHolder
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmSendL return ESatSuccess" )
- return ESatSuccess;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ShowSmsWaitNoteL
-// Displays a wait note to indicate SMS sending.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::ShowSmsWaitNoteL( const TDesC& aText,
- const CFbsBitmap* aIconBitmapSendSM,
- const TBool aSelfExplanatoryIcon )
- {
-
- TFLOGSTRING( "CSatUiViewAppUi::ShowSmsWaitNoteL called" )
-
- iWaitNoteInUse = ETrue;
-
- TFLOGSTRING2( "CSatUiViewAppUi::ShowSmsWaitNoteL iWaitNote: %d", \
- iWaitNote )
- if ( NULL == iWaitNote )
- {
- iWaitNote = new(ELeave) CAknWaitDialog(
- ( REINTERPRET_CAST( CEikDialog**, &iWaitNote ) ), ETrue );
- iWaitNote->PrepareLC( R_SATUI_SMS_WAIT_NOTE );
-
- if ( ( aText.Length() > 0 ) && ( !aSelfExplanatoryIcon ||
- !aIconBitmapSendSM ) )
- {
- //Set text
- TFLOGSTRING( "CSatUiViewAppUi::ShowSmsWaitNoteL SetText" )
- iWaitNote->SetTextL( aText );
- }
-
- if ( aIconBitmapSendSM )
- {
- //Set image
- TFLOGSTRING( "CSatUiViewAppUi::ShowSmsWaitNoteL SetImage" )
- CEikImage* image = new ( ELeave ) CEikImage();
- CleanupStack::PushL( image );
- image->SetBitmap( aIconBitmapSendSM );
- iWaitNote->SetImageL( image );
- CleanupStack::Pop( image );
- }
-
- iForegroundControl = iWaitNote;
- iWaitNote->RunLD();
- // iForegroundControl won't be clear until the wait dialog
- // closed. It will avoid we lose the chance to set focus for
- // the wait dialog when the switch of foreground/background
- // happened.
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::ShowSmsWaitNoteL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ShowSsWaitNoteL
-// Displays a wait note to indicate SS sending.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::ShowSsWaitNoteL( const TDesC& aText,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatoryIcon )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowSsWaitNoteL called" )
-
- iWaitNoteInUse = ETrue;
-
- TFLOGSTRING2( "CSatUiViewAppUi::ShowSsWaitNoteL iWaitNote: %d", \
- iWaitNote )
- if ( !iWaitNote )
- {
- iWaitNote = new ( ELeave ) CSatUiWaitDialog(
- ( REINTERPRET_CAST ( CEikDialog**,&iWaitNote ) ),
- *iAdapter, ETrue );
- iForegroundControl = iWaitNote;
-
- TFLOGSTRING2( "CSatUiViewAppUi::ShowSsWaitNoteL length of aText: %d",\
- aText.Length() )
- // if there is an alpha id
- if ( aText.Length() > 0 )
- {
- // if there is not an icon or it's not self explanatory
- if ( ( !aSelfExplanatoryIcon ) || ( !aIconBitmap ) )
- {
- iWaitNote->SetTextL( aText );
- }
-
- if ( aIconBitmap )
- {
- //Set image
- TFLOGSTRING( "CSatUiViewAppUi::ShowSsWaitNoteL SetImage" )
- CEikImage* image = new ( ELeave ) CEikImage();
- CleanupStack::PushL( image );
- image->SetBitmap( aIconBitmap );
- iWaitNote->SetImageL( image );
- CleanupStack::Pop( image );
- }
-
- iWaitNote->ExecuteLD( R_SATUI_SS_WAIT_NOTE );
- }
- else
- {
- iWaitNote->ExecuteLD( R_SATUI_REQUESTING_WAIT_NOTE );
- }
- // iForegroundControl won't be clear until the wait dialog
- // closed. It will avoid we lose the chance to set focus for
- // the wait dialog when the switch of foreground/background
- // happened.
- }
- TFLOGSTRING( "CSatUiViewAppUi::ShowSsWaitNoteL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ShowDtmfWaitNoteL
-// Shows a wait note while DTMF are being sent.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiViewAppUi::ShowDtmfWaitNoteL( const TDesC& aText,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatoryIcon )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowDtmfWaitNoteL called" )
- TSatUiResponse response(ESatFailure);
-
- iWaitNoteInUse = ETrue;
-
- TFLOGSTRING2( "CSatUiViewAppUi::ShowDtmfWaitNoteL iWaitNote: %d", \
- iWaitNote )
- if ( !iWaitNote )
- {
- iWaitNote = new ( ELeave ) CSatUiWaitDialog(
- (REINTERPRET_CAST( CEikDialog**,&iWaitNote ) ), *iAdapter, ETrue );
-
- if ( ( aText.Length() > 0 ) &&
- ( ( !aSelfExplanatoryIcon ) || ( !aIconBitmap ) ) )
- {
- iWaitNote->SetTextL( aText );
- }
-
- if ( aIconBitmap )
- {
- //Set image
- TFLOGSTRING( "CSatUiViewAppUi::ShowDtmfWaitNoteL SetImage" )
- CEikImage* image = new ( ELeave ) CEikImage();
- CleanupStack::PushL( image );
- image->SetBitmap( aIconBitmap );
- iWaitNote->SetImageL( image );
- CleanupStack::Pop( image );
- }
-
- iForegroundControl = iWaitNote;
- iWaitNote->ExecuteLD( R_SATUI_DTMF_WAIT_NOTE );
- // iForegroundControl won't be clear until the wait dialog
- // closed. It will avoid we lose the chance to set focus for
- // the wait dialog when the switch of foreground/background
- // happened.
- response = ESatSuccess;
- }
- TFLOGSTRING2( "CSatUiViewAppUi::ShowDtmfWaitNoteL exit, return: %d",\
- response )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ConfirmRefreshL
-// Displays a query to get confirmation Refresh command.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiViewAppUi::ConfirmRefreshL(TBool& aActionAccepted)
- {
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmRefreshL called" )
- StopShowWaitNote();
-
- TSatUiResponse response( ESatSuccess );
-
- HBufC* textHolder = NULL;
-
- textHolder = StringLoader::LoadLC( R_QTN_SAT_QUERY_ALLOW_RESET,
- iCoeEnv );
-
- TInt userResponse = RunQueryDialogL( R_SATUI_CONFIRM_OK_CANCEL_QUERY,
- *textHolder, NULL, EFalse, EAknSoftkeyOk );
-
- TFLOGSTRING2( "CSatUiViewAppUi::ConfirmRefreshL userResponse: %d", \
- userResponse )
- if ( userResponse )
- {
- aActionAccepted = ETrue;
- }
- else
- {
- aActionAccepted = EFalse;
- }
-
- if ( textHolder )
- {
- CleanupStack::PopAndDestroy( textHolder ); //textHolder
- }
-
- ShowWaitNoteL();
-
- TFLOGSTRING2( "CSatUiViewAppUi::ConfirmRefreshL exit, return: %d",\
- response )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::CallControlL
-// Displays info about call control to user
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiViewAppUi::CallControlL(
- const TDesC& aText,
- const TSatAlphaIdStatus aAlphaIdStatus )
- {
- TFLOGSTRING( "CSatUiViewAppUi::CallControlL called" )
-
- if ( !iCcNote )
- {
- iCcNote = CAknGlobalNote::NewL();
- }
- iCcNote->SetTone( CAknNoteDialog::ENoTone );
-
- if ( ESatAlphaIdNotNull == aAlphaIdStatus )
- {
- TFLOGSTRING( "CSatUiViewAppUi::CallControlL AlphaIdNotNull" )
-
- // The note will be disabled by the phone UI when the call is
- // in connecting status. But call controll case is an exception, So we
- // use RAknKeyLock to enable soft notifications.
- RAknKeyLock keyLock;
- TInt errorCode = keyLock.Connect();
- TFLOGSTRING2( "CSatUiViewAppUi::CallControlL connect error %d", \
- errorCode )
- if ( KErrNone == errorCode )
- {
- keyLock.EnableSoftNotifications( ETrue );
- }
- keyLock.Close();
-
- iCcNote->SetSoftkeys( R_AVKON_SOFTKEYS_OK_EMPTY );
- iCcNoteId = iCcNote->ShowNoteL(
- EAknGlobalInformationNote, aText );
- CreateCallBackTimerL( K3Seconds, CloseCallControlNoteL );
- if ( iWait && !iWait->IsStarted() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::CallControlL iWait starting" )
- iWait->Start();
- }
- DestroyCallBackTimer();
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::CallControlL AlphaId Null" )
- iCcNote->ShowNoteL( EAknGlobalInformationNote, aText );
- }
-
- if ( iCcNote )
- {
- delete iCcNote;
- iCcNote = NULL;
- }
- TFLOGSTRING( "CSatUiViewAppUi::CallControlL exit" )
-
- return ESatSuccess;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::MoSmControlL
-// Displays info about Mo SM control to user
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiViewAppUi::MoSmControlL(
- const TDesC& aText,
- const TSatAlphaIdStatus aAlphaIdStatus )
- {
- TFLOGSTRING( "CSatUiViewAppUi::MoSmControlL called" )
- if ( ESatAlphaIdNotNull == aAlphaIdStatus )
- {
- TFLOGSTRING( "CSatUiViewAppUi::MoSmControlL AlphaIdNotNull" )
- CAknNoteDialog* dialog = new (ELeave) CAknNoteDialog(
- REINTERPRET_CAST( CEikDialog**,&dialog ),
- CAknNoteDialog::ENoTone,
- CAknNoteDialog::ELongTimeout );
-
- dialog->PrepareLC( R_SATUI_MOSM_CONTROL_NOTE );
-
- dialog->SetTextL( aText );
-
- iForegroundControl = dialog;
- dialog->RunLD();
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::MoSmControlL AlphaId Null" )
- CAknNoteDialog* dialog = new (ELeave) CAknNoteDialog(
- REINTERPRET_CAST( CEikDialog**,&dialog ),
- CAknNoteDialog::ENoTone,
- CAknNoteDialog::ELongTimeout );
-
- dialog->PrepareLC( R_SATUI_INFORMATION_NOTE );
-
- dialog->SetTextL( aText );
-
- iForegroundControl = dialog;
- dialog->RunLD();
- }
- iForegroundControl = NULL;
- TFLOGSTRING( "CSatUiViewAppUi::MoSmControlL exit" )
- return ESatSuccess;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ConfirmLaunchBrowserL
-// Displays a query to get confirmation for Launch Browser
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::ConfirmLaunchBrowserL(
- const TDesC& aText,
- TBool& aActionAccepted,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmLaunchBrowserL called" )
-
- TInt resource( 0 );
-
- if ( aIconBitmap )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmLaunchBrowserL icon" )
- resource = R_SATUI_CONFIRM_OK_CANCEL_QUERY_WITH_ICON;
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmLaunchBrowserL no icon" )
- resource = R_SATUI_CONFIRM_OK_CANCEL_QUERY;
- }
-
- TInt userResponse = RunQueryDialogL( resource, aText, aIconBitmap,
- aSelfExplanatory, EAknSoftkeyOk );
-
- TFLOGSTRING2( "CSatUiViewAppUi::ConfirmLaunchBrowserL userResponse %d",\
- userResponse )
- if ( userResponse )
- {
- aActionAccepted = ETrue;
- }
- else
- {
- aActionAccepted = EFalse;
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmLaunchBrowserL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::HandleCommandL
-// Called by CSatUiView::HandleCommandL.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::HandleCommandL(
- TInt aCommand )
- {
- TFLOGSTRING2( "CSatUiViewAppUi::HandleCommandL called, aCommand: %d",\
- aCommand )
- switch ( aCommand )
- {
- case EEikCmdExit:
- {
- HandleExitCommandL();
- break;
- }
- case EAknCmdHelp:
- {
- //Show Series 60 Help
- HlpLauncher::LaunchHelpApplicationL( iEikonEnv->WsSession(),
- AppHelpContextL() );
- break;
- }
- default:
- break;
- }
- TFLOGSTRING( "CSatUiViewAppUi::HandleCommandL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::HandleExitCommandL
-// Handling of the exit softkey.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::HandleExitCommandL()
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL called" )
-
- if ( iBipWaitNote )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL iBipWaitNote" )
- SetCommandPending( EFalse );
- }
-
- if ( iWait )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL iWait " )
- if ( iWait->IsStarted() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL \
- iWait->AsyncStop()" )
- iWait->AsyncStop();
- }
- }
-
- CloseDialogs();
-
- if ( iEndKeyPressed )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL endkeypressed" )
- // Inform SAT Server that end key has been pressed
- iAdapter->SessionTerminated( EEndKeyUsed );
- }
-
- if ( !iCommandPending )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL !iCommandPending" )
-
- if ( iPlayer && EMdaAudioToneUtilityPlaying == iPlayer->State() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL cancel playtone")
- iPlayer->CancelPlay();
- }
-
- if ( iAudioPlayer )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL cancel \
- userselected tone" )
- iAudioPlayer->Stop();
- delete iAudioPlayer;
- iAudioPlayer = NULL;
- TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL\
- iAudioPlayer deleted" )
- }
- TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL exiting AppUI ")
- Exit();
- }
- if ( iWaitNoteInUse )
- {
- iCommandPending = EFalse;
- }
- if ( iSelectItemPending && !iEndKeyPressed )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL SelectItem pending" )
- iSessionTerminated = ETrue;
- iSelectItemView->HandleCommandL( ESatUiCmdExit );
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::HandleExitCommandL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::HandleWsEventL
-// Handling of the window server events.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::HandleWsEventL(
- const TWsEvent& aEvent,
- CCoeControl* aDestination )
- {
- switch ( aEvent.Type() )
- {
- // This is End key closing event. If this window server event is
- // received, by default application will be closed unless it is
- // the system application.
- case KAknUidValueEndKeyCloseEvent:
- {
- // Performs the same behaviour as when Exit softkey is pressed.
- TFLOGSTRING( "CSatUiViewAppUi::HandleWsEventL End key pressed" )
- iEndKeyPressed = ETrue;
- HandleExitCommandL();
- break;
- }
- case EEventPointer:
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleWsEventL EEventPointer" )
- const TPointerEvent& pointer = *( aEvent.Pointer() );
- const TPointerEvent::TType pointerType = pointer.iType;
-
- if ( ( TPointerEvent::EButton1Down == pointerType ) ||
- ( TPointerEvent::EButton2Down == pointerType ) ||
- ( TPointerEvent::EButton3Down == pointerType ) )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleWsEventL EEventPointer\
- handle the event" )
- // Check if we need to end play tone
- StopPlayToneL();
- }
- break;
- }
- case EEventKeyDown:
- {
- // Handles other user key presses
- TFLOGSTRING( "CSatUiViewAppUi::HandleWsEventL EEventKeyDown" )
- // Check if we need to end play tone
- StopPlayToneL();
- if ( iImmediateDigitResponse )
- {
- HandleImmediateDigitResponse( aEvent.Key()->iScanCode );
- }
- break;
- }
-
- default:
- break;
- }
- // Forwards event to the base class.
- CAknViewAppUi::HandleWsEventL( aEvent, aDestination );
- PriorityVerifyAndClose( aEvent );
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::HelpStatus
-// Help support status
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::HelpStatus( TBool aStatus )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HelpStatus calling" )
- iHelp = aStatus;
- TFLOGSTRING( "CSatUiViewAppUi::HelpStatus exiting" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::DelayCallback
-// Delay Callback function. Completes after predefined
-// time has passed
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TInt CSatUiViewAppUi::DelayCallback( TAny* aPtr )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DelayCallback calling" )
- if ( ((CSatUiViewAppUi* )aPtr)->iTimerRepeatOn )
- {
- if ( ((CSatUiViewAppUi* )aPtr)->iTimerRepeatCount++ == KDivideByEight )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 1" )
- if ( ((CSatUiViewAppUi* )aPtr)->iWait->IsStarted() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 2" )
- ((CSatUiViewAppUi* )aPtr)->iWait->AsyncStop();
- }
- if ( ( ( CSatUiViewAppUi* ) aPtr )->iGetInputDialog ||
- ( ( CSatUiViewAppUi* ) aPtr )->iQueryDialog )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 3" )
- ( ( CSatUiViewAppUi* ) aPtr )->
- iNoResponseFromUserAfterDelay = ETrue;
- ( ( CSatUiViewAppUi* ) aPtr )->CloseDialogs();
- }
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 4" )
- return ( ETrue );
- }
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 5" )
- if ( ((CSatUiViewAppUi* )aPtr)->iWait->IsStarted() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 6" )
- ((CSatUiViewAppUi* )aPtr)->iWait->AsyncStop();
- }
- }
-
- // Close DisplayText dialog if clearing after delay is requested
- if ( ((CSatUiViewAppUi* )aPtr)->iDisplayTextDialog ||
- ((CSatUiViewAppUi* )aPtr)->iDisplayTextIconDialog )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 7" )
- ( ( CSatUiViewAppUi* ) aPtr )->iNoResponseFromUserAfterDelay = ETrue;
- ( ( CSatUiViewAppUi* ) aPtr )->ClearScreen();
- }
- else if ( ( ( CSatUiViewAppUi* ) aPtr )->iGetInputDialog ||
- ( ( CSatUiViewAppUi* ) aPtr )->iQueryDialog )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DelayCallback -- 8" )
- ( ( CSatUiViewAppUi* ) aPtr )->iNoResponseFromUserAfterDelay = ETrue;
- ( ( CSatUiViewAppUi* ) aPtr )->CloseDialogs();
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::DelayCallback exiting" )
- return ( EFalse );
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::CreateCallBackTimerLC
-// Creates a callback timer
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::CreateCallBackTimerL( const TInt aDelay,
- TInt (*aFunction)(TAny* aPtr) )
- {
- TFLOGSTRING( "CSatUiViewAppUi::CreateCallBackTimerLC called" )
- iTimerRepeatCount = 0;
- iTimer = CPeriodic::NewL( CActive::EPriorityStandard );
-
- if ( iTimerRepeatOn )
- {
- TFLOGSTRING( "CSatUiViewAppUi::CreateCallBackTimerLC repeating" )
- iTimer->Start( aDelay, aDelay,
- TCallBack( aFunction, this ) );
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::CreateCallBackTimerLC \
- no repeating" )
- iTimer->Start( aDelay, KMicroSecondsInSecond,
- TCallBack( aFunction, this ) );
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::CreateCallBackTimerLC exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::DestroyCallBackTimer
-// Destroys the callback timer
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::DestroyCallBackTimer( )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DestroyCallBackTimer() called" )
- delete iTimer;
- iTimer = NULL;
- iTimerRepeatOn = EFalse;
- TFLOGSTRING( "CSatUiViewAppUi::DestroyCallBackTimer() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ProcessCommandParametersL
-// Takes care of external launching.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TBool CSatUiViewAppUi::ProcessCommandParametersL(
- TApaCommand aCommand,
- TFileName& aDocumentName,
- const TDesC8& aTail )
- {
- TFLOGSTRING2( "CSatUiViewAppUi::ProcessCommandParametersL called,\
- aCommand: %d", aCommand )
- // TApaCommand is 0 for SIM originated opening and 2 for user originated
- // opening. Empty view is only needed for SIM originated opening.
- if ( EApaCommandOpen == aCommand )
- {
- // Creates empty view for commands without view.
- CreateEmptyMenuL();
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::ProcessCommandParametersL exit" )
- return CAknViewAppUi::ProcessCommandParametersL( aCommand, aDocumentName,
- aTail );
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::DispatchUserInactive
-// Called when user has been inactive for a pre-defined time period
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TInt CSatUiViewAppUi::DispatchUserInactive( TAny* aPtr )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DispatchUserInactive calling" )
- ((CSatUiViewAppUi* )aPtr)->iNoResponseFromUserAfterDelay = ETrue;
-
- //lint -e{961} else block not needed.
- if ( ( ( CSatUiViewAppUi* ) aPtr )->iDisplayTextDialog ||
- ( ( CSatUiViewAppUi* ) aPtr )->iDisplayTextIconDialog )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DispatchUserInactive clear screen" )
- ( ( CSatUiViewAppUi* ) aPtr )->ClearScreen();
- }
- else if ( ( ( CSatUiViewAppUi* ) aPtr )->iQueryDialog ||
- ( (CSatUiViewAppUi* ) aPtr )->iGetInputDialog )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DispatchUserInactive close dialog" )
- ( ( CSatUiViewAppUi* ) aPtr )->CloseDialogs();
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::DispatchUserInactive exiting" )
- return (EFalse);
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::MakeGetInputBitmapMask
-// Make a mask for get input icon
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::MakeGetInputBitmapMask( CFbsBitmap* aMask,
- TSize aSize ) const
- {
- TFLOGSTRING( "CSatUiViewAppUi::MakeGetInputBitmapMask calling" )
- TInt width = aSize.iWidth;
- TInt height = aSize.iHeight;
- aMask->Create( TSize( width, height ), EColor16M );
-
- TBitmapUtil bitmap1Util( aMask );
- // Begin manipulation with bitmap1Util, setting initial pixel to 0,0
- bitmap1Util.Begin( TPoint( 0,0 ) );
-
- // Make mask which covers whole icon
- for ( TInt y = 0; y < height; y++ )
- {
- for ( TInt x = 0; x < width; x++ )
- {
- bitmap1Util.SetPos( TPoint( x, y ) );
- bitmap1Util.SetPixel( 0x0000ff );
- }
- }
- bitmap1Util.End();
- TFLOGSTRING( "CSatUiViewAppUi::MakeGetInputBitmapMask exiting" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::DispatchTimer
-// Dispatch iWait to action implementer.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::DispatchTimer( CActiveSchedulerWait& aWait )
- {
- TFLOGSTRING( "CSatUiViewAppUi::DispatchTimer calling" )
- iWait = &aWait;
- TFLOGSTRING( "CSatUiViewAppUi::DispatchTimer exiting" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::GetEndKey
-// Get a flag which is indicating if end key is pressed.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TBool CSatUiViewAppUi::GetEndKey()
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetEndKey calling-exiting" )
- return iEndKeyPressed;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::SetEndKey
-// Set a flag which is indicating if end key is pressed.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::SetEndKey( TBool aValue )
- {
- TFLOGSTRING2( "CSatUiViewAppUi::SetEndKey calling, aValue:%d", aValue )
- iEndKeyPressed = aValue;
- TFLOGSTRING( "CSatUiViewAppUi::SetEndKey exiting" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::SetCommandPending
-// Set a flag which is indicating proactive command is pending.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::SetCommandPending( TBool aValue )
- {
- TFLOGSTRING2( "CSatUiViewAppUi::SetCommandPending calling, aValue:%d", \
- aValue )
- iCommandPending = aValue;
- if ( aValue )
- {
- // Cancels a request to save RAM when higher than normal buffer size is
- // no longer required.
- CAknEnv::Static()->CancelWsBufferRequest( iReqWSBufferID );
- }
- TFLOGSTRING( "CSatUiViewAppUi::SetCommandPending exiting" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::CloseDialogs
-// Close all existing dialogs.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::CloseDialogs()
- {
- TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() called" )
- if ( iWaitNote || iBipWaitNote || iNoteDialog )
- {
- TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() StopShowWaitNote" )
- StopShowWaitNote();
- }
- if ( iDisplayTextDialog )
- {
- TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() iDisplayTextDialog" )
- delete iDisplayTextDialog;
- iDisplayTextDialog = NULL;
- iImmediateRsp = EFalse;
- }
- if ( iDisplayTextIconDialog )
- {
- TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() iDisplayTextIconDialog" )
- delete iDisplayTextIconDialog;
- iDisplayTextIconDialog = NULL;
- iImmediateRsp = EFalse;
- }
- if ( iGetInputDialog )
- {
- TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() iGetInputDialog" )
- TRAP_IGNORE( iGetInputDialog->DismissQueryL() )
- iGetInputDialog = NULL;
- }
- if ( iQueryDialog )
- {
- TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() iQueryDialog" )
- delete iQueryDialog;
- iQueryDialog = NULL;
- }
- if ( iPermanentNote )
- {
- TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() iPermanentNote" )
- // CAknNoteDialog has already performed deletion when user action.
- iPermanentNote = NULL;
- }
- TFLOGSTRING( "CSatUiViewAppUi::CloseDialogs() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::MapcInitComplete
-// Plays the tone.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::MapcInitComplete( TInt aError,
- const TTimeIntervalMicroSeconds& /*aDuration*/ )
- {
- TFLOGSTRING( "CSatUiViewAppUi::MapcInitComplete called" )
- // Audio player is initialised, so if there is no error, we can start
- // playing the tone.
- if( KErrNone == aError )
- {
- const TInt volume( Max( 0, Min( iVolume,
- iAudioPlayer->MaxVolume() ) ) );
- TFLOGSTRING2( "CSatUiViewAppUi::\
- MapcInitComplete SetVolume %i", volume )
- // Set volume according Settings.
- iAudioPlayer->SetVolume( volume );
- iAudioPlayer->Play();
- TFLOGSTRING( "CSatUiViewAppUi::MapcInitComplete Play" )
- }
- else
- {
- // Otherwise, we delete the initialised audio player.
- if ( iAudioPlayer )
- {
- TFLOGSTRING( "CSatUiViewAppUi::MapcInitComplete iAudioPlayer \
- true" )
- delete iAudioPlayer;
- iAudioPlayer = NULL;
- }
-
- // Remove also the note for play tone
- if ( iPermanentNote )
- {
- TFLOGSTRING( "CSatUiViewAppUi::MapcInitComplete iPermanentNote \
- true" )
- iPermanentNote->ExitSleepingDialog();
- delete iPermanentNote;
- iPermanentNote = NULL;
- }
-
- // If there was a duration for play tone, stop waiting
- if ( iWait->IsStarted() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::MapcInitComplete stop iWait" )
- iWait->AsyncStop();
- }
-
- TFLOGSTRING2( "CSatUiViewAppUi::MapcInitComplete Error %i", aError )
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::MapcInitComplete exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::MapcPlayComplete
-// Deletes audio player after playing is completed.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::MapcPlayComplete( TInt aError )
- {
- TFLOGSTRING( "CSatUiViewAppUi::MapcPlayComplete called" )
-
- // When playing is completed, deleting the audio player.
- if ( iAudioPlayer )
- {
- TFLOGSTRING( "CSatUiViewAppUi::MapcPlayComplete delete iAudioPlayer" )
- delete iAudioPlayer;
- iAudioPlayer = NULL;
- }
- // Remove note after play has completed.
- if ( iPermanentNote )
- {
- TFLOGSTRING( "CSatUiViewAppUi::MapcPlayComplete ExitSleepingDialog" )
- iPermanentNote->ExitSleepingDialog();
- delete iPermanentNote;
- iPermanentNote = NULL;
- }
- // Show wait note only for samples that have duration, otherwise there is
- // chance that wait note is not stopped.
- if ( TTimeIntervalMicroSeconds( static_cast<TInt64>( 0 ) ) != iDuration )
- {
- // It does not affect for tone playing if wait note
- // is not able to show.
- TFLOGSTRING( "CSatUiViewAppUi::MapcPlayComplete ShowWaitNoteL" )
- TRAP_IGNORE( ShowWaitNoteL() )
- }
-
- TFLOGSTRING2( "CSatUiViewAppUi::MapcPlayComplete exit, error:%i", aError )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::PlayUserSelectedToneL
-// Plays user selected tone from active Profile.
-// If needed displays the text in a note while playing.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiViewAppUi::PlayUserSelectedToneL(
- const TDesC& aText,
- TTimeIntervalMicroSeconds aDuration,
- TSatTone aTone,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory )
- {
- TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL called" )
- StopShowWaitNote();
- // Delete timer just in case e.g. if DisplayText was on the screen
- DestroyCallBackTimer();
-
- iPermanentNote = NULL;
- iDuration = aDuration;
-
- TFLOGSTRING2( "CSatUiViewAppUi::PlayUserSelectedToneL length of aText \
- %d", aText.Length() )
- if ( 0 != aText.Length() )
- {
- iPermanentNote = new (ELeave) CAknStaticNoteDialog();
- iPermanentNote->PrepareLC( R_SATUI_PERMANENT_NOTE );
-
- if ( ( !aSelfExplanatory ) || ( !aIconBitmap ) )
- {
- // Set text
- iPermanentNote->SetTextL( aText );
- }
-
- if ( aIconBitmap )
- {
- //Set image
- TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL SetImage" )
- CEikImage* image = new ( ELeave ) CEikImage();
- CleanupStack::PushL( image );
- image->SetBitmap( aIconBitmap );
- iPermanentNote->SetImageL( image );
- CleanupStack::Pop( image );
- }
-
- iPermanentNote->SetTimeout( CAknNoteDialog::ENoTimeout );
- iForegroundControl = iPermanentNote;
- iPermanentNote->RunLD();
- }
-
- // If several messages/calls arrive during a small amount of time and if the
- // message received or incoming call tone is already being played we do not
- // restart it.
- if ( iAudioPlayer )
- {
- TFLOGSTRING( "CSatUiViewAppUi::\
- PlayUserSelectedToneL Error - already played" )
- return ESatFailure;
- }
-
- // This defines name for the current message alert or incoming call tone.
- TBuf<KMaxSoundFileLength> soundFileName;
- GetProfileParamsL( aTone, &soundFileName );
- // This defines the behaviour to be adopted by an
- // audio client if a higher priority client takes over the device.
- TInt mdaPriority( KAudioPrefIncomingCall );
- // This is used to resolve conflicts when more than one client tries to
- // access the same sound output device simultaneously.
- TInt audioPriority( KAudioPriorityPhoneCall );
-
- TFLOGSTRING2( "CSatUiViewAppUi::PlayUserSelectedToneL\
- Volume is %i ", iVolume )
-
- // Creates the audio player.
- iAudioPlayer = CMdaAudioPlayerUtility::NewFilePlayerL(
- soundFileName,
- *this,
- audioPriority,
- ( TMdaPriorityPreference ) mdaPriority );
-
- if ( TTimeIntervalMicroSeconds( static_cast<TInt64>( 0 ) ) != aDuration )
- {
- TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL duration not 0" )
- TTimeIntervalMicroSeconds max32Bit(
- static_cast<TInt64>( K32TIntMaxValue ) );
- if ( aDuration > max32Bit )
- {
- // Timers can only handle 32-bit values
- // and 64-bit value is received.
- // Let's break the aDuration to smaller bits.
- // Divided here by 8 to fit in 32-bit maxvalue.
- // Loops 8 times in DelayCallback to play tone
- // right duration.
- aDuration = aDuration.Int64() / KDivideByEight;
- iTimerRepeatOn = ETrue;
- }
- iAudioPlayer->SetRepeats( KSoundPlayerRepeatForever,
- TTimeIntervalMicroSeconds(
- static_cast<TInt64>( 0 ) ) );
- CreateCallBackTimerL( I64INT( aDuration.Int64() ), DelayCallback );
-
- if ( !iWait->IsStarted() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL\
- starting iWait" )
- iWait->Start();
- TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL\
- strarting done" )
- }
-
- // Sample is played in forever loop for the duration.
- // After duration call back timers are destroyed
- DestroyCallBackTimer();
- // If player exists, stop playing and delete player. MapcPlayComplete
- // is not called because CallBackTimer stops the playing.
- if ( iAudioPlayer )
- {
- iAudioPlayer->Stop();
- delete iAudioPlayer;
- iAudioPlayer = NULL;
- TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL\
- iAudioPlayer deleted" )
- }
- // Remove note after play has completed.
- if ( iPermanentNote )
- {
- iPermanentNote->ExitSleepingDialog();
- delete iPermanentNote;
- iPermanentNote = NULL;
- }
- iForegroundControl = NULL;
-
- if ( !iEndKeyPressed )
- {
- ShowWaitNoteL();
- }
-
- }
- else
- {
- // If duration is zero then tone is played only once.
- // Playing duration is same as duration of the sample.
- iAudioPlayer->SetRepeats(
- 0, TTimeIntervalMicroSeconds( static_cast<TInt64>( 0 ) ) );
- TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL SetRepeats 0" )
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::PlayUserSelectedToneL exit" )
- if( EFalse == iWarningAndPlayTones )
- {
- return ESatSuccessToneNotPlayed;
- }
-
- return ESatSuccess;
- }
-
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ConfirmOpenChannelL
-// Displays a query to get confirmation for Open Channel command.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TSatUiResponse CSatUiViewAppUi::ConfirmOpenChannelL(
- const TDesC& aText,
- TBool& aActionAccepted,
- const CFbsBitmap* aIconBitmapOpenChannel,
- const TBool aSelfExplanatory )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmOpenChannelL called" )
-
- TSatUiResponse response( ESatSuccess );
- TInt resource( 0 );
- TPtrC textPtr( aText );
- HBufC* textHolder = NULL;
-
- if ( aIconBitmapOpenChannel )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmOpenChannelL have icon" )
- resource = R_SATUI_CONFIRM_OK_CANCEL_QUERY_WITH_ICON;
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmOpenChannelL no icon" )
- resource = R_SATUI_CONFIRM_OK_CANCEL_QUERY;
-
- TFLOGSTRING2( "CSatUiViewAppUi::ConfirmOpenChannelL length of \
- aText %d", aText.Length() )
- if ( 0 == aText.Length() )
- {
- textHolder = StringLoader::LoadLC( R_QTN_SAT_CONF_OPEN_CHANNEL_BIP,
- iCoeEnv );
- textPtr.Set( *textHolder );
- }
- }
-
- TInt userResponse = RunQueryDialogL( resource, textPtr,
- aIconBitmapOpenChannel, aSelfExplanatory, EAknSoftkeyOk );
-
- if ( textHolder )
- {
- CleanupStack::PopAndDestroy( textHolder );
- }
-
- if ( userResponse )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmOpenChannelL action accepted" )
- aActionAccepted = ETrue;
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmOpenChannelL action not \
- accepted" )
- aActionAccepted = EFalse;
- }
-
-
-
- ShowWaitNoteL();
-
- TFLOGSTRING2( "CSatUiViewAppUi::ConfirmOpenChannelL exit,return: %d",\
- response )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ShowBIPNoteL
-// Displays the BIP note.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::ShowBIPNoteL( TInt aCommand, const TDesC& aText,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL() called" )
- TFLOGSTRING2( "CSatUiViewAppUi::ShowBIPNoteL() aCommand: %d", aCommand )
-
- iWaitNoteInUse = ETrue;
- TBool showNote( EFalse );
- TInt resourceId( 0 );
- switch ( aCommand )
- {
- case ESendDataIdentier: // fall through
- case EReceiveDataIdentifier:
- {
- resourceId = R_SATUI_BIP_WAIT_NOTE;
- showNote = ETrue;
- break;
- }
- case ECloseChannelIdentifier:
- {
- HBufC* textHolder = StringLoader::LoadLC(
- R_QTN_SAT_CONF_CLOSE_CHANNEL_BIP, iCoeEnv );
-
- if ( !iNoteDialog )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL no NoteDialog" )
- iNoteDialog = new (ELeave) CAknNoteDialog(
- REINTERPRET_CAST( CEikDialog**, &iNoteDialog ),
- CAknNoteDialog::ENoTone,
- CAknNoteDialog::EShortTimeout );
-
- if ( aIconBitmap )
- {
- iNoteDialog->PrepareLC( R_SATUI_CLOSE_CHANNEL_ICON_NOTE );
- //Set image
- TFLOGSTRING(
- "CSatUiViewAppUi::ShowBIPNoteL SetImage" )
- CEikImage* image = new ( ELeave ) CEikImage();
- CleanupStack::PushL( image );
- image->SetBitmap( aIconBitmap );
- iNoteDialog->SetImageL( image );
- CleanupStack::Pop( image );
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL no Icon" )
- iNoteDialog->PrepareLC( R_SATUI_CLOSE_CHANNEL_NOTE );
- }
-
- // inform the user using received alpha id
- if ( ( aText.Length() > 0 ) &&
- ( !aSelfExplanatory || !aIconBitmap ) )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL using \
- received alpha id" )
- iNoteDialog->SetTextL( aText );
- }
- // inform the user using localized text
- else if ( aText.Length() == 0 )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL using \
- localized text" )
- iNoteDialog->SetTextL( *textHolder );
- }
-
- iForegroundControl = iNoteDialog;
- iNoteDialog->RunLD();
- // iForegroundControl won't be clear until the note dialog
- // closed. It will avoid we lose the chance to set focus for
- // the wait dialog when the switch of foreground/background
- // happened.
- }
-
- CleanupStack::PopAndDestroy( textHolder ); // textHolder
-
- showNote = EFalse;
- break;
- }
- default:
- {
- showNote = EFalse;
- break;
- }
- }
- if ( showNote )
- {
-
- // First, stop normal wait note.
- if ( iWaitNote )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL() Closing WaitNote" )
- TRAP_IGNORE( iWaitNote->ProcessFinishedL() )
- iWaitNote = NULL;
- }
-
- if ( !iBipWaitNote )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL() no BipWaitNote" )
- iBipWaitNote = new ( ELeave ) CSatUiWaitDialog(
- (REINTERPRET_CAST(CEikDialog**,&iBipWaitNote)),
- *iAdapter, ETrue );
-
- if ( ( aText.Length() > 0 ) && ( !aSelfExplanatory ||
- !aIconBitmap ) )
- {
- iBipWaitNote->SetTextL( aText );
- }
-
- if ( aIconBitmap )
- {
- //Set image
- TFLOGSTRING(
- "CSatUiViewAppUi::ShowBIPNoteL SetImage" )
- CEikImage* image = new ( ELeave ) CEikImage();
- CleanupStack::PushL( image );
- image->SetBitmap( aIconBitmap );
- iBipWaitNote->SetImageL( image );
- CleanupStack::Pop( image );
- }
-
- iForegroundControl = iBipWaitNote;
- iBipWaitNote->ExecuteLD( resourceId );
- // iForegroundControl won't be clear until the BipWait dialog
- // closed. It will avoid we lose the chance to set focus for
- // the wait dialog when the switch of foreground/background
- // happened.
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL() have BipWaitNote" )
- // BIP note already exists, update text if not with self
- // explanatory icon
- if ( ( aText.Length() > 0 ) &&
- ( !aSelfExplanatory || !aIconBitmap ) )
- {
- iBipWaitNote->SetTextL( aText );
- }
- else if ( aSelfExplanatory && aIconBitmap )
- {
- const TDesC emptyText( KNullDesC );
- iBipWaitNote->SetTextL( emptyText );
- }
- // BIP note already exists, update image
- if ( aIconBitmap )
- {
- //Set image
- TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL SetImage" )
- CEikImage* image = new ( ELeave ) CEikImage();
- CleanupStack::PushL( image );
- image->SetBitmap( aIconBitmap );
- iBipWaitNote->SetImageL( image );
- CleanupStack::Pop( image );
- }
- }
- }
- TFLOGSTRING( "CSatUiViewAppUi::ShowBIPNoteL() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::RemoveNullCharacters
-// Null characters are removed from text
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::RemoveNullCharacters( HBufC* aText )
- {
- TFLOGSTRING( "CSatUiViewAppUi::RemoveNullCharacters calling" )
- TPtr titleptr = aText->Des();
- TInt nullLocation( 0 );
- while ( ( nullLocation = titleptr.Locate( NULL ) ) >= 0 )
- {
- titleptr.Delete( nullLocation, 1 );
- }
- TFLOGSTRING( "CSatUiViewAppUi::RemoveNullCharacters exiting" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ConfirmSetUpCallL
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::ConfirmSetUpCallL(
- const TDesC& aText,
- const TDesC& aSimAppName,
- TBool& aActionAccepted,
- const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmSetUpCallL calling" )
-
- aActionAccepted = EFalse;
- TPtrC text( aText );
- HBufC* textHolder = NULL;
- HBufC* titleHolder = NULL;
- TInt resource( 0 );
-
- if ( aIconBitmap )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmSetUpCallL have icon" )
- resource = R_SATUI_CONFIRM_CALL_CANCEL_QUERY_WITH_ICON;
-
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmSetUpCallL no icon" )
- resource = R_SATUI_CONFIRM_CALL_CANCEL_QUERY;
-
- TFLOGSTRING2( "CSatUiViewAppUi::ConfirmSetUpCallL length of aText, \
- %d", aText.Length() )
- if ( aText.Length() == 0 )
- {
-
- if ( aSimAppName.Length() > 0 )
- {
- titleHolder = aSimAppName.AllocLC();
- }
- else
- {
- titleHolder = StringLoader::LoadLC( R_QTN_SAT_QUERY_TITLE,
- iCoeEnv );
- }
-
- textHolder = StringLoader::LoadLC( R_TEXT_CALL_SETUP_BY_SIMATK,
- *titleHolder, iCoeEnv );
-
- RemoveNullCharacters( textHolder );
-
- text.Set(*textHolder);
- }
- }
-
- TInt userResponse = RunQueryDialogL( resource, text, aIconBitmap,
- aSelfExplanatory, ESatUiSoftkeyCall );
-
- if ( textHolder )
- {
- CleanupStack::PopAndDestroy( textHolder ); //textHolder
- }
-
- if ( titleHolder )
- {
- CleanupStack::PopAndDestroy( titleHolder ); //titleHolder
- }
-
- if ( userResponse )
- {
- aActionAccepted = ETrue;
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::ConfirmSetUpCallL exiting" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ShowNotAvailableNoteL
-// Show note indicating SAT is not available
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::ShowNotAvailableNoteL()
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowNotAvailableNoteL() called" )
- CAknNoteDialog* noteDialog = new (ELeave) CAknNoteDialog(
- REINTERPRET_CAST(CEikDialog**,¬eDialog),
- CAknNoteDialog::ENoTone,
- CAknNoteDialog::ELongTimeout );
-
- HBufC* textHolder = StringLoader::LoadLC( R_QTN_SAT_SERVICES_NOT_AVAILABLE,
- iCoeEnv );
-
- noteDialog->PrepareLC( R_SATUI_INFORMATION_NOTE );
- noteDialog->SetTextL( *textHolder );
- iForegroundControl = noteDialog;
- noteDialog->RunLD();
- iForegroundControl = NULL;
-
- CleanupStack::PopAndDestroy( textHolder );
-
- TFLOGSTRING( "CSatUiViewAppUi::ShowNotAvailableNoteL() exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::RunQueryIconDialogL
-// Make and run note dialog with an icon
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TInt CSatUiViewAppUi::RunQueryDialogL(
- TInt aResourceId, const TDesC& aText, const CFbsBitmap* aIconBitmap,
- const TBool aSelfExplanatory, TInt aMskCommand )
- {
- TFLOGSTRING( "CSatUiViewAppUi::RunQueryDialogL called" )
- CEikImage* image = new(ELeave) CEikImage;
- CleanupStack::PushL( image );
- iQueryDialog = CAknQueryDialog::NewL();
- iQueryDialog->PrepareLC( aResourceId );
- TInt userResponse( 0 );
-
- if ( aIconBitmap )
- {
- TFLOGSTRING( "CSatUiViewAppUi::RunQueryDialogL set icon" )
- image->SetBitmap( aIconBitmap );
-
- // Create mask for icon bitmap
- CFbsBitmap* mask = new(ELeave) CFbsBitmap;
- TSize size = aIconBitmap->SizeInPixels();
- MakeGetInputBitmapMask( mask, size );
- image->SetMask( mask );
- // Add icon to query
- iQueryDialog->QueryHeading()->SetHeaderImageL( image );
- }
-
- if ( !aSelfExplanatory || !aIconBitmap )
- {
- TFLOGSTRING( "CSatUiViewAppUi::RunQueryDialogL set text" )
- TPtrC textPtr( aText );
- // Icon is not self-explanatory, show also text
- iQueryDialog->SetPromptL( textPtr );
- }
-
- // Set MSK same as LSK without any text causing the icon drawing
- iQueryDialog->ButtonGroupContainer().SetCommandL(
- CEikButtonGroupContainer::EMiddleSoftkeyPosition, aMskCommand,
- KSatEmptyDes );
- iForegroundControl = iQueryDialog;
- userResponse = iQueryDialog->RunLD();
- iForegroundControl = NULL;
- CleanupStack::PopAndDestroy( image ); // image
-
- iQueryDialog = NULL;
-
- TFLOGSTRING2( "CSatUiViewAppUi::RunQueryDialogL exit,return: %d", \
- userResponse )
- return userResponse;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::CloseSatUI
-// Start SatUi closing process
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::CloseSatUI()
- {
- TFLOGSTRING( "CSatUiViewAppUi::CloseSatUI called" )
-
- TRAP_IGNORE( HandleExitCommandL() );
-
- if ( !IsAppShutterRunning() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::CloseSatUI RunAppShutter" )
- RunAppShutter();
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::CloseSatUI exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::GetProfileParamsL
-// Get and store settings from current profile
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::GetProfileParamsL( TSatTone aTone /*= ESatToneNotSet*/,
- TDes* aToneName /*= NULL*/ )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetProfileParamsL calling" )
-
- MProfile* profile = NULL;
- MProfileEngine* engine = NULL;
-
- engine = CreateProfileEngineL();
- CleanupReleasePushL( *engine );
-
- profile = engine->ActiveProfileLC();
-
- const MProfileTones& tones = profile->ProfileTones();
-
- // Takes a current warning and gametones setting.
- const TProfileToneSettings& ts = tones.ToneSettings();
- iWarningAndPlayTones = ts.iWarningAndGameTones;
- iVolume = ts.iRingingVolume;
-
- if ( ( ESatUserSelectedToneIncomingSms == aTone ) && ( aToneName ) )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetProfileParamsL message tone" )
- aToneName->Copy( tones.MessageAlertTone() );
- }
- else if( aToneName )
- {
- TFLOGSTRING( "CSatUiViewAppUi::GetProfileParamsL ring tone" )
- aToneName->Copy( tones.RingingTone1() );
- }
-
- CleanupStack::PopAndDestroy( 2 ); // engine, profile
-
- TFLOGSTRING( "CSatUiViewAppUi::GetProfileParamsL exits" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::HandleImmediateDigitResponse
-// Check received key event.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::HandleImmediateDigitResponse( TInt aScanCode )
- {
- TFLOGSTRING2( "CSatUiViewAppUi::HandleImmediateDigitResponse() code: %d",
- aScanCode )
- TBool closeDialog( ETrue );
-
- // If number button is pressed
- if ( ( KKeyZero <= aScanCode ) && ( KKeyNine >= aScanCode ) )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleImmediateDigitResponse press \
- digit 0-9" )
- iKey = aScanCode;
- }
- else if ( EStdKeyNkpAsterisk == aScanCode || KHwAsterisk == aScanCode )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleImmediateDigitResponse press \
- *" )
- iKey = 0x2A;
- }
- else if ( EStdKeyHash == aScanCode )
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleImmediateDigitResponse press \
- #" )
- iKey = 0x23;
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::HandleImmediateDigitResponse press \
- others" )
- closeDialog = EFalse;
- iKey = 0x00;
- }
-
- if( closeDialog )
- {
- CloseDialogs();
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::HandleImmediateDigitResponse exits" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::PriorityVerifyAndClose
-// Handle closing display text in high priority events
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::PriorityVerifyAndClose( const TWsEvent& aEvent )
- {
- TFLOGSTRING( "CSatUiViewAppUi::PriorityVerifyAndClose calling" )
-
- if ( ( iDisplayTextDialog || iDisplayTextIconDialog ) &&
- ( EEventFocusLost == aEvent.Type() ) )
- {
- // Open the WS server session.
- RWsSession wsSession;
- if ( KErrNone == wsSession.Connect() )
- {
- TInt wgFocus( wsSession.GetFocusWindowGroup() );
- TInt wgPriority(
- wsSession.GetWindowGroupOrdinalPriority( wgFocus ) );
- TFLOGSTRING2(
- "CSatUiViewAppUi::PriorityVerifyAndClose priority=%d",
- wgPriority )
-
- // For some reason window group priority for call dialogs was 0
- // so those cases must be checked in addition
- TInt callActiveState = EPSCTsyCallStateNone;
-
- // Get current call status from P&S
- const TInt errCode( RProperty::Get(
- KPSUidCtsyCallInformation,
- KCTsyCallState,
- callActiveState ) );
-
- // Receiving MT or creating MO call
- const TBool callIncoming(
- ( EPSCTsyCallStateAlerting == callActiveState ) ||
- ( EPSCTsyCallStateRinging == callActiveState ) ||
- ( EPSCTsyCallStateDialling == callActiveState ) );
- TFLOGSTRING2(
- "CSatUiViewAppUi::PriorityVerifyAndClose callActiveState=%d",
- callActiveState )
- TFLOGSTRING2(
- "CSatUiViewAppUi::PriorityVerifyAndClose iImmediateRsp=%d",
- iImmediateRsp )
-
- // If the new focus window group has high priority
- // close dialog
- if ( ( wgPriority > 0 && iForeground ) ||
- ( iImmediateRsp && callIncoming ) )
- {
- iHighPriorityEvent = ETrue;
- CloseDialogs();
- }
-
- wsSession.Close();
- }
- }
-
- TFLOGSTRING( "CSatUiViewAppUi::PriorityVerifyAndClose exiting" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::CloseCallControlNote
-// Call back method, close the note in call control.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TInt CSatUiViewAppUi::CloseCallControlNoteL( TAny* aPtr )
- {
- TFLOGSTRING( "CSatUiViewAppUi::CloseCallControlNote calling" )
-
- if ( !aPtr )
- {
- return KErrArgument;
- }
-
- CSatUiViewAppUi* pAppUi =
- reinterpret_cast<CSatUiViewAppUi*>( aPtr );
-
- TRAPD( err, pAppUi->iCcNote->CancelNoteL( pAppUi->iCcNoteId ) );
- if( KErrNone != err )
- {
- return err;
- }
-
- if ( pAppUi->iWait->IsStarted() )
- {
- pAppUi->iWait->AsyncStop();
- }
- delete pAppUi->iCcNote;
- pAppUi->iCcNote = NULL;
-
- TFLOGSTRING( "CSatUiViewAppUi::CloseCallControlNote exiting" )
-
- return 0;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewAppUi::ShowSsErrorNoteL
-// Show a Ss Error note.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewAppUi::ShowSsErrorNoteL()
- {
- TFLOGSTRING( "CSatUiViewAppUi::ShowSsErrorNoteL calling" )
- CAknNoteDialog* errorNote = new ( ELeave ) CAknNoteDialog(
- REINTERPRET_CAST( CEikDialog**,&errorNote ),
- CAknNoteDialog::ENoTone,
- CAknNoteDialog::ELongTimeout );
- CleanupStack::PushL( errorNote );
-
- HBufC* textHolder = StringLoader::LoadLC(R_TEXT_NOT_DONE, iCoeEnv );
- errorNote->SetTextL( *textHolder );
- CleanupStack::PopAndDestroy( textHolder );
- CleanupStack::Pop( errorNote );
- errorNote->ExecuteLD( R_SATUI_INFORMATION_NOTE );
-
- TFLOGSTRING( "CSatUiViewAppUi::ShowSsErrorNoteL exiting" )
- }
-
-// -----------------------------------------------------------------------------
-// CSatUiViewAppUi::ProfileState
-// Return current profile state
-// -----------------------------------------------------------------------------
-//
-TInt CSatUiViewAppUi::ProfileState()
- {
- TFLOGSTRING( "CSatUiViewAppUi::ProfileState called" )
-
- TInt profileId( 0 );
- CRepository* cr ( NULL );
-
- TRAPD( err, cr = CRepository::NewL( KCRUidProfileEngine ) );
- if ( ( KErrNone == err ) && cr )
- {
- TFLOGSTRING( "CSatUiViewAppUi::ProfileState no err" )
- // Get the ID of the currently active profile:
- cr->Get( KProEngActiveProfile, profileId );
- delete cr;
- }
-
- else
- {
- TFLOGSTRING2( "CR failed: %i", err )
- }
-
- TFLOGSTRING2( "CSatUiViewAppUi::ProfileState exit value: %d",
- profileId )
-
- return profileId;
- }
-// -----------------------------------------------------------------------------
-// CSatUiViewAppUi::StopPlayToneL
-// Stops playing play tone. Used when user terminates play tone
-// -----------------------------------------------------------------------------
-//
-void CSatUiViewAppUi::StopPlayToneL()
- {
- TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL called" )
- if ( iPlayer && iWait->IsStarted() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL\
- iPlayer exists" )
- iWait->AsyncStop();
- }
- if ( iAudioPlayer )
- {
- TFLOGSTRING( "StopPlayToneL iAudioPlayer exists" )
- if ( iWait->IsStarted() )
- {
- TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL\
- iWait started" )
- // Remove note when play has been interrupted.
- if ( iPermanentNote )
- {
- iPermanentNote->ExitSleepingDialog();
- delete iPermanentNote;
- iPermanentNote = NULL;
- }
- iWait->AsyncStop();
- }
- else
- {
- TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL\
- iWait not started" )
- iAudioPlayer->Stop();
- // When playing is stopped, deleting the audio player.
- // MapcPlayComplete is not called because user stops
- // the playing.
- if ( iAudioPlayer )
- {
- delete iAudioPlayer;
- iAudioPlayer = NULL;
- TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL\
- iAudioPlayer deleted" )
-
- // Remove note after play has completed.
- if ( iPermanentNote )
- {
- TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL\
- iPermanentNote true" )
- iPermanentNote->ExitSleepingDialog();
- delete iPermanentNote;
- iPermanentNote = NULL;
- }
-
- // Show wait note only for samples that have
- // duration, otherwise there is chance that wait
- // note is not stopped.
- if ( TTimeIntervalMicroSeconds(
- static_cast<TInt64>( 0 ) ) != iDuration )
- {
- ShowWaitNoteL();
- }
- }
- }
- }
- TFLOGSTRING( "CSatUiViewAppUi::StopPlayToneL exiting" )
- }
-
-// End of File
--- a/satui/satapp/SATUISrc/CSatUiViewContainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,271 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Defines CSatUiViewContainer class
-*
-*
-*/
-
-
-// INCLUDE FILES
-#include <eiktxlbx.h>
-#include <eiklbx.h> //for CEikListBox
-#include <barsread.h>
-#include <eikenv.h>
-#include <aknlists.h>
-
-#include <SatUi.rsg>
-
-#include <AknIconArray.h>
-#include <eikclbd.h>
-#include <AknDef.h> // New Akn header
-#include <csxhelp/sat.hlp.hrh> // For help
-
-#include "CSatUiApplication.h"
-#include "CSatUiViewContainer.h"
-#include "CSatUiView.h"
-#include "tflogger.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CSatUiViewContainer::CSatUiViewContainer( CSatUiView* aView ) :
- iView( aView )
- {
- }
-
-// ---------------------------------------------------------
-// CSatUiViewContainer::ConstructL
-// Symbian OS default constructor can leave.
-// (other items were commented in a header).
-// ---------------------------------------------------------.
-void CSatUiViewContainer::ConstructL( TBool aIconOn )
- {
- TFLOGSTRING( "CSatUiViewContainer::ConstructL called" )
- CreateWindowL();
- iIconOn = aIconOn;
-
- TResourceReader resourceReader;
-
- iCoeEnv->CreateResourceReaderLC( resourceReader ,
- R_SATUI_LISTBOX );
-
- //different listbox depends on item icon
- if ( iIconOn )
- {
- TFLOGSTRING( "CSatUiViewContainer::ConstructL iIconOn true" )
- iListBox = new (ELeave)
- CAknSingleGraphicStyleListBox;
- }
- else
- {
- TFLOGSTRING( "CSatUiViewContainer::ConstructL iIconOn false" )
- iListBox = new (ELeave) CAknSingleStyleListBox;
- }
-
- iListBox->SetContainerWindowL( *this );
-
- iListBox->ConstructFromResourceL( resourceReader );
-
- iListBox->CreateScrollBarFrameL( ETrue );
-
- iListBox->ScrollBarFrame()->SetScrollBarVisibilityL(
- CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );
-
- iListBox->ItemDrawer()->ColumnData()->EnableMarqueeL( ETrue );
-
- // resourceReader. Cannot add this as a parameter since
- // TResourceReader is not derived from CBase
- CleanupStack::PopAndDestroy();
- TFLOGSTRING( "CSatUiViewContainer::ConstructL exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewContainer::NewL
-// Two-phased constructor.
-// (other items were commented in a header).
-// ---------------------------------------------------------.
-CSatUiViewContainer* CSatUiViewContainer::NewL( TBool aIconOn,
- CSatUiView* aView )
- {
- TFLOGSTRING( "CSatUiViewContainer::NewL called-exit" )
- CSatUiViewContainer* self =
- new (ELeave) CSatUiViewContainer( aView );
-
- CleanupStack::PushL( self );
- self->ConstructL( aIconOn );
- CleanupStack::Pop( self );
-
- return self;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewContainer::~CSatUiViewContainer
-// Destructor.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-CSatUiViewContainer::~CSatUiViewContainer()
- {
- TFLOGSTRING( "CSatUiViewContainer::~CSatUiViewContainer called" )
- //need to reset first if contains icons
- if ( iListBox->ItemDrawer()->ColumnData()->IconArray() )
- {
- iListBox->ItemDrawer()->ColumnData()->IconArray()->Reset();
- }
- delete iListBox;
- TFLOGSTRING( "CSatUiViewContainer::~CSatUiViewContainer exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewContainer::ListBox
-// Returns a pointer to a listbox object.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-CAknColumnListBox* CSatUiViewContainer::ListBox()
- {
- TFLOGSTRING( "CSatUiViewContainer::ListBox called-exit" )
- return iListBox;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewContainer::CountComponentControls
-// The only control is a listbox.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TInt CSatUiViewContainer::CountComponentControls() const
- {
- TFLOGSTRING( "CSatUiViewContainer::CountComponentControls called-exit" )
- return 1;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewContainer::ComponentControl
-// The only control is a listbox.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-CCoeControl* CSatUiViewContainer::ComponentControl(
- TInt /* aIndex */) const
- {
- TFLOGSTRING( "CSatUiViewContainer::ComponentControl called-exit" )
- return iListBox;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewContainer::SizeChanged
-// Sets the available size.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewContainer::SizeChanged()
- {
- TFLOGSTRING( "CSatUiViewContainer::SizeChanged called" )
- TRect parentRect( Rect() );
- if ( iListBox )
- {
- iListBox->SetRect( parentRect );
- }
- TFLOGSTRING( "CSatUiViewContainer::SizeChanged exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewContainer::OfferKeyEventL
-// Listbox takes all event even if it doesn't use them.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-TKeyResponse CSatUiViewContainer::OfferKeyEventL(
- const TKeyEvent& aKeyEvent,
- TEventCode aType )
- {
- TFLOGSTRING( "CSatUiViewContainer::OfferKeyEventL called" )
- TKeyResponse response( EKeyWasNotConsumed );
-
- if ( ( EKeyLeftArrow != aKeyEvent.iCode ) &&
- ( EKeyRightArrow != aKeyEvent.iCode ) )
- {
- response = iListBox->OfferKeyEventL( aKeyEvent, aType );
- }
-
- if ( ( EKeyUpArrow == aKeyEvent.iCode ) ||
- ( EKeyDownArrow == aKeyEvent.iCode ) )
- {
- iView->UpdateMskL( iListBox->CurrentItemIndex(), EFalse );
- }
- TFLOGSTRING2( "CSatUiViewContainer::OfferKeyEventL exit, return: %d", \
- response )
- return response;
- }
-
-// ---------------------------------------------------------
-// CSatUiViewContainer::GetHelpContext
-// Returns SatUi help context.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewContainer::GetHelpContext(
- TCoeHelpContext& aContext ) const
- {
- TFLOGSTRING( "CSatUiViewContainer::GetHelpContext called" )
- aContext.iMajor = KUidSATUI;
- aContext.iContext = KSAT_HLP_APP;
- TFLOGSTRING( "CSatUiViewContainer::GetHelpContext exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewContainer::HandleResourceChange
-// Handles control's layout change.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewContainer::HandleResourceChange( TInt aType )
- {
- TFLOGSTRING2( "CSatUiViewContainer::HandleResourceChange called, \
- aType: %d", aType )
- if ( aType == KEikDynamicLayoutVariantSwitch )
- {
- TRect mainPaneRect;
- AknLayoutUtils::LayoutMetricsRect(
- AknLayoutUtils::EMainPane, mainPaneRect );
- SetRect( mainPaneRect );
- DrawDeferred();
- }
-
- CCoeControl::HandleResourceChange( aType );
- TFLOGSTRING( "CSatUiViewContainer::HandleResourceChange exit" )
- }
-
-// ---------------------------------------------------------
-// CSatUiViewContainer::FocusChanged
-// Indicate the requirements for control redrawing.
-// (other items were commented in a header).
-// ---------------------------------------------------------
-//
-void CSatUiViewContainer::FocusChanged( TDrawNow aDrawNow )
- {
- TFLOGSTRING( "CSatUiViewContainer::FocusChanged called" )
- CCoeControl::FocusChanged( aDrawNow );
- if ( iListBox )
- {
- iListBox->SetFocus( IsFocused(), aDrawNow );
- }
- TFLOGSTRING( "CSatUiViewContainer::FocusChanged exit" )
- }
-
-// End of File
--- a/satui/satapp/SATUISrc/CSatUiWaitDialog.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-/*
-* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Implements the feature for investigating length of the input. Softkeys
-* are set based on this information.
-*
-*
-*/
-
-
-#include <avkon.hrh>
-#include <avkon.rsg>
-#include <eikbtgpc.h>
-#include <msatuiadapter.h>
-#include <msatuiobserver.h>
-#include "CSatUiWaitDialog.h"
-#include "tflogger.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// C++ default constructor can NOT contain any code, that
-// might leave.
-//
-CSatUiWaitDialog::CSatUiWaitDialog(
- CEikDialog** aSelfPtr,
- MSatUiAdapter& aAdapter,
- TBool aVisibilityDelayOff ) :
- CAknWaitDialog( aSelfPtr, aVisibilityDelayOff ),
- iAdapter( aAdapter )
- {
- }
-
-// Destructor.
-CSatUiWaitDialog::~CSatUiWaitDialog()
- {
- }
-
-// ---------------------------------------------------------
-// CSatUiWaitDialog::OkToExitL()
-// ---------------------------------------------------------
-//
-TBool CSatUiWaitDialog::OkToExitL( TInt aButtonId )
- {
- TFLOGSTRING( "CSatUiWaitDialog::OkToExitL called" )
- if ( aButtonId == EAknSoftkeyCancel )
- {
- iAdapter.SessionTerminated( ESessionCancel );
- }
- TFLOGSTRING( "CSatUiWaitDialog::OkToExitL exit" )
- return ETrue;
- }
-// End of File
--- a/satui/satapp/SATUISrc/csatuiiconhandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,245 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Implementation of CSatUiIconHandler class.
-*
-*/
-
-
-#include <fbs.h>
-#include <rsatservice.h>
-#include <tsaticoninfo.h>
-
-#include "csatuiiconhandler.h"
-#include "tflogger.h"
-
-// ============================ MEMBER FUNCTIONS =============================
-
-// ---------------------------------------------------------------------------
-// First part of Two-phased constructor.
-// ---------------------------------------------------------------------------
-//
-CSatUiIconHandler* CSatUiIconHandler::NewL()
- {
- TFLOGSTRING( "CSatUiIconHandler::NewL enter" )
- CSatUiIconHandler* self = new ( ELeave ) CSatUiIconHandler;
- TFLOGSTRING( "CSatUiIconHandler::NewL exit" )
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// ---------------------------------------------------------------------------
-//
-CSatUiIconHandler::~CSatUiIconHandler()
- {
- TFLOGSTRING( "CSatUiIconHandler::~CSatUiIconHandler enter" )
- // Close RSatService interface
- iSatService.Close();
- TFLOGSTRING( "CSatUiIconHandler::~CSatUiIconHandler exit" )
- }
-
-// ---------------------------------------------------------------------------
-// Fetches first icon information, then the handle to the icon and at last
-// does the duplication of the icon bitmap. Object is set to wait the
-// completion of the request.
-// ---------------------------------------------------------------------------
-//
-CFbsBitmap* CSatUiIconHandler::FetchIconL( const RSatSession& aSatSession,
- const TUint8 aIconId,
- const TInt aOptWidth,
- const TInt aOptHeight,
- TBool& aIconSupport )
- {
- TFLOGSTRING( "CSatUiIconHandler::FetchIconL enter" )
- TFLOGSTRING3( "CSatUiIconHandler::FetchIconL aOptWidth=%d aOptHeight=%d",
- aOptWidth, aOptHeight )
-
- iSatService.OpenL( aSatSession );
- CleanupClosePushL( iSatService );
-
- RIconEf iconEf;
- CleanupClosePushL( iconEf );
- // Order of superiority list
- RArray<TInt> selectedIcons;
- CleanupClosePushL( selectedIcons );
- CFbsBitmap* iconBitmap = NULL;
-
- // Getting the information of the icon
- TRAPD( err, iSatService.GetIconInfoL( aIconId, iconEf ); );
-
- if ( KErrNone == err )
- {
- TFLOGSTRING( "CSatUiIconHandler::FetchIconL no error" )
- // Sorting into order of superiority
- SortIconsL( iconEf, selectedIcons, aOptWidth, aOptHeight );
-
- // Reset iconCount by approved icons
- const TInt iconCount = selectedIcons.Count() <= iconEf.Count() ?
- selectedIcons.Count() :
- iconEf.Count();
- TBool fetchSuccess( EFalse );
-
- TFLOGSTRING2( "CSatUiIconHandler::FetchIconL iconCount: %d", iconCount )
- // If there were icons to be fetched
- if ( 0 < iconCount )
- {
- // start going through approved icons list from the
- // first and biggest icon
- TInt counter( 0 );
- for ( counter = 0; ( counter < iconCount ) && !fetchSuccess;
- counter++ )
- {
- TInt selectedIconCounter = selectedIcons.operator[]( counter );
- TFLOGSTRING2( "CSatUiIconHandler::\
- FetchIconL selectedIconCounter: %d", selectedIconCounter )
- TRAPD( err,
- iconBitmap = iSatService.GetIconL( iconEf.operator[](
- selectedIconCounter ) ) );
- if ( KErrNone == err )
- {
- fetchSuccess = ETrue;
- TFLOGSTRING( "CSatUiIconHandler::FetchIconL fetchSuccess!" )
- }
- else
- {
- delete iconBitmap;
- }
- }
- }
- }
-
- TFLOGSTRING2( "CSatUiIconHandler::FetchIconL icon info error=%d", err )
- if ( KErrNotSupported == err )
- {
- TFLOGSTRING( "CSatUiIconHandler::FetchIconL icons not supported" )
- aIconSupport = EFalse;
- }
-
- // selectedIcons, iconEf and iSatService not deleted but closed
- CleanupStack::PopAndDestroy( 3, &iSatService );
-
- TFLOGSTRING( "CSatUiIconHandler::FetchIconL exit" )
- // Icon was not found, icons are not supported or an error was received.
- return iconBitmap;
- }
-
-// ---------------------------------------------------------------------------
-// C++ default constructor cannot contain any code that might leave.
-// ---------------------------------------------------------------------------
-//
-CSatUiIconHandler::CSatUiIconHandler()
- {
- TFLOGSTRING( "CSatUiIconHandler::CSatUiIconHandler enter - exit" )
- }
-
-// ---------------------------------------------------------------------------
-// Sorts icons into order of superiority
-// ---------------------------------------------------------------------------
-//
-void CSatUiIconHandler::SortIconsL( const RIconEf& aIconEf,
- RArray<TInt>& aSelectedIcons, const TInt aOptWidth,
- const TInt aOptHeight ) const
- {
- TFLOGSTRING( "CSatUiIconHandler::SortIcons enter" )
-
- const TInt iconCount = aIconEf.Count();
- TFLOGSTRING2( "CSatUiIconHandler::SortIcons iconCount=%d", iconCount )
- TInt counter( 0 );
- // Search icon from available iconarray
- for ( counter = 0; counter < iconCount; counter++ )
- {
- TFLOGSTRING3( "CSatUiIconHandler::SortIcons Icon Width=%d Height=%d",
- aIconEf.operator[]( counter ).IconSize().iWidth,
- aIconEf.operator[]( counter ).IconSize().iHeight )
-
- const TInt selectedCount( aSelectedIcons.Count() );
- TBool replacement( EFalse );
-
- // Count the difference of the icon versus layout
- TInt newWidthDifference(
- aOptWidth - aIconEf.operator[]( counter ).IconSize().iWidth );
- TInt newHeightDifference(
- aOptHeight - aIconEf.operator[]( counter ).IconSize().iHeight );
-
- // Make the difference absolute value
- if ( newWidthDifference < 0 )
- {
- newWidthDifference = -newWidthDifference;
- }
-
- if ( newHeightDifference < 0 )
- {
- newHeightDifference = -newHeightDifference;
- }
- TInt listCounter( 0 );
- // Going through the list of icons of suitable size
- for ( listCounter = 0; ( listCounter < selectedCount ) &&
- !replacement; listCounter++ )
- {
-
- // Count the difference of the icon versus layout
- TInt oldWidthDifference( aOptWidth - aIconEf.operator[](
- aSelectedIcons.operator[]( listCounter ) ).IconSize().iWidth );
- TInt oldHeightDifference( aOptHeight - aIconEf.operator[](
- aSelectedIcons.operator[]( listCounter ) ).IconSize().iHeight );
-
- // Make the difference absolute value
- if ( oldWidthDifference < 0 )
- {
- oldWidthDifference = -oldWidthDifference;
- }
-
- if ( oldHeightDifference < 0 )
- {
- oldHeightDifference = -oldHeightDifference;
- }
-
- // New icon is better either by being closer to the layout or by
- // being same size and color instead of black and white
- if ( ( ( newWidthDifference < oldWidthDifference ) &&
- ( newHeightDifference <= oldHeightDifference ) ) ||
- ( ( newWidthDifference <= oldWidthDifference ) &&
- ( newHeightDifference < oldHeightDifference ) ) ||
- ( ( newWidthDifference == oldWidthDifference ) &&
- ( newHeightDifference == oldHeightDifference ) &&
- ( TSatIconInfo::EBasic == aIconEf.operator[]( aSelectedIcons.
- operator[]( listCounter ) ).CodingScheme() ) &&
- ( TSatIconInfo::EColor == aIconEf.operator[]( counter ).
- CodingScheme() ) ) )
- {
- TFLOGSTRING2( "CSatUiIconHandler::SortIcons \
- newWidthDifference: %d", newWidthDifference )
- TFLOGSTRING2( "CSatUiIconHandler::SortIcons \
- oldHeightDifference: %d", oldHeightDifference )
- // Insert new icon to correct place
- aSelectedIcons.InsertL( counter, listCounter );
- replacement = ETrue;
- }
- }
-
- TFLOGSTRING2( "CSatUiIconHandler::SortIcons listCounter: %d", \
- listCounter )
- // Either first item or was not better than any in the list
- // New icon is added to the end of the array
- if ( !replacement )
- {
- aSelectedIcons.AppendL( counter );
- }
- }
-
- TFLOGSTRING2( "CSatUiIconHandler::SortIcons counter: %d", \
- counter )
- TFLOGSTRING( "CSatUiIconHandler::SortIcons exit" )
- }
-
--- a/satui/satapp/aif/Satui.rss Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +0,0 @@
-/*
-* Copyright (c) 2002-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* Application information (AIF) resource file for SatUi application.
-*
-*
-*/
-
-
-// INCLUDES
-
-#include <aiftool.rh>
-#include <satui.loc>
-
-// RESOURCE DEFINITIONS
-
-RESOURCE AIF_DATA
- {
- // App UID
- app_uid = 0x101f4ce0;
-
- // Number of icons
- num_icons = 2;
-
- // Application capabilities
- hidden = KAppIsHidden;
- embeddability = KAppNotEmbeddable;
- newfile = KAppDoesNotSupportNewFile;
- }
-
-// End of File
--- a/satui/satapp/aif/Satui_caption.rss Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource file.
-*
-*/
-
-
-#include <satui.loc>
-#include <apcaptionfile.rh>
-
-// ---------------------------------------------------------
-//
-// Application captions.
-//
-// ---------------------------------------------------------
-//
-RESOURCE CAPTION_DATA
- {
- caption = qtn_apps_simapps_list;
- shortcaption = qtn_apps_simapps_grid;
- }
--- a/satui/satapp/aif/TSatui.rss Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-/*
-* Copyright (c) 2003 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Application information (AIF) resource file for SatUi
-* application.
-*
-*/
-
-
-// INCLUDES
-
-#include <aiftool.rh>
-#include <satui.loc>
-
-// RESOURCE DEFINITIONS
-
-/*
------------------------------------------------------------------------------
-
- AIF_DATA
-
- Standard EPOC application information structure.
-
------------------------------------------------------------------------------
-*/
-RESOURCE AIF_DATA
- {
- // App UID
- app_uid = 0x101f4ce0;
-
- // Number of icons
- num_icons = 2;
-
- // Application capabilities
- hidden = KAppNotHidden;
- embeddability = KAppNotEmbeddable;
- newfile = KAppDoesNotSupportNewFile;
- }
-
-// End of File
--- a/satui/satapp/bmarm/SATSHELLCNTRLU.DEF Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- NewSatController__Fv @ 1 NONAME R3UNUSED ; NewSatController(void)
-
--- a/satui/satapp/bwins/SATSHELLCNTRLU.DEF Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
- ?NewSatController@@YAPAVMSatShellController@@XZ @ 1 NONAME ; class MSatShellController * __cdecl NewSatController(void)
-
Binary file satui/satapp/data/SatApp_stub.SIS has changed
--- a/satui/satapp/data/SatUi.rss Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,1760 +0,0 @@
-/*
-* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-* This file contains all the resources for the module.
-*
-*/
-
-
-// RESOURCE IDENTIFIER
-NAME SATU
-
-// INCLUDES
-#include <eikon.rsg>
-#include <eikon.rh>
-
-#include <avkon.rsg>
-#include <avkon.hrh>
-#include <avkon.rh>
-#include <avkon.loc>
-#include <avkon.mbg>
-#include <AvkonIcons.hrh> // AVKON_ICON_FILE
-#include <appinfo.rh> //2.8 SCALABLE UI
-
-#include <satui.mbg>
-#include "satui.hrh"
-#include <satui.loc>
-#include <data_caging_paths_strings.hrh>
-
-
-#define satui_bitmap_file APP_BITMAP_DIR"\\satui.mbm"
-
-#define avkon_bitmap_file AVKON_ICON_FILE
-
-#define space " "
-
-// RESOURCE DEFINITIONS
-
-// ---------------------------------------------------------
-//
-// Standard resource signature.
-//
-// ---------------------------------------------------------
-//
-RESOURCE RSS_SIGNATURE { }
-
-// ---------------------------------------------------------
-//
-// Unique name-identifier.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF16 { buf = "SATU"; }
-
-// ---------------------------------------------------------
-//
-// This is used when you enter first time to
-// the application.
-//
-// ---------------------------------------------------------
-//
-RESOURCE EIK_APP_INFO
- {
- }
-
-RESOURCE LOCALISABLE_APP_INFO r_satui_localisable_app_info
- {
- short_caption = qtn_apps_simapps_grid;
- caption_and_icon =
- CAPTION_AND_ICON_INFO
- {
- caption = qtn_apps_simapps_list;
-#ifdef __SCALABLE_ICONS
- number_of_icons = 1;
-
- icon_file = APP_BITMAP_DIR"\\Satui_aif.mif";
-
-#else
- number_of_icons = 2;
-
- icon_file = APP_BITMAP_DIR"\\Satui_aif.mbm";
-
-#endif //__SCALABLE_ICONS
- };
- }
-
-
-/******************** SET UP MENU *************************/
-
-//----------------------------------------------------------
-//
-// r_satui_setupmenu_view
-// Defines the main view
-//
-//----------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_satui_setupmenu_view
- {
- cba = R_AVKON_SOFTKEYS_OPTIONS_EXIT;
- menubar = r_satui_setupmenu_menubar;
- }
-
-//----------------------------------------------------------
-//
-// r_satui_setupmenu_menubar
-// Defines the menu bar on the view
-//
-//----------------------------------------------------------
-//
-RESOURCE MENU_BAR r_satui_setupmenu_menubar
- {
- titles=
- {
- MENU_TITLE {menu_pane = r_satui_setupmenu_options_menu;}
- };
- }
-
-// ---------------------------------------------------------
-//
-// r_satui_setupmenu_options_menu
-// Defines the menu pane on the view
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_PANE r_satui_setupmenu_options_menu
- {
- items=
- {
- MENU_ITEM
- { command = ESatUiCmdSelect;
- txt = qtn_sat_option_select;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- { command = EAknCmdHelp;
- txt = qtn_options_help;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- { command = EAknCmdExit;
- txt = qtn_options_exit;
- }
- };
- }
-
-/******************** SELECT ITEM *************************/
-
-// ---------------------------------------------------------
-//
-// r_satui_selectitem_view
-// Defines the SelectItem view
-//
-// ---------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_satui_selectitem_view
- {
- cba = R_AVKON_SOFTKEYS_SELECTION_LIST;
- menubar = r_satui_selectitem_menubar;
- }
-
-//----------------------------------------------------------
-//
-// r_satui_selectitem_menubar
-// Defines the menu bar on the view
-//
-//----------------------------------------------------------
-//
-RESOURCE MENU_BAR r_satui_selectitem_menubar
- {
- titles=
- {
- MENU_TITLE {menu_pane = r_satui_selectitem_options_menu;}
- };
- }
-
-// ---------------------------------------------------------
-//
-// r_satui_selectitem_options_menu
-// Defines the menu pane on the view
-//
-// ---------------------------------------------------------
-//
-RESOURCE MENU_PANE r_satui_selectitem_options_menu
- {
- items=
- {
- MENU_ITEM
- { command = ESatUiCmdSelect;
- txt = qtn_sat_option_select;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- { command = EAknCmdHelp;
- txt = qtn_options_help;
- flags = EEikMenuItemSpecific;
- },
- MENU_ITEM
- { command = ESatUiCmdExit;
- txt = qtn_options_exit;
- }
- };
- }
-
-// ---------------------------------------------------------
-//
-// r_satui_listbox
-// Defines the listbox on the main pane
-//
-// ---------------------------------------------------------
-//
-RESOURCE LISTBOX r_satui_listbox
- {
- flags = EAknListBoxSelectionList;
- }
-
-/******************** EMPTY MENU **************************/
-
-//----------------------------------------------------------
-//
-// r_satui_emptymenu_view
-// Defines the main view
-//
-//----------------------------------------------------------
-//
-RESOURCE AVKON_VIEW r_satui_emptymenu_view
- {
- cba = R_AVKON_SOFTKEYS_EMPTY;
- menubar = r_satui_setupmenu_menubar;
- }
-
-/********************** DIALOGS ***************************/
-
-//----------------------------------------------------------
-//
-// r_satui_wait_note
-// Defines the wait note
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_wait_note
- {
- flags = EAknWaitNoteFlags;
-
- buttons = R_AVKON_SOFTKEYS_EMPTY;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiWaitNote;
- control = AVKON_NOTE
- {
- layout = EWaitLayout;
- singular_label = qtn_gen_note_processing;
- imagefile = satui_bitmap_file;
- imageid = EMbmSatuiQgn_note_sim;
- imagemask = EMbmSatuiQgn_note_sim_mask;
- animation = R_QGN_GRAF_WAIT_BAR_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_wait_note_with_cancel
-// Defines the wait note with cancel (modal dialog)
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_wait_note_with_cancel
- {
- flags = EAknWaitNoteFlags | EEikDialogFlagWait;
-
- buttons = R_AVKON_SOFTKEYS_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiWaitNoteWithCancel;
- control = AVKON_NOTE
- {
- layout = EWaitLayout;
- singular_label = qtn_gen_note_processing;
- imagefile = satui_bitmap_file;
- imageid = EMbmSatuiQgn_note_sim;
- imagemask = EMbmSatuiQgn_note_sim_mask;
- animation = R_QGN_GRAF_WAIT_BAR_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_refresh_wait_note
-// Defines the refresh wait note
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_refresh_wait_note
- {
- flags = EAknWaitNoteFlags;
-
- buttons = R_AVKON_SOFTKEYS_EMPTY;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiRefreshWaitNote;
- control = AVKON_NOTE
- {
- layout = EWaitLayout;
- singular_label = qtn_sat_wait_refresh_update;
- animation = R_QGN_GRAF_WAIT_BAR_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_sms_wait_note
-// Defines the sms sending wait note
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_sms_wait_note
- {
- flags = EAknWaitNoteFlags;
-
- buttons = R_AVKON_SOFTKEYS_EMPTY;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiSmsWaitNote;
- control = AVKON_NOTE
- {
- layout = EWaitLayout;
- animation = R_QGN_GRAF_WAIT_BAR_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_ss_wait_note
-// Defines the ss sending wait note
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_ss_wait_note
- {
- flags = EAknWaitNoteFlags;
-
- buttons = R_AVKON_SOFTKEYS_EMPTY;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiSsWaitNote;
- control = AVKON_NOTE
- {
- layout = EWaitLayout;
- singular_label = qtn_sat_sending_sms;
- animation = R_QGN_GRAF_WAIT_BAR_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_dtmf_wait_note
-// Defines the dtmf sending wait note
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_dtmf_wait_note
- {
- flags = EAknWaitNoteFlags;
-
- buttons = R_AVKON_SOFTKEYS_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiDtmfWaitNote;
- control = AVKON_NOTE
- {
- // text will be set at run-time
- layout = EWaitLayout;
- animation = R_QGN_GRAF_WAIT_BAR_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_permanent_note
-// Defines the permanent note
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_permanent_note
- {
- flags = EEikDialogFlagNoDrag |
- EEikDialogFlagNoTitleBar |
- EEikDialogFlagCbaButtons;
-
- buttons = R_AVKON_SOFTKEYS_EMPTY;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiPermanentNote;
- control = AVKON_NOTE
- {
- layout = EGeneralLayout;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_confirm_yes_no_query
-// Defines the yes/no confirmation query
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_confirm_yes_no_query
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_YES_NO;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- animation = R_QGN_NOTE_QUERY_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_confirm_yes_no_query_with_icon
-// Defines the yes/no confirmation query with icon
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_confirm_yes_no_query_with_icon
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_YES_NO;
- items =
- {
- DLG_LINE
- {
- type = EAknCtPopupHeadingPane;
- id = EAknMessageQueryHeaderId;
- control = AVKON_HEADING
- {
- label = space;
- };
- },
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- animation = R_QGN_NOTE_QUERY_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_immediate_digit_query
-// Defines the immediate digit response query
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_immediate_digit_query
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- animation = R_QGN_NOTE_QUERY_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_immediate_digit_note_with_icon
-// Defines the immediate digit response note with icon
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_immediate_digit_note_with_icon
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtPopupHeadingPane;
- id = EAknMessageQueryHeaderId;
- control = AVKON_HEADING
- {
- label = space;
- };
- },
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- animation = R_QGN_NOTE_QUERY_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_confirm_ok_cancel_query
-// Defines the ok/cancel confirmation query
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_confirm_ok_cancel_query
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- animation = R_QGN_NOTE_QUERY_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_confirm_ok_cancel_query_with_icon
-// Defines the ok/cancel confirmation query with icon
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_confirm_ok_cancel_query_with_icon
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtPopupHeadingPane;
- id = EAknMessageQueryHeaderId;
- control = AVKON_HEADING
- {
- label = space;
- };
- },
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- animation = R_QGN_NOTE_QUERY_ANIM;
- };
- }
-
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_confirm_send_cancel_query
-// Defines the send/cancel confirmation query
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_confirm_send_cancel_query
- {
- flags = EGeneralQueryFlags;
- buttons = r_satui_softkeys_send_cancel;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- animation = R_QGN_NOTE_QUERY_ANIM;
- };
- }
- };
- }
-
-
-
-//----------------------------------------------------------
-//
-// r_satui_confirm_call_cancel_query
-// Defines the call/cancel confirmation query
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_confirm_call_cancel_query
- {
- flags = EGeneralQueryFlags;
- buttons = r_satui_softkeys_call_cancel;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- animation = R_QGN_NOTE_QUERY_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_confirm_call_cancel_query_with_icon
-// Defines the call/cancel confirmation query
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_confirm_call_cancel_query_with_icon
- {
- flags = EGeneralQueryFlags;
- buttons = r_satui_softkeys_call_cancel;
- items =
- {
- DLG_LINE
- {
- type = EAknCtPopupHeadingPane;
- id = EAknMessageQueryHeaderId;
- control = AVKON_HEADING
- {
- label = space;
- };
- },
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_CONFIRMATION_QUERY
- {
- layout = EConfirmationLayout;
- animation = R_QGN_NOTE_QUERY_ANIM;
- };
- }
-
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_information_note
-// Defines the information note
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_information_note
- {
- flags = EEikDialogFlagNoDrag |
- EEikDialogFlagNoTitleBar |
- EEikDialogFlagCbaButtons |
- EEikDialogFlagWait;
-
- buttons = R_AVKON_SOFTKEYS_EMPTY;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiInformationNote;
- control = AVKON_NOTE
- {
- layout = EGeneralLayout;
- singular_label = space;
- animation = R_QGN_NOTE_INFO_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_call_control_note
-// Defines the call control
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_call_control_note
- {
- flags = EGeneralQueryFlags;
-
- buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiInformationNote;
- control = AVKON_NOTE
- {
- layout = EGeneralLayout;
- singular_label = space;
- animation = R_QGN_NOTE_INFO_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_mosm_control_note
-// Defines the mo sm control note
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_mosm_control_note
- {
- flags = EGeneralQueryFlags;
-
- buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiInformationNote;
- control = AVKON_NOTE
- {
- layout = EGeneralLayout;
- singular_label = space;
- animation = R_QGN_NOTE_INFO_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_message
-// Defines the message query
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_message
- {
- flags = EGeneralQueryFlags|
- EEikDialogFlagNoBorder|
- EEikDialogFlagNoShadow|
- EEikDialogFlagWait;
-
- buttons = R_AVKON_SOFTKEYS_OK_BACK;
- items =
- {
- DLG_LINE
- {
- type = EAknCtPopupHeadingPane;
- id = EAknMessageQueryHeaderId;
- control = AVKON_HEADING
- {
- headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE;
- };
- },
- DLG_LINE
- {
- type = EAknCtMessageQuery;
- id = EAknMessageQueryContentId;
- control = AVKON_MESSAGE_QUERY
- {
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_message_text_icon
-// Defines the message query with icon and text
-//
-//----------------------------------------------------------
-//
-
-
-RESOURCE DIALOG r_satui_message_text_icon
- {
- flags= EEikDialogFlagWait;
- buttons=R_AVKON_SOFTKEYS_OK_BACK;
- items=
- {
- DLG_LINE
- {
- type = EEikCtLabel;
- id = ESatUiDisplayTextIconLabel;
- control = LABEL
- {
- };
- },
- DLG_LINE
- {
- type = EEikCtSpacer;
- id = ESatUiDisplayTextIconSpacer;
- control = SPACER
- {
- color=EEikSpacerBlack;
- };
- },
- DLG_LINE
- {
- type=EEikCtRichTextEditor;
- id = ESatUiDisplayTextIconRTxtEd;
- control = RTXTED
- {
- width=170;
- height=150;
- numlines = 10;
- max_view_height_in_lines=6;
- flags= EEikEdwinNoHorizScrolling | EEikEdwinDisplayOnly |
- EEikEdwinReadOnly | EEikEdwinNoAutoSelection |
- EEikEdwinAvkonDisableCursor;
- };
- }
- };
- }
-
-
-//----------------------------------------------------------
-//
-// r_satui_text_query_without_label
-// Defines the text query
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_text_query_without_label
- {
- flags = EEikDialogFlagWait|
- EEikDialogFlagNoDrag|
- EEikDialogFlagNoTitleBar|
- EEikDialogFlagCbaButtons|
- EEikDialogFlagNoShadow;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_DATA_QUERY
- {
- layout = EDataLayout;
- control = EDWIN
- {
- width=16;
- lines=1;
- maxlength = 256;
-
- };
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_number_query_without_label
-// Defines the number query
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_number_query_without_label
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_DATA_QUERY
- {
- layout = EPhoneLayout;
- label = space;
- control = EDWIN
- {
- numeric_keymap = EAknEditorSATNumberModeKeymap;
- maxlength=256;
- width=16;
- lines=1;
- };
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_hidden_number_query_without_label
-// Defines the hidden number query
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_hidden_number_query_without_label
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_DATA_QUERY
- {
- layout = EPinLayout;
- control = SECRETED
- {
- num_letters = 32;
- };
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_number_query_with_label_and_icon
-// Defines the number query with label and icon
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_number_query_with_label_and_icon
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtPopupHeadingPane;
- id = EAknMessageQueryHeaderId;
- control = AVKON_HEADING
- {
- label = space;
- };
- },
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_DATA_QUERY
- {
- layout = EPhoneLayout;
- control = EDWIN
- {
- numeric_keymap = EAknEditorSATNumberModeKeymap;
- maxlength=256;
- width=16;
- lines=1;
- };
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_text_query_with_label_and_icon
-// Defines the text query with label and icon
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_text_query_with_label_and_icon
- {
- flags=EGeneralQueryFlags;
- buttons=R_AVKON_SOFTKEYS_OK_CANCEL;
- items=
- {
- DLG_LINE
- {
- type = EAknCtPopupHeadingPane;
- id = EAknMessageQueryHeaderId;
- control = AVKON_HEADING
- {
- label = space;
- };
- },
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_DATA_QUERY
- {
- layout = EDataLayout;
- control = EDWIN
- {
- width=16;
- lines=1;
- maxlength = 256;
- };
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_hidden_number_query_with_label_and_icon
-// Defines the hidden number query with label and icon
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_hidden_number_query_with_label_and_icon
- {
- flags = EGeneralQueryFlags;
- buttons = R_AVKON_SOFTKEYS_OK_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtPopupHeadingPane;
- id = EAknMessageQueryHeaderId;
- control = AVKON_HEADING
- {
- label = space;
- };
- },
- DLG_LINE
- {
- type = EAknCtQuery;
- id = EGeneralQuery;
- control = AVKON_DATA_QUERY
- {
- layout = EPinLayout;
- control = SECRETED
- {
- num_letters = 32;
- };
- };
- }
- };
- }
-
-// ---------------------------------------------------------
-//
-// r_satui_bip_wait_note
-// Defines send data wait dialog
-//
-// ---------------------------------------------------------
-RESOURCE DIALOG r_satui_bip_wait_note
- {
- flags = EAknWaitNoteFlags;
-
- buttons = R_AVKON_SOFTKEYS_CANCEL;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiWaitNote;
- control = AVKON_NOTE
- {
- layout = EWaitLayout;
- //singular_label = qtn_sat_conf_send_data_bip;
- animation = R_QGN_GRAF_WAIT_BAR_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_close_channel_icon_note
-// Defines the information note
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_close_channel_icon_note
- {
- flags = EEikDialogFlagNoDrag |
- EEikDialogFlagNoTitleBar |
- EEikDialogFlagCbaButtons;
-
- buttons = R_AVKON_SOFTKEYS_EMPTY;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiInformationNote;
- control = AVKON_NOTE
- {
- layout = EGeneralLayout;
- singular_label = space;
- };
- }
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_close_channel_note
-// Defines the information note
-//
-//----------------------------------------------------------
-//
-RESOURCE DIALOG r_satui_close_channel_note
- {
- flags = EEikDialogFlagNoDrag |
- EEikDialogFlagNoTitleBar |
- EEikDialogFlagCbaButtons;
-
- buttons = R_AVKON_SOFTKEYS_EMPTY;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiInformationNote;
- control = AVKON_NOTE
- {
- layout = EGeneralLayout;
- singular_label = space;
- animation = R_QGN_NOTE_INFO_ANIM;
- };
- }
- };
- }
-
-//----------------------------------------------------
-//
-// r_satui_requesting_wait_note
-// Wait note for requesting.
-//
-//----------------------------------------------------
-//
-RESOURCE DIALOG r_satui_requesting_wait_note
- {
- flags = EAknWaitNoteFlags;
-
- buttons = R_AVKON_SOFTKEYS_EMPTY;
- items =
- {
- DLG_LINE
- {
- type = EAknCtNote;
- id = ESatUiWaitNote;
- control = AVKON_NOTE
- {
- layout = EWaitLayout;
- singular_label = text_sending;
- animation = R_QGN_GRAF_WAIT_BAR_ANIM;
- };
- }
- };
- }
-
-/******************* Additional CBA ***********************/
-
-//----------------------------------------------------------
-//
-// r_satui_softkeys_send_cancel
-// Defines Send softkey and Cancel softkey
-//
-//----------------------------------------------------------
-//
-RESOURCE CBA r_satui_softkeys_send_cancel
- {
- buttons =
- {
- CBA_BUTTON {id = ESatUiSoftkeySend; txt = text_softkey_send;},
- CBA_BUTTON {id = EAknSoftkeyCancel; txt = text_softkey_cancel;}
- };
- }
-
-//----------------------------------------------------------
-//
-// r_satui_softkeys_call_cancel
-// Defines Call softkey and Cancel softkey
-//
-//----------------------------------------------------------
-//
-RESOURCE CBA r_satui_softkeys_call_cancel
- {
- buttons =
- {
- CBA_BUTTON {id = ESatUiSoftkeyCall; txt = text_softkey_call;},
- CBA_BUTTON {id = EAknSoftkeyCancel; txt = text_softkey_cancel;}
- };
- }
-
-
-//----------------------------------------------------
-//
-// r_satui_softkey_quit
-//
-//
-//----------------------------------------------------
-//
-RESOURCE CBA r_satui_softkey_quit
- {
- buttons =
- {
- CBA_BUTTON {},
- CBA_BUTTON {id=EAknSoftkeyClose; txt=text_softkey_quit;}
- };
- }
-
-/******************* Localized texts **********************/
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_title
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_title
- {
- buf = qtn_sat_title;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_message_header
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_message_header
- {
- buf = qtn_sat_message_header;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_help_header
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_help_header
- {
- buf = qtn_sat_help_header;
- }
-
-// ---------------------------------------------------------
-//
-// r_text_simatk_enter_char
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_simatk_enter_char
- {
- buf = text_simatk_enter_char;
- }
-
-// ---------------------------------------------------------
-//
-// r_text_simatk_enter_char_string
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_simatk_enter_char_string
- {
- buf = text_simatk_enter_char_string;
- }
-
-// ---------------------------------------------------------
-//
-// r_text_simatk_enter_nbr
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_simatk_enter_nbr
- {
- buf = text_simatk_enter_nbr;
- }
-
-// ---------------------------------------------------------
-//
-// r_text_simatk_enter_nbr_string
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_simatk_enter_nbr_string
- {
- buf = text_simatk_enter_nbr_string;
- }
-
-// ---------------------------------------------------------
-//
-// r_text_done
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_done
- {
- buf = text_done;
- }
-
-// ---------------------------------------------------------
-//
-// r_text_not_done
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_not_done
- {
- buf = text_not_done;
- }
-
-// ---------------------------------------------------------
-//
-// r_text_simatk_send_sms;
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_simatk_send_sms
- {
- buf = text_simatk_send_sms;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_note_sms_send;
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_note_sms_send
- {
- buf = qtn_sat_note_sms_send;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_note_sending_dtmf_template;
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-
-RESOURCE TBUF r_qtn_sat_note_sending_dtmf_template
- {
- buf = qtn_sat_note_sending_dtmf_template;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_cc_not_allowed;
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-
-RESOURCE TBUF r_qtn_sat_cc_not_allowed
- {
- buf = qtn_sat_cc_not_allowed;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_cc_modified;
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-
-RESOURCE TBUF r_qtn_sat_cc_modified
- {
- buf = qtn_sat_cc_modified;
- }
-
-// ---------------------------------------------------------
-
-// r_qtn_sat_mosm_not_allowed;
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_mosm_not_allowed
- {
- buf = text_request_rejected;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_mosm_modified;
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_mosm_modified
- {
- buf = qtn_sat_request_modified;
- }
-
-// ---------------------------------------------------------
-//
-// r_text_simatk_send_ss;
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_simatk_send_ss
- {
- buf = text_simatk_send_ss;
- }
-
-// ---------------------------------------------------------
-//
-// r_text_call_setup_by_simatk
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_text_call_setup_by_simatk
- {
- buf = text_call_setup_by_simatk;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_query_title
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_query_title
- {
- buf = qtn_sat_query_title;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_query_allow_reset
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_query_allow_reset
- {
- buf = qtn_sat_query_allow_reset;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_timeout;
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-
-RESOURCE TBUF r_qtn_sat_timeout
- {
- buf = qtn_sat_timeout;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_conf_receive_data_bip
-// Defines receive data localized text
-//
-// ---------------------------------------------------------
-RESOURCE TBUF r_qtn_sat_conf_receive_data_bip
- {
- buf = qtn_sat_conf_receive_data_bip;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_conf_send_data_bip
-// Defines send data localized text
-//
-// ---------------------------------------------------------
-RESOURCE TBUF r_qtn_sat_conf_send_data_bip
- {
- buf = qtn_sat_conf_send_data_bip;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_services_not_available
-// Defines SAT not available localized text
-//
-// ---------------------------------------------------------
-RESOURCE TBUF r_qtn_sat_services_not_available
- {
- buf = qtn_sat_services_not_available;
- }
-
-/****** Localized texts for the Next Action Indicator *****/
-/************ (an item in the Options menu) ***************/
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_option_call
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_option_call
- {
- buf = qtn_options_call;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_option_send
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_option_send
- {
- buf = qtn_sat_option_send;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_option_play
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_option_play_tone
- {
- buf = qtn_sat_option_play_tone;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_option_read
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_option_read
- {
- buf = qtn_sat_option_read;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_option_select
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_option_select
- {
- buf = qtn_cffh_options_select;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_option_open
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_option_open
- {
- buf = qtn_options_open;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_option_goto
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_option_goto
- {
- buf = qtn_sat_option_goto;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_conf_open_channel_bip
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_conf_open_channel_bip
- {
- buf = qtn_sat_conf_open_channel_bip;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_conf_close_channel_bip
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_conf_close_channel_bip
- {
- buf = qtn_sat_conf_close_channel_bip;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_sat_sending_sms
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_sending_sms
- {
- buf = qtn_sat_sending_sms;
- }
-
-// ---------------------------------------------------------
-//
-// qtn_sat_conf_launch_brow
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_sat_conf_launch_brow
- {
- buf = qtn_sat_conf_launch_brow;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_offline_not_possible_sap
-// The note that is shown when the user attempts to connect
-// the network when in SIM Access Profile mode.
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_offline_not_possible_sap
- {
- buf = qtn_offline_not_possible_sap;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_msk_call_sat
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_msk_call_sat
- {
- buf = qtn_msk_call_sat;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_msk_read_sat
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_msk_read_sat
- {
- buf = qtn_msk_read_sat;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_msk_open_sat
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_msk_open_sat
- {
- buf = qtn_msk_open;
- }
-
-// ---------------------------------------------------------
-//
-// r_qtn_msk_goto_sat
-// Defines localized text
-//
-// ---------------------------------------------------------
-//
-RESOURCE TBUF r_qtn_msk_goto_sat
- {
- buf = qtn_msk_goto_sat;
- }
--- a/satui/satapp/data/Satui_reg.rss Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Resource file for satui.
-*
-*/
-
-
-#include <appinfo.rh>
-#include <SatUi.rsg>
-#include <data_caging_paths_strings.hrh>
-
-UID2 KUidAppRegistrationResourceFile
-UID3 0x101F4CE0 // Define your application UID here
-
-RESOURCE APP_REGISTRATION_INFO
- {
- app_file = "Satui";
-
- localisable_resource_file = APP_RESOURCE_DIR"\\Satui";
- localisable_resource_id = R_SATUI_LOCALISABLE_APP_INFO;
- embeddability = KAppNotEmbeddable;
- }
-
-// End of File
Binary file satui/satapp/help/data/xhtml.zip has changed
--- a/satui/satapp/help/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - Initial contribution
-*
-* Contributors:
-*
-*
-* Description:
-* Export help related files.
-*
-*/
-
-#include <platform_paths.hrh>
-PRJ_EXPORTS
-:zip ../data/xhtml.zip /epoc32/data/z/resource/ overwrite
-:zip ../data/xhtml.zip /epoc32/winscw/c/resource/ overwrite
-
-../inc/sat.hlp.hrh MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/sat.hlp.hrh)
-../rom/satuihelps_variant.iby CUSTOMER_MW_LAYER_IBY_EXPORT_PATH(satuihelps_variant.iby)
--- a/satui/satapp/help/inc/sat.hlp.hrh Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-//
-// sat.hlp.hrh generated by CSXHelp Utilities.
-//
-
-#ifndef __SAT_HLP_HRH__
-#define __SAT_HLP_HRH__
-
-_LIT(KSAT_HLP_APP, "SAT_HLP_APP"); //
-
-#endif
\ No newline at end of file
--- a/satui/satapp/help/rom/satuihelps_variant.iby Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description:
-*
-*/
-
-#ifndef __SATUIHELPS_VARIANT_IBY__
-#define __SATUIHELPS_VARIANT_IBY__
-
-#if defined(FF_S60_HELPS_IN_USE) && defined(__SIMCARD)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CE0\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CE0\contents.zip)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CE0\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CE0\index.xml)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CE0\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CE0\keywords.xml)
- data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x101F4CE0\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x101F4CE0\meta.xml)
-#endif
-
-#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/inc/csatuiiconhandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Introduces CSatUiIconHandler class, which handles
+* icon fetching for SatUi.
+*
+*/
+
+
+#ifndef CSATUIICONHANDLER_H
+#define CSATUIICONHANDLER_H
+
+#include <e32base.h>
+#include <rsatservice.h>
+
+class CFbsBitmap;
+class RSatSession;
+
+/**
+ * Handles asynchronous icon fetching for SatUi.
+ *
+ * Opens connection to SatClient by using received session attribute.
+ * Receives icon information and does the selection based on received icon id
+ * attribute. Asks the handle of the icon bitmap from the SatClient's
+ * RSatIcon class by giving the icon information and the package for handle,
+ * which is done asynchronously. For mean time, this class is waiting for
+ * completion of request by starting CActiveSchedulerWait, which is stopped
+ * when request is completed. After that the icon is duplicated via RSatIcon
+ * by giving the handle information. This is also an asynchronous call and
+ * CActiveSchedulerWait is started again. When completed the pointer to the
+ * bitmap is returned.
+ *
+ * @lib satui.exedll
+ * @since S60 v3.1
+ */
+class CSatUiIconHandler : public CBase
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Constructor.
+ */
+ static CSatUiIconHandler* NewL();
+
+ /*
+ * Destructor.
+ */
+ virtual ~CSatUiIconHandler();
+
+public: // New functions
+
+ /**
+ * The method, which fetches the icon.
+ *
+ * @since S60 v3.1
+ * @param aSatSession Session information for SatClient interface.
+ * @param aIconId Id for icon to be fetched.
+ * @param aOptWidth Optimal width of the icon to be fetched.
+ * @param aOptHeight Optimal height of the icon to be fetched.
+ * @param aIconSupport Flag to signal if icons are not supported at all
+ * @return A pointer to the icon bitmap.
+ */
+ CFbsBitmap* FetchIconL( const RSatSession& aSatSession,
+ const TUint8 aIconId,
+ const TInt aOptWidth,
+ const TInt aOptHeight,
+ TBool& aIconSupport );
+
+private:
+
+ /**
+ * C++ default constructor.
+ *
+ * @since S60 v3.1
+ */
+ CSatUiIconHandler();
+
+ /**
+ * Sorts the icons into order of superiority and saves the order into a list
+ *
+ * @since S60 v3.1
+ * @param aIconEf List of icons
+ * @param aSelectedIcons List into which order is saved
+ * @param aOptWidth Optimal width of the icon to be fetched.
+ * @param aOptHeight Optimal height of the icon to be fetched.
+ */
+ void SortIconsL( const RIconEf& aIconEf,
+ RArray<TInt>& aSelectedIcons,
+ const TInt aOptWidth,
+ const TInt aOptHeight ) const;
+
+private: // data
+
+ /**
+ * RSatService of the SatClient.
+ */
+ RSatService iSatService;
+
+ };
+
+#endif // CSATUIICONHANDLER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/inc/csatuiobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,389 @@
+/*
+* Copyright (c) 2002-20010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This class handles the communication between server and user
+* interface
+*
+*/
+
+
+#ifndef CSATUIOBSERVER_H
+#define CSATUIOBSERVER_H
+
+// INCLUDES
+#include <msatuiobserver.h>
+#include <rsatuisession.h>
+#include <RSatSession.h>
+#include "satappcommonconstant.h"
+// CONSTANTS
+//256 max length-header information fields
+const TInt KAdditionalInfoMaxSize = 244;
+const TInt KMaxPlayToneLength = 50;
+
+enum TIconCommand
+ {
+ EIconSetUpMenuContext = 1,
+ EIconSetUpMenuItems,
+ EIconDisplayText,
+ EIconGetInput,
+ EIconGetInkey,
+ EIconGetYesNo,
+ EIconPlayTone,
+ EIconNotification,
+ EIconConfirmCommand
+ };
+
+// FORWARD DECLARATIONS
+class MSatUiAdapter;
+class MSatUiActionImplementer;
+class CSatUiIconHandler;
+class CFbsBitmap;
+
+// CLASS DECLARATION
+
+/**
+* This class implements the methods specified in the MSatUiObserver.
+*/
+
+class CSatUiObserver : public CBase,
+ public MSatUiObserver
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ */
+ static CSatUiObserver* NewL();
+
+ /**
+ * Destructor.
+ */
+ virtual ~CSatUiObserver();
+
+ public: // New functions
+
+ /**
+ * Sets the UI.
+ * @param aImplementer Pointer to be set.
+ */
+ void SetImplementer(MSatUiActionImplementer* aImplementer);
+
+ /**
+ * Returns the adapter provided by SatCli.
+ */
+ MSatUiAdapter* Adapter();
+
+
+ /**
+ * Return current profile state.
+ * @return current profile state.
+ */
+ TInt ProfileState();
+
+ public: // Functions from base classes
+
+ /**
+ * From MSatUiObserver Notification of the SAT Display Text command.
+ * @param aText The text string to be displayed.
+ * @param aSimApplicationName Sim Application name
+ * @param aIconId The id of icon.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @param aSustainedText Indicates is this text sustained ie. no timers
+ * used if ETrue.
+ * @param aDuration Duration for showing the text
+ * @param aWaitUserToClear Indication if user is needed to clear
+ * message
+ * @return The response to this command.
+ */
+ TSatUiResponse DisplayTextL( const TDesC& aText,
+ const TDesC& aSimApplicationName,
+ const TSatIconId& aIconId,
+ TBool& aRequestedIconDisplayed,
+ const TBool aSustainedText,
+ const TTimeIntervalSeconds aDuration,
+ const TBool aWaitUserToClear );
+
+ /**
+ * From MSatUiObserver Notification of the SAT Get Inkey command.
+ * @param aText The query text.
+ * @param aCharacterSet The character range allowed.
+ * @param aInput The input character.
+ * @param aHelpIsAvailable A flag indicating if SAT help is available
+ * @param aIconId The id of icon.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @param aDuration Duration for showing the dialog.
+ * @param aImmediateDigitResponse Indication if Immediate digit response
+ * is needed.
+ * @return The response of to this command.
+ */
+ TSatUiResponse GetInkeyL( const TDesC& aText,
+ const TSatCharacterSet aCharacterSet, TChar& aInput,
+ const TBool aHelpIsAvailable,
+ const TSatIconId& aIconId,
+ TBool& aRequestedIconDisplayed,
+ TUint& aDuration,
+ const TBool aImmediateDigitResponse );
+
+ /**
+ * From MSatUiObserver Notification of the SAT Get Input command.
+ * @param aText The query text.
+ * @param aCharacterSet The character range allowed.
+ * @param aInput The input string.
+ * @param aMinLength The minimum length of the input allowed.
+ * @param aMaxLength The maximum length of the input allowed.
+ * @param aHideInput A flag indicating if the input should be hidden.
+ * @param aHelpIsAvailable A flag indicating if SAT help is available.
+ * @param aIconId The id of icon.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @return The response to this command.
+ */
+ TSatUiResponse GetInputL( const TDesC& aText,
+ const TSatCharacterSet aCharacterSet, TDes& aInput,
+ const TInt aMinLength, const TInt aMaxLength,
+ const TBool aHideInput,
+ const TBool aHelpIsAvailable,
+ const TSatIconId& aIconId,
+ TBool& aRequestedIconDisplayed );
+
+ /**
+ * From MSatUiObserver Notification of the SAT Set Up Menu command.
+ * @param aText The title text.
+ * @param aMenuItems The array of menu item captions.
+ * @param aMenuItemNextActions The array of menu item next action
+ * indicator codes.
+ * @param aHelpIsAvailable A flag indicating if SAT help is available.
+ * @param aIconId The id of title icon.
+ * @param aMenuIcons List of icon identifiers for menu items.
+ * @param aIconListQualifier Indicates how to use icons in the icon list.
+ * @param aSelectionPreference Specifies is the soft keys preferred.
+ * @return The response to this command.
+ */
+ TSatUiResponse SetUpMenuL( const TDesC& aText,
+ const MDesCArray& aMenuItems,
+ const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const TBool aHelpIsAvailable,
+ const TSatIconId& aIconId,
+ const CArrayFixFlat<TInt>* aMenuIcons,
+ const enum TSatIconQualifier aIconListQualifier,
+ const enum TSatSelectionPreference aSelectionPreference );
+
+ /**
+ * From MSatUiObserver Notification of the SAT Select Item command.
+ * @param aText The title text.
+ * @param aMenuItems The array of menu item captions.
+ * @param aMenuItemNextActions The array of menu item next action
+ * indicator codes.
+ * @param aDefaultItem The item selected by default.
+ * @param aSelection The item index selected by the user.
+ * @param aHelpIsAvailable A flag indicating if help is available.
+ * @param aIconId The id of title icon.
+ * @param aMenuIcons List of icon identifiers for menu items.
+ * @param aIconListQualifier Indicates how to use icons in the icon list.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @param aSelectionPreference Specifies is the soft keys preferred.
+ * @return The response to this command.
+ */
+ TSatUiResponse SelectItemL( const TDesC& aText,
+ const MDesCArray& aMenuItems,
+ const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const TInt aDefaultItem, TUint8& aSelection,
+ const TBool aHelpIsAvailable,
+ const TSatIconId& aIconId,
+ const CArrayFixFlat<TInt>* aMenuIcons,
+ const enum TSatIconQualifier aIconListQualifier,
+ TBool& aRequestedIconDisplayed,
+ const enum TSatSelectionPreference aSelectionPreference );
+
+ /**
+ * From MSatUiObserver Notification of the SAT Play Tone command.
+ * @param aText The text to be displayed.
+ * @param aTone The tone to be played.
+ * @param aDuration The duration of the tone to be played.
+ * @param aIconId The id of icon.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @return The response to this command.
+ */
+ TSatUiResponse PlayTone( const TDesC& aText,
+ const TSatTone aTone,
+ const TTimeIntervalMicroSeconds aDuration,
+ const TSatIconId& aIconId,
+ TBool& aRequestedIconDisplayed );
+
+ /**
+ * From MSatUiObserver General confirmation request
+ * @param aCommandId ID of the quering command
+ * @param aAlphaIdStatus Alpha Identifier status
+ * @param aText The text to be displayed.
+ * @param aAdditionalText Additional text to be used in queries.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @param aIconId The id of icon.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @param aTerminatedByUser Informs if end key is used.
+ */
+ void ConfirmCommand(
+ const TSatSQueryCommand aCommandId,
+ const TSatAlphaIdStatus aAlphaIdStatus,
+ const TDesC& aText,
+ const TDesC& aAdditionalText,
+ TBool& aActionAccepted,
+ const TSatIconId& aIconId,
+ TBool& aRequestedIconDisplayed,
+ TBool& aTerminatedByUser );
+
+ /**
+ * From MSatUiObserver General notification
+ * @param aCommandId ID of the notifying command
+ * @param aAlphaIdStatus Alpha Identifier status
+ * @param aText Alpha Identifier
+ * @param aIconId The id of icon.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @param aControlResult Control result of the MoSm and CallControl
+ * @return The response of the UI to this command.
+ */
+ TSatUiResponse Notification(
+ const TSatSNotifyCommand aCommandId,
+ const TSatAlphaIdStatus aAlphaIdStatus,
+ const TDesC& aText,
+ const TSatIconId& aIconId,
+ TBool& aRequestedIconDisplayed,
+ const TSatControlResult aControlResult );
+
+ /**
+ * From MSatUiObserverGeneral event notification. Used for example to
+ * tell UI that command has completed its execution.
+ * @param aEventId, identifies the event
+ * @param aEventStatus, status of the event, used as additional info for
+ * the event
+ * @param aError, possible error code that may affect on event handling.
+ * This is also used as additional info
+ */
+ void EventNotification(
+ const TSatSEvent aEventId,
+ const TSatSEventStatus aEventStatus,
+ const TInt aError );
+
+ private:
+
+ /**
+ * C++ default constructor.
+ */
+ CSatUiObserver();
+
+ /**
+ * Symbian OS constructor.
+ */
+ void ConstructL();
+
+ /**
+ * Fetch icon information.
+ * @param aIconId Id for icons
+ * @param aIconCommand Command type for icon.
+ * @return Pointer to selected FbsBitmap icon
+ */
+ CFbsBitmap* FetchIcon( const TUint8 aIconId,
+ const enum TIconCommand aIconCommand );
+
+ /**
+ * Gets default text's resource id
+ * @param aCommandId Identifies the command
+ * @param aControl Used only for MoSm and Call Control
+ * @return Resource id for the default text
+ */
+ TInt DefaultAlphaIdL(
+ const TSatSNotifyCommand aCommandId,
+ const TSatControlResult aControlResult) const;
+
+ /**
+ * Get size for the icon in popup window.
+ * @param aSize Reference to the size of icon place.
+ * @param aIconCommand Dialog information
+ * @return TBool Returns EFalse if popup window is not supported
+ * in current layout.
+ */
+ TBool GetPopUpWindowIconSize( TSize& aSize,
+ const TIconCommand aIconCommand );
+
+ /**
+ * Creates scalable bitmap.
+ * @param aBitMapToConvert Reference icon to be scaled.
+ * @param aIconCommand Dialog information
+ */
+ void GetScalableBitmapL( CFbsBitmap*& aBitMapToConvert,
+ const TIconCommand aIconCommand );
+
+ /**
+ * Handles scalable bitmap.
+ * @param aBitMapToConvert Reference icon to be scaled.
+ * @param aIconCommand Dialog information
+ * @param aRequestedIconDisplayed Informs if icon is not shown.
+ */
+ void GetScalableBitmap(
+ CFbsBitmap*& aBitMapToConvert,
+ const TIconCommand aIconCommand,
+ TBool& aRequestedIconDisplayed );
+
+ /**
+ * Handles scalable bitmap.
+ * @param aBitMapToConvert Reference icon to be scaled.
+ * @param aIconCommand Dialog information
+ */
+ void GetScalableBitmap(
+ CFbsBitmap*& aBitMapToConvert,
+ const TIconCommand aIconCommand );
+
+ public: // Data
+
+ //wait scheduler
+ CActiveSchedulerWait iWait;
+
+ private: // Data
+
+ // play tone sequence
+ TBuf8<KMaxPlayToneLength> iSequence;
+
+
+ //Ref: Interface to the UI-part
+ MSatUiActionImplementer* iActionImplementer;
+
+ // own: used with refresh started and finished
+ TBool iRefresh;
+
+ // own: session to sat client
+ RSatUiSession iSat;
+
+ //Ref: Adapter provided by SAT Client
+ MSatUiAdapter* iAdapter;
+
+ //Own: Session
+ RSatSession iSatSession;
+
+ //Own: Current Iconididentifier
+ TInt iIconIdIdentifier;
+
+ //Own: SetupMenu and SelectItem items icon
+ //CAknIconArray* iItemIcons;
+
+ //Own: Icon fetching handler
+ //CSatUiIconHandler* iIconHandler;
+
+ // own: used to signal that icons are supported
+ TBool iIconSupport;
+
+ //Own: used to indicate if ESatSClearScreenEvent occurs
+ TBool iClearScreenEvent;
+
+ };
+
+#endif // CSATUIOBSERVER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/inc/msatuiactionimplementer.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,366 @@
+/*
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*
+*/
+
+#ifndef MSATUIACTIONIMPLEMENTER_H
+#define MSATUIACTIONIMPLEMENTER_H
+
+// INCLUDES
+#include <msatuiobserver.h>
+
+// CLASS DECLARATION
+class CCoeEnv;
+class CFbsBitmap;
+
+/**
+* This class defines the interface between engine and UI.
+*/
+class MSatUiActionImplementer
+ {
+ public:
+
+ /**
+ * Returns CoeEnv.
+ */
+ virtual CCoeEnv* CoeEnv() = 0;
+
+ /**
+ * Shows the wait note.
+ */
+ virtual void ShowWaitNoteL() = 0;
+
+ /**
+ * Shows the wait note without delay
+ */
+ virtual void ShowWaitNoteWithoutDelayL() = 0;
+
+ /**
+ * Removes the wait note from the screen.
+ */
+ virtual void StopShowWaitNote() = 0;
+
+ /**
+ * Handles the DisplayText operation.
+ * @param aText Text to be shown.
+ * @param aSimApplicationName Sim Application name
+ * @param aIconBitmapDisplayText Icon for dialog
+ * @param aSustainedText Indicates is this text sustained ie. no timers
+ * used if ETrue.
+ * @param aDuration Duration for showing the text
+ * @param aWaitUserToClear Indication if user is needed to clear
+ * message
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse DisplayTextL( const TDesC& aText,
+ const TDesC& aSimApplicationName,
+ CFbsBitmap* aIconBitmapDisplayText,
+ const TBool aSelfExplanatoryIcon,
+ const TBool aSustainedText,
+ const TTimeIntervalSeconds aDuration,
+ const TBool aWaitUserToClear ) = 0;
+
+ /**
+ * Removes Display Text Dialog from the screen.
+ */
+ virtual void ClearScreen() = 0;
+
+ /**
+ * Asks a Yes/No answer from the user.
+ * @param aText A question to be shown.
+ * @param aCharacterSet The character range allowed.
+ * @param aInkey Character user feeds.
+ * @param aIconBitmap Icon for query dialog.
+ * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
+ * @param aDuration Duration for showing the dialog.
+ * @param aImmediateDigitResponse Indication if Immediate digit response
+ * is needed.
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse GetYesNoL( const TDesC& aText,
+ const TSatCharacterSet aCharacterSet,
+ TChar& aInkey,
+ const CFbsBitmap* aIconBitmap,
+ const TBool aSelfExplanatory,
+ TUint& aDuration,
+ const TBool aImmediateDigitResponse ) = 0;
+
+ /**
+ * Asks input from the user.
+ * @param aText A question to be shown.
+ * @param aCharacterSet The character range allowed.
+ * @param aInput The input string.
+ * @param aMinLength The minimum length of the input allowed.
+ * @param aMaxLength The maximum length of the input allowed.
+ * @param aHideInput A flag indicating if the input should be hidden.
+ * @param aGetInkey A flag indicating if GetInkey command is used.
+ * @param aIconBitmapGetInput Icon for query dialog.
+ * @param aSelfExplanatory A flag indicating if icon is self-explanatory.
+ * @param aDuration Duration for showing the dialog.
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse GetInputL( const TDesC& aText,
+ const TSatCharacterSet aCharacterSet, TDes& aInput,
+ const TInt aMinLength, const TInt aMaxLength,
+ const TBool aHideInput, const TBool aGetInkey,
+ const CFbsBitmap* aIconBitmapGetInput,
+ const TBool aSelfExplanatory,
+ TUint& aDuration ) = 0;
+
+ /**
+ * Handles the SetUpMenu view.
+ * @param aText The title text.
+ * @param aMenuItems The array of menu item captions.
+ * @param aMenuItemNextActions The array of menu item next action
+ * indicator captions.
+ * @param aIconBitmap The Context pane icon.
+ * @param aItemsIconArray Array of item icons
+ * @param aSelfExplanatoryItems Flag indicating if only icons are shown.
+ * @param aHelpIsAvailable A flag indicating if SAT help is available.
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse SetUpMenuL( const TDesC& aText,
+ const MDesCArray& aMenuItems,
+ const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const CFbsBitmap* aIconBitmap,
+ //const CAknIconArray* aItemIconsArray,
+ const TBool aSelfExplanatoryItems,
+ const TBool aHelpIsAvailable ) = 0;
+
+ /**
+ * Handles the SelectItem view.
+ * @param aText The title text.
+ * @param aMenuItems The array of menu items.
+ * @param aMenuItemNextActions The array of next action indicators.
+ * @param aDefaultItem The item in focus.
+ * @param aSelection The item index selected by the user.
+ * @param aIconBitmap The Context Pane icon.
+ * @param aItemsIconArray Array of item icons
+ * @param aSelfExplanatoryItems Flag indicating if only icons are shown.
+ * @param aHelpIsAvailable A flag indicating if SAT help is available.
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse SelectItemL( const TDesC& aText,
+ const MDesCArray& aMenuItems,
+ const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const TInt aDefaultItem,
+ TUint8& aSelection,
+ const CFbsBitmap* aIconBitmap,
+ //const CAknIconArray* aItemsIconArray,
+ const TBool aSelfExplanatoryItems,
+ const TBool aHelpIsAvailable ) = 0;
+
+ /**
+ * Handles Standard Tone playing.
+ * @param aText The text to be displayed.
+ * @param aFileName The name of the file corresponding to the tone.
+ * @param aDuration The duration of the tone to be played.
+ * @param aIconBitmap The tone playing note icon
+ * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse PlayStandardToneL( const TDesC& aText,
+ const TDesC8& aSequence,
+ TTimeIntervalMicroSeconds aDuration,
+ const CFbsBitmap* aIconBitmap,
+ const TBool aSelfExplanatory ) = 0;
+
+ /**
+ * Shows the confirmation note about the SAT Send SMS, Send SS or
+ * Send USSD command.
+ * @param aText The text to be displayed.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @param aType Type of the request (SMS, SS, USSD).
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse ConfirmSendL( const TDesC& aText,
+ TBool& aActionAccepted, TInt aType ) = 0;
+
+ /**
+ * Shows the wait note about the Send SMS command.
+ * @param aText The text to be displayed.
+ * @param aIconBitmapSendSM Sending dialog icon.
+ * @param aSelfExplanatoryIcon A flag indicating if only icon is shown.
+ */
+ virtual void ShowSmsWaitNoteL( const TDesC& aText,
+ const CFbsBitmap* aIconBitmapSendSM,
+ const TBool aSelfExplanatoryIcon ) = 0;
+
+ /**
+ * Shows the wait note about the Send SS command.
+ * @param aText The text to be displayed.
+ * @param aIconBitmap Sending dialog icon.
+ * @param aSelfExplanatoryIcon A flag indicating if only icon is shown.
+ */
+ virtual void ShowSsWaitNoteL( const TDesC& aText,
+ const CFbsBitmap* aIconBitmap,
+ const TBool aSelfExplanatoryIcon ) = 0;
+
+ /**
+ * Shows the confirmation note about the SAT Refresh command.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse ConfirmRefreshL(
+ TBool& aActionAccepted) = 0;
+
+ /**
+ * Notification of the SAT Call Control command.
+ * @param aText The text string to be displayed.
+ * @param aAlphaIdStatus Alpha Identifier status
+ * @param aControlResult Call control general result
+ * @return The response from the UI
+ */
+ virtual TSatUiResponse CallControlL(
+ const TDesC& aText,
+ const TSatAlphaIdStatus aAlphaIdStatus ) = 0;
+
+ /**
+ * Notification of the SAT Launch browser confirmation request
+ * @param aText The text to be displayed.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @param aIconBitmap The confirm note icon
+ * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
+ */
+ virtual void ConfirmLaunchBrowserL(
+ const TDesC& aText,
+ TBool& aActionAccepted,
+ const CFbsBitmap* aIconBitmap,
+ const TBool aSelfExplanatory ) = 0;
+
+ /**
+ * Notification of the SAT Mo Sm Control command.
+ * @param aText The text string to be displayed.
+ * @param aAlphaIdStatus Alpha Identifier status
+ * @param aControlResult Mo Sm control general result
+ * @return The response from the UI
+ */
+ virtual TSatUiResponse MoSmControlL(
+ const TDesC& aText,
+ const TSatAlphaIdStatus aAlphaIdStatus ) = 0;
+
+ /**
+ * Shows the wait note while DTMF are being sent.
+ * @param aText The text to be displayed.
+ * @param aIconBitmap The confirm note icon
+ * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
+ * @return Information on the operation result.
+ */
+ virtual TSatUiResponse ShowDtmfWaitNoteL( const TDesC& aText,
+ const CFbsBitmap* aIconBitmap,
+ const TBool aSelfExplanatoryIcon ) = 0;
+
+ /** Dispatch iWait to action implementer.
+ * @param aWait Timer.
+ */
+ virtual void DispatchTimer( CActiveSchedulerWait& aWait ) = 0;
+
+ /**
+ * Get flag which is indicating if end key is pressed.
+ * @return A Boolean flag which is indicating if end key is pressed.
+ */
+ virtual TBool GetEndKey() = 0;
+
+ /**
+ * Set a flag which is indicating if end key is pressed.
+ * @param aValue Status of end key
+ */
+ virtual void SetEndKey( TBool aValue ) = 0;
+
+ /**
+ * Set a flag which is indicating if proactive command is pending.
+ * @param aValue Status of proactive command
+ */
+ virtual void SetCommandPending( TBool aValue ) = 0;
+
+ /**
+ * Plays user selected tone.
+ * @param aText The text to be displayed.
+ * @param aDuration Play duration.
+ * @param aTone Tone to be played.
+ * @param aIconBitmap The tone playing note icon
+ * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
+ * @return Information on the operation result.
+ */
+ virtual TSatUiResponse PlayUserSelectedToneL(
+ const TDesC& aText,
+ TTimeIntervalMicroSeconds aDuration,
+ TSatTone aTone,
+ const CFbsBitmap* aIconBitmap,
+ const TBool aSelfExplanatory ) = 0;
+
+ /**
+ * Confirm user permission for Open Channel.
+ * @param aText The text to be displayed.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @param aIconBitmapOpenChannel Icon for query dialog
+ * @param aSelfExplanatory A flag indicating if icon is self-explanatory
+ * @return Operation result
+ */
+ virtual TSatUiResponse ConfirmOpenChannelL(
+ const TDesC& aText,
+ TBool& aActionAccepted,
+ const CFbsBitmap* aIconBitmapOpenChannel,
+ const TBool aSelfExplanatory ) = 0;
+
+ /**
+ * Shows the wait note while BIP packets are sent.
+ * @param aCommand Command type.
+ * @param aText The text to be displayed.
+ * @param aIconBitmap Icon for query dialog
+ * @param aSelfExplanatory A flag indicating if icon is self-explanatory
+ */
+ virtual void ShowBIPNoteL(
+ TInt aCommand,
+ const TDesC& aText,
+ const CFbsBitmap* aIconBitmap,
+ const TBool aSelfExplanatory ) = 0;
+
+ /**
+ * Confirm user permission for SetUpCall
+ * @param aText The text to be displayed.
+ * @param aSimAppName Header for th equery
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @param aIconBitmap Icon for query dialog
+ * @param aSelfExplanatory A flag indicating if icon is self-explanatory
+ */
+ virtual void ConfirmSetUpCallL(
+ const TDesC& aText,
+ const TDesC& aSimAppName,
+ TBool& aActionAccepted,
+ const CFbsBitmap* aIconBitmap,
+ const TBool aSelfExplanatory ) = 0;
+
+ /**
+ * Show note indicating SAT is not available.
+ */
+ virtual void ShowNotAvailableNoteL() = 0;
+
+ /**
+ * Show the Ss error note.
+ */
+ virtual void ShowSsErrorNoteL() = 0;
+
+ /**
+ * Start SatUi closing process.
+ */
+ virtual void CloseSatUI() = 0;
+
+ };
+
+#endif // MSATUIACTIONIMPLEMENTER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/inc/satappcommandhandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,239 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef SATAPPCOMMANDHANDLER_H
+#define SATAPPCOMMANDHANDLER_H
+
+#include <QObject>
+#include <msatuiobserver.h>
+
+class SatAppUiProvider;
+
+class SatAppCommandHandler : public QObject
+ {
+ Q_OBJECT
+public:
+ SatAppCommandHandler(SatAppUiProvider &ui, QObject *parent = 0);
+ virtual ~SatAppCommandHandler();
+
+private slots:
+
+ /**
+ * Handles the SetUpMenu command.
+ * @param aRes the out parameter. the result of the command.
+ * @param aText The title text.
+ * @param aMenuItems The array of menu item captions.
+ * @param aMenuItemNextActions The array of menu item next action
+ * indicator captions.
+ * @param aIconBitmap The Context pane icon.
+ * @param aItemsIconArray Array of item icons
+ * @param aSelfExplanatoryItems Flag indicating if only icons are shown.
+ * @param aHelpIsAvailable A flag indicating if SAT help is available.
+ */
+ void setUpMenu(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QStringList &aMenuItems,
+ //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ //const HbIcon &aIcon,
+ //const CAknIconArray* aItemIconsArray,
+ const bool aSelfExplanatoryItems,
+ const bool aHelpIsAvailable);
+
+ /**
+ * Handles the SelectItem view.
+ * @param aRes the out parameter. the result of the command.
+ * @param aText The title text.
+ * @param aMenuItems The array of menu items.
+ * @param aMenuItemNextActions The array of next action indicators.
+ * @param aDefaultItem The item in focus.
+ * @param aSelection The item index selected by the user.
+ * @param aIconBitmap The Context Pane icon.
+ * @param aItemsIconArray Array of item icons
+ * @param aSelfExplanatoryItems Flag indicating if only icons are shown.
+ * @param aHelpIsAvailable A flag indicating if SAT help is available.
+ * @return Information of the operation result.
+ */
+ void selectItem(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QStringList &aMenuItems,
+ //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const int aDefaultItem,
+ unsigned char &aSelection,
+ //const HbIcon &aIcon,
+ //const CAknIconArray* aItemsIconArray,
+ const bool aSelfExplanatoryItems,
+ const bool aHelpIsAvailable);
+
+ /**
+ * Notification of the SAT Display Text command.
+ * @param aRes, the User's response.
+ * @param aText The text string to be displayed.
+ * @param aSimApplicationName Sim Application name
+ * @param aIcon the icon to show.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @param aSustainedText Indicates is this text sustained ie. no timers
+ * used if ETrue.
+ * @param aDuration Duration for showing the text
+ * @param aWaitUserToClear Indication if user is needed to clear
+ * message
+ * @return The response of the UI to this command.
+ */
+ void displayText(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QString &aSimApplicationName,
+// const HbIcon &aIcon,
+ bool &aRequestedIconDisplayed,
+ const bool aSustainedText,
+ const int aDuration,
+ const bool aWaitUserToClear);
+
+ /**
+ * Notification of the SAT Get Input command.
+ * @param aRes, the User's response.
+ * @param aText The text string to be displayed.
+ * @param aSimApplicationName Sim Application name
+ * @param aIcon the icon to show.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @param aSustainedText Indicates is this text sustained ie. no timers
+ * used if ETrue.
+ * @param aDuration Duration for showing the text
+ * @param aWaitUserToClear Indication if user is needed to clear
+ * message
+ * @return The response of the UI to this command.
+ */
+ void getInkey(
+ TSatUiResponse &aRes,
+ const QString &aTitleText,
+ const TSatCharacterSet aCharacterSet,
+ QString &aInputText,
+ //const QPixmap* /*aIconBitmapGetInput*/,
+ const bool aSelfExplanatory,
+ unsigned int &aDuration);
+
+ /**
+ * Notification of the SAT Get YesNo command.
+ * @param aText The query text.
+ * @param aCharacterSet The character range allowed.
+ * @param aInput The input character.
+ * @param aHelpIsAvailable indicates if help can be requested.
+ * @param aIconId The id of icon.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @param aDuration Duration for showing the dialog.
+ * @param aImmediateDigitResponse Indication if Immediate digit response
+ * is needed.
+ * @return The response of the UI to this command.
+ */
+ void getYesNo(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const TSatCharacterSet aCharacterSet,
+ unsigned int &aInkey,
+ //const TSatIconId &aIconId,
+ const bool &aSelfExplanatory,
+ unsigned int &aDuration,
+ const bool aImmediateDigitResponse);
+
+ /**
+ * Notification of the SAT Get Input command.
+ * @param aRes, the User's response.
+ * @param aText The text string to be displayed.
+ * @param aSimApplicationName Sim Application name
+ * @param aIcon the icon to show.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @param aSustainedText Indicates is this text sustained ie. no timers
+ * used if ETrue.
+ * @param aDuration Duration for showing the text
+ * @param aWaitUserToClear Indication if user is needed to clear
+ * message
+ * @return The response of the UI to this command.
+ */
+ void getInput(
+ TSatUiResponse &aRes,
+ const QString &aTitleText,
+ const TSatCharacterSet aCharacterSet,
+ QString &aInputText,
+ const int aMinLength,
+ const int aMaxLength,
+ const bool aHideInput,
+ //const QPixmap* /*aIconBitmapGetInput*/,
+ const bool aSelfExplanatory,
+ unsigned int &aDuration);
+
+ /**
+ * Shows the confirmation note about the SAT Send SMS, Send SS or
+ * Send USSD command.
+ * @param aText The text to be displayed.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @param aType Type of the request (SMS, SS, USSD).
+ * @return Information of the operation result.
+ */
+ void confirmSend(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ bool &aActionAccepted,
+ int aType);
+
+ /**
+ * Shows the wait note about the Send SMS command.
+ * @param aText The text to be displayed.
+ * @param aIconBitmapSendSM Sending dialog icon.
+ * @param aSelfExplanatoryIcon A flag indicating if only icon is shown.
+ */
+ void showSmsWaitNote(
+ const QString &aText,
+ //const CFbsBitmap* aIconBitmapSendSM,
+ const bool aSelfExplanatoryIcon
+ );
+
+ /**
+ * Shows the wait note about the Send DTMF command.
+ * @param aText The text to be displayed.
+ * @param aIconBitmapSendDtmf Sending dialog icon.
+ * @param aSelfExplanatoryIcon A flag indicating if only icon is shown.
+ */
+ void showDtmfWaitNote(
+ TSatUiResponse &aRes,
+ const QString &aText
+ );
+
+ /*!
+ Stop wait note
+ */
+ void stopShowWaitNote();
+
+ /**
+ * Shows the confirmation not about SetUpCall.
+ * @param aText The text to be displayed.
+ * @param aSimAppName The header to be displayed.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ */
+ void confirmSetUpCall(
+ const QString &aText,
+ const QString &aSimAppName,
+ bool &aActionAccepted//,
+ //const CFbsBitmap* aIconBitmap,
+ //const TBool aSelfExplanatory
+ );
+
+private:
+ SatAppUiProvider &mUi;
+};
+
+#endif /* SATAPPCOMMANDHANDLER_H */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/inc/satappcommonconstant.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef SATAPPCOMMONCONSTANT_H
+#define SATAPPCOMMONCONSTANT_H
+
+// CONSTANTS
+
+const int KDisplayTxtUserClearTimeout( 60000 );
+// As the QT for S60 is slow, we use 6 sec, in symbian sat ui we use 3 sec.
+const int KDisplayTxtDefaultduration( 6000 );
+
+const unsigned int KGetInputStringMaxSize = 0xEF;
+
+const int KExtendTimeoutMseconds(3000);
+const int KDefaultSelectionTimeoutMseconds(60000);
+
+//enum for SendSms
+/**Sat send sms user response*/
+enum TSatAppConfirmType
+ {
+ ESatUiConfirmSendSms = 1,
+ ESatUiConfirmSendSs,
+ ESatUiConfirmSendUssd
+ };
+
+enum TSatAppUserResponse
+{
+ /**
+ * default, user no response
+ */
+ EUserNoResponse = 0,
+ /**
+ * OK, user response
+ */
+ EUserPrimaryResponse,
+ /**
+ * Back, user response
+ */
+ EUserSecondaryResponse,
+ /**
+ * requested to clear by the server
+ */
+ EUserClearResponse,
+ /**
+ * requested to close application by the server
+ */
+ EUserCloseResponse
+};
+
+enum TSatAppDialogActionType
+ {
+ ESatDialogDisplayText = 0, // Ok Back
+ ESatDialogGetInput, // Cancel ->Ok Cancel
+ ESatDialogGetInkey, // Cancel ->Ok Cancel
+ ESatDialogGetYesNo, // Yes No
+ ESatDialogGetDigitalRsp, // Cancel
+ ESatDialogSetUpCall, // Call Cancel
+ ESatDialogConfirmSend // Yes No
+ };
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/inc/satappeventprovider.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,717 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef SATAPPEVENTPROVIDER_H
+#define SATAPPEVENTPROVIDER_H
+
+#include <QObject>
+#include <msatuiobserver.h>
+#include "msatuiactionimplementer.h"
+
+class CSatUiObserver;
+//class QPixmap; // For future icon support
+
+class SatAppEventProvider: public QObject,
+ public MSatUiActionImplementer
+{
+ Q_OBJECT
+
+public:
+
+ /**
+ * Constructor
+ */
+ SatAppEventProvider(QObject *parent = 0);
+
+ /**
+ * Distructor
+ */
+ virtual ~SatAppEventProvider();
+
+signals:
+ /**
+ * Notification of the SAT Display Text command.
+ * @param aRes, the User's response.
+ * @param aText The text string to be displayed.
+ * @param aSimApplicationName Sim Application name
+ * @param aIcon the icon to show.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @param aSustainedText Indicates is this text sustained ie. no timers
+ * used if true.
+ * @param aDuration Duration for showing the text
+ * @param aWaitUserToClear Indication if user is needed to clear
+ * message
+ */
+ void displayTextEvent(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QString &aSimApplicationName,
+ //const HbIcon &aIcon,
+ bool &aRequestedIconDisplayed,
+ const bool aSustainedText,
+ const int aDuration,
+ const bool aWaitUserToClear);
+
+ /**
+ * Notification of the SAT Get Input command.
+ * @param aText The query text.
+ * @param aCharacterSet The character range allowed.
+ * @param aInput The input string.
+ * @param aMaxLength The maximum length of the input allowed.
+ * @param aMinLength The minimum length of the input allowed.
+ * @param aHideInput A flag indicating if the input should be hidden.
+ * @param aHelpIsAvailable indicates if help can be requested.
+ * @param aIconId The id of icon.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @return The response of the UI to this command.
+ */
+ void getInputEvent(
+ TSatUiResponse &aRes,
+ const QString &aTitleText,
+ const TSatCharacterSet aCharacterSet,
+ QString &aInputText,
+ const int aMinLength,
+ const int aMaxLength,
+ const bool aHideInput,
+ //const QPixmap* /*aIconBitmapGetInput*/,
+ const bool aSelfExplanatory,
+ unsigned int &aDuration );
+
+ /**
+ * Notification of the SAT Get Inkey command.
+ * @param aText The query text.
+ * @param aCharacterSet The character range allowed.
+ * @param aInput The input string.
+ * @param aHideInput A flag indicating if the input should be hidden.
+ * @param aHelpIsAvailable indicates if help can be requested.
+ * @param aIconId The id of icon.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ */
+ void getInkeyEvent(
+ TSatUiResponse &aRes,
+ const QString &aTitleText,
+ const TSatCharacterSet aCharacterSet,
+ QString &aInputText,
+ //const QPixmap* /*aIconBitmapGetInput*/,
+ const bool aSelfExplanatory,
+ unsigned int &aDuration );
+
+ /**
+ * Notification of the SAT Get YesNo command.
+ * @param aText The query text.
+ * @param aCharacterSet The character range allowed.
+ * @param aInput The input character.
+ * @param aHelpIsAvailable indicates if help can be requested.
+ * @param aIconId The id of icon.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @param aDuration Duration for showing the dialog.
+ * @param aImmediateDigitResponse Indication if Immediate digit response
+ * is needed.
+ * @return The response of the UI to this command.
+ */
+ void getYesNoEvent(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const TSatCharacterSet aCharacterSet,
+ unsigned int &aInkey,
+ //const TSatIconId &aIconId,
+ const bool &aSelfExplanatory,
+ unsigned int &aDuration,
+ const bool aImmediateDigitResponse );
+
+ /**
+ * Handles the SetUpMenu command.
+ * @param aRes the out parameter. the result of the command.
+ * @param aText The title text.
+ * @param aMenuItems The array of menu item captions.
+ * @param aMenuItemNextActions The array of menu item next action
+ * indicator captions.
+ * @param aIconBitmap The Context pane icon.
+ * @param aItemsIconArray Array of item icons
+ * @param aSelfExplanatoryItems A flag indicating if only icons are shown.
+ * @param aHelpIsAvailable A flag indicating if SAT help is available.
+ */
+ void setUpMenuEvent(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QStringList &aMenuItems,
+ //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ //const HbIcon &aIcon,
+ //const CAknIconArray* aItemIconsArray,
+ const bool aSelfExplanatoryItems,
+ const bool aHelpIsAvailable);
+
+ /**
+ * Handles the SelectItem view.
+ * @param aRes the out parameter. the result of the command.
+ * @param aText The title text.
+ * @param aMenuItems The array of menu items.
+ * @param aMenuItemNextActions The array of next action indicators.
+ * @param aDefaultItem The item in focus.
+ * @param aSelection The item index selected by the user.
+ * @param aIconBitmap The Context Pane icon.
+ * @param aItemsIconArray Array of item icons
+ * @param aSelfExplanatoryItems Flag indicating if only icons are shown.
+ * @param aHelpIsAvailable A flag indicating if SAT help is available.
+ * @return Information of the operation result.
+ */
+ void selectItemEvent(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QStringList &aMenuItems,
+ //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const int aDefaultItem,
+ unsigned char &aSelection,
+ //const HbIcon &aIcon,
+ //const CAknIconArray* aItemsIconArray,
+ const bool aSelfExplanatoryItems,
+ const bool aHelpIsAvailable);
+
+ /**
+ * Shows the confirmation note about the SAT Send SMS, Send SS or
+ * Send USSD command.
+ * @param aText The text to be displayed.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @param aType Type of the request (SMS, SS, USSD).
+ * @return Information of the operation result.
+ */
+ void confirmSendEvent(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ bool &aActionAccepted,
+ int aType);
+
+ /**
+ * Shows the wait note about the Send SMS command.
+ * @param aText The text to be displayed.
+ * @param aIconBitmapSendSM Sending dialog icon.
+ * @param aSelfExplanatoryIcon A flag indicating if only icon is shown.
+ */
+ void showSmsWaitNoteEvent(
+ const QString &aText,
+ //const CFbsBitmap* aIconBitmapSendSM,
+ const bool aSelfExplanatoryIcon
+ );
+
+ /**
+ * Shows the confirmation not about SetUpCall.
+ * @param aText The text to be displayed.
+ * @param aSimAppName The header to be displayed.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ */
+ void showSetUpCallConfirmEvent(
+ const QString &aText,
+ const QString &aSimAppName,
+ bool &aActionAccepted//,
+ //const CFbsBitmap* aIconBitmap,
+ //const TBool aSelfExplanatory
+ );
+
+ /**
+ * Shows the wait note about the Send DTMF command.
+ * @param aText The text to be displayed.
+ * @param aIconBitmapSendSM Sending dialog icon.
+ */
+ void showDtmfWaitNoteEvent(
+ TSatUiResponse &aRes,
+ const QString &aText);
+
+ /**
+ * Notification of the SAT Play Tone command.
+ * @param aText The text to be displayed.
+ * @param aTone The tone to be played.
+ * @param aDuration The duration of the tone to be played.
+ * @param aIconId The id of icon.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @return The response of the UI to this command.
+ */
+// virtual TSatUiResponse PlayTone(
+// const TDesC &aText,
+// const TSatTone aTone,
+// const TTimeIntervalMicroSeconds aDuration,
+// const TSatIconId &aIconId,
+// TBool &aRequestedIconDisplayed ) = 0;
+
+ /**
+ * General confirmation request
+ * @param aCommandId ID of the quering command
+ * @param aAlphaIdStatus Alpha Identifier status
+ * @param aText The text to be displayed.
+ * @param aAdditionalText Additional text to be used in queries.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @param aIconId The id of icon.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @param aTerminatedByUser Informs if end key is used.
+ */
+// virtual void ConfirmCommand(
+// const TSatSQueryCommand aCommandId,
+// const TSatAlphaIdStatus aAlphaIdStatus,
+// const TDesC &aText,
+// const TDesC &aAdditionalText,
+// TBool &aActionAccepted,
+// const TSatIconId &aIconId,
+// TBool &aRequestedIconDisplayed,
+// TBool &aTerminatedByUser ) = 0;
+
+ /**
+ * General notification
+ * @param aCommandId ID of the notifying command
+ * @param aAlphaIdStatus Alpha Identifier status
+ * @param aText Alpha Identifier
+ * @param aIconId The id of icon.
+ * @param aRequestedIconDisplayed Informs if icon is not used.
+ * @param aControlResult Control result of the MoSm and CallControl
+ * @return The response of the UI to this command.
+ */
+// virtual TSatUiResponse Notification(
+// const TSatSNotifyCommand aCommandId,
+// const TSatAlphaIdStatus aAlphaIdStatus,
+// const TDesC &aText,
+// const TSatIconId &aIconId,
+// TBool &aRequestedIconDisplayed,
+// const TSatControlResult aControlResult ) = 0;
+
+ /**
+ * General event notification. Used for example to tell UI that command
+ * has completed its execution.
+ * @param aEventId, identifies the event
+ * @param aEventStatus, status of the event, used as additional info for
+ * the event
+ * @param aError, possible error code that may affect on event handling.
+ * This is also used as additional info
+ */
+// virtual void EventNotification(
+// const TSatSEvent aEventId,
+// const TSatSEventStatus aEventStatus,
+// const TInt aError ) = 0;
+
+ /*!
+ Removes Display Text Dialog from the screen.
+ */
+ void clearScreenEvent();
+
+ /*!
+ Close the sat ui
+ */
+ void closeUiEvent();
+
+ /*!
+ *Close wait note
+ */
+ void stopShowWaitNoteEvent();
+
+
+public slots:
+ /*!
+ *User cancel Dtmf response
+ */
+ void userCancelDtmfResponse();
+
+public: // from MSatUiActionImplementer and impletment by QT
+
+ /**
+ * Shows the wait note.
+ */
+ virtual void ShowWaitNoteL() {};
+
+ /**
+ * Shows the wait note without delay
+ */
+ virtual void ShowWaitNoteWithoutDelayL() {};
+
+ /**
+ * Removes the wait note from the screen.
+ */
+ void StopShowWaitNote();
+
+ /**
+ * Handles the SetUpMenu view.
+ * @param aText The title text.
+ * @param aMenuItems The array of menu item captions.
+ * @param aMenuItemNextActions The array of menu item next action
+ * indicator captions.
+ * @param aIconBitmap The Context pane icon.
+ * @param aItemsIconArray Array of item icons
+ * @param aSelfExplanatoryItems Flag indicating if only icons are shown.
+ * @param aHelpIsAvailable A flag indicating if SAT help is available.
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse SetUpMenuL(
+ const TDesC &aText,
+ const MDesCArray &aMenuItems,
+ const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const CFbsBitmap* aIconBitmap,
+ //const CAknIconArray* aItemIconsArray,
+ const TBool aSelfExplanatoryItems,
+ const TBool aHelpIsAvailable);
+
+ /**
+ * Handles the SelectItem view.
+ * @param aText The title text.
+ * @param aMenuItems The array of menu items.
+ * @param aMenuItemNextActions The array of next action indicators.
+ * @param aDefaultItem The item in focus.
+ * @param aSelection The item index selected by the user.
+ * @param aIconBitmap The Context Pane icon.
+ * @param aItemsIconArray Array of item icons
+ * @param aSelfExplanatoryItems Flag indicating if only icons are shown.
+ * @param aHelpIsAvailable A flag indicating if SAT help is available.
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse SelectItemL( const TDesC &aText,
+ const MDesCArray &aMenuItems,
+ const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const TInt aDefaultItem,
+ TUint8 &aSelection,
+ const CFbsBitmap* aIconBitmap,
+ //const CAknIconArray* aItemsIconArray,
+ const TBool aSelfExplanatoryItems,
+ const TBool aHelpIsAvailable );
+
+public: // from MSatUiActionImplementer and impletment by Symbian
+
+ /**
+ * Returns CoeEnv.
+ */
+ virtual CCoeEnv* CoeEnv() { return 0; };
+
+ /**
+ * Handles the DisplayText operation.
+ * @param aText Text to be shown.
+ * @param aSimApplicationName Sim Application name
+ * @param aIconBitmapDisplayText Icon for dialog
+ * @param aSustainedText Indicates is this text sustained ie. no timers
+ * used if ETrue.
+ * @param aDuration Duration for showing the text
+ * @param aWaitUserToClear Indication if user is needed to clear
+ * message
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse DisplayTextL(
+ const TDesC &aText,
+ const TDesC &aSimApplicationName,
+ CFbsBitmap* aIconBitmapDisplayText,
+ const TBool aSelfExplanatoryIcon,
+ const TBool aSustainedText,
+ const TTimeIntervalSeconds aDuration,
+ const TBool aWaitUserToClear);
+
+ /**
+ * Removes Display Text Dialog from the screen.
+ */
+ virtual void ClearScreen();
+
+ /**
+ * Asks a Yes/No answer from the user.
+ * @param aText A question to be shown.
+ * @param aCharacterSet The character range allowed.
+ * @param aInkey Character user feeds.
+ * @param aIconBitmap Icon for query dialog.
+ * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
+ * @param aDuration Duration for showing the dialog.
+ * @param aImmediateDigitResponse Indication if Immediate digit response
+ * is needed.
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse GetYesNoL(
+ const TDesC &aText,
+ const TSatCharacterSet aCharacterSet,
+ TChar &aInkey,
+ const CFbsBitmap* /*aIconBitmap*/,
+ const TBool aSelfExplanatory,
+ TUint &aDuration,
+ const TBool aImmediateDigitResponse);
+
+ /**
+ * Asks input from the user.
+ * @param aText A question to be shown.
+ * @param aCharacterSet The character range allowed.
+ * @param aInput The input string.
+ * @param aMinLength The minimum length of the input allowed.
+ * @param aMaxLength The maximum length of the input allowed.
+ * @param aHideInput A flag indicating if the input should be hidden.
+ * @param aGetInkey A flag indicating if GetInkey command is used.
+ * @param aIconBitmapGetInput Icon for query dialog.
+ * @param aSelfExplanatory A flag indicating if icon is self-explanatory.
+ * @param aDuration Duration for showing the dialog.
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse GetInputL(
+ const TDesC &aText,
+ const TSatCharacterSet aCharacterSet,
+ TDes &aInput,
+ const TInt aMinLength,
+ const TInt aMaxLength,
+ const TBool aHideInput,
+ const TBool aGetInkey,
+ const CFbsBitmap* aIconBitmapGetInput,
+ const TBool aSelfExplanatory,
+ TUint &aDuration );
+
+
+ /**
+ * Handles Standard Tone playing.
+ * @param aText The text to be displayed.
+ * @param aFileName The name of the file corresponding to the tone.
+ * @param aDuration The duration of the tone to be played.
+ * @param aIconBitmap The tone playing note icon
+ * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse PlayStandardToneL(
+ const TDesC &/*aText*/,
+ const TDesC8 &/*aSequence*/,
+ TTimeIntervalMicroSeconds /*aDuration*/,
+ const CFbsBitmap* /*aIconBitmap*/,
+ const TBool /*aSelfExplanatory*/ )
+ {
+ return ESatSuccess;
+ };
+
+ /**
+ * Shows the confirmation note about the SAT Send SMS, Send SS or
+ * Send USSD command.
+ * @param aText The text to be displayed.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @param aType Type of the request (SMS, SS, USSD).
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse ConfirmSendL(
+ const TDesC &aText,
+ TBool &aActionAccepted,
+ TInt aType);
+
+ /**
+ * Shows the wait note about the Send SMS command.
+ * @param aText The text to be displayed.
+ * @param aIconBitmapSendSM Sending dialog icon.
+ * @param aSelfExplanatoryIcon A flag indicating if only icon is shown.
+ */
+ virtual void ShowSmsWaitNoteL(
+ const TDesC &aText,
+ const CFbsBitmap* aIconBitmapSendSM,
+ const TBool aSelfExplanatoryIcon);
+
+ /**
+ * Shows the wait note about the Send SS command.
+ * @param aText The text to be displayed.
+ * @param aIconBitmap Sending dialog icon.
+ * @param aSelfExplanatoryIcon A flag indicating if only icon is shown.
+ */
+ virtual void ShowSsWaitNoteL(
+ const TDesC &/*aText*/,
+ const CFbsBitmap* /*aIconBitmap*/,
+ const TBool /*aSelfExplanatoryIcon*/ ) {};
+
+ /**
+ * Shows the confirmation note about the SAT Refresh command.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @return Information of the operation result.
+ */
+ virtual TSatUiResponse ConfirmRefreshL(
+ TBool &/*aActionAccepted*/)
+ {
+ return ESatSuccess;
+ };
+
+ /**
+ * Notification of the SAT Call Control command.
+ * @param aText The text string to be displayed.
+ * @param aAlphaIdStatus Alpha Identifier status
+ * @param aControlResult Call control general result
+ * @return The response from the UI
+ */
+ virtual TSatUiResponse CallControlL(
+ const TDesC &/*aText*/,
+ const TSatAlphaIdStatus /*aAlphaIdStatus*/ )
+ {
+ return ESatSuccess;
+ };
+
+ /**
+ * Notification of the SAT Launch browser confirmation request
+ * @param aText The text to be displayed.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @param aIconBitmap The confirm note icon
+ * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
+ */
+ virtual void ConfirmLaunchBrowserL(
+ const TDesC &/*aText*/,
+ TBool &/*aActionAccepted*/,
+ const CFbsBitmap* /*aIconBitmap*/,
+ const TBool /*aSelfExplanatory*/) {};
+
+ /**
+ * Notification of the SAT Mo Sm Control command.
+ * @param aText The text string to be displayed.
+ * @param aAlphaIdStatus Alpha Identifier status
+ * @param aControlResult Mo Sm control general result
+ * @return The response from the UI
+ */
+ virtual TSatUiResponse MoSmControlL(
+ const TDesC &/*aText*/,
+ const TSatAlphaIdStatus /*aAlphaIdStatus*/ )
+ {
+ return ESatSuccess;
+ };
+
+ /**
+ * Shows the wait note while DTMF are being sent.
+ * @param aText The text to be displayed.
+ * @param aIconBitmap The confirm note icon
+ * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
+ * @return Information on the operation result.
+ */
+ virtual TSatUiResponse ShowDtmfWaitNoteL(
+ const TDesC &aText,
+ const CFbsBitmap* aIconBitmap,
+ const TBool aSelfExplanatoryIcon );
+
+ /**
+ * Dispatch iWait to action implementer.
+ * @param aWait Timer.
+ */
+ virtual void DispatchTimer(CActiveSchedulerWait &/*aWait*/) {};
+
+ /**
+ * Get flag which is indicating if end key is pressed.
+ * @return A Boolean flag which is indicating if end key is pressed.
+ */
+ virtual TBool GetEndKey()
+ {
+ return EFalse;
+ };
+
+ /**
+ * Set a flag which is indicating if end key is pressed.
+ * @param aValue Status of end key
+ */
+ virtual void SetEndKey(TBool /*aValue*/) {};
+
+ /**
+ * Set a flag which is indicating if proactive command is pending.
+ * @param aValue Status of proactive command
+ */
+ virtual void SetCommandPending(TBool /*aValue*/) {};
+
+ /**
+ * Plays user selected tone.
+ * @param aText The text to be displayed.
+ * @param aDuration Play duration.
+ * @param aTone Tone to be played.
+ * @param aIconBitmap The tone playing note icon
+ * @param aSelfExplanatory Flag indicating if icon is self-explanatory.
+ * @return Information on the operation result.
+ */
+ virtual TSatUiResponse PlayUserSelectedToneL(
+ const TDesC &/*aText*/,
+ TTimeIntervalMicroSeconds /*aDuration*/,
+ TSatTone /*aTone*/,
+ const CFbsBitmap* /*aIconBitmap*/,
+ const TBool /*aSelfExplanatory*/ )
+ {
+ return ESatSuccess;
+ };
+
+ /**
+ * Confirm user permission for Open Channel.
+ * @param aText The text to be displayed.
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @param aIconBitmapOpenChannel Icon for query dialog
+ * @param aSelfExplanatory A flag indicating if icon is self-explanatory
+ * @return Operation result
+ */
+ virtual TSatUiResponse ConfirmOpenChannelL(
+ const TDesC &/*aText*/,
+ TBool &/*aActionAccepted*/,
+ const CFbsBitmap* /*aIconBitmapOpenChannel*/,
+ const TBool /*aSelfExplanatory*/ )
+ {
+ return ESatSuccess;
+ };
+
+ /**
+ * Shows the wait note while BIP packets are sent.
+ * @param aCommand Command type.
+ * @param aText The text to be displayed.
+ * @param aIconBitmap Icon for query dialog
+ * @param aSelfExplanatory A flag indicating if icon is self-explanatory
+ */
+ virtual void ShowBIPNoteL(
+ TInt /*aCommand*/,
+ const TDesC &/*aText*/,
+ const CFbsBitmap* /*aIconBitmap*/,
+ const TBool /*aSelfExplanatory*/) {};
+
+ /**
+ * Confirm user permission for SetUpCall
+ * @param aText The text to be displayed.
+ * @param aSimAppName Header for th equery
+ * @param aActionAccepted Indicates whether the command was accepted.
+ * @param aIconBitmap Icon for query dialog
+ * @param aSelfExplanatory A flag indicating if icon is self-explanatory
+ */
+ virtual void ConfirmSetUpCallL(
+ const TDesC &aText,
+ const TDesC &aSimAppName,
+ TBool &aActionAccepted,
+ const CFbsBitmap* aIconBitmap,
+ const TBool aSelfExplanatory);
+
+ /**
+ * Show note indicating SAT is not available.
+ */
+ virtual void ShowNotAvailableNoteL() {};
+
+ /**
+ * Show the Ss error note.
+ */
+ virtual void ShowSsErrorNoteL() {};
+
+ /**
+ * Start SatUi closing process.
+ */
+ virtual void CloseSatUI();
+
+public: // new method
+
+ /**
+ * Return current profile state.
+ * @return current profile state.
+ */
+ int profileState();
+
+ /**
+ * Response to the Set Up Menu command.
+ * @param aMenuItem The selected menu item.
+ * @param aHelpRequested Indicates whether help was requested.
+ */
+ void menuSelection( int aMenuItem, bool aHelpRequested );
+
+protected:
+ //Q_DISABLE_COPY( SatAppEventProvider );
+
+private: // Data
+
+ /**
+ * The pointer to the sybmian class CSatUiObserver
+ * which will access Sat Client API
+ * own
+ */
+ CSatUiObserver *mObs;
+};
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/inc/satappgetinkeynote.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*
+*/
+
+#ifndef SATAPPGETINKEYNOTE_H
+#define SATAPPGETINKEYNOTE_H
+
+#include <exception>
+#include <QObject>
+#include <hbmessagebox.h>
+
+
+class SatAppGetInkeyNote : public HbMessageBox
+{
+ Q_OBJECT
+
+public:
+
+ SatAppGetInkeyNote(const QString &text,
+ MessageBoxType type=MessageTypeInformation,
+ QGraphicsItem *parent=0);
+
+ virtual ~SatAppGetInkeyNote();
+
+signals:
+
+ void digitalKeyPressed(const int key);
+
+public:
+ void keyPressEvent(QKeyEvent *event);
+
+ };
+#endif //SATAPPGETINKEYNOTE_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/inc/satappmainhandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*
+*/
+
+#ifndef SATAPPMAINHANDLER_H
+#define SATAPPMAINHANDLER_H
+
+#include <QObject>
+
+class HbMainWindow;
+class SatAppUiProvider;
+class SatAppEventProvider;
+class SatAppCommandHandler;
+
+class SatAppMainHandler : public QObject
+{
+ Q_OBJECT
+
+public:
+ SatAppMainHandler(HbMainWindow &window, QObject *parent = 0);
+ ~SatAppMainHandler();
+
+private:
+ void initConnections();
+
+private: // data
+ SatAppEventProvider *mEvent;
+ SatAppUiProvider *mUi;
+ SatAppCommandHandler *mCommand;
+};
+
+#endif // SATAPPMAINHANDLER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/inc/satappuiprovider.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,366 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef SATAPPUIPROVIDER_H
+#define SATAPPUIPROVIDER_H
+
+#include <QObject>
+#include <hbdocumentloader.h>
+#include <hbdialog.h>
+#include <QEventLoop>
+#include <msatuiobserver.h>
+#include "satappcommonconstant.h"
+
+class HbMainWindow;
+class SatAppEventProvider; // Call back from SatServer
+class SatAppView; // SetupMenu and SelectItem
+class HbMessageBox; // DisplayText
+class SatAppGetInkeyNote; // GetInKey
+class HbInputDialog; // GetInKey
+class HbDialog; // GetInput
+class HbProgressNote; // For wait note
+class QTimer; // For SMS/DTMF
+
+// Here we create custom document loader to be able to use own classes in XML.
+class SatAppDocumentLoader : public HbDocumentLoader
+{
+public:
+ virtual QObject *createObject(const QString &type, const QString &name);
+};
+
+class SatAppUiProvider : public QObject
+{
+ Q_OBJECT
+
+public:
+ /*
+ * Constructor
+ * @param window reference of HbMainWindow
+ * @param event reference of SatAppEventProvider
+ * @param parent default value
+ */
+ SatAppUiProvider(HbMainWindow &window,
+ SatAppEventProvider &event,
+ QObject *parent = 0);
+
+ /*
+ * Destructor
+ */
+ ~SatAppUiProvider();
+
+ /*
+ * return the document loader, not transfer the ownership.
+ */
+ SatAppDocumentLoader* docmlLoader();
+
+ /*
+ * Set active view.
+ */
+ void activeView(const QString &view);
+
+ /*
+ * Show SetUpMenuView
+ * @param aRes TSatAppUserResponse the response
+ * @param aText The string need to be shown in heading widget
+ * @param aMenuItems The string need to be shown in list widget
+ * @param aSelfExplanatoryItems
+ * @param aHelpIsAvailable
+ */
+ void showSetUpMenuView(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QStringList &aMenuItems,
+ //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ //const HbIcon &aIcon,
+ //const CAknIconArray* aItemIconsArray,
+ const bool aSelfExplanatoryItems,
+ const bool aHelpIsAvailable);
+
+ /*
+ * Show SelectItemView
+ * @param aRes TSatAppUserResponse the response
+ * @param aText The string need to be shown in heading widget
+ * @param aMenuItems The string need to be shown in list widget
+ * @param aDefaultItem the default item
+ * param aSelection The string need to be shown in list widget
+ * @param aSelfExplanatoryItems
+ * @param aHelpIsAvailable
+ */
+ void showSelectItemView(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QStringList &aMenuItems,
+ //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const int aDefaultItem,
+ unsigned char&aSelection,
+ //const HbIcon &aIcon,
+ //const CAknIconArray* aItemsIconArray,
+ const bool aSelfExplanatoryItems,
+ const bool aHelpIsAvailable);
+
+ /*
+ * Show the Display dialog
+ * @param aText The string need to be shown in content widget
+ * @param aHeader The string need to be shown in heading widget
+ * @param aDuration the duration of dialog shown if user do nothing
+ * @return TSatAppUserResponse the response
+ */
+ TSatAppUserResponse showDisplayTextPopup(
+ const QString &aHeading,
+ const QString &aContent,
+ const int aDuration);
+
+ /*
+ * Show GetInkeyQuer
+ * @param aHeader The string need to be shown in heading widget
+ * @param aContent The string need to be shown in content widget
+ * @param characterSet input mode is digtal or char
+ * @param aDuration the duration of dialog shown if user do nothing
+ * @return TSatAppUserResponse the response
+ */
+ TSatAppUserResponse showGetInkeyQuery(
+ const QString &aHeading,
+ QString &aContent,
+ const TSatCharacterSet aCharacterSet,
+ unsigned int &aDuration);
+
+ /*
+ * Show GetYesNoQuery
+ * @param aText The string shown in content
+ * @param characterSet input mode is digtal or char
+ * @param aDuration the duration of dialog shown if user do nothing
+ * @param aImmediateDigitResponse
+ * @return int the response
+ */
+ int showGetYesNoQuery(
+ const QString &aText,
+ const TSatCharacterSet aCharacterSet,
+ unsigned int &aDuration,
+ const bool aImmediateDigitResponse);
+
+ /*
+ * Show GetInput Query
+ * @param heading The string shown in heading widget
+ * @param content The string what user enters. May contain default text
+ * @param characterSet input mode is digtal or char
+ * @param minLength min lenght for user input
+ * @param maxLength max lenght for user input
+ * @param aHideInput user input should hide or not
+ */
+ TSatAppUserResponse showGetInputQuery(
+ const QString &heading,
+ QString &content,
+ const TSatCharacterSet characterSet,
+ const int minLength,
+ const int maxLength,
+ const bool aHideInput);
+
+ /*
+ * show confirm send query
+ * @param aText The string shown in heading widget
+ * @param aActionAccepted
+ */
+ void showConfirmSendQuery(
+ const QString &aText,
+ bool &aActionAccepted);
+
+ /*
+ * Show Sms wait note
+ * @param aText The string shown in heading widget
+ */
+ void showSmsWaitNote(const QString &aText);
+
+ /*
+ * Show Dtmf wait note
+ * @param aRes
+ * @param aText The string shown in heading widget
+ */
+ void showDtmfWaitNote(TSatUiResponse &aRes,
+ const QString &aText);
+
+ /*
+ * Stop show wait note
+ */
+ void stopShowWaitNote();
+
+ /*
+ * Comfirm setupcall
+ * @param aText
+ * @param aSimAppName
+ * @param aActionAccepted
+ */
+ void showConfirmSetUpCallQuery(
+ const QString &aText,
+ const QString &aSimAppName,
+ bool &aActionAccepted);
+signals:
+ /*
+ * User cancel Dtmf response
+ */
+ void userCancelDtmfResponse();
+
+public slots:
+ /*
+ * Clear Screen
+ */
+ void clearScreen();
+
+ /*
+ * Close Ui
+ */
+ void closeUi();
+
+ /*
+ * Digital response
+ */
+ void digitalResponse(const int aKey);
+
+ /*
+ * The response of user selected the Primary action
+ */
+ void userPrimaryResponse();
+
+ /*
+ * The response of user selected the secondary action
+ */
+ void userSecondaryResponse();
+
+ /*
+ * Update Query Action
+ * @param text
+ */
+ void updateQueryAction(QString text);
+
+ /*
+ * User cancel Dtmf response
+ */
+ void cancelDtmfResponse();
+
+private:
+ /*
+ * Reset the data member mUserRsp value
+ */
+ void resetUserResponse();
+
+ /*
+ * Compose Dialog
+ * @param type
+ * @param aModal
+ * @param aDismissPolicy
+ */
+ void composeDialog(HbDialog *dlg, int aDuration,
+ TSatAppDialogActionType type, bool aModal = true,
+ HbDialog::DismissPolicy aDismissPolicy = HbDialog::NoDismiss);
+
+ /*
+ * Extend the note shown time
+ */
+ void extendNoteShowtime();
+
+private:
+ /*
+ * Not own
+ */
+ HbMainWindow &mMainWindow;
+
+ /*
+ * Own,objects load from XML. Needs to be deleted once application exits
+ */
+ QList<QObject *> mObjects;
+
+ /*
+ * Own. For application xml
+ */
+ SatAppDocumentLoader *mLoader;
+
+ /*
+ * Own. from application xml
+ */
+ SatAppView *mSetupMenuView;
+
+ /*
+ * Own. from application xml
+ */
+ SatAppView *mSelectItemView;
+
+ /*
+ * Own. DisplayPopup
+ */
+ HbMessageBox *mDisplayPopup;
+
+ /*
+ * Own. GetInkeyQuery
+ */
+ HbInputDialog *mGetInkeyQuery;
+
+ /*
+ * Own. YesNoPopup
+ */
+ SatAppGetInkeyNote *mYesNoPopup;
+
+ /*
+ * Own. GetInputQuery
+ */
+ HbInputDialog *mGetInputQuery;
+
+ /*
+ * Own. Confirm SendQuery
+ */
+ HbMessageBox *mConfirmSendQuery;
+
+ /*
+ * Own. SmsWaitNote
+ */
+ HbProgressNote *mSmsWaitNote;
+ /*
+ * Own. DtmfWaitNote
+ */
+ HbProgressNote *mDtmfWaitNote;
+
+ /*
+ * Own. SetUpCall Query
+ */
+ HbMessageBox *mSetUpCallQuery;
+
+ /*
+ * General user response
+ */
+ TSatAppUserResponse mUserRsp;
+
+ /*
+ * GetInkey immediate digital response
+ */
+ int mDigitalRsp;
+
+ /*
+ * GetInput min legnth, en/dis able ok buttion
+ */
+ int mMinLength;
+
+ /*
+ * Own. DTMF
+ */
+ QTimer *mTimer;
+
+ /*
+ * Own.
+ */
+ QEventLoop *mLoop;
+};
+
+#endif// SATAPPUIPROVIDER_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/inc/satappview.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,228 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*
+*/
+
+#ifndef SATAPPVIEW_H
+#define SATAPPVIEW_H
+
+#include <QEventLoop>
+#include <hbview.h>
+#include <msatuiobserver.h>
+
+class QTimer;
+class HbMainWindow;
+class HbAction;
+class HbListWidget;
+class HbListWidgetItem;
+class HbLabel;
+class SatAppEventProvider;
+class SatAppUiProvider;
+
+class SatAppView : public HbView
+ {
+ Q_OBJECT
+
+public:
+ /**
+ * Constructor
+ */
+ SatAppView(QGraphicsItem *parent = 0);
+
+ /**
+ * Destructor
+ */
+ ~SatAppView();
+
+ void setMainWindow(HbMainWindow &mainWindow);
+
+ /**
+ * Initialize setup menu view
+ * Handles the SetUpMenu command.
+ * @param in eventProvider The reference of SatAppEventProvider.
+ * @param in uiProvider The eference of SatAppUiProvider.
+ */
+ void initSetupMenu(SatAppEventProvider &eventProvider,
+ SatAppUiProvider &uiProvider);
+
+ /**
+ * Initialize select item view
+ * Handles the SelectItem command.
+ * @param in utils The reference of SatAppEventProvider.
+ * @param in manager The reference of SatAppUiProvider.
+ */
+ void initSelectItem(SatAppEventProvider &eventProvider,
+ SatAppUiProvider &uiProvider);
+ /**
+ * Handles the SetUpMenu command.
+ * @param aRes the out parameter. the result of the command.
+ * @param aText The title text.
+ * @param aMenuItems The array of menu item captions.
+ * @param aMenuItemNextActions The array of menu item next action
+ * indicator captions.
+ * @param aIconBitmap The Context pane icon.
+ * @param aItemsIconArray Array of item icons
+ * @param aSelfExplanatoryItems Flag indicating if only icons are shown.
+ * @param aHelpIsAvailable A flag indicating if SAT help is available.
+ */
+ void showSetUpMenuContent(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QStringList &aMenuItems,
+ //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ //const HbIcon &aIcon,
+ //const CAknIconArray* aItemIconsArray,
+ const bool aSelfExplanatoryItems,
+ const bool aHelpIsAvailable);
+
+ /**
+ * Handles the SelectItem view.
+ * @param aRes the out parameter. the result of the command.
+ * @param aText The title text.
+ * @param aMenuItems The array of menu items.
+ * @param aMenuItemNextActions The array of next action indicators.
+ * @param aDefaultItem The item in focus.
+ * @param aSelection The item index selected by the user.
+ * @param aIconBitmap The Context Pane icon.
+ * @param aItemsIconArray Array of item icons
+ * @param aSelfExplanatoryItems Flag indicating if only icons are shown.
+ * @param aHelpIsAvailable A flag indicating if SAT help is available.
+ * @return Information of the operation result.
+ */
+ void showSelectItemContent(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QStringList &aMenuItems,
+ //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const int aDefaultItem,
+ unsigned char &aSelection,
+ //const HbIcon &aIcon,
+ //const CAknIconArray* aItemsIconArray,
+ const bool aSelfExplanatoryItems,
+ const bool aHelpIsAvailable);
+
+public slots:
+ /**
+ * Private slot for select item event.
+ */
+ void selectItemTimeOut();
+ /**
+ * Private slot for active item.
+ */
+ void menuItemSelected(HbListWidgetItem *item);
+
+private slots:
+ /**
+ * Private slot for receiving backSoftkey press event.
+ */
+ void backButtonClicked();
+
+private: // From HbView
+ /**
+ * handle key press event
+ */
+ void keyPressEvent(QKeyEvent *event);
+
+private: // New method
+ /**
+ * Set the secondary softkey as back softkey.
+ */
+ void setSoftkeyBack();
+
+ /**
+ * Connect item with menuItemSelected.
+ */
+ void connectItem();
+
+ /**
+ * Disonnect item with menuItemSelected.
+ */
+ void disconnectItem();
+
+private: // data
+ /**
+ * Support select item time out.
+ */
+ bool mTimeout;
+
+ /**
+ * Indicatd Select item view and Setup Menu view.
+ */
+ bool mSelectItem;
+
+ /**
+ * Indicate use click back softkey.
+ */
+ bool mClickBackSoftkey;
+
+ /**
+ * The index of list widget.
+ */
+ int mItemIndex;
+
+ /**
+ * Own,an event loop for select item and menu selection
+ */
+ QEventLoop* mLoop;
+
+ /**
+ * Own,support selection item time out
+ */
+ QTimer *mTimer;
+
+ // quit for setup menu view
+ /**
+ * Not own. From main
+ */
+ HbMainWindow *mWindow;
+
+ /**
+ * Own. An Action to quit sat application
+ */
+ HbAction *mSoftKeyQuitAction;
+
+ /**
+ * Own. An action to back to setup menu view
+ */
+ HbAction *mSoftKeyBackAction;
+
+ /**
+ * Not own.
+ */
+ SatAppEventProvider *mEvent;
+
+ /**
+ * Not own.
+ */
+ SatAppUiProvider *mUi;
+
+ /**
+ * Own,from application xml,don't delete in distructor
+ */
+ HbListWidget *mListWidget;
+
+ /**
+ * Own,from application xml,don't delete in distructor
+ */
+ HbListWidget *mSelectListWidget;
+
+ /**
+ * Own,from application xml,don't delete in distructor
+ */
+ HbLabel *mSubTitle;
+ };
+
+#endif // SATAPPVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/inc/tflogger.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*
+*/
+
+#ifndef __TFLOGGER_H__
+#define __TFLOGGER_H__
+
+#include <flogger.h>
+#include <e32svr.h>
+
+_LIT(KTfLogFolder, "sat");
+_LIT(KTfLogFile, "satui.txt");
+
+/**
+* ------------------------------------------------------------------------------
+*
+* Remove #define LOGGING_ENABLED from comments to enable logging
+*
+* ------------------------------------------------------------------------------
+*/
+
+#ifdef _DEBUG
+#define LOGGING_ENABLED
+#endif
+
+/**
+* ------------------------------------------------------------------------------
+*
+* LOGGING MACROs
+*
+* USE THESE MACROS IN YOUR CODE
+*
+* Example: TFLOGTEXT(own_desc)
+* Example: TFLOGSTRING("Test")
+* Example: TFLOGSTRING("Test %i", aValue)
+* Example: TFLOGSTRING("Test %i %i", aValue1, aValue2)
+*
+* ------------------------------------------------------------------------------
+*/
+
+#ifdef LOGGING_ENABLED
+
+ #define TFLOGTEXT(TEXT) \
+ { \
+ RFileLogger::Write(KTfLogFolder,KTfLogFile, \
+ EFileLoggingModeAppend, TEXT); \
+ RDebug::Print(TEXT); \
+ }
+
+ #define TFLOGSTRING(TEXT) \
+ { \
+ _LIT(tempLogDes, TEXT); \
+ RFileLogger::Write(\
+ KTfLogFolder, \
+ KTfLogFile, \
+ EFileLoggingModeAppend, \
+ tempLogDes()); \
+ RDebug::Print(_L(TEXT)); \
+ }
+
+ #define TFLOGSTRING2(TEXT, VAR1) \
+ { \
+ _LIT(tempLogDes, TEXT); \
+ RFileLogger::WriteFormat(\
+ KTfLogFolder, \
+ KTfLogFile, \
+ EFileLoggingModeAppend, \
+ TRefByValue<const TDesC>(tempLogDes()), VAR1); \
+ RDebug::Print(_L(TEXT), VAR1); \
+ }
+
+ #define TFLOGSTRING3(TEXT, VAR1, VAR2) \
+ { \
+ _LIT(tempLogDes, TEXT); \
+ RFileLogger::WriteFormat(\
+ KTfLogFolder, \
+ KTfLogFile, \
+ EFileLoggingModeAppend, \
+ TRefByValue<const TDesC>(tempLogDes()), VAR1, VAR2); \
+ RDebug::Print(_L(TEXT), VAR1, VAR2); \
+ }
+
+#else
+
+ #define TFLOGTEXT(TEXT)
+ #define TFLOGSTRING(TEXT)
+ #define TFLOGSTRING2(TEXT, VAR1)
+ #define TFLOGSTRING3(TEXT, VAR1, VAR2)
+
+#endif // LOGGING_ENABLED
+
+#endif // __TFLOGGER_H__
--- a/satui/satapp/loc/satui.loc Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,299 +0,0 @@
-/*
-* Copyright (c) 2002-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: This is a localisation file for SatUi
-* A .loc file is the one and only place where the logical strings
-* to be localised are defined.
-*
-*/
-
-
-/**
- * Default (implementation English) Resource localisation file for
- * SatUi application information resource SatUi.rss.
- */
-
-// LOCALISATION STRINGS
-
-//d:SatUi application name in Application Shell
-//l:list_single_large_graphic_pane_t1
-//w:
-//r:2.8
-//
-#define qtn_apps_simapps_list "SIM services"
-
-//d:SatUi application name in Application Shell
-//l:cell_app_pane_t1
-//w:
-//r:2.8
-//
-#define qtn_apps_simapps_grid "SIM services"
-
-//d:SatUi application title
-//l:title_pane_t2/opt9
-//w:
-//r:2.8
-//
-#define qtn_sat_title "SIM services"
-
-//d:SIM message header in the popup window
-//l:heading_pane_t1
-//w:
-//r:2.8
-//
-#define qtn_sat_message_header "SIM note:"
-
-//d:SIM help header in the popup window
-//l:heading_pane_t1
-//w:
-//r:2.8
-//
-#define qtn_sat_help_header "SIM help:"
-
-//d:Prompt text for Get Inkey data query if alpha entry is expected
-//l:popup_query_data_window
-//w:
-//r:2.8
-//
-#define text_simatk_enter_char "Enter:\n(1 character)"
-
-//d:Prompt text for Get Inkey data query if numeric entry is expected
-//l:popup_query_data_window
-//w:
-//r:2.8
-//
-#define text_simatk_enter_nbr "Enter:\n(1 digit 0-9)"
-
-//d:Prompt text for Get Input data query if alpha entry is expected
-//l:popup_query_data_window
-//w:
-//r:2.8
-//
-#define text_simatk_enter_char_string "Enter:"
-
-//d:Prompt text for Get Input data query if numeric entry is expected
-//l:popup_query_data_window
-//w:
-//r:2.8
-//
-#define text_simatk_enter_nbr_string "Enter:\n(number)"
-
-//d:SMS sending procedure is confirmed with a confirmation query
-//d:with this text
-//l:popup_note_window
-//w:
-//r:2.8
-//
-#define text_simatk_send_sms "Allow SIM card to send a message?"
-
-//d:SMS sending procedure is indicated with an information note
-//d:with this text
-//l:popup_note_window
-//w:
-//r:2.8
-//
-#define qtn_sat_note_sms_send "SMS sending by SIM"
-
-//d:SMS sending procedure is notified to the user with a wait note
-//d:with this text
-//l:popup_note_wait_window
-//w:
-//r:2.8
-//
-#define qtn_sat_sending_sms "Sending..."
-
-//d:SS sending procedure is confirmed with a confirmation note with this text
-//l:popup_note_window
-//w:
-//r:2.8
-//
-#define text_simatk_send_ss "Allow SIM card to send a request to the network?"
-
-//d:Setting up call procedure is confirmed with a confirmation note
-//d:with this text
-//d:%0U is the name of SIM application or qtn_sat_query_title
-//l:popup_note_window
-//w:
-//r:2.8
-//
-#define text_call_setup_by_simatk "%U about to call"
-
-//d:Part of the text text_call_setup_by_simatk (see above)
-//l:popup_note_window
-//w:
-//r:2.8
-//
-#define qtn_sat_query_title "SIM services"
-
-//d:Refresh is confirmed with a confirmation note with this text
-//l:popup_note_window
-//w:
-//r:2.8
-//
-#define qtn_sat_query_allow_reset "Allow SIM update?"
-
-//d:The refresh is notified to the user with a wait note with this text
-//l:popup_note_wait_window
-//w:
-//r:2.8
-//
-#define qtn_sat_wait_refresh_update "SIM card updating"
-
-//d:Command text associated to an item in the Options Menu
-//d:Selects the item in focus in the main pain
-//l:list_single_pane_t1_cp2
-//w:
-//r:2.8
-//
-#define qtn_sat_option_send "Send"
-
-//d:Command text associated to an item in the Options Menu
-//d:Selects the item in focus in the main pain
-//l:list_single_pane_t1_cp2
-//w:
-//r:2.8
-//
-#define qtn_sat_option_play_tone "Play"
-
-//d:Command text associated to an item in the Options Menu
-//d:Selects the item in focus in the main pain
-//l:list_single_pane_t1_cp2
-//w:
-//r:2.8
-//
-#define qtn_sat_option_read "Read"
-
-//d:Command text associated to an item in the Options Menu
-//d:Selects the item in focus in the main pain
-//l:list_single_pane_t1_cp2
-//w:
-//r:2.8
-//
-#define qtn_sat_option_goto "Go to"
-
-/**
- * Default (implementation English) Resource localisation file for
- * SatUi application information resource SatUi.rss.
- * Additional texts introduced during SAT joint development
- * Moved from satuiadd.loc
- */
-
-//d:It is wait note during DTMF sending procedure.
-//d:%U is replaced with the DTMF string to be sent.
-//l:popup_note_wait_window
-//w:
-//r:2.8
-//
-#define qtn_sat_note_sending_dtmf_template "Sending\n%U"
-
-//d:It is information note after SIM Toolkit's
-//d:Mobile Outgoing Short Message Control
-//d:has modified a short message request.
-//l:popup_note_window
-//w:
-//r:2.8
-//
-#define qtn_sat_request_modified "Request modified"
-
-//d:Information note about Call Control
-//d:shows a message to user that call
-//d:control has not allowed the action
-//l:popup_note_window
-//w:
-//r:2.8
-//
-#define qtn_sat_cc_not_allowed "Request not allowed"
-
-//d:Information note about Call Control
-//d:shows a message to user that call
-//d:control has changed the call
-//l:popup_note_window
-//w:
-//r:2.8
-//
-#define qtn_sat_cc_modified "Request Modified"
-
-//d:Information note about No response timeout
-//d:shows a message to user that timeout
-//d:has expired for input
-//l:popup_note_window
-//w:
-//r:2.8
-//
-#define qtn_sat_timeout "Timeout!"
-
-//d:Open Channel is confirmed with a confirmation note with this text
-//l:popup_note_window
-//w:
-//r:3.0
-//
-#define qtn_sat_conf_open_channel_bip "Open connection?"
-
-//d:Receive data procedure is notified to the user with a wait note
-//l:popup_note_wait_window
-//w:
-//r:3.0
-//
-#define qtn_sat_conf_receive_data_bip "Receiving data"
-
-//d:Send data procedure is notified to the user with a wait note
-//l:list_single_popup_menu_pane_1
-//l:popup_note_wait_window
-//w:
-//r:3.0
-//
-#define qtn_sat_conf_send_data_bip "Sending data"
-
-//d:Close Channel information note
-//l:list_single_popup_menu_pane_1
-//l:popup_note_window
-//w:
-//r:3.0
-//
-#define qtn_sat_conf_close_channel_bip "Connection closed"
-
-//d:Launch Browser is confirmed with this text
-//l:popup_note_window
-//w:
-//r:3.0
-//
-#define qtn_sat_conf_launch_brow "Open browser?"
-
-//d:Indicate SAT is not available
-//l:popup_note_window
-//w:
-//r:3.0
-//
-#define qtn_sat_services_not_available "SIM services not available"
-
-//d:Command text associated to the middle softkey
-//l:control_pane_t3/opt7
-//w:
-//r:3.2
-//
-#define qtn_msk_call_sat "Call"
-
-
-//d:Command text associated to the middle softkey
-//l:control_pane_t3/opt7
-//w:
-//r:3.2
-//
-#define qtn_msk_read_sat "Read"
-
-//d:Command text associated to the middle softkey
-//l:control_pane_t3/opt7
-//w:
-//r:3.2
-//
-#define qtn_msk_goto_sat "Go to"
Binary file satui/satapp/resource/sat_text_map.xls has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/resource/satapp.qrc Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,10 @@
+<RCC>
+ <!-- application xml -->
+ <qresource prefix="/xml" >
+ <file alias="satapp.docml">satapp.docml</file>
+ </qresource>
+ <qresource prefix="/translations" >
+ <file alias="satapp_en">satapp_en.qm</file>
+ </qresource>
+
+</RCC>
Binary file satui/satapp/resource/satapp_en.qm has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/resource/satapp_en.ts Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="3.0" language="en_GB" sourcelanguage="en_GB">
+<context>
+<message numerus="no" id="txt_sat_sendingtextmessage">
+ <comment></comment>
+ <source>Sending Text message</source>
+ <translation variants="no">Sending Text message</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_sat_simatk_enter_nbr">
+ <comment></comment>
+ <source>Enter:\n(1 digit 0-9)</source>
+ <translation variants="no">Enter:\n(1 digit 0-9)</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_sat_selectitem_title">
+ <comment></comment>
+ <source>Make a choice...</source>
+ <translation variants="no">Make a choice...</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+<message numerus="no" id="txt_sat_title">
+ <comment></comment>
+ <source>SIM Services</source>
+ <translation variants="no">SIM Services</translation>
+ <extra-loc-layout_id></extra-loc-layout_id>
+ <extra-loc-viewid></extra-loc-viewid>
+ <extra-loc-positionid></extra-loc-positionid>
+ <extra-loc-feature></extra-loc-feature>
+ <extra-loc-blank>False</extra-loc-blank>
+</message>
+</context>
+</TS>
--- a/satui/satapp/rom/SatUiResources.iby Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-/*
-* Copyright (c) 2003-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Sat UI Resources iby file.
-*
-*/
-
-
-#ifndef __SATUI_RESOURCES_IBY__
-#define __SATUI_RESOURCES_IBY__
-
-#ifdef __SIMCARD
-
-S60_APP_CAPTION(SATUI)
-//Resource file(s) for Satui
-S60_APP_RESOURCE(SatUI)
-
-#endif
-
-#endif
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/rom/satapp.iby Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,32 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: IBY file for satapp application
+;
+;
+
+#ifndef __SATAPP_IBY__
+#define __SATAPP_IBY__
+
+#ifdef __SIMCARD
+// SAT SHELL CONTROLLER
+file=ABI_DIR\BUILD_DIR\satshellcntrl.dll SHARED_LIB_DIR\satshellcntrl.dll
+file=ABI_DIR\BUILD_DIR\satapp.exe SHARED_LIB_DIR\satapp.exe
+
+data=DATAZ_\resource\apps\satapp.rsc resource\apps\satapp.rsc
+data=ZSYSTEM\install\satapp_stub.sis system\install\satapp_stub.sis
+data=ZPRIVATE\10003a3f\import\apps\satapp_reg.rsc private\10003a3f\import\apps\satapp_reg.rsc
+
+#endif
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/rom/satapp_stub.pkg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,32 @@
+;
+; Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: For packing sat application stub.
+;
+; Languages
+&EN
+
+; Header
+#{"satapp"}, (0x101f4ce0), 1, 0, 0, TYPE=SA
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+; Files
+""-"z:\sys\bin\satshellcntrl.dll"
+""-"z:\sys\bin\satapp.exe"
+""-"z:\resource\apps\satapp.rsc"
+""-"z:\private\10003a3f\import\apps\satapp_reg.rsc"
Binary file satui/satapp/rom/satapp_stub.sis has changed
--- a/satui/satapp/rom/satui.iby Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
-* Copyright (c) 2003-2007 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Sat UI iby file.
-*
-*/
-
-
-#ifndef __SATUI_IBY__
-#define __SATUI_IBY__
-
-#ifdef __SIMCARD
-S60_APP_EXE(SATUI)
-S60_APP_AIF_ICONS(Satui)
-S60_APP_BITMAP(Satui)
-
-// SAT SHELL CONTROLLER
-file=ABI_DIR\BUILD_DIR\SATSHELLCNTRL.DLL SHARED_LIB_DIR\SATSHELLCNTRL.DLL
-
-// Application registration resource file
-data=ZPRIVATE\10003a3f\apps\Satui_reg.rsc private\10003a3f\import\apps\Satui_reg.rsc
-
-// SAT Stub SIS
-data=ZSYSTEM\install\SatApp_stub.sis System\Install\SatApp_stub.sis
-
-#endif
-
-#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/satapp.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,68 @@
+#
+# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#
+#
+
+TEMPLATE = app
+TARGET = satapp
+DEPENDPATH += .
+HEADERS += $$PUBLIC_HEADERS
+
+CONFIG += hb
+
+symbian: {
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
+ TARGET.UID3=0x101f4ce0
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+ ../../inc
+ LIBS += -lSatClient.dll \
+ -lSatInternalClient.dll \
+ -legul.dll \
+ -lfbscli.dll \
+ -lcentralrepository.dll \
+ -lCenRepNotifHandler.dll \
+ -lCdlEngine.dll \
+ -lFlogger.dll
+
+ HEADERS += inc/msatuiactionimplementer.h \
+ inc/satappcommonconstant.h \
+ inc/tflogger.h \
+ inc/satappmainhandler.h \
+ inc/satappcommandhandler.h \
+ inc/satappeventprovider.h \
+ inc/satappuiprovider.h \
+ inc/satappview.h \
+ inc/satappgetinkeynote.h \
+ inc/csatuiobserver.h \
+ inc/csatuiiconhandler.h \
+
+
+ SOURCES += src/main.cpp \
+ src/satappmainhandler.cpp \
+ src/satappcommandhandler.cpp \
+ src/satappeventprovider.cpp \
+ src/satappuiprovider.cpp \
+ src/satappview.cpp \
+ src/satappgetinkeynote.cpp \
+ src/csatuiobserver.cpp \
+ src/csatuiiconhandler.cpp
+
+ BLD_INF_RULES.prj_exports += "rom/satapp.iby CORE_MW_LAYER_IBY_EXPORT_PATH(satapp.iby)" \
+ "rom/satapp_stub.sis /epoc32/data/z/system/install/satapp_stub.sis"
+}
+
+RESOURCES += resource/satapp.qrc
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/sis/satapp.pkg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,46 @@
+;
+; Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: For packing sat application update.
+;
+
+; Language
+&EN
+
+; Header
+#{"satapp"}, (0x101f4ce0), 10, 1, 0, TYPE=PU
+
+; Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+; Localised Vendor name
+;%{"Nokia, Qt Software"}
+
+; Unique Vendor name
+;:"Nokia, Qt Software"
+
+; Dependencies
+[0x101F7961],0,0,0,{"S60ProductID"}
+[0x102032BE],0,0,0,{"S60ProductID"}
+[0x102752AE],0,0,0,{"S60ProductID"}
+[0x1028315F],0,0,0,{"S60ProductID"}
+(0x2001E61C), 4, 5, 0, {"QtLibs pre-release"}
+
+; Executable and default resource files
+"\epoc32\release\armv5\urel\satapp.exe" - "!:\sys\bin\satapp.exe"
+"\epoc32\release\armv5\urel\satshellcntrl.dll" - "!:\sys\bin\satshellcntrl.dll"
+"\epoc32\data\z\private\10003a3f\import\apps\satapp_reg.rsc" - "!:\private\10003a3f\import\apps\satapp_reg.rsc"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/src/csatuiiconhandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,245 @@
+/*
+* Copyright (c) 2006-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CSatUiIconHandler class.
+*
+*/
+
+#include <exception>
+#include <fbs.h>
+#include <rsatservice.h>
+#include <tsaticoninfo.h>
+
+#include "csatuiiconhandler.h"
+#include "tflogger.h"
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// First part of Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CSatUiIconHandler* CSatUiIconHandler::NewL()
+ {
+ TFLOGSTRING( "CSatUiIconHandler::NewL enter" )
+ CSatUiIconHandler* self = new ( ELeave ) CSatUiIconHandler;
+ TFLOGSTRING( "CSatUiIconHandler::NewL exit" )
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CSatUiIconHandler::~CSatUiIconHandler()
+ {
+ TFLOGSTRING( "CSatUiIconHandler::~CSatUiIconHandler enter" )
+ // Close RSatService interface
+ iSatService.Close();
+ TFLOGSTRING( "CSatUiIconHandler::~CSatUiIconHandler exit" )
+ }
+
+// ---------------------------------------------------------------------------
+// Fetches first icon information, then the handle to the icon and at last
+// does the duplication of the icon bitmap. Object is set to wait the
+// completion of the request.
+// ---------------------------------------------------------------------------
+//
+CFbsBitmap* CSatUiIconHandler::FetchIconL( const RSatSession& aSatSession,
+ const TUint8 aIconId,
+ const TInt aOptWidth,
+ const TInt aOptHeight,
+ TBool& aIconSupport )
+ {
+ TFLOGSTRING( "CSatUiIconHandler::FetchIconL enter" )
+ TFLOGSTRING3( "CSatUiIconHandler::FetchIconL aOptWidth=%d aOptHeight=%d",
+ aOptWidth, aOptHeight )
+
+ iSatService.OpenL( aSatSession );
+ CleanupClosePushL( iSatService );
+
+ RIconEf iconEf;
+ CleanupClosePushL( iconEf );
+ // Order of superiority list
+ RArray<TInt> selectedIcons;
+ CleanupClosePushL( selectedIcons );
+ CFbsBitmap* iconBitmap = NULL;
+
+ // Getting the information of the icon
+ TRAPD( err, iSatService.GetIconInfoL( aIconId, iconEf ); );
+
+ if ( KErrNone == err )
+ {
+ TFLOGSTRING( "CSatUiIconHandler::FetchIconL no error" )
+ // Sorting into order of superiority
+ SortIconsL( iconEf, selectedIcons, aOptWidth, aOptHeight );
+
+ // Reset iconCount by approved icons
+ const TInt iconCount = selectedIcons.Count() <= iconEf.Count() ?
+ selectedIcons.Count() :
+ iconEf.Count();
+ TBool fetchSuccess( EFalse );
+
+ TFLOGSTRING2( "CSatUiIconHandler::FetchIconL iconCount: %d", iconCount )
+ // If there were icons to be fetched
+ if ( 0 < iconCount )
+ {
+ // start going through approved icons list from the
+ // first and biggest icon
+ TInt counter( 0 );
+ for ( counter = 0; ( counter < iconCount ) && !fetchSuccess;
+ counter++ )
+ {
+ TInt selectedIconCounter = selectedIcons.operator[]( counter );
+ TFLOGSTRING2( "CSatUiIconHandler::\
+ FetchIconL selectedIconCounter: %d", selectedIconCounter )
+ TRAPD( err,
+ iconBitmap = iSatService.GetIconL( iconEf.operator[](
+ selectedIconCounter ) ) );
+ if ( KErrNone == err )
+ {
+ fetchSuccess = ETrue;
+ TFLOGSTRING( "CSatUiIconHandler::FetchIconL fetchSuccess!" )
+ }
+ else
+ {
+ delete iconBitmap;
+ }
+ }
+ }
+ }
+
+ TFLOGSTRING2( "CSatUiIconHandler::FetchIconL icon info error=%d", err )
+ if ( KErrNotSupported == err )
+ {
+ TFLOGSTRING( "CSatUiIconHandler::FetchIconL icons not supported" )
+ aIconSupport = EFalse;
+ }
+
+ // selectedIcons, iconEf and iSatService not deleted but closed
+ CleanupStack::PopAndDestroy( 3, &iSatService );
+
+ TFLOGSTRING( "CSatUiIconHandler::FetchIconL exit" )
+ // Icon was not found, icons are not supported or an error was received.
+ return iconBitmap;
+ }
+
+// ---------------------------------------------------------------------------
+// C++ default constructor cannot contain any code that might leave.
+// ---------------------------------------------------------------------------
+//
+CSatUiIconHandler::CSatUiIconHandler()
+ {
+ TFLOGSTRING( "CSatUiIconHandler::CSatUiIconHandler enter - exit" )
+ }
+
+// ---------------------------------------------------------------------------
+// Sorts icons into order of superiority
+// ---------------------------------------------------------------------------
+//
+void CSatUiIconHandler::SortIconsL( const RIconEf& aIconEf,
+ RArray<TInt>& aSelectedIcons, const TInt aOptWidth,
+ const TInt aOptHeight ) const
+ {
+ TFLOGSTRING( "CSatUiIconHandler::SortIcons enter" )
+
+ const TInt iconCount = aIconEf.Count();
+ TFLOGSTRING2( "CSatUiIconHandler::SortIcons iconCount=%d", iconCount )
+ TInt counter( 0 );
+ // Search icon from available iconarray
+ for ( counter = 0; counter < iconCount; counter++ )
+ {
+ TFLOGSTRING3( "CSatUiIconHandler::SortIcons Icon Width=%d Height=%d",
+ aIconEf.operator[]( counter ).IconSize().iWidth,
+ aIconEf.operator[]( counter ).IconSize().iHeight )
+
+ const TInt selectedCount( aSelectedIcons.Count() );
+ TBool replacement( EFalse );
+
+ // Count the difference of the icon versus layout
+ TInt newWidthDifference(
+ aOptWidth - aIconEf.operator[]( counter ).IconSize().iWidth );
+ TInt newHeightDifference(
+ aOptHeight - aIconEf.operator[]( counter ).IconSize().iHeight );
+
+ // Make the difference absolute value
+ if ( newWidthDifference < 0 )
+ {
+ newWidthDifference = -newWidthDifference;
+ }
+
+ if ( newHeightDifference < 0 )
+ {
+ newHeightDifference = -newHeightDifference;
+ }
+ TInt listCounter( 0 );
+ // Going through the list of icons of suitable size
+ for ( listCounter = 0; ( listCounter < selectedCount ) &&
+ !replacement; listCounter++ )
+ {
+
+ // Count the difference of the icon versus layout
+ TInt oldWidthDifference( aOptWidth - aIconEf.operator[](
+ aSelectedIcons.operator[]( listCounter ) ).IconSize().iWidth );
+ TInt oldHeightDifference( aOptHeight - aIconEf.operator[](
+ aSelectedIcons.operator[]( listCounter ) ).IconSize().iHeight );
+
+ // Make the difference absolute value
+ if ( oldWidthDifference < 0 )
+ {
+ oldWidthDifference = -oldWidthDifference;
+ }
+
+ if ( oldHeightDifference < 0 )
+ {
+ oldHeightDifference = -oldHeightDifference;
+ }
+
+ // New icon is better either by being closer to the layout or by
+ // being same size and color instead of black and white
+ if ( ( ( newWidthDifference < oldWidthDifference ) &&
+ ( newHeightDifference <= oldHeightDifference ) ) ||
+ ( ( newWidthDifference <= oldWidthDifference ) &&
+ ( newHeightDifference < oldHeightDifference ) ) ||
+ ( ( newWidthDifference == oldWidthDifference ) &&
+ ( newHeightDifference == oldHeightDifference ) &&
+ ( TSatIconInfo::EBasic == aIconEf.operator[]( aSelectedIcons.
+ operator[]( listCounter ) ).CodingScheme() ) &&
+ ( TSatIconInfo::EColor == aIconEf.operator[]( counter ).
+ CodingScheme() ) ) )
+ {
+ TFLOGSTRING2( "CSatUiIconHandler::SortIcons \
+ newWidthDifference: %d", newWidthDifference )
+ TFLOGSTRING2( "CSatUiIconHandler::SortIcons \
+ oldHeightDifference: %d", oldHeightDifference )
+ // Insert new icon to correct place
+ aSelectedIcons.InsertL( counter, listCounter );
+ replacement = ETrue;
+ }
+ }
+
+ TFLOGSTRING2( "CSatUiIconHandler::SortIcons listCounter: %d", \
+ listCounter )
+ // Either first item or was not better than any in the list
+ // New icon is added to the end of the array
+ if ( !replacement )
+ {
+ aSelectedIcons.AppendL( counter );
+ }
+ }
+
+ TFLOGSTRING2( "CSatUiIconHandler::SortIcons counter: %d", \
+ counter )
+ TFLOGSTRING( "CSatUiIconHandler::SortIcons exit" )
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/src/csatuiobserver.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,1881 @@
+/*
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This class handles the communication between server and
+* user interface
+*
+*/
+
+
+// INCLUDE FILES
+#include <e32test.h>
+#include <msatuiadapter.h>
+#include <ProfileEngineSDKCRKeys.h>
+#include <centralrepository.h>
+#include <settingsinternalcrkeys.h>
+#include <gulicon.h> //for itemsicon
+#include <fbs.h>
+
+#include "csatuiobserver.h"
+#include "msatuiactionimplementer.h"
+#include "csatuiiconhandler.h"
+#include "tflogger.h"
+
+// CONSTANTS
+const TInt KSatActiveProfileOffline = 5; // value from ProfileEngine
+
+// PlayTone durations
+const TInt64 KSatDur170ms = 170000; // 170ms
+const TInt64 KSatDur200ms = 200000; // 200ms
+const TInt64 KSatDur250ms = 250000; // 250ms
+const TInt64 KSatDur1200ms = 1200000; // 1200ms
+
+// play tone tones
+_LIT8(KNetToneSeqNetBusy, "\x00\x11\x05\x4E\x30\x40\x30\x07\x0B");
+
+_LIT8(KNetToneSeqNetCallWaiting, "\x00\x11\x05\x4E\x14\x40\x3C\x4E\x14\
+\x40\x64\x40\x64\x40\x64\x4E\x14\x40\x3C\x4E\x14\x40\x64\x40\x64\x40\x64\
+\x07\x0B");
+
+_LIT8(KNetToneSeqNetCongestion, "\x00\x11\x05\x4E\x14\x40\x14\x07\x0B");
+
+_LIT8(KNetToneSeqNetSpecialInformation, "\x00\x11\x05\x4F\x21\x50\
+\x21\x51\x21\x40\x64\x07\x0B");
+
+_LIT8(KNetToneSeqDial,"\x00\x11\x05\x4E\xFE\x4E\xFE\x4E\xFE\x4E\xFE\x4E\xFE\
+\x4E\xFE\x4E\xFE\x4E\xFE\x07\x0B");
+
+_LIT8(KNetToneSeqRingGoing, "\x00\x11\x05\x4E\x64\x05\x04\x40\x64\06\x07\x0B");
+
+// General Beep is set for forever duration. Instead of AVKON definition 170ms.
+_LIT8(KGeneralBeep, "\x00\x11\x0A\x76\x00\x0B");
+_LIT8(KErrorTone, "\x00\x11\x0A\x6C\x19\x0B");
+_LIT8(KRadioPathNotAvailable, "\x00\x11\x0A\x05\x03\x4E\x14\x40\x14\x06\x0B");
+_LIT8(KRadioPathAck, "\x00\x11\x0A\x02\xFC\x0A\x80\x4E\x14\x0A\x7f\x0B");
+
+// ================= MEMBER FUNCTIONS =========================================
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::CSatUiObserver
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+CSatUiObserver::CSatUiObserver():
+ iRefresh(EFalse),
+ iIconSupport(ETrue),
+ iClearScreenEvent(EFalse)
+ {
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::ConstructL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void CSatUiObserver::ConstructL()
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::ConstructL called")
+
+ //Register to Server as subsession
+ //If Server is not up, this function call may take time
+ iSatSession.ConnectL();
+
+ iSat.RegisterL(iSatSession, this);
+ iAdapter = iSat.Adapter();
+ if (!iAdapter)
+ {
+ User::Leave(KErrNotFound);
+ }
+
+ // create icon handler
+ //iIconHandler = CSatUiIconHandler::NewL();
+
+ //Item icons
+ //iItemIcons = new (ELeave) CAknIconArray(1);
+
+ TFLOGSTRING("SATAPP: CSatUiObserver::ConstructL exit")
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::NewL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+CSatUiObserver* CSatUiObserver::NewL()
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::NewL() called")
+ CSatUiObserver* self = new (ELeave) CSatUiObserver;
+
+ CleanupStack::PushL(self);
+ self->ConstructL();
+ CleanupStack::Pop(self);
+ TFLOGSTRING("SATAPP: CSatUiObserver::NewL() exit")
+ return self;
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::~CSatUiObserver
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+CSatUiObserver::~CSatUiObserver()
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::~CSatUiObserver() called")
+
+ iSat.Close();
+ iSatSession.Close();
+
+// if (iItemIcons)
+// {
+// iItemIcons->ResetAndDestroy();
+// delete iItemIcons;
+// }
+
+ // delete icon handler
+// delete iIconHandler;
+// iIconHandler = NULL;
+
+ iActionImplementer = NULL;
+ iAdapter = NULL;
+
+ TFLOGSTRING("SATAPP: CSatUiObserver::~CSatUiObserver() exit")
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::SetImplementer
+// Sets a pointer to CSatUiViewAppUi object.
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void CSatUiObserver::SetImplementer(
+ MSatUiActionImplementer* aImplementer)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::SetImplementer calling")
+ iActionImplementer = aImplementer;
+ TFLOGSTRING("SATAPP: CSatUiObserver::SetImplementer exiting")
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::Adapter
+// Returns a pointer to MSatUiAdapter provided by SatCli.
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+MSatUiAdapter* CSatUiObserver::Adapter()
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::Adapter calling-exiting")
+ return iAdapter;
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::DisplayTextL
+// Checks length of the text and calls method from
+// the CSatUiViewAppUi class if the length is OK.
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse CSatUiObserver::DisplayTextL(
+ const TDesC& aText,
+ const TDesC& aSimApplicationName,
+ const TSatIconId& aIconId,
+ TBool& aRequestedIconDisplayed,
+ const TBool aSustainedText,
+ const TTimeIntervalSeconds aDuration,
+ const TBool aWaitUserToClear)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::DisplayText called")
+ TSatUiResponse response(ESatFailure);
+ aRequestedIconDisplayed = ETrue;
+ TBool selfExplanatoryIcon(EFalse);
+
+ TInt textLength(aText.Length());
+
+ if ((!textLength) || (textLength > RSat::KTextToDisplayMaxSize))
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::DisplayText no text")
+ aRequestedIconDisplayed = EFalse;
+ return response;
+ }
+
+ CFbsBitmap* iconBitmapDisplayText = NULL;
+ iActionImplementer->SetCommandPending(ETrue);
+
+ //if icon is available for command
+ if (((ESatSelfExplanatory == aIconId.iIconQualifier) ||
+ (ESatNotSelfExplanatory == aIconId.iIconQualifier)) &&
+ (iIconSupport))
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::DisplayText have icon")
+ iconBitmapDisplayText = FetchIcon(aIconId.iIdentifier,
+ EIconDisplayText);
+
+ if (ESatSelfExplanatory == aIconId.iIconQualifier)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::DisplayText self \
+ explanatory icon")
+ selfExplanatoryIcon = ETrue;
+ }
+ }
+
+ //icon not found not shown
+ if (!iconBitmapDisplayText)
+ {
+ aRequestedIconDisplayed = EFalse;
+ }
+
+ iActionImplementer->DispatchTimer(iWait);
+
+ TFLOGSTRING2("CSatUiObserver::DisplayTextL aDuration: %d", aDuration.Int())
+ TRAPD(err,
+ response = iActionImplementer->DisplayTextL(aText, aSimApplicationName,
+ iconBitmapDisplayText, selfExplanatoryIcon,
+ aSustainedText, aDuration, aWaitUserToClear);
+ );
+
+ if (err != KErrNone)
+ {
+ response = ESatFailure;
+ aRequestedIconDisplayed = EFalse;
+ }
+
+ if (iActionImplementer->GetEndKey())
+ {
+ response = ESatSessionTerminatedByUser;
+ iActionImplementer->SetEndKey(EFalse);
+ }
+
+ iActionImplementer->SetCommandPending(EFalse);
+
+ TFLOGSTRING2("SATAPP: CSatUiObserver::DisplayText exit, return: %d", \
+ response)
+ return response;
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::GetInkeyL
+// Checks type of the input wanted and calls right method
+// from the CSatUiViewAppUi class.
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse CSatUiObserver::GetInkeyL(
+ const TDesC& aText,
+ const TSatCharacterSet aCharacterSet,
+ TChar& aInput,
+ const TBool /*aHelpIsAvailable*/,
+ const TSatIconId& aIconId,
+ TBool& aRequestedIconDisplayed,
+ TUint& aDuration,
+ const TBool aImmediateDigitResponse)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetInkey called")
+
+ TSatUiResponse response(ESatSuccess);
+ aRequestedIconDisplayed = EFalse;
+ TBuf<1> input;
+
+ if (aInput.IsAssigned())
+ {
+ input.Fill(aInput, 1);
+ }
+
+ if ((aCharacterSet == ESatYesNo) && (aText.Length() == 0))
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetInkey return ESatFailure")
+ return ESatFailure;
+ }
+
+ CFbsBitmap* iconBitmapGetInkey = NULL;
+ iActionImplementer->SetCommandPending(ETrue);
+
+ // If icon is available for command
+ if (((ESatSelfExplanatory == aIconId.iIconQualifier) ||
+ (ESatNotSelfExplanatory == aIconId.iIconQualifier)) &&
+ (iIconSupport))
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetInkey have icon")
+ TIconCommand iconCommand (EIconGetInkey);
+
+ if (ESatYesNo == aCharacterSet)
+ {
+ iconCommand = EIconGetYesNo;
+ }
+
+ iconBitmapGetInkey = FetchIcon(aIconId.iIdentifier,
+ iconCommand);
+ GetScalableBitmap(iconBitmapGetInkey, iconCommand,
+ aRequestedIconDisplayed);
+ }
+
+ TBool selfExplanatory(EFalse);
+
+ // Icon is self-explanatory
+ if (ESatSelfExplanatory == aIconId.iIconQualifier)
+ {
+ selfExplanatory = ETrue;
+ }
+
+ iActionImplementer->DispatchTimer(iWait);
+
+ TRAPD(err,
+
+ if (ESatYesNo == aCharacterSet || aImmediateDigitResponse)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetInkey digit response")
+ response = iActionImplementer->GetYesNoL(aText, aCharacterSet,
+ aInput, iconBitmapGetInkey, selfExplanatory, aDuration,
+ aImmediateDigitResponse);
+ }
+ else //ESatCharSmsDefaultAlphabet, ESatCharUcs2Alphabet, ESatDigitOnly
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetInkey other conditions")
+ response = iActionImplementer->GetInputL(
+ aText, aCharacterSet, input, 1, 1, EFalse, ETrue,
+ iconBitmapGetInkey, selfExplanatory, aDuration);
+
+ if (ESatSuccess == response)
+ {
+ if (input.Length())
+ {
+ aInput = input[0];
+ }
+ }
+ }
+ );
+
+ if (err != KErrNone)
+ {
+ response = ESatFailure;
+ }
+
+ if (iActionImplementer->GetEndKey())
+ {
+ response = ESatSessionTerminatedByUser;
+ iActionImplementer->SetEndKey(EFalse);
+ }
+ iActionImplementer->SetCommandPending(EFalse);
+
+ TFLOGSTRING2("SATAPP: CSatUiObserver::GetInkey exit, return: %d", \
+ response)
+ return response;
+ }
+
+// --------------------------------------------------------
+// CSatUiObserver::GetInputL
+// Checks type of the input wanted and whether it should be
+// hidden and calls right method from the CSatUiViewAppUi class.
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse CSatUiObserver::GetInputL(
+ const TDesC& aText,
+ const TSatCharacterSet aCharacterSet,
+ TDes& aInput,
+ const TInt aMinLength,
+ const TInt aMaxLength,
+ const TBool aHideInput,
+ const TBool /*aHelpIsAvailable*/,
+ const TSatIconId& aIconId,
+ TBool& aRequestedIconDisplayed)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetInput called")
+ TSatUiResponse response(ESatSuccess);
+ aRequestedIconDisplayed = EFalse;
+
+ if (((aCharacterSet == ESatCharSmsDefaultAlphabet) ||
+ (aCharacterSet == ESatCharUcs2Alphabet)) &&
+ (aHideInput))
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetInput return ESatFailure")
+ return ESatFailure;
+ }
+
+ CFbsBitmap* iconBitmapGetInput = NULL;
+ iActionImplementer->SetCommandPending(ETrue);
+
+ // If icon is available for command
+ if (((ESatSelfExplanatory == aIconId.iIconQualifier) ||
+ (ESatNotSelfExplanatory == aIconId.iIconQualifier)) &&
+ (iIconSupport))
+ {
+ iconBitmapGetInput = FetchIcon(aIconId.iIdentifier, EIconGetInput);
+ GetScalableBitmap(iconBitmapGetInput, EIconGetInput,
+ aRequestedIconDisplayed);
+ }
+
+ TBool selfExplanatory(EFalse);
+
+ // Icon is self-explanatory
+ if (ESatSelfExplanatory == aIconId.iIconQualifier)
+ {
+ selfExplanatory = ETrue;
+ }
+
+ iActionImplementer->DispatchTimer(iWait);
+
+ TUint duration (0);
+ TRAPD(err,
+ response = iActionImplementer->GetInputL(
+ aText, aCharacterSet, aInput, aMinLength, aMaxLength,
+ aHideInput, EFalse, iconBitmapGetInput, selfExplanatory,
+ duration);
+ );
+
+ if (err != KErrNone)
+ {
+ TFLOGSTRING2("SATAPP: CSatUiObserver::GetInput err:%d", err)
+ response = ESatFailure;
+ aRequestedIconDisplayed = EFalse;
+ }
+
+ if (iActionImplementer->GetEndKey())
+ {
+ response = ESatSessionTerminatedByUser;
+ iActionImplementer->SetEndKey(EFalse);
+ }
+ iActionImplementer->SetCommandPending(EFalse);
+
+ TFLOGSTRING2("SATAPP: CSatUiObserver::GetInput response:%d", response)
+ TFLOGSTRING2("SATAPP: CSatUiObserver::GetInput aRequestedIconDisplayed:%d",
+ aRequestedIconDisplayed)
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetInput exit")
+ return response;
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::SetUpMenuL
+// Calls the method from the CSatUiViewAppUi class to show
+// a SetUpMenu view.
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse CSatUiObserver::SetUpMenuL(
+ const TDesC& aText,
+ const MDesCArray& aMenuItems,
+ const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const TBool aHelpIsAvailable,
+ const TSatIconId& aIconId,
+ const CArrayFixFlat<TInt>* aMenuIcons,
+ const enum TSatIconQualifier aIconListQualifier,
+ const enum TSatSelectionPreference /*aSelectionPreference*/)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::SetUpMenu called")
+ TSatUiResponse response(ESatSuccess);
+ TBool selfExplanatoryItems(EFalse);
+ CFbsBitmap* iconTitleBitmap = NULL;
+ iActionImplementer->SetCommandPending(ETrue);
+
+ TFLOGSTRING2("SATAPP: CSatUiObserver::SetUpMenu item count: %d",
+ aMenuItems.MdcaCount())
+
+ if (!aMenuItems.MdcaCount() ||
+ (KSatActiveProfileOffline == ProfileState()))
+ {
+ iActionImplementer->SetCommandPending(EFalse);
+ iActionImplementer->ShowNotAvailableNoteL();
+ iActionImplementer->CloseSatUI();
+ return response;
+ }
+
+ //if contextpane icon available for command
+ TFLOGSTRING2("SATAPP: CSatUiObserver::SetUpMenu icon qua: %d",
+ aIconId.iIconQualifier)
+ if (((ESatSelfExplanatory == aIconId.iIconQualifier) ||
+ (ESatNotSelfExplanatory == aIconId.iIconQualifier)) &&
+ (iIconSupport))
+ {
+ iconTitleBitmap = FetchIcon(aIconId.iIdentifier,
+ EIconSetUpMenuContext);
+ GetScalableBitmap(iconTitleBitmap, EIconSetUpMenuContext);
+ }
+
+// iItemIcons->ResetAndDestroy();
+ TInt iconCount(0);
+
+ if (aMenuIcons)
+ {
+ iconCount = aMenuIcons->Count();
+ TFLOGSTRING2("SATAPP: CSatUiObserver::SetUpMenu icon count: %d", iconCount)
+ }
+
+
+ //if icons are available for item list
+ if ((aMenuItems.MdcaCount() == iconCount) &&
+ ((aIconListQualifier == ESatSelfExplanatory) ||
+ (aIconListQualifier == ESatNotSelfExplanatory)) &&
+ (iIconSupport))
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::SetUpMenu have icon")
+ if (aIconListQualifier == ESatSelfExplanatory)
+ {
+ selfExplanatoryItems = ETrue;
+ }
+
+ TBool continueLoop(ETrue);
+ TInt count(0);
+ for (count = 0; (count < iconCount) && continueLoop; count++)
+ {
+ CGulIcon* gulIcon = CGulIcon::NewLC();
+ TUint8 itemIconId(STATIC_CAST(TUint8,
+ aMenuIcons->operator[](count)));
+ CFbsBitmap* iconItemBitmap = NULL;
+ iconItemBitmap = FetchIcon(itemIconId, EIconSetUpMenuItems);
+
+ if (!iconItemBitmap &&
+ (aIconListQualifier == ESatSelfExplanatory))
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::SetUpMenu \
+ SelfExplanatory ")
+ CleanupStack::PopAndDestroy(gulIcon); // gulIcon
+// iItemIcons->ResetAndDestroy();
+ continueLoop = EFalse;
+ }
+ else
+ {
+ if (!iconItemBitmap &&
+ (aIconListQualifier == ESatNotSelfExplanatory))
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::SetUpMenu \
+ not SelfExplanatory ")
+ iconItemBitmap = new(ELeave)CFbsBitmap();
+ }
+ else
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::SetUpMenu \
+ other conditions ")
+ GetScalableBitmap(iconItemBitmap, EIconSetUpMenuItems);
+ }
+
+ gulIcon->SetBitmap(iconItemBitmap);
+// iItemIcons->AppendL(gulIcon);
+ CleanupStack::Pop(gulIcon);
+ }
+ }
+ TFLOGSTRING2("SATAPP: CSatUiObserver::SetUpMenu count: %d", count)
+ }
+
+ TRAPD(err,
+ response = iActionImplementer->SetUpMenuL(
+ aText, aMenuItems, aMenuItemNextActions, iconTitleBitmap,
+ /*iItemIcons,*/ selfExplanatoryItems, aHelpIsAvailable);
+ );
+
+ TFLOGSTRING2("SATAPP: CSatUiObserver::SetUpMenu err: %d", err)
+
+ if (KErrNone != err)
+ {
+ response = ESatFailure;
+ }
+
+ if (iActionImplementer->GetEndKey())
+ {
+ response = ESatSessionTerminatedByUser;
+ iActionImplementer->SetEndKey(EFalse);
+ }
+
+ iActionImplementer->SetCommandPending(EFalse);
+ TFLOGSTRING2("SATAPP: CSatUiObserver::SetUpMenu exit, \
+ return:%i", response)
+ return response;
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::SelectItemL
+// Calls the method from the CSatUiViewAppUi class to show
+// a SelectItem view.
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse CSatUiObserver::SelectItemL(
+ const TDesC& aText,
+ const MDesCArray& aMenuItems,
+ const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const TInt aDefaultItem,
+ TUint8& aSelection,
+ const TBool aHelpIsAvailable,
+ const TSatIconId& aIconId,
+ const CArrayFixFlat<TInt>* aMenuIcons,
+ const enum TSatIconQualifier aIconListQualifier,
+ TBool& aRequestedIconDisplayed,
+ const enum TSatSelectionPreference /*aSelectionPreference*/)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::SelectItem called")
+ TSatUiResponse response(ESatSuccess);
+ aRequestedIconDisplayed = ETrue;
+ TBool selfExplanatoryItems(EFalse);
+
+ CFbsBitmap* iconTitleBitmap = NULL;
+ iActionImplementer->SetCommandPending(ETrue);
+
+ //if contextpane icon available for command
+ if (((ESatSelfExplanatory == aIconId.iIconQualifier) ||
+ (ESatNotSelfExplanatory == aIconId.iIconQualifier)) &&
+ (iIconSupport))
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::SelectItem icon available")
+ iconTitleBitmap = FetchIcon(aIconId.iIdentifier,
+ EIconSetUpMenuContext);
+ GetScalableBitmap(iconTitleBitmap, EIconSetUpMenuContext,
+ aRequestedIconDisplayed);
+ }
+
+ //iItemIcons->ResetAndDestroy();
+
+ TInt iconCount(0);
+
+ if (aMenuIcons)
+ {
+ iconCount = aMenuIcons->Count();
+ }
+
+ TFLOGSTRING2("SATAPP: CSatUiObserver::SelectItem iconCount:%d", iconCount)
+
+ //if icons are available for item list
+ if ((aMenuItems.MdcaCount() == iconCount) &&
+ ((aIconListQualifier == ESatSelfExplanatory) ||
+ (aIconListQualifier == ESatNotSelfExplanatory)) &&
+ (iIconSupport))
+ {
+ TFLOGSTRING(
+ "SATAPP: CSatUiObserver::SelectItem icon available for item list")
+
+ if (aIconListQualifier == ESatSelfExplanatory)
+ {
+ selfExplanatoryItems = ETrue;
+ }
+
+ TBool continueLoop(ETrue);
+ TInt count(0);
+ for (count = 0; (count < iconCount) && continueLoop; count++)
+ {
+ CGulIcon* gulIcon = CGulIcon::NewLC();
+ TUint8 itemIconId = STATIC_CAST(TUint8,
+ aMenuIcons->operator[](count));
+ CFbsBitmap* iconItemBitmap = NULL;
+ iconItemBitmap = FetchIcon(itemIconId, EIconSetUpMenuItems);
+
+ // when icon can't be received and is set to self explanatory, we
+ // iqnore all icons and show only text
+ if (!iconItemBitmap &&
+ (aIconListQualifier == ESatSelfExplanatory))
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::SelectItem \
+ SelfExplanatory ")
+ CleanupStack::PopAndDestroy(gulIcon); // gulIcon
+ //iItemIcons->ResetAndDestroy();
+ continueLoop = EFalse;
+ aRequestedIconDisplayed = EFalse;
+ }
+ else
+ {
+ // when icon can't be received and is set to not self
+ // explanatory, we replace it with empty icon
+ if (!iconItemBitmap &&
+ (aIconListQualifier == ESatNotSelfExplanatory))
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::SelectItem \
+ not SelfExplanatory ")
+ iconItemBitmap = new(ELeave)CFbsBitmap();
+ aRequestedIconDisplayed = EFalse;
+ }
+ // when icon was able to receive, we scale it
+ // if every prior icon is correctly received
+ else if (aRequestedIconDisplayed)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::SelectItem \
+ receive icon ")
+ GetScalableBitmap(iconItemBitmap, EIconSetUpMenuItems,
+ aRequestedIconDisplayed);
+ }
+ // if aRequestIconDisplayed is false, at least one prior icon
+ // fetch had problems and thus we must report that by not
+ // updating aRequestedIconDisplayed
+ else
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::SelectItem \
+ aRequestIconDisplayed false ")
+ GetScalableBitmap(iconItemBitmap, EIconSetUpMenuItems);
+ }
+
+ gulIcon->SetBitmap(iconItemBitmap);
+ //iItemIcons->AppendL(gulIcon);
+ CleanupStack::Pop(gulIcon);
+ }
+ }
+ TFLOGSTRING2("SATAPP: CSatUiObserver::SelectItem count: %d", count)
+ }
+
+ TRAPD(err,
+ response = iActionImplementer->SelectItemL(aText, aMenuItems,
+ aMenuItemNextActions, aDefaultItem, aSelection, iconTitleBitmap,
+ /*iItemIcons,*/ selfExplanatoryItems, aHelpIsAvailable);
+ );
+
+ if (err != KErrNone)
+ {
+ response = ESatFailure;
+ aRequestedIconDisplayed = EFalse;
+ }
+
+ if (iActionImplementer->GetEndKey())
+ {
+ response = ESatSessionTerminatedByUser;
+ iActionImplementer->SetEndKey(EFalse);
+ }
+
+ iActionImplementer->SetCommandPending(EFalse);
+
+ TFLOGSTRING2("SATAPP: CSatUiObserver::SelectItem aSelection:%d", aSelection)
+ TFLOGSTRING2("SATAPP: CSatUiObserver::SelectItem response:%d", response)
+ TFLOGSTRING("SATAPP: CSatUiObserver::SelectItem exit")
+ return response;
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::PlayTone
+// Checks type of the tone wanted and calls right method
+// from the CSatUiViewAppUi class.
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse CSatUiObserver::PlayTone(
+ const TDesC& aText,
+ const TSatTone aTone,
+ const TTimeIntervalMicroSeconds aDuration,
+ const TSatIconId& aIconId,
+ TBool& aRequestedIconDisplayed)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::PlayTone called")
+ TFLOGSTRING2("SATAPP: CSatUiObserver::PlayTone tone is %i", aTone)
+
+ aRequestedIconDisplayed = EFalse;
+
+ iSequence.Zero();
+ TTimeIntervalMicroSeconds duration(aDuration.Int64());
+ iActionImplementer->SetCommandPending(ETrue);
+ // This is used to determine zero length duration.
+ const TTimeIntervalMicroSeconds zeroDuration(static_cast<TInt64>(0));
+
+ CFbsBitmap* iconBitmap = NULL;
+ // If icon is available for command
+ if (((ESatSelfExplanatory == aIconId.iIconQualifier) ||
+ (ESatNotSelfExplanatory == aIconId.iIconQualifier)) &&
+ (iIconSupport))
+ {
+ iconBitmap = FetchIcon(aIconId.iIdentifier, EIconPlayTone);
+ GetScalableBitmap(iconBitmap, EIconPlayTone,
+ aRequestedIconDisplayed);
+ }
+
+ TBool selfExplanatory(EFalse);
+
+ // Icon is self-explanatory
+ if (ESatSelfExplanatory == aIconId.iIconQualifier)
+ {
+ selfExplanatory = ETrue;
+ }
+
+ // Check if the current Profile is Meeting
+ TInt errCR(KErrNone);
+ TInt profileId(0);
+
+ CRepository* repository = NULL;
+ TSatTone tone = aTone;
+
+ // Which UID to monitor.
+ TRAP(errCR, repository = CRepository::NewL(KCRUidProfileEngine));
+
+ if (!errCR && repository)
+ {
+ errCR = repository->StartTransaction(
+ CRepository::EReadWriteTransaction);
+ errCR = repository->Get(KProEngActiveProfile, profileId);
+ }
+
+ delete repository;
+
+ TFLOGSTRING2("SATAPP: CSatUiObserver::PlayTone(): err = %d", errCR)
+
+ TFLOGSTRING2("SCSatUiObserver::PlayTone() profileId: %d",
+ profileId)
+
+ switch (tone)
+ {
+ case ESatGeneralBeep:
+ case ESatPositiveTone:
+ case ESatToneNotSet:
+ if (zeroDuration == duration)
+ {
+ duration = KSatDur170ms; // 170ms
+ }
+ iSequence.Copy(KGeneralBeep);
+ break;
+ case ESatNegativeTone:
+ if (zeroDuration == duration)
+ {
+ duration = KSatDur250ms; // 250ms
+ }
+ iSequence.Copy(KErrorTone);
+ break;
+ case ESatRadioPathNotAvailableCallDropped:
+ if (zeroDuration == duration)
+ {
+ duration = KSatDur1200ms; // 1200ms
+ }
+ iSequence.Copy(KRadioPathNotAvailable);
+ break;
+ case ESatRadioPathAcknowledge:
+ if (zeroDuration == duration)
+ {
+ duration = KSatDur200ms; // 200ms
+ }
+ iSequence.Copy(KRadioPathAck);
+ break;
+ case ESatDialTone:
+ {
+ if (zeroDuration == duration)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::PlayTone() ESatDialTone")
+ return ESatCmdDataNotUnderstood;
+ }
+ else
+ {
+ iSequence.Copy(KNetToneSeqDial);
+ }
+ }
+ break;
+ case ESatCalledSubscriberBusy:
+ {
+ if (zeroDuration == duration)
+ {
+ return ESatCmdDataNotUnderstood;
+ }
+ else
+ {
+ iSequence.Copy(KNetToneSeqNetBusy);
+ }
+ }
+ break;
+ case ESatCongestion:
+ {
+ if (zeroDuration == duration)
+ {
+ return ESatCmdDataNotUnderstood;
+ }
+ else
+ {
+ iSequence.Copy(KNetToneSeqNetCongestion);
+ }
+ }
+ break;
+ case ESatErrorSpecialInfo:
+ {
+ if (zeroDuration == duration)
+ {
+ return ESatCmdDataNotUnderstood;
+ }
+ else
+ {
+ iSequence.Copy(KNetToneSeqNetSpecialInformation);
+ }
+ }
+ break;
+ case ESatCallWaitingTone:
+ {
+ if (zeroDuration == duration)
+ {
+ return ESatCmdDataNotUnderstood;
+ }
+ else
+ {
+ iSequence.Copy(KNetToneSeqNetCallWaiting);
+ }
+ }
+ break;
+ case ESatRingingTone:
+ {
+ if (zeroDuration == duration)
+ {
+ return ESatCmdDataNotUnderstood;
+ }
+ else
+ {
+ iSequence.Copy(KNetToneSeqRingGoing);
+ }
+ }
+ break;
+ case ESatUserSelectedToneIncomingSpeech:
+ case ESatUserSelectedToneIncomingSms:
+ {
+ // These are handled later.
+ }
+ break;
+ default:
+ TFLOGSTRING("SATAPP: CSatUiObserver::PlayTone Default")
+ return ESatCmdDataNotUnderstood;
+ }
+
+ TSatUiResponse response(ESatFailure);
+
+ iActionImplementer->DispatchTimer(iWait);
+
+ // ESatSClearScreenEvent doesn't occur,clear displaytext on screen.
+ if (EFalse == iClearScreenEvent)
+ {
+ // Clear displaytext on the screen.
+ TFLOGSTRING("SATAPP: CSatUiObserver::PlayTone clear screen")
+ iActionImplementer->ClearScreen();
+ }
+
+ if (0 != iSequence.Length())
+ {
+ TFLOGSTRING2("SATAPP: CSatUiObserver::PlayTone duration microseconds %d",
+ aDuration.Int64())
+ TRAPD(err,
+ response = iActionImplementer->PlayStandardToneL(
+ aText,
+ iSequence,
+ duration,
+ iconBitmap,
+ selfExplanatory);
+ );
+
+ if (KErrNone != err)
+ {
+ response = ESatFailure;
+ TFLOGSTRING2("SATAPP: CSatUiObserver::PlayTone error %i", err)
+ }
+ TFLOGSTRING("SATAPP: CSatUiObserver::PlayTone StandardTone exit")
+ }
+ else
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::PlayTone length of sequence \
+ is zero")
+
+ TRAPD(err,
+ response = iActionImplementer->PlayUserSelectedToneL(
+ aText,
+ aDuration.Int64(),
+ tone,
+ iconBitmap,
+ selfExplanatory);
+ );
+
+ if (KErrNone != err)
+ {
+ response = ESatFailure;
+ TFLOGSTRING2("SATAPP: CSatUiObserver::PlayTone error %i", err)
+ }
+
+ TFLOGSTRING("SATAPP: CSatUiObserver::PlayTone UserSelectedTone exit")
+ }
+
+ if (iActionImplementer->GetEndKey())
+ {
+ response = ESatSessionTerminatedByUser;
+ iActionImplementer->SetEndKey(EFalse);
+ }
+
+ iActionImplementer->SetCommandPending(EFalse);
+
+ TFLOGSTRING("SATAPP: CSatUiObserver::PlayTone iClearScreenEvent false")
+ iClearScreenEvent = EFalse;
+
+ TFLOGSTRING2("SATAPP: CSatUiObserver::PlayTone response: %d", response)
+ TFLOGSTRING("SATAPP: CSatUiObserver::PlayTone exit")
+ return response;
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::ConfirmCommand
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void CSatUiObserver::ConfirmCommand(
+ const TSatSQueryCommand aCommandId,
+ const TSatAlphaIdStatus aAlphaIdStatus,
+ const TDesC& aText,
+ const TDesC& aAdditionalText,
+ TBool& aActionAccepted,
+ const TSatIconId& aIconId,
+ TBool& aRequestedIconDisplayed,
+ TBool& aTerminatedByUser)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::ConfirmCommand calling")
+ aRequestedIconDisplayed = EFalse;
+ TInt error(KErrNone);
+ TBool selfExplanatory(EFalse);
+
+ // Icon is self-explanatory
+ if (ESatSelfExplanatory == aIconId.iIconQualifier)
+ {
+ selfExplanatory = ETrue;
+ }
+
+ aActionAccepted = ETrue;
+
+ iActionImplementer->SetCommandPending(ETrue);
+
+ iActionImplementer->StopShowWaitNote();
+
+ CFbsBitmap* iconBitmap = NULL;
+ // If icon is available for command
+ if ((((ESatSelfExplanatory == aIconId.iIconQualifier) ||
+ (ESatNotSelfExplanatory == aIconId.iIconQualifier)) &&
+ ((ESatOpenChannelQuery == aCommandId) ||
+ (ESatSLaunchBrowserQuery == aCommandId) ||
+ (ESatSSetUpCallQuery == aCommandId))) &&
+ (iIconSupport))
+ {
+ iconBitmap = FetchIcon(aIconId.iIdentifier,
+ EIconConfirmCommand);
+ GetScalableBitmap(iconBitmap, EIconConfirmCommand,
+ aRequestedIconDisplayed);
+ }
+ TFLOGSTRING2("SATAPP: CSatUiObserver::ConfirmCommand aCommandId: %d",
+ aCommandId)
+ // Check quering command
+ switch (aCommandId)
+ {
+ case ESatOpenChannelQuery:
+ {
+ TFLOGSTRING(" Quering OpenChannel")
+ //TRAP(error, iActionImplementer->ConfirmOpenChannelL(
+ // aText, aActionAccepted, iconBitmap, selfExplanatory));
+ break;
+ }
+
+ case ESatSRefreshQuery:
+ {
+ TFLOGSTRING(" Quering Refresh")
+ //TRAP(error, iActionImplementer->ConfirmRefreshL(aActionAccepted));
+ break;
+ }
+
+ case ESatSLaunchBrowserQuery:
+ {
+ TFLOGSTRING(" Quering LaunchBrowser")
+ HBufC* textHolder = NULL;
+
+ TRAP(error,
+ if (ESatAlphaIdNull != aAlphaIdStatus)
+ {
+ TFLOGSTRING(" CSatUiObserver::ConfirmCommand AlphaId \
+ isn't null")
+ if (ESatAlphaIdNotProvided == aAlphaIdStatus)
+ {
+ TFLOGSTRING(" CSatUiObserver::ConfirmCommand \
+ AlphaId not provided")
+ // ToDo: replace the resouce with qt.
+ //textHolder = StringLoader::LoadLC(
+ // R_QTN_SAT_CONF_LAUNCH_BROW,
+ // iActionImplementer->CoeEnv());
+ }
+ else
+ {
+ TFLOGSTRING(" CSatUiObserver::ConfirmCommand \
+ AlphaId provided")
+ textHolder = HBufC::NewLC(aText.Length());
+ TPtr ptr = textHolder->Des();
+ ptr.Append(aText);
+ }
+
+ //TRAP(error, iActionImplementer->ConfirmLaunchBrowserL(*textHolder,
+ // aActionAccepted, iconBitmap, selfExplanatory));
+
+ // Clean textHolder
+ CleanupStack::PopAndDestroy(textHolder);
+ }
+
+ ); // TRAP
+ break;
+ }
+
+ case ESatSSendSmQuery:
+ {
+ TFLOGSTRING( " Quering SendSm" )
+ TRAP( error, iActionImplementer->ConfirmSendL( aText,
+ aActionAccepted, ESatUiConfirmSendSms ) );
+ break;
+ }
+
+ case ESatSSendSsQuery:
+ {
+ TFLOGSTRING(" Quering SendSs")
+ //TRAP(error, iActionImplementer->ConfirmSendL(aText,
+ // aActionAccepted, ESatUiConfirmSendSs));
+ break;
+ }
+
+ case ESatSSendUssdQuery:
+ {
+ TFLOGSTRING(" Quering SendUssd")
+ //TRAP(error, iActionImplementer->ConfirmSendL(aText,
+ // aActionAccepted, ESatUiConfirmSendUssd));
+ break;
+ }
+
+ case ESatSSetUpCallQuery:
+ {
+ TFLOGSTRING(" Quering SetUpCall")
+ TRAP(error, iActionImplementer->ConfirmSetUpCallL(
+ aText, aAdditionalText, aActionAccepted, iconBitmap,
+ selfExplanatory));
+ break;
+ }
+
+ default:
+ {
+ TFLOGSTRING(" Unknown quering command")
+ aActionAccepted = EFalse;
+ }
+ }
+
+ if (KErrNone != error)
+ {
+ TFLOGSTRING2("SATAPP: CSatUiObserver::ConfirmCommand error:%d", error)
+ aActionAccepted = EFalse;
+ }
+ else if (iActionImplementer->GetEndKey())
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::ConfirmCommand press endkey")
+ aTerminatedByUser = ETrue;
+ aActionAccepted = EFalse;
+ iActionImplementer->SetEndKey(EFalse);
+ }
+ else
+ {
+ // Meaningless else
+ }
+
+ iActionImplementer->SetCommandPending(EFalse);
+ TFLOGSTRING("SATAPP: CSatUiObserver::ConfirmCommand exiting")
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::Notification
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse CSatUiObserver::Notification(
+ const TSatSNotifyCommand aCommandId,
+ const TSatAlphaIdStatus aAlphaIdStatus,
+ const TDesC& aText,
+ const TSatIconId& aIconId,
+ TBool& aRequestedIconDisplayed,
+ const TSatControlResult aControlResult)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::Notification calling")
+ TSatUiResponse response = ESatSuccess;
+ TInt error(KErrNone);
+ aRequestedIconDisplayed = EFalse;
+ iActionImplementer->SetCommandPending(ETrue);
+
+ HBufC* textHolder = NULL;
+
+ // In case where command id is SendDtmf and alphaID is not provided,
+ // DTMF string to be sent is shown in dialog along with default text.
+ if ((ESatSSendDtmfNotify == aCommandId) &&
+ (ESatAlphaIdNotProvided == aAlphaIdStatus))
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::Notification SendDtmf")
+ TRAP(error,
+ TInt resource = DefaultAlphaIdL(aCommandId, aControlResult);
+
+ // Todo:
+ // Now that resource is defined, get default text
+ //textHolder = StringLoader::LoadL(
+ // resource, aText)
+ );
+ }
+ // Get default text, if alpha not provided or it is NULL
+ else if (aText.Length() == 0 && ESatAlphaIdNotNull != aAlphaIdStatus)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::Notification alpha is null")
+ TRAP(error,
+ TInt resource = DefaultAlphaIdL(aCommandId, aControlResult);
+ // Todo:
+ // Now that resource is defined, get default text
+ //textHolder = StringLoader::LoadL(
+ // resource, iActionImplementer->CoeEnv())
+ );
+ }
+ // else use given text
+ else
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::Notification alpha is provided")
+ TRAP(error,
+ textHolder = HBufC::NewL(aText.Length());
+ TPtr ptr = textHolder->Des();
+ ptr.Copy(aText);
+ );
+ }
+
+ if (!textHolder)
+ {
+ TRAP(error, textHolder = HBufC::NewL(0));
+ }
+
+ // No need to add textHolder into CleanupStack, since this is
+ // not a leaving function
+
+ if ((KErrNone == error || KErrArgument == error) && textHolder)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::Notification none error ")
+ CFbsBitmap* iconBitmap = NULL;
+ TBool selfExplanatoryIcon(EFalse);
+ // Fetch icon
+ // Icons not supported for sending and receiving data
+ if ((((ESatSelfExplanatory == aIconId.iIconQualifier) ||
+ (ESatNotSelfExplanatory == aIconId.iIconQualifier)) &&
+ ((ESatSSendDataNotify != aCommandId) &&
+ (ESatSReceiveDataNotify != aCommandId))) &&
+ (iIconSupport))
+ {
+ iconBitmap = FetchIcon(aIconId.iIdentifier,
+ EIconNotification);
+ //GetScalableBitmap(iconBitmap, EIconNotification,
+ // aRequestedIconDisplayed);
+ }
+
+ if (ESatSelfExplanatory == aIconId.iIconQualifier)
+ {
+ selfExplanatoryIcon = ETrue;
+ }
+
+ // Check notifying command
+ switch (aCommandId)
+ {
+ case ESatSSendDataNotify:
+ {
+ TFLOGSTRING(" Notifying SendData")
+ TRAP(error,
+ iActionImplementer->ShowBIPNoteL(
+ ESendDataIdentier, *textHolder, iconBitmap,
+ selfExplanatoryIcon)
+ );
+ break;
+ }
+ case ESatSReceiveDataNotify:
+ {
+ TFLOGSTRING(" Notifying ReceiveData")
+ TRAP(error,
+ iActionImplementer->ShowBIPNoteL(
+ EReceiveDataIdentifier, *textHolder, iconBitmap,
+ selfExplanatoryIcon)
+ );
+ break;
+ }
+ case ESatSCloseChannelNotify:
+ {
+ TFLOGSTRING(" Notifying CloseChannel")
+ iActionImplementer->StopShowWaitNote();
+ TRAP(error,
+ iActionImplementer->ShowBIPNoteL(
+ ECloseChannelIdentifier, *textHolder, iconBitmap,
+ selfExplanatoryIcon)
+ );
+ break;
+ }
+ case ESatSMoSmControlNotify:
+ {
+ TFLOGSTRING(" Notifying MoSmControl")
+ TRAP(error,
+ iActionImplementer->MoSmControlL(
+ *textHolder, aAlphaIdStatus)
+ );
+ iActionImplementer->SetCommandPending(EFalse);
+ break;
+ }
+ case ESatSCallControlNotify:
+ {
+ TFLOGSTRING(" Notifying CallControl")
+ iActionImplementer->DispatchTimer(iWait);
+ TRAP(error,
+ iActionImplementer->CallControlL(
+ *textHolder, aAlphaIdStatus)
+ );
+ iActionImplementer->SetCommandPending(EFalse);
+ break;
+ }
+ case ESatSSendUssdNotify: // fall through
+ case ESatSSendSsNotify:
+ {
+ TFLOGSTRING(" Notifying SendSs / SendUssd")
+ iActionImplementer->StopShowWaitNote();
+ TRAP(error,
+ if ((ESatAlphaIdNotNull == aAlphaIdStatus) ||
+ (ESatAlphaIdNotProvided == aAlphaIdStatus))
+ {
+ iActionImplementer->ShowSsWaitNoteL(*textHolder,
+ iconBitmap, selfExplanatoryIcon);
+ }
+ else
+ {
+ iActionImplementer->ShowWaitNoteWithoutDelayL();
+ }
+ );
+ break;
+ }
+ case ESatSSendDtmfNotify:
+ {
+ TFLOGSTRING(" Notifying SendDtmf")
+ iActionImplementer->StopShowWaitNote();
+ TRAP(error, response = iActionImplementer->ShowDtmfWaitNoteL(
+ *textHolder, iconBitmap, selfExplanatoryIcon));
+ break;
+ }
+ case ESatSSendSmsNotify:
+ {
+ TFLOGSTRING(" Notifying SendSms")
+ iActionImplementer->StopShowWaitNote();
+
+ if (KErrNone == error)
+ {
+ // Show Sms wait note
+ TRAP(error,
+ iActionImplementer->ShowSmsWaitNoteL(*textHolder,
+ iconBitmap, selfExplanatoryIcon));
+ }
+
+ break;
+ }
+ default:
+ {
+ TFLOGSTRING(" Unkown notification")
+ response = ESatFailure;
+ break;
+ }
+ }
+ }
+
+ delete textHolder;
+ textHolder = NULL;
+
+ if (KErrNone != error)
+ {
+ TFLOGSTRING2("SATAPP: CSatUiObserver::Notification error:%d", error)
+ response = ESatFailure;
+ }
+ else if (iActionImplementer->GetEndKey())
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::Notification terminated by user")
+ response = ESatSessionTerminatedByUser;
+ iActionImplementer->SetEndKey(EFalse);
+ }
+ else
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::Notification success")
+ response = ESatSuccess;
+ }
+
+
+ TFLOGSTRING2("SATAPP: CSatUiObserver::Notification exiting, return: %d", \
+ response)
+ return response;
+ }
+
+// ------------------------------------------------------------------------------------------------
+// CSatUiObserver::EventNotification
+// (other items were commented in a header).
+// ------------------------------------------------------------------------------------------------
+//
+void CSatUiObserver::EventNotification(
+ const TSatSEvent aEventId,
+ const TSatSEventStatus /*aEventStatus*/,
+ const TInt /*aError*/)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::EventNotification calling")
+
+ iActionImplementer->SetCommandPending(EFalse);
+ switch (aEventId)
+ {
+ case ESatSSmEndEvent:
+ {
+ TFLOGSTRING(" SmsEnd event")
+ iActionImplementer->StopShowWaitNote();
+ break;
+ }
+ case ESatSClearScreenEvent:
+ {
+ TFLOGSTRING(" ClearScreen event")
+ iClearScreenEvent = ETrue;
+ iActionImplementer->ClearScreen();
+ break;
+ }
+ case ESatSsEndEvent:
+ {
+ TFLOGSTRING(" Ss end event")
+ iActionImplementer->StopShowWaitNote();
+ break;
+ }
+ case ESatSsErrorEvent:
+ {
+ TFLOGSTRING(" Notifying Ss error")
+ // If error occurred (and Alpha ID provided), notify user
+ TRAPD(err, iActionImplementer->ShowSsErrorNoteL())
+
+ if (err)
+ {
+ TFLOGSTRING(" Error Note could not be created!")
+ }
+ break;
+ }
+ case ESatSDtmfEndEvent:
+ {
+ TFLOGSTRING(" DTMF End event")
+ iActionImplementer->StopShowWaitNote();
+ break;
+ }
+ case ESatSCloseSatUiAppEvent:
+ {
+ TFLOGSTRING(" Close UI event")
+ // Handle this similar way when End key is used
+ if (KSatActiveProfileOffline == ProfileState())
+ {
+ iActionImplementer->SetEndKey(ETrue);
+ TRAP_IGNORE(iActionImplementer->ShowNotAvailableNoteL())
+ }
+ iActionImplementer->CloseSatUI();
+ break;
+ }
+ default:
+ {
+ TFLOGSTRING2(" Unknown event occured: %i", aEventId)
+ break;
+ }
+ }
+
+ TFLOGSTRING("SATAPP: CSatUiObserver::EventNotification exiting")
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::DefaultAlphaIdL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TInt CSatUiObserver::DefaultAlphaIdL(
+ const TSatSNotifyCommand aCommandId,
+ const TSatControlResult aControlResult) const
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::DefaultAlphaIdL calling")
+ TInt resource(0);
+
+ switch (aCommandId)
+ {
+ case ESatSSendDataNotify: // SendData
+ {
+ TFLOGSTRING(" SendData default")
+ //resource = R_QTN_SAT_CONF_SEND_DATA_BIP;
+ break;
+ }
+
+ case ESatSReceiveDataNotify: // ReceiveData
+ {
+ TFLOGSTRING(" ReceiveData default")
+ //resource = R_QTN_SAT_CONF_RECEIVE_DATA_BIP;
+ break;
+ }
+
+ case ESatSCloseChannelNotify: // CloseChannel
+ {
+ TFLOGSTRING(" CloseChannel default")
+ //resource = R_QTN_SAT_CONF_CLOSE_CHANNEL_BIP;
+ break;
+ }
+
+ case ESatSMoSmControlNotify: // MoSmControl
+ {
+ if (ESatNotAllowed == aControlResult)
+ {
+ TFLOGSTRING(" MoSmcontrol Not allowed default")
+ //resource = R_QTN_SAT_MOSM_NOT_ALLOWED;
+ }
+ else if (ESatAllowedWithModifications == aControlResult)
+ {
+ TFLOGSTRING(" MoSmcontrol Modified default")
+ //resource = R_QTN_SAT_MOSM_MODIFIED;
+ }
+ else
+ {
+ TFLOGSTRING(" MoSmcontrol No default")
+ resource = 0; // Allowed, default alpha -> no info
+ }
+ break;
+ }
+
+ case ESatSCallControlNotify: // CallControl
+ {
+ if (ESatNotAllowed == aControlResult)
+ {
+ TFLOGSTRING(" CallControl Not allowed default")
+ //resource = R_QTN_SAT_CC_NOT_ALLOWED;
+ }
+ else if (ESatAllowedWithModifications == aControlResult)
+ {
+ TFLOGSTRING(" CallControl Modified default")
+ //resource = R_QTN_SAT_CC_MODIFIED;
+ }
+ else
+ {
+ TFLOGSTRING(" CallControl No default")
+ resource = 0; // Allowed, default alpha -> no info
+ }
+ break;
+ }
+
+ case ESatSSendSmsNotify: // SendSm
+ {
+ TFLOGSTRING(" SendSms default")
+ //resource = R_QTN_SAT_SENDING_SMS;
+ break;
+ }
+
+ case ESatSSendDtmfNotify: // SendDtmf
+ {
+ TFLOGSTRING(" SendDTMF default")
+ //resource = R_QTN_SAT_NOTE_SENDING_DTMF_TEMPLATE;
+ break;
+ }
+
+ default:
+ {
+ TFLOGSTRING2(" Unknown command id: %i", aCommandId)
+ User::Leave(KErrArgument);
+ }
+ }
+
+ TFLOGSTRING2("SATAPP: CSatUiObserver::DefaultAlphaIdL exiting, resource: \
+ %d", resource)
+ return resource;
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::FetchIcon
+// Fetch the icon information.
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+CFbsBitmap* CSatUiObserver::FetchIcon(const TUint8 /*aIconId*/,
+ const enum TIconCommand /*aIconCommand*/)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::FetchIcon called")
+
+ CFbsBitmap* iconBitmap = NULL;
+/*
+ TSize layoutSize(0, 0);
+
+ // Set icon max size according the command
+ if (GetPopUpWindowIconSize(layoutSize, aIconCommand))
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::FetchIcon max size")
+ // Comment out icon related code, add qt icon support future
+ TRAPD(err, iconBitmap = iIconHandler->FetchIconL(iSatSession,
+ aIconId, layoutSize.iWidth, layoutSize.iHeight, iIconSupport));
+
+ if (err != KErrNone)
+ {
+ #if defined _DEBUG
+ _LIT(KFetchIcon, "SATAPP: CSatUiObserver::FetchIcon");
+ User::Panic(KFetchIcon, err);
+ #endif
+ }
+ }
+ else
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::FetchIcon not supported")
+ }
+*/
+ TFLOGSTRING("SATAPP: CSatUiObserver::FetchIcon exit")
+ return iconBitmap;
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::GetPopUpWindowIconSize
+// Get size for the icon in popup window.
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TBool CSatUiObserver::GetPopUpWindowIconSize(TSize& aSize,
+ const TIconCommand /*aIconCommand*/)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetPopUpWindowIconSize called")
+
+ TRect rect(TSize(0, 0));
+ TBool supported(ETrue);
+ // Comment out this code for no icon support in current qt satapp
+/* TAknLayoutRect opLogoLayout;
+
+ TFLOGSTRING2("SATAPP: CSatUiObserver::GetPopUpWindowIconSize, \
+ aIconCommand: %i", aIconCommand)
+ // depending on the command, get correct layout and
+ // Calculate rectangle based on LAF specification.
+ switch (aIconCommand)
+ {
+ case EIconSetUpMenuContext:
+ {
+ opLogoLayout.LayoutRect(rect,
+ AknLayoutScalable_Avkon::context_pane_g1().LayoutLine());
+ break;
+ }
+ case EIconSetUpMenuItems:
+ {
+ opLogoLayout.LayoutRect(rect,
+ AknLayout::List_pane_elements__single_graphic__Line_1());
+ break;
+ }
+ case EIconDisplayText:
+ {
+ // layout borrowed from video
+ opLogoLayout.LayoutRect(rect, AknLayoutScalable_Avkon::
+ popup_query_sat_info_window(0).LayoutLine());
+ break;
+ }
+ case EIconPlayTone:
+ {
+ opLogoLayout.LayoutRect(rect, AknLayoutScalable_Avkon::
+ popup_note_window_g1(0).LayoutLine());
+ break;
+ }
+ case EIconConfirmCommand: // fall through
+ case EIconGetInput: // fall through
+ case EIconGetYesNo: // fall through
+ case EIconGetInkey:
+ {
+ opLogoLayout.LayoutRect(rect, AknLayout::Icon(0));
+ break;
+ }
+ case EIconNotification:
+ {
+ opLogoLayout.LayoutRect(rect, AknLayout::
+ Wait_or_progress_note_pop_up_window_elements_Line_1());
+ break;
+ }
+ default:
+ {
+ TFLOGSTRING(
+ "SATAPP: CSatUiObserver::GetPopUpWindowIconSize not supported")
+ supported = EFalse;
+ break;
+ }
+ }
+
+ aSize = opLogoLayout.Rect().Size();
+
+ // Layout for title icon gives incorrect width
+ // but since it is square height can be set to width
+ if (EIconSetUpMenuContext == aIconCommand)
+ {
+ aSize.iWidth = aSize.iHeight;
+ }
+*/
+ TFLOGSTRING3("SATAPP: CSatUiObserver::GetPopUpWindowIconSize %dx%d exit",
+ aSize.iWidth, aSize.iHeight)
+ return supported;
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::GetScalableBitmap
+// Creates scalable bitmap
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void CSatUiObserver::GetScalableBitmapL(
+ CFbsBitmap*& /*aBitMapToConvert*/,
+ const TIconCommand /*aIconCommand*/)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap called")
+/*
+ TSize layoutSize(0, 0);
+ CFbsBitmap* bitmap = NULL;
+
+ // If scalable icon is supported in current layout then
+ // makes the scalable icon.
+ if (GetPopUpWindowIconSize(layoutSize, aIconCommand))
+ {
+ bitmap = new (ELeave) CFbsBitmap;
+ CleanupStack::PushL(bitmap);
+ // CAknIcon takes ownership of bitmaps.
+ CFbsBitmap* dupMain = new (ELeave) CFbsBitmap;
+ CleanupStack::PushL(dupMain);
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap duplicate original")
+ User::LeaveIfError(
+ dupMain->Duplicate(aBitMapToConvert->Handle()));
+
+ //CAknIcon* bitmapIcon = CAknIcon::NewL();
+ // Mask is not set because skins are not used.
+ // Ownership is transferred.
+ bitmapIcon->SetBitmap(dupMain);
+ CleanupStack::Pop(dupMain);
+ CleanupStack::PushL(bitmapIcon);
+ CAknIcon* scalableIcon = AknIconUtils::CreateIconL(bitmapIcon);
+ CleanupStack::Pop(bitmapIcon);
+ CleanupStack::PushL(scalableIcon);
+
+ // fetch the size of icon
+ TSize iconSize = dupMain->SizeInPixels();
+
+ // At first we assume that width is scaled to layout maximum and
+ // thus height is set so that the ratio of the image remains correct
+
+ TInt newHeight =
+ (layoutSize.iWidth * iconSize.iHeight) / iconSize.iWidth;
+
+ // If the new height is larger than the height of the layout
+ // we scale height to maximum and set the width so that the ratio of
+ // the image remains correct
+ if (newHeight > layoutSize.iHeight)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap \
+ larger than layout height")
+ layoutSize.iWidth =
+ (layoutSize.iHeight * iconSize.iWidth) / iconSize.iHeight;
+ }
+ // If the new height is smaller or the same as the height of the
+ // layout, the image is scaled according to it
+ else
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap \
+ smaller than layout height")
+ layoutSize.iHeight = newHeight;
+ }
+
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap resize scaled icon")
+ AknIconUtils::SetSize(scalableIcon->Bitmap(), layoutSize);
+
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap duplicate scaled")
+ User::LeaveIfError(bitmap->Duplicate(
+ scalableIcon->Bitmap()->Handle()));
+
+ CleanupStack::PopAndDestroy(scalableIcon);
+
+ // Uses scaled icon if scalable bitmap is supported.
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap Show Scaled")
+ delete aBitMapToConvert;
+ aBitMapToConvert = bitmap;
+ CleanupStack::Pop(bitmap);
+ }
+*/
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap exit")
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::GetScalableBitmap
+// Handles scalable bitmap
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void CSatUiObserver::GetScalableBitmap(
+ CFbsBitmap*& /*aBitMapToConvert*/,
+ const TIconCommand /*aIconCommand*/,
+ TBool& /*aRequestedIconDisplayed*/)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap called")
+/*
+ if (aBitMapToConvert)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap bitmap \
+ to convert")
+ // Scale icon
+ TRAPD(err, GetScalableBitmapL(aBitMapToConvert, aIconCommand););
+
+ if (KErrNoMemory == err)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap memory \
+ low")
+ // Memory low, command is done without icon
+ delete aBitMapToConvert;
+ aBitMapToConvert = NULL;
+ aRequestedIconDisplayed = EFalse;
+ }
+ else
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap have \
+ memory")
+ aRequestedIconDisplayed = ETrue;
+ }
+ }
+ else
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap no bitmap")
+ // Icon not received
+ aRequestedIconDisplayed = EFalse;
+ }
+*/
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap exit")
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::GetScalableBitmap
+// Handles scalable bitmap
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void CSatUiObserver::GetScalableBitmap(
+ CFbsBitmap*& /*aBitMapToConvert*/,
+ const TIconCommand /*aIconCommand*/)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap called")
+/*
+ if (aBitMapToConvert)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap bitmap \
+ to convert")
+ // Scale icon
+ TRAPD(err, GetScalableBitmapL(aBitMapToConvert, aIconCommand););
+
+ if (KErrNoMemory == err)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap memory \
+ low")
+ // Memory low, command is done without icon
+ delete aBitMapToConvert;
+ aBitMapToConvert = NULL;
+ }
+ }
+*/
+ TFLOGSTRING("SATAPP: CSatUiObserver::GetScalableBitmap exit")
+ }
+
+// ----------------------------------------------------------------------------
+// CSatUiObserver::ProfileState
+// Get the profile status
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TInt CSatUiObserver::ProfileState()
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::ProfileState called")
+ TInt profileId(0);
+ CRepository* cr (NULL);
+
+ TRAPD(err, cr = CRepository::NewL(KCRUidProfileEngine));
+ if ((KErrNone == err) && cr)
+ {
+ TFLOGSTRING("SATAPP: CSatUiObserver::ProfileState no err")
+ // Get the ID of the currently active profile:
+ cr->Get(KProEngActiveProfile, profileId);
+ delete cr;
+ }
+ else
+ {
+ TFLOGSTRING2("SATAPP: CSatUiObserver::ProfileState CR failed: %i", err)
+ }
+
+ TFLOGSTRING2("SATAPP: CSatUiObserver::ProfileState exit value: %d",
+ profileId)
+
+ return profileId;
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/src/main.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,61 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*
+*/
+
+#include <QApplication>
+
+#include <hbapplication.h>
+#include <hbmainwindow.h>
+#include <QTranslator>
+#include "satappmainhandler.h"
+
+#include "tflogger.h"
+
+int main(int argc, char *argv[])
+{
+ TFLOGSTRING("SATAPP: main")
+
+ HbApplication app(argc, argv);
+ TFLOGSTRING("SATAPP: main app created")
+
+ QTranslator translator;
+ bool ok = translator.load(":/translations/satapp_en");
+ TFLOGSTRING2("SATUI: main, translation %d (1=OK, 0=fail)", ok )
+ app.installTranslator(&translator);
+
+ HbMainWindow window;
+ TFLOGSTRING("SATAPP: main window created")
+
+ // the code is only for test, currently, dphone79 only support
+ // lanscape, remove it before official release
+ #ifndef __WINSCW
+ //window.setOrientation(Qt::Horizontal);
+ #endif
+
+ SatAppMainHandler *mainHandler = new SatAppMainHandler(window);
+
+ window.show();
+ TFLOGSTRING("SATAPP: main view showed")
+
+ int result = app.exec();
+ TFLOGSTRING2("SATAPP: main exit %d", result)
+
+ delete mainHandler;
+ return result;
+}
+
+//End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/src/satappcommandhandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,462 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <QTime>
+#include "satappcommandhandler.h"
+#include "tflogger.h"
+#include "satappcommonconstant.h"
+#include "satappuiprovider.h"
+
+// ----------------------------------------------------------------------------
+// SatAppCommandHandler::DisplayText
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+SatAppCommandHandler::SatAppCommandHandler(SatAppUiProvider &ui,
+ QObject *parent) : QObject(parent), mUi(ui)
+{
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::SatAppCommandHandler call-exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppCommandHandler::~SatAppCommandHandler
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+SatAppCommandHandler::~SatAppCommandHandler()
+{
+
+}
+
+// ----------------------------------------------------------------------------
+// SatAppCommandHandler::setUpMenu
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppCommandHandler::setUpMenu(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QStringList &aMenuItems,
+ //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ //const HbIcon &aIcon,
+ //const CAknIconArray* aItemIconsArray,
+ const bool aSelfExplanatoryItems,
+ const bool aHelpIsAvailable)
+{
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::setUpMenu call")
+ mUi.showSetUpMenuView(aRes, aText, aMenuItems,
+ aSelfExplanatoryItems, aHelpIsAvailable);
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::setUpMenu exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppCommandHandler::selectItem
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppCommandHandler::selectItem(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QStringList &aMenuItems,
+ //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const int aDefaultItem,
+ unsigned char &aSelection,
+ //const HbIcon &aIcon,
+ //const CAknIconArray* aItemsIconArray,
+ const bool aSelfExplanatoryItems,
+ const bool aHelpIsAvailable)
+{
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::selectItem call")
+ mUi.showSelectItemView(aRes, aText, aMenuItems, aDefaultItem, aSelection,
+ aSelfExplanatoryItems, aHelpIsAvailable);
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::selectItem exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppCommandHandler::displayText
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppCommandHandler::displayText(TSatUiResponse &aRes,
+ const QString &aText,
+ const QString &aSimApplicationName,
+ // const HbIcon &aIcon,
+ bool &/*aRequestedIconDisplayed*/,
+ const bool aSustainedText,
+ const int aDuration,
+ const bool aWaitUserToClear)
+{
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::displayText call")
+
+ aRes = ESatSuccess;
+ QString heading;
+ if (!aSimApplicationName.isEmpty()) {
+ heading.append(aSimApplicationName);
+ } else {
+ heading.append(QObject::tr("SAT MESSAGE HEADER"));
+ }
+
+ // set time
+ int duration(0);
+
+ if (!aDuration) {
+ TFLOGSTRING(
+ "SATAPP: SatAppCommandHandler::displayText duration not given")
+ duration = KDisplayTxtDefaultduration;
+ if (aWaitUserToClear) {
+ TFLOGSTRING(
+ "SATAPP: SatAppCommandHandler::displayText wait user to clear")
+ duration = KDisplayTxtUserClearTimeout;
+ }
+ } else {
+ // if duration defined
+ duration = aDuration * 1000;
+ }
+ TFLOGSTRING2(
+ "SATAPP: SatAppCommandHandler::displayText duration: %d",
+ duration)
+ TSatAppUserResponse rsp = EUserNoResponse;
+ rsp = mUi.showDisplayTextPopup(heading, aText, duration);
+
+ // If user is not expected to clear message used response is success
+ if (aWaitUserToClear && !aSustainedText) {
+ // User press ok key
+ if (EUserPrimaryResponse == rsp ||
+ EUserClearResponse == rsp){
+ aRes = ESatSuccess;
+ TFLOGSTRING(
+ "SATAPP: SatAppCommandHandler::DisplayText successful response")
+ } else if (EUserSecondaryResponse == rsp) {
+ // User press back key
+ aRes = ESatBackwardModeRequestedByUser;
+ } else {
+ TFLOGSTRING(
+ "SATAPP: SatAppCommandHandler::DisplayText no user response")
+ // User did not close the text, closed by the timer or MT call
+ aRes = ESatNoResponseFromUser;
+ }
+ }
+
+ // request to close by the server
+ if (EUserCloseResponse == rsp) {
+ aRes = ESatSessionTerminatedByUser;
+ }
+
+ // to do
+ //End key by user ESatSessionTerminatedByUser
+ //rsp = EUserNoResponse;
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::displayText exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppCommandHandler::getInkey
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppCommandHandler::getInkey(TSatUiResponse &aRes,
+ const QString &aTitleText,
+ const TSatCharacterSet aCharacterSet,
+ QString &aInputText,
+ //const QPixmap* /*aIconBitmapGetInput*/,
+ const bool /*aSelfExplanatory*/,
+ unsigned int &aDuration)
+{
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::getInkey")
+ aRes = ESatSuccess;
+ // the timeout expires The timer starts when the text is
+ //displayed on the screen and stops when the TERMINALRESPONSE is sent.
+ QTime time;
+ if (aDuration) {
+ TFLOGSTRING2("SATAPP: SatAppCommandHandler::getInkey\
+ in aDuration: %d", aDuration)
+ time.start();
+ }
+
+ QString heading;
+ if (aTitleText.isEmpty()) {
+ if (ESatDigitOnly == aCharacterSet) {
+ TFLOGSTRING("SATAPP:SatAppCommandHandler::getInkey: ESatDigitOnly")
+ heading = tr("Enternumber (1 digit 0-9) ");
+ } else {
+ // ESatCharSmsDefaultAlphabet or ESatCharUcs2Alphabet
+ TFLOGSTRING("SatAppCommandHandler::getInkey others")
+ heading = tr("Enter character ");
+ }
+ } else {
+ heading = aTitleText;
+ TFLOGSTRING("SatAppCommandHandler::getInkey: Using aTitleText")
+ }
+ //Duration will be implemented in GetInkey proactive command
+ TSatAppUserResponse rsp = EUserNoResponse;
+ rsp = mUi.showGetInkeyQuery(heading, aInputText, aCharacterSet, aDuration);
+
+ if (aDuration) {
+ aDuration = time.elapsed() / 100;
+ TFLOGSTRING2("SATAPP: SatAppCommandHandler::getInkey\
+ return for server aDuration: %d", aDuration)
+ }
+ // User press OK key
+ if (EUserPrimaryResponse == rsp) {
+ aRes = ESatSuccess;
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::getInkey successful response")
+ } else if (EUserSecondaryResponse == rsp)
+ {
+ // User press back key
+ aRes = ESatBackwardModeRequestedByUser;
+ } else {
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::getInkey no user response")
+ // User did not close the text, closed by the timer or MT call
+ aRes = ESatNoResponseFromUser;
+ }
+
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::getInkey exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppCommandHandler::getYesNo
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppCommandHandler::getYesNo(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const TSatCharacterSet aCharacterSet,
+ unsigned int &aInkey,
+ //const TSatIconId &aIconId,
+ const bool &/*aSelfExplanatory*/,
+ unsigned int &aDuration,
+ const bool aImmediateDigitResponse)
+{
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::getYesNo")
+ TFLOGSTRING2("SATAPP: SatAppCommandHandler::getYesNo: immediate %d",
+ aImmediateDigitResponse)
+
+ // the timeout expires The timer starts when the text is
+ //displayed on the screen and stops when the TERMINALRESPONSE is sent.
+ QTime time;
+ if (aDuration) {
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::getYesNo in aDuration: %d",
+ aDuration)
+ time.start();
+ }
+
+ aRes = ESatSuccess;
+ int rsp = -1;
+ rsp = mUi.showGetYesNoQuery(aText, aCharacterSet,
+ aDuration, aImmediateDigitResponse);
+ // User press OK key
+ if (EUserPrimaryResponse == rsp) {
+ aRes = ESatSuccess;
+ aInkey = 1;
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::getYesNo successful response")
+ } else if (EUserSecondaryResponse == rsp)
+ {
+ // User press NO key
+ aRes = ESatSuccess;
+ aInkey = 0;
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::getYesNo No request by user")
+ } else if (ESatYesNo != aCharacterSet && !rsp) {
+ aRes = ESatSuccess;
+ }
+ // else if {
+ // // User press end/back key
+ // aRes = ESatBackwardModeRequestedByUser;
+ // aInkey = 1;
+ else {
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::getYesNo no user response")
+ // User did not close the text, closed by the timer or MT call
+ aRes = ESatNoResponseFromUser;
+ aInkey = 0;
+ }
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::getYesNo exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppCommandHandler::getInput
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppCommandHandler::getInput(TSatUiResponse &aRes,
+ const QString &aTitleText,
+ const TSatCharacterSet aCharacterSet,
+ QString &aInputText,
+ const int aMinLength,
+ const int aMaxLength,
+ const bool aHideInput,
+ //const QPixmap* /*aIconBitmapGetInput*/,
+ const bool /*aSelfExplanatory*/,
+ unsigned int &/*aDuration*/)
+{
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::getInput")
+
+ aRes = ESatNoResponseFromUser;
+ QString heading;
+
+ if (aTitleText.isEmpty()) {
+ if (ESatDigitOnly == aCharacterSet) {
+ TFLOGSTRING("SATAPP::getInput ESatDigitOnly")
+ heading = tr("Enter:\n(1 digit 0-9)");
+ } else {
+ // ESatCharSmsDefaultAlphabet or ESatCharUcs2Alphabet
+ TFLOGSTRING("SatAppCommandHandler::getInput ESatCharSmsDefaultAlphabet \
+ or ESatCharUcs2Alphabet")
+ heading = tr("Enter:");
+ }
+ } else {
+ heading.append(aTitleText);
+ }
+
+ int minLength = 0;
+ int maxLength = 1;
+ if (aMinLength <= KGetInputStringMaxSize && aMinLength > 0){
+ minLength = aMinLength;
+ } else if (aMinLength > KGetInputStringMaxSize){
+ minLength = KGetInputStringMaxSize;
+ }
+ //lint -e{961} else block not needed, maxLength initialized.
+ if (aMaxLength < minLength){
+ maxLength = minLength;
+ } else if (aMaxLength <= KGetInputStringMaxSize && aMaxLength > 1){
+ maxLength = aMaxLength;
+ } else if (aMaxLength > KGetInputStringMaxSize){
+ maxLength = KGetInputStringMaxSize;
+ }
+
+ QString inputText;
+ if ((aInputText.length() >= minLength)&& (aInputText.length() <= maxLength)){
+ inputText = aInputText;
+ }
+
+ //Duration will be implemented in GetInkey proactive command
+ TSatAppUserResponse rsp = EUserNoResponse;
+ rsp = mUi.showGetInputQuery( heading, inputText,
+ aCharacterSet, minLength, maxLength, aHideInput);
+
+ if (EUserPrimaryResponse == rsp) {
+ // User press OK key
+ aRes = ESatSuccess;
+ aInputText = inputText;
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::getInput successful response")
+ } else if (EUserSecondaryResponse == rsp)
+ {
+ // User press back key
+ aRes = ESatBackwardModeRequestedByUser;
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::getInput press back softkey response")
+ } else {
+ // User did not close the getinput query, closed by the timer or MT call
+ aRes = ESatNoResponseFromUser;
+ TFLOGSTRING("SATAPP: GetInputL::getInput no user response")
+ }
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::getInput exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppCommandHandler::confirmSend
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppCommandHandler::confirmSend(
+ TSatUiResponse &aRes,
+ const QString &/*aText*/,
+ bool &aActionAccepted,
+ int aType)
+{
+ TFLOGSTRING2("SATAPP: SatAppCommandHandler::confirmSend call, type=%d", aType)
+ aRes = ESatNoResponseFromUser;
+ QString title;
+ switch (aType) {
+ case ESatUiConfirmSendSms:
+ {
+ title.append(tr("Allow SIM card to send message?"));
+ break;
+ }
+ case ESatUiConfirmSendSs:
+ case ESatUiConfirmSendUssd: //the same string for SS and USSD
+ //title.append(tr("xxxxx"));
+ break;
+ default:
+ aRes = ESatFailure;
+ TFLOGSTRING( "SATAPP: SatAppCommandHandler::confirmSend type unsupport" )
+ break;
+ }
+ if(ESatFailure != aRes) {
+ mUi.showConfirmSendQuery(title, aActionAccepted);
+ aRes = ESatSuccess;
+ TFLOGSTRING2( "SATAPP: SatAppCommandHandler::confirmSend accept=%d",
+ aActionAccepted)
+ }
+ TFLOGSTRING2( "SATAPP: SatAppCommandHandler::confirmSend exit rsp=%d", aRes )
+}
+
+// ----------------------------------------------------------------------------
+// SatAppCommandHandler::showSmsWaitNote
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppCommandHandler::showSmsWaitNote(const QString &aText,
+ const bool /*aSelfExplanatoryIcon*/)
+{
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::showSmsWaitNote call")
+ mUi.showSmsWaitNote(aText);
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::showSmsWaitNote exit")
+ }
+
+// ----------------------------------------------------------------------------
+// SatAppCommandHandler::showDtmfWaitNote
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppCommandHandler::showDtmfWaitNote(TSatUiResponse &aRes,
+ const QString &aText/*,
+ const bool aSelfExplanatoryIcon*/)
+{
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::showDtmfWaitNote call")
+ mUi.showDtmfWaitNote(aRes, aText);
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::showDtmfWaitNote exit")
+ }
+
+// ----------------------------------------------------------------------------
+// SatAppCommandHandler::stopShowWaitNote
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppCommandHandler::stopShowWaitNote()
+{
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::stopShowWaitNote call")
+ mUi.stopShowWaitNote();
+ TFLOGSTRING("SATAPP: SatAppCommandHandler::stopShowWaitNote exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppCommandHandler::confirmSetUpCall
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppCommandHandler::confirmSetUpCall(
+ const QString &aText,
+ const QString &aSimAppName,
+ bool &aActionAccepted//,
+ //const CFbsBitmap* aIconBitmap,
+ //const TBool aSelfExplanatory
+ )
+{
+ TFLOGSTRING("SatAppCommandHandler::showSetUpCallConfirm")
+ mUi.showConfirmSetUpCallQuery(aText, aSimAppName, aActionAccepted);
+ TFLOGSTRING("SatAppCommandHandler::showSetUpCallConfirm exit")
+}
+
+//End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/src/satappeventprovider.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,542 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <QStringList>
+#include <msatuiadapter.h>
+#include "satappeventprovider.h"
+#include "csatuiobserver.h"
+#include "tflogger.h"
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::SatAppEventProvider
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+SatAppEventProvider::SatAppEventProvider(QObject *parent) :
+ QObject(parent), mObs(NULL)
+{
+ TFLOGSTRING("SATAPP: SatAppEventProvider::SatAppEventProvider call")
+ TRAPD(err, mObs = CSatUiObserver::NewL())
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::SatAppEventProvider \
+ new CSatUiObserver err=%d", err)
+
+ if (KErrNone != err) {
+ CloseSatUI();
+ } else {
+ mObs->SetImplementer(this);
+ TFLOGSTRING("SATAPP: SatAppEventProvider::SatAppEventProvider")
+ }
+ TFLOGSTRING("SATAPP: SatAppEventProvider::SatAppEventProvider exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::~SatAppEventProvider
+// Sets a pointer to CSatUiViewAppUi object.
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+SatAppEventProvider::~SatAppEventProvider()
+{
+ TFLOGSTRING("SATAPP: SatAppEventProvider::~SatAppEventProvider call")
+ delete mObs;
+ mObs = NULL;
+ TFLOGSTRING("SATAPP: SatAppEventProvider::~SatAppEventProvider exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::SetUpMenuL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse SatAppEventProvider::SetUpMenuL(
+ const TDesC &aText,
+ const MDesCArray &aMenuItems,
+ const CArrayFixFlat<TSatAction> */*aMenuItemNextActions*/,
+ const CFbsBitmap */*aIconBitmap*/,
+ //const CAknIconArray */*aItemIconsArray*/,
+ const TBool aSelfExplanatoryItems,
+ const TBool aHelpIsAvailable)
+ {
+ TFLOGSTRING("SATAPP: SatAppEventProvider::SetUpMenuL call")
+
+ TSatUiResponse response(ESatSuccess);
+ QString title;
+ if (aText.Length() > 0) {
+ title = QString::fromUtf16 (aText.Ptr(), aText.Length());
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::SetUpMenuL Title=%s",
+ title.utf16())
+ }
+
+ QStringList *menuList = new QStringList();
+ TFLOGSTRING("SATAPP: SatAppEventProvider::SetUpMenuL List")
+
+ //Add Item
+ if(menuList) {
+ for (int i=0 ; i<aMenuItems.MdcaCount() ; i++) {
+ QString item=QString::fromUtf16(aMenuItems.MdcaPoint(i).Ptr(),
+ aMenuItems.MdcaPoint(i).Length());
+ menuList->append(item);
+ }
+
+ TFLOGSTRING("SATAPP: SatAppEventProvider::SetUpMenuL add item")
+
+ emit setUpMenuEvent(
+ response,
+ title,
+ *menuList,
+ //const CArrayFixFlat<TSatAction> *aMenuItemNextActions,
+ //const HbIcon &aIcon,
+ //const CArrayFixFlat<TInt> *aMenuIcons,
+ aSelfExplanatoryItems,
+ aHelpIsAvailable);
+
+ delete menuList;
+ }
+ TFLOGSTRING("SATAPP: SatAppEventProvider::SetUpMenuL exit")
+
+ return response;
+ }
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::SetUpMenuL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse SatAppEventProvider::SelectItemL(
+ const TDesC &aText,
+ const MDesCArray &aMenuItems,
+ const CArrayFixFlat<TSatAction> */*aMenuItemNextActions*/,
+ const TInt aDefaultItem,
+ TUint8 &aSelection,
+ const CFbsBitmap */*aIconBitmap*/,
+ //const CAknIconArray */*aItemsIconArray*/,
+ const TBool aSelfExplanatoryItems,
+ const TBool aHelpIsAvailable)
+{
+ TFLOGSTRING("SATAPP: SatAppEventProvider::SelectItemL call")
+
+ TSatUiResponse response(ESatSuccess);
+ aSelection = 0;
+ QString title;
+ if (aText.Length() > 0) {
+ title=QString::fromUtf16(aText.Ptr(), aText.Length());
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::SelectItemL Title=%s",
+ title.utf16())
+ }
+
+ QStringList *menuList = new QStringList();
+ //Add Item
+ if(menuList) {
+ for (int i=0 ; i<aMenuItems.MdcaCount() ; i++) {
+ QString item=QString::fromUtf16(aMenuItems.MdcaPoint(i).Ptr(),
+ aMenuItems.MdcaPoint(i).Length());
+ menuList->append(item);
+ }
+ TFLOGSTRING("SATAPP: SatAppEventProvider::SelectItemL add item")
+
+ emit selectItemEvent(
+ response,
+ title,
+ *menuList,
+ aDefaultItem,
+ aSelection,
+ //const CArrayFixFlat<TSatAction> *aMenuItemNextActions,
+ //const HbIcon &aIcon,
+ //const CArrayFixFlat<TInt> *aMenuIcons,
+ aSelfExplanatoryItems,
+ aHelpIsAvailable);
+
+ delete menuList;
+ }
+ TFLOGSTRING("SATAPP: SatAppEventProvider::SelectItemL exit")
+
+ return response;
+}
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::ProfileState
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+int SatAppEventProvider::profileState()
+{
+ TFLOGSTRING("SATAPP: SatAppEventProvider::ProfileState call")
+ int res (0);
+ if (mObs) {
+ res = mObs->ProfileState();
+ }
+ TFLOGSTRING("SATAPP: SatAppEventProvider::ProfileState exit")
+ return res;
+}
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::MenuSelection
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppEventProvider::menuSelection(int aMenuItem, bool aHelpRequested)
+ {
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::MenuSelection call\
+ aMenuItem=%d", aMenuItem)
+ if(mObs && mObs->Adapter()) {
+ mObs->Adapter()->MenuSelection(aMenuItem, aHelpRequested);
+ }
+
+ TFLOGSTRING("SATAPP: SatAppEventProvider::MenuSelection exit")
+ }
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::DisplayTextL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse SatAppEventProvider::DisplayTextL(
+ const TDesC &aText,
+ const TDesC &aSimApplicationName,
+ CFbsBitmap */*aIconBitmapDisplayText*/,
+ const TBool aSelfExplanatoryIcon,
+ const TBool aSustainedText,
+ const TTimeIntervalSeconds aDuration,
+ const TBool aWaitUserToClear)
+ {
+ TFLOGSTRING("SATAPP: SatAppEventProvider::DisplayTextL call")
+
+ TSatUiResponse response(ESatSuccess);
+ QString title;
+ if (aText.Length() > 0) {
+ title=QString::fromUtf16(aText.Ptr(), aText.Length());
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::DisplayTextL \
+ Title=%s", title.utf16())
+ }
+
+ QString appName;
+ if (aSimApplicationName.Length() > 0) {
+ appName=QString::fromUtf16(aSimApplicationName.Ptr(),
+ aSimApplicationName.Length());
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::DisplayTextL \
+ appName=%s", appName.utf16())
+ }
+
+ int timeInterval = aDuration.Int();
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::DisplayTextL: \
+ timeInterval=%d", timeInterval)
+
+ bool isSelfExplanatoryIcon = (aSelfExplanatoryIcon) ? true : false;
+
+ emit displayTextEvent(
+ response,
+ title,
+ appName,
+ //const HbIcon &aIcon,
+ isSelfExplanatoryIcon,
+ aSustainedText,
+ timeInterval,
+ aWaitUserToClear);
+
+ TFLOGSTRING("SATAPP: SatAppEventProvider::DisplayTextL exit")
+ return response;
+ }
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::GetInputLL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse SatAppEventProvider::GetInputL(
+ const TDesC &aText,
+ const TSatCharacterSet aCharacterSet,
+ TDes &aInput,
+ const TInt aMinLength,
+ const TInt aMaxLength,
+ const TBool aHideInput,
+ const TBool aGetInkey,
+ const CFbsBitmap */*aIconBitmapGetInput*/,
+ const TBool aSelfExplanatory,
+ TUint &aDuration)
+{
+ TFLOGSTRING("SATAPP: SatAppEventProvider::GetInputL call")
+
+ TSatUiResponse response(ESatSuccess);
+
+ QString title;
+ if (aText.Length() > 0) {
+ title=QString::fromUtf16(aText.Ptr(), aText.Length());
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::GetInputL \
+ Title=%s", title.utf16())
+ }
+
+ QString inputText;
+ if (aInput.Length() > 0) {
+ inputText = QString::fromUtf16(aInput.Ptr(), aInput.Length());
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::GetInputL \
+ inputText=%s", inputText.utf16())
+ }
+ bool isSelfExplanatory = aSelfExplanatory;
+ unsigned int duration = aDuration;
+ //QPixmap *iconBitmapGetInput = QPixmap::fromSymbianCFbsBitmap(CFbsBitmap *aIconBitmapGetInput);
+ if (aGetInkey) {
+ //Get Inkey
+ emit getInkeyEvent(
+ response,
+ title,
+ aCharacterSet,
+ inputText,
+ //iconBitmapGetInput,
+ isSelfExplanatory,
+ duration);
+ TFLOGSTRING("SATAPP: SatAppEventProvider::GetInputL: GetInkey")
+ aInput.Copy(reinterpret_cast<const TUint16*>(inputText.utf16()), inputText.length());
+ } else {
+ // Get Input
+ bool hideInput = aHideInput;
+ int minLength = aMinLength;
+ int maxLength = aMaxLength;
+ emit getInputEvent(
+ response,
+ title,
+ aCharacterSet,
+ inputText,
+ minLength,
+ maxLength,
+ hideInput,
+ //iconBitmapGetInput,
+ isSelfExplanatory,
+ duration);
+ int length = inputText.length();
+ if (length > maxLength) {
+ length = maxLength;
+ }
+ TFLOGSTRING("SATAPP: SatAppEventProvider::GetInputL: GetInput")
+ TFLOGSTRING2( "SATAPP: SatAppEventProvider::GetInputL:GetInput \
+ text=%s", inputText.utf16() )
+ aInput.Copy(reinterpret_cast<const TUint16*>(inputText.utf16()), length);
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::GetInputL aInput=%S", &aInput)
+ }
+ TFLOGSTRING("SATAPP: SatAppEventProvider::GetInputL exit")
+ return response;
+ }
+
+ // ----------------------------------------------------------------------------
+// SatAppEventProvider::GetYesNoL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse SatAppEventProvider::GetYesNoL(
+ const TDesC &aText,
+ const TSatCharacterSet aCharacterSet,
+ TChar &aInkey,
+ const CFbsBitmap */*aIconBitmap*/,
+ const TBool aSelfExplanatory,
+ TUint &aDuration,
+ const TBool aImmediateDigitResponse)
+{
+ TFLOGSTRING("SATAPP: SatAppEventProvider::GetYesNoL call")
+ TSatUiResponse response(ESatSuccess);
+ QString text;
+ if (aText.Length() > 0) {
+ text=QString::fromUtf16(aText.Ptr(), aText.Length());
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::GetYesNoL \
+ aText=%s", text.utf16())
+ }
+
+ unsigned int inKey = static_cast < TUint >(aInkey);
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::GetYesNoL: inkey=%d",
+ inKey)
+
+ bool selfExplanatory = aSelfExplanatory;
+ bool immediateDigitResponse = aImmediateDigitResponse;
+ unsigned int duration = aDuration;
+
+ emit getYesNoEvent(
+ response,
+ text,
+ aCharacterSet,
+ inKey,
+ //const TSatIconId &aIconId,
+ selfExplanatory,
+ duration,
+ immediateDigitResponse);
+
+ aInkey = inKey;
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::GetYesNoL key=%d", inKey)
+ TFLOGSTRING("SATAPP: SatAppEventProvider::GetYesNoL exit")
+ return response;
+}
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::ConfirmSendL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse SatAppEventProvider::ConfirmSendL(
+ const TDesC &aText,
+ TBool &aActionAccepted,
+ TInt aType)
+{
+ TFLOGSTRING("SATAPP: SatAppEventProvider::ConfirmSendL call")
+ TSatUiResponse response(ESatSuccess);
+ QString text;
+ if (aText.Length() > 0) {
+ text=QString::fromUtf16(aText.Ptr(), aText.Length());
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::GetYesNoL \
+ aText=%s", text.utf16())
+ }
+ bool actionAccepted = aActionAccepted;
+ int type = aType;
+ emit confirmSendEvent(
+ response,
+ text,
+ actionAccepted,
+ type);
+ TFLOGSTRING("SATAPP: SatAppEventProvider::ConfirmSendL exit")
+ return response;
+}
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::ShowSmsWaitNoteL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppEventProvider::ShowSmsWaitNoteL(
+ const TDesC &aText,
+ const CFbsBitmap */*aIconBitmapSendSM*/,
+ const TBool aSelfExplanatoryIcon)
+{
+ TFLOGSTRING("SATAPP: SatAppEventProvider::ShowSmsWaitNoteL call")
+ QString title;
+ if (aText.Length() > 0) {
+ title = QString::fromUtf16 (aText.Ptr(), aText.Length());
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::ShowSmsWaitNoteL \
+ Title=%s", title.utf16())
+ }
+ bool selfExplanatoryIcon = aSelfExplanatoryIcon;
+
+ emit showSmsWaitNoteEvent(
+ title,
+ selfExplanatoryIcon);
+ TFLOGSTRING("SATAPP: SatAppEventProvider::ShowSmsWaitNoteL exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::ConfirmSetUpCallL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppEventProvider::ConfirmSetUpCallL(
+ const TDesC &aText,
+ const TDesC &aSimAppName,
+ TBool &aActionAccepted,
+ const CFbsBitmap */*aIconBitmap*/,
+ const TBool /*aSelfExplanatory*/)
+ {
+ TFLOGSTRING("SATAPP: SatAppEventProvider::ConfirmSetUpCallL call")
+ QString text;
+ if (aText.Length() > 0) {
+ text = QString::fromUtf16 (aText.Ptr(), aText.Length());
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::ConfirmSetUpCallL \
+ text=%s", text.utf16())
+ }
+
+ QString title;
+ if (aText.Length() > 0) {
+ title = QString::fromUtf16 (aSimAppName.Ptr(), aSimAppName.Length());
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::ConfirmSetUpCallL \
+ Title=%s", title.utf16())
+ }
+ bool actionAccepted = aActionAccepted;
+
+ emit showSetUpCallConfirmEvent(
+ text,
+ title,
+ actionAccepted);
+ TFLOGSTRING("SATAPP: SatAppEventProvider::ConfirmSetUpCallL exit")
+ }
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::ShowDtmfWaitNoteL
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TSatUiResponse SatAppEventProvider::ShowDtmfWaitNoteL(
+ const TDesC &aText,
+ const CFbsBitmap */*aIconBitmapSendSM*/,
+ const TBool /*aSelfExplanatoryIcon*/)
+{
+ TSatUiResponse response(ESatSuccess);
+ TFLOGSTRING("SATAPP: SatAppEventProvider::ShowDtmfWaitNoteL call")
+ QString title;
+ if (aText.Length() > 0) {
+ title = QString::fromUtf16 (aText.Ptr(), aText.Length());
+ TFLOGSTRING2("SATAPP: SatAppEventProvider::ShowDtmfWaitNoteL \
+ Title=%s", title.utf16())
+ }
+ emit showDtmfWaitNoteEvent(
+ response,
+ title);
+ TFLOGSTRING("SATAPP: SatAppEventProvider::ShowDtmfWaitNoteL exit")
+ return response;
+}
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::clearScreen
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppEventProvider::ClearScreen()
+{
+ TFLOGSTRING("SATAPP: SatAppEventProvider::ClearScreen call")
+ emit clearScreenEvent();
+ TFLOGSTRING("SATAPP: SatAppEventProvider::ClearScreen exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppEventProvider::CloseSatUI
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppEventProvider::CloseSatUI()
+{
+ TFLOGSTRING("SATAPP: SatAppEventProvider::CloseSatUI call")
+ emit closeUiEvent();
+ TFLOGSTRING("SATAPP: SatAppEventProvider::CloseSatUI exit")
+}
+
+//-----------------------------------------------------------------------------
+// SatAppEventProvider::StopShowWaitNote
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppEventProvider::StopShowWaitNote()
+{
+ TFLOGSTRING("SATAPP: SatAppEventProvider::StopShowWaitNote call")
+ emit stopShowWaitNoteEvent();
+ TFLOGSTRING("SATAPP: SatAppEventProvider::StopShowWaitNote exit")
+}
+
+//-----------------------------------------------------------------------------
+// SatAppEventProvider::userCancelDtmfResponse
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void SatAppEventProvider::userCancelDtmfResponse()
+{
+ TFLOGSTRING("SATAPP: SatAppEventProvider::userCancelDtmfResponse call")
+ mObs->Adapter()->SessionTerminated( ESessionCancel );
+ TFLOGSTRING("SATAPP: SatAppEventProvider::userCancelDtmfResponse exit")
+}
+
+ //End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/src/satappgetinkeynote.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*
+*/
+#include <exception>
+
+#include "tflogger.h"
+#include "satappgetinkeynote.h"
+
+// ======== MEMBER FUNCTIONS ==================================================
+
+// ----------------------------------------------------------------------------
+// SatAppGetInkeyNote::SatAppGetInkeyNote
+// (Constructor).
+// ----------------------------------------------------------------------------
+//
+SatAppGetInkeyNote::SatAppGetInkeyNote(const QString &text,
+ MessageBoxType type, QGraphicsItem *parent):
+ HbMessageBox(text, type, parent)
+{
+ TFLOGSTRING("SATAPP: SatAppGetInkeyNote::SatAppGetInkeyNote call - exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppGetInkeyNote::~SatAppGetInkeyNote
+// (Destructor).
+// ----------------------------------------------------------------------------
+//
+SatAppGetInkeyNote::~SatAppGetInkeyNote()
+{
+ TFLOGSTRING("SATAPP: SatAppGetInkeyNote::~SatAppGetInkeyNote call - exit")
+}
+
+
+// ----------------------------------------------------------------------------
+// SatAppGetInkeyNote::keyPressEvent
+// (keyPressEvent).
+// ----------------------------------------------------------------------------
+//
+void SatAppGetInkeyNote::keyPressEvent(QKeyEvent *event)
+{
+ TFLOGSTRING("SATAPP: SatAppGetInkeyNote::keyPressEvent")
+ switch (event->key())
+ {
+ case Qt::Key_0:
+ case Qt::Key_1:
+ case Qt::Key_2:
+ case Qt::Key_3:
+ case Qt::Key_4:
+ case Qt::Key_5:
+ case Qt::Key_6:
+ case Qt::Key_7:
+ case Qt::Key_8:
+ case Qt::Key_9:
+ case Qt::Key_Plus:
+ case Qt::Key_Asterisk:
+ case Qt::Key_NumberSign:
+ {
+ TFLOGSTRING("SATAPP: SatAppGetInkeyNote::keyPressEvent digits key")
+ emit digitalKeyPressed(event->key());
+ }
+ break;
+ default :
+ {
+ HbMessageBox::keyPressEvent(event);
+ break;
+ }
+ }
+ TFLOGSTRING2("SATAPP: SatAppGetInkeyNote::keyPressEvent key %d", \
+ event->key())
+ TFLOGSTRING("SATAPP: SatAppGetInkeyNote::keyPressEvent exit")
+}
+
+//End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/src/satappmainhandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,182 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*
+*/
+#include "satappmainhandler.h"
+#include "satappuiprovider.h"
+#include "satappeventprovider.h"
+#include "satappcommandhandler.h"
+#include "satappcommonconstant.h"
+#include "tflogger.h"
+
+// ======== MEMBER FUNCTIONS ==================================================
+
+// ----------------------------------------------------------------------------
+// SatAppMainHandler::SatAppMainHandler
+// (Construtor).
+// ----------------------------------------------------------------------------
+//
+SatAppMainHandler::SatAppMainHandler(HbMainWindow &window,
+ QObject */*parent*/):mEvent(0), mUi(0), mCommand(0)
+{
+ TFLOGSTRING("SATAPP: SatAppMainHandler::SatAppMainHandler call")
+
+ mEvent = new SatAppEventProvider(this);
+ mUi = new SatAppUiProvider(window, *mEvent, this);
+ mCommand = new SatAppCommandHandler(*mUi, this);
+
+ initConnections();
+ TFLOGSTRING("SATAPP: SatAppMainHandler::SatAppMainHandler exit")
+ }
+
+// ----------------------------------------------------------------------------
+// SatAppMainHandler::~SatAppMainHandler
+// (Destructor).
+// ----------------------------------------------------------------------------
+//
+SatAppMainHandler::~SatAppMainHandler()
+{
+ TFLOGSTRING("SATAPP: SatAppMainHandler::~SatAppMainHandler call-exit")
+}
+
+
+void SatAppMainHandler::initConnections()
+{
+ TFLOGSTRING("SATAPP: SatAppMainHandler::initConnections call")
+ bool ret = false;
+ // For SetUpMenu
+ ret = connect(mEvent, SIGNAL(setUpMenuEvent(TSatUiResponse &,
+ QString, QStringList, /*const HbIcon& ,*/ bool, bool)),
+ mCommand, SLOT(setUpMenu(TSatUiResponse &,
+ QString, QStringList, /*const HbIcon& ,*/ bool, bool)),
+ Qt::DirectConnection);
+ TFLOGSTRING2("SATAPP: SatAppMainHandler::initConnections: \
+ SetUpMenu=%d", ret)
+
+ // For SelectItem
+ ret = connect(mEvent, SIGNAL(selectItemEvent(TSatUiResponse&,
+ QString, QStringList, /*const HbIcon& ,*/
+ int, unsigned char&, bool, bool)),
+ mCommand, SLOT(selectItem(TSatUiResponse&,
+ QString,QStringList, /*const HbIcon& ,*/
+ int, unsigned char&, bool, bool)),
+ Qt::DirectConnection);
+ TFLOGSTRING2("SATAPP: SatAppMainHandler::initConnections: \
+ SelectItem=%d", ret)
+
+ // for display text
+ ret = connect(mEvent, SIGNAL(displayTextEvent(TSatUiResponse &,
+ QString, QString, /*const HbIcon & ,*/ bool &, bool, int, bool)),
+ mCommand, SLOT(displayText(TSatUiResponse&,
+ QString, QString, /*const HbIcon & ,*/ bool &, bool, int, bool)),
+ Qt::DirectConnection);
+
+ TFLOGSTRING2("SATAPP: SatAppMainHandler::initConnections: \
+ DisplayText=%d", ret)
+
+ ret = connect(mEvent, SIGNAL(clearScreenEvent()),
+ mUi, SLOT(clearScreen()),
+ Qt::DirectConnection);
+
+ TFLOGSTRING2("SATAPP: SatAppMainHandler::initConnections: \
+ ClearScreen=%d", ret)
+
+ ret = connect(mEvent, SIGNAL(closeUiEvent()),
+ mUi, SLOT(closeUi()),
+ Qt::DirectConnection);
+
+ TFLOGSTRING2("SATAPP: SatAppMainHandler::initConnections: \
+ CloseUi=%d", ret)
+
+ // For GetInkey
+ ret = connect(mEvent, SIGNAL(getInkeyEvent(TSatUiResponse &,
+ QString, TSatCharacterSet, QString &,
+ //const QPixmap* aIconBitmapGetInput,
+ bool,unsigned int &)),
+ mCommand, SLOT(getInkey(TSatUiResponse &, QString,
+ TSatCharacterSet, QString &,
+ //const QPixmap* aIconBitmapGetInput,
+ bool, unsigned int &)),
+ Qt::DirectConnection);
+ TFLOGSTRING2("SATAPP: SatAppMainHandler::initConnections: \
+ GetInkey=%d", ret)
+
+ ret = connect(mEvent, SIGNAL(getYesNoEvent(TSatUiResponse &,
+ QString, TSatCharacterSet, unsigned int &, //TSatIconId,
+ bool, unsigned int &, bool)),
+ mCommand, SLOT(getYesNo(TSatUiResponse &, QString,
+ TSatCharacterSet, unsigned int &, //TSatIconId,
+ bool, unsigned int &, bool)),
+ Qt::DirectConnection);
+ TFLOGSTRING2("SATAPP: SatAppMainHandler::initConnections: \
+ GetYesNo=%d", ret)
+
+ // For GetInput
+ ret = connect(mEvent, SIGNAL(getInputEvent(TSatUiResponse &, QString,
+ TSatCharacterSet, QString &, int, int, bool, bool, unsigned int &)),
+ mCommand, SLOT(getInput(TSatUiResponse &, QString, TSatCharacterSet,
+ QString &, int, int, bool, bool, unsigned int &)),
+ Qt::DirectConnection);
+ TFLOGSTRING2("SATAPP: SatAppMainHandler::initConnections: GetInput=%d", ret)
+
+ // For send confirm
+ ret = connect(mEvent, SIGNAL(confirmSendEvent(TSatUiResponse &, QString,
+ bool &, int)),
+ mCommand, SLOT(confirmSend(TSatUiResponse&, QString, bool &, int)),
+ Qt::DirectConnection);
+ TFLOGSTRING2("SATAPP: SatAppSendSms::initConnections: confirmSend=%d", ret)
+
+ ret = connect(mEvent, SIGNAL(showSmsWaitNoteEvent(QString,
+ /*const CFbsBitmap* aIconBitmapSendSM,*/ bool)),
+ mCommand, SLOT(showSmsWaitNote(QString,
+ /*const CFbsBitmap* aIconBitmapSendSM,*/bool)),
+ Qt::DirectConnection);
+
+ TFLOGSTRING2("SATAPP: SatAppMainHandler::initConnections: \
+ showSmsWaitNote=%d", ret)
+ //For Send DTMF
+ ret = connect(mEvent, SIGNAL(showDtmfWaitNoteEvent(
+ TSatUiResponse &, QString/*,
+ const CFbsBitmap* aIconBitmapSendDTMF, bool*/)),
+ mCommand, SLOT(showDtmfWaitNote(TSatUiResponse &, QString
+ /*const CFbsBitmap* aIconBitmapSendDTMF,bool*/)),
+ Qt::DirectConnection);
+ TFLOGSTRING2("SATAPP: SatAppMainHandler::initConnections: showDtmfsWaitNote=%d", ret)
+ //For DTMF cancel
+ ret = connect(mUi, SIGNAL(userCancelDtmfResponse()),
+ mEvent, SLOT(userCancelDtmfResponse()),
+ Qt::DirectConnection);
+ TFLOGSTRING2("SATAPP: SatAppMainHandler::initConnections: userCancelDtmfResponse=%d", ret)
+
+ //Stop wait note
+ ret = connect(mEvent, SIGNAL(stopShowWaitNoteEvent()),
+ mCommand, SLOT(stopShowWaitNote()),
+ Qt::DirectConnection);
+ TFLOGSTRING2("SATAPP: SatAppMainHandler::initConnections: \
+ stopShowWaitNote=%d", ret)
+ // For SetUpCall
+ ret = connect(mEvent, SIGNAL(showSetUpCallConfirmEvent(
+ QString, QString, bool &)),
+ mCommand, SLOT(confirmSetUpCall(
+ QString, QString, bool &)),
+ Qt::DirectConnection);
+ TFLOGSTRING2("SATAPP: SatAppMainHandler::initConnections: \
+ showSetUpCallConfirm=%d", ret)
+
+ TFLOGSTRING("SATAPP: SatAppMainHandler::initConnections exit")
+}
+
+//End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/src/satappuiprovider.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,927 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#include <QCoreApplication>
+#include <QTime> // GetInkey duration return
+#include <QTimer> // timeout callback
+#include <hbmainwindow.h> // softkey
+#include <hbdocumentloader.h> // application xml
+#include <hbaction.h> // action user response
+#include <hbvalidator.h>
+#include <hbmessagebox.h> // DisplayText, ConfirmSend, SetUpCall
+#include <hblabel.h> // DisplayText, GetInput, SetUpCall
+#include <hbinputdialog.h> // GetInkey
+#include <hbprogressnote.h> // SendSms wait note
+#include <hblineedit.h> // For GetInput
+#include <hbinputeditorinterface.h> // GetInput
+#include "satappview.h" // SetUpMenu, SelectItem
+#include "satappgetinkeynote.h" // GetYesNo immediate digit response
+
+#include "satappuiprovider.h"
+#include "tflogger.h"
+
+const char *SATAPP_DOCML = ":/xml/satapp.docml";
+const char *SATAPP_SETUPMENU_VIEW = "setupmenu_view";
+const char *SATAPP_SELECTITEM_VIEW = "selectitem_view";
+
+// ======== MEMBER FUNCTIONS ==================================================
+
+// ----------------------------------------------------------------------------
+// SatAppUiProvider
+// ----------------------------------------------------------------------------
+//
+SatAppUiProvider::SatAppUiProvider(
+ HbMainWindow &window,
+ SatAppEventProvider &event,
+ QObject *parent) :
+ QObject(parent), mMainWindow(window), mLoader(0),
+ mSetupMenuView(0), mSelectItemView(0), mDisplayPopup(0),
+ mGetInkeyQuery(0), mYesNoPopup(0), mGetInputQuery(0),
+ mConfirmSendQuery(0), mSmsWaitNote(0),mDtmfWaitNote(0), mSetUpCallQuery(0),
+ mUserRsp(EUserNoResponse), mDigitalRsp(0), mMinLength(0),mTimer(0),mLoop(0)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::SatAppUiProvider call");
+
+ bool docmlLoad = false;
+ mLoader = new SatAppDocumentLoader();
+ // ownership of the objects are transferred to caller
+ mObjects = mLoader->load(SATAPP_DOCML,&docmlLoad);
+ if (docmlLoad) {
+ TFLOGSTRING("SATAPP: SatAppUiProvider::SatAppUiProvider view found")
+ mSetupMenuView = qobject_cast<SatAppView *>(mLoader->findWidget
+ (SATAPP_SETUPMENU_VIEW));
+ if (mSetupMenuView) {
+ mMainWindow.addView(mSetupMenuView);
+ mSetupMenuView->setMainWindow(mMainWindow);
+ mSetupMenuView->initSetupMenu(event, *this);
+ mMainWindow.setCurrentView(mSetupMenuView);
+ }
+
+ mSelectItemView = qobject_cast<SatAppView *>(mLoader->findWidget
+ (SATAPP_SELECTITEM_VIEW));
+ if (mSelectItemView) {
+ mSelectItemView->setMainWindow(mMainWindow);
+ mSelectItemView->initSelectItem(event, *this);
+ }
+
+ } else {
+ TFLOGSTRING(
+ "SATAPP: SatAppUiProvider::SatAppUiProvider DOCML failure!");
+ }
+
+ TFLOGSTRING("SATAPP: SatAppUiProvider::SatAppUiProvider eixt");
+}
+
+// ----------------------------------------------------------------------------
+// activeView
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::activeView(const QString &view)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::activeView");
+ if(view == "setupmenu_view") {
+ mMainWindow.removeView(mMainWindow.currentView());
+ mMainWindow.addView(mSetupMenuView);
+ mMainWindow.setCurrentView(mSetupMenuView);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::activeView setup menu");
+ } else {
+ mMainWindow.removeView(mMainWindow.currentView());
+ mMainWindow.addView(mSelectItemView);
+ mMainWindow.setCurrentView(mSelectItemView);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::activeView select item");
+ }
+ TFLOGSTRING("SATAPP: SatAppUiProvider::activeView eixt");
+}
+
+// ----------------------------------------------------------------------------
+// Destructor
+// ----------------------------------------------------------------------------
+//
+SatAppUiProvider::~SatAppUiProvider()
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::~SatAppUiProvider call");
+ //delete mTopicMonitor; not in use at the moment
+ delete mLoader;
+ // delete all objects created from DOCML.
+ while (!mObjects.isEmpty()) {
+ TFLOGSTRING(
+ "SATAPP: SatAppUiProvider::~SatAppUiProvider object tree");
+ delete mObjects.takeFirst();
+ }
+ if (mDisplayPopup) {
+ delete mDisplayPopup;
+ mDisplayPopup = 0;
+ }
+ if (mGetInkeyQuery) {
+ delete mGetInkeyQuery;
+ mGetInkeyQuery = 0;
+ }
+ if (mYesNoPopup) {
+ delete mYesNoPopup;
+ mYesNoPopup = 0;
+ }
+ if (mGetInputQuery) {
+ delete mGetInputQuery;
+ mGetInputQuery = 0;
+ }
+ if (mConfirmSendQuery) {
+ delete mConfirmSendQuery;
+ mConfirmSendQuery = 0;
+ }
+ if (mSmsWaitNote) {
+ delete mSmsWaitNote;
+ mSmsWaitNote = 0;
+ }
+ if (mSetUpCallQuery) {
+ delete mSetUpCallQuery;
+ mSetUpCallQuery = 0;
+ }
+ if (mDtmfWaitNote) {
+ delete mDtmfWaitNote;
+ mDtmfWaitNote = 0;
+ }
+
+ if (mLoop && mLoop->isRunning()) {
+ mLoop->exit();
+ delete mLoop;
+ mLoop = 0;
+ TFLOGSTRING("SatAppUiProvider::~SatAppUiProvider exit loop")
+ }
+
+ TFLOGSTRING("SATAPP: SatAppUiProvider::~SatAppUiProvider exit");
+}
+
+// ----------------------------------------------------------------------------
+// userPrimaryResponse
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::userPrimaryResponse()
+{
+ mUserRsp = EUserPrimaryResponse;
+ TFLOGSTRING("SATAPP: SatAppUiProvider::userPrimaryResponse call-exit")
+}
+
+// ----------------------------------------------------------------------------
+// userSecondaryResponse
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::userSecondaryResponse()
+{
+ mUserRsp = EUserSecondaryResponse;
+ TFLOGSTRING("SATAPP: SatAppUiProvider::userSecondaryResponse call-exit")
+}
+
+// ----------------------------------------------------------------------------
+// showSetUpMenuView
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::showSetUpMenuView(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QStringList &aMenuItems,
+ //const CArrayFixFlat<TSatAction> *aMenuItemNextActions,
+ //const HbIcon &aIcon,
+ //const CAknIconArray *aItemIconsArray,
+ const bool aSelfExplanatoryItems,
+ const bool aHelpIsAvailable)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showSetUpMenuView call")
+ activeView("setupmenu_view");
+
+ // The text is the application name
+ // should be shown on the menu area always
+ if (!aText.isEmpty()) {
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showSetUpMenuView: title1",
+ aText.utf16())
+ mSetupMenuView->setTitle(aText);
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showSetUpMenuView: title2",
+ aText.utf16())
+ mSelectItemView->setTitle(aText);
+ }
+
+ mSetupMenuView->showSetUpMenuContent(aRes, aText, aMenuItems,
+ aSelfExplanatoryItems, aHelpIsAvailable);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showSetUpMenuView exit")
+}
+
+// ----------------------------------------------------------------------------
+// showSelectItemView
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::showSelectItemView(
+ TSatUiResponse &aRes,
+ const QString &aText,
+ const QStringList &aMenuItems,
+ //const CArrayFixFlat<TSatAction> *aMenuItemNextActions,
+ const int aDefaultItem,
+ unsigned char &aSelection,
+ //const HbIcon &aIcon,
+ //const CAknIconArray *aItemsIconArray,
+ const bool aSelfExplanatoryItems,
+ const bool aHelpIsAvailable)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showSelectItemView call")
+ activeView("selectitem_view");
+ mSelectItemView->showSelectItemContent(aRes, aText,
+ aMenuItems, aDefaultItem, aSelection,
+ aSelfExplanatoryItems, aHelpIsAvailable);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showSelectItemView call")
+}
+
+
+// ----------------------------------------------------------------------------
+// showDisplayTextPopup
+// ----------------------------------------------------------------------------
+//
+TSatAppUserResponse SatAppUiProvider::showDisplayTextPopup(
+ const QString &aHeading,
+ const QString &aContent,
+ const int aDuration)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showDisplayTextPopup call")
+ resetUserResponse();
+ // Create a note
+ mDisplayPopup = new HbMessageBox(HbMessageBox::MessageTypeInformation);
+
+ if (mDisplayPopup) {
+ TFLOGSTRING(
+ "SATAPP: SatAppUiProvider::showDisplayTextPopup note created")
+
+ // Set the label as heading widget
+ HbLabel *heading = new HbLabel(aHeading, mDisplayPopup);
+ mDisplayPopup->setHeadingWidget(heading);
+ mDisplayPopup->setText(aContent);
+ composeDialog(mDisplayPopup, aDuration, ESatDialogDisplayText);
+
+ TFLOGSTRING(
+ "SATAPP: SatAppUiProvider::showDisplayTextPopup duration before exec")
+ mDisplayPopup->exec();
+ TFLOGSTRING(
+ "SATAPP: SatAppUiProvider::showDisplayTextPopup duration end exec")
+
+ delete mDisplayPopup;
+ mDisplayPopup = 0;
+ }
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showDisplayTextPopup exit")
+ return mUserRsp;
+}
+
+// ----------------------------------------------------------------------------
+// showGetInkeyQuery
+// ----------------------------------------------------------------------------
+//
+TSatAppUserResponse SatAppUiProvider::showGetInkeyQuery(
+ const QString &aHeading,
+ QString &aContent,
+ const TSatCharacterSet aCharacterSet,
+ unsigned int &aDuration)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInkeyQuery call")
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showGetInkeyQuery \
+ aHeading=%s", aHeading.utf16())
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showGetInkeyQuery \
+ aContent=%s", aContent.utf16())
+
+ resetUserResponse();
+ // Create a query
+ mGetInkeyQuery = new HbInputDialog();
+ if (mGetInkeyQuery) {
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInkeyQuery note created")
+ // Set PromptText
+ mGetInkeyQuery->setPromptText(aHeading);
+ // Set ContentText
+ QVariant vContent(aContent);
+ mGetInkeyQuery->setTextValue(vContent);
+
+ // Validation rule, what can be entered
+ HbValidator *val =new HbValidator;
+
+ if (ESatDigitOnly == aCharacterSet) {
+ // digit mode, digits only (0 9, *, #, and +);
+ mGetInkeyQuery->setInputMode(HbInputDialog::IntInput);
+ // Define what digits can be entered
+ QRegExp r("[0123456789*#+]{1,1}"); // from 1 to 1 digits
+ val->setMasterValidator(new QRegExpValidator(r,0));
+ mGetInkeyQuery->setValidator(val);
+ } else {
+ // char mode
+ mGetInkeyQuery->setInputMode(HbInputDialog::TextInput);
+ }
+
+ unsigned int duration = 60000;
+ if (aDuration) {
+ duration = aDuration * 100;
+ }
+ composeDialog(mGetInkeyQuery, duration, ESatDialogGetInkey);
+ mGetInkeyQuery->lineEdit()->setMaxLength(1);
+ connect(mGetInkeyQuery->lineEdit(), SIGNAL(textChanged(QString)),
+ this, SLOT(updateQueryAction(QString)));
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInkeyQuery before pop")
+ mGetInkeyQuery->exec();
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInkeyQuery end pop")
+
+ QString inputString = (mGetInkeyQuery->textValue()).toString();
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showGetInkeyQuery \
+ inputString=%s", inputString.utf16())
+ aContent = inputString;
+ delete val;
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showGetInkeyQuery \
+ aContent=%s", aContent.utf16())
+ delete mGetInkeyQuery;
+ mGetInkeyQuery = 0;
+ }
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInkeyQuery exit")
+ return mUserRsp;
+}
+
+// ----------------------------------------------------------------------------
+// showGetYesNoQuery
+// ----------------------------------------------------------------------------
+//
+int SatAppUiProvider::showGetYesNoQuery(
+ const QString &aText,
+ const TSatCharacterSet aCharacterSet,
+ unsigned int &aDuration,
+ const bool aImmediateDigitResponse)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetYesNoQuery call")
+ resetUserResponse();
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showGetYesNoQuery duration in=%d",
+ aDuration)
+ unsigned int duration = 60000;
+ if (aDuration) {
+ duration = aDuration * 100;
+ }
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showGetYesNoQuery duration=%d",
+ duration)
+ if (ESatYesNo == aCharacterSet) {
+ mYesNoPopup = new SatAppGetInkeyNote(aText);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetYesNoQuery normal")
+ composeDialog(mYesNoPopup, duration, ESatDialogGetYesNo);
+ } else if (aImmediateDigitResponse){
+ // user can choose the charactor or digital , and only cancel
+ // key press, then close current dialog
+ mYesNoPopup = new SatAppGetInkeyNote(aText);
+ composeDialog(mYesNoPopup, duration, ESatDialogGetDigitalRsp);
+
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetYesNoQuery immediate")
+ bool ret = connect(mYesNoPopup, SIGNAL(digitalKeyPressed(int)),
+ this, SLOT(digitalResponse(int)),
+ Qt::DirectConnection);
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showGetYesNoQuery:\
+ digitalKeyPressed=%d", ret)
+ }
+ if (mYesNoPopup) {
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showGetYesNoQuery duration=%d",
+ aDuration)
+ QTime time;
+ time.start();
+
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetYesNoQuery befor pop")
+ mYesNoPopup->exec();
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetYesNoQuery end pop")
+ aDuration = time.elapsed() / 100;
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showGetYesNoQuery duration out=%d",
+ aDuration)
+ delete mYesNoPopup;
+ mYesNoPopup = 0;
+ }
+ if (ESatYesNo == aCharacterSet) {
+ mDigitalRsp = mUserRsp;
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetYesNoQuery:yes/no rsp")
+ }
+ return mDigitalRsp;
+}
+
+
+// ----------------------------------------------------------------------------
+// showGetInputQuery
+// ----------------------------------------------------------------------------
+//
+TSatAppUserResponse SatAppUiProvider::showGetInputQuery(
+ const QString &heading,
+ QString &content,
+ const TSatCharacterSet characterSet,
+ const int minLength,
+ const int maxLength,
+ const bool aHideInput)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInputQuery call")
+ TFLOGSTRING3("SATAPP: SatAppUiProvider::showGetInputQuery \
+ min %d max %d length", minLength, maxLength)
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showGetInputQuery in content=%s",
+ content.utf16())
+ resetUserResponse();
+ mMinLength = minLength;
+ // Create a query
+ mGetInputQuery = new HbInputDialog();
+ // Set PromptText
+ mGetInputQuery->setPromptText(heading);
+ // Set ContentText
+ QVariant vContent(content);
+ mGetInputQuery->setTextValue(vContent);
+
+ // Validation rule, what can be entered
+ HbValidator *val =new HbValidator;
+ QRegExp r;
+ if (ESatDigitOnly == characterSet) {
+ // digit mode, digits only (0 9, *, #, and +);
+ mGetInputQuery->setInputMode(HbInputDialog::IntInput);
+ // Define what digits can be entered
+ r.setPattern("[0123456789*#+]{0,255}"); // define what characters can be entered
+ val->setMasterValidator(new QRegExpValidator(r,0));
+ mGetInputQuery->lineEdit()->setValidator(val);
+ } else {
+ // char mode
+ mGetInputQuery->setInputMode(HbInputDialog::TextInput);
+ }
+
+ connect(mGetInputQuery->lineEdit(), SIGNAL(textChanged(QString)),
+ this, SLOT(updateQueryAction(QString)));
+ mGetInputQuery->lineEdit()->setMaxLength(maxLength);
+
+ composeDialog(mGetInputQuery, 60000, ESatDialogGetInput);
+ // Sets the "OK"-action/button
+ if (0 == minLength || content.length() >= minLength) {
+ HbAction* okAction = new HbAction(tr("OK"), mGetInputQuery);
+ bool ret = connect(okAction, SIGNAL(triggered()),
+ this, SLOT(userPrimaryResponse()));
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showGetInputQuery \
+ connect okAction: %d", ret)
+ mGetInputQuery->setPrimaryAction(okAction);
+ } else {
+ // Set default primary action is 0
+ mGetInputQuery->setPrimaryAction(0);
+ }
+
+ if (aHideInput) {
+ mGetInputQuery->lineEdit()->setEchoMode(HbLineEdit::Password);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInputQuery hide")
+ }
+
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInputQuery before pop")
+ mGetInputQuery->exec();
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInputQuery end pop")
+
+ content = (mGetInputQuery->textValue()).toString();
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showGetInputQuery out content=%s",
+ content.utf16())
+
+ delete val;
+ delete mGetInputQuery;
+ mGetInputQuery = 0;
+
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showGetInputQuery exit")
+ return mUserRsp;
+
+}
+
+// ----------------------------------------------------------------------------
+// Called when editor field is modified
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::updateQueryAction(QString text)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::updateQueryAction call")
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::updateQueryAction text=%s", \
+ text.utf16())
+ // Get Input
+ if (mGetInputQuery) {
+ if (text.length() >= mMinLength) {
+ if (!mGetInputQuery->primaryAction()) {
+ HbAction *okAction = new HbAction(tr("OK"), mGetInputQuery);
+ bool ret = connect(
+ okAction, SIGNAL(triggered()),
+ this, SLOT(userPrimaryResponse()));
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::updateQueryAction \
+ get input connect okAction: %d", ret)
+ mGetInputQuery->setPrimaryAction(okAction);
+ }
+ TFLOGSTRING("SATAPP: SatAppUiProvider::updateQueryAction \
+ get input OK")
+ } else {
+ if (mGetInputQuery->primaryAction()) {
+ mGetInputQuery->removeAction(mGetInputQuery->primaryAction());
+ }
+ TFLOGSTRING("SATAPP: SatAppUiProvider::updateQueryAction \
+ get input no OK Action")
+ }
+ }
+ // Get InKey
+ if (mGetInkeyQuery) {
+ if (!mGetInkeyQuery->primaryAction() && (text.length() == 1)) {
+ HbAction *okAction = new HbAction(tr("OK"), mGetInkeyQuery);
+ bool ret = connect(okAction, SIGNAL(triggered()),
+ this, SLOT(userPrimaryResponse()));
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::updateQueryAction \
+ get inkey connect okAction: %d", ret)
+ mGetInkeyQuery->setPrimaryAction(okAction);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::updateQueryAction \
+ get inkey OK")
+ } else {
+ if (mGetInkeyQuery->primaryAction()) {
+ mGetInkeyQuery->removeAction(mGetInkeyQuery->primaryAction());
+ }
+ TFLOGSTRING("SATAPP: SatAppUiProvider::updateQueryAction \
+ get inkey not OK Action")
+ }
+ }
+
+ TFLOGSTRING("SATAPP: SatAppUiProvider::updateQueryAction exit")
+}
+
+// ----------------------------------------------------------------------------
+// showConfirmSendQuery
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::showConfirmSendQuery(
+ const QString &/*aText*/,
+ bool &aActionAccepted)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showConfirmSendQuery call")
+ resetUserResponse();
+ mConfirmSendQuery = new HbMessageBox();
+ if(mConfirmSendQuery) {
+ // Sets the "Yes"-action/button
+ mConfirmSendQuery->setText(tr("Allow SIM card to send message?"));
+ composeDialog(mConfirmSendQuery, 0, ESatDialogConfirmSend);
+
+ TFLOGSTRING("SATAPP: SatAppUiProvider::confirmSend before exec")
+ mConfirmSendQuery->exec();
+ TFLOGSTRING("SATAPP: SatAppUiProvider::confirmSend after exec")
+
+ delete mConfirmSendQuery;
+ mConfirmSendQuery = 0;
+ }
+ aActionAccepted = (EUserPrimaryResponse == mUserRsp) ? true : false;
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showConfirmSendQuery exit")
+}
+
+// ----------------------------------------------------------------------------
+// showSmsWaitNote
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::showSmsWaitNote(const QString &aText)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showSmsWaitNote")
+
+ mSmsWaitNote = new HbProgressNote(HbProgressNote::WaitNote);
+ //remove the default cancel softkey
+ mSmsWaitNote->removeAction(mSmsWaitNote->primaryAction());
+ if(aText.isEmpty()) {
+ mSmsWaitNote->setText(hbTrId("txt_sat_sendingtextmessage"));
+ } else {
+ mSmsWaitNote->setText(aText);
+ }
+ mSmsWaitNote->show();
+ // Extend showing sms wait note timer for test
+ extendNoteShowtime();
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showSmsWaitNote exit")
+ }
+
+// ----------------------------------------------------------------------------
+// showDtmfWaitNote
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::showDtmfWaitNote(
+ TSatUiResponse &aRes,
+ const QString &aText)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showDtmfWaitNote call")
+ aRes = ESatSuccess;
+
+ if (mDtmfWaitNote) {
+ delete mDtmfWaitNote;
+ mDtmfWaitNote = 0;
+ }
+
+ mDtmfWaitNote = new HbProgressNote(HbProgressNote::WaitNote);
+ //remove the default cancel softkey
+ bool ret = connect(mDtmfWaitNote->primaryAction(), SIGNAL(triggered()),
+ this, SLOT(cancelDtmfResponse()));
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::showDtmfWaitNote \
+ primaryAction=%d", ret)
+ if(aText.isEmpty()) {
+ mDtmfWaitNote->setText(tr("Sending DTMF"));
+ } else {
+ mDtmfWaitNote->setText(aText);
+ }
+ mDtmfWaitNote->show();
+ // Extend showing sms wait note timer for test
+ extendNoteShowtime();
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showDtmfWaitNote exit")
+ }
+
+// ----------------------------------------------------------------------------
+//stopShowWaitNote
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::stopShowWaitNote()
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::stopShowWaitNote call")
+ if(mSmsWaitNote) {
+ TFLOGSTRING("SATAPP: SatAppUiProvider::stopShowWaitNote SMS")
+ mSmsWaitNote->cancel();
+ }
+ if(mDtmfWaitNote) {
+ TFLOGSTRING("SATAPP: SatAppUiProvider::mDtmfWaitNote DTMF")
+ mDtmfWaitNote->close();
+ delete mDtmfWaitNote;
+ mDtmfWaitNote = 0;
+ }
+
+ TFLOGSTRING("SATAPP: SatAppUiProvider::stopShowWaitNote exit")
+}
+
+// ----------------------------------------------------------------------------
+// showConfirmSetUpCallQUery
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::showConfirmSetUpCallQuery(
+ const QString &aText,
+ const QString &aSimAppName,
+ bool &aActionAccepted)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showConfirmSetUpCallQUery call")
+ resetUserResponse();
+
+ QString alphaId;
+ if (aText.length() == 0){
+ if (aSimAppName.length() > 0){
+ alphaId.append(aSimAppName);
+ } else {
+ alphaId.append(tr("SIM services"));
+ }
+ alphaId.append(tr(" about to call"));
+ }
+
+ mSetUpCallQuery = new HbMessageBox(HbMessageBox::MessageTypeInformation);
+ if(mSetUpCallQuery) {
+ mSetUpCallQuery->setText(alphaId);
+ composeDialog(mSetUpCallQuery, 0, ESatDialogSetUpCall);
+
+ TFLOGSTRING("SATAPP: SatAppSetUpCall::showSetUpCallConfirm before exec")
+ mSetUpCallQuery->exec();
+ TFLOGSTRING("SATAPP: SatAppSetUpCall::showSetUpCallConfirm after exec")
+
+ delete mSetUpCallQuery;
+ mSetUpCallQuery = 0;
+ }
+ aActionAccepted = (EUserPrimaryResponse == mUserRsp) ? true : false;
+ TFLOGSTRING("SATAPP: SatAppUiProvider::showConfirmSetUpCallQUery exit")
+}
+
+// ----------------------------------------------------------------------------
+// clearScreen
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::clearScreen()
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::clearScreen called")
+ if (mDisplayPopup) {
+ TFLOGSTRING("SATAPP: SatAppUiProvider::clearScreen DisplayText")
+ mDisplayPopup->close();
+ }
+ if (mGetInkeyQuery) {
+ TFLOGSTRING("SATAPP: SatAppUiProvider::clearScreen GetInkey")
+ mGetInkeyQuery->close();
+ }
+ if (mYesNoPopup) {
+ TFLOGSTRING("SATAPP: SatAppUiProvider::clearScreen GetYesNo")
+ mYesNoPopup->close();
+ }
+ if (mGetInputQuery) {
+ TFLOGSTRING("SATAPP: SatAppUiProvider::clearScreen GetInput")
+ mGetInputQuery->close();
+ }
+ if(mConfirmSendQuery) {
+ mConfirmSendQuery->close();
+ TFLOGSTRING("SATAPP: SatAppUiProvider::clearScreen ConfirmSend")
+ }
+ if (mSetUpCallQuery) {
+ mConfirmSendQuery->close();
+ }
+ mUserRsp = EUserClearResponse;
+ TFLOGSTRING("SATAPP: SatAppUiProvider::clearScreen exit")
+}
+
+// ----------------------------------------------------------------------------
+// closeUi
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::closeUi()
+ {
+ TFLOGSTRING("SATAPP: SatAppUiProvider::closeUi called")
+ clearScreen();
+ mUserRsp = EUserCloseResponse;
+ QCoreApplication::instance()->quit();
+ TFLOGSTRING("SATAPP: SatAppUiProvider::closeUi exit")
+}
+
+// ----------------------------------------------------------------------------
+// digitalResponse
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::digitalResponse(const int aKey)
+{
+ TFLOGSTRING("SATAPP: SatAppGetInkey::digitalResponse call")
+ mDigitalRsp = aKey;
+ if (mYesNoPopup){
+ TFLOGSTRING("SATAPP: SatAppUiProvider::digitalResponse Close")
+ mYesNoPopup->close();
+ }
+ TFLOGSTRING("SATAPP: SatAppUiProvider::digitalResponse exit")
+}
+
+// ----------------------------------------------------------------------------
+// resetUserResponse
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::resetUserResponse()
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::resetUserResponse call")
+ mUserRsp = EUserNoResponse;
+ mDigitalRsp = 0;
+ mMinLength = 0;
+ TFLOGSTRING("SATAPP: SatAppUiProvider::resetUserResponse exit")
+}
+
+// ----------------------------------------------------------------------------
+// composeDialog
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::composeDialog(
+ HbDialog *dlg,
+ int aDuration,
+ TSatAppDialogActionType type,
+ bool aModal,
+ HbDialog::DismissPolicy aDismissPolicy)
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::composeDialog call")
+
+ dlg->setModal(aModal);
+ dlg->setDismissPolicy(aDismissPolicy);
+ if (aDuration){
+ dlg->setTimeout(aDuration);
+ } else {
+ dlg->setTimeout(HbDialog::NoTimeout);
+ }
+
+ HbAction *primaryAction = 0;
+ HbAction *secondaryAction = 0;
+
+ if (ESatDialogDisplayText == type){
+ primaryAction = new HbAction(tr("Ok"), dlg);
+ secondaryAction = new HbAction(tr("Back"), dlg);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::composeDialog \
+ ESatDialogDisplayText")
+ } else if (ESatDialogGetInput == type){
+ secondaryAction = new HbAction(tr("Cancel"), dlg);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::composeDialog \
+ ESatDialogGetInput")
+ } else if (ESatDialogGetInkey == type){
+ secondaryAction = new HbAction(tr("Cancel"), dlg);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::composeDialog \
+ ESatDialogGetInkey")
+ } else if (ESatDialogGetYesNo == type){
+ primaryAction = new HbAction(tr("Yes"), dlg);
+ secondaryAction = new HbAction(tr("No"), dlg);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::composeDialog \
+ ESatDialogGetYesNo")
+ } else if (ESatDialogGetDigitalRsp == type){
+ secondaryAction = new HbAction(tr("Cancel"), dlg);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::composeDialog \
+ ESatDialogGetDigitalRsp")
+ } else if (ESatDialogSetUpCall == type){
+ primaryAction = new HbAction(tr("Call"), dlg);
+ secondaryAction = new HbAction(tr("Cancel"), dlg);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::composeDialog \
+ ESatDialogSetUpCall")
+ } else if (ESatDialogConfirmSend == type){
+ primaryAction = new HbAction(tr("Yes"), dlg);
+ secondaryAction = new HbAction(tr("No"), dlg);
+ TFLOGSTRING("SATAPP: SatAppUiProvider::composeDialog \
+ ESatDialogConfirmSend")
+ }
+
+ if (primaryAction) {
+ bool ret = connect(
+ primaryAction, SIGNAL(triggered()),
+ this, SLOT(userPrimaryResponse()));
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::composeDialog \
+ primaryAction=%d", ret)
+ }
+ dlg->setPrimaryAction(primaryAction);
+
+ if (secondaryAction) {
+ bool ret = connect(
+ secondaryAction, SIGNAL(triggered()),
+ this, SLOT(userSecondaryResponse()));
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::composeDialog \
+ secondaryAction=%d", ret)
+ }
+ dlg->setSecondaryAction(secondaryAction);
+
+ TFLOGSTRING("SATAPP: SatAppUiProvider::composeDialog exit")
+}
+
+// ----------------------------------------------------------------------------
+// docmlLoader
+// ----------------------------------------------------------------------------
+//
+SatAppDocumentLoader *SatAppUiProvider::docmlLoader()
+{
+ TFLOGSTRING("SATAPP: SatAppUiProvider::docmlLoader call-exit");
+ return mLoader;
+}
+
+// ----------------------------------------------------------------------------
+// createObject
+// ----------------------------------------------------------------------------
+//
+QObject *SatAppDocumentLoader::createObject(
+ const QString &type,
+ const QString &name)
+{
+ TFLOGSTRING("SATAPP: SatAppDocumentLoader::createObject")
+ if (type == SatAppView::staticMetaObject.className()) {
+ QObject *object = new SatAppView();
+ TFLOGSTRING2(
+ "SATAPP: SatAppDocumentLoader::createObject %s", name.utf16())
+ object->setObjectName(name);
+ TFLOGSTRING("SATAPP: SatAppDocumentLoader::createObject sat view exit")
+ return object;
+ }
+ TFLOGSTRING("SATAPP: SatAppDocumentLoader::createObject other exit")
+ return HbDocumentLoader::createObject(type, name);
+}
+
+// ----------------------------------------------------------------------------
+//extendNoteShowtime
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::extendNoteShowtime()
+{
+ TFLOGSTRING("SatAppUiProvider::extendNoteShowtime")
+ if (mTimer) {
+ delete mTimer;
+ mTimer = 0;
+ TFLOGSTRING("SatAppUiProvider::extendNoteShowtime delete timer")
+ }
+ if (mLoop) {
+ delete mLoop;
+ mLoop = 0;
+ TFLOGSTRING("SatAppUiProvider::extendNoteShowtime delete loop")
+ }
+ QTimer *mTimer = new QTimer(this);
+ mTimer->start(KExtendTimeoutMseconds);
+ bool ret = connect(mTimer, SIGNAL(timeout()), mTimer, SLOT(stop()));
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::extendNoteShowtime connect\
+ mTimer stop: %d", ret)
+
+ mLoop = new QEventLoop(this);
+ ret = connect(mTimer, SIGNAL(timeout()), mLoop, SLOT(quit()));
+ TFLOGSTRING2("SATAPP: SatAppUiProvider::extendNoteShowtime connect \
+ syn: %d", ret)
+ mLoop->exec(QEventLoop::AllEvents);
+ TFLOGSTRING("SatAppUiProvider::extendNoteShowtime exit")
+}
+
+// ----------------------------------------------------------------------------
+//cancelDtmfResponse
+// ----------------------------------------------------------------------------
+//
+void SatAppUiProvider::cancelDtmfResponse()
+{
+ TFLOGSTRING("SatAppUiProvider::cancelDtmfResponse")
+ if (mDtmfWaitNote) {
+ TFLOGSTRING("SatAppUiProvider::cancelDtmfResponse user cancel")
+ if (mTimer) {
+ mTimer->stop();
+ TFLOGSTRING("SatAppUiProvider::cancelDtmfResponse time out")
+ }
+ if (mLoop && mLoop->isRunning()) {
+ mLoop->exit();
+ TFLOGSTRING("SatAppUiProvider::cancelDtmfResponse exit loop")
+ }
+ mDtmfWaitNote->setEnabled(false);
+ mDtmfWaitNote->close();
+ emit userCancelDtmfResponse();
+ }
+ TFLOGSTRING("SatAppUiProvider::cancelDtmfResponse exit")
+}
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satapp/src/satappview.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,466 @@
+/*
+* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*
+*/
+#include <QTimer>
+#include <hbaction.h>
+#include <hbmainwindow.h>
+#include <hbview.h>
+#include <hblistwidget.h>
+#include <hblistwidgetitem.h>
+#include <hblabel.h>
+#include <hbmenu.h>
+
+#include "satappuiprovider.h"
+#include "satappeventprovider.h"
+#include "satappview.h"
+#include "tflogger.h"
+#include "satappcommonconstant.h"
+
+const char *SATAPP_MENUITEM = "s:ListWidget";
+const char *SATAPP_SUBTITLE = "t:label";
+const char *SATAPP_SELECTITEM = "t:ListWidget";
+
+
+// ======== MEMBER FUNCTIONS ==================================================
+
+// ----------------------------------------------------------------------------
+// SatAppView::SatAppView
+// (Constructor).
+// ----------------------------------------------------------------------------
+//
+SatAppView::SatAppView(QGraphicsItem *parent) :
+ HbView(parent),
+ mTimeout(false),
+ mSelectItem(false),
+ mClickBackSoftkey(false),
+ mItemIndex(0),
+ mLoop(0),
+ mTimer(0),
+ mWindow(0),
+ mSoftKeyQuitAction(0),
+ mSoftKeyBackAction(0),
+ mEvent(0),
+ mUi(0),
+ mListWidget(0),
+ mSelectListWidget(0),
+ mSubTitle(0)
+{
+ TFLOGSTRING("SATAPP: SatAppView::SatAppView call-exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppView::~SatAppView
+// (Disconstructor).
+// ----------------------------------------------------------------------------
+//
+SatAppView::~SatAppView()
+{
+ TFLOGSTRING("SATAPP: SatAppView::~SatAppView")
+ // The objects are outside the object tree, Delete them manually
+ if (mTimer) {
+ delete mTimer;
+ mTimer = 0;
+ TFLOGSTRING("SATAPP: SatAppView::~SatAppView delete subtitle")
+ }
+
+ if (mLoop) {
+ if (mLoop->isRunning()) {
+ mLoop->quit();
+ }
+ delete mLoop;
+ mLoop = 0;
+ TFLOGSTRING("SATAPP: SatAppView::~SatAppView delete subtitle")
+ }
+ TFLOGSTRING("SATAPP: SatAppView::~SatAppView Exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppView::initSetupMenu
+// (Init the setup menu view).
+// ----------------------------------------------------------------------------
+//
+void SatAppView::initSetupMenu(
+ SatAppEventProvider &event,
+ SatAppUiProvider &ui)
+{
+ TFLOGSTRING( "SATAPP: SatAppView::initSetupMenu call" )
+ mEvent = &event;
+ mUi = &ui;
+
+ // Listwidget
+ mListWidget = qobject_cast<HbListWidget *>
+ ( mUi->docmlLoader()->findWidget(SATAPP_MENUITEM ));
+ //mMenu = new HbMenu();
+ if (mListWidget && mWindow) {
+ mSoftKeyQuitAction = new HbAction(Hb::QuitAction,this);
+ HbMenu *addMenu = menu();
+ HbAction *menuAction = addMenu->addAction("Exit");
+ bool ret = connect(menuAction, SIGNAL(triggered()),
+ mSoftKeyQuitAction, SIGNAL(triggered()));
+ TFLOGSTRING2("SATAPP: SatAppView::initSetupMenu: \
+ menu connected %d", ret)
+ ret = connect(mSoftKeyQuitAction, SIGNAL(triggered()),
+ mWindow, SLOT(close()));
+ TFLOGSTRING2("SATAPP: SatAppView::initSetupMenu: \
+ quit connected %d", ret)
+
+ }
+ TFLOGSTRING("SATAPP: SatAppView::initSetupMenu exit")
+}
+
+
+// ----------------------------------------------------------------------------
+// SatAppView::initSelectItem
+// (Init the select item view).
+// ----------------------------------------------------------------------------
+//
+void SatAppView::initSelectItem(
+ SatAppEventProvider &event,
+ SatAppUiProvider &ui)
+{
+ TFLOGSTRING( "SATAPP: SatAppView::initSelectItem call")
+ mEvent = &event;
+ mUi = &ui;
+ // Subtitle
+ mSubTitle = qobject_cast<HbLabel *>
+ ( mUi->docmlLoader()->findWidget(SATAPP_SUBTITLE) );
+
+ mSelectListWidget = qobject_cast<HbListWidget *>
+ ( mUi->docmlLoader()->findWidget(SATAPP_SELECTITEM ));
+
+ if (mSelectListWidget && mWindow) {
+ mSoftKeyBackAction = new HbAction(Hb::BackAction,this);
+ HbMenu *addMenu = menu();
+ HbAction *menuBack = addMenu->addAction("Back");
+ bool ret = connect(menuBack, SIGNAL(triggered()),
+ mSoftKeyBackAction, SIGNAL(triggered()));
+ TFLOGSTRING2("SATAPP: SatAppView::initSelectItem: \
+ menu connected %d", ret)
+ HbAction *menuQuit = addMenu->addAction("Exit");
+ ret = connect(menuQuit, SIGNAL(triggered()),
+ mWindow, SLOT(close()));
+ TFLOGSTRING2("SATAPP: SatAppView::initSelectItem: \
+ close connected %d", ret)
+ ret = connect(mSoftKeyBackAction, SIGNAL(triggered()),
+ this, SLOT(backButtonClicked()));
+ TFLOGSTRING2("SATAPP: SatAppView::initSelectItem: \
+ back connected %d", ret)
+ }
+ TFLOGSTRING("SATAPP: SatAppView::initSelectItem exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppView::SatAppView
+// (Set up menu).
+// ----------------------------------------------------------------------------
+//
+void SatAppView::showSetUpMenuContent(
+ TSatUiResponse& aRes,
+ const QString& aText,
+ const QStringList& aMenuItems,
+ //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ //const HbIcon& aIcon,
+ //const CAknIconArray* aItemIconsArray,
+ const bool /*aSelfExplanatoryItems*/,
+ const bool /*aHelpIsAvailable*/)
+{
+ TFLOGSTRING("SATAPP: SatAppView::SetUpMenu")
+ // Disconnect select item
+ disconnectItem();
+ aRes = ESatSuccess;
+ mSelectItem = false;
+
+ // The text is the application name
+ // should be shown on the menu area always
+ if (!aText.isEmpty()) {
+ TFLOGSTRING( "SATAPP: SatAppView::SetUpMenu: title" )
+ setTitle(aText);
+ }
+ if (mListWidget) {
+ TFLOGSTRING("SATAPP: SatAppView::SetUpMenu mListWidget")
+ mListWidget->clear();
+ for(int i = 0; i < aMenuItems.count(); i++ ) {
+ mListWidget->addItem(aMenuItems.at( i ));
+ }
+ // connect setup menu item
+ connectItem();
+
+ if (mWindow) {
+ //Set the secondary softkey as quit when receiving the
+ //SetUpMenu command
+ TFLOGSTRING("SATAPP: SatAppView::SetUpMenu, \
+ initialize secondary softkey as quit key")
+ mWindow->addSoftKeyAction(Hb::SecondarySoftKey, mSoftKeyQuitAction);
+ }
+ }
+ TFLOGSTRING("SATAPP: SatAppView::SetUpMenu exit")
+}
+
+
+// ----------------------------------------------------------------------------
+// SatAppView::SelectItem
+// (Selected item).
+// ----------------------------------------------------------------------------
+//
+void SatAppView::showSelectItemContent(
+ TSatUiResponse& aRes,
+ const QString& aText,
+ const QStringList& aMenuItems,
+ //const CArrayFixFlat<TSatAction>* aMenuItemNextActions,
+ const int aDefaultItem,
+ unsigned char& aSelection,
+ //const HbIcon& aIcon,
+ //const CAknIconArray* aItemsIconArray,
+ const bool /*aSelfExplanatoryItems*/,
+ const bool /*aHelpIsAvailable*/)
+{
+ TFLOGSTRING("SATAPP: SatAppView::selectItem")
+ // Disconnect setup menu item
+ disconnectItem();
+ aRes = ESatSuccess;
+ mSelectItem = true;
+ mClickBackSoftkey = false;
+ if (mWindow){
+ mWindow->setCurrentViewIndex(aDefaultItem);
+ }
+
+ // Set sub title
+ if (!aText.isEmpty()) {
+ TFLOGSTRING2("SATAPP: aText=%s", aText.utf16())
+ mSubTitle->setPlainText(aText);
+ } else {
+ TFLOGSTRING("SATAPP: txt_sat_selectitem_title")
+ mSubTitle->setPlainText(hbTrId("txt_sat_selectitem_title"));
+ }
+ // Set List widget
+ if (mSelectListWidget) {
+ TFLOGSTRING("SATAPP: SatAppView::selectItem mSelectListWidget")
+ mSelectListWidget->clear();
+ for(int i = 0; i < aMenuItems.count(); i++ ) {
+ mSelectListWidget->addItem(aMenuItems.at( i ));
+ }
+ }
+ // Set Back key
+ setSoftkeyBack();
+ // connect selectitem
+ connectItem();
+
+ mTimer = new QTimer();
+ if (mTimer) {
+ bool ret = connect(mTimer, SIGNAL(timeout()),
+ this, SLOT(selectItemTimeOut()));
+ TFLOGSTRING2("SATAPP: SatAppView::selectItem timer %d", ret)
+ mTimer->start( KDefaultSelectionTimeoutMseconds );
+ mLoop = new QEventLoop();
+ TFLOGSTRING("SATAPP: SatAppView::selectItem loop exec before")
+ mLoop->exec(QEventLoop::AllEvents);
+ TFLOGSTRING("SATAPP: SatAppView::selectItem loop exec after")
+ delete mTimer;
+ mTimer = 0;
+ delete mLoop;
+ mLoop = 0;
+ }
+
+ if (mTimeout) {
+ aRes = ESatNoResponseFromUser;
+ TFLOGSTRING("SATAPP: SatAppView::selectItem time out")
+ } else if (mClickBackSoftkey) {
+ TFLOGSTRING("SATAPP: SatAppView::selectItem, \
+ user click the back softkey")
+ aRes = ESatBackwardModeRequestedByUser;
+ } else {
+ TFLOGSTRING2("SATAPP: SatAppView::selectItem selected %d",
+ mItemIndex)
+ //TODO: fix this below.
+ //For Demo. We will not return user select item to SIM.
+ aSelection = mItemIndex;
+ }
+ // disconnet select item
+ disconnectItem();
+ TFLOGSTRING2("SATAPP: SatAppView::selectItem aRes:%d", aRes)
+ mTimeout=false;
+ TFLOGSTRING("SATAPP: SatAppView::selectItem exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppView::selectItemTimeOut
+// (Time Out of select item).
+// ----------------------------------------------------------------------------
+//
+void SatAppView::selectItemTimeOut()
+{
+ TFLOGSTRING("SATAPP: SatAppView::selectItemTimeOut")
+ if (mSelectItem && mLoop && mLoop->isRunning()) {
+ TFLOGSTRING("SATAPP: SatAppView::selectItemTimeOut time out")
+ mTimeout = true;
+ mLoop->exit();
+ }
+ TFLOGSTRING("SATAPP: SatAppView::selectItemTimeOut exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppView::keyPressEvent
+// (keyPressEvent).
+// ----------------------------------------------------------------------------
+//
+void SatAppView::keyPressEvent(QKeyEvent *event)
+{
+ TFLOGSTRING("SATAPP: SatAppView::keyPressEvent")
+ // Need updating, End key support is still missing
+ switch (event->key())
+ {
+ case Qt::Key_Hangup:
+ {
+ TFLOGSTRING("SATAPP: SatAppView::keyPressEvent end key")
+ }
+ break;
+ default:
+ {
+ TFLOGSTRING2("SATAPP: SatAppView::keyPressEvent key %d",
+ event->key())
+ HbView::keyPressEvent(event);
+ }
+ }
+ TFLOGSTRING("SATAPP: SatAppView::keyPressEvent exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppView::setSoftkeyBack
+// (Set back action).
+// ----------------------------------------------------------------------------
+//
+void SatAppView::setSoftkeyBack()
+{
+ TFLOGSTRING("SATAPP: SatAppView::setSoftkeyBack")
+ if (mWindow && mSoftKeyBackAction) {
+ mWindow->addSoftKeyAction(Hb::SecondarySoftKey, mSoftKeyBackAction);
+ }
+ TFLOGSTRING("SATAPP: SatAppView::setSoftkeyBack Exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppView::backButtonClicked
+// (Back action).
+// ----------------------------------------------------------------------------
+//
+void SatAppView::backButtonClicked()
+{
+ TFLOGSTRING("SATAPP: SatAppView::backButtonClicked")
+ if (mSelectItem && mLoop->isRunning() ) {
+ mClickBackSoftkey = true;
+ TFLOGSTRING("SATAPP: SatAppView::backButtonClicked back selected")
+ mLoop->exit();
+ }
+ TFLOGSTRING("SATAPP: SatAppView::backButtonClicked exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppView::setMainWindow
+// (Set window for view).
+// ----------------------------------------------------------------------------
+//
+void SatAppView::setMainWindow(HbMainWindow &mainWindow)
+{
+ TFLOGSTRING("SATAPP: SatAppView::setMainWindow")
+ TFLOGSTRING2("SATAPP: SatAppView::setMainWindow \
+ &mainWindow=0x%x", &mainWindow)
+ mWindow = &mainWindow;
+ TFLOGSTRING("SATAPP: SatAppView::setMainWindow exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppView::menuItemSelected
+// (Menu item selected).
+// ----------------------------------------------------------------------------
+//
+void SatAppView::menuItemSelected(HbListWidgetItem *item)
+{
+ TFLOGSTRING("SATAPP: SatAppView::menuItemSelected")
+ if(mSelectItem && mSelectListWidget) {
+ mItemIndex = mSelectListWidget->row(item);
+ if (mLoop && mLoop->isRunning()) {
+ TFLOGSTRING( "SATAPP: SatAppView::menuItemSelected sel item")
+ mLoop->quit();
+ TFLOGSTRING( "SATAPP: SatAppView::menuItemSelected exit loop")
+ }
+ }
+ if (!mSelectItem && mListWidget) {
+ mItemIndex = mListWidget->row(item);
+ TFLOGSTRING( "SATAPP: SatAppView::menuItemSelected setup menu")
+ if (mEvent) {
+ mEvent->menuSelection( mItemIndex, false );
+ TFLOGSTRING( "SATAPP: SatAppView::menuItemSelected setup menu")
+ }
+ // disconnet the list widget, when server returns response,
+ // the connect again
+ disconnectItem();
+ }
+ TFLOGSTRING("SATAPP: SatAppView::menuItemSelected exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppView::connectItem
+// (Connect listwidget item).
+// ----------------------------------------------------------------------------
+//
+void SatAppView::connectItem()
+{
+ TFLOGSTRING("SATAPP: SatAppView::connectItem")
+ if (!mSelectItem && mListWidget) {
+ const bool result = connect(
+ mListWidget, SIGNAL(activated(HbListWidgetItem *)),
+ this, SLOT(menuItemSelected(HbListWidgetItem *)));
+ TFLOGSTRING2(
+ "SATAPP: SatAppView::connectItem exit: setup menu item result=%d",
+ result)
+ }
+
+ if (mSelectItem && mSelectListWidget) {
+ const bool result = connect(
+ mSelectListWidget, SIGNAL(activated(HbListWidgetItem *)),
+ this, SLOT(menuItemSelected(HbListWidgetItem *)));
+ TFLOGSTRING2(
+ "SATAPP: SatAppView::connectItem exit: select item result=%d",
+ result)
+ }
+ TFLOGSTRING("SATAPP: SatAppView::connectItem exit")
+}
+
+// ----------------------------------------------------------------------------
+// SatAppView::disconnectItem
+// (Disconnect listwidget item).
+// ----------------------------------------------------------------------------
+//
+void SatAppView::disconnectItem()
+{
+ TFLOGSTRING("SATAPP: SatAppView::disconnectItem")
+ // setup menu view
+ if (!mSelectItem && mListWidget) {
+ disconnect(mListWidget, SIGNAL( activated(HbListWidgetItem *)),
+ this, SLOT( menuItemSelected( HbListWidgetItem *)));
+ TFLOGSTRING("SATAPP: SatAppView::disconnectItem: setup menu item ")
+ }
+ // select item view
+ if (mSelectItem && mSelectListWidget) {
+ disconnect(mSelectListWidget, SIGNAL( activated(HbListWidgetItem *)),
+ this, SLOT( menuItemSelected( HbListWidgetItem *)));
+ TFLOGSTRING("SATAPP: SatAppView::disconnectItem: select item ")
+ }
+ TFLOGSTRING("SATAPP: SatAppView::disconnectItem exit")
+}
+
+// End of file
--- a/satui/satplugin/aisatplugininc/aisatcontentmodel.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Content model for SAT Plug-in.
-*
-*/
-
-
-#ifndef AISATCONTENTMODEL_H
-#define AISATCONTENTMODEL_H
-
-
-#include <aicontentmodel.h>
-#include "aisatpluginuids.hrh"
-
-// SAT Operator Info Plug-in XML implementation UID
-const TInt KImplUidSatPlugin =
- AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SATPLUGIN;
-const TUid KUidSatPlugin = { KImplUidSatPlugin };
-
-/**
- * Content Ids.
- */
-enum TSatContentIds
- {
- ESatContentText,
- ESatContentIcon
- };
-
-enum TSatEventIds
- {
- ESatLaunchSatapp = 1
- };
-
-const TAiContentItem KSatContent[] =
- {
- { ESatContentText, L"SatIdleModeText", "text/plain" },
- { ESatContentIcon, L"SatIdleModeIcon", "image/x-s60-bitmap" }
- };
-
-/**
- * Resource Ids.
- */
-enum TSatPluginResourceIds
- {
- ESatResourceEmptyIcon,
- ESatResourceEmptyCaption
- };
-
-/**
- * Resources that the plug-in will publish.
- */
-const TAiContentItem KSatResources[] =
- {
- { ESatResourceEmptyCaption, L"EmptyCaption", "text/plain" },
- { ESatResourceEmptyIcon, L"EmptyIcon", "image/*" }
- };
-
-/**
- * Event Ids.
- */
-const TAiContentItem KSatEvents[] =
- {
- { ESatLaunchSatapp, L"LaunchSatapp", "int" }
- };
-
-#endif //AISATCONTENTMODEL_H
-
--- a/satui/satplugin/aisatplugininc/aisatpluginuids.hrh Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: UIDs for the Active Idle subsystem components.
-*
-*/
-
-
-#ifndef AISATPLUGINUIDS_HRH
-#define AISATPLUGINUIDS_HRH
-
-/**
- * Ecom dll uid for sat plugin.
- */
-#define AI_UID_ECOM_DLL_CONTENTPUBLISHER_SATPLUGIN 0x102078EA
-
-/**
- * Ecom implementation uid for sat plugin.
- */
-#define AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SATPLUGIN 0x102078EB
-
-/**
- * Ecom interface uid for CAiContentPublisher.
- */
-#define AI_UID_ECOM_INTERFACE_CONTENTPUBLISHER 0x102750ED
-
-#endif //AISATPLUGINUIDS_HRH
--- a/satui/satplugin/aisatplugininc/caisatengine.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,177 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Header file for the CAiSatEngine class
-*
-*/
-
-
-#ifndef CAISATENGINE_H
-#define CAISATENGINE_H
-
-// INCLUDE FILES
-
-#include <e32property.h>
-#include <SATInternalPSKeys.h>
-#include <RSatSession.h> // For idle mode text and icon
-#include <rsatservice.h> // For idle mode text and icon
-#include <tsaticoninfo.h>
-
-class CAiSatNotifier;
-class TAIPluginInitData;
-class MPluginAPI;
-
-/**
- * CAiSatEngine
- *
- * @since S60 v3.2
- */
-class CAiSatEngine : public CBase
- {
-
-public: // Constructors and destructor
-
- /**
- * Part of the two phased constuction
- *
- * @param MPluginAPI& aPlugin a ref to a object implementing MPluginAPI
- * (the object ordering a notification of the content status change)
- * @return Pointer to the created CAiSatEngine object
- */
- static CAiSatEngine* NewL( MPluginAPI& aPlugin );
-
- /**
- * Destructor
- */
- ~CAiSatEngine();
-
-public: // New functions
-
- /**
- * Offers the Idle Mode text
- *
- * @param aString Idle mode text for publishing
- */
- void ContentText( TPtrC& aString );
-
- /**
- * Offers the Idle Mode icon
- *
- * @param aGulIcon icon for publishing
- *
- */
- void ContentIconL( CGulIcon*& aGulIcon );
-
- /**
- * Formulates response to SatIcon API.
- */
- void HandleNotifyL();
-
- /**
- * Get idle text, icon id, icon qulifier and load icon as bitmap.
- *
- * @param aDupIcon If the icon is the same as previous one.
- * @param aDupText If the text is the same as previous one.
- */
- void PrepareIdleModeDataL( TBool& aDupIcon, TBool& aDupText );
-
-private: // private construction method
-
- /**
- * Constructor to use in the object creation.
- * Initializes the necessary data.
- *
- * @param MPluginAPI& aPlugin a ref to a object implementing MPluginAPI
- * (the object ordering a notification of the content status change)
- */
- CAiSatEngine( MPluginAPI& aPlugin);
-
- /**
- * Part of the two phased construction
- */
- void ConstructL();
-
-private: // New functions
-
- /**
- * Duplicate a bitmap by copying memory.
- *
- * @param aSrcBmp The source bitmap.
- * @param aDestBmp The destination bitmap.
- * @return The error code.
- */
- TInt DuplicateBitmap( const CFbsBitmap* aDestBmp,
- const CFbsBitmap* aSrcBmp );
-
- /**
- * Loads the Idle Mode icon from SatIcon.
- *
- * @param aIconId The icon record id.
- * @param aIconQualifier the icon qualifier.
- * @return The Idle Mode icon id in TInt, the caller need to delete
- * the pointer.
- */
- CFbsBitmap* LoadIconL( TUint8 aIconId,
- RSatService::TSatIconQualifier aIconQualifier );
-
- /**
- * Information of the content availability.
- *
- * @return ETrue if there is content to show, EFalse if not.
- */
- TBool HasContent();
-
- /**
- * Sends idle information to satIconInfo
- *
- * @param const RSatService::TSATIdleResult& aResponse
- */
- void SendSatResponseL(
- const RSatService::TSATIdleResult& aResponse ) const;
-
-private: // Data
-
- /**
- * Pointer to the Display Text proactive command handler
- * Own
- */
- CAiSatNotifier* iNotifier;
-
- /**
- * ref to the class implementing the MPluginAPI interface
- */
- MPluginAPI& iPlugin;
-
- /**
- * SIM icon buffer
- * Own
- */
- CFbsBitmap* iIcon;
-
- /**
- * Icon id in previous icon loading (to check if icon is changed)
- */
- TUint8 iPreviousIconId;
-
- /**
- * SatClient session.
- */
- RSatSession iSatSession;
-
- /**
- * SatClient service.
- */
- RSatService iSatService;
- };
-
-#endif // CAISATENGINE_H
--- a/satui/satplugin/aisatplugininc/caisatnotifier.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: The handler for the SAT Plug-in
-* Set Up Idle Mode Text proactive command.
-*
-*/
-
-
-#ifndef CAISATNOTIFIER_H
-#define CAISATNOTIFIER_H
-
-// INCLUDES
-#include "mpluginapi.h" // Needed in cpp and header
-
-class RSatSession;
-class RSatService;
-
-// CLASS DECLARATION
-
-/**
- * This is the handler for the Set Up Idle Mode Text proactive command.
- * This active objects is registered with ETel SAT Api to receive notifications
- * about the incoming Display Text commands.
- *
- * @since S60 v3.2
- *
- */
-class CAiSatNotifier : public CActive
- {
-public: // Constructors and destructor
-
- /**
- * Part of the two phased constuction
- *
- * @param MPluginAPI& aPlugin a ref to a object implementing MPluginAPI
- * (the object ordering a notification of the content status change)
- * @param RSatService& aSatService a ref to RSatService
- * @return Pointer to the created CAiSatNotifier object
- */
- static CAiSatNotifier* NewL( MPluginAPI& aPlugin,
- RSatService& aSatService );
-
- /**
- * Destructor
- */
- virtual ~CAiSatNotifier();
-
- /**
- * Starts listening for the Sat command.
- * @return Error code.
- */
- TInt Start();
-
- /**
- * Whether the P&S has content or not.
- * @return whether has content or not.
- */
- TBool HasContent();
-
- /**
- * Get Idle mode data to member: string, icon qualifier, icon id.
- *
- * @param aDupIcon Whether the icon is the same with previous one
- * @param aDupText Whether the icon is the same with previous one
- */
- void GetIdleModeDataL( TBool& aDupIcon, TBool& aDupText );
-
- /**
- * Get idle text string
- *
- * @param aString Idle text string.
- */
- void GetIdleTextString( TPtrC& aString );
-
- /**
- * Idle icon record id
- *
- * @return Icon record id
- */
- TUint8 IdleIconId();
-
- /**
- * Idle icon qualifier
- *
- * @return Icon qualifier
- */
- RSatService::TSatIconQualifier IdleIconQualifier();
-
-protected: // From base class CActive
-
- /**
- * From CActive
- * Handles the request completion.
- */
- void RunL();
-
- /**
- * From CActive
- * Implements the cancel protocol.
- */
- void DoCancel();
-
-private: // Constructors
-
- /**
- * Constructor to use in the object creation.
- * Initializes the necessary data.
- *
- * @param aPlugin Ref to a object implementing MPluginAPI
- * (the object ordering a notification of the content status change)
- * @param aSatService Ref to a RSatService
- */
- CAiSatNotifier( MPluginAPI& aPlugin,
- RSatService& aSatService );
-
- /**
- * To continue listening to the Sat command.
- */
- void Activate();
-
-private: // Data
-
- /**
- * Idle mode text.
- * Own
- */
- HBufC* iString;
-
- /**
- * Idle mode icon id.
- */
- TUint8 iRecordId;
-
- /**
- * Idle mode icon qualifier.
- */
- RSatService::TSatIconQualifier iIconQualifier;
-
- /**
- * CAiSatPlugin reference.
- */
- MPluginAPI& iPlugin;
-
- /**
- * RSatService reference from CAiSatEngine.
- */
- RSatService& iSatService;
-
- /**
- * Identify the first start up.
- */
- TBool iFirstStartup;
-
- };
-
-#endif // CAISATNOTIFIER_H
-
--- a/satui/satplugin/aisatplugininc/caisatplugin.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,257 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Plug-in main class
-*
-*/
-
-
-#ifndef CAISATPLUGIN_H
-#define CAISATPLUGIN_H
-
-#include <aicontentpublisher.h>
-#include <aipropertyextension.h>
-#include <aicontentmodel.h>
-
-#include "mpluginapi.h"
-#include "caisatengine.h"
-
-class MAiContentObserver;
-class MAiContentItemIterator;
-
-/**
- * Plug-in main class
- *
- * @since S60 v3.2
- */
-class CAiSatPlugin : public CAiContentPublisher,
- public MAiPropertyExtension,
- public MPluginAPI
- {
-
-public:
-
- /**
- * Part of the two phased constuction
- */
- static CAiSatPlugin* NewL();
-
- /**
- * Destructor
- */
- ~CAiSatPlugin();
-
- /**
- * Publishes SAT Set Up Idle Mode Text
- */
- void PublishSatL();
-
-// from base class CAiContentPublisher
-
- /**
- * From CAiContentPublisher
- * The method is called by the framework to request the plug-in free all
- * memory and CPU resources and close all its open files, e.g. the plug-in
- * should unload its engines due backup operation. The method transits the
- * plug-in to "Idle" state.
- *
- * @param aReason Reason for state change, see TAiTransitionChange.
- */
- void Stop( TAiTransitionReason aReason );
-
- /**
- * From CAiContentPublisher
- * The method is called by the framework to instruct plug-in that it is
- * allowed to consume CPU resources, e.g plug-in is able to run timers,
- * perform asynchronous operations, etc. The method transits the plug-in
- * to "Alive" state.
- *
- * @param aReason Reason for state change, see TAiTransitionChange.
- */
- void Resume( TAiTransitionReason aReason );
-
- /**
- * From CAiContentPublisher
- * The method is called by the framework to instruct plug-in that it is
- * not allowed to consume CPU resources, e.g plug-in MUST stop each
- * timers, cancel outstanding asynchronous operations, etc. The method
- * transits the plug-in to "Suspendend" state.
- *
- * @param aReason Reason for state change, see TAiTransitionChange.
- */
- void Suspend( TAiTransitionReason aReason );
-
- /**
- * From CAiContentPublisher
- * Adds the content observer / subscriber to plug-in. The plug-in MUST
- * maintain a registry of subscribers and send notification to all them
- * whenever the plug-in changes state or new content available.
- *
- * @param aObserver Content observer to register.
- */
- void SubscribeL( MAiContentObserver& aObserver );
-
- /**
- * From CAiContentPublisher
- * Configures the plug-in.
- * Plug-ins take ownership of the settings array, so it must either
- * store it in a member or free it. Framework has put the array in cleanup
- * stack so the plugin shouldn't do that.
- * If this leaves, the plug-in will be destroyed by AI FW.
- * Plug-in must support LaunchByValue-event even if normal shortcuts don't
- * work. The only allowed serious enough leave is KErrNotFound from CenRep.
- *
- * @param aSettings Setting items defined in the UI definition.
- */
- void ConfigureL( RAiSettingsItemArray& aSettings );
-
- /**
- * From CAiContentPublisher
- * Returns interface extension. In Series 60 3.1 only event & property
- * extensions are supported. See MAiEventExtension & MAiPropertyExtension
- * interfaces.
- *
- * @param aUid UID of the extension interface to access.
- * @return The extension interface. Actual type depends on the passed aUid
- * argument.
- */
- TAny* Extension( TUid aUid );
-
-// from base class MAiPropertyExtension
-
- /**
- * From MAiPropertyExtension.
- * Read property of publisher plug-in.
- *
- * @param aProperty Identification of property.
- * @return Pointer to property value.
- */
- TAny* GetPropertyL( TInt aProperty );
-
- /**
- * From MAiPropertyExtension.
- * Write property value.
- *
- * @param aProperty Identification of property.
- * @param aValue Contains pointer to property value.
- */
- void SetPropertyL( TInt aProperty, TAny* aValue );
-
- /**
- * Receives a notification of the content update event
- */
- void NotifyContentUpdate();
-
-private:
-
- /**
- * Constructor to use in the object creation.
- * Initializes the necessary data.
- */
- CAiSatPlugin();
-
- /**
- * Part of the two phased construction
- */
- void ConstructL();
-
- /**
- * Update idle area when plug in reload.
- */
- void UpdateSatL();
-
- /**
- * Publish a icon to the idle area.
- *
- * @param aObserver The Active Idle content observer.
- * @param aIcon The icon to be published.
- * @return The error code.
- */
- TInt PublishIcon( MAiContentObserver& aObserver, CGulIcon* aIcon );
-
- /**
- * Clean setup idle mode icon.
- *
- * @param aObserver The Active Idle content observer.
- * @return The error code.
- */
- TInt CleanIcon( MAiContentObserver& aObserver );
-
- /**
- * Publish a SetUpIdleModeText string.
- *
- * @param aObserver The Active Idle content observer.
- * @param aContent The SetUpIdleModeText string would be published.
- * @return The error code.
- */
- TInt PublishText( MAiContentObserver& aObserver,
- const TDesC& aText );
-
- /**
- * Clean setup idle mode text.
- *
- * @param aObserver The Active Idle content observer.
- * @return The error code.
- */
- TInt CleanText( MAiContentObserver& aObserver );
-
-private: // data
-
- /**
- * Iterator for plugin content
- * Own
- */
- MAiContentItemIterator* iContent;
-
- /**
- * Iterator for plugin resources
- * Own
- */
- MAiContentItemIterator* iResources;
-
- /**
- * Iterator for plugin events
- * Own
- */
- MAiContentItemIterator* iEvents;
-
- /**
- * Plugin engine
- * Own
- */
- CAiSatEngine* iEngine;
-
- /**
- * Array of content observers
- */
- RPointerArray<MAiContentObserver> iObservers;
-
- /**
- * Information about the content publisher (this plug-in)
- */
- TAiPublisherInfo iInfo;
-
- /**
- * Whether the icon is the same with previous one.
- */
- TBool iDupIcon;
-
- /**
- * Whether the text is the same with previous one.
- */
- TBool iDupText;
- };
-
-#endif // CAISATPLUGIN_H
-
-
--- a/satui/satplugin/aisatplugininc/mpluginapi.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +0,0 @@
-/*
-* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Defines interface for the operator info engine user
-*
-*/
-
-
-#ifndef MPLUGINAPI_H
-#define MPLUGINAPI_H
-
-// CLASS DECLARATION
-/**
-* It defines interface for the plugin, contains virtual method which offers plugin
-* a way to notify the client e.g. P&S data changes
-*
-* @since S60 v3.2
-*/
-class MPluginAPI
- {
- public:
-
- /**
- * Virtual method, which the plugin class has to implement.
- * Method is used to send notification of P&S data's change event
- * from engine to plugin.
- *
- */
- inline virtual void NotifyContentUpdate() = 0;
- };
-
-#endif //MPLUGINAPI_H
-
--- a/satui/satplugin/aisatplugininc/tflogger.h Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Defines logging macroes
-*
-*/
-
-
-#ifndef __TFLOGGER_H__
-#define __TFLOGGER_H__
-
-#include <flogger.h>
-#include <e32svr.h>
-
-_LIT( KTfLogFolder, "sat" );
-_LIT( KTfLogFile, "satplugin.TXT" );
-
-/**
-* ------------------------------------------------------------------------------
-*
-* Remove #define LOGGING_ENABLED from comments to enable logging
-*
-* ------------------------------------------------------------------------------
-*/
-
-//#define LOGGING_ENABLED
-
-/**
-* ------------------------------------------------------------------------------
-*
-* LOGGING MACROs
-*
-* USE THESE MACROS IN YOUR CODE
-*
-* Example: TFLOGTEXT( own_desc )
-* Example: TFLOGSTRING( "Test" )
-* Example: TFLOGSTRING( "Test %i", aValue )
-* Example: TFLOGSTRING( "Test %i %i", aValue1, aValue2 )
-*
-* ------------------------------------------------------------------------------
-*/
-
-#ifdef LOGGING_ENABLED
-
- #define TFLOGTEXT( TEXT ) \
- { \
- RFileLogger::Write( KTfLogFolder,KTfLogFile, \
- EFileLoggingModeAppend, TEXT ); \
- RDebug::Print( TEXT ); \
- }
-
- #define TFLOGSTRING( TEXT ) \
- { \
- _LIT( tempLogDes, TEXT ); \
- RFileLogger::Write( \
- KTfLogFolder, \
- KTfLogFile, \
- EFileLoggingModeAppend, \
- tempLogDes() ); \
- RDebug::Print( _L( TEXT ) ); \
- }
-
- #define TFLOGSTRING2( TEXT, VAR1 ) \
- { \
- _LIT( tempLogDes, TEXT ); \
- RFileLogger::WriteFormat( \
- KTfLogFolder, \
- KTfLogFile, \
- EFileLoggingModeAppend, \
- TRefByValue<const TDesC>( tempLogDes() ), VAR1 ); \
- RDebug::Print( _L( TEXT ), VAR1 ); \
- }
-
- #define TFLOGSTRING3( TEXT, VAR1, VAR2 ) \
- { \
- _LIT( tempLogDes, TEXT ); \
- RFileLogger::WriteFormat( \
- KTfLogFolder, \
- KTfLogFile, \
- EFileLoggingModeAppend, \
- TRefByValue<const TDesC>( tempLogDes() ), VAR1, VAR2 ); \
- RDebug::Print( _L( TEXT ), VAR1, VAR2 ); \
- }
-
-#else
-
- #define TFLOGTEXT( TEXT )
- #define TFLOGSTRING( TEXT )
- #define TFLOGSTRING2( TEXT, VAR1 )
- #define TFLOGSTRING3( TEXT, VAR1, VAR2 )
-
-#endif // LOGGING_ENABLED
-
-#endif // __TFLOGGER_H__
--- a/satui/satplugin/aisatpluginsrc/caisatengine.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,343 +0,0 @@
-/*
-* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: The engine class of operator info plugin. Handles the
-* communication with Publish&Subscribe data.
-*
-*/
-
-
-// INCLUDE FILES
-#include <AknIconArray.h> // For itemsicon
-#include <gulicon.h> // For itemsicon
-#include <aknlayout.cdl.h> // For TAknWindowLineLayout
-#include <aknlayoutscalable_avkon.cdl.h> // For scalable layouts
-#include <AknUtils.h>
-#include <AknIconUtils.h>
-
-#include "caisatengine.h"
-#include "caisatnotifier.h"
-#include "mpluginapi.h"
-#include "tflogger.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-// -----------------------------------------------------------------------------
-// Default constructor
-// -----------------------------------------------------------------------------
-//
-CAiSatEngine::CAiSatEngine( MPluginAPI& aPlugin ) :
- iPlugin ( aPlugin ),
- iIcon( NULL ),
- iPreviousIconId( 0 )
- {
- }
-
-// -----------------------------------------------------------------------------
-// Two-phased constructor.
-// Create instance of concrete ECOM interface implementation
-// -----------------------------------------------------------------------------
-CAiSatEngine* CAiSatEngine::NewL( MPluginAPI& aPlugin )
- {
- TFLOGSTRING( "CAiSatEngine::NewL called" )
-
- CAiSatEngine* self = new( ELeave )CAiSatEngine( aPlugin );
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- TFLOGSTRING( "CAiSatEngine::NewL exits" )
- return self;
- }
-
-// -----------------------------------------------------------------------------
-// Destructor.
-// Closes the connection to the P&S and deletes
-// all the dynamic content.
-// -----------------------------------------------------------------------------
-//
-CAiSatEngine::~CAiSatEngine()
- {
- TFLOGSTRING( "CAiSatEngine::~CAiSatEngine called" )
-
- delete iNotifier;
-
- // Delete icon and null the pointer.
- delete iIcon;
- iIcon = NULL;
-
- iSatService.Close();
- iSatSession.Close();
-
- TFLOGSTRING( "CAiSatEngine::~CAiSatEngine exits" )
- }
-
-// -----------------------------------------------------------------------------
-// Offers information about the content
-// Returns ETrue if there is content available,
-// EFalse if not.
-// -----------------------------------------------------------------------------
-//
-TBool CAiSatEngine::HasContent()
- {
- TFLOGSTRING( "CAiSatEngine::HasContent called - exits" )
- return iNotifier->HasContent();
- }
-
-// -----------------------------------------------------------------------------
-// Retrieves the operator info text from RSatService
-// -----------------------------------------------------------------------------
-//
-void CAiSatEngine::ContentText( TPtrC& aString )
- {
- TFLOGSTRING( "CAiSatEngine::ContentText called" )
-
- iNotifier->GetIdleTextString( aString );
-
- TFLOGSTRING( "CAiSatEngine::ContentText exits" )
- }
-
-// -----------------------------------------------------------------------------
-// Offers the Idle Mode icon
-// -----------------------------------------------------------------------------
-//
-void CAiSatEngine::ContentIconL( CGulIcon*& aGulIcon )
- {
- TFLOGSTRING( "CAiSatEngine::ContentIconL called" )
-
- // Active Idle framework will release the bitmap we would
- // publish. So a new bitmap should be created to avoid
- // destroying the bitmap owned by UAA.
- if ( iIcon )
- {
- // The bitmap for publishing.
- CFbsBitmap* bitmapToPublish( NULL );
-
- bitmapToPublish = new (ELeave) CFbsBitmap;
- CleanupStack::PushL( bitmapToPublish );
-
- TSize size = iIcon->SizeInPixels();
- TInt error = bitmapToPublish->Create( size, iIcon->DisplayMode() );
-
- // Duplicate the bitmap owned by UAA into the new bitmap.
- if ( !error )
- {
- error = DuplicateBitmap( bitmapToPublish, iIcon );
- if ( !error )
- {
- // Create a icon from the bitmap and publish it.
- aGulIcon = CGulIcon::NewL( bitmapToPublish );
- CleanupStack::Pop( bitmapToPublish );
- TFLOGSTRING( "CAiSatEngine::ContentIconL create GulIcon" )
- }
- }
- if ( error )
- {
- CleanupStack::PopAndDestroy( bitmapToPublish );
- aGulIcon = NULL;
- }
- }
- TFLOGSTRING( "CAiSatEngine::ContentIconL exits" )
- }
-
-//------------------------------------------------------------------------------
-// Loads icon provided by SIM from RSatIcon
-//------------------------------------------------------------------------------
-CFbsBitmap* CAiSatEngine::LoadIconL( TUint8 aIconId,
- RSatService::TSatIconQualifier aIconQualifier )
- {
- TFLOGSTRING( "CAiSatEngine::LoadIconL called" )
- CFbsBitmap* simIconBuffer( NULL );
-
- // If icon allready has been got from SIM (via satIcon and SATServer)
- // Because mechanism for fetching icon is very slow, it has been
- // stored in class variable to make reasonable speed for
- // Active Idle refreshing.
- if ( RSatService::ESatIconSelfExplanatory == aIconQualifier ||
- RSatService::ESatIconNotSelfExplanatory == aIconQualifier )
- {
- TFLOGSTRING( "CAiSatEngine::LoadIconL having icon" )
- RIconEf iconEf;
- CleanupClosePushL( iconEf );
-
- // Get icon info
- iSatService.GetIconInfoL( aIconId, iconEf );
- // Get the an available icon from info array.
- TInt infoCount( iconEf.Count() );
- TInt error( KErrNotFound );
- for ( TInt i = 0; i < infoCount && KErrNone != error; i++ )
- {
- TRAP( error, simIconBuffer = iSatService.GetIconL( iconEf[i] ) );
- }
-
- // Check whether the for loop ends without icon gotton.
- if ( error != KErrNone )
- {
- TFLOGSTRING2( "CAiSatEngine::LoadIconL: error=%d",error )
- simIconBuffer = NULL;
- }
-
- CleanupStack::PopAndDestroy( &iconEf );
- }
- TFLOGSTRING( "CAiSatEngine::LoadIconL exit" )
- return simIconBuffer;
- }
-
-// ---------------------------------------------------------------------------
-// Formulates response to SatIcon API
-// ---------------------------------------------------------------------------
-//
-void CAiSatEngine::HandleNotifyL()
- {
- TFLOGSTRING( "CAiSatEngine::HandleNotifyL called" )
- TUint8 id( iNotifier->IdleIconId() );
- RSatService::TSatIconQualifier iconQualifier(
- iNotifier->IdleIconQualifier() );
-
- if ( !HasContent() && RSatService::ESatIconNoIcon == iconQualifier )
- {
- // Removal of text = No text and no icon
- TFLOGSTRING( "CAiSatNotifier::HasContent ETrue remove text success" )
- SendSatResponseL( RSatService::ESATIdleSuccess );
- }
- else
- {
- TFLOGSTRING2( "CAiSatEngine::HandleNotifyL Icon: %d", iconQualifier )
- if ( RSatService::ESatIconNoIcon == iconQualifier)
- {
- TFLOGSTRING( "CAiSatEngine::HandleNotifyL ESatIconNoIcon" )
- SendSatResponseL( RSatService::ESATIdleSuccess );
- }
- else if ( RSatService::ESatIconSelfExplanatory == iconQualifier ||
- RSatService::ESatIconNotSelfExplanatory == iconQualifier )
- {
- SendSatResponseL( RSatService::ESATIdleSuccess );
- TFLOGSTRING( "CAiSatEngine::HandleNotify icon & success resp" )
- }
- else if ( RSatService::ESatIconNotSelfExplanatory != iconQualifier &&
- RSatService::ESatIconNoIcon != iconQualifier )
- {
- SendSatResponseL( RSatService::ESATIdleSuccessRequestedIconNotDisplayed );
- TFLOGSTRING( "CAiSatEngine: KSATIdleSuccessRequestedIconNotDisplayed" )
- }
- else
- {
- TFLOGSTRING( "CAiSatEngine::HandleNotifyL others" )
- // Report error
- SendSatResponseL( RSatService::ESATIdleMeUnableToProcessCmd );
- }
- }
-
- TFLOGSTRING( "CAiSatEngine::HandleNotify exit" )
- }
-
-// ---------------------------------------------------------------------------
-// Get Idle mode data first, and load icon for publishing
-// ---------------------------------------------------------------------------
-//
-void CAiSatEngine::PrepareIdleModeDataL( TBool& aDupIcon, TBool& aDupText )
- {
- TFLOGSTRING( "CAiSatEngine::PrepareGetIdleModeDataL called" )
-
- // Get icon Id, icon qualifier and text.
- iNotifier->GetIdleModeDataL( aDupIcon, aDupText );
-
- // Load icon, and check whether it is the same with previous one.
- // if not, Load icon, otherwise, do nothing.
- TUint8 id ( iNotifier->IdleIconId() );
- RSatService::TSatIconQualifier iconQualifier(
- iNotifier->IdleIconQualifier() );
-
- if ( !( RSatService::ESatIconNoIcon == iconQualifier ) ||
- !( id == iPreviousIconId && iIcon ) )
- {
- TFLOGSTRING( "CAiSatEngine::PrepareIdleModeDataL load icon" )
- delete iIcon;
- iIcon = NULL;
-
- // The bitmap is fetched from UAA.
- iIcon = LoadIconL( id, iconQualifier );
- iPreviousIconId = id;
- }
- TFLOGSTRING( "CAiSatEngine::PrepareGetIdleModeDataL exits" )
- }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave
-// ---------------------------------------------------------------------------
-//
-void CAiSatEngine::ConstructL()
- {
- TFLOGSTRING( "CAiSatEngine::ConstructL called" )
-
- iSatSession.ConnectL();
- TFLOGSTRING( "CAiSatEngine::ConstructL connect sat session" )
-
- iSatService.OpenL( iSatSession );
- TFLOGSTRING( "CAiSatEngine::ConstructL open sat service" )
-
- iNotifier = CAiSatNotifier::NewL( iPlugin, iSatService );
- User::LeaveIfError( iNotifier->Start() );
-
- TFLOGSTRING( "CAiSatEngine::ConstructL exits" )
- }
-
-// ---------------------------------------------------------------------------
-// Sends SAT response to RSatIcon
-// ---------------------------------------------------------------------------
-//
-void CAiSatEngine::SendSatResponseL(
- const RSatService::TSATIdleResult& aResponse ) const
- {
- TFLOGSTRING( "CAiSatEngine::SendSatResponseL called")
-
- iSatService.SetIdleModeTextResponse( aResponse );
-
- TFLOGSTRING( "CAiSatEngine::SendSatResponseL exits" )
- }
-
-// ---------------------------------------------------------------------------
-// Duplicate a bitmap by copying memory.
-// ---------------------------------------------------------------------------
-//
-TInt CAiSatEngine::DuplicateBitmap( const CFbsBitmap* aDestBmp,
- const CFbsBitmap* aSrcBmp )
- {
- TFLOGSTRING( "CAiSatPlugin::DuplicateBitmap() called" )
-
- // Get size and scan line length of the source bitmap.
- TSize size = aSrcBmp->SizeInPixels();
- TInt scanLineLength = CFbsBitmap::ScanLineLength(
- size.iWidth, aSrcBmp->DisplayMode() );
- TInt error( KErrNone );
- // Copy the data area of the source bimap to the dest bitmap.
- if ( aSrcBmp && aSrcBmp->DataAddress() )
- {
- TAny* bitmapData( NULL );
-
- bitmapData = memcpy(
- (TAny*)aDestBmp->DataAddress(),
- (TAny*)aSrcBmp->DataAddress(),
- scanLineLength * size.iHeight );
-
- if ( NULL == bitmapData )
- {
- TFLOGSTRING( "CAiSatPlugin::DuplicateBitmap() \
- Failed to copy memory data of bitmap." )
- error = KErrBadHandle;
- }
- }
-
- TFLOGSTRING( "CAiSatPlugin::DuplicateBitmap() exits" )
-
- return error;
- }
--- a/satui/satplugin/aisatpluginsrc/caisatnotifier.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,294 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: The handler for the SAT Plug-in
-* Set Up Idle Mode Text proactive command.
-*
-*/
-
-
-// INCLUDE FILES
-#include <e32base.h>
-#include <etelsat.h>
-#include <RSatSession.h>
-#include <rsatservice.h>
-
-#include "caisatnotifier.h"
-#include "mpluginapi.h" // Needed in cpp and header
-#include "tflogger.h"
-
-// ============================ MEMBER FUNCTIONS =============================
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave
-// ---------------------------------------------------------------------------
-//
-CAiSatNotifier* CAiSatNotifier::NewL( MPluginAPI& aPlugin,
- RSatService& aSatService )
- {
- TFLOGSTRING( "CAiSatNotifier::NewL calling" )
- CAiSatNotifier* self = new ( ELeave ) CAiSatNotifier( aPlugin,
- aSatService );
-
- TFLOGSTRING( "CAiSatNotifier::NewL exits" )
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// Cancels and deletes
-// all the dynamic content
-// ---------------------------------------------------------------------------
-//
-CAiSatNotifier::~CAiSatNotifier()
- {
- TFLOGSTRING( "CAiSatNotifier::~CAiSatNotifier calling" )
-
- // Cancel any outstanding requests
- Cancel();
- delete iString;
-
- TFLOGSTRING( "CAiSatNotifier::~CAiSatNotifier exits" )
- }
-
-// ---------------------------------------------------------------------------
-// Starts the handler
-// ---------------------------------------------------------------------------
-//
-TInt CAiSatNotifier::Start()
- {
- TFLOGSTRING( "CAiSatNotifier::Start calling" )
-
- TInt error( KErrNotReady );
- if ( !IsActive() )
- {
- error = iSatService.NotifySetupIdleModeTextChange( iStatus );
- TFLOGSTRING2( "CAiSatNotifier::Start error %i", error )
- if ( KErrNone == error )
- {
- // Set to active so that requests can be received
- SetActive();
- }
- }
-
- TFLOGSTRING( "CAiSatNotifier::Start exits" )
- return error;
- }
-
-// ---------------------------------------------------------------------------
-// Get the idle mode data to member: string, icon qualifier, icon id.
-// ---------------------------------------------------------------------------
-//
-TBool CAiSatNotifier::HasContent()
- {
- TFLOGSTRING( "CAiSatNotifier::HasContent calling" )
- TBool ret( EFalse );
- if ( ( iString && iString->Length() ) ||
- RSatService::ESatIconNoIcon != iIconQualifier )
- {
- TFLOGSTRING( "CAiSatNotifier::HasContent ETrue" )
- ret = ETrue;
- }
- TFLOGSTRING( "CAiSatNotifier::HasContent exits" )
- return ret;
- }
-
-// ---------------------------------------------------------------------------
-// Get the idle mode data to member: string, icon qualifier, icon id.
-// ---------------------------------------------------------------------------
-//
-void CAiSatNotifier::GetIdleModeDataL( TBool& aDupIcon, TBool& aDupText )
- {
- TFLOGSTRING( "CAiSatNotifier::GetIdleModeData calling" )
- HBufC* string( NULL );
- TUint8 recordId( NULL );
- RSatService::TSatIconQualifier iconQualifier(
- RSatService::ESatIconNoIcon );
-
- // Get setup idle mode text, icon qualifier and record id.
- iSatService.GetSetupIdleModeTextL( string, iconQualifier, recordId );
-
- // If the icon is self explanatory, NULL the string.
- if ( string && RSatService::ESatIconSelfExplanatory == iconQualifier )
- {
- TPtr ptr( string->Des() );
- ptr.Copy( KNullDesC );
- }
-
- // Check if the icon or text is the same as previous one.
- if ( iFirstStartup )
- {
- aDupIcon = EFalse;
- aDupText = EFalse;
- iFirstStartup = EFalse;
- }
- else
- {
- // Check if setup idle mode icon is changed.
- aDupIcon = ( iRecordId == recordId );
-
- // Check if setup idle mode text is changed.
- // If both of the iString and string are NULL, it is duplicated.
- // If both of the iString and string are not NULL, and they have
- // the same content, it is duplicated.
- // Otherwise, it is not duplicated.
-
- aDupText = ( ( ( !iString || !iString->Length() ) &&
- ( !string || !string->Length() ) ) ||
- ( iString && string &&
- *iString == string->Des() ) );
- }
-
- // Save the setup idle mode text, icon qulifier
- // and record id to member params.
- delete iString;
- iString = NULL;
- if ( string )
- {
- CleanupStack::PushL( string );
- iString = HBufC::NewL( string->Size() );
- TPtr ptr( iString->Des() );
- ptr.Copy( string->Des() );
- CleanupStack::PopAndDestroy( string );
- }
-
- iIconQualifier = iconQualifier;
-
- iRecordId = recordId;
-
- TFLOGSTRING( "CAiSatNotifier::GetIdleModeData exits" )
- }
-
-// ---------------------------------------------------------------------------
-// Handles the Idle Text string command
-// ---------------------------------------------------------------------------
-//
-void CAiSatNotifier::GetIdleTextString( TPtrC& aString )
- {
- TFLOGSTRING( "CAiSatNotifier::GetIdleTextString calling" )
-
- if ( iString )
- {
- TFLOGSTRING2( "CAiSatNotifier::IdleTextStringL exits, \
- length of string: %i", iString->Length() )
- aString.Set( iString->Des() );
- }
- else
- {
- aString.Set( KNullDesC );
- }
- TFLOGSTRING( "CAiSatNotifier::GetIdleTextString exits" )
- }
-
-
-// ---------------------------------------------------------------------------
-// Handles the Idle Icon command.
-// ---------------------------------------------------------------------------
-//
-TUint8 CAiSatNotifier::IdleIconId()
- {
- TFLOGSTRING( "CAiSatNotifier::IdleIconId calling" )
-
- TFLOGSTRING2( "CAiSatNotifier::IdleIconId exits, id: %i", iRecordId )
-
- return iRecordId;
- }
-
-// ---------------------------------------------------------------------------
-// Handles the Idle Icon Qulifier command.
-// ---------------------------------------------------------------------------
-//
-RSatService::TSatIconQualifier CAiSatNotifier::IdleIconQualifier()
- {
- TFLOGSTRING( "CAiSatNotifier::IdleIconQualifier calling" )
-
- TFLOGSTRING2( "CAiSatNotifier::IdleIconQualifier exits, \
- iconQualifier: %d", iIconQualifier )
-
- return iIconQualifier;
- }
-
-// ---------------------------------------------------------------------------
-// Handles the Plugin's NotifyContentUpdate command.
-// ---------------------------------------------------------------------------
-//
-void CAiSatNotifier::RunL()
- {
- TFLOGSTRING( "CAiSatNotifier::RunL calling" )
-
- // Notify the plugin about the event through the MPluginAPI interface
- if ( KErrNone == iStatus.Int() )
- {
- // Notify plugin when the content update.
- // The plugin should get data again.
- iPlugin.NotifyContentUpdate();
- }
- if ( !IsActive() )
- {
- Activate();
- }
- TFLOGSTRING( "CAiSatNotifier::RunL exits" )
-
- }
-
-// ---------------------------------------------------------------------------
-// Cancels the pending request
-// ---------------------------------------------------------------------------
-//
-void CAiSatNotifier::DoCancel()
- {
- TFLOGSTRING( "CAiSatNotifier::DoCancel calling" )
-
- iSatService.NotifySetupIdleModeTextChangeCancel();
-
- TFLOGSTRING( "CAiSatNotifier::DoCancel exits" )
- }
-
-// ---------------------------------------------------------------------------
-// Default constructor
-// ---------------------------------------------------------------------------
-//
-CAiSatNotifier::CAiSatNotifier( MPluginAPI& aPlugin,
- RSatService& aSatService ):
- CActive( EPriorityStandard ),
- iString( NULL ),
- iRecordId( 0 ),
- iIconQualifier( RSatService::ESatIconNoIcon ),
- iPlugin( aPlugin ),
- iSatService( aSatService ),
- iFirstStartup( ETrue )
- {
- TFLOGSTRING( "CAiSatNotifier::CAiSatNotifier calling" )
-
- // Add to active scheduler
- CActiveScheduler::Add( this );
-
- TFLOGSTRING( "CAiSatNotifier::CAiSatNotifier exits" )
- }
-
-// ---------------------------------------------------------------------------
-// Continues listening to the Sat command
-// ---------------------------------------------------------------------------
-//
-void CAiSatNotifier::Activate()
- {
- TFLOGSTRING( "CAiSatNotifier:Activate() calling" )
-
- Cancel();
- TInt error = iSatService.NotifySetupIdleModeTextChange( iStatus );
- TFLOGSTRING2( "CAiSatNotifier::Activate error: %i", error )
- if ( KErrNone == error )
- {
- SetActive();
- }
- TFLOGSTRING( "CAiSatNotifier:Activate() exits" )
- }
--- a/satui/satplugin/aisatpluginsrc/caisatplugin.cpp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,548 +0,0 @@
-/*
-* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: SAT Active Idle publisher
-*
-*/
-
-
-#include <ecom/ecom.h>
-#include <ecom/implementationproxy.h>
-#include <aicontentobserver.h>
-#include <aiutility.h>
-#include <aipluginsettings.h>
-#include <flogger.h>
-#include <AknUtils.h>
-#include <gulicon.h> // For CGulIcon
-#include <fbs.h> // For CFbsBitmap
-#include <SATInternalPSKeys.h>
-
-#include "aisatcontentmodel.h"
-#include "caisatplugin.h"
-#include "caisatengine.h"
-#include "tflogger.h"
-
-const TImplementationProxy KImplementationTable[] =
- {
- //lint -e{611,1924} Warning "Suspicious cast" can not be avoided.
- IMPLEMENTATION_PROXY_ENTRY( KImplUidSatPlugin, CAiSatPlugin::NewL )
- };
-
-// static cleanup function
-static void TransactionCleanup( TAny* aAny )
- {
- static_cast<MAiContentObserver*>( aAny )->
- CancelTransaction( KImplUidSatPlugin );
- }
-
-// ============================ MEMBER FUNCTIONS =============================
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave
-// ---------------------------------------------------------------------------
-//
-CAiSatPlugin* CAiSatPlugin::NewL()
- {
- TFLOGSTRING( "CAiSatPlugin::NewL() starts" )
-
- CAiSatPlugin* self = new ( ELeave ) CAiSatPlugin;
- CleanupStack::PushL( self );
- self->ConstructL();
- CleanupStack::Pop( self );
-
- TFLOGSTRING( "CAiSatPlugin::NewL() exits" )
- return self;
- }
-
-// ---------------------------------------------------------------------------
-// Destructor
-// Deletes all data created to heap
-// ---------------------------------------------------------------------------
-//
-CAiSatPlugin::~CAiSatPlugin()
- {
- TFLOGSTRING( "CAiSatPlugin::~CAiSatPlugin() starts" )
-
- Release( iContent );
- iContent = NULL;
-
- Release( iResources );
- iResources = NULL;
-
- Release( iEvents );
- iEvents = NULL;
-
- delete iEngine;
- iEngine = NULL;
-
- iObservers.Close();
-
- TFLOGSTRING( "CAiSatPlugin::~CAiSatPlugin() exits" )
- }
-
-// ---------------------------------------------------------------------------
-// Publish a icon to the idle area.
-// ---------------------------------------------------------------------------
-//
-TInt CAiSatPlugin::PublishIcon(
- MAiContentObserver& aObserver,
- CGulIcon* aIcon )
- {
- TFLOGSTRING( "CAiSatPlugin::PublishIcon() starts" )
-
- TInt error( KErrNotSupported );
-
- // Check whether the icon can be published or not.
- if ( aIcon && aObserver.CanPublish( *this, KSatContent[ESatContentIcon].id,
- ESatContentIcon ) )
- {
- // If the icon can be published, and then publish it.
- error = aObserver.Publish( *this, KSatContent[ESatContentIcon].id,
- TPckgC<TAny*>( aIcon ), ESatContentIcon );
- }
-
- TFLOGSTRING2( "CAiSatPlugin::PublishIcon() exits, error: %d", error )
-
- return error;
- }
-
-// ---------------------------------------------------------------------------
-// Clean idle area icon
-// ---------------------------------------------------------------------------
-//
-TInt CAiSatPlugin::CleanIcon( MAiContentObserver& aObserver )
- {
- TFLOGSTRING( "CAiSatPlugin::CleanIcon() starts" )
- TInt error( KErrNotSupported );
-
- error = aObserver.Clean( *this, KSatContent[ESatContentIcon].id,
- ESatContentIcon );
-
- TFLOGSTRING2( "CAiSatPlugin::CleanIcon() exits, error %d", error )
- return error;
- }
-
-// ---------------------------------------------------------------------------
-// Publish a SetUpIdleModeText string.
-// ---------------------------------------------------------------------------
-//
-TInt CAiSatPlugin::PublishText( MAiContentObserver& aObserver,
- const TDesC& aText )
- {
- TFLOGSTRING( "CAiSatPlugin::PublishText() starts" )
- TFLOGSTRING2( "CAiSatPlugin::PublishText() length %i", aText.Length() )
-
- TInt error( KErrNotSupported );
-
- // Check whether the SetUpIdleModeText string can be published or not
- if ( aText.Length() &&
- aObserver.CanPublish( *this, KSatContent[ESatContentText].id,
- ESatContentText ) )
- {
- // If SetUpIdleModeText can be published, and then publish it.
- error = aObserver.Publish( *this, KSatContent[ESatContentText].id,
- aText, ESatContentText );
- }
- TFLOGSTRING2( "CAiSatPlugin::PublishText() exits, error: \
- %d", error )
-
- return error;
- }
-
-// ---------------------------------------------------------------------------
-// Clean idle area text
-// ---------------------------------------------------------------------------
-//
-TInt CAiSatPlugin::CleanText( MAiContentObserver& aObserver )
- {
- TFLOGSTRING( "CAiSatPlugin::CleanText() starts" )
- TInt error( KErrNotSupported );
-
- error = aObserver.Clean( *this, KSatContent[ESatContentText].id,
- ESatContentText );
-
- TFLOGSTRING2( "CAiSatPlugin::CleanText() exits, error %d", error )
-
- return error;
- }
-
-// ---------------------------------------------------------------------------
-// Publishes the SAT Set Up Idle Mode Text and or Icon
-// ---------------------------------------------------------------------------
-//
-void CAiSatPlugin::PublishSatL()
- {
- TFLOGSTRING( "CAiSatPlugin::PublishSatL() starts" )
-
- TInt error( KErrNone );
- TInt iconError( KErrNone );
- TInt textError( KErrNone );
- TInt observers( iObservers.Count() );
- TInt transactionId( KImplUidSatPlugin );
- MAiContentObserver* observer( NULL );
- CGulIcon* icon( NULL ); // The icon for publishing.
- TInt i( 0 );
- TBool commitNeeded( EFalse );
-
- // Publish sat data to all observers.
- TFLOGSTRING2( "CAiSatPlugin::PublishSatL() observer count: %i", observers )
- for ( i = 0; i < observers; i++ )
- {
- commitNeeded = EFalse;
- observer = iObservers[i];
- TFLOGSTRING2( "CAiSatPlugin::PublishSatL() observer id: %i", observer )
-
- // Start publish transaciton.
- error = observer->StartTransaction( transactionId );
- TCleanupItem item( TransactionCleanup, observer );
- CleanupStack::PushL( item );
-
- // Publish icon and text to idle mode area.
- iEngine->ContentIconL( icon );
- TPtrC text( KNullDesC );
- iEngine->ContentText( text );
- if ( !icon && !text.Length() ) // Nothing
- {
- if ( !iDupIcon )
- {
- error = CleanIcon( *observer );
- commitNeeded = ETrue;
- }
- if ( !iDupText )
- {
- error = CleanText( *observer );
- commitNeeded = ETrue;
- }
- }
- else if ( icon && !text.Length() ) // Icon only
- {
- if ( !iDupIcon )
- {
- error = CleanIcon( *observer );
- iconError = PublishIcon( *observer, icon );
- commitNeeded = ETrue;
- }
- if ( !iDupText )
- {
- error = CleanText( *observer );
- commitNeeded = ETrue;
- }
- }
- else if ( !icon && text.Length() ) // Text only
- {
- if ( !iDupIcon )
- {
- error = CleanIcon( *observer );
- commitNeeded = ETrue;
- }
- if ( !iDupText )
- {
- error = CleanText( *observer );
- textError = PublishText( *observer, text );
- commitNeeded = ETrue;
- }
- }
- else // Text and icon
- {
- if ( !iDupIcon )
- {
- error = CleanIcon( *observer );
- iconError = PublishIcon( *observer, icon );
- commitNeeded = ETrue;
- }
- if ( !iDupText )
- {
- error = CleanText( *observer );
- textError = PublishText( *observer, text );
- commitNeeded = ETrue;
- }
- }
-
- // Commit the publishing of the icon and text.
- if ( !textError && !iconError && commitNeeded )
- {
- TFLOGSTRING( "CAiSatPlugin::PublishSatL() commit transaction" )
- error = observer->Commit( transactionId );
- }
- else
- {
- TFLOGSTRING( "CAiSatPlugin::PublishSatL() cancel transaction" )
- error = observer->CancelTransaction( transactionId );
- }
- CleanupStack::Pop();
- }
-
- TFLOGSTRING( "CAiSatPlugin::PublishSatL() exits" )
- }
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is requested to unload its engines due backup operation
-// ---------------------------------------------------------------------------
-//
-void CAiSatPlugin::Stop( TAiTransitionReason /* aReason */ )
- {
- TFLOGSTRING( "CAiSatPlugin::Stop starts - exits" )
- }
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is instructed that it is allowed to consume CPU resources
-// ---------------------------------------------------------------------------
-//
-void CAiSatPlugin::Resume( TAiTransitionReason aReason )
- {
- TFLOGSTRING2( "CAiSatPlugin::Resume reason %d", aReason )
-
- if ( EAiIdleForeground == aReason && !iEngine )
- {
- TRAP_IGNORE( iEngine = CAiSatEngine::NewL( *this ) )
- }
-
- // If we change the Home Screen Theme we will got a EAiSystemStartup as
- // aReason.
- else if ( ( EAiGeneralThemeChanged == aReason ||
- EAiSystemStartup == aReason ) &&
- iEngine )
- {
- TRAP_IGNORE( UpdateSatL() )
- }
-
- TFLOGSTRING( "CAiSatPlugin::Resume() exits" )
- }
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-in is instructed that it is not allowed to consume CPU resources
-// ---------------------------------------------------------------------------
-//
-void CAiSatPlugin::Suspend( TAiTransitionReason /* aReason */ )
- {
- TFLOGSTRING( "CAiSatPlugin::Suspend starts - exits" )
- }
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// The plug-in MUST maintain a registry of subscribers and send
-// notification to all of them whenever the state changes or new content
-// is available
-// ---------------------------------------------------------------------------
-//
-void CAiSatPlugin::SubscribeL( MAiContentObserver& aObserver )
- {
- TFLOGSTRING( "CAiSatPlugin::SubscribeL() starts" )
-
- iObservers.AppendL( &aObserver );
-
- TFLOGSTRING( "CAiSatPlugin::SubscribeL() exits" )
- }
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Plug-ins take ownership of the settings array, so it must either
-// store it in a member or free it.
-// ---------------------------------------------------------------------------
-//
-void CAiSatPlugin::ConfigureL( RAiSettingsItemArray& aSettings )
- {
- TFLOGSTRING( "CAiSatPlugin::ConfigureL() starts" )
-
- TInt count = aSettings.Count();
- TFLOGSTRING2( "CAiSatPlugin::ConfigureL count: %d", count )
- if ( count > 0 )
- {
- TInt i( 0 );
- for ( i = 0; i < count; i++ )
- {
- MAiPluginSettings* settings = aSettings[i];
- MAiPluginSettingsItem& item = settings->AiPluginSettingsItem();
- item.SetValueL( item.Value(), EFalse );
- }
- TFLOGSTRING2( "CAiSatPlugin::ConfigureL i: %d", i )
- }
-
- TFLOGSTRING( "CAiSatPlugin::ConfigureL() exits" )
- }
-
-// ---------------------------------------------------------------------------
-// From class CAiContentPublisher
-// Returns the extension interface. Actual type depends on the passed
-// aUid argument.
-// ---------------------------------------------------------------------------
-//
-TAny* CAiSatPlugin::Extension( TUid aUid )
- {
- TFLOGSTRING( "CAiSatPlugin::Extension() starts" )
-
- MAiPropertyExtension* extension = NULL;
-
- if ( KExtensionUidProperty == aUid )
- {
- extension = static_cast<MAiPropertyExtension*>( this );
- }
-
- TFLOGSTRING( "CAiSatPlugin::Extension() exits" )
- return extension;
- }
-
-// ---------------------------------------------------------------------------
-// From class MAiPropertyExtension
-// Read property of publisher plug-in.
-// ---------------------------------------------------------------------------
-//
-TAny* CAiSatPlugin::GetPropertyL( TInt aProperty )
- {
- TFLOGSTRING( "CAiSatPlugin::GetPropertyL() starts" )
-
- TAny* property = NULL;
- TFLOGSTRING2( "CAiSatPlugin::GetPropertyL aProperty: %d", aProperty )
- switch ( aProperty )
- {
- case EAiPublisherInfo:
- {
- property = static_cast<TAiPublisherInfo*>( &iInfo );
- break;
- }
-
- case EAiPublisherContent:
- {
- property = static_cast<MAiContentItemIterator*>( iContent );
- break;
- }
-
- case EAiPublisherResources:
- {
- property = static_cast<MAiContentItemIterator*>( iResources );
- break;
- }
-
- case EAiPublisherEvents:
- {
- property = static_cast<MAiContentItemIterator*>( iEvents );
- break;
- }
- default:
- break;
- }
-
- TFLOGSTRING( "CAiSatPlugin::GetPropertyL() exits" )
-
- return property;
- }
-
-// ---------------------------------------------------------------------------
-// From class MAiPropertyExtension
-// Write property value to optimize the content model.
-// ---------------------------------------------------------------------------
-//
-void CAiSatPlugin::SetPropertyL( TInt aProperty, TAny* aValue )
- {
- TFLOGSTRING( "CAiSatPlugin::SetPropertyL() starts" )
-
- if ( EAiPublisherInfo == aProperty )
- {
- TFLOGSTRING( "CAiSatPlugin::SetPropertyL() EAiPublisherInfo" )
- const TAiPublisherInfo* info =
- static_cast<const TAiPublisherInfo*>( aValue );
- if ( info )
- {
- iInfo = *info;
- }
- }
-
- TFLOGSTRING( "CAiSatPlugin::SetPropertyL() exits" )
- }
-
-// ---------------------------------------------------------
-// This method is called from the engine, when the P&S
-// data content has been changed. Method call is made through
-// the MPluginAPI interface.
-// ---------------------------------------------------------
-//
-void CAiSatPlugin::NotifyContentUpdate()
- {
- TFLOGSTRING( "CAiSatPlugin::NotifyContentUpdate() starts" )
-
- if ( iEngine )
- {
- // Get the idle mode data first.
- TRAP_IGNORE( iEngine->PrepareIdleModeDataL( iDupIcon, iDupText ) );
-
- // Send response to client side
- TRAP_IGNORE( iEngine->HandleNotifyL() );
-
- // Publish set up idle mode data
- TRAP_IGNORE( PublishSatL() );
- }
-
- TFLOGSTRING( "CAiSatPlugin::NotifyContentUpdate() exits" )
- }
-
-// ---------------------------------------------------------------------------
-// Default constructor
-// ---------------------------------------------------------------------------
-//
-CAiSatPlugin::CAiSatPlugin()
- {
- TFLOGSTRING( "CAiSatPlugin::CAiSatPlugin() starts-exits" )
- }
-
-// ---------------------------------------------------------------------------
-// Symbian 2nd phase constructor can leave
-// ---------------------------------------------------------------------------
-//
-void CAiSatPlugin::ConstructL()
- {
- TFLOGSTRING( "CAiSatPlugin::ConstructL() starts" )
-
- _LIT(KSatName, "SAT");
-
- iInfo.iUid.iUid = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SATPLUGIN;
- iInfo.iName.Copy( KSatName );
-
- iContent = AiUtility::CreateContentItemArrayIteratorL( KSatContent );
- iResources = AiUtility::CreateContentItemArrayIteratorL( KSatResources );
- iEvents = AiUtility::CreateContentItemArrayIteratorL( KSatEvents );
-
- iEngine = CAiSatEngine::NewL( *this );
-
- TFLOGSTRING( "CAiSatPlugin::ConstructL() exits" )
- }
-
-// ---------------------------------------------------------------------------
-// Update idle area when plug in reload.
-// ---------------------------------------------------------------------------
-//
-void CAiSatPlugin::UpdateSatL()
- {
- TFLOGSTRING( "CAiSatPlugin::UpdateSatL() starts" )
- iEngine->PrepareIdleModeDataL( iDupIcon, iDupText );
- PublishSatL();
- TFLOGSTRING( "CAiSatPlugin::UpdateSatL() exits" )
- }
-
-// ============================ GLOBAL FUNCTIONS =============================
-
-// ---------------------------------------------------------------------------
-// Constructs and returns an application object.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C const TImplementationProxy* ImplementationGroupProxy(
- TInt& aTableCount )
- {
- TFLOGSTRING( "CAiSatPlugin::ImplementationGroupProxy() starts-exits" )
- aTableCount =
- sizeof( KImplementationTable ) / sizeof( TImplementationProxy );
-
- return KImplementationTable;
- }
Binary file satui/satplugin/data/SatPlugin_Stub.SIS has changed
--- a/satui/satplugin/data/aisatplugin.rss Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Registry info
- *
-*/
-
-
-// INCLUDES
-#include <ecom/registryinfov2.rh>
-#include "../aisatplugininc/aisatpluginuids.hrh"
-
-/**
- * Ecom interface uid for CAiContentPublisher.
- */
-
-
-// RESOURCE DEFINITIONS
-// -----------------------------------------------------------------------------
-//
-// registry_info
-// Registry information required for identifying the ECOM component
-//
-// -----------------------------------------------------------------------------
-//
-
-RESOURCE REGISTRY_INFO registry_info
-{
- resource_format_version = RESOURCE_FORMAT_VERSION_2;
-
- // UID for the DLL
- dll_uid = AI_UID_ECOM_DLL_CONTENTPUBLISHER_SATPLUGIN; // SAT plugin UID
-
- // Declare array of interface info
- interfaces =
- {
- INTERFACE_INFO
- {
- // UID of interface that is implemented
- interface_uid = AI_UID_ECOM_INTERFACE_CONTENTPUBLISHER;
-
- implementations =
- {
- IMPLEMENTATION_INFO
- {
- implementation_uid = AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_SATPLUGIN;
- version_no = 1;
- display_name = "";
- default_data = "";
- opaque_data = "";
- }
- };
- }
- };
-}
-
-
-// End of File
--- a/satui/satplugin/group/SatPlugin_stub.pkg Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-;
-; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-; All rights reserved.
-; This component and the accompanying materials are made available
-; under the terms of "Eclipse Public License v1.0"
-; which accompanies this distribution, and is available
-; at the URL "http://www.eclipse.org/legal/epl-v10.html".
-;
-; Initial Contributors:
-; Nokia Corporation - initial contribution.
-;
-; Contributors:
-;
-; Description: For packing aisatplugin stub.
-;
-; Languages
-&EN
-
-; Header
-#{"aisatplugin"}, (0x102078EA), 1, 0, 0, TYPE=SA
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
-
-; Files
-""-"z:\sys\bin\aisatplugin.dll"
\ No newline at end of file
--- a/satui/satplugin/group/aisatplugin.mmp Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +0,0 @@
-/*
-* Copyright (c) 2006-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: Project definition file for project SatPlugin
-*
-*/
-
-
-// USED FOR RESOURCE
-#include <data_caging_paths.hrh>
-#include <platform_paths.hrh>
-#include "../aisatplugininc/aisatpluginuids.hrh"
-
-TARGET aisatplugin.dll
-
-TARGETTYPE PLUGIN
-
-// Nokia's Vendor ID
-VENDORID VID_DEFAULT
-// Capability assignment
-CAPABILITY CAP_ECOM_PLUGIN
-
-// ECom Dll recognition UID followed by the unique UID for this dll
-UID 0x10009D8D AI_UID_ECOM_DLL_CONTENTPUBLISHER_SATPLUGIN
-
-SOURCEPATH ../aisatpluginsrc
-SOURCE caisatplugin.cpp
-SOURCE caisatengine.cpp
-SOURCE caisatnotifier.cpp
-
-USERINCLUDE ../aisatplugininc
-
-APP_LAYER_SYSTEMINCLUDE // Temp fix for Symbian foundation structure change.
-SYSTEMINCLUDE ../../../inc // Domain telephony
-SYSTEMINCLUDE ../../inc // Subsystem satui
-
-TARGETPATH ECOM_RESOURCE_DIR
-
-SOURCEPATH ../data
-START RESOURCE aisatplugin.rss
-TARGET aisatplugin.rsc
-END
-
-// Symbian OS general
-LIBRARY euser.lib
-LIBRARY ECom.lib
-LIBRARY fbscli.lib
-LIBRARY flogger.lib
-LIBRARY bitgdi.lib
-LIBRARY Gdi.lib
-LIBRARY bafl.lib
-LIBRARY CentralRepository.lib
-LIBRARY CenRepNotifHandler.lib
-LIBRARY satclient.lib
-LIBRARY aiutils.lib
-LIBRARY egul.lib // CGulIcon
--- a/satui/satplugin/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
-* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: The build information file of SatPlug-in
-*
-*/
-
-
-#include <platform_paths.hrh>
-
-PRJ_EXPORTS
-../data/SatPlugin_Stub.SIS /epoc32/data/z/system/install/SatPlugin_stub.sis
-../rom/aisatplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH( aisatplugin.iby )
-
-PRJ_PLATFORMS
-DEFAULT
-
-PRJ_MMPFILES
- ./aisatplugin.mmp
-
-PRJ_TESTMMPFILES
-
--- a/satui/satplugin/rom/aisatplugin.iby Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-/*
-* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: IBY file for SAT plug-in
-*
-*/
-
-
-#ifndef AISATPLUGIN_IBY
-#define AISATPLUGIN_IBY
-#include <bldvariant.hrh>
-
-ECOM_PLUGIN(aisatplugin.dll, aisatplugin.rsc)
-
-// SAT Stub SIS
-data=ZSYSTEM\install\SatPlugin_stub.sis System\Install\SatPlugin_stub.sis
-
-#endif // AISATPLUGIN_IBY
-
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satshellcontroller/bwins/SATSHELLCNTRLU.DEF Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,3 @@
+EXPORTS
+ ?NewSatController@@YAPAVMSatShellController@@XZ @ 1 NONAME ; class MSatShellController * __cdecl NewSatController(void)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satshellcontroller/eabi/SatShellCntrlU.DEF Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,5 @@
+EXPORTS
+ _Z16NewSatControllerv @ 1 NONAME
+ _ZTI19CSatShellController @ 2 NONAME ; #<TI>#
+ _ZTV19CSatShellController @ 3 NONAME ; #<VT>#
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satshellcontroller/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Build information file for project SATUI
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_MMPFILES
+./satshellcntrl.mmp
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satshellcontroller/group/satshellcntrl.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,45 @@
+/*
+* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: SatShellCntrl mmp- file
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+TARGET satshellcntrl.dll
+TARGETTYPE dll
+UID 0x1000008D 0x1000A835
+SECUREID 0x1000A835
+
+CAPABILITY CAP_GENERAL_DLL
+VENDORID VID_DEFAULT
+
+SOURCEPATH ../src
+SOURCE csatshellcontroller.cpp
+
+USERINCLUDE ../inc
+
+// Application layer system include is needed due MenuSatInterface provided by AppShell
+APP_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE ../../../inc // Domain telephony
+
+LIBRARY euser.lib
+LIBRARY apparc.lib // RApaLsSession
+LIBRARY apgrfx.lib // CApaCommandLine
+LIBRARY ws32.lib // RWsSession
+LIBRARY menuinterface.lib
+LIBRARY flogger.lib
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satshellcontroller/inc/csatshellcontroller.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,189 @@
+/*
+* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* This file contains the SAT Shell Controller class that is responsible
+* for the actual implementation of the following functionality:
+* - add SAT UI application to Desk (or similar)
+* - remove SAT UI application from Desk (or similar)
+* - bring SAT UI application to foreground if it already is up
+* and running
+* - launching the SAT UI application
+* - launching the Browser
+* - resolving default access point
+* - bring Browser to the foreground
+*
+*
+*/
+
+
+#ifndef CSATSHELLCONTROLLER_H
+#define CSATSHELLCONTROLLER_H
+
+// INCLUDES
+#include <e32base.h>
+#include <MSatShellController.h>
+
+// CONSTS
+const TInt KSatAppNameSize = 255; //Context pane max
+
+// CLASS DECLARATION
+
+// DESCRIPTION
+// This class is used to control adding, removing and launching of
+// the SAT UI Client application. It connects to appropriate module
+// and is used by the SAT Server.
+
+class CSatShellController : public CBase,
+ public MSatShellController
+ {
+ public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ */
+ static CSatShellController* NewL();
+
+ /**
+ * Destructor.
+ */
+ virtual ~CSatShellController();
+
+ public: // New functions
+
+ /**
+ * Adds SAT UI Client to the Application Shell (or similar).
+ * @param aName Name of the entry
+ * @param aUid UID of the SAT UI Application
+ * @return Nothing
+ */
+ void AddSatUiL( TDesC& aName );
+
+ /**
+ * Adds SAT UI Client to the Application Shell (or similar).
+ * @param aName Name of the entry
+ * @param aIconId Id for icons
+ * @return Nothing
+ */
+ void AddSatUiL( TDesC& aName, TUint8 aIconId );
+
+ /**
+ * Removes SAT UI Client from the Application Shell (or similar).
+ * @param aUid UID of the SAT UI Application
+ * @return Nothing
+ */
+ void RemoveSatUiL();
+
+ /**
+ * Launches the SAT UI Client.
+ * @param aUid UID of the SAT UI Application
+ * @return Nothing
+ */
+ void LaunchSatUiL();
+
+ /**
+ * Brings Browser to foreground after period of time.
+ * @param Nothing
+ * @return Nothing
+ */
+ void BringBrowserToForegroundAfterPeriod();
+
+ /**
+ * Bring the SAT UI Application to foreground.
+ * @param Nothing
+ * @return Nothing
+ */
+ void BringSatUiToForeground();
+
+ /**
+ * Sets SAT UI Application to background if needed.
+ */
+ void SetSatUiToBackground() const;
+
+ /**
+ * Launch XHTML-browser
+ * @param aUrl URL to be opened when launching browser
+ * @param aAccessPointUid ID number of access point in CommDb
+ * @return The result of the operation
+ */
+ TInt LaunchBrowserL( const TDesC& aUrl, TUid aAccessPointUid );
+
+ /**
+ * Resolves Browsers default accesspoint, if any available.
+ * @return Accesspoint identifier.
+ */
+ TInt ResolveDefaultAccesspoint();
+
+ /**
+ * This callback function is used to call Browser to the foreground
+ * after short while.
+ * @param aObject Pointer to caller is passed to callback function.
+ * @return Callback function should return TInt.
+ */
+ static TInt TimerCompleted( TAny* aObject );
+
+ private:
+
+ /**
+ * C++ default constructor.
+ */
+ CSatShellController();
+
+ /**
+ * By default constructor is private.
+ */
+ void ConstructL();
+
+ /**
+ * Bring the SAT UI Application to foreground.
+ * @param aAppUid The UID value of application.
+ * @return Nothing
+ */
+ void BringApplicationToForeground( const TUid& aAppUid ) const;
+
+ /**
+ * Brings Browser to foreground.
+ * @param Nothing
+ * @return Nothing
+ */
+ void BringBrowserToForeground() const;
+
+ /**
+ * Checks if Browser is not foreground and starts that if needed.
+ * @param Nothing
+ * @return Nothing
+ */
+ void CycleSatUiBackwards();
+
+ /**
+ * Check if SatUi is needed to set to background.
+ * @param Nothing
+ * @return Nothing
+ */
+ void CheckSatUiStatus();
+
+ private: // Data
+
+ TBufC<KSatAppNameSize> iSimAppName;
+ TUid iUidWmlBrowser;
+ RWsSession iWsSession;
+ RApaLsSession iApaLsSession;
+ // Timer for checking Browser start.
+ CPeriodic* iTimer;
+ TBool iSetSatUiToBackground;
+
+ };
+
+#endif // CSATSHELLCONTROLLER_H
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satshellcontroller/inc/tflogger.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,104 @@
+/*
+* Copyright (c) 2002-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Defines logging macroes
+*
+*/
+
+
+#ifndef __TFLOGGER_H__
+#define __TFLOGGER_H__
+
+#include <flogger.h>
+#include <e32svr.h>
+
+_LIT( KTfLogFolder, "sat" );
+_LIT( KTfLogFile, "sat.txt" );
+
+/**
+* ------------------------------------------------------------------------------
+*
+* Remove #define LOGGING_ENABLED from comments to enable logging
+*
+* ------------------------------------------------------------------------------
+*/
+
+//#define LOGGING_ENABLED
+
+/**
+* ------------------------------------------------------------------------------
+*
+* LOGGING MACROs
+*
+* USE THESE MACROS IN YOUR CODE
+*
+* Example: TFLOGTEXT( own_desc )
+* Example: TFLOGSTRING( "Test" )
+* Example: TFLOGSTRING( "Test %i", aValue )
+* Example: TFLOGSTRING( "Test %i %i", aValue1, aValue2 )
+*
+* ------------------------------------------------------------------------------
+*/
+
+#ifdef LOGGING_ENABLED
+
+ #define TFLOGTEXT( TEXT ) \
+ { \
+ RFileLogger::Write( KTfLogFolder,KTfLogFile, \
+ EFileLoggingModeAppend, TEXT ); \
+ RDebug::Print( TEXT ); \
+ }
+
+ #define TFLOGSTRING( TEXT ) \
+ { \
+ _LIT( tempLogDes, TEXT ); \
+ RFileLogger::Write( \
+ KTfLogFolder, \
+ KTfLogFile, \
+ EFileLoggingModeAppend, \
+ tempLogDes() ); \
+ RDebug::Print( _L( TEXT ) ); \
+ }
+
+ #define TFLOGSTRING2( TEXT, VAR1 ) \
+ { \
+ _LIT( tempLogDes, TEXT ); \
+ RFileLogger::WriteFormat( \
+ KTfLogFolder, \
+ KTfLogFile, \
+ EFileLoggingModeAppend, \
+ TRefByValue<const TDesC>( tempLogDes() ), VAR1 ); \
+ RDebug::Print( _L( TEXT ), VAR1 ); \
+ }
+
+ #define TFLOGSTRING3( TEXT, VAR1, VAR2 ) \
+ { \
+ _LIT( tempLogDes, TEXT ); \
+ RFileLogger::WriteFormat( \
+ KTfLogFolder, \
+ KTfLogFile, \
+ EFileLoggingModeAppend, \
+ TRefByValue<const TDesC>( tempLogDes() ), VAR1, VAR2 ); \
+ RDebug::Print( _L( TEXT ), VAR1, VAR2 ); \
+ }
+
+#else
+
+ #define TFLOGTEXT( TEXT )
+ #define TFLOGSTRING( TEXT )
+ #define TFLOGSTRING2( TEXT, VAR1 )
+ #define TFLOGSTRING3( TEXT, VAR1, VAR2 )
+
+#endif // LOGGING_ENABLED
+
+#endif // __TFLOGGER_H__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/satui/satshellcontroller/src/csatshellcontroller.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,551 @@
+/*
+* Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* This file contains the SAT Shell Controller class that is responsible
+* for the actual implementation of the following functionality:
+* - add SAT UI application to Desk (or similar)
+* - remove SAT UI application from Desk (or similar)
+* - bring SAT UI application to foreground if it already is up
+* and running
+* - launching the SAT UI application
+* - launching the Browser
+* - resolving default access point
+* - bring Browser to the foreground
+*
+*
+*/
+
+
+// INCLUDE FILES
+#include <w32std.h> // RWsSession
+#include <apaid.h> // TApaAppInfo
+#include <apacmdln.h> // CApaCommandLine
+#include <apgcli.h> // RApaLsSession
+#include <apgtask.h> // TApaTaskList
+#include <apgwgnam.h> // CApaWindowGroupName
+#include <MenuSatInterface.h> // CMenuSATInterface
+#include <DocumentHandler.h> // KWmlcHandler
+#include "csatshellcontroller.h"
+
+// Browser Cen Rep Keys.
+#ifdef __SERIES60_NATIVE_BROWSER
+// #include <BrowserUiSDKCRKeys.h> Commented out to allow sat server boot TB10.1
+// #include <BrowserUiInternalCRKeys.h>
+#endif // __SERIES60_NATIVE_BROWSER
+#include "tflogger.h"
+
+// CONSTANTS
+const TUid KUidSatUi = { 0x101f4ce0 };
+_LIT( KFour, "4" ); // Browser parameter.
+_LIT( KFive, "5" ); // Browser parameter.
+_LIT( KSpace, " " ); // Used as Browser parameter.
+static const TUid KEmptyUid = { KErrNotFound };
+static const TUid KUidBrowser = { KWmlcHandler };
+const TInt KTimerTime( 2000000 ); // 2 seconds.
+const TInt KBrowserParamAndTwoSpaces( 3 );
+#ifndef __SERIES60_NATIVE_BROWSER
+ const TUid KCRUidBrowser = { 0x10008D39 };
+ const TUint32 KBrowserDefaultAccessPoint( 0x0000000E );
+#endif // __SERIES60_NATIVE_BROWSER
+
+// ================= MEMBER FUNCTIONS =======================================
+
+// C++ default constructor can NOT contain any code that
+// might leave.
+//
+CSatShellController::CSatShellController():
+ iUidWmlBrowser( TUid::Uid( KWmlcHandler ))
+ {
+ TFLOGSTRING( "CSatShellController::CSatShellController called-exit" )
+ }
+
+// Symbian OS constructor
+void CSatShellController::ConstructL()
+ {
+ TFLOGSTRING( "CSatShellController::ConstructL called" )
+
+ // Timer is used to get the Browser application to the foreground.
+ iTimer = CPeriodic::NewL( EPriorityNormal );
+
+ TFLOGSTRING( "CSatShellController::ConstructL exit" )
+ }
+
+// Two-phased constructor.
+CSatShellController* CSatShellController::NewL()
+ {
+ TFLOGSTRING( "CSatShellController::NewL called" )
+
+ CSatShellController* self = new ( ELeave ) CSatShellController;
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+
+ TFLOGSTRING( "CSatShellController::NewL exit" )
+ return self;
+ }
+
+
+// Destructor
+CSatShellController::~CSatShellController()
+ {
+ TFLOGSTRING( "CSatShellController::~CSatShellController called" )
+
+ // Frees resources.
+ if ( iTimer )
+ {
+ iTimer->Cancel();
+ }
+ delete iTimer;
+
+ TFLOGSTRING( "CSatShellController::~CSatShellController exit" )
+ }
+
+// ---------------------------------------------------------
+// CSatShellController::AddSatUiL
+// Adds SAT UI Client application to phone's
+// Application Shell (or similar).
+// ---------------------------------------------------------
+//
+void CSatShellController::AddSatUiL(
+ TDesC& aName )
+ {
+ TFLOGSTRING( "CSatShellController::AddSatUiL(name) called" )
+
+ iSimAppName = aName;
+
+ CMenuSATInterface* menu = new ( ELeave ) CMenuSATInterface;
+ menu->MakeSatUiVisible( ETrue, aName );
+ delete menu;
+
+ TFLOGSTRING( "CSatShellController::AddSatUiL exit" )
+ }
+
+//------------------------------------------------------------
+// CSatShellController::AddSatUiL
+// Adds SAT UI Client application to phone's
+// Application Shell (or similar).
+// ---------------------------------------------------------
+//
+void CSatShellController::AddSatUiL(
+ TDesC& aName, TUint8 aIconId )
+ {
+ TFLOGSTRING( "CSatShellController::AddSatUiL(name,icon) called" )
+
+ iSimAppName = aName;
+
+ CMenuSATInterface* menu = new ( ELeave ) CMenuSATInterface;
+ menu->MakeSatUiVisible( ETrue, aName, aIconId );
+ delete menu;
+
+ TFLOGSTRING( "CSatShellController::AddSatUiL exit" )
+ }
+
+// ---------------------------------------------------------
+// CSatShellController::RemoveSatUiL
+// Removes SAT UI Client application from phone's
+// Application Shell (or similar).
+// ---------------------------------------------------------
+//
+
+void CSatShellController::RemoveSatUiL()
+ {
+ TFLOGSTRING( "CSatShellController::RemoveSatUiL called" )
+
+ CMenuSATInterface* menu = new ( ELeave ) CMenuSATInterface;
+ menu->MakeSatUiVisible( EFalse, iSimAppName );
+ delete menu;
+
+ TFLOGSTRING( "CSatShellController::RemoveSatUiL exit" )
+ }
+
+// ---------------------------------------------------------
+// CSatShellController::LaunchSatUiL
+// Launches SAT UI Client application.
+// ---------------------------------------------------------
+//
+void CSatShellController::LaunchSatUiL()
+ {
+ TFLOGSTRING( "CSatShellController::LaunchSatUiL called" )
+
+ RApaLsSession rapaLsSession;
+ User::LeaveIfError( rapaLsSession.Connect() );
+ CleanupClosePushL( rapaLsSession );
+ TThreadId id( static_cast<TInt64>( 0 ) );
+ TApaAppInfo appInfo;
+
+ User::LeaveIfError( rapaLsSession.GetAppInfo( appInfo, KUidSatUi ) );
+ CApaCommandLine* cmdLine = CApaCommandLine::NewLC();
+ cmdLine->SetExecutableNameL( appInfo.iFullName );
+ cmdLine->SetCommandL( EApaCommandOpen );
+ rapaLsSession.StartApp( *cmdLine, id );
+
+ CleanupStack::PopAndDestroy( cmdLine );
+ CleanupStack::PopAndDestroy( &rapaLsSession );
+
+ TFLOGSTRING( "CSatShellController::LaunchSatUiL exit" )
+ }
+
+
+// ---------------------------------------------------------
+// CSatShellController::BringBrowserToForeground
+// Brings the Browser to foreground.
+// ---------------------------------------------------------
+//
+void CSatShellController::BringBrowserToForeground() const
+ {
+ TFLOGSTRING( "CSatShellController::BringBrowserToForeground called" )
+
+ BringApplicationToForeground( iUidWmlBrowser );
+
+ TFLOGSTRING( "CSatShellController::BringBrowserToForeground exit" )
+ }
+
+// ---------------------------------------------------------
+// CSatShellController::BringBrowserToForegroundAfterPeriod
+// Brings the Browser to foreground after time has passed.
+// ---------------------------------------------------------
+//
+void CSatShellController::BringBrowserToForegroundAfterPeriod()
+ {
+ TFLOGSTRING(
+ "CSatShellController::BringBrowserToForegroundAfterPeriod called" )
+
+ if ( !iTimer->IsActive() )
+ {
+ TFLOGSTRING(
+ "CSatShellController::BringBrowserToForegroundAfterPeriod \
+ start iTimer" )
+ iTimer->Start( KTimerTime,
+ KTimerTime,
+ TCallBack( TimerCompleted, this ) );
+ }
+
+ TFLOGSTRING(
+ "CSatShellController::BringBrowserToForegroundAfterPeriod exit" )
+ }
+
+// ---------------------------------------------------------
+// CSatShellController::BringSatUiToForeground
+// Brings the SAT UI application to foreground.
+// ---------------------------------------------------------
+//
+void CSatShellController::BringSatUiToForeground()
+ {
+ TFLOGSTRING( "CSatShellController::BringSatUiToForeground called" )
+
+ CheckSatUiStatus();
+ BringApplicationToForeground( KUidSatUi );
+
+ TFLOGSTRING( "CSatShellController::BringSatUiToForeground exit" )
+ }
+
+// ---------------------------------------------------------
+// CSatShellController::BringApplicationToForeground
+// Brings the SAT UI application to foreground.
+// ---------------------------------------------------------
+//
+void CSatShellController::BringApplicationToForeground(
+ const TUid& aAppUid ) const
+ {
+ TFLOGSTRING( "CSatShellController::BringApplicationToForeground called" )
+
+ RWsSession wsSession;
+ // Open the WS server session.
+ if ( KErrNone == wsSession.Connect() )
+ {
+ TFLOGSTRING( "CSatShellController::BringApplicationToForeground \
+ open WS server session" )
+ TApaTaskList tasklist( wsSession );
+ // Find the task with uid
+ TApaTask task = tasklist.FindApp( aAppUid );
+ task.BringToForeground();
+ wsSession.Close();
+ }
+
+ TFLOGSTRING( "CSatShellController::BringApplicationToForeground exit" )
+ }
+
+// ---------------------------------------------------------
+// CSatShellController::SetSatUiToBackground
+// Sets SAT UI Application to background if needed.
+// ---------------------------------------------------------
+//
+void CSatShellController::SetSatUiToBackground() const
+ {
+ TFLOGSTRING( "CSatShellController::SetSatUiToBackground called" )
+
+ if ( iSetSatUiToBackground )
+ {
+ RWsSession wsSession;
+ // Open the WS server session.
+ if ( KErrNone == wsSession.Connect() )
+ {
+ TFLOGSTRING( "CSatShellController::SetSatUiToBackground \
+ open WS server session" )
+ TApaTaskList tasklist( wsSession );
+ // Find the task with uid
+ TApaTask task = tasklist.FindApp( KUidSatUi );
+ task.SendToBackground();
+ wsSession.Close();
+ }
+ }
+
+ TFLOGSTRING( "CSatShellController::SetSatUiToBackground exit" )
+ }
+
+// ---------------------------------------------------------
+// CSatShellController::CycleSatUiBackwards
+// Brings the SAT UI application to foreground.
+// ---------------------------------------------------------
+//
+void CSatShellController::CycleSatUiBackwards()
+ {
+ TFLOGSTRING( "CSatShellController::BringSatUiToForeground called" )
+
+ RWsSession wsSession;
+ // Open the WS server session.
+ if ( KErrNone == wsSession.Connect() )
+ {
+ TFLOGSTRING( "CSatShellController::CycleSatUiBackwards \
+ open WS server session" )
+ TApaTaskList taskList( wsSession );
+ // Finds topmost application.
+ TApaTask task = taskList.FindByPos(0);
+ iTimer->Cancel();
+
+ CApaWindowGroupName* name = 0;
+ TRAPD( err,
+ name = CApaWindowGroupName::NewL( wsSession, task.WgId() ) );
+
+ if ( name )
+ {
+ // Check is that Browser is foremost application.
+ if ( !err && ( name->AppUid() == KUidBrowser ) )
+ {
+ TFLOGSTRING(
+ "CSatShellController::BSUTF Browser is in foreground" )
+ }
+ else
+ {
+ TFLOGSTRING(
+ "CSatShellController::BSUTF Browser isn't in foreground" )
+ TApaTask browserTask = taskList.FindApp( KUidBrowser );
+ browserTask.BringToForeground();
+ iTimer->Start(
+ KTimerTime, KTimerTime, TCallBack( TimerCompleted, this ) );
+ }
+
+ delete name;
+ }
+
+ wsSession.Close();
+ }
+
+ TFLOGSTRING( "CSatShellController::BringSatUiToForeground exit" )
+ }
+
+// ---------------------------------------------------------
+// CSatShellController::TimerCompleted
+// Callback function. Completes after predefined
+// time has passed
+// ---------------------------------------------------------
+//
+TInt CSatShellController::TimerCompleted( TAny* aObject )
+ {
+ TFLOGSTRING( "CSatShellController::TimerCompleted called" )
+
+ if ( aObject )
+ {
+ STATIC_CAST( CSatShellController*, aObject )->CycleSatUiBackwards();
+ }
+
+ TFLOGSTRING( "CSatShellController::TimerCompleted exit" )
+ return KErrNone;
+ }
+
+// ---------------------------------------------------------
+// CSatShellController::LaunchBrowserL
+// Launch XHTML-browser
+// Browser launched with parameter
+// "4" + "<Space>" + "<Url>" + "<Space>" + "<UID of App>" or "5"
+// More information see Browser API Specification Document
+// ---------------------------------------------------------
+//
+TInt CSatShellController::LaunchBrowserL( const TDesC& aUrl,
+ TUid aAccessPointUid )
+ {
+ TFLOGSTRING( "CSatShellController::LaunchBrowserL called" )
+
+ TInt errorCode( KErrNone );
+ HBufC* param = HBufC::NewLC( aUrl.Length() + KMaxUidName +
+ KBrowserParamAndTwoSpaces );
+
+ TFLOGSTRING2( "CSatShellController::LaunchBrowserL length of aUrl: %d", \
+ aUrl.Length() )
+ if ( aUrl.Length() > 0 )
+ {
+ param->Des().Copy( KFour );
+ param->Des().Append( KSpace );
+ param->Des().Append( aUrl );
+ TFLOGSTRING2( "CSatShellController::LaunchBrowserL \
+ aAccessPointUid: %d", aAccessPointUid )
+ // Create script for Browser if not empty accesspoint UID.
+ if ( aAccessPointUid != KEmptyUid )
+ {
+ TFLOGSTRING( "CSatShellController::LaunchBrowserL not empty \
+ accesspoint" )
+ // Uid is in decimal format
+ param->Des().Append( KSpace );
+ param->Des().AppendNum( aAccessPointUid.iUid );
+ }
+
+ }
+ else
+ {
+ param->Des().Copy( KFive );
+ }
+
+ User::LeaveIfError( iWsSession.Connect() );
+
+ TFLOGSTRING2( "CSatShellController::LaunchBrowserL \
+ param string: %S", param )
+ TApaTaskList taskList( iWsSession );
+ TApaTask task = taskList.FindApp( iUidWmlBrowser );
+
+ // If browser already open.
+ if ( task.Exists() )
+ {
+ TFLOGSTRING( "CSatShellController::LaunchBrowserL browser open" )
+ HBufC8* param8 = HBufC8::NewLC( param->Length() );
+ param8->Des().Append( *param );
+ errorCode = task.SendMessage( TUid::Uid( 0 ), param8->Des() );
+ CleanupStack::PopAndDestroy( param8 );
+ }
+ else
+ {
+ TFLOGSTRING( "CSatShellController::LaunchBrowserL launch browser" )
+ // Launch the Browser.
+ TThreadId id( static_cast<TInt64>( 0 ) );
+ RApaLsSession rapaLsSession;
+ User::LeaveIfError( rapaLsSession.Connect() );
+ errorCode = rapaLsSession.StartDocument( *param, iUidWmlBrowser, id );
+ rapaLsSession.Close();
+ }
+
+ BringBrowserToForeground();
+
+ iWsSession.Close();
+ CleanupStack::PopAndDestroy( param );
+
+ TFLOGSTRING2( "CSatShellController::LaunchBrowserL exit %d", errorCode )
+ return errorCode;
+ }
+
+// -----------------------------------------------------------------------------
+// CSatShellController::ResolveDefaultAccesspoint
+// Resolves Browser's default accesspoint.
+// -----------------------------------------------------------------------------
+//
+TInt CSatShellController::ResolveDefaultAccesspoint()
+ {
+ TFLOGSTRING( "CSatShellController::ResolveDefaultAccesspoint called" )
+
+ // Initialize with error value for wrong access point.
+ TInt apInt( KErrNotFound );
+/* Commented out to enable SAT Server boot,
+add TB10.1 implementation later
+
+ TInt err( KErrNone );
+ CRepository* repository = NULL;
+
+ // Which UID to monitor.
+ TRAP( err, repository = CRepository::NewL( KCRUidBrowser ) );
+
+ if ( ( KErrNone == err ) && repository )
+ {
+ err = repository->StartTransaction(
+ CRepository::EReadWriteTransaction );
+ err = repository->Get( KBrowserDefaultAccessPoint, apInt );
+ TFLOGSTRING2( "CSatShellController::ResolveDefaultAccesspoint \
+ KBrowserDefaultAccessPoint: %d", apInt )
+ }
+
+ delete repository;
+ repository = NULL;
+*/
+ TFLOGSTRING( "CSatShellController::ResolveDefaultAccesspoint exit" )
+ return apInt;
+ }
+
+// -----------------------------------------------------------------------------
+// CSatShellController::CheckSatUiStatus
+// Check if SatUi is needed to set to background.
+// -----------------------------------------------------------------------------
+//
+void CSatShellController::CheckSatUiStatus()
+ {
+ TFLOGSTRING( "CSatShellController::CheckSatUiStatus called" )
+
+ // if SatUi task is found and SatUi is not in foreground flag is set ETrue
+ iSetSatUiToBackground = EFalse;
+
+ RWsSession wsSession;
+ // Open the WS server session.
+ if ( KErrNone == wsSession.Connect() )
+ {
+ TFLOGSTRING( "CSatShellController::CheckSatUiStatus \
+ open WS server session" )
+ TApaTaskList tasklist( wsSession );
+ TApaTask satUiTask = tasklist.FindApp( KUidSatUi );
+
+ if ( satUiTask.Exists() )
+ {
+ TFLOGSTRING(
+ "CSatShellController::CheckSatUiStatus task exists" )
+ TApaTask topMostTask = tasklist.FindByPos( 0 );
+
+ if ( topMostTask.ThreadId() != satUiTask.ThreadId() )
+ {
+ TFLOGSTRING(
+ "CSatShellController::CheckSatUiStatus set SatUI to BG" )
+ iSetSatUiToBackground = ETrue;
+ }
+ }
+
+ wsSession.Close();
+ }
+
+ TFLOGSTRING( "CSatShellController::CheckSatUiStatus exit" )
+ }
+
+// ================= OTHER EXPORTED FUNCTIONS ===============================
+
+EXPORT_C MSatShellController* NewSatController()
+ {
+ TFLOGSTRING( "CSatShellController::NewSatController called" )
+
+ MSatShellController* satController = NULL;
+ TRAPD( err, satController = CSatShellController::NewL() )
+ if ( KErrNone != err )
+ {
+ TFLOGSTRING2( " CSatShellController::NewSatController \
+ failed: %d", err )
+ satController = NULL;
+ }
+
+ TFLOGSTRING( "CSatShellController::NewSatController exit" )
+ return satController;
+ }
+
+// End of File
--- a/sysdef_1_4_0.dtd Tue Feb 02 01:11:09 2010 +0200
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +0,0 @@
- <!ELEMENT SystemDefinition (systemModel?, build?)>
- <!ATTLIST SystemDefinition
- name CDATA #REQUIRED
- schema CDATA #REQUIRED>
- <!ELEMENT systemModel (layer+)>
- <!ELEMENT layer (logicalset* | module*)*>
- <!ATTLIST layer
- name CDATA #REQUIRED
- levels CDATA #IMPLIED
- span CDATA #IMPLIED>
- <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalset name CDATA #REQUIRED>
- <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
- <!ATTLIST logicalsubset name CDATA #REQUIRED>
- <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
- <!ATTLIST module
- name CDATA #REQUIRED
- level CDATA #IMPLIED>
- <!ELEMENT component (unit* | package* | prebuilt*)*>
- <!ATTLIST component name CDATA #REQUIRED>
- <!ELEMENT unit EMPTY>
- <!ATTLIST unit
- unitID ID #REQUIRED
- name CDATA #REQUIRED
- mrp CDATA #REQUIRED
- filter CDATA #IMPLIED
- bldFile CDATA #REQUIRED
- priority CDATA #IMPLIED
- contract CDATA #IMPLIED>
- <!ELEMENT package EMPTY>
- <!ATTLIST package
- name CDATA #REQUIRED
- mrp CDATA #REQUIRED
- filter CDATA #IMPLIED
- contract CDATA #IMPLIED>
- <!ELEMENT prebuilt EMPTY>
- <!ATTLIST prebuilt
- name CDATA #REQUIRED
- version CDATA #REQUIRED
- late (Y|N) #IMPLIED
- filter CDATA #IMPLIED
- contract CDATA #IMPLIED>
- <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
- <!ELEMENT unitList (unitRef+)>
- <!ATTLIST unitList
- name ID #REQUIRED
- description CDATA #REQUIRED>
- <!ELEMENT unitRef EMPTY>
- <!ATTLIST unitRef unit IDREF #REQUIRED>
- <!ELEMENT targetList EMPTY>
- <!ATTLIST targetList
- name ID #REQUIRED
- description CDATA #REQUIRED
- target IDREFS #REQUIRED>
- <!ELEMENT target EMPTY>
- <!ATTLIST target
- name ID #REQUIRED
- abldTarget CDATA #REQUIRED
- description CDATA #REQUIRED>
- <!ELEMENT option EMPTY>
- <!ATTLIST option
- name ID #REQUIRED
- abldOption CDATA #REQUIRED
- description CDATA #REQUIRED
- enable (Y | N | y | n) #REQUIRED>
- <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
- <!ATTLIST configuration
- name ID #REQUIRED
- description CDATA #REQUIRED
- filter CDATA #REQUIRED>
- <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
- <!ELEMENT unitListRef EMPTY>
- <!ATTLIST unitListRef unitList IDREF #REQUIRED>
- <!ELEMENT layerRef EMPTY>
- <!ATTLIST layerRef layerName CDATA #REQUIRED>
- <!ELEMENT buildLayer EMPTY>
- <!ATTLIST buildLayer
- command CDATA #REQUIRED
- targetList IDREFS #IMPLIED
- unitParallel (Y | N | y | n) #REQUIRED
- targetParallel (Y | N | y | n) #IMPLIED>
- <!ELEMENT specialInstructions EMPTY>
- <!ATTLIST specialInstructions
- name CDATA #REQUIRED
- cwd CDATA #REQUIRED
- command CDATA #REQUIRED>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sysdef_1_5_1.dtd Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,88 @@
+ <!ELEMENT SystemDefinition (systemModel?, build?)>
+ <!ATTLIST SystemDefinition
+ name CDATA #REQUIRED
+ schema CDATA #REQUIRED>
+ <!ELEMENT systemModel (layer+)>
+ <!ELEMENT layer (logicalset* | module*)*>
+ <!ATTLIST layer
+ name CDATA #REQUIRED
+ levels CDATA #IMPLIED
+ span CDATA #IMPLIED>
+ <!ELEMENT logicalset (logicalsubset* | module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalset name CDATA #REQUIRED>
+ <!ELEMENT logicalsubset (module* | unit* | package* | prebuilt*)*>
+ <!ATTLIST logicalsubset name CDATA #REQUIRED>
+ <!ELEMENT module (component* | unit* | package* | prebuilt*)*>
+ <!ATTLIST module
+ name CDATA #REQUIRED
+ level CDATA #IMPLIED>
+ <!ELEMENT component (unit* | package* | prebuilt*)*>
+ <!ATTLIST component name CDATA #REQUIRED>
+ <!ELEMENT unit EMPTY>
+ <!ATTLIST unit
+ unitID ID #REQUIRED
+ name CDATA #REQUIRED
+ mrp CDATA #REQUIRED
+ filter CDATA #IMPLIED
+ bldFile CDATA #REQUIRED
+ priority CDATA #IMPLIED
+ contract CDATA #IMPLIED
+ proFile CDATA #IMPLIED
+ qmakeArgs CDATA #IMPLIED>
+ <!ELEMENT package EMPTY>
+ <!ATTLIST package
+ name CDATA #REQUIRED
+ mrp CDATA #REQUIRED
+ filter CDATA #IMPLIED
+ contract CDATA #IMPLIED>
+ <!ELEMENT prebuilt EMPTY>
+ <!ATTLIST prebuilt
+ name CDATA #REQUIRED
+ version CDATA #REQUIRED
+ late (Y|N) #IMPLIED
+ filter CDATA #IMPLIED
+ contract CDATA #IMPLIED>
+ <!ELEMENT build (option* | target+ | targetList+ | unitList+ | configuration+)*>
+ <!ELEMENT unitList (unitRef+)>
+ <!ATTLIST unitList
+ name ID #REQUIRED
+ description CDATA #REQUIRED>
+ <!ELEMENT unitRef EMPTY>
+ <!ATTLIST unitRef unit IDREF #REQUIRED>
+ <!ELEMENT targetList EMPTY>
+ <!ATTLIST targetList
+ name ID #REQUIRED
+ description CDATA #REQUIRED
+ target IDREFS #REQUIRED>
+ <!ELEMENT target EMPTY>
+ <!ATTLIST target
+ name ID #REQUIRED
+ abldTarget CDATA #REQUIRED
+ description CDATA #REQUIRED>
+ <!ELEMENT option EMPTY>
+ <!ATTLIST option
+ name ID #REQUIRED
+ abldOption CDATA #REQUIRED
+ description CDATA #REQUIRED
+ enable (Y | N | y | n) #REQUIRED>
+ <!ELEMENT configuration (unitListRef+ | layerRef+ | task+)*>
+ <!ATTLIST configuration
+ name ID #REQUIRED
+ description CDATA #REQUIRED
+ filter CDATA #REQUIRED>
+ <!ELEMENT task ( unitListRef* , (buildLayer | specialInstructions))>
+ <!ELEMENT unitListRef EMPTY>
+ <!ATTLIST unitListRef unitList IDREF #REQUIRED>
+ <!ELEMENT layerRef EMPTY>
+ <!ATTLIST layerRef layerName CDATA #REQUIRED>
+ <!ELEMENT buildLayer EMPTY>
+ <!ATTLIST buildLayer
+ command CDATA #REQUIRED
+ targetList IDREFS #IMPLIED
+ unitParallel (Y | N | y | n) #REQUIRED
+ targetParallel (Y | N | y | n) #IMPLIED>
+ <!ELEMENT specialInstructions EMPTY>
+ <!ATTLIST specialInstructions
+ name CDATA #REQUIRED
+ cwd CDATA #REQUIRED
+ command CDATA #REQUIRED>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/bwins/dialpadu.def Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,32 @@
+EXPORTS
+ ?trUtf8@Dialpad@@SA?AVQString@@PBD0H@Z @ 1 NONAME ; class QString Dialpad::trUtf8(char const *, char const *, int)
+ ?closeAnimValueChanged@Dialpad@@IAEXM@Z @ 2 NONAME ; void Dialpad::closeAnimValueChanged(float)
+ ?qt_metacast@Dialpad@@UAEPAXPBD@Z @ 3 NONAME ; void * Dialpad::qt_metacast(char const *)
+ ?orientationChangeFinished@Dialpad@@IAEXXZ @ 4 NONAME ; void Dialpad::orientationChangeFinished(void)
+ ?closeEvent@Dialpad@@MAEXPAVQCloseEvent@@@Z @ 5 NONAME ; void Dialpad::closeEvent(class QCloseEvent *)
+ ?openDialpad@Dialpad@@QAEXXZ @ 6 NONAME ; void Dialpad::openDialpad(void)
+ ??0Dialpad@@QAE@XZ @ 7 NONAME ; Dialpad::Dialpad(void)
+ ?sceneEvent@Dialpad@@MAE_NPAVQEvent@@@Z @ 8 NONAME ; bool Dialpad::sceneEvent(class QEvent *)
+ ?openAnimValueChanged@Dialpad@@IAEXM@Z @ 9 NONAME ; void Dialpad::openAnimValueChanged(float)
+ ?handleSceneEvent@Dialpad@@IAE_NPAVQEvent@@@Z @ 10 NONAME ; bool Dialpad::handleSceneEvent(class QEvent *)
+ ?showEvent@Dialpad@@MAEXPAVQShowEvent@@@Z @ 11 NONAME ; void Dialpad::showEvent(class QShowEvent *)
+ ?metaObject@Dialpad@@UBEPBUQMetaObject@@XZ @ 12 NONAME ; struct QMetaObject const * Dialpad::metaObject(void) const
+ ?hideEvent@Dialpad@@MAEXPAVQHideEvent@@@Z @ 13 NONAME ; void Dialpad::hideEvent(class QHideEvent *)
+ ?staticMetaObject@Dialpad@@2UQMetaObject@@B @ 14 NONAME ; struct QMetaObject const Dialpad::staticMetaObject
+ ?tr@Dialpad@@SA?AVQString@@PBD0@Z @ 15 NONAME ; class QString Dialpad::tr(char const *, char const *)
+ ??1Dialpad@@UAE@XZ @ 16 NONAME ; Dialpad::~Dialpad(void)
+ ?getStaticMetaObject@Dialpad@@SAABUQMetaObject@@XZ @ 17 NONAME ; struct QMetaObject const & Dialpad::getStaticMetaObject(void)
+ ?orientationChangeStarted@Dialpad@@IAEXXZ @ 18 NONAME ; void Dialpad::orientationChangeStarted(void)
+ ?trUtf8@Dialpad@@SA?AVQString@@PBD0@Z @ 19 NONAME ; class QString Dialpad::trUtf8(char const *, char const *)
+ ?qt_metacall@Dialpad@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 20 NONAME ; int Dialpad::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?paint@Dialpad@@MAEXPAVQPainter@@PBVQStyleOptionGraphicsItem@@PAVQWidget@@@Z @ 21 NONAME ; void Dialpad::paint(class QPainter *, class QStyleOptionGraphicsItem const *, class QWidget *)
+ ?tr@Dialpad@@SA?AVQString@@PBD0H@Z @ 22 NONAME ; class QString Dialpad::tr(char const *, char const *, int)
+ ?sceneEventFilter@Dialpad@@MAE_NPAVQGraphicsItem@@PAVQEvent@@@Z @ 23 NONAME ; bool Dialpad::sceneEventFilter(class QGraphicsItem *, class QEvent *)
+ ?openAnimFinished@Dialpad@@IAEXXZ @ 24 NONAME ; void Dialpad::openAnimFinished(void)
+ ?setCallButtonEnabled@Dialpad@@QAEX_N@Z @ 25 NONAME ; void Dialpad::setCallButtonEnabled(bool)
+ ?closeDialpad@Dialpad@@QAEXXZ @ 26 NONAME ; void Dialpad::closeDialpad(void)
+ ??_EDialpad@@UAE@I@Z @ 27 NONAME ; Dialpad::~Dialpad(unsigned int)
+ ?editor@Dialpad@@QBEAAVHbLineEdit@@XZ @ 28 NONAME ; class HbLineEdit & Dialpad::editor(void) const
+ ?closeAnimFinished@Dialpad@@IAEXXZ @ 29 NONAME ; void Dialpad::closeAnimFinished(void)
+ ?aboutToClose@Dialpad@@IAEXXZ @ 30 NONAME ; void Dialpad::aboutToClose(void)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/dialpad.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,68 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#
+
+TEMPLATE = lib
+TARGET = dialpad
+CONFIG += hb
+
+INCLUDEPATH += . inc
+
+HEADERS += ../../phonesrv_plat/dialpad_api/inc/dialpad.h \
+ inc/dialpadbutton.h \
+ inc/dialpadbuttonstyle.h \
+ inc/dialpadinputfield.h \
+ inc/dialpadkeypad.h \
+ inc/dialpadmultitaphandler.h
+
+SOURCES += src/dialpad.cpp \
+ src/dialpadbutton.cpp \
+ src/dialpadbuttonstyle.cpp \
+ src/dialpadinputfield.cpp \
+ src/dialpadkeypad.cpp \
+ src/dialpadmultitaphandler.cpp
+
+RESOURCES += resources/dialpad.qrc
+
+symbian {
+ TARGET.EPOCALLOWDLLDATA = 1
+ TARGET.CAPABILITY = ALL -TCB
+ TARGET.UID3 = 0x102078ED
+
+ defFiles = \
+ "$${LITERAL_HASH}ifdef WINS" \
+ "DEFFILE bwins/dialpad.def" \
+ "$${LITERAL_HASH}else" \
+ "DEFFILE eabi/dialpad.def" \
+ "$${LITERAL_HASH}endif"
+
+ MMP_RULES += defFiles
+
+ BLD_INF_RULES.prj_exports += \
+ "$${LITERAL_HASH}include <platform_paths.hrh>" \
+ "./rom/dialpad.iby CORE_MW_LAYER_IBY_EXPORT_PATH(dialpad.iby)"
+}
+else:win32 {
+ # Put it to Hb/lib because it is in path
+ DESTDIR = c:/hb/lib
+ DLLDESTDIR = c:/hb/bin
+ INCLUDEPATH += ../../phonesrv_plat/dialpad_api/inc \
+ c:/hb/include/hbcore \
+ c:/hb/include/hbwidgets \
+ c:/hb/include/hbtools
+}
+
+DEFINES += BUILD_DIALPAD
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/eabi/dialpadu.def Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,39 @@
+EXPORTS
+ _ZN7Dialpad10closeEventEP11QCloseEvent @ 1 NONAME
+ _ZN7Dialpad10sceneEventEP6QEvent @ 2 NONAME
+ _ZN7Dialpad11openDialpadEv @ 3 NONAME
+ _ZN7Dialpad11qt_metacallEN11QMetaObject4CallEiPPv @ 4 NONAME
+ _ZN7Dialpad11qt_metacastEPKc @ 5 NONAME
+ _ZN7Dialpad12aboutToCloseEv @ 6 NONAME
+ _ZN7Dialpad12closeDialpadEv @ 7 NONAME
+ _ZN7Dialpad16handleSceneEventEP6QEvent @ 8 NONAME
+ _ZN7Dialpad16openAnimFinishedEv @ 9 NONAME
+ _ZN7Dialpad16sceneEventFilterEP13QGraphicsItemP6QEvent @ 10 NONAME
+ _ZN7Dialpad16staticMetaObjectE @ 11 NONAME DATA 16
+ _ZN7Dialpad17closeAnimFinishedEv @ 12 NONAME
+ _ZN7Dialpad19getStaticMetaObjectEv @ 13 NONAME
+ _ZN7Dialpad20openAnimValueChangedEf @ 14 NONAME
+ _ZN7Dialpad20setCallButtonEnabledEb @ 15 NONAME
+ _ZN7Dialpad21closeAnimValueChangedEf @ 16 NONAME
+ _ZN7Dialpad24orientationChangeStartedEv @ 17 NONAME
+ _ZN7Dialpad25orientationChangeFinishedEv @ 18 NONAME
+ _ZN7Dialpad5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 19 NONAME
+ _ZN7Dialpad9hideEventEP10QHideEvent @ 20 NONAME
+ _ZN7Dialpad9showEventEP10QShowEvent @ 21 NONAME
+ _ZN7DialpadC1Ev @ 22 NONAME
+ _ZN7DialpadC2Ev @ 23 NONAME
+ _ZN7DialpadD0Ev @ 24 NONAME
+ _ZN7DialpadD1Ev @ 25 NONAME
+ _ZN7DialpadD2Ev @ 26 NONAME
+ _ZNK7Dialpad10metaObjectEv @ 27 NONAME
+ _ZNK7Dialpad6editorEv @ 28 NONAME
+ _ZTI7Dialpad @ 29 NONAME
+ _ZTV7Dialpad @ 30 NONAME
+ _ZThn16_N7DialpadD0Ev @ 31 NONAME
+ _ZThn16_N7DialpadD1Ev @ 32 NONAME
+ _ZThn8_N7Dialpad10sceneEventEP6QEvent @ 33 NONAME
+ _ZThn8_N7Dialpad16sceneEventFilterEP13QGraphicsItemP6QEvent @ 34 NONAME
+ _ZThn8_N7Dialpad5paintEP8QPainterPK24QStyleOptionGraphicsItemP7QWidget @ 35 NONAME
+ _ZThn8_N7DialpadD0Ev @ 36 NONAME
+ _ZThn8_N7DialpadD1Ev @ 37 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/inc/dialpadbutton.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,36 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Custom button
+*
+*/
+
+#ifndef DIALPADBUTTON_H
+#define DIALPADBUTTON_H
+
+#include "hbpushbutton.h"
+
+class DialpadButton : public HbPushButton
+{
+ Q_OBJECT
+
+public:
+ explicit DialpadButton(QGraphicsItem *parent = 0 );
+ virtual ~DialpadButton( );
+
+protected:
+ void changeEvent(QEvent *event);
+ bool sceneEvent(QEvent *event);
+};
+
+#endif // DIALPADBUTTON_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/inc/dialpadbuttonstyle.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,52 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Custom button style
+*
+*/
+
+#ifndef DIALPADBUTTONSTYLE_H_
+#define DIALPADBUTTONSTYLE_H_
+
+#include <hbstyle.h>
+
+class DialpadButtonStyle : public HbStyle
+ {
+public:
+ enum ButtonStyle
+ {
+ NormalButtonStyle,
+ FunctionButtonStyle,
+ CallButtonStyle
+ };
+
+public:
+ explicit DialpadButtonStyle();
+ virtual ~DialpadButtonStyle();
+
+ void updatePrimitive(
+ QGraphicsItem *item,
+ HbStyle::Primitive primitive,
+ const QStyleOption *option ) const;
+
+ void setButtonStyle(ButtonStyle style);
+
+private:
+ void setTextColor(QGraphicsItem *item) const;
+ void setIconColor(QGraphicsItem *item, const QColor &color) const;
+
+private:
+ int mButtonStyle;
+ };
+
+#endif /* DIALPADBUTTONSTYLE_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/inc/dialpadinputfield.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,53 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Input field
+*
+*/
+
+#ifndef DIALPADINPUTFIELD_H
+#define DIALPADINPUTFIELD_H
+
+#include <hbwidget.h>
+
+class HbLineEdit;
+class DialpadButtonStyle;
+class DialpadButton;
+
+class DialpadInputField : public HbWidget
+{
+ Q_OBJECT
+
+public:
+ DialpadInputField(QGraphicsItem* parent=0);
+ ~DialpadInputField();
+
+ HbLineEdit& editor() const;
+
+ DialpadButton& backspaceButton() const;
+
+protected:
+ QSizeF sizeHint(Qt::SizeHint which,
+ const QSizeF & constraint = QSizeF()) const;
+
+private slots:
+ void onEditorContentChanged();
+
+private:
+ HbLineEdit* mNumberEditor;
+ DialpadButton* mBackspace;
+ DialpadButtonStyle* mFunctionButtonStyle;
+ int mHeight;
+};
+
+#endif // DIALPADINPUTFIELD_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/inc/dialpadkeypad.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,80 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Dialpad keypad
+*
+*/
+
+#ifndef DIALPADKEYPAD_H
+#define DIALPADKEYPAD_H
+
+#include <hbwidget.h>
+
+class DialpadButton;
+class DialpadButtonStyle;
+class DialpadInputField;
+class DialpadButton;
+class QSignalMapper;
+class QGraphicsGridLayout;
+
+const int DialpadButtonCount = 13;
+
+class DialpadKeypad : public HbWidget
+{
+ Q_OBJECT
+
+public:
+ explicit DialpadKeypad(
+ DialpadInputField& inputField,
+ QGraphicsItem* parent=0);
+
+ ~DialpadKeypad();
+
+public:
+ void setLongPressDuration(int duration);
+
+ void setCallButtonEnabled(bool enabled);
+
+ void createButtonGrid();
+
+protected slots:
+ void setButtonTexts();
+ void handleKeyPressed(int key);
+ void handleKeyClicked(int key);
+ void handleKeyReleased(int key);
+ void handleLongPress();
+
+protected:
+ void showEvent(QShowEvent *event);
+
+private:
+ void postKeyEvent(QEvent::Type type, int key);
+ void sendKeyEventToEditor(QEvent::Type type, int key);
+ inline bool isNumericKey(int key);
+
+private:
+ DialpadInputField& mInputField;
+ QGraphicsGridLayout* mGridLayout;
+ DialpadButton* mButtons[DialpadButtonCount];
+ DialpadButtonStyle* mNormalButtonStyle;
+ DialpadButtonStyle* mCallButtonStyle;
+ QSignalMapper* mKeyPressedSignalMapper;
+ QSignalMapper* mKeyReleasedSignalMapper;
+ QSignalMapper* mKeyClickedSignalMapper;
+ QMap<int,QChar> mGeneratedChar;
+ int mPressedNumericKey;
+ QTimer* mLongPressTimer;
+ int mLongPressDuration;
+};
+
+#endif // DIALPADKEYPAD_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/inc/dialpadmultitaphandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,47 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Multitap handler
+*
+*/
+
+#ifndef DIALPADMULTITAPHANDLER_H_
+#define DIALPADMULTITAPHANDLER_H_
+
+#include <QObject.h>
+#include <QTime>
+#include <QMap>
+
+class HbLineEdit;
+
+class DialpadMultitapHandler : public QObject
+ {
+public:
+ explicit DialpadMultitapHandler(HbLineEdit& editor, QObject* parent=0);
+ virtual ~DialpadMultitapHandler();
+
+protected:
+ bool eventFilter(QObject *watched, QEvent *event);
+
+private:
+ inline bool isNumericKey(int key);
+
+private:
+ HbLineEdit& mEditor;
+ QTime mMultitapTimer;
+ int mAsteriskMultitapIndex;
+ bool mGeneratedAsterisk;
+ QMap<int,QChar> mExtraChar;
+ };
+
+#endif /* DIALPADMULTITAPHANDLER_H_ */
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/dialpad.css Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,51 @@
+
+/* icon only */
+DialpadButton::icon{
+ top: -var(hb-param-margin-gene-middle-vertical);
+ bottom: var(hb-param-margin-gene-middle-vertical);
+ fixed-width: var(hb-param-graphic-size-function);
+ fixed-height: var(hb-param-graphic-size-function);
+}
+
+/* text and additional text */
+DialpadButton[stretched][!icon][text][additionalText]{
+ layout:text_additionalText_horizontal;
+}
+
+DialpadButton[stretched][!icon][text][additionalText]::text
+{
+ left: -2.0un;
+ font-variant:primary;
+ text-height:var(hb-param-text-height-title);
+ text-line-count-max:1;
+ text-align:left center;
+}
+
+DialpadButton[stretched][!icon][text][additionalText]::additional-text
+{
+ font-variant:secondary;
+ text-height:var(hb-param-text-height-secondary);
+ text-line-count-max:1;
+ text-align: left center;
+}
+
+/* text and icon */
+DialpadButton[stretched][icon][text][!additionalText]{
+ layout:icon_text_horizontal;
+}
+
+DialpadButton[stretched][icon][text][!additionalText]::text{
+ left: -2.0un;
+ font-variant:primary;
+ text-height:var(hb-param-text-height-title);
+ text-line-count-max:1;
+ text-align:left center;
+}
+
+DialpadButton[stretched][icon][text][!additionalText]::icon{
+ top: -var(hb-param-margin-gene-middle-vertical);
+ bottom: var(hb-param-margin-gene-middle-vertical);
+ fixed-width: var(hb-param-graphic-size-primary-small);
+ fixed-height: var(hb-param-graphic-size-primary-small);
+}
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/dialpad.dialpadbutton.widgetml Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,39 @@
+<hbwidget version="0.1" type="pushbutton">
+
+ <layout name="text_additionalText_horizontal" type="mesh">
+ <meshitem src="text" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+ <meshitem src="text" srcEdge="CENTERV" dst="" dstEdge="CENTERV" />
+
+ <meshitem src="additional-text" srcEdge="LEFT" dst="" dstEdge="CENTERH" spacing="3.0un"/>
+ <meshitem src="additional-text" srcEdge="CENTERV" dst="" dstEdge="CENTERV"/>
+
+ <meshitem src="background" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="background" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+ <meshitem src="background" srcEdge="LEFT" dst="" dstEdge="LEFT" />
+ <meshitem src="background" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
+
+ <meshitem src="toucharea" srcEdge="LEFT" dst="" dstEdge="LEFT" />
+ <meshitem src="toucharea" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
+ <meshitem src="toucharea" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="toucharea" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+ </layout>
+
+ <layout name="icon_text_horizontal" type="mesh">
+ <meshitem src="text" srcEdge="LEFT" dst="" dstEdge="LEFT"/>
+ <meshitem src="text" srcEdge="CENTERV" dst="" dstEdge="CENTERV" />
+
+ <meshitem src="icon" srcEdge="CENTERH" dst="" dstEdge="CENTERH"/>
+ <meshitem src="icon" srcEdge="CENTERV" dst="text" dstEdge="CENTERV" />
+
+ <meshitem src="background" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="background" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+ <meshitem src="background" srcEdge="LEFT" dst="" dstEdge="LEFT" />
+ <meshitem src="background" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
+
+ <meshitem src="toucharea" srcEdge="LEFT" dst="" dstEdge="LEFT" />
+ <meshitem src="toucharea" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
+ <meshitem src="toucharea" srcEdge="TOP" dst="" dstEdge="TOP" />
+ <meshitem src="toucharea" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
+ </layout>
+
+</hbwidget>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/dialpad.qrc Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,26 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qtg_mono_voice_mailbox.svg</file>
+ <file>qtg_mono_answer_call.svg</file>
+ <file>dialpad.css</file>
+ <file>dialpad.dialpadbutton.widgetml</file>
+ <file>qtg_fr_btn_green_pressed_tr.svg</file>
+ <file>qtg_fr_btn_green_normal_b.svg</file>
+ <file>qtg_fr_btn_green_normal_bl.svg</file>
+ <file>qtg_fr_btn_green_normal_br.svg</file>
+ <file>qtg_fr_btn_green_normal_c.svg</file>
+ <file>qtg_fr_btn_green_normal_l.svg</file>
+ <file>qtg_fr_btn_green_normal_r.svg</file>
+ <file>qtg_fr_btn_green_normal_t.svg</file>
+ <file>qtg_fr_btn_green_normal_tl.svg</file>
+ <file>qtg_fr_btn_green_normal_tr.svg</file>
+ <file>qtg_fr_btn_green_pressed_b.svg</file>
+ <file>qtg_fr_btn_green_pressed_bl.svg</file>
+ <file>qtg_fr_btn_green_pressed_br.svg</file>
+ <file>qtg_fr_btn_green_pressed_c.svg</file>
+ <file>qtg_fr_btn_green_pressed_l.svg</file>
+ <file>qtg_fr_btn_green_pressed_r.svg</file>
+ <file>qtg_fr_btn_green_pressed_t.svg</file>
+ <file>qtg_fr_btn_green_pressed_tl.svg</file>
+ </qresource>
+</RCC>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_normal_b.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="50px" height="10px" viewBox="0 0 50 10" enable-background="new 0 0 50 10" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="50" height="10"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="24.9995" y1="-39.8838" x2="24.9995" y2="10.0715">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<rect fill="url(#SVGID_1_)" width="50" height="10"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="24.9995" y1="-39.8838" x2="24.9995" y2="9.8873">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<rect y="9" opacity="0.35" fill="url(#SVGID_2_)" width="50" height="1"/>
+<rect fill="none" width="50" height="10"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_normal_bl.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="10" height="10"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5" y1="-39.8838" x2="5" y2="10.0715">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M0,5c0,2.762,2.238,5,5,5h5V0H0V5z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="5" y1="-39.8838" x2="5" y2="9.8873">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<path opacity="0.35" fill="url(#SVGID_2_)" d="M0,0v5c0,2.762,2.238,5,5,5h5V9H5C2.794,9,1,7.206,1,5V0H0z"/>
+<rect fill="none" width="10" height="10"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_normal_br.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="10" height="10"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5" y1="-39.8838" x2="5" y2="10.0715">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M0,10h5c2.762,0,5-2.238,5-5V0H0V10z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="5" y1="-39.8838" x2="5" y2="9.8873">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<path opacity="0.35" fill="url(#SVGID_2_)" d="M9,5c0,2.206-1.794,4-4,4H0v1h5c2.762,0,5-2.238,5-5V0H9V5z"/>
+<rect fill="none" width="10" height="10"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_normal_c.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="50px" height="30px" viewBox="0 0 50 30" enable-background="new 0 0 50 30" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="50" height="30"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="24.9995" y1="-9.8843" x2="24.9995" y2="40.0719">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<rect fill="url(#SVGID_1_)" width="50" height="30"/>
+<rect fill="none" width="50" height="30"/>
+<rect opacity="0.1" fill="#FFFFFF" width="50" height="9"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_normal_l.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="10px" height="30px" viewBox="0 0 10 30" enable-background="new 0 0 10 30" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="10" height="30"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5" y1="-9.8843" x2="5" y2="40.0719">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<rect fill="url(#SVGID_1_)" width="10" height="30"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="0.5" y1="-9.8843" x2="0.5" y2="39.8876">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<rect opacity="0.35" fill="url(#SVGID_2_)" width="1" height="30"/>
+<rect fill="none" width="10" height="30"/>
+<rect x="3" opacity="0.1" fill="#FFFFFF" width="7" height="9"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_normal_r.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="10px" height="30px" viewBox="0 0 10 30" enable-background="new 0 0 10 30" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="10" height="30"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5" y1="-9.8843" x2="5" y2="40.0719">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<rect fill="url(#SVGID_1_)" width="10" height="30"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="9.5" y1="-9.8843" x2="9.5" y2="39.8876">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<rect x="9" opacity="0.35" fill="url(#SVGID_2_)" width="1" height="30"/>
+<rect fill="none" width="10" height="30"/>
+<rect opacity="0.1" fill="#FFFFFF" width="7" height="9"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_normal_t.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="50px" height="10px" viewBox="0 0 50 10" enable-background="new 0 0 50 10" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="50" height="10"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="24.9995" y1="0.1157" x2="24.9995" y2="50.071">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<rect fill="url(#SVGID_1_)" width="50" height="10"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="24.9995" y1="0.1157" x2="24.9995" y2="49.8868">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<rect opacity="0.35" fill="url(#SVGID_2_)" width="50" height="1"/>
+<rect fill="none" width="50" height="10"/>
+<rect y="3" opacity="0.1" fill="#FFFFFF" width="50" height="7"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_normal_tl.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="10" height="10"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5" y1="0.1157" x2="5" y2="50.071">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M10,0H5C2.238,0,0,2.238,0,5v5h10V0z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="5" y1="0.1157" x2="5" y2="49.8868">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<path opacity="0.35" fill="url(#SVGID_2_)" d="M1,5c0-2.206,1.794-4,4-4h5V0H5C2.238,0,0,2.238,0,5v5h1V5z"/>
+<rect fill="none" width="10" height="10"/>
+<path opacity="0.1" fill="#FFFFFF" d="M10,3H5C3.897,3,3,3.896,3,5v5h7V3z"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_normal_tr.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="10" height="10"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5" y1="0.1157" x2="5" y2="50.071">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M10,5c0-2.762-2.238-5-5-5H0v10h10V5z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="5" y1="0.1157" x2="5" y2="49.8868">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<path opacity="0.35" fill="url(#SVGID_2_)" d="M10,5c0-2.762-2.238-5-5-5H0v1h5c2.206,0,4,1.794,4,4v5h1V5z"/>
+<rect fill="none" width="10" height="10"/>
+<path opacity="0.1" fill="#FFFFFF" d="M7,5c0-1.104-0.896-2-2-2H0v7h7V5z"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_pressed_b.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="50px" height="10px" viewBox="0 0 50 10" enable-background="new 0 0 50 10" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="50" height="10"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="25.0005" y1="10.1279" x2="25.0005" y2="-39.7534">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<rect fill="url(#SVGID_1_)" width="50" height="10"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="24.9995" y1="-39.8838" x2="24.9995" y2="9.8873">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<rect y="9" opacity="0.35" fill="url(#SVGID_2_)" width="50" height="1"/>
+<rect fill="none" width="50" height="10"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_pressed_bl.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="10" height="10"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5" y1="10.1279" x2="5" y2="-39.7534">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M0,5c0,2.762,2.238,5,5,5h5V0H0V5z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="5" y1="-39.8838" x2="5" y2="9.8873">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<path opacity="0.35" fill="url(#SVGID_2_)" d="M0,0v5c0,2.762,2.238,5,5,5h5V9H5C2.794,9,1,7.206,1,5V0H0z"/>
+<rect fill="none" width="10" height="10"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_pressed_br.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="10" height="10"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5" y1="10.1279" x2="5" y2="-39.7534">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M0,10h5c2.762,0,5-2.238,5-5V0H0V10z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="5" y1="-39.8838" x2="5" y2="9.8873">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<path opacity="0.35" fill="url(#SVGID_2_)" d="M9,5c0,2.206-1.794,4-4,4H0v1h5c2.762,0,5-2.238,5-5V0H9V5z"/>
+<rect fill="none" width="10" height="10"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_pressed_c.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="50px" height="30px" viewBox="0 0 50 30" enable-background="new 0 0 50 30" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="50" height="30"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="25.0005" y1="40.127" x2="25.0005" y2="-9.7536">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<rect fill="url(#SVGID_1_)" width="50" height="30"/>
+<rect fill="none" width="50" height="30"/>
+<rect opacity="0.1" fill="#FFFFFF" width="50" height="9"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_pressed_l.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="10px" height="30px" viewBox="0 0 10 30" enable-background="new 0 0 10 30" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="10" height="30"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5" y1="40.127" x2="5" y2="-9.7536">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<rect fill="url(#SVGID_1_)" width="10" height="30"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="0.5" y1="-9.8843" x2="0.5" y2="39.8876">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<rect opacity="0.35" fill="url(#SVGID_2_)" width="1" height="30"/>
+<rect fill="none" width="10" height="30"/>
+<rect x="3" opacity="0.1" fill="#FFFFFF" width="7" height="9"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_pressed_r.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="10px" height="30px" viewBox="0 0 10 30" enable-background="new 0 0 10 30" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="10" height="30"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5" y1="40.127" x2="5" y2="-9.7536">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<rect fill="url(#SVGID_1_)" width="10" height="30"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="9.5" y1="-9.8843" x2="9.5" y2="39.8876">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<rect x="9" opacity="0.35" fill="url(#SVGID_2_)" width="1" height="30"/>
+<rect fill="none" width="10" height="30"/>
+<rect opacity="0.1" fill="#FFFFFF" width="7" height="9"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_pressed_t.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="50px" height="10px" viewBox="0 0 50 10" enable-background="new 0 0 50 10" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="50" height="10"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="25.0005" y1="50.1279" x2="25.0005" y2="0.2466">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<rect fill="url(#SVGID_1_)" width="50" height="10"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="24.9995" y1="0.1157" x2="24.9995" y2="49.8868">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<rect opacity="0.35" fill="url(#SVGID_2_)" width="50" height="1"/>
+<rect fill="none" width="50" height="10"/>
+<rect y="3" opacity="0.1" fill="#FFFFFF" width="50" height="7"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_pressed_tl.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="10" height="10"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5" y1="50.1279" x2="5" y2="0.2466">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M10,0H5C2.238,0,0,2.238,0,5v5h10V0z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="5" y1="0.1157" x2="5" y2="49.8868">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<path opacity="0.35" fill="url(#SVGID_2_)" d="M1,5c0-2.206,1.794-4,4-4h5V0H5C2.238,0,0,2.238,0,5v5h1V5z"/>
+<rect fill="none" width="10" height="10"/>
+<path opacity="0.1" fill="#FFFFFF" d="M10,3H5C3.897,3,3,3.897,3,5v5h7V3z"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_fr_btn_green_pressed_tr.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="10px" height="10px" viewBox="0 0 10 10" enable-background="new 0 0 10 10" xml:space="preserve">
+<defs>
+</defs>
+<rect fill="none" width="10" height="10"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="5" y1="50.1279" x2="5" y2="0.2466">
+ <stop offset="0" style="stop-color:#85BF24"/>
+ <stop offset="1" style="stop-color:#387300"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M10,5c0-2.762-2.238-5-5-5H0v10h10V5z"/>
+<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="5" y1="0.1157" x2="5" y2="49.8868">
+ <stop offset="0" style="stop-color:#FFFFFF"/>
+ <stop offset="1" style="stop-color:#999999"/>
+</linearGradient>
+<path opacity="0.35" fill="url(#SVGID_2_)" d="M10,5c0-2.762-2.238-5-5-5H0v1h5c2.206,0,4,1.794,4,4v5h1V5z"/>
+<rect fill="none" width="10" height="10"/>
+<path opacity="0.1" fill="#FFFFFF" d="M7,5c0-1.103-0.896-2-2-2H0v7h7V5z"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_mono_answer_call.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve">
+<defs>
+</defs>
+<g opacity="0.5">
+ <rect fill="none" width="30" height="30"/>
+</g>
+<path d="M28.578,7.523l-7.359,4.248c-0.364,0.152-0.771,0.057-0.953-0.256l-1.277-2.142c-0.002,0.002-0.006,0.007-0.007,0.008
+ c-0.001-0.001,0-0.003-0.001-0.004c-1.119,0.582-3.617,2.223-5.187,3.79c-1.632,1.635-3.149,3.394-4.417,5.576
+ c0,0-0.006,0.008-0.008,0.01c0.009,0.002,0.018,0.002,0.027,0.003l2.725,1.743c0.344,0.222,0.412,0.706,0.158,1.078L7.486,28.62
+ c-0.254,0.37-0.736,0.491-1.081,0.268c0,0-0.298-0.194-1.021-0.83c-0.001,0-0.002,0-0.003,0c-0.394-0.347-0.411-0.476-0.785-0.925
+ c-0.319-0.385-0.573-0.765-0.783-1.114c-0.001-0.001-0.004,0-0.005-0.002c-0.043-0.071-0.081-0.139-0.119-0.207
+ c-0.005-0.009-0.01-0.018-0.015-0.024c-0.391-0.698-0.56-1.211-0.56-1.211c-0.178-0.688-0.252-3.057,0.563-5.205
+ c0.52-1.364,3.24-5.672,6.42-8.854c3.181-3.182,8.125-6.349,10.3-7.005c2.176-0.656,3.903-0.556,4.417-0.374
+ c0,0,1.326,0.434,2.53,1.536c0.401,0.367,0.439,0.382,0.751,0.765c0.002,0.003,0,0.006,0.002,0.008
+ c-0.002-0.002-0.002-0.004-0.004-0.005c0.615,0.757,0.818,1.062,0.818,1.062C29.111,6.844,28.961,7.304,28.578,7.523z"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/resources/qtg_mono_voice_mailbox.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
+ <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
+]>
+<svg version="1.1"
+ xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
+ x="0px" y="0px" width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve">
+<defs>
+</defs>
+<path d="M23.5,8.5c-3.59,0-6.5,2.91-6.5,6.5c0,1.748,0.693,3.332,1.816,4.5h-7.633C12.307,18.332,13,16.748,13,15
+ c0-3.59-2.91-6.5-6.5-6.5S0,11.41,0,15s2.91,6.5,6.5,6.5h17c3.59,0,6.5-2.91,6.5-6.5S27.09,8.5,23.5,8.5z M3,15
+ c0-1.93,1.57-3.5,3.5-3.5S10,13.07,10,15s-1.57,3.5-3.5,3.5S3,16.93,3,15z M23.5,18.5c-1.93,0-3.5-1.57-3.5-3.5s1.57-3.5,3.5-3.5
+ S27,13.07,27,15S25.43,18.5,23.5,18.5z"/>
+<rect fill="none" width="30" height="30"/>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/rom/dialpad.iby Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,26 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Dialpad iby file.
+*
+*/
+
+
+#ifndef __DIALPAD_IBY__
+#define __DIALPAD_IBY__
+
+#include <data_caging_paths_for_iby.hrh>
+
+file=ABI_DIR\BUILD_DIR\dialpad.dll SHARED_LIB_DIR\dialpad.dll
+
+#endif // __DIALPAD_IBY__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/src/dialpad.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,298 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Dialpad popup
+*
+*/
+
+#include <QtGui>
+
+#include <hbframedrawer.h>
+#include <hbinstance.h>
+#include <hbeffect.h>
+#include <hbinstance.h>
+#include <hbmainwindow.h>
+#include <hbstyleloader.h>
+#include <hblineedit.h>
+#include <hbapplication.h>
+
+#include "dialpad.h"
+#include "dialpadinputfield.h"
+#include "dialpadkeypad.h"
+#include "dialpadbutton.h"
+#include "dialpadmultitaphandler.h"
+
+static const QString backgroundGraphics(":/inputmethods/qtg_fr_input_bg");
+static const QString minimizeIcon(":/inputmethods/qtg_mono_input_down");
+static const qreal DialpadCloseSwipeDistance = 0.25; //compared to total height
+static const int DialpadMaxSwipeTime = 300; // ms
+static const int DialpadCloseAnimDuration = 400; // ms
+static const int DialpadOpenAnimDuration = 200; // ms
+static const qreal DialpadComponentMargin = 0.75; // units
+static const qreal DialpadCloseHandleHeight = 2.23; // units
+
+Dialpad::Dialpad() : mMouseButtonPressedDown(false),
+ mOpenTimeLine(DialpadOpenAnimDuration),
+ mCloseTimeLine(DialpadCloseAnimDuration),
+ mAnimationOngoing(false)
+{
+ setFocusPolicy(Qt::StrongFocus);
+ setFlag(QGraphicsItem::ItemIsFocusable,true);
+
+ // create input field
+ mInputField = new DialpadInputField(this);
+
+ // create keypad
+ mKeypad = new DialpadKeypad(*mInputField,this);
+ mKeypad->setLongPressDuration(DialpadMaxSwipeTime);
+
+ // layouting params
+ qreal unit = HbDeviceProfile::current().unitValue();
+ qreal margin = DialpadComponentMargin * unit;
+ mCloseHandleHeight = DialpadCloseHandleHeight * unit;
+
+ // create popup close handler and background
+ QGraphicsWidget* closeHandle = new QGraphicsWidget(this);
+ closeHandle->setPreferredHeight(mCloseHandleHeight);
+ closeHandle->setSizePolicy(QSizePolicy::Expanding,QSizePolicy::Fixed);
+ mBackgroundDrawer = new HbFrameDrawer();
+ mIconDrawer = new HbFrameDrawer();
+
+ // popup layout
+ QGraphicsLinearLayout* popupLayout
+ = new QGraphicsLinearLayout(Qt::Vertical);
+ popupLayout->addItem(closeHandle);
+ popupLayout->addItem(mInputField);
+ popupLayout->addItem(mKeypad);
+ popupLayout->setContentsMargins(margin, 0, margin, margin);
+ popupLayout->setSpacing(margin);
+ setLayout(popupLayout);
+
+ // asterisk multitap handler
+ mMultitap = new DialpadMultitapHandler(mInputField->editor(),this);
+ mInputField->editor().installEventFilter(mMultitap);
+
+ // close animation
+ mCloseTimeLine.setEasingCurve(QEasingCurve::InQuad);
+ connect(&mCloseTimeLine, SIGNAL(finished()),
+ SLOT(closeAnimFinished()));
+ connect(&mCloseTimeLine, SIGNAL(valueChanged(qreal)),
+ SLOT(closeAnimValueChanged(qreal)));
+
+ // open animation
+ mOpenTimeLine.setEasingCurve(QEasingCurve::OutQuad);
+ connect(&mOpenTimeLine, SIGNAL(finished()),
+ SLOT(openAnimFinished()));
+ connect(&mOpenTimeLine, SIGNAL(valueChanged(qreal)),
+ SLOT(openAnimValueChanged(qreal)));
+
+ // default values
+ setPos(0,0);
+ setPreferredSize(360,360);
+ setZValue(0x00004000); // Hb PopupZValueRangeStart
+ hide();
+
+ // custom button style
+ HbStyleLoader::registerFilePath(":/dialpad.css");
+ HbStyleLoader::registerFilePath(":/dialpad.dialpadbutton.widgetml");
+}
+
+Dialpad::~Dialpad()
+{
+ delete mBackgroundDrawer;
+ delete mIconDrawer;
+}
+
+
+void Dialpad::paint(
+ QPainter* painter,
+ const QStyleOptionGraphicsItem* option,
+ QWidget* widget)
+{
+ Q_UNUSED(option);
+ Q_UNUSED(widget);
+
+ // paint popup background
+ mBackgroundDrawer->setFrameGraphicsName(backgroundGraphics);
+ mBackgroundDrawer->setFrameType(HbFrameDrawer::ThreePiecesVertical);
+ mBackgroundDrawer->setFillWholeRect(true);
+
+ QRectF rect = boundingRect();
+ mBackgroundDrawer->setBorderWidths(0.0, mCloseHandleHeight, 0.0,
+ (rect.height()-mCloseHandleHeight)/2.0);
+ mBackgroundDrawer->paint(painter, rect);
+
+ mIconDrawer->setFrameType(HbFrameDrawer::OnePiece);
+ rect.setLeft((rect.width() - mCloseHandleHeight)/2);
+ rect.setWidth(mCloseHandleHeight);
+ rect.setHeight(mCloseHandleHeight);
+ mIconDrawer->setFrameGraphicsName(minimizeIcon);
+ mIconDrawer->paint(painter, rect);
+}
+
+void Dialpad::openDialpad()
+{
+ HbMainWindow* window = hbInstance->allMainWindows().at(0);
+ window->scene()->addItem(this);
+ connect(window,SIGNAL(aboutToChangeOrientation()),
+ SLOT(orientationChangeStarted()));
+ connect(window,SIGNAL(orientationChanged(Qt::Orientation)),
+ SLOT(orientationChangeFinished()));
+
+ // set offset for open animation
+ mPosition = pos();
+ qreal height = geometry().height();
+ setPos(mPosition.x(),mPosition.y()+height);
+
+ show();
+
+ setFocusProxy(&mInputField->editor());
+ mInputField->editor().setFocus();
+
+ mOpenTimeLine.start();
+ mAnimationOngoing = true;
+}
+
+void Dialpad::closeDialpad()
+{
+ close();
+
+ HbMainWindow* window = hbInstance->allMainWindows().at(0);
+ window->scene()->removeItem(this);
+ disconnect(window,SIGNAL(aboutToChangeOrientation()));
+ disconnect(window,SIGNAL(orientationChanged(Qt::Orientation)));
+}
+
+HbLineEdit& Dialpad::editor() const
+{
+ return mInputField->editor();
+}
+
+void Dialpad::setCallButtonEnabled(bool enabled)
+{
+ mKeypad->setCallButtonEnabled(enabled);
+}
+
+bool Dialpad::sceneEvent(QEvent *event)
+{
+ return handleSceneEvent(event);
+}
+
+bool Dialpad::sceneEventFilter(QGraphicsItem *watched, QEvent *event)
+{
+ Q_UNUSED(watched);
+
+ return handleSceneEvent(event);
+}
+
+bool Dialpad::handleSceneEvent(QEvent *event)
+{
+ // handle close swipe gesture
+ if (event->type() == QEvent::GraphicsSceneMousePress) {
+ mMouseButtonPressedDown = true;
+ mSwipeTimer.start();
+ } else if (event->type() == QEvent::GraphicsSceneMouseRelease &&
+ mMouseButtonPressedDown) {
+ mMouseButtonPressedDown = false;
+ QGraphicsSceneMouseEvent *mouseEvent =
+ static_cast<QGraphicsSceneMouseEvent*> (event);
+
+ // check if mouse has moved DialpadCloseSwipeDistance vertically
+ QPointF delta = mouseEvent->scenePos() -
+ mouseEvent->buttonDownScenePos(Qt::LeftButton);
+
+ qreal height = geometry().height() * DialpadCloseSwipeDistance;
+
+ if ( (delta.y() >= height) &&
+ (mSwipeTimer.elapsed() <= DialpadMaxSwipeTime) &&
+ !mAnimationOngoing) {
+ mCloseTimeLine.start();
+ mAnimationOngoing = true;
+ }
+ }
+
+ return false;
+}
+
+void Dialpad::showEvent(QShowEvent *event)
+{
+ HbWidget::showEvent(event);
+
+ // for closing swipe gesture
+ installSceneEventFilter(this);
+ setFiltersChildEvents(true);
+}
+
+void Dialpad::hideEvent(QHideEvent *event)
+{
+ HbWidget::hideEvent(event);
+ setFiltersChildEvents(false);
+ removeSceneEventFilter(this);
+}
+
+void Dialpad::closeEvent(QCloseEvent * event)
+{
+ HbWidget::closeEvent(event);
+ emit aboutToClose();
+}
+
+void Dialpad::closeAnimValueChanged(qreal value)
+{
+ QPointF currentPos = pos();
+ QPointF newPos;
+ qreal height = geometry().height();
+
+ newPos.setX(currentPos.x());
+ newPos.setY(mPosition.y()+(height*value));
+
+ setPos(newPos);
+}
+
+
+void Dialpad::closeAnimFinished()
+{
+ mAnimationOngoing = false;
+ closeDialpad();
+ setPos(mPosition);
+}
+
+void Dialpad::openAnimValueChanged(qreal value)
+{
+ QPointF currentPos = pos();
+ QPointF newPos;
+ qreal height = geometry().height();
+
+ newPos.setX(currentPos.x());
+ newPos.setY(mPosition.y()+(height*(1-value)));
+
+ setPos(newPos);
+}
+
+void Dialpad::openAnimFinished()
+{
+ mAnimationOngoing = false;
+ setPos(mPosition);
+}
+
+void Dialpad::orientationChangeStarted()
+{
+ hide();
+ // needs to re-create grid layout to get
+ // scale with uniform item sizes
+ mKeypad->createButtonGrid();
+}
+
+void Dialpad::orientationChangeFinished()
+{
+ show();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/src/dialpadbutton.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,63 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Custom button
+*
+*/
+
+#include <hbtextitem.h>
+#include <hbiconitem.h>
+#include <hbstyle.h>
+#include <hbcolorscheme.h>
+#include <hbevent.h>
+
+#include "dialpadbutton.h"
+
+DialpadButton::DialpadButton(QGraphicsItem *parent)
+ : HbPushButton(parent)
+{
+}
+
+DialpadButton::~DialpadButton()
+{
+}
+
+void DialpadButton::changeEvent(QEvent *event)
+{
+ if (event->type() == HbEvent::ThemeChanged) {
+ updatePrimitives();
+ }
+
+ HbPushButton::changeEvent(event);
+}
+
+bool DialpadButton::sceneEvent(QEvent *event)
+{
+ bool result = HbPushButton::sceneEvent(event);
+
+ if (event->type() == QEvent::UngrabMouse) {
+ if (isDown()) {
+ // this is needed in situation, where
+ // longpress launches a dialog (vmbx)
+ // and button release event goes to
+ // dialog (HbPopup grabs mouse).
+ setDown(false);
+ emit clicked();
+ emit released();
+ }
+ }
+
+ return result;
+}
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/src/dialpadbuttonstyle.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,188 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Custom button style
+*
+*/
+
+#include <hbicon.h>
+#include <hbstyleoptionpushbutton.h>
+#include <hbframeitem.h>
+#include <hbframedrawer.h>
+#include <hbiconitem.h>
+#include <hbtextitem.h>
+#include <hbcolorscheme.h>
+#include "dialpadbuttonstyle.h"
+
+DialpadButtonStyle::DialpadButtonStyle()
+ : mButtonStyle(NormalButtonStyle)
+{
+}
+
+DialpadButtonStyle::~DialpadButtonStyle()
+{
+}
+
+void DialpadButtonStyle::updatePrimitive(
+ QGraphicsItem *item,
+ HbStyle::Primitive primitive,
+ const QStyleOption *option ) const
+{
+ switch(primitive){
+ case P_PushButton_background:{
+ const HbStyleOptionPushButton *opt =
+ qstyleoption_cast<const HbStyleOptionPushButton *>(option);
+ HbFrameItem *frameItem = qgraphicsitem_cast<HbFrameItem*>( item );
+ if(!frameItem)
+ return;
+
+ frameItem->setZValue(-1.0);
+ if(opt->backgroundFrameDrawer &&!(opt->backgroundFrameDrawer->isNull())) {
+ frameItem->setFrameDrawer( (opt->backgroundFrameDrawer));
+ } else {
+ QString frameGraphicsName;
+ QIcon::Mode mode = QIcon::Disabled;
+ QIcon::State state = QIcon::Off;
+ if (opt->state & QStyle::State_Enabled)
+ mode = QIcon::Normal;
+ if (opt->state & QStyle::State_Active)
+ mode = QIcon::Active;
+ if (opt->state & QStyle::State_Selected)
+ mode = QIcon::Selected;
+ if (opt->state & QStyle::State_On)
+ state = QIcon::On;
+
+ if (mode == QIcon::Disabled && state == QIcon::Off) {
+ frameGraphicsName = "qtg_fr_btn_disabled";
+ } else if (mode == QIcon::Normal && state == QIcon::On) {
+ if (mButtonStyle==CallButtonStyle) {
+ frameGraphicsName = ":/qtg_fr_btn_green_pressed";
+ } else if (mButtonStyle==NormalButtonStyle) {
+ frameGraphicsName = "qtg_fr_button_keypad_pressed";
+ } else {
+ frameGraphicsName = "qtg_fr_button_function_pressed";
+ }
+ } else if (mode == QIcon::Selected && state == QIcon::Off) {
+ frameGraphicsName = "qtg_fr_btn_highlight";
+ } else {
+ if (mButtonStyle==CallButtonStyle) {
+ frameGraphicsName = ":/qtg_fr_btn_green_normal";
+ } else if (mButtonStyle==NormalButtonStyle) {
+ frameGraphicsName = "qtg_fr_button_keypad_normal";
+ } else {
+ frameGraphicsName = "qtg_fr_button_function_normal";
+ }
+ }
+
+ frameItem->frameDrawer().setFrameGraphicsName(frameGraphicsName);
+ if (!opt->background.isNull()) {
+ QString customName = opt->background.iconName(mode, state);
+ frameItem->frameDrawer().setFrameGraphicsName(customName);
+ frameItem->setGeometry(opt->rect);
+ frameItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
+ break;
+ }
+ frameItem->frameDrawer().setFrameType(HbFrameDrawer::NinePieces);
+ }
+
+ frameItem->setGeometry(opt->rect);
+ break;
+ }
+
+ case P_PushButton_icon: {
+ HbStyle::updatePrimitive(item,primitive,option);
+
+ // override color (todo: via css, when supported by fw)
+ const HbStyleOptionPushButton *opt =
+ qstyleoption_cast<const HbStyleOptionPushButton *>(option);
+ QIcon::Mode mode = QIcon::Disabled;
+ QIcon::State state = QIcon::Off;
+ if (opt->state & QStyle::State_Enabled)
+ mode = QIcon::Normal;
+ if (opt->state & QStyle::State_On)
+ state = QIcon::On;
+
+ if (mButtonStyle==CallButtonStyle &&
+ mode == QIcon::Normal) {
+ if (state==QIcon::On) {
+ QColor color(HbColorScheme::color("answer_pressed"));
+ setIconColor(item,color);
+ } else {
+ QColor color(HbColorScheme::color("answer_normal"));
+ setIconColor(item,color);
+ }
+ } else if (mButtonStyle==NormalButtonStyle) {
+ QColor color;
+ color = HbColorScheme::color("input_button_normal");
+ setIconColor(item,color);
+ } else { // function button
+ QColor color;
+ color = HbColorScheme::color("input_function_normal");
+ setIconColor(item,color);
+ }
+ break;
+ }
+
+ case P_PushButton_text: {
+ HbStyle::updatePrimitive(item,primitive,option);
+ // override color (todo: via css, when supported by fw)
+ setTextColor(item);
+ break;
+ }
+
+ case P_PushButton_additionaltext: {
+ HbStyle::updatePrimitive(item,primitive,option);
+ // override color (todo: via css, when supported by fw)
+ setTextColor(item);
+ break;
+ }
+
+ default:
+ HbStyle::updatePrimitive(item,primitive,option);
+ break;
+ } // switch
+}
+
+void DialpadButtonStyle::setButtonStyle(ButtonStyle style)
+{
+ mButtonStyle = style;
+}
+
+void DialpadButtonStyle::setTextColor(QGraphicsItem *item) const
+{
+ HbTextItem *textPrim = qgraphicsitem_cast<HbTextItem*>(item);
+ if (textPrim) {
+ QColor color;
+ color = HbColorScheme::color("input_button_normal");
+ if (color.isValid()) {
+ textPrim->setTextColor(color);
+ } else {
+ textPrim->setTextColor(Qt::black);
+ }
+ }
+}
+
+void DialpadButtonStyle::setIconColor(
+ QGraphicsItem *item,
+ const QColor &color ) const
+{
+ HbIconItem *iconItem = qgraphicsitem_cast<HbIconItem*>(item);
+
+ if (iconItem) {
+ if (color.isValid()) {
+ iconItem->setColor(color);
+ } else {
+ iconItem->setColor(Qt::black);
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/src/dialpadinputfield.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,117 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Input field
+*
+*/
+
+#include <QtGui>
+
+#include <hblineedit.h>
+#include <hbinputeditorinterface.h>
+#include <hbinputstandardfilters.h>
+#include <hbdeviceprofile.h>
+
+#include "dialpadinputfield.h"
+#include "dialpadbuttonstyle.h"
+#include "dialpadbutton.h"
+
+static const QString HbBackspaceIcon(":/inputmethods/qtg_mono_backspace2");
+static const int DialpadAutoRepeatInterval = 150; // ms
+static const int DialpadAutoRepeatDelay = 1000; // ms
+static const qreal DialpadComponentMargin = 0.75; // units
+static const qreal DialpadBackspaceHeight = 9.4; // units
+static const qreal DialpadInputFieldHeight = 6.3; // units
+
+DialpadInputField::DialpadInputField(QGraphicsItem* parent)
+ : HbWidget(parent)
+{
+ // create editor
+ mNumberEditor = new HbLineEdit(this);
+ HbEditorInterface editorInterface(mNumberEditor);
+ editorInterface.setFilter(HbPhoneNumberFilter::instance());
+ editorInterface.setUpAsPhoneNumberEditor();
+ editorInterface.setConstraints(HbEditorConstraintIgnoreFocus);
+
+ // create backspace button
+ mBackspace = new DialpadButton(this);
+ mFunctionButtonStyle = new DialpadButtonStyle();
+ mFunctionButtonStyle->setButtonStyle(
+ DialpadButtonStyle::FunctionButtonStyle);
+ mBackspace->setStyle(mFunctionButtonStyle);
+ mBackspace->setFocusPolicy(Qt::NoFocus);
+ mBackspace->setFlag(QGraphicsItem::ItemIsFocusable,false);
+ mBackspace->setIcon(HbIcon(HbBackspaceIcon));
+ mBackspace->setEnabled(false);
+ QString buttonName;
+ buttonName.setNum(Qt::Key_Backspace);
+ mBackspace->setObjectName(buttonName);
+ mBackspace->setAutoRepeat(true);
+ mBackspace->setAutoRepeatInterval(DialpadAutoRepeatInterval);
+ mBackspace->setAutoRepeatDelay(DialpadAutoRepeatDelay);
+
+ connect(mNumberEditor,SIGNAL(contentsChanged()),
+ SLOT(onEditorContentChanged()));
+
+ // set input field layout
+ qreal unit = HbDeviceProfile::current().unitValue();
+ mHeight = (int) DialpadInputFieldHeight * unit;
+ QGraphicsLinearLayout* layout = new QGraphicsLinearLayout;
+ layout->addItem(mNumberEditor);
+ layout->setAlignment(mNumberEditor,Qt::AlignVCenter);
+ layout->addItem(mBackspace);
+ layout->setContentsMargins(0,0,0,0);
+ layout->setSpacing(DialpadComponentMargin* unit);
+ // layout parameters
+ mBackspace->setPreferredWidth(DialpadBackspaceHeight * unit);
+ mBackspace->setSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding);
+ setLayout(layout);
+
+ HbFontSpec editFont(HbFontSpec::Primary);
+ // 85% of input field height
+ editFont.setTextHeight(mHeight*0.85);
+ mNumberEditor->setFontSpec(editFont);
+}
+
+DialpadInputField::~DialpadInputField()
+{
+ delete mFunctionButtonStyle;
+}
+
+HbLineEdit& DialpadInputField::editor() const
+{
+ return *mNumberEditor;
+}
+
+DialpadButton& DialpadInputField::backspaceButton() const
+{
+ return *mBackspace;
+}
+
+void DialpadInputField::onEditorContentChanged()
+{
+ mBackspace->setEnabled(mNumberEditor->text().length());
+}
+
+QSizeF DialpadInputField::sizeHint(
+ Qt::SizeHint which,
+ const QSizeF & constraint) const
+{
+ Q_UNUSED(which);
+ Q_UNUSED(constraint);
+
+ // input field height is fixed
+ QSizeF sh;
+ sh.setHeight(mHeight);
+ return sh;
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/src/dialpadkeypad.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,314 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Dialpad keypad
+*
+*/
+
+#include <QtGui>
+#include <hbinstance.h>
+#include <hbinputkeymapfactory.h>
+#include <hbinputkeymap.h>
+#include <hbinpututils.h>
+#include <hbinputsettingproxy.h>
+#include <hbinputlanguage.h>
+#include <hbapplication.h>
+#include <hblineedit.h>
+
+#include "dialpadkeypad.h"
+#include "dialpadbuttonstyle.h"
+#include "dialpadbutton.h"
+#include "dialpadinputfield.h"
+
+static const int DialpadRowCount = 5;
+static const int DialpadColumnCount = 3;
+
+static const int DialpadButtonToKeyCodeTable[DialpadButtonCount] =
+{
+ Qt::Key_1, Qt::Key_2, Qt::Key_3,
+ Qt::Key_4, Qt::Key_5, Qt::Key_6,
+ Qt::Key_7, Qt::Key_8, Qt::Key_9,
+ Qt::Key_Asterisk, Qt::Key_0, Qt::Key_NumberSign,
+ Qt::Key_Yes
+ // Qt::Key_BackSpace is in input field
+};
+
+DialpadKeypad::DialpadKeypad(
+ DialpadInputField& inputField,
+ QGraphicsItem* parent) :
+ HbWidget(parent), mInputField(inputField),
+ mLongPressDuration(0)
+{
+ // create signal mappers
+ mKeyPressedSignalMapper = new QSignalMapper(this);
+ connect(mKeyPressedSignalMapper,SIGNAL(mapped(int)),
+ SLOT(handleKeyPressed(int)));
+ mKeyClickedSignalMapper = new QSignalMapper(this);
+ connect(mKeyClickedSignalMapper,SIGNAL(mapped(int)),
+ SLOT(handleKeyClicked(int)));
+ mKeyReleasedSignalMapper = new QSignalMapper(this);
+ connect(mKeyReleasedSignalMapper,SIGNAL(mapped(int)),
+ SLOT(handleKeyReleased(int)));
+
+ connect(&mInputField.backspaceButton(),SIGNAL(clicked()),
+ mKeyClickedSignalMapper,SLOT(map()));
+ mKeyClickedSignalMapper->setMapping(&mInputField.backspaceButton(),
+ Qt::Key_Backspace);
+
+ // create keypad
+ mNormalButtonStyle = new DialpadButtonStyle();
+ mCallButtonStyle = new DialpadButtonStyle();
+ mCallButtonStyle->setButtonStyle(DialpadButtonStyle::CallButtonStyle);
+
+ for (int i = 0; i < DialpadButtonCount; i++) {
+ int keyCode = DialpadButtonToKeyCodeTable[i];
+
+ DialpadButton* button = new DialpadButton(this);
+ mButtons[i] = button;
+
+ button->setStretched(true);
+ button->setFocusPolicy(Qt::NoFocus);
+ button->setFlag(QGraphicsItem::ItemIsFocusable,false);
+
+ QString buttonName;
+ buttonName.setNum(keyCode);
+ button->setObjectName(buttonName);
+
+ if (keyCode==Qt::Key_Yes) {
+ button->setStyle(mCallButtonStyle);
+ HbIcon callIcon(":/qtg_mono_answer_call.svg"); // todo correct icon
+ button->setIcon(callIcon);
+ } else {
+ button->setStyle(mNormalButtonStyle);
+ }
+
+ if (keyCode==Qt::Key_1) {
+ HbIcon mboxIcon(":/qtg_mono_voice_mailbox.svg");
+ button->setIcon(mboxIcon);
+ }
+
+ // for Yes-key clicked() signal is enough
+ if (keyCode!=Qt::Key_Yes) {
+ connect(button,SIGNAL(pressed()),
+ mKeyPressedSignalMapper,SLOT(map()));
+ mKeyPressedSignalMapper->setMapping(button,keyCode);
+
+ connect(button,SIGNAL(released()),
+ mKeyReleasedSignalMapper,SLOT(map()));
+ mKeyReleasedSignalMapper->setMapping(button,keyCode);
+ }
+
+ connect(button,SIGNAL(clicked()),mKeyClickedSignalMapper,SLOT(map()));
+ mKeyClickedSignalMapper->setMapping(button,keyCode);
+ }
+
+ // set button texts
+ setButtonTexts();
+ // update button texts when input language is changed
+ connect(HbInputSettingProxy::instance(),
+ SIGNAL(globalInputLanguageChanged(HbInputLanguage)),
+ this,SLOT(setButtonTexts()));
+
+ createButtonGrid();
+
+ // timer to handle long press
+ mLongPressTimer = new QTimer(this);
+ mLongPressTimer->setSingleShot(true);
+ connect(mLongPressTimer,SIGNAL(timeout()),SLOT(handleLongPress()));
+}
+
+DialpadKeypad::~DialpadKeypad()
+{
+ delete mCallButtonStyle;
+ delete mNormalButtonStyle;
+}
+
+void DialpadKeypad::createButtonGrid()
+{
+ // button grid
+ mGridLayout = new QGraphicsGridLayout;
+
+ // 12 numeric buttons
+ int i=0;
+ for (int row = 0; row < DialpadRowCount-1; row++) {
+ for (int col = 0; col < DialpadColumnCount; col++) {
+ mGridLayout->addItem(mButtons[i],row,col);
+ i++;
+ }
+ }
+
+ // call button take the last row
+ mGridLayout->addItem(mButtons[12],4,0,1,3);
+ mGridLayout->setSpacing(0);
+ mGridLayout->setContentsMargins(0,0,0,0);
+
+ setLayout(mGridLayout);
+}
+
+void DialpadKeypad::setButtonTexts()
+{
+ HbInputLanguage inputLanguage =
+ HbInputSettingProxy::instance()->globalInputLanguage();
+ const HbKeymap *keymap =
+ HbKeymapFactory::instance()->keymap(inputLanguage.language());
+
+ mGeneratedChar.clear();
+
+ if (keymap) {
+ for (int i = 0; i < DialpadButtonCount-1; i++) {
+ int keyCode = DialpadButtonToKeyCodeTable[i];
+
+ if (keyCode == Qt::Key_Asterisk) {
+ // asterisk is not localized
+ QChar asterisk('*');
+ mButtons[i]->setText(asterisk);
+ mButtons[i]->setAdditionalText("+");
+ mGeneratedChar.insert(Qt::Key_Asterisk, asterisk);
+ continue;
+ }
+
+ if (keyCode == Qt::Key_NumberSign) {
+ // number sign is not localized
+ QChar numberSign('#');
+ mButtons[i]->setText(numberSign);
+ mButtons[i]->setAdditionalText(" ");
+ mGeneratedChar.insert(Qt::Key_NumberSign, numberSign);
+ continue;
+ }
+
+ int index = i;
+ if (keyCode==Qt::Key_0) {
+ index = i-1;
+ }
+
+ const HbMappedKey *key =
+ keymap->keyForIndex(HbKeyboardVirtual12Key, index);
+
+ if (key) {
+ QChar numberChar =
+ HbInputUtils::findFirstNumberCharacterBoundToKey(
+ key,
+ inputLanguage.language());
+
+ // button text
+ mButtons[i]->setText(numberChar);
+ mGeneratedChar.insert(keyCode,numberChar);
+
+ // additional text (letters)
+ int numberOfCharacters;
+ if (keyCode==Qt::Key_7 || keyCode == Qt::Key_9) {
+ numberOfCharacters = 4;
+ } else if (keyCode==Qt::Key_0||keyCode==Qt::Key_1) {
+ numberOfCharacters = 0;
+ } else {
+ numberOfCharacters = 3;
+ }
+
+ QString characters = key->characters(HbModifierNone);
+
+ if (numberOfCharacters==0 && keyCode!=Qt::Key_1) {
+ mButtons[i]->setAdditionalText(" ");
+ } else {
+ mButtons[i]->setAdditionalText(
+ characters.left(numberOfCharacters));
+ }
+ }
+ }
+ }
+}
+
+void DialpadKeypad::handleKeyPressed(int key)
+{
+ // Editor is updated on key release (clicked()) or on long press,
+ // to prevent editor being updated during swipe.
+ mPressedNumericKey = key;
+ mLongPressTimer->start(mLongPressDuration);
+
+ postKeyEvent(QEvent::KeyPress, key);
+}
+
+void DialpadKeypad::handleKeyClicked(int key)
+{
+ if (!isNumericKey(key)) {
+ postKeyEvent(QEvent::KeyPress, key);
+ postKeyEvent(QEvent::KeyRelease, key);
+ } else if (mPressedNumericKey) {
+ // update editor: generate key press event.
+ sendKeyEventToEditor(QEvent::KeyPress, key);
+ }
+}
+
+void DialpadKeypad::handleKeyReleased(int key)
+{
+ mLongPressTimer->stop();
+
+ postKeyEvent(QEvent::KeyRelease, key);
+}
+
+void DialpadKeypad::postKeyEvent(QEvent::Type type, int key)
+{
+ QKeyEvent *keyEvent = new QKeyEvent(type, key, Qt::NoModifier);
+ HbApplication::postEvent(hbInstance->allMainWindows().at(0),keyEvent);
+}
+
+void DialpadKeypad::sendKeyEventToEditor(QEvent::Type type, int key)
+{
+ QKeyEvent keyEvent(type, key, Qt::NoModifier, mGeneratedChar.value(key));
+ HbApplication::sendEvent(&mInputField.editor(), &keyEvent);
+}
+
+void DialpadKeypad::handleLongPress()
+{
+ // key press
+ sendKeyEventToEditor(QEvent::KeyPress, mPressedNumericKey);
+ mPressedNumericKey = 0;
+}
+
+bool DialpadKeypad::isNumericKey(int key)
+{
+ if (key==Qt::Key_Yes || key==Qt::Key_Backspace) {
+ return false;
+ } else {
+ return true;
+ }
+}
+
+void DialpadKeypad::setLongPressDuration(int duration)
+{
+ mLongPressDuration = duration;
+}
+
+void DialpadKeypad::setCallButtonEnabled(bool enabled)
+{
+ mButtons[DialpadButtonCount-1]->setEnabled(enabled);
+}
+
+void DialpadKeypad::showEvent(QShowEvent *event)
+{
+ HbWidget::showEvent(event);
+
+ // set fixed row and column dimensions
+ QSizeF effectiveSize(rect().width(),
+ rect().height());
+
+ qreal width = effectiveSize.width() / DialpadColumnCount;
+ qreal height = effectiveSize.height() / DialpadRowCount;
+
+ for (int i=0; i < DialpadColumnCount ;i++) {
+ mGridLayout->setColumnFixedWidth(i, width);
+ }
+
+ for (int i=0; i < DialpadRowCount ;i++) {
+ mGridLayout->setRowFixedHeight(i, height);
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/src/dialpadmultitaphandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,112 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Dialpad multitap handler
+*
+*/
+
+#include <QKeyEvent>
+#include <hbapplication.h>
+#include <hblineedit.h>
+#include "dialpadmultitaphandler.h"
+
+static const int DialpadMaxMultitapTime = 800; // ms
+static const int DialpadAsteriskMultitapCount = 4;
+static const int DialpadAsteriskMultitapChars[DialpadAsteriskMultitapCount] =
+ {Qt::Key_Asterisk, Qt::Key_Plus, Qt::Key_P, Qt::Key_W};
+
+
+DialpadMultitapHandler::DialpadMultitapHandler(
+ HbLineEdit& editor,
+ QObject* parent) :
+ QObject(parent),
+ mEditor(editor),
+ mAsteriskMultitapIndex(0),
+ mGeneratedAsterisk(false)
+{
+ // extra characters
+ mExtraChar.insert(Qt::Key_Asterisk, '*');
+ mExtraChar.insert(Qt::Key_Plus, '+');
+ mExtraChar.insert(Qt::Key_P, 'p');
+ mExtraChar.insert(Qt::Key_W, 'w');
+}
+
+DialpadMultitapHandler::~DialpadMultitapHandler()
+{
+}
+
+bool DialpadMultitapHandler::eventFilter(QObject *watched, QEvent *event)
+{
+ if (watched!=&mEditor) {
+ return false;
+ }
+
+ int type = event->type();
+
+ if (type==QEvent::KeyPress) {
+ QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+ if (isNumericKey(keyEvent->key()) &&
+ keyEvent->text().isEmpty() ) {
+ return true;
+ }
+ }
+
+ bool keyEventEaten = false;
+
+ if (type==QEvent::KeyPress) {
+ QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+
+ if (keyEvent->key()==Qt::Key_Asterisk) {
+ if ((mMultitapTimer.elapsed() <= DialpadMaxMultitapTime) &&
+ !mGeneratedAsterisk) {
+ // remove the last char by generated backspace
+ QKeyEvent backspaceEvent(QEvent::KeyPress,
+ Qt::Key_Backspace,
+ Qt::NoModifier, "");
+ HbApplication::sendEvent(&mEditor,&backspaceEvent);
+
+ // generate +,p,w,* character
+ mAsteriskMultitapIndex =
+ ++mAsteriskMultitapIndex % DialpadAsteriskMultitapCount;
+
+ int key = DialpadAsteriskMultitapChars[mAsteriskMultitapIndex];
+ QKeyEvent generatedEvent(QEvent::KeyPress, key,
+ Qt::KeypadModifier,
+ mExtraChar.value(key));
+ if (key==Qt::Key_Asterisk) {
+ mGeneratedAsterisk = true;
+ }
+
+ HbApplication::sendEvent(&mEditor,&generatedEvent);
+ keyEventEaten = true;
+ mMultitapTimer.start();
+ } else {
+ mMultitapTimer.start();
+ mAsteriskMultitapIndex = 0;
+ }
+
+ mGeneratedAsterisk = false;
+ }
+ }
+
+ return keyEventEaten;
+}
+
+bool DialpadMultitapHandler::isNumericKey(int key)
+{
+ if (key==Qt::Key_Yes || key==Qt::Key_Backspace) {
+ return false;
+ } else {
+ return true;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/dialpadtest/dialpadtest.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,43 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#
+
+TEMPLATE = app
+CONFIG += hb
+TARGET = dialpadtest
+DEPENDPATH += .
+
+INCLUDEPATH += .
+
+HEADERS += dialpadtestview.h
+
+SOURCES += main.cpp \
+ dialpadtestview.cpp
+
+RESOURCES += resources/dialpadtest.qrc
+
+symbian {
+TARGET.EPOCHEAPSIZE = 0x1000 0xA00000
+TARGET.CAPABILITY = CAP_APPLICATION
+} else:win32 {
+INCLUDEPATH += ../../../../phonesrv_plat/dialpad_api/inc \
+ c:/hb/include/hbcore \
+ c:/hb/include/hbwidgets
+}
+
+# Libraries
+LIBS += -ldialpad
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/dialpadtest/dialpadtestview.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,215 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <QtGui>
+#include <hbtoolbar.h>
+#include <hbaction.h>
+#include <hblabel.h>
+#include <hbdialog.h>
+#include <hbmainwindow.h>
+#include <hbmenu.h>
+#include <hblistwidget.h>
+#include <hblistwidgetitem.h>
+#include <hblineedit.h>
+#include <hbmessagebox.h>
+
+#include "dialpadtestview.h"
+#include "dialpad.h"
+
+DialpadTestView::DialpadTestView( HbMainWindow& mainWindow ) :
+ mMainWindow(mainWindow)
+{
+ setTitle("DialpadTest");
+
+ // create toolbar with launch dialer action
+ HbToolBar* tb = toolBar();
+ if (mMainWindow.orientation()==Qt::Horizontal) {
+ tb->setOrientation(mMainWindow.orientation());
+ }
+
+ tb->addAction("");
+ tb->addAction(HbIcon(":/qtg_large_tb_dialler.svg"),"",this,SLOT(openDialpad()));
+ tb->addAction("");
+
+
+ // create menu
+ menu()->addAction("Switch orientation",this,SLOT(switchOrientation()));
+ connect(&mMainWindow,
+ SIGNAL(orientationChanged(Qt::Orientation)),
+ SLOT(onOrientationChange(Qt::Orientation)));
+
+ // create view widget (recent calls list mockup)
+ createListWidget();
+
+ // create dialpad popup
+ mDialpad = new Dialpad(); // Note! no parent for popup
+ mDialpad->setCallButtonEnabled(false);
+ connect(mDialpad,SIGNAL(aboutToClose()),SLOT(onDialpadClosed()));
+ connect(&mDialpad->editor(),SIGNAL(contentsChanged()),
+ SLOT(onEditorContentChanged()));
+
+ // create key event handler
+ mLongPressTimer = new QTimer(this);
+ mLongPressTimer->setSingleShot(true);
+ connect(mLongPressTimer,SIGNAL(timeout()),this,SLOT(handleLongKeyPress()));
+ mMainWindow.installEventFilter(this);
+}
+
+DialpadTestView::~DialpadTestView()
+{
+ delete mDialpad;
+}
+
+void DialpadTestView::openDialpad()
+{
+ toolBar()->hide();
+ setDialpadPosition();
+ mDialpad->openDialpad();
+}
+
+void DialpadTestView::onDialpadClosed()
+{
+ toolBar()->show();
+ mDialpad->editor().setText(QString());
+}
+
+void DialpadTestView::onEditorContentChanged()
+{
+ mDialpad->setCallButtonEnabled(
+ mDialpad->editor().text().length());
+}
+
+void DialpadTestView::setDialpadPosition()
+{
+ QRectF screenRect = mMainWindow.layoutRect();
+
+ if (mMainWindow.orientation() == Qt::Horizontal) {
+ // dialpad takes half of the screen
+ mDialpad->setPos(QPointF(screenRect.width()/2,
+ this->scenePos().y()));
+ mDialpad->setPreferredSize(screenRect.width()/2,
+ (screenRect.height()-scenePos().y()));
+ } else {
+ qreal screenHeight = screenRect.height();
+ mDialpad->setPos(0, screenHeight/2.25);
+ mDialpad->setPreferredSize(screenRect.width(),
+ screenHeight - screenHeight/2.25);
+ }
+}
+
+void DialpadTestView::switchOrientation()
+{
+ if (mMainWindow.orientation()==Qt::Vertical) {
+ mMainWindow.setOrientation(Qt::Horizontal);
+
+ } else {
+ mMainWindow.setOrientation(Qt::Vertical);
+ }
+}
+
+void DialpadTestView::onOrientationChange(Qt::Orientation orientation)
+{
+ if (orientation==Qt::Horizontal) {
+ toolBar()->setOrientation(Qt::Horizontal);
+ }
+
+ setDialpadPosition();
+}
+
+void DialpadTestView::createListWidget()
+{
+ mListWidget = new HbListWidget(this);
+ for (int i=0; i<10; i++) {
+ HbListWidgetItem* listItem = new HbListWidgetItem;
+ QString logEvent("Log event ");
+ QString index; index.setNum(i+1);
+ logEvent.append(index);
+ listItem->setText(logEvent);
+ QString phoneNum("+35850123456");
+ phoneNum.append(index);
+ listItem->setSecondaryText(phoneNum);
+ HbIcon icon(":/qgn_prop_pb_comm_call_large.svg");
+ listItem->setDecorationIcon(icon);
+ mListWidget->addItem(listItem);
+ }
+ setWidget(mListWidget);
+}
+
+bool DialpadTestView::eventFilter(QObject* watched, QEvent * event)
+{
+ if (watched!=&mMainWindow) {
+ return false;
+ }
+
+ if (event->type() == QEvent::KeyPress) {
+ QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+ qDebug() << "KeyEventHandler: key press:" << keyEvent->key();
+
+ mPressedKey = keyEvent->text();
+
+ if (keyEvent->key()>=Qt::Key_0 && keyEvent->key()<=Qt::Key_9) {
+ mLongPressTimer->stop();
+ mLongPressTimer->start(1500);
+ }
+
+ return false;
+ } else if (event->type() == QEvent::KeyRelease) {
+ QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+ qDebug() << "KeyEventHandler: key release:" << keyEvent->key();
+
+ mLongPressTimer->stop();
+
+ if (keyEvent->key()==Qt::Key_Yes ||
+ keyEvent->key()==Qt::Key_Enter) {
+ handleDial();
+ }
+
+ return false;
+ }
+
+ return false;
+}
+
+void DialpadTestView::handleLongKeyPress()
+{
+ HbMessageBox msgBox;
+ QString msg;
+ msg.append("Long press: ");
+ msg.append(mPressedKey);
+
+ msgBox.setText(msg);
+ msgBox.setTimeout(3000);
+
+ msgBox.exec();
+}
+
+void DialpadTestView::handleDial()
+{
+ HbMessageBox msgBox;
+ QString msg;
+ if (mDialpad->editor().text().length()) {
+ msg.append("Dialing to number: ");
+ msg.append(mDialpad->editor().text());
+ } else {
+ msg.append("Please, enter phone number first");
+ }
+
+ msgBox.setText(msg);
+ msgBox.setTimeout(3000);
+
+ msgBox.exec();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/dialpadtest/dialpadtestview.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,59 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef DIALPADTESTVIEW_H
+#define DIALPADTESTVIEW_H
+
+#include <hbview.h>
+
+class HbMainWindow;
+class HbListWidget;
+class Dialpad;
+
+class DialpadTestView : public HbView
+{
+ Q_OBJECT
+
+public:
+ DialpadTestView( HbMainWindow& mainWindow );
+ ~DialpadTestView();
+
+protected:
+ bool eventFilter(QObject * watched, QEvent * event);
+
+private:
+ void createListWidget();
+ void setDialpadPosition();
+ void handleDial();
+
+private slots:
+ void openDialpad();
+ void onDialpadClosed();
+ void switchOrientation();
+ void onOrientationChange(Qt::Orientation orientation);
+ void onEditorContentChanged();
+ void handleLongKeyPress();
+
+private:
+ HbMainWindow& mMainWindow;
+ HbListWidget* mListWidget;
+ Dialpad* mDialpad;
+ QTimer* mLongPressTimer;
+ QString mPressedKey;
+};
+
+#endif // DIALPADTESTVIEW_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/dialpadtest/main.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,34 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <hbapplication.h>
+#include <hbmainwindow.h>
+#include "dialpadtestview.h"
+
+int main(int argc, char *argv[])
+{
+ HbApplication app(argc, argv);
+
+ HbMainWindow window;
+
+ DialpadTestView *view = new DialpadTestView(window);
+ window.addView(view);
+
+ window.show();
+
+ return app.exec();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/dialpadtest/resources/dialpadtest.qrc Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/">
+ <file>qtg_large_tb_dialler.svg</file>
+ <file>qgn_prop_pb_comm_call_large.svg</file>
+ </qresource>
+</RCC>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/dialpadtest/resources/qgn_prop_pb_comm_call_large.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="42" height="36" viewBox="0 0 42 36">
+<rect fill="none" height="36" width="42"/>
+<linearGradient id="SVGID_1" gradientUnits="userSpaceOnUse" x1="21.13" y1="18.42" x2="25.21" y2="26.44">
+<stop stop-color="#A2C2DD" offset="0.1"/>
+<stop stop-color="#6C83BB" offset="0.71"/>
+<stop stop-color="#003D6D" offset="0.99"/>
+</linearGradient>
+<path d="M9.919,20.012c-0.03,0.05-1.706,3.02-2.049,6.236l0.282,1.469l0.035,0.039 c2.285,2.66,7.428,3.494,7.428,3.494s4.832-2.818,6.429-7.583l0.138-1.884c-0.002-0.109-0.073-2.4-0.321-3.81 c0.136-0.128,1.521-1.512,1.521-1.512s2.437-2.316,2.651-2.522c0.8,0.645,2.519,1.63,4.218,2.009l0.066,0.015l0.062-0.03 c1.184-0.586,3.34-3.045,3.547-3.88c0.177-0.7,0.235-1.22,0.19-1.685l0.009-0.029c-0.261-2.641-1.746-4.248-1.988-4.583 c-1.077-0.67-3.352-0.977-3.745-1.006C22.815,6.717,14.876,13.439,9.919,20.012z" fill="url(#SVGID_1)"/>
+<linearGradient id="SVGID_2" gradientUnits="userSpaceOnUse" x1="38.85" y1="6.68" x2="22.72" y2="18.8">
+<stop stop-color="#E6EEF4" offset="0"/>
+<stop stop-color="#4A9900" offset="0.44"/>
+<stop stop-color="#0E4E58" offset="0.94"/>
+</linearGradient>
+<path d="M33.737,10.302l-7.315,3l-0.469,0.448c0.705,0.612,2.874,1.745,4.252,2.055 c1.175-0.504,3.182-2.946,3.373-3.716C33.794,11.228,33.807,10.738,33.737,10.302z" fill="url(#SVGID_2)"/>
+<linearGradient id="SVGID_3" gradientUnits="userSpaceOnUse" x1="34.44" y1="12.82" x2="23.12" y2="11.89">
+<stop stop-color="#E6EEF4" offset="0"/>
+<stop stop-color="#4A9900" offset="0.44"/>
+<stop stop-color="#0E4E58" offset="0.94"/>
+</linearGradient>
+<path d="M29.447,9.845l-3.218,3.318c1.287,0.897,2.83,1.572,3.887,1.861L29.447,9.845z" fill="url(#SVGID_3)"/>
+<linearGradient id="SVGID_4" gradientUnits="userSpaceOnUse" x1="35.43" y1="21.71" x2="4.58" y2="30.26">
+<stop stop-color="#E6EEF4" offset="0"/>
+<stop stop-color="#4A9900" offset="0.44"/>
+<stop stop-color="#0E4E58" offset="0.94"/>
+</linearGradient>
+<path d="M21.756,21.788L8.241,26.192l0.269,1.342c0,0,2.237,2.549,7.147,3.374 c3.281-2.195,5.399-5.396,5.971-7.339L21.756,21.788z" fill="url(#SVGID_4)"/>
+<linearGradient id="SVGID_5" gradientUnits="userSpaceOnUse" x1="3.72" y1="21.61" x2="18.19" y2="26.98">
+<stop stop-color="#E6EEF4" offset="0"/>
+<stop stop-color="#4A9900" offset="0.44"/>
+<stop stop-color="#0E4E58" offset="0.94"/>
+</linearGradient>
+<path d="M8.225,26.192c0.34-3.178,1.986-6.067,1.986-6.067l4.984,1.696l0.142,7.805 C11.516,29.052,9.462,27.395,8.225,26.192z" fill="url(#SVGID_5)"/>
+<linearGradient id="SVGID_6" gradientUnits="userSpaceOnUse" x1="30.53" y1="2.71" x2="10.42" y2="24.34">
+<stop stop-color="#DCE8E4" offset="0"/>
+<stop stop-color="#43910A" offset="1"/>
+</linearGradient>
+<path d="M10.21,20.125c0.753,0.712,2.789,2.011,4.906,1.823L31.882,6.083 c-1.461-0.812-3.522-0.989-3.522-0.989C22.654,7.5,15.24,13.455,10.21,20.125z" fill="url(#SVGID_6)"/>
+<linearGradient id="SVGID_7" gradientUnits="userSpaceOnUse" x1="32.17" y1="7.71" x2="13.3" y2="28.51">
+<stop stop-color="#DCE8E4" offset="0"/>
+<stop stop-color="#43910A" offset="1"/>
+</linearGradient>
+<path d="M15.337,29.625c-0.435-1.613-0.614-5.911-0.217-7.727c4.594-6.72,11.205-12.723,16.732-15.845 c0,0,1.56,1.627,1.889,4.239c-0.384,1.651-2.3,3.746-3.629,4.724c-0.177-0.4-0.778-4.89-0.778-4.89 c-1.525,1.998-3.937,4.169-7.882,7.909c0.262,1.386,0.303,3.733,0.303,3.733C20.489,24.825,18.239,27.817,15.337,29.625z" fill="url(#SVGID_7)"/>
+</svg>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/dialpadtest/resources/qtg_large_tb_dialler.svg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="60px" version="1.1" viewBox="0 0 60 60" width="60px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<g>
+<rect fill="none" height="60" width="60"/>
+<path d="M39.189,11.974c0-0.55,0.449-1,1-1h8.004c0.551,0,1,0.45,1,1v4.437c0,0.55-0.449,1-1,1h-8.004 c-0.551,0-1-0.45-1-1V11.974z M39.189,37.485c0,0.55,0.449,1,1,1h8.004c0.551,0,1-0.45,1-1v-4.438c0-0.55-0.449-1-1-1h-8.004 c-0.551,0-1,0.45-1,1V37.485z M39.184,26.949c0,0.55,0.451,1,1,1h8.01c0.551,0,1-0.45,1-1V22.51c0-0.55-0.449-1-1-1h-8.01 c-0.549,0-1,0.45-1,1V26.949z M24.965,16.41c0,0.55,0.449,1,1,1h7.992c0.551,0,1-0.45,1-1v-4.437c0-0.55-0.449-1-1-1h-7.992 c-0.551,0-1,0.45-1,1V16.41z M24.965,37.485c0,0.55,0.449,1,1,1h7.992c0.551,0,1-0.45,1-1v-4.438c0-0.55-0.449-1-1-1h-7.992 c-0.551,0-1,0.45-1,1V37.485z M24.965,48.026c0,0.55,0.449,1,1,1h7.992c0.551,0,1-0.45,1-1v-4.444c0-0.55-0.449-1-1-1h-7.992 c-0.551,0-1,0.45-1,1V48.026z M24.961,26.949c0,0.55,0.451,1,1,1h7.996c0.551,0,1-0.45,1-1V22.51c0-0.55-0.449-1-1-1h-7.996 c-0.549,0-1,0.45-1,1V26.949z M10.816,16.41c0,0.55,0.449,1,1,1h7.996c0.551,0,1-0.45,1-1v-4.437c0-0.55-0.449-1-1-1h-7.996 c-0.551,0-1,0.45-1,1V16.41z M10.816,37.485c0,0.55,0.449,1,1,1h7.996c0.551,0,1-0.45,1-1v-4.438c0-0.55-0.449-1-1-1h-7.996 c-0.551,0-1,0.45-1,1V37.485z M10.805,26.949c0,0.55,0.451,1,1,1h8.008c0.551,0,1-0.45,1-1V22.51c0-0.55-0.449-1-1-1h-8.008 c-0.549,0-1,0.45-1,1V26.949z" fill="#666666"/>
+</g>
+</svg>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/dialpadtest/rom/dialpadtest.iby Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+#ifndef __DIALPADTEST_IBY__
+#define __DIALPADTEST_IBY__
+
+file=ABI_DIR\UREL\dialpadtest.exe PROGRAMS_DIR\dialpadtest.exe
+data=DATAZ_\resource\apps\dialpadtest.rsc \resource\apps\dialpadtest.rsc
+data=DATAZ_\private\10003a3f\import\apps\dialpadtest_reg.rsc \private\10003a3f\import\apps\dialpadtest_reg.rsc
+
+#endif
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/checkcoverage.cmd Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,55 @@
+@echo off
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+
+@echo on
+:FINAL
+
+@echo off
+
+rmdir /q /s coverage
+mkdir coverage
+cd coverage
+
+if "%1"=="mt_dialpad" (
+echo Instrumenting dialpad.dll
+call qmake^
+ ..\..\..\dialpad.pro
+call ctcwrap^
+ mingw32-make debug
+call qmake^
+ ..\%1\%1.pro
+call mingw32-make^
+ debug
+call %1.exe
+)
+
+if not "%1"=="mt_dialpad" (
+echo Instrumenting %1
+call qmake^
+ ..\%1\%1.pro
+call ctcwrap^
+ mingw32-make debug
+call %1.exe
+)
+
+call ctcpost^
+ mon.sym mon.dat^
+ -p profile.txt
+call ctc2html -i profile.txt
+cd ..
+echo All done!
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/mt_dialpad/mt_dialpad.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,361 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <QtGui>
+#include <QtTest/QtTest>
+
+#include <hbapplication.h>
+#include <hbmainwindow.h>
+#include <hbaction.h>
+#include <hbtoolbar.h>
+#include <hbview.h>
+#include <hblineedit.h>
+#include <hbmessagebox.h>
+
+#include "dialpadtest.h"
+#include "dialpad.h"
+
+const int WAIT_TIME = 300;
+const int LONGPRESS_DURATION = 1000;
+
+// helper class
+class KeyEventCatcher : public QObject
+{
+public:
+ bool eventFilter(QObject* watched, QEvent * event)
+ {
+ Q_UNUSED(watched);
+
+ if (event->type() == QEvent::KeyPress) {
+ QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+ mKeyPresses.append(keyEvent->key());
+ return false;
+ } else if (event->type() == QEvent::KeyRelease) {
+ QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);
+ mKeyReleases.append(keyEvent->key());
+ return false;
+ }
+ return false;
+ }
+
+public:
+ QList<int> mKeyPresses;
+ QList<int> mKeyReleases;
+};
+
+// test cases
+class mt_Dialpad : public QObject
+{
+ Q_OBJECT
+
+public:
+ enum MouseEventType
+ {
+ Press,
+ Release,
+ Click
+ };
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void cleanup();
+
+ void testNumericButtons();
+ void testNumericButtonLongPress();
+ void testBackspace();
+ void testAsteriskMultitap();
+ void testCallButton();
+ void testCloseGesture();
+ void testOpenDialogWhileButtonPressed();
+
+private:
+ QGraphicsWidget* getWidgetByName(const QString& name);
+ void mouseClickDialpad(int key, MouseEventType type=Click,
+ bool pause=true);
+
+private:
+ HbMainWindow* mMainWindow;
+ Dialpad* mDialpad;
+ KeyEventCatcher* mKeyCatcher;
+ QMap<int,QString> mKeyNames;
+};
+
+void mt_Dialpad::initTestCase()
+{
+ mMainWindow = new HbMainWindow;
+
+ mKeyCatcher = new KeyEventCatcher;
+ mMainWindow->installEventFilter(mKeyCatcher);
+
+ mDialpad = new Dialpad();
+
+ QRectF rect(mMainWindow->contentsRect());
+ rect.setHeight(rect.height()*0.7);
+ rect.moveTop((mMainWindow->contentsRect().height()-rect.height())/2);
+
+ mDialpad->setPreferredSize(360,400);
+ mDialpad->setPos(0,100);
+
+ mKeyNames.insert(Qt::Key_1,"49");
+ mKeyNames.insert(Qt::Key_2,"50");
+ mKeyNames.insert(Qt::Key_3,"51");
+ mKeyNames.insert(Qt::Key_4,"52");
+ mKeyNames.insert(Qt::Key_5,"53");
+ mKeyNames.insert(Qt::Key_6,"54");
+ mKeyNames.insert(Qt::Key_7,"55");
+ mKeyNames.insert(Qt::Key_8,"56");
+ mKeyNames.insert(Qt::Key_9,"57");
+ mKeyNames.insert(Qt::Key_Asterisk,"42");
+ mKeyNames.insert(Qt::Key_0,"48");
+ mKeyNames.insert(Qt::Key_NumberSign,"35");
+ mKeyNames.insert(Qt::Key_Backspace,"16777219");
+ mKeyNames.insert(Qt::Key_Yes,"16842753");
+
+ mMainWindow->show();
+ mDialpad->show();
+ mDialpad->hide();
+}
+
+void mt_Dialpad::cleanupTestCase()
+{
+ delete mDialpad;
+ delete mMainWindow;
+ delete mKeyCatcher;
+}
+
+void mt_Dialpad::cleanup()
+{
+ mKeyCatcher->mKeyPresses.clear();
+ mKeyCatcher->mKeyReleases.clear();
+ mDialpad->editor().setText(QString());
+ QTest::qWait( WAIT_TIME ); // delay between tests
+}
+
+QGraphicsWidget* mt_Dialpad::getWidgetByName(const QString& name)
+{
+ Q_ASSERT(mMainWindow!=0);
+
+ QGraphicsWidget* widget = 0;
+
+ QList<QGraphicsItem*> items = mMainWindow->scene()->items();
+ foreach (QGraphicsItem* item, items) {
+ if (item->isWidget()) {
+ QGraphicsWidget *w = static_cast<QGraphicsWidget*>(item);
+ if (w->objectName()==name) {
+ widget = w;
+ }
+ }
+ }
+
+ return widget;
+}
+
+void mt_Dialpad::mouseClickDialpad(int key, MouseEventType type, bool pause)
+{
+ QString name = mKeyNames.value(key);
+
+ QGraphicsWidget* widget = getWidgetByName(name);
+
+ if ( widget ) {
+ QPointF widgetPos = widget->scenePos() +
+ widget->rect().center();
+
+ QPoint windowPos = mMainWindow->mapFromScene( widgetPos );
+
+ if (type==Press) {
+ QTest::mousePress( mMainWindow->viewport(), Qt::LeftButton,
+ 0, windowPos );
+ } else if (type==Release) {
+ QTest::mouseRelease( mMainWindow->viewport(), Qt::LeftButton,
+ 0, windowPos );
+ } else {
+ QTest::mouseClick( mMainWindow->viewport(), Qt::LeftButton,
+ 0, windowPos );
+ }
+
+ if (pause) {
+ QTest::qWait( WAIT_TIME );
+ }
+ } else {
+ QFAIL( "Button could not be accessed!" );
+ }
+}
+
+void mt_Dialpad::testNumericButtons()
+{
+ mDialpad->openDialpad();
+ QTest::qWait( 2*WAIT_TIME );
+
+ mouseClickDialpad(Qt::Key_1);
+ mouseClickDialpad(Qt::Key_2);
+ mouseClickDialpad(Qt::Key_3);
+ mouseClickDialpad(Qt::Key_4);
+ mouseClickDialpad(Qt::Key_5);
+ mouseClickDialpad(Qt::Key_6);
+ mouseClickDialpad(Qt::Key_7);
+ mouseClickDialpad(Qt::Key_8);
+ mouseClickDialpad(Qt::Key_9);
+ mouseClickDialpad(Qt::Key_Asterisk);
+ mouseClickDialpad(Qt::Key_0);
+ mouseClickDialpad(Qt::Key_NumberSign);
+
+ QVERIFY(mDialpad->editor().text()=="123456789*0#");
+
+ QVERIFY(mKeyCatcher->mKeyPresses.count()==12);
+ QVERIFY(mKeyCatcher->mKeyReleases.count()==12);
+ QVERIFY(mKeyCatcher->mKeyPresses.at(0)==Qt::Key_1);
+ QVERIFY(mKeyCatcher->mKeyReleases.at(0)==Qt::Key_1);
+ QVERIFY(mKeyCatcher->mKeyPresses.at(11)==Qt::Key_NumberSign);
+ QVERIFY(mKeyCatcher->mKeyReleases.at(11)==Qt::Key_NumberSign);
+ mDialpad->closeDialpad();
+}
+
+void mt_Dialpad::testNumericButtonLongPress()
+{
+ mDialpad->openDialpad();
+ QTest::qWait( WAIT_TIME );
+ mouseClickDialpad(Qt::Key_1, Press);
+ QTest::qWait( LONGPRESS_DURATION );
+ mouseClickDialpad(Qt::Key_1, Release);
+ QVERIFY(mDialpad->editor().text()=="1");
+ mDialpad->closeDialpad();
+}
+
+void mt_Dialpad::testBackspace()
+{
+ mDialpad->openDialpad();
+ QTest::qWait( WAIT_TIME );
+ mouseClickDialpad(Qt::Key_1);
+ QVERIFY(mDialpad->editor().text()=="1");
+ mouseClickDialpad(Qt::Key_Backspace);
+ QVERIFY(mDialpad->editor().text()=="");
+ QVERIFY(mKeyCatcher->mKeyPresses.count()==2);
+ QVERIFY(mKeyCatcher->mKeyReleases.count()==2);
+ QVERIFY(mKeyCatcher->mKeyPresses.at(1)==Qt::Key_Backspace);
+ QVERIFY(mKeyCatcher->mKeyReleases.at(1)==Qt::Key_Backspace);
+ // test repeats
+ QTest::qWait( WAIT_TIME );
+ mouseClickDialpad(Qt::Key_1);
+ mouseClickDialpad(Qt::Key_2);
+ mouseClickDialpad(Qt::Key_3);
+ QVERIFY(mDialpad->editor().text()=="123");
+ mouseClickDialpad(Qt::Key_Backspace,Press);
+ QTest::qWait( 1500 );
+ mouseClickDialpad(Qt::Key_Backspace,Release);
+ QVERIFY(mDialpad->editor().text()=="");
+ mDialpad->closeDialpad();
+}
+
+void mt_Dialpad::testAsteriskMultitap()
+{
+ mDialpad->openDialpad();
+ QTest::qWait( WAIT_TIME );
+ mouseClickDialpad(Qt::Key_Asterisk);
+ QVERIFY(mDialpad->editor().text()=="*");
+ mouseClickDialpad(Qt::Key_Asterisk);
+ QVERIFY(mDialpad->editor().text()=="+");
+ mouseClickDialpad(Qt::Key_Asterisk);
+ QVERIFY(mDialpad->editor().text()=="p");
+ mouseClickDialpad(Qt::Key_Asterisk);
+ QVERIFY(mDialpad->editor().text()=="w");
+
+ QVERIFY(mKeyCatcher->mKeyPresses.count()==4);
+ QVERIFY(mKeyCatcher->mKeyReleases.count()==4);
+ QVERIFY(mKeyCatcher->mKeyPresses.at(1)==Qt::Key_Asterisk);
+ QVERIFY(mKeyCatcher->mKeyReleases.at(1)==Qt::Key_Asterisk);
+ QVERIFY(mKeyCatcher->mKeyPresses.at(2)==Qt::Key_Asterisk);
+ QVERIFY(mKeyCatcher->mKeyReleases.at(2)==Qt::Key_Asterisk);
+
+ // test entering two asterisk
+ mDialpad->editor().setText(QString());
+ mouseClickDialpad(Qt::Key_Asterisk);
+ QTest::qWait( 1000 ); // longer than short tap
+ mouseClickDialpad(Qt::Key_Asterisk);
+ QVERIFY(mDialpad->editor().text()=="**");
+
+ mDialpad->closeDialpad();
+}
+
+void mt_Dialpad::testCallButton()
+{
+ mDialpad->openDialpad();
+ QTest::qWait( WAIT_TIME );
+ mDialpad->setCallButtonEnabled(false);
+ mouseClickDialpad(Qt::Key_Yes);
+ QVERIFY(mKeyCatcher->mKeyPresses.count()==0);
+ QVERIFY(mKeyCatcher->mKeyReleases.count()==0);
+ mDialpad->setCallButtonEnabled(true);
+ mouseClickDialpad(Qt::Key_Yes);
+ QTest::qWait( WAIT_TIME );
+ QVERIFY(mKeyCatcher->mKeyPresses.count()==1);
+ QVERIFY(mKeyCatcher->mKeyReleases.count()==1);
+ QVERIFY(mKeyCatcher->mKeyPresses.at(0)==Qt::Key_Yes);
+ QVERIFY(mKeyCatcher->mKeyReleases.at(0)==Qt::Key_Yes);
+ mDialpad->closeDialpad();
+}
+
+void mt_Dialpad::testCloseGesture()
+{
+ mDialpad->openDialpad();
+
+ // slow swipe
+ QTest::qWait( WAIT_TIME );
+ mouseClickDialpad(Qt::Key_2, Press, false);
+ QTest::qWait( 500 ); // longer than swipe
+ mouseClickDialpad(Qt::Key_8, Release, false);
+ QTest::qWait( WAIT_TIME );
+ QVERIFY(mDialpad->isVisible()==true);
+
+ // short swipe
+ QTest::qWait( WAIT_TIME );
+ mouseClickDialpad(Qt::Key_2, Press, false);
+ QTest::qWait( 200 );
+ mouseClickDialpad(Qt::Key_5, Release, false);
+ QTest::qWait( WAIT_TIME );
+ QVERIFY(mDialpad->isVisible()==true);
+
+ // ok swipe
+ mDialpad->editor().setText(QString());
+ QTest::qWait( WAIT_TIME );
+ mouseClickDialpad(Qt::Key_2, Press, false);
+ QTest::qWait( 200 );
+ mouseClickDialpad(Qt::Key_8, Release, false);
+ QVERIFY(mDialpad->editor().text()=="");
+ QTest::qWait( 1000 );
+ QVERIFY(mDialpad->isVisible()==false);
+}
+
+void mt_Dialpad::testOpenDialogWhileButtonPressed()
+{
+ mDialpad->openDialpad();
+ QTest::qWait( WAIT_TIME );
+ mouseClickDialpad(Qt::Key_5, Press);
+ QTest::qWait( LONGPRESS_DURATION );
+ HbMessageBox dlg("Dialpad test dialog");
+ dlg.setTimeout(500);
+ dlg.exec();
+ mouseClickDialpad(Qt::Key_5, Release);
+ QVERIFY(mDialpad->editor().text()=="5");
+ QVERIFY(mKeyCatcher->mKeyPresses.at(0)==Qt::Key_5);
+ QVERIFY(mKeyCatcher->mKeyReleases.at(0)==Qt::Key_5);
+ mDialpad->closeDialpad();
+}
+
+DIALPAD_TEST_MAIN(mt_Dialpad)
+#include "mt_dialpad.moc"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/mt_dialpad/mt_dialpad.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,35 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#
+
+TEMPLATE = app
+TARGET =
+INCLUDEPATH += . ../../../inc ../shared
+
+CONFIG += hb qtestlib
+
+symbian {
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+} else:win32 {
+ DESTDIR = ./
+ INCLUDEPATH += ../../../../../phonesrv_plat/dialpad_api/inc
+}
+
+#
+SOURCES += mt_dialpad.cpp
+
+#
+LIBS += -ldialpad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/runall.cmd Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,42 @@
+@echo off
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+@echo off
+
+if "%1"=="winscw" (
+call runtest.cmd ut_dialpadbuttonstyle
+call runtest.cmd ut_dialpadmultitaphandler
+call runtest.cmd mt_dialpad
+)
+
+@echo off
+if "%1"=="win32" (
+call runtest_w32.cmd ut_dialpadbuttonstyle
+call runtest_w32.cmd ut_dialpadmultitaphandler
+call runtest_w32.cmd mt_dialpad
+)
+
+@echo off
+if "%2"=="ctc" (
+call ctcpost^
+ ut_dialpad\mon.sym ut_dialpad\mon.dat^
+ -p profile.txt
+call ctc2html -i profile.txt
+)
+
+@echo off
+if "%1"=="" echo Usage: 'runall winscw' or 'runall win32'
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/runtest.cmd Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,22 @@
+@echo off
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+
+call del %1.log
+@echo on
+:FINAL
+call \epoc32\release\winscw\udeb\%1.exe -o c:\%1.log
+call type \epoc32\winscw\c\%1.log
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/runtest_w32.cmd Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,20 @@
+@echo off
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+
+@echo on
+:FINAL
+call %1\%1.exe
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/shared/dialpadtest.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef DIALPADTEST_H
+#define DIALPADTEST_H
+
+#include <QtCore>
+
+#define DIALPAD_TEST_MAIN(TestObject) \
+int main(int argc, char *argv[]) \
+{ \
+ HbApplication app(argc, argv); \
+ TestObject tc; \
+ QResource::registerResource("../hbcore.rcc"); \
+ int ret = QTest::qExec(&tc, argc, argv); \
+ /* Core dump if HbIconLoader instance is not destroyed before the application instance. */ \
+ /* HbIconLoader uses QCoreApplication::aboutToQuit() signal to destroy itself. */ \
+ /* app.exec() where the signal is normally emitted is not called here. */ \
+ /* So, invoking the signal explicitly. */ \
+ QMetaObject::invokeMethod(&app, "aboutToQuit", Qt::DirectConnection); \
+ return ret; \
+}
+
+#endif // DIALPADTEST_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/unit.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,21 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#
+
+TEMPLATE = subdirs
+SUBDIRS += ut_dialpadbuttonstyle
+SUBDIRS += ut_dialpadmultitaphandler
+SUBDIRS += mt_dialpad
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadbuttonstyle/ut_dialpadbuttonstyle.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,184 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <QtGui>
+#include <QtTest/QtTest>
+
+#include <hbapplication.h>
+#include <hbmainwindow.h>
+#include <hbframeitem.h>
+#include <hbiconitem.h>
+#include <hbtextitem.h>
+#include <hbstyle.h>
+#include <hbstyleoptionpushbutton.h>
+#include <hbcolorscheme.h>
+
+#include "dialpadtest.h"
+#include "dialpadbuttonstyle.h"
+
+class ut_DialpadButtonStyle : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+
+ void testPushButtonFrame();
+ void testTextColor();
+ void testAdditionalTextColor();
+ void testPushButtonIcon();
+
+private:
+ DialpadButtonStyle *mStyle;
+};
+
+void ut_DialpadButtonStyle::initTestCase()
+{
+ mStyle = new DialpadButtonStyle();
+}
+
+void ut_DialpadButtonStyle::cleanupTestCase()
+{
+ delete mStyle;
+}
+
+void ut_DialpadButtonStyle::testPushButtonFrame()
+{
+ HbFrameItem* item = new HbFrameItem();
+ HbStyleOptionPushButton option;
+ option.backgroundFrameDrawer = 0;
+
+ // Enabled ON
+ option.state |= QStyle::State_On;
+ option.state |= QStyle::State_Enabled;
+
+ mStyle->setButtonStyle(DialpadButtonStyle::NormalButtonStyle);
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_background,&option);
+ QVERIFY(item->frameDrawer().frameGraphicsName()=="qtg_fr_button_keypad_pressed");
+
+ mStyle->setButtonStyle(DialpadButtonStyle::FunctionButtonStyle);
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_background,&option);
+ QVERIFY(item->frameDrawer().frameGraphicsName()=="qtg_fr_button_function_pressed");
+
+ mStyle->setButtonStyle(DialpadButtonStyle::CallButtonStyle);
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_background,&option);
+ QVERIFY(item->frameDrawer().frameGraphicsName()==":/qtg_fr_btn_green_pressed");
+
+ // Enabled OFF
+ option.state &= ~QStyle::State_On;
+ option.state |= QStyle::State_Off;
+
+ mStyle->setButtonStyle(DialpadButtonStyle::NormalButtonStyle);
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_background,&option);
+ QVERIFY(item->frameDrawer().frameGraphicsName()=="qtg_fr_button_keypad_normal");
+
+ mStyle->setButtonStyle(DialpadButtonStyle::FunctionButtonStyle);
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_background,&option);
+ QVERIFY(item->frameDrawer().frameGraphicsName()=="qtg_fr_button_function_normal");
+
+ mStyle->setButtonStyle(DialpadButtonStyle::CallButtonStyle);
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_background,&option);
+ QVERIFY(item->frameDrawer().frameGraphicsName()==":/qtg_fr_btn_green_normal");
+
+ // Disabled
+ option.state &= ~QStyle::State_Enabled;
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_background,&option);
+ QVERIFY(item->frameDrawer().frameGraphicsName()=="qtg_fr_btn_disabled");
+
+ // Selected
+ option.state |= QStyle::State_Selected;
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_background,&option);
+ QVERIFY(item->frameDrawer().frameGraphicsName()=="qtg_fr_btn_highlight");
+
+ delete item;
+
+ // exception type
+ HbIconItem* item2 = new HbIconItem();
+ mStyle->updatePrimitive(item2,HbStyle::P_PushButton_background,&option);
+ delete item2;
+}
+
+void ut_DialpadButtonStyle::testTextColor()
+{
+ HbTextItem* item = new HbTextItem();
+ HbStyleOptionPushButton option;
+ option.backgroundFrameDrawer = 0;
+ QColor color;
+ color = HbColorScheme::color("input_button_normal");
+
+ // Enabled ON
+ option.state |= QStyle::State_On;
+ option.state |= QStyle::State_Enabled;
+
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_text,&option);
+
+ QVERIFY(item->textColor()==color);
+}
+
+void ut_DialpadButtonStyle::testAdditionalTextColor()
+{
+ HbTextItem* item = new HbTextItem();
+ HbStyleOptionPushButton option;
+ option.backgroundFrameDrawer = 0;
+ QColor color;
+ color = HbColorScheme::color("input_button_normal");
+
+ // Enabled ON
+ option.state |= QStyle::State_On;
+ option.state |= QStyle::State_Enabled;
+
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_additionaltext,&option);
+
+ QVERIFY(item->textColor()==color);
+}
+
+void ut_DialpadButtonStyle::testPushButtonIcon()
+{
+ HbIconItem* item = new HbIconItem();
+ HbStyleOptionPushButton option;
+ QColor funcColor(HbColorScheme::color("input_function_normal"));
+ QColor normColor(HbColorScheme::color("input_button_normal"));
+ QColor answerNormal(HbColorScheme::color("answer_normal"));
+ QColor answerPressed(HbColorScheme::color("answer_pressed"));
+
+ // Normal
+ option.state |= QStyle::State_Enabled;
+ option.state |= QStyle::State_Off;
+
+ mStyle->setButtonStyle(DialpadButtonStyle::NormalButtonStyle);
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_icon,&option);
+ QVERIFY(item->color()==normColor);
+
+ mStyle->setButtonStyle(DialpadButtonStyle::FunctionButtonStyle);
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_icon,&option);
+ QVERIFY(item->color()==funcColor);
+
+ mStyle->setButtonStyle(DialpadButtonStyle::CallButtonStyle);
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_icon,&option);
+ QVERIFY(item->color()==answerNormal);
+
+ // Pressed
+ option.state |= QStyle::State_On;
+ option.state &= ~QStyle::State_Off;
+ mStyle->setButtonStyle(DialpadButtonStyle::CallButtonStyle);
+ mStyle->updatePrimitive(item,HbStyle::P_PushButton_icon,&option);
+ QVERIFY(item->color()==answerPressed);
+}
+
+DIALPAD_TEST_MAIN(ut_DialpadButtonStyle)
+#include "ut_dialpadbuttonstyle.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadbuttonstyle/ut_dialpadbuttonstyle.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += . ../../../src
+INCLUDEPATH += . ../../../inc ../shared
+CONFIG += hb qtestlib
+
+symbian {
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+} else:win32 {
+ DESTDIR = ./
+}
+
+SOURCES += ut_dialpadbuttonstyle.cpp \
+ ../../../src/dialpadbuttonstyle.cpp
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadmultitaphandler/ut_dialpadmultitaphandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,135 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#include <QtGui>
+#include <QtTest/QtTest>
+
+#include <hbapplication.h>
+#include <hbmainwindow.h>
+#include <hblineedit.h>
+
+#include "dialpadmultitaphandler.h"
+#include "dialpadtest.h"
+
+
+class ut_DialpadMultitapHandler : public QObject
+{
+ Q_OBJECT
+
+private slots:
+ void initTestCase();
+ void cleanupTestCase();
+ void cleanup();
+
+ void testWatchedNotEditor();
+ void testNumericKeyPress();
+ void testNonNumericKeyPress();
+ void testAsterisk();
+ void testAsteriskMultitap();
+
+private:
+ QObject* mHandler;
+ HbLineEdit* mEditor;
+};
+
+void ut_DialpadMultitapHandler::initTestCase()
+{
+ mEditor = new HbLineEdit;
+ mHandler = new DialpadMultitapHandler(*mEditor);
+}
+
+void ut_DialpadMultitapHandler::cleanupTestCase()
+{
+ delete mHandler;
+ delete mEditor;
+}
+
+void ut_DialpadMultitapHandler::cleanup()
+{
+ mEditor->setText(QString());
+}
+
+void ut_DialpadMultitapHandler::testWatchedNotEditor()
+{
+ QKeyEvent asteriskPress(QEvent::KeyPress, Qt::Key_Asterisk, Qt::NoModifier);
+ QKeyEvent asteriskRelease(QEvent::KeyRelease, Qt::Key_Asterisk, Qt::NoModifier);
+ HbLineEdit edit2;
+
+ QVERIFY(mHandler->eventFilter(&edit2,&asteriskPress)==false);
+ QVERIFY(mHandler->eventFilter(&edit2,&asteriskRelease)==false);
+}
+
+void ut_DialpadMultitapHandler::testNumericKeyPress()
+{
+ QKeyEvent key1Press(QEvent::KeyPress, Qt::Key_1, Qt::NoModifier);
+ QKeyEvent key1Char(QEvent::KeyPress, Qt::Key_1, Qt::NoModifier, "1");
+ QKeyEvent key1Release(QEvent::KeyRelease, Qt::Key_1, Qt::NoModifier);
+
+ QVERIFY(mHandler->eventFilter(mEditor,&key1Press)==true);
+ QVERIFY(mHandler->eventFilter(mEditor,&key1Char)==false);
+ QVERIFY(mHandler->eventFilter(mEditor,&key1Release)==false);
+}
+
+void ut_DialpadMultitapHandler::testNonNumericKeyPress()
+{
+ QKeyEvent keyYesPress(QEvent::KeyPress, Qt::Key_Yes, Qt::NoModifier);
+ QKeyEvent keyYesRelease(QEvent::KeyRelease, Qt::Key_Yes, Qt::NoModifier);
+
+ QVERIFY(mHandler->eventFilter(mEditor,&keyYesPress)==false);
+ QVERIFY(mHandler->eventFilter(mEditor,&keyYesRelease)==false);
+
+ QKeyEvent keyBackspacePress(QEvent::KeyPress, Qt::Key_Backspace, Qt::NoModifier);
+ QKeyEvent keyBackspaceRelease(QEvent::KeyRelease, Qt::Key_Backspace, Qt::NoModifier);
+
+ QVERIFY(mHandler->eventFilter(mEditor,&keyBackspacePress)==false);
+ QVERIFY(mHandler->eventFilter(mEditor,&keyBackspaceRelease)==false);
+}
+
+void ut_DialpadMultitapHandler::testAsterisk()
+{
+ QKeyEvent asteriskPress(QEvent::KeyPress, Qt::Key_Asterisk, Qt::NoModifier);
+ QKeyEvent asteriskChar(QEvent::KeyPress, Qt::Key_Asterisk, Qt::NoModifier, "*");
+ QKeyEvent asteriskRelease(QEvent::KeyRelease, Qt::Key_Asterisk, Qt::NoModifier);
+
+ QVERIFY(mHandler->eventFilter(mEditor,&asteriskPress)==true);
+ QVERIFY(mHandler->eventFilter(mEditor,&asteriskChar)==false);
+ QTest::qWait( 1000 );
+ QVERIFY(mHandler->eventFilter(mEditor,&asteriskRelease)==false);
+}
+
+void ut_DialpadMultitapHandler::testAsteriskMultitap()
+{
+ QKeyEvent asteriskPress(QEvent::KeyPress, Qt::Key_Asterisk, Qt::NoModifier);
+ QKeyEvent asteriskChar(QEvent::KeyPress, Qt::Key_Asterisk, Qt::NoModifier, "*");
+ QKeyEvent asteriskRelease(QEvent::KeyRelease, Qt::Key_Asterisk, Qt::NoModifier);
+
+ QVERIFY(mHandler->eventFilter(mEditor,&asteriskPress)==true);
+ QVERIFY(mHandler->eventFilter(mEditor,&asteriskChar)==false);
+ QTest::qWait( 100 );
+ QVERIFY(mHandler->eventFilter(mEditor,&asteriskChar)==true); // +
+ QTest::qWait( 100 );
+ QVERIFY(mHandler->eventFilter(mEditor,&asteriskChar)==true); // p
+ QTest::qWait( 100 );
+ QVERIFY(mHandler->eventFilter(mEditor,&asteriskChar)==true); // w
+ QTest::qWait( 100 );
+ QVERIFY(mHandler->eventFilter(mEditor,&asteriskChar)==true); // *
+ QVERIFY(mHandler->eventFilter(mEditor,&asteriskRelease)==false);
+}
+
+DIALPAD_TEST_MAIN(ut_DialpadMultitapHandler)
+#include "ut_dialpadmultitaphandler.moc"
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/dialpad/tsrc/unit/ut_dialpadmultitaphandler/ut_dialpadmultitaphandler.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,32 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#
+
+TEMPLATE = app
+TARGET =
+INCLUDEPATH += . ../../../inc ../shared
+
+CONFIG += hb qtestlib
+
+symbian {
+ INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
+} else:win32 {
+ DESTDIR = ./
+}
+
+#
+SOURCES += ut_dialpadmultitaphandler.cpp \
+ ../../../src/dialpadmultitaphandler.cpp
--- a/telutils/phoneparser/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -24,7 +24,7 @@
../group/phoneparser_stub.SIS\
- /epoc32/data/z/system/install/phoneparser_stub.SIS
+ /epoc32/data/z/system/install/phoneparser_stub.sis
// IBY file exports
../rom/Phoneparser.iby CORE_MW_LAYER_IBY_EXPORT_PATH(Phoneparser.iby)
--- a/telutils/phoneparser/group/phoneparser.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/group/phoneparser.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -25,39 +25,41 @@
CAPABILITY CAP_GENERAL_DLL
SOURCEPATH ../src
-SOURCE PhoneGsmParser.cpp
-SOURCE CPhoneGsmParser.cpp
-SOURCE CPhoneGsmParserBase.cpp
-SOURCE CPhoneGsmParserResult.cpp
-SOURCE CPhoneGsmSsParser.cpp
-SOURCE CPhoneGsmSsHandler.cpp
-SOURCE CPhoneGsmSimControlParser.cpp
-SOURCE CPhoneGsmSimControlHandler.cpp
-SOURCE CPhoneGsmPhoneNumberParser.cpp
-SOURCE CPhoneGsmPhoneNumberHandler.cpp
-SOURCE CPhoneGsmOptionContainer.cpp
-SOURCE CPhoneGsmHandlerContainer.cpp
-SOURCE CPhoneGsmDummyParser.cpp
-SOURCE CPhoneGsmMiscHandler.cpp
-SOURCE CPhoneGsmParserContainer.cpp
-SOURCE CPhoneGsmSsCallParser.cpp
-SOURCE CPhoneGsmSsCallHandler.cpp
-SOURCE CPhoneGsmManufacturerParser.cpp
-SOURCE CPhoneGsmManufacturerHandler.cpp
-SOURCE CPhoneGsmPcnProcedureParser.cpp
-SOURCE CPhoneGsmPcnProcedureHandler.cpp
-SOURCE CPhoneGsmEmergencyNumberParser.cpp
-SOURCE CPhoneGsmEmergencyNumberHandler.cpp
-SOURCE CPhoneParserFeatures.cpp
-SOURCE CPhoneVoipNumberParser.cpp
-SOURCE CPhoneVoipNumberHandler.cpp
-SOURCE CPhoneGsmImeiParser.cpp
+SOURCE PhoneGsmParser.cpp
+SOURCE CPhoneGsmParser.cpp
+SOURCE CPhoneGsmParserBase.cpp
+SOURCE CPhoneGsmParserResult.cpp
+SOURCE CPhoneGsmSsParser.cpp
+SOURCE CPhoneGsmSsHandler.cpp
+SOURCE CPhoneGsmSimControlParser.cpp
+SOURCE CPhoneGsmSimControlHandler.cpp
+SOURCE CPhoneGsmPhoneNumberParser.cpp
+SOURCE CPhoneGsmPhoneNumberHandler.cpp
+SOURCE CPhoneGsmOptionContainer.cpp
+SOURCE CPhoneGsmHandlerContainer.cpp
+SOURCE CPhoneGsmDummyParser.cpp
+SOURCE CPhoneGsmMiscHandler.cpp
+SOURCE CPhoneGsmParserContainer.cpp
+SOURCE CPhoneGsmSsCallParser.cpp
+SOURCE CPhoneGsmSsCallHandler.cpp
+SOURCE CPhoneGsmManufacturerParser.cpp
+SOURCE CPhoneGsmManufacturerHandler.cpp
+SOURCE CPhoneGsmPcnProcedureParser.cpp
+SOURCE CPhoneGsmPcnProcedureHandler.cpp
+SOURCE CPhoneGsmEmergencyNumberParser.cpp
+SOURCE CPhoneGsmEmergencyNumberHandler.cpp
+SOURCE CPhoneParserFeatures.cpp
+SOURCE CPhoneVoipNumberParser.cpp
+SOURCE CPhoneVoipNumberHandler.cpp
+SOURCE CPhoneGsmImeiParser.cpp
USERINCLUDE ../inc
+// <-- QT PHONE START-->
// Default system include paths for MW layer modules.
-APP_LAYER_SYSTEMINCLUDE //for Phone Settings domain API headers
-SYSTEMINCLUDE ../../../inc // Telephonyservices internal headers
+MW_LAYER_SYSTEMINCLUDE
+// <-- QT PHONE END-->
+SYSTEMINCLUDE ../../../inc // telephonyservices internal headers
LIBRARY euser.lib
--- a/telutils/phoneparser/inc/CPhoneGsmDummyParser.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneGsmDummyParser.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMDUMMYPARSER_H
// INCLUDES
-#include "CPhoneGsmParserBase.h"
+#include "cphonegsmparserbase.h"
// CLASS DECLARATION
--- a/telutils/phoneparser/inc/CPhoneGsmEmergencyNumberParser.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneGsmEmergencyNumberParser.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
#define CPHONEGSMEMERGENCYNUMBERPARSER_H
// INCLUDES
-#include "CPhoneGsmParserBase.h"
-#include <PhCltTypes.h>
+#include "cphonegsmparserbase.h"
+#include <phclttypes.h>
// FORWARD DECLARATIONS
class CPhoneGsmOptionContainer;
--- a/telutils/phoneparser/inc/CPhoneGsmImeiParser.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneGsmImeiParser.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMIMEIPARSER_H_
// INCLUDES
-#include "CPhoneGsmParserBase.h"
+#include "cphonegsmparserbase.h"
// CONSTANTS
--- a/telutils/phoneparser/inc/CPhoneGsmManufacturerParser.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneGsmManufacturerParser.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMMANUFACTURERPARSER_H
// INCLUDES
-#include "CPhoneGsmParserBase.h"
+#include "cphonegsmparserbase.h"
// FORWARD DECLARATIONS
class CPhoneGsmOptionContainer;
--- a/telutils/phoneparser/inc/CPhoneGsmOptionContainer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneGsmOptionContainer.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
#define CPHONEGSMOPTIONCONTAINER_H
// INCLUDES
-#include "CPhoneGsmOptionContainerBase.h"
+#include "cphonegsmoptioncontainerbase.h"
// FORWARD DECLARATIONS
--- a/telutils/phoneparser/inc/CPhoneGsmParser.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneGsmParser.h Fri Mar 19 09:40:14 2010 +0200
@@ -21,7 +21,7 @@
// INCLUDES
#include <e32base.h>
-#include "CPhoneGsmParserBase.h"
+#include "cphonegsmparserbase.h"
// FORWARD DECLARATIONS
class CPhoneGsmParserResult;
--- a/telutils/phoneparser/inc/CPhoneGsmParserContainer.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneGsmParserContainer.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
-#include "CPhoneGsmParserBase.h"
+#include "cphonegsmparserbase.h"
// CLASS DECLARATION
--- a/telutils/phoneparser/inc/CPhoneGsmPcnProcedureParser.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneGsmPcnProcedureParser.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMPCNPROCEDUREPARSER_H
// INCLUDES
-#include "CPhoneGsmParserBase.h"
+#include "cphonegsmparserbase.h"
// CONSTANTS
--- a/telutils/phoneparser/inc/CPhoneGsmPhoneNumberParser.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneGsmPhoneNumberParser.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMPHONENUMBERPARSER_H
// INCLUDES
-#include "CPhoneGsmParserBase.h"
+#include "cphonegsmparserbase.h"
// FORWARD DECLARATIONS
class CPhoneGsmOptionContainer;
--- a/telutils/phoneparser/inc/CPhoneGsmSimControlParser.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneGsmSimControlParser.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,7 +20,7 @@
#define CPHONEGSMSIMCONTROLPARSER_H
// INCLUDES
-#include "CPhoneGsmParserBase.h"
+#include "cphonegsmparserbase.h"
// CONSTANTS
--- a/telutils/phoneparser/inc/CPhoneGsmSsCallParser.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneGsmSsCallParser.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
-#include "CPhoneGsmParserBase.h"
+#include "cphonegsmparserbase.h"
// CONSTANTS
--- a/telutils/phoneparser/inc/CPhoneGsmSsParser.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneGsmSsParser.h Fri Mar 19 09:40:14 2010 +0200
@@ -22,7 +22,7 @@
// INCLUDES
#include <e32base.h>
-#include "CPhoneGsmParserBase.h"
+#include "cphonegsmparserbase.h"
// CONSTANTS
--- a/telutils/phoneparser/inc/CPhoneParserFeatures.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneParserFeatures.h Fri Mar 19 09:40:14 2010 +0200
@@ -25,7 +25,7 @@
class CRepository;
// INCLUDES
-#include <MPhCltEmergencyCallObserver.h>
+#include <mphcltemergencycallobserver.h>
// FORWARD DECLARATIONS
--- a/telutils/phoneparser/inc/CPhoneVoipNumberParser.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/inc/CPhoneVoipNumberParser.h Fri Mar 19 09:40:14 2010 +0200
@@ -20,8 +20,8 @@
#define CPHONEVOIPNUMBERPARSER_H
// INCLUDES
-#include "CPhoneGsmParserBase.h"
-#include <PhCltTypes.h>
+#include "cphonegsmparserbase.h"
+#include <phclttypes.h>
// FORWARD DECLARATIONS
class CPhoneGsmOptionContainer;
--- a/telutils/phoneparser/rom/Phoneparser.iby Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/rom/Phoneparser.iby Fri Mar 19 09:40:14 2010 +0200
@@ -18,7 +18,7 @@
#ifndef __PhoneParser_IBY__
#define __PhoneParser_IBY__
-file=ABI_DIR\BUILD_DIR\PhoneParser.dll System\libs\PhoneParser.dll
+file=ABI_DIR\BUILD_DIR\PhoneParser.dll System\libs\PhoneParser.dll
data=ZSYSTEM\install\phoneparser_stub.SIS System\Install\phoneparser_stub.SIS
#endif
--- a/telutils/phoneparser/src/CPhoneGsmDummyParser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmDummyParser.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,8 +17,8 @@
// INCLUDE FILES
-#include "CPhoneGsmDummyParser.h"
-#include "CPhoneGsmParserResult.h"
+#include "CPhoneGsmDummyParser.h"
+#include "cphonegsmparserresult.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/telutils/phoneparser/src/CPhoneGsmEmergencyNumberHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmEmergencyNumberHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "CPhoneGsmEmergencyNumberHandler.h"
-#include "CPhoneGsmEmergencyNumberParser.h"
-#include "CPhoneGsmParserResult.h"
+#include "cphonegsmemergencynumberhandler.h"
+#include "CPhoneGsmEmergencyNumberParser.h"
+#include "cphonegsmparserresult.h"
// CONSTANTS
const TInt KPhoneEmergencyNumberDialParam = 0;
--- a/telutils/phoneparser/src/CPhoneGsmEmergencyNumberParser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmEmergencyNumberParser.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,10 +17,10 @@
// INCLUDE FILES
-#include "CPhoneGsmEmergencyNumberParser.h"
-#include "CPhoneGsmParserResult.h"
-#include "CPhoneGsmOptionContainer.h"
-#include "CPhoneParserFeatures.h"
+#include "CPhoneGsmEmergencyNumberParser.h"
+#include "cphonegsmparserresult.h"
+#include "CPhoneGsmOptionContainer.h"
+#include "CPhoneParserFeatures.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/telutils/phoneparser/src/CPhoneGsmHandlerContainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmHandlerContainer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,8 +17,8 @@
// INCLUDE FILES
-#include "CPhoneGsmHandlerContainer.h"
-#include "PhoneGsmParser.h"
+#include "cphonegsmhandlercontainer.h"
+#include "phonegsmparser.h"
// CONSTANTS
const TInt KPhoneHandlerArrayGranularity = 10;
--- a/telutils/phoneparser/src/CPhoneGsmImeiParser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmImeiParser.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "CPhoneGsmImeiParser.h"
-#include "CPhoneGsmParserResult.h"
-#include "CPhoneGsmOptionContainer.h"
+#include "CPhoneGsmImeiParser.h"
+#include "cphonegsmparserresult.h"
+#include "CPhoneGsmOptionContainer.h"
// CONSTANTS
--- a/telutils/phoneparser/src/CPhoneGsmManufacturerHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmManufacturerHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "CPhoneGsmManufacturerHandler.h"
-#include "CPhoneGsmManufacturerParser.h"
-#include "CPhoneGsmParserResult.h"
+#include "cphonegsmmanufacturerhandler.h"
+#include "CPhoneGsmManufacturerParser.h"
+#include "cphonegsmparserresult.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/telutils/phoneparser/src/CPhoneGsmManufacturerParser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmManufacturerParser.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,10 +17,10 @@
// INCLUDE FILES
-#include "CPhoneGsmManufacturerParser.h"
-#include "CPhoneGsmOptionContainer.h"
-#include "CPhoneGsmParserResult.h"
-#include "CPhoneParserFeatures.h"
+#include "CPhoneGsmManufacturerParser.h"
+#include "CPhoneGsmOptionContainer.h"
+#include "cphonegsmparserresult.h"
+#include "CPhoneParserFeatures.h"
// CONSTANTS
const TInt KPhoneManufacturerCodeArrayGanularity = 5;
--- a/telutils/phoneparser/src/CPhoneGsmMiscHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmMiscHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "CPhoneGsmMiscHandler.h"
-#include "CPhoneGsmParserBase.h"
-#include "CPhoneGsmParserResult.h"
+#include "cphonegsmmischandler.h"
+#include "cphonegsmparserbase.h"
+#include "cphonegsmparserresult.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/telutils/phoneparser/src/CPhoneGsmOptionContainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmOptionContainer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "CPhoneGsmOptionContainer.h"
-#include "PhoneGsmParser.h"
-#include "CPhoneParserFeatures.h"
+#include "CPhoneGsmOptionContainer.h"
+#include "phonegsmparser.h"
+#include "CPhoneParserFeatures.h"
// CONSTANTS
const TInt KPhoneGsmOptionGranularity = 5;
--- a/telutils/phoneparser/src/CPhoneGsmParser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmParser.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -20,13 +20,13 @@
// INCLUDE FILES
#include <bldvariant.hrh>
-#include "CPhoneGsmParser.h"
-#include "CPhoneGsmParserResult.h"
-#include "CPhoneGsmParserBase.h"
-#include "CPhoneGsmDummyParser.h"
-#include "CPhoneGsmOptionContainer.h"
-#include "CPhoneParserFeatures.h"
-#include "CPhoneGsmOptionContainerBase.h"
+#include "CPhoneGsmParser.h"
+#include "cphonegsmparserresult.h"
+#include "cphonegsmparserbase.h"
+#include "CPhoneGsmDummyParser.h"
+#include "CPhoneGsmOptionContainer.h"
+#include "CPhoneParserFeatures.h"
+#include "cphonegsmoptioncontainerbase.h"
// CONSTANTS
--- a/telutils/phoneparser/src/CPhoneGsmParserBase.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmParserBase.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,7 +17,7 @@
// INCLUDE FILES
-#include "CPhoneGsmParserBase.h"
+#include "cphonegsmparserbase.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/telutils/phoneparser/src/CPhoneGsmParserContainer.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmParserContainer.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,10 +19,10 @@
// INCLUDE FILES
#include <featmgr.h>
-#include "CPhoneGsmParserContainer.h"
-#include "CPhoneGsmParserResult.h"
-#include "CPhoneGsmOptionContainer.h"
-#include "PhoneGsmParser.h"
+#include "CPhoneGsmParserContainer.h"
+#include "cphonegsmparserresult.h"
+#include "CPhoneGsmOptionContainer.h"
+#include "phonegsmparser.h"
// CONSTANTS
const TInt KPhoneParserArrayGranularity = 5;
--- a/telutils/phoneparser/src/CPhoneGsmParserResult.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmParserResult.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,9 +19,9 @@
// INCLUDE FILES
#include <featmgr.h>
-#include "CPhoneGsmParserResult.h"
-#include "CPhoneGsmParserBase.h"
-#include "PhoneGsmParser.h"
+#include "cphonegsmparserresult.h"
+#include "cphonegsmparserbase.h"
+#include "phonegsmparser.h"
// CONSTANTS
const TInt KPhoneParserResultParameterGranularity = 10;
--- a/telutils/phoneparser/src/CPhoneGsmPcnProcedureHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmPcnProcedureHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "CPhoneGsmPcnProcedureHandler.h"
-#include "CPhoneGsmParserResult.h"
-#include "CPhoneGsmPcnProcedureParser.h"
+#include "cphonegsmpcnprocedurehandler.h"
+#include "cphonegsmparserresult.h"
+#include "CPhoneGsmPcnProcedureParser.h"
// CONSTANTS
--- a/telutils/phoneparser/src/CPhoneGsmPcnProcedureParser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmPcnProcedureParser.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "CPhoneGsmPcnProcedureParser.h"
-#include "CPhoneGsmParserResult.h"
-#include "CPhoneGsmOptionContainer.h"
+#include "CPhoneGsmPcnProcedureParser.h"
+#include "cphonegsmparserresult.h"
+#include "CPhoneGsmOptionContainer.h"
// CONSTANTS
--- a/telutils/phoneparser/src/CPhoneGsmPhoneNumberHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmPhoneNumberHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "CPhoneGsmPhoneNumberHandler.h"
-#include "CPhoneGsmPhoneNumberParser.h"
-#include "CPhoneGsmParserResult.h"
+#include "cphonegsmphonenumberhandler.h"
+#include "CPhoneGsmPhoneNumberParser.h"
+#include "cphonegsmparserresult.h"
// CONSTANTS
const TInt KPhonePhoneNumberDialParam = 0;
--- a/telutils/phoneparser/src/CPhoneGsmPhoneNumberParser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmPhoneNumberParser.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,12 +17,12 @@
// INCLUDE FILES
-#include "CPhoneGsmPhoneNumberParser.h"
-#include "CPhoneGsmParserResult.h"
-#include "CPhoneGsmOptionContainer.h"
-#include "CPhoneVoipNumberParser.h"
-#include "CPhoneParserFeatures.h"
-#include "phoneParserCommon.h"
+#include "CPhoneGsmPhoneNumberParser.h"
+#include "cphonegsmparserresult.h"
+#include "CPhoneGsmOptionContainer.h"
+#include "CPhoneVoipNumberParser.h"
+#include "CPhoneParserFeatures.h"
+#include "phoneParserCommon.h"
// CONSTANTS
_LIT( KPhoneClirSuppress, "*31#" );
_LIT( KPhoneClirInvoke, "#31#" );
--- a/telutils/phoneparser/src/CPhoneGsmSimControlHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmSimControlHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,10 +17,10 @@
// INCLUDE FILES
-#include "CPhoneGsmSimControlHandler.h"
-#include "CPhoneGsmSimControlParser.h"
-#include "CPhoneGsmParserResult.h"
-#include "PhoneGsmParser.h"
+#include "cphonegsmsimcontrolhandler.h"
+#include "CPhoneGsmSimControlParser.h"
+#include "cphonegsmparserresult.h"
+#include "phonegsmparser.h"
// CONSTANTS
const TInt KPhoneSimControlOldPinPukParam = 0;
--- a/telutils/phoneparser/src/CPhoneGsmSimControlParser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmSimControlParser.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "CPhoneGsmSimControlParser.h"
-#include "CPhoneGsmParserResult.h"
-#include "CPhoneGsmOptionContainer.h"
+#include "CPhoneGsmSimControlParser.h"
+#include "cphonegsmparserresult.h"
+#include "CPhoneGsmOptionContainer.h"
// CONSTANTS
_LIT( KPhoneSimControlPinChangeCode, "04" );
--- a/telutils/phoneparser/src/CPhoneGsmSsCallHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmSsCallHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "CPhoneGsmSsCallHandler.h"
-#include "CPhoneGsmSsCallParser.h"
-#include "CPhoneGsmParserResult.h"
+#include "cphonegsmsscallhandler.h"
+#include "CPhoneGsmSsCallParser.h"
+#include "cphonegsmparserresult.h"
// ============================ MEMBER FUNCTIONS ===============================
--- a/telutils/phoneparser/src/CPhoneGsmSsCallParser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmSsCallParser.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "CPhoneGsmSsCallParser.h"
-#include "CPhoneGsmParserResult.h"
-#include "CPhoneGsmOptionContainer.h"
+#include "CPhoneGsmSsCallParser.h"
+#include "cphonegsmparserresult.h"
+#include "CPhoneGsmOptionContainer.h"
// CONSTANTS
--- a/telutils/phoneparser/src/CPhoneGsmSsHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmSsHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -19,9 +19,9 @@
// INCLUDE FILES
#include <bldvariant.hrh>
-#include "CPhoneGsmSsHandler.h"
-#include "CPhoneGsmSsParser.h"
-#include "CPhoneGsmParserResult.h"
+#include "cphonegsmsshandler.h"
+#include "CPhoneGsmSsParser.h"
+#include "cphonegsmparserresult.h"
// LOCAL FUNCTION PROTOTYPES
--- a/telutils/phoneparser/src/CPhoneGsmSsParser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneGsmSsParser.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -21,11 +21,11 @@
#include <featmgr.h>
#include <nwdefs.h>
-#include "CPhoneGsmSsParser.h"
-#include "CPhoneGsmParserResult.h"
-#include "PhoneGsmParser.h"
-#include "CPhoneGsmOptionContainer.h"
-#include "CPhoneParserFeatures.h"
+#include "CPhoneGsmSsParser.h"
+#include "cphonegsmparserresult.h"
+#include "phonegsmparser.h"
+#include "CPhoneGsmOptionContainer.h"
+#include "CPhoneParserFeatures.h"
// CONSTANTS
--- a/telutils/phoneparser/src/CPhoneParserFeatures.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneParserFeatures.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,12 +17,12 @@
// INCLUDE FILES
-#include "CPhoneParserFeatures.h"
+#include "CPhoneParserFeatures.h"
#include <featmgr.h>
#include <centralrepository.h>
#include <telservicesvariant.hrh>
#include <telservicesinternalcrkeys.h>
-#include <CPhCltEmergencyCall.h>
+#include <cphcltemergencycall.h>
// FORWARD DECLARATION
--- a/telutils/phoneparser/src/CPhoneVoipNumberHandler.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneVoipNumberHandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,9 +17,9 @@
// INCLUDE FILES
-#include "CPhoneVoipNumberHandler.h"
-#include "CPhoneVoipNumberParser.h"
-#include "CPhoneGsmParserResult.h"
+#include "cphonevoipnumberhandler.h"
+#include "CPhoneVoipNumberParser.h"
+#include "cphonegsmparserresult.h"
// CONSTANTS
const TInt KPhoneVoipNumberDialParam = 0;
--- a/telutils/phoneparser/src/CPhoneVoipNumberParser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/CPhoneVoipNumberParser.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,10 +17,10 @@
// INCLUDE FILES
-#include "CPhoneVoipNumberParser.h"
-#include "CPhoneGsmParserResult.h"
-#include "CPhoneGsmOptionContainer.h"
-#include "phoneParserCommon.h"
+#include "CPhoneVoipNumberParser.h"
+#include "cphonegsmparserresult.h"
+#include "CPhoneGsmOptionContainer.h"
+#include "phoneParserCommon.h"
// CONSTANTS
@@ -141,8 +141,7 @@
if ( !dtmfFound )
{
- if ( !nextChar.IsDigit() &&
- nextChar != KPhonePlus )
+ if ( !nextChar.IsDigit() )
{
allDigits = EFalse;
}
--- a/telutils/phoneparser/src/PhoneGsmParser.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/phoneparser/src/PhoneGsmParser.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -17,24 +17,24 @@
// INCLUDE FILES
-#include "PhoneGsmParser.h"
-#include "CPhoneGsmParser.h"
-#include "CPhoneGsmParserBase.h"
-#include "CPhoneGsmParserResult.h"
-#include "CPhoneGsmOptionContainer.h"
+#include "phonegsmparser.h"
+#include "CPhoneGsmParser.h"
+#include "cphonegsmparserbase.h"
+#include "cphonegsmparserresult.h"
+#include "CPhoneGsmOptionContainer.h"
-#include "CPhoneGsmParserContainer.h"
-#include "CPhoneGsmSsParser.h"
-#include "CPhoneGsmSimControlParser.h"
-#include "CPhoneGsmPhoneNumberParser.h"
-#include "CPhoneGsmSsCallParser.h"
-#include "CPhoneGsmManufacturerParser.h"
-#include "CPhoneGsmPcnProcedureParser.h"
-#include "CPhoneGsmManufacturerHandler.h"
-#include "CPhoneGsmEmergencyNumberParser.h"
-#include "CPhoneParserFeatures.h"
-#include "CPhoneVoipNumberParser.h"
-#include "CPhoneGsmImeiParser.h"
+#include "CPhoneGsmParserContainer.h"
+#include "CPhoneGsmSsParser.h"
+#include "CPhoneGsmSimControlParser.h"
+#include "CPhoneGsmPhoneNumberParser.h"
+#include "CPhoneGsmSsCallParser.h"
+#include "CPhoneGsmManufacturerParser.h"
+#include "CPhoneGsmPcnProcedureParser.h"
+#include "cphonegsmmanufacturerhandler.h"
+#include "CPhoneGsmEmergencyNumberParser.h"
+#include "CPhoneParserFeatures.h"
+#include "CPhoneVoipNumberParser.h"
+#include "CPhoneGsmImeiParser.h"
// CONSTANTS
@@ -375,7 +375,7 @@
KPhoneCodeWLANMAC,
CPhoneGsmManufacturerParser::EFlagCode,
CPhoneGsmManufacturerHandler::EShowWlanMac,
- KFeatureIdProtocolWlan );
+ KFeatureIdProtocolWlan );
if ( CPhoneParserFeatures::LifeTimerEnabled())
{
--- a/telutils/telephonyservice/group/bld.inf Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/telephonyservice/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -23,7 +23,7 @@
PRJ_EXPORTS
// IBY file exports
-../rom/telephonyservice.iby CORE_MW_LAYER_IBY_EXPORT_PATH(TelephonyService.iby)
+../rom/telephonyservice.iby CORE_MW_LAYER_IBY_EXPORT_PATH(telephonyservice.iby)
// SIS stubs
--- a/telutils/telephonyservice/group/telephonyservice.mmp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/telephonyservice/group/telephonyservice.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -42,6 +42,6 @@
MW_LAYER_SYSTEMINCLUDE
-LIBRARY euser.lib
-LIBRARY mediatorclient.lib
-LIBRARY estor.lib
+LIBRARY euser.lib
+LIBRARY mediatorclient.lib
+LIBRARY estor.lib
--- a/telutils/telephonyservice/inc/ccallremotepartyinformationimpl.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/telephonyservice/inc/ccallremotepartyinformationimpl.h Fri Mar 19 09:40:14 2010 +0200
@@ -2,7 +2,7 @@
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
--- a/telutils/telephonyservice/inc/cmediatorservice.h Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/telephonyservice/inc/cmediatorservice.h Fri Mar 19 09:40:14 2010 +0200
@@ -23,8 +23,8 @@
#include <e32std.h>
#include <e32base.h>
-#include <MediatorCommandInitiator.h>
-#include <MediatorEventConsumer.h>
+#include <MediatorCommandInitiator.h>
+#include <MediatorEventConsumer.h>
// forward declarations
--- a/telutils/telephonyservice/rom/telephonyservice.iby Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/telephonyservice/rom/telephonyservice.iby Fri Mar 19 09:40:14 2010 +0200
@@ -18,7 +18,7 @@
#ifndef __TelephonyService_IBY__
#define __TelephonyService_IBY__
-file=ABI_DIR\BUILD_DIR\telephonyservice.dll System\libs\telephonyservice.dll
+file=ABI_DIR\BUILD_DIR\telephonyservice.dll System\libs\telephonyservice.dll
//data=ZSYSTEM\install\phoneparser_stub.SIS System\Install\phoneparser_stub.SIS
#endif
--- a/telutils/telephonyservice/src/ccallinformation.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/telephonyservice/src/ccallinformation.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -52,7 +52,7 @@
//
EXPORT_C CCallInformation* CCallInformation::NewL()
{
-
+
CCallInformation* self = new (ELeave) CCallInformation( );
CleanupStack::PushL( self );
--- a/telutils/telephonyservice/src/ccallremotepartyinformationimpl.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/telephonyservice/src/ccallremotepartyinformationimpl.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -2,7 +2,7 @@
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0""
+* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
--- a/telutils/telephonyservice/src/cmediatorservice.cpp Tue Feb 02 01:11:09 2010 +0200
+++ b/telutils/telephonyservice/src/cmediatorservice.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -15,8 +15,8 @@
*
*/
-#include <MediatorCommandInitiator.h>
-#include <MediatorDomainUIDs.h>
+#include <MediatorCommandInitiator.h>
+#include <MediatorDomainUIDs.h>
#include <callinformation.h> //Call Information Mediator API
#include <callremotepartyinformation.h> //Call Remote Party Information Mediator API
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/bwins/xqtelephonyserviceu.def Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,17 @@
+EXPORTS
+ ?staticMetaObject@XQCallInfo@@2UQMetaObject@@B @ 1 NONAME ; struct QMetaObject const XQCallInfo::staticMetaObject
+ ?callInformationChanged@XQCallInfo@@IAEXXZ @ 2 NONAME ; void XQCallInfo::callInformationChanged(void)
+ ??_EXQCallInfo@@UAE@I@Z @ 3 NONAME ; XQCallInfo::~XQCallInfo(unsigned int)
+ ?metaObject@XQCallInfo@@UBEPBUQMetaObject@@XZ @ 4 NONAME ; struct QMetaObject const * XQCallInfo::metaObject(void) const
+ ??0XQCallInfo@@IAE@XZ @ 5 NONAME ; XQCallInfo::XQCallInfo(void)
+ ?tr@XQCallInfo@@SA?AVQString@@PBD0H@Z @ 6 NONAME ; class QString XQCallInfo::tr(char const *, char const *, int)
+ ?trUtf8@XQCallInfo@@SA?AVQString@@PBD0H@Z @ 7 NONAME ; class QString XQCallInfo::trUtf8(char const *, char const *, int)
+ ?trUtf8@XQCallInfo@@SA?AVQString@@PBD0@Z @ 8 NONAME ; class QString XQCallInfo::trUtf8(char const *, char const *)
+ ?sendCallInfoChangedSignal@XQCallInfo@@IAEXXZ @ 9 NONAME ; void XQCallInfo::sendCallInfoChangedSignal(void)
+ ?tr@XQCallInfo@@SA?AVQString@@PBD0@Z @ 10 NONAME ; class QString XQCallInfo::tr(char const *, char const *)
+ ?qt_metacall@XQCallInfo@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 11 NONAME ; int XQCallInfo::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?getStaticMetaObject@XQCallInfo@@SAABUQMetaObject@@XZ @ 12 NONAME ; struct QMetaObject const & XQCallInfo::getStaticMetaObject(void)
+ ??1XQCallInfo@@UAE@XZ @ 13 NONAME ; XQCallInfo::~XQCallInfo(void)
+ ?create@XQCallInfo@@SAPAV1@XZ @ 14 NONAME ; class XQCallInfo * XQCallInfo::create(void)
+ ?qt_metacast@XQCallInfo@@UAEPAXPBD@Z @ 15 NONAME ; void * XQCallInfo::qt_metacast(char const *)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/eabi/xqtelephonyserviceu.def Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,13 @@
+EXPORTS
+ _ZN10XQCallInfo11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
+ _ZN10XQCallInfo11qt_metacastEPKc @ 2 NONAME
+ _ZN10XQCallInfo16staticMetaObjectE @ 3 NONAME DATA 16
+ _ZN10XQCallInfo19getStaticMetaObjectEv @ 4 NONAME
+ _ZN10XQCallInfo22callInformationChangedEv @ 5 NONAME
+ _ZN10XQCallInfo25sendCallInfoChangedSignalEv @ 6 NONAME
+ _ZN10XQCallInfo6createEv @ 7 NONAME
+ _ZNK10XQCallInfo10metaObjectEv @ 8 NONAME
+ _ZTI10XQCallInfo @ 9 NONAME
+ _ZTV10XQCallInfo @ 10 NONAME
+ _ZN10XQCallInfoC2Ev @ 11 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/inc/xqcallinfoimpl.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,93 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Provides implementation class for XQCallInfo -class.
+*
+*/
+
+#ifndef XQCALLINFOIMPL_H
+#define XQCALLINFOIMPL_H
+
+#include <QObject>
+#include <QString>
+#include <mcallinformationobserver.h>
+
+#include "xqcallinfo.h"
+
+// forward declarations
+class CCallInformation;
+class CCallInfoIter;
+
+/*!
+ XQCallInfoImpl
+ This class provides implementation for XQCallInfo -class.
+*/
+class XQCallInfoImpl :
+ public XQCallInfo,
+ public MCallInformationObserver
+ {
+ Q_OBJECT
+public:
+
+ /*!
+ Constructor
+ */
+ explicit XQCallInfoImpl();
+
+ /*!
+ Destructor
+ */
+ virtual ~XQCallInfoImpl();
+
+ /*!
+ \fn void getCalls( QList<CallInfo> &calls )
+
+ Gets the snapshot of ongoing calls.
+ */
+ void getCalls(QList<CallInfo> &calls);
+
+ /*!
+ \fn bool isCallInState( CCPCall::TCallState state ) const
+
+ Returns information whether call in given state exist.
+ */
+ bool isCallInState(CCPCall::TCallState state) const;
+
+public: // from MCallInformationObserver.
+
+ /*!
+ \fn void CallInformationChanged()
+
+ Informs XQCallinfo that there are changes in ongoing calls.
+ */
+ void CallInformationChanged();
+
+private:
+
+ /*!
+ \fn void setCallInformationObserver()
+
+ Sets the observer for changes in current calls
+ */
+ void setCallInformationObserver();
+
+private:
+
+ CCallInformation *m_CallInformation;
+
+ CCallInfoIter *m_Iter;
+ };
+
+
+#endif // XQCALLINFOIMPL_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/rom/xqtelephonyservice.iby Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,24 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:s
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: XQTelephonyService's iby definitions.
+ *
+*/
+
+#ifndef __XQTELEPHONYSERVICE_IBY__
+#define __XQTELEPHONYSERVICE_IBY__
+
+file=ABI_DIR\BUILD_DIR\xqtelephonyservice.dll System\libs\xqtelephonyservice.dll
+
+#endif // __XQTELEPHONYSERVICE_IBY__
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/src/xqcallinfo.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,37 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Provides information about ongoing calls.
+*
+*/
+
+#include "xqcallinfoimpl.h"
+#include <QDebug>
+#include <xqcallinfo.h>
+
+
+XQCallInfo *XQCallInfo::create()
+{
+ qDebug()<<"XQCallInfo::create()";
+ return new XQCallInfoImpl();
+}
+
+void XQCallInfo::sendCallInfoChangedSignal()
+{
+ qDebug()<<"XQCallInfo::sendCallInfoChangedSignal()";
+ emit callInformationChanged ();
+}
+
+XQCallInfo::XQCallInfo()
+{
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/src/xqcallinfoimpl.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,66 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Provides implementation for XQCallInfo -class.
+*
+*/
+
+#include "xqcallinfoimpl.h"
+#include <QDebug>
+#include <ccallinformation.h>
+#include <ccallinfoiter.h>
+#include <mcall.h>
+
+XQCallInfoImpl::XQCallInfoImpl(): XQCallInfo(), m_CallInformation(0)
+{
+ TRAPD( error, m_CallInformation = CCallInformation::NewL());
+ qt_symbian_throwIfError(error);
+ setCallInformationObserver();
+}
+
+XQCallInfoImpl::~XQCallInfoImpl()
+{
+ delete m_CallInformation;
+}
+
+void XQCallInfoImpl::setCallInformationObserver()
+{
+ m_CallInformation->NotifyCallInformationChanges(*this);
+}
+
+void XQCallInfoImpl::getCalls(QList<CallInfo> &calls)
+{
+ TRAPD( error, m_Iter = &m_CallInformation->GetCallsL() );
+ qt_symbian_throwIfError(error);
+
+ for (m_Iter->First(); !m_Iter->IsDone(); m_Iter->Next()) {
+ const MCall& call = m_Iter->Current();
+ CallInfo callInfo;
+ callInfo.m_Direction = call.CallDirection();
+ callInfo.m_Index = call.CallIndex();
+ callInfo.m_ServiceId = call.ServiceId();
+ callInfo.m_Type = call.CallType();
+ callInfo.m_State = call.CallState();
+ calls.append(callInfo);
+ }
+}
+
+bool XQCallInfoImpl::isCallInState(CCPCall::TCallState state) const
+{
+ return m_CallInformation->IsCallInState(state);
+}
+
+void XQCallInfoImpl::CallInformationChanged()
+{
+ XQCallInfo::sendCallInfoChangedSignal();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/tsrc/unit/runall.cmd Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,38 @@
+@echo off
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+@echo off
+
+if "%1"=="winscw" (
+call runtest.cmd ut_xqcallinfo
+)
+
+@echo off
+if "%1"=="win32" (
+call runtest_w32.cmd ut_xqcallinfo
+)
+
+@echo off
+if "%2"=="ctc" (
+call ctcpost^
+ ut_xqcallinfo\mon.sym ut_xqcallinfo\mon.dat^
+ -p profile.txt
+call ctc2html -i profile.txt
+)
+
+@echo off
+if "%1"=="" echo Usage: 'runall winscw' or 'runall win32'
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/tsrc/unit/runtest.cmd Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,22 @@
+@echo off
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+
+call del %1.log
+@echo on
+:FINAL
+call \epoc32\release\winscw\udeb\%1.exe -o c:\%1.log
+call type \epoc32\winscw\c\%1.log
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/tsrc/unit/runtest_w32.cmd Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,20 @@
+@echo off
+rem
+rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem All rights reserved.
+rem This component and the accompanying materials are made available
+rem under the terms of "Eclipse Public License v1.0"
+rem which accompanies this distribution, and is available
+rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
+rem
+rem Initial Contributors:
+rem Nokia Corporation - initial contribution.
+rem
+rem Contributors:
+rem
+rem Description:
+rem
+
+@echo on
+:FINAL
+call %1\%1.exe
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/stubs/ccallinformation.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,113 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Provides information about ongoing calls.
+*
+*/
+
+
+#include <e32base.h>
+
+#include "ccallinformation.h"
+#include "MCallInformationObserver.h"
+#include "ccallinformationimpl.h"
+
+
+// ======== MEMBER FUNCTIONS ========
+
+
+// ---------------------------------------------------------------------------
+// C++ constructor.
+// ---------------------------------------------------------------------------
+//
+CCallInformation::CCallInformation()
+ {
+
+ }
+
+
+// ---------------------------------------------------------------------------
+// Symbian second-phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CCallInformation::ConstructL()
+ {
+
+ iImpl = CCallInformationImpl::NewL();
+ }
+
+
+// ---------------------------------------------------------------------------
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+ CCallInformation* CCallInformation::NewL()
+ {
+ CCallInformation* self = new (ELeave) CCallInformation( );
+
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+
+ return self;
+ }
+
+
+
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CCallInformation::~CCallInformation()
+ {
+ delete iImpl;
+ }
+
+// ---------------------------------------------------------------------------
+// Sets observer for call information changes.
+// ---------------------------------------------------------------------------
+//
+ void CCallInformation::NotifyCallInformationChanges(
+ MCallInformationObserver& aObserver )
+ {
+ iImpl->NotifyCallInformationChanges( aObserver );
+ }
+
+// ---------------------------------------------------------------------------
+// Cancels previously placed NotifyCallInformationChangesL call.
+// ---------------------------------------------------------------------------
+//
+ void CCallInformation::CancelNotification( )
+ {
+ }
+
+// ---------------------------------------------------------------------------
+// Gets the snapshot of ongoing calls.
+// ---------------------------------------------------------------------------
+//
+ CCallInfoIter& CCallInformation::GetCallsL( )
+ {
+ return iImpl->GetCallsL( );
+ }
+
+// ---------------------------------------------------------------------------
+// Returns information whether call in given state exist.
+// ---------------------------------------------------------------------------
+//
+TBool CCallInformation::IsCallInState( CCPCall::TCallState aState ) const
+ {
+ return iImpl->IsCallInState( aState );
+ }
+
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/stubs/ccallinformation.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,111 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Provides information about ongoing calls.
+*
+*/
+
+
+#ifndef MOCK_C_CALLINFORMATION_H
+#define MOCK_C_CALLINFORMATION_H
+
+#include <e32base.h>
+
+#include "mcall.h"
+
+
+// forward declarations
+class MCallInformationObserver;
+class CCallInformationImpl;
+class CCallInfoIter;
+
+
+/**
+ * Class to be used for receiving information about ongoing calls.
+ *
+ * @code
+ * // create the CCallInformation instance e.g. when the client component is created
+ * iCallInfo = CCallInformation::NewL();
+ * iCallInfo->NotifyCallInformationChanges(*iObserver);
+ *
+ * // and use it when needed
+ * CCallInfoIter& iter = iCallInfo->GetCallsL();
+ * @endcode
+ *
+ * @lib telephonyservice.lib
+ * @since S60 v5.1
+ */
+NONSHARABLE_CLASS( CCallInformation ) : public CBase
+ {
+
+public:
+
+ /**
+ * Two-phased constructor.
+ */
+ static CCallInformation* NewL();
+
+
+ /**
+ * Destructor.
+ */
+ virtual ~CCallInformation();
+
+ /**
+ * Allows a client to be notified when there are changes in current calls.
+ * There can be only one observer per CCallInformation instance.
+ *
+ * @since S60 v5.1
+ * @param aObserver Observer for notifications.
+ */
+ void NotifyCallInformationChanges( MCallInformationObserver& aObserver );
+
+ /**
+ * Used to cancel previously placed NotifyCallInformationChanges call.
+ *
+ * @since S60 v5.1
+ */
+ void CancelNotification();
+
+ /**
+ * Gets the snapshot of ongoing calls.
+ *
+ * @since S60 v5.1
+ * @return Ongoing calls.
+ */
+ CCallInfoIter& GetCallsL( );
+
+ /**
+ * Returns information whether call in given state exist.
+ *
+ * @since S60 v5.2
+ * @param aState Specifies a call state that is used as a search key.
+ * @return ETrue if call in given state exist.
+ */
+ TBool IsCallInState( CCPCall::TCallState aState ) const;
+
+
+private:
+
+ CCallInformation();
+
+ void ConstructL();
+
+
+private: // data
+
+ CCallInformationImpl* iImpl;
+ };
+
+
+#endif // MOCK_C_CALLINFORMATION_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/stubs/ccallinformationimpl.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,142 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Provides implementation for CCallInformation -class.
+*
+*/
+
+
+#include <e32base.h>
+#include <callinformation.h> //Call Information Mediator API
+
+#include "CCallInformationImpl.h"
+#include "ccallinfoiter.h"
+#include "mcallinformationobserver.h"
+
+bool GlobalEmptyCallList;
+bool GlobalTriggerSignal;
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// C++ constructor.
+// ---------------------------------------------------------------------------
+//
+CCallInformationImpl::CCallInformationImpl()
+ {
+
+ }
+
+
+// ---------------------------------------------------------------------------
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CCallInformationImpl* CCallInformationImpl::NewL()
+ {
+ CCallInformationImpl* self = new (ELeave) CCallInformationImpl( );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CCallInformationImpl::~CCallInformationImpl()
+ {
+ delete iInfos;
+ delete iCallIter;
+
+ delete iInfosInState;
+ delete iCallStateIter;
+ }
+
+
+// ---------------------------------------------------------------------------
+// Saves the observer call information changes.
+// ---------------------------------------------------------------------------
+//
+void CCallInformationImpl::NotifyCallInformationChanges(
+ MCallInformationObserver& aObserver )
+ {
+ iObserver = &aObserver;
+ return;
+ }
+
+// ---------------------------------------------------------------------------
+// Removes the observer.
+// ---------------------------------------------------------------------------
+//
+void CCallInformationImpl::CancelNotification( )
+ {
+ iObserver = NULL;
+ return;
+ }
+
+
+// ---------------------------------------------------------------------------
+// Returns info about all calls.
+// ---------------------------------------------------------------------------
+//
+CCallInfoIter& CCallInformationImpl::GetCallsL( )
+ {
+ iInfos = CCallInfos::NewL();
+
+ if (!GlobalEmptyCallList)
+ {
+ TCallInfo callInfo;
+ int index = 0;
+ unsigned int serviceId = 1;
+ callInfo.iIndex = index;
+ callInfo.iServiceId = serviceId;
+ callInfo.iDirection= CCPCall::EMobileOriginated;
+ callInfo.iType = CCPCall::ECallTypeCSVoice;
+ callInfo.iState = CCPCall::EStateDialling;
+ iInfos->AddL(callInfo);
+
+ index++;
+ serviceId++;
+ callInfo.iIndex = index;
+ callInfo.iServiceId = serviceId;
+ callInfo.iDirection= CCPCall::EMobileTerminated;
+ callInfo.iType = CCPCall::ECallTypeCSVoice;
+ callInfo.iState = CCPCall::EStateConnected;
+ iInfos->AddL(callInfo);
+ }
+
+ iCallIter = CCallInfoIter::NewL( *iInfos );
+
+ return *iCallIter;
+ }
+
+// ---------------------------------------------------------------------------
+// Returns information whether call in given state exist.
+// ---------------------------------------------------------------------------
+//
+TBool CCallInformationImpl::IsCallInState( CCPCall::TCallState aState ) const
+ {
+ bool value(false);
+ if (aState == CCPCall::EStateConnected)
+ {
+ value = true;
+ }
+
+ if( GlobalTriggerSignal )
+ {
+ iObserver->CallInformationChanged();
+ GlobalTriggerSignal=false;
+ }
+
+ return value;
+ }
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/stubs/ccallinformationimpl.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Provides implementation class for CCallInformation -class.
+*
+*/
+
+
+#ifndef CCALLINFORMATIONIMPL_H_
+#define CCALLINFORMATIONIMPL_H_
+
+#include <e32base.h>
+#include "mcall.h"
+
+// forward declarations
+class MCallInformationObserver;
+class CCallInfoIter;
+class CCallInfos;
+
+
+/**
+ * This class provides implementation for CCallInformation -class.
+ *
+ * @lib telephonyservice.lib
+ * @since S60 v5.1
+ */
+NONSHARABLE_CLASS( CCallInformationImpl ) : public CBase
+ {
+public:
+
+ /**
+ * Two-phased constructor.
+ */
+ static CCallInformationImpl* NewL();
+
+
+ /**
+ * Destructor.
+ */
+ virtual ~CCallInformationImpl();
+
+ /**
+ * Sets the observer for changes in current calls.
+ *
+ * @since S60 v5.1
+ * @param aObserver Observer for notifications.
+ */
+ void NotifyCallInformationChanges( MCallInformationObserver& aObserver );
+
+ /**
+ * Used to cancel previously placed NotifyCallInformationChanges call.
+ *
+ * @since S60 v5.1
+ */
+ void CancelNotification();
+
+ /**
+ * Gets the snapshot of ongoing calls.
+ *
+ * @since S60 v5.1
+ * @return Ongoing calls.
+ */
+ CCallInfoIter& GetCallsL();
+
+
+ /**
+ * Returns information whether call in given state exist.
+ *
+ * @since S60 v5.2
+ * @param aState Specifies a call state that is used as a search key.
+ * @return ETrue if call in given state exist.
+ */
+ TBool IsCallInState( CCPCall::TCallState aState ) const;
+
+protected:
+
+ CCallInformationImpl();
+
+protected: //data
+ /**
+ * Observer to be notified when call information changes
+ * Not own.
+ */
+ MCallInformationObserver* iObserver;
+
+private: // data
+
+ CCallInfos* iInfos;
+ CCallInfos* iInfosInState;
+ CCallInfoIter* iCallIter;
+ CCallInfoIter* iCallStateIter;
+ };
+
+
+#endif /*CCALLINFORMATIONIMPL_H_*/
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/unit_tests.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,111 @@
+/*!
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Unit tests for DialService.
+*
+*/
+
+#include <QtTest/QtTest>
+
+#include "xqcallinfo.h"
+#include <ccpdefs.h>
+
+extern bool GlobalEmptyCallList;
+extern bool GlobalTriggerSignal;
+
+class TestXQCallInfo : public QObject
+{
+ Q_OBJECT
+public:
+ TestXQCallInfo();
+ virtual ~TestXQCallInfo();
+
+public slots:
+ void initTestCase ();
+ void cleanupTestCase ();
+
+private slots:
+ void testGetCallInfo ();
+ void testGetCallInfoEmptyCallInfo();
+ void testIsCallInState();
+
+private:
+
+ XQCallInfo *m_XQCallInfo;
+};
+
+TestXQCallInfo::TestXQCallInfo():
+ m_XQCallInfo(0)
+ {
+ }
+
+TestXQCallInfo::~TestXQCallInfo ()
+ {
+ }
+
+void TestXQCallInfo::initTestCase ()
+ {
+ GlobalEmptyCallList=false;
+ m_XQCallInfo = XQCallInfo::create();
+ }
+
+void TestXQCallInfo::cleanupTestCase ()
+ {
+ delete m_XQCallInfo;
+ }
+
+
+void TestXQCallInfo::testGetCallInfo()
+ {
+ QList<CallInfo> calls;
+ CallInfo callInfo;
+ m_XQCallInfo->getCalls(calls);
+ callInfo = calls.first();
+ CallInfo callInfo2;
+ callInfo2 = calls.last();
+
+ QCOMPARE(callInfo.callType(), CCPCall::ECallTypeCSVoice );
+ QCOMPARE(callInfo.callDirection(), CCPCall::EMobileOriginated);
+ QCOMPARE(callInfo.callState(), CCPCall::EStateDialling);
+
+ QCOMPARE(callInfo2.callType(), CCPCall::ECallTypeCSVoice );
+ QCOMPARE(callInfo2.callDirection(), CCPCall::EMobileTerminated);
+ QCOMPARE(callInfo2.callState(), CCPCall::EStateConnected);
+ }
+
+void TestXQCallInfo::testGetCallInfoEmptyCallInfo()
+ {
+ GlobalEmptyCallList=true;
+ QList<CallInfo> calls;
+ m_XQCallInfo->getCalls(calls);
+
+ QCOMPARE(calls.count(), 0 );
+ }
+
+void TestXQCallInfo::testIsCallInState()
+ {
+ GlobalTriggerSignal=true;
+ QSignalSpy spy( m_XQCallInfo, SIGNAL( callInformationChanged() ) );
+
+ GlobalEmptyCallList=false;
+ bool value(false);
+ const CCPCall::TCallState state(CCPCall::EStateConnected );
+ value = m_XQCallInfo->isCallInState(CCPCall::EStateConnected);
+
+ QCOMPARE(value, true );
+ QCOMPARE( spy.count(), 1 );
+ }
+
+
+QTEST_MAIN(TestXQCallInfo)
+#include "unit_tests.moc"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/tsrc/unit/ut_xqcallinfo/ut_xqcallinfo.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,51 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#
+
+TEMPLATE = app
+TARGET =
+TARGET.UID3 = 0xE31F4ECE
+DEPENDPATH += .
+INCLUDEPATH += .
+CONFIG += hb
+CONFIG += qtestlib
+
+symbian {
+
+ INCLUDEPATH += \epoc32\include\platform \
+ \epoc32\include\platform\mw \
+ \epoc32\include\mw \
+ ../../../../../inc
+
+ LIBS += -lxqservice \
+ -lxqserviceutil \
+ -lxqtelephonyservice
+
+ TARGET.CAPABILITY = ALL -TCB
+ DEFINES += BUILD_XQCALLINFO
+}
+
+# Input
+HEADERS += ../../../../../phonesrv_plat/call_information_api/inc/xqcallinfo.h \
+ ../../../inc/xqcallinfoimpl.h \
+ stubs/ccallinformation.h \
+ stubs/ccallinformationimpl.h
+SOURCES += unit_tests.cpp
+SOURCES += ../../../src/xqcallinfo.cpp \
+ ../../../src/xqcallinfoimpl.cpp\
+ stubs/ccallinformation.cpp \
+ stubs/ccallinformationimpl.cpp \
+ ../../../..\telephonyservice\src\ccallinfoiter.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/xqtelephonyservice.pri Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,20 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+SOURCES += ./src/xqcallinfo.cpp \
+ ./src/xqcallinfoimpl.cpp
+HEADERS += ../../phonesrv_plat/call_information_api/inc/xqcallinfo.h \
+ ./inc/xqcallinfoimpl.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/telutils/xqtelephonyservice/xqtelephonyservice.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,49 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+#
+
+TEMPLATE = lib
+TARGET = xqtelephonyservice
+
+symbian {
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
+ TARGET.EPOCALLOWDLLDATA = 1
+ TARGET.UID3 = 0x20029F04
+ DEFINES += BUILD_XQCALLINFO
+
+ INCLUDEPATH += ../../inc
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+
+ defFiles = \
+ "$${LITERAL_HASH}ifdef WINSCW" \
+ "DEFFILE bwins/xqtelephonyservice.def" \
+ "$${LITERAL_HASH}else" \
+ "DEFFILE eabi/xqtelephonyservice.def" \
+ "$${LITERAL_HASH}endif"
+
+ MMP_RULES += defFiles
+
+ LIBS += -lxqservice \
+ -lxqserviceutil \
+ -ltelephonyservice
+
+ BLD_INF_RULES.prj_exports += \
+ "$${LITERAL_HASH}include <platform_paths.hrh>" \
+ "./rom/xqtelephonyservice.iby CORE_MW_LAYER_IBY_EXPORT_PATH(xqtelephonyservice.iby)"
+}
+
+# Input
+include(xqtelephonyservice.pri)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,19 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Build file for engines.
+*
+*/
+
+#include "../vmbxengine/group/bld.inf"
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/inc/loggerutil.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,149 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef __LOGGERUTIL_H
+#define __LOGGERUTIL_H
+
+// INCLUDES
+#include <QDebug>
+#include <QFile>
+#include <QDateTime>
+
+/***************************
+ * LOGGER SETTINGS
+ ***************************/
+
+#ifndef _DEBUG
+
+/**
+ * Logging method setting:
+ * 0 = No logging
+ * 1 = File logging, see additional comments later in this file!
+ * 2 = Debug output
+ */
+#define _LOGGERUTIL_LOGGING_METHOD 0 // UREL BUILD
+
+#else
+ #ifdef __WINS__
+ #define _LOGGERUTIL_LOGGING_METHOD 2 // UDEB BUILD, WINS
+ #else
+ #define _LOGGERUTIL_LOGGING_METHOD 1 // UDEB BUILD, HW
+ #endif // __WINS__
+#endif // _DEBUG
+
+// Update this prefix for your component-specific string
+#define KDBGLOGPRE "VMBXUI: "
+
+#if _LOGGERUTIL_LOGGING_METHOD == 1
+ #define KLOGGERUTILNEWLINE "\n"
+ // Log file location, file created if path exists
+ const QString KLOGGERUTILLOGFILE("c:\\logs\\vmbx\\vmbxui.txt");
+#elif _LOGGERUTIL_LOGGING_METHOD == 2
+#endif //_LOGGERUTIL_LOGGING_METHOD
+
+/***************************
+ * FILE LOGGING IMPLEMENTATION
+ ***************************/
+#if _LOGGERUTIL_LOGGING_METHOD == 1
+ class DbgLoggerUtil
+ {
+ public:
+
+ // Constructor opens a file and prints newline+timestamp
+ //
+ // NOTICE the file is not closed if only constructor is run,
+ // other method(s) close the file later explicitly.
+ //
+ // NOTICE that file logging mode uses "append" so the file will grow
+ // indefinitely unless manually deleted. Reason for this is that each
+ // trace line opens&closes the file separately, so overwriting "truncate"
+ // mode would result in the file containing only the latest trace line
+ // and nothing more.
+ DbgLoggerUtil() : mFile( KLOGGERUTILLOGFILE ), mDbg( &mFile )
+ {
+ if ( mFile.open(QFile::WriteOnly | QFile::Append/*Truncate*/) )
+ {
+ mDbg << KLOGGERUTILNEWLINE << KDBGLOGPRE
+ << QTime::currentTime().toString();
+ }
+ }
+ /* Debugging method, remove from production code.
+ ~DbgLoggerUtil()
+ {
+ qDebug() << "~DbgLoggerUtil()";
+ }
+ */
+ // This operator writes the argument to file.
+ template<typename T>
+ DbgLoggerUtil &operator << (const T &aParam1)
+ {
+ // File may be already open so check first
+ if ( QIODevice::NotOpen == mFile.openMode() )
+ {
+ /* result = */ mFile.open(
+ QFile::WriteOnly | QFile::Append/*Truncate*/);
+ }
+ if ( QIODevice::NotOpen != mFile.openMode() )
+ {
+ mDbg << aParam1;
+ }
+ // In order to optimize the file is left open.
+ // Close it after logging args is finished.
+ return *this;
+ }
+
+ // This closes the file, dummy parameter not used.
+ template<typename T>
+ DbgLoggerUtil& operator ^ (const T &/*aParam1*/)
+ {
+ mFile.close(); // Also flushes the write buffer
+ return *this;
+ }
+
+ private:
+ Q_DISABLE_COPY(DbgLoggerUtil)
+ QFile mFile;
+ QDebug mDbg;
+ };
+
+// ^ operator used just for closing the file, 0 is a dummy parameter
+#define _DBGLOG(AAA) DbgLoggerUtil() << AAA ^ 0;
+#define _DBGLOG2(AAA,BBB) DbgLoggerUtil() << AAA << BBB ^ 0;
+#define _DBGLOG3(AAA,BBB,CCC) DbgLoggerUtil() << AAA << BBB << CCC ^ 0;
+
+/***************************
+ * DEBUG PORT LOGGING IMPLEMENTATION
+ ***************************/
+#elif _LOGGERUTIL_LOGGING_METHOD == 2
+
+#define _DBGLOG(AAA) qDebug() << KDBGLOGPRE << AAA;
+#define _DBGLOG2(AAA,BBB) qDebug() << KDBGLOGPRE << AAA << BBB;
+#define _DBGLOG3(AAA,BBB,CCC) qDebug() << KDBGLOGPRE << AAA << BBB << CCC;
+
+#else // _LOGGERUTIL_LOGGING_METHOD == 0 or invalid
+
+/***************************
+ * EMPTY MACROS LOGGING IS DISABLED
+ ***************************/
+#define _DBGLOG(AAA)
+#define _DBGLOG2(AAA,BBB)
+#define _DBGLOG3(AAA,BBB,CCC)
+
+#endif // _LOGGERUTIL_LOGGING_METHOD
+
+#endif // __LOGGERUTIL_H
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/inc/vmbxcpgroup.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,160 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#ifndef VMBXCPGROUP_H
+#define VMBXCPGROUP_H
+
+#include <cpsettingformitemdata.h>
+
+class VmbxUiEngine;
+class CpItemDataHelper;
+/*!
+ * vmbx control panel plugin
+ *
+ * @lib vmbxcpplugin.lib
+ * @since S60 v5.2
+ */
+
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+// TODO: update VmbxCpGroup to class VmbxCpGroup : public CpSettingFormItemData
+// when DataForm bug is fixed (QTControlPanel wk39-41?)
+// API will change but it should be just a few minutes of work
+// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+class VmbxCpGroup : public CpSettingFormItemData
+{
+ Q_OBJECT
+public:
+
+ /*!
+ * Constructor
+ */
+ VmbxCpGroup(
+ HbDataFormModelItem::DataItemType type,
+ const QString &label,
+ const QString &configFile,
+ const HbDataFormModelItem *parent,
+ CpItemDataHelper &itemDataHelper);
+
+ /*!
+ *
+ */
+ explicit VmbxCpGroup(
+ const QString &configFile = QString(),
+ const HbDataFormModelItem *parent = 0);
+
+ /*!
+ * Destructor
+ */
+ ~VmbxCpGroup();
+
+private slots:
+
+ /*!
+ *
+ */
+ void voiceMailboxEngineEntriesUpdated();
+
+private:
+// TODO: comment everything
+
+ /*!
+ *
+ */
+ void updateCsVoicePrimaryToUi();
+
+ /*!
+ *
+ */
+ void updateCsVoiceAlsToUi();
+
+ /*!
+ *
+ */
+ void updateCsVideoPrimaryToUi();
+ /* NOTICE: IT IS POSSIBLE THAT PS SERVICES WILL NOT BE DISPLAYED BY VMBX CONTROL PANEL
+ WHEN WE GET THE NEW UI CONCEPT!!!!!! In that case this is not needed
+ */
+
+ /*!
+ *
+ */
+ void updatePsServicesToUi();
+
+ /*!
+ *
+ */
+ void updateAllMailboxesToUi();
+
+ /*!
+ *
+ */
+ void updateDefaultMailboxToUi();
+
+private:
+
+// From CpCategoryObject
+
+ /*!
+ *
+ */
+ //loadConfigPlugins();
+
+ /*!
+ *
+ */
+ void beforeLoadingConfigPlugins( CpItemDataHelper &itemDataHelper );
+
+ /*!
+ *
+ */
+ //void afterLoadingConfigPlugins();
+
+private:
+
+ /*!
+ *
+ * Own.
+ */
+ VmbxUiEngine* mUiEngine;
+
+ // UI controls
+
+ /*!
+ *
+ * Not own.
+ */
+ CpSettingFormItemData* mEditorCsVoice1;
+
+ /*!
+ *
+ * Not own.
+ */
+ CpSettingFormItemData* mEditorCsVoice2;
+
+ /*!
+ *
+ * Not own.
+ */
+ CpSettingFormItemData* mEditorCsVideo1;
+
+ /*!
+ *
+ * Contained pointers not own.
+ */
+ QList<CpSettingFormItemData*> mPsServiceEditors;
+};
+
+#endif // VMBXCPGROUP_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/inc/vmbxcpplugin.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#ifndef VMBXCPPLUGIN_H
+#define VMBXCPPLUGIN_H
+
+#include <qobject.h>
+#include <cppluginplatinterface.h>
+class CpItemDataHelper;
+
+class VmbxCpPlugin : public QObject, public CpPluginPlatInterface
+{
+Q_OBJECT
+ Q_INTERFACES(CpPluginPlatInterface)
+public:
+ /*!
+ * constructor
+ */
+ VmbxCpPlugin();
+ /*!
+ * destructor
+ */
+ ~VmbxCpPlugin();
+ /*!
+ * from the Basic class CpPluginPlatInterface
+ * see class CpPluginPlatInterface
+ */
+ int uid() const;
+
+ /*!
+ *
+ */
+ CpSettingFormItemData *createSettingFormItemData( CpItemDataHelper &itemDataHelper ) const;
+};
+#endif // VMBXCPPLUGIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/inc/vmbxuiengine.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,141 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+#ifndef VMBXUIENGINE_H
+#define VMBXUIENGINE_H
+
+#include <qobject.h>
+#include <mvoicemailboxobserver.h>
+
+class CVoiceMailbox;
+/*!
+ * VmbxUiEngine
+
+ * @lib vmbxcpplugin.lib
+ * @since S60 v5.2
+ */
+class VmbxUiEngine : public QObject, public MVoiceMailboxObserver
+{
+ Q_OBJECT
+
+public:
+ /*! Default Voice Mailbox setting values.*/
+ enum TUiDefaultVoiceMailboxType
+ {
+ /*!
+ * None vmbx type.
+ */
+ EUiDefaultVmbxNone = 0,
+ /*!
+ * Voice type.
+ */
+ EUiDefaultVmbxVoice,
+ /*!
+ * Video type.
+ */
+ EUiDefaultVmbxVideo,
+ /*!
+ * Voip type.
+ */
+ EUiDefaultVmbxPsService
+ };
+
+public:
+ /*!
+ * Constructor.
+ */
+ VmbxUiEngine();
+
+ /*!
+ * Destructor
+ */
+ ~VmbxUiEngine();
+
+public:
+
+ /*!
+ * Getter method for Voice number of Voice Mailbox.
+ *
+ * @since S60 v5.2
+ * @param aValue Retrieved number.
+ */
+ void GetCsVoice1Number( QString& aValue );
+ /*!
+ * Getter method for Voice ALS number of Voice Mailbox.
+ *
+ * @since S60 v5.2
+ * @param aValue Retrieved number.
+ */
+ void GetCsVoice2Number( QString& aValue );
+
+ /*!
+ * Getter method for Video number of Voice Mailbox.
+ *
+ * @since S60 v5.2
+ * @param aValue Retrieved number.
+ */
+ void GetCsVideo1Number( QString& aValue );
+
+ /*!
+ * Getter method for default mailbox setting of Voice Mailbox.
+ *
+ * @since S60 v5.2
+ */
+ VmbxUiEngine::TUiDefaultVoiceMailboxType DefaultMailboxType();
+
+signals:
+
+ /*!
+ * Signal emitted when voice mailbox data has been updated.
+ *
+ * @since S60 v5.2
+ */
+ void voiceMailboxEngineEntriesUpdated();
+
+public slots:
+
+ /*!
+ * Slot for signal when number has been edited on UI.
+ *
+ * @since S60 v5.2
+ * @param aValue New value.
+ */
+ void uiCsVoice1Changed( const QString& aValue );
+
+private:
+// from MVoiceMailboxObserver
+ /*!
+ * From MVoiceMailboxObserver
+ * Observer callback for number/address change notification
+ * from voice mailbox engine.
+ * The UI should be notified to update the number.
+ *
+ * @since S60 v5.2
+ * @param aVmbxEntry New voicemailbox entry.
+ */
+ void HandleNotifyL( const CVoiceMailboxEntry& aVmbxEntry );
+
+private:
+
+ /*!
+ * Symbian voice mailbox engine which offers basic entry retrieval,
+ * saving, querying etc. services.
+ * Own.
+ */
+ CVoiceMailbox* mVmbxEngine;
+};
+
+#endif // VMBXUIENGINE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/rom/rom.pri Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,21 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+symbian: {
+ BLD_INF_RULES.prj_exports += \
+ "$${LITERAL_HASH}include<platform_paths.hrh>" \
+ "rom/vmbxcpplugin.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vmbxcpplugin.iby)"
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/rom/vmbxcpplugin.iby Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,25 @@
+
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+file=ABI_DIR\BUILD_DIR\vmbxcpplugin.dll SHARED_LIB_DIR\vmbxcpplugin.dll
+
+
+data=\epoc32\data\c\resource\qt\plugins\controlpanel\vmbxcpplugin.qtplugin resource\qt\plugins\controlpanel\vmbxcpplugin.qtplugin
+
+// sis stub file
+data=ZSYSTEM\install\vmbxcpplugin_stub.sis System\Install\vmbxcpplugin_stub.sis
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/rom/vmbxcpplugin_stub.pkg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,28 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: For packing vmbxcpplugin stub.
+;
+&EN
+
+; Header
+#{"vmbxcpplugin"},(0x20029F5D),1,0,0,TYPE=SA
+
+;Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+;Files
+""-"z:\sys\bin\vmbxcpplugin.dll"
Binary file vmbx/vmbxcpplugin/rom/vmbxcpplugin_stub.sis has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/src/vmbxcpgroup.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,227 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include <hbsettingformdataitem.h> // TODO: remember to replace this during API switch
+#include <cpitemdatahelper.h>
+#include "vmbxuiengine.h"
+#include "vmbxcpgroup.h"
+#include "loggerutil.h"
+
+// TODO: To get signals from ui control in QtControlPanelwk38 package you have
+// to fix the mistyped connect
+// in qtcontrolpanel\qtcontrolpanel\cpframework\src\cpsettingformitemdata.cpp:
+// "lineEditTextChanged" is mistyped as "lineEditTextChangge"
+
+// -----------------------------------------------------------------------------
+// Comment me!
+// -----------------------------------------------------------------------------
+//
+VmbxCpGroup::VmbxCpGroup(
+ const QString &/*configFile*/,
+ const HbDataFormModelItem *parent) :
+ CpSettingFormItemData( parent ),
+ mEditorCsVoice1( 0 ) // TODO: null member pointers as it is good practice
+{
+}
+
+// -----------------------------------------------------------------------------
+// Comment me!
+// -----------------------------------------------------------------------------
+//
+VmbxCpGroup::VmbxCpGroup(
+ HbDataFormModelItem::DataItemType type,
+ const QString &label,
+ const QString &/*configFile*/,
+ const HbDataFormModelItem *parent,
+ CpItemDataHelper &itemDataHelper ) :
+ CpSettingFormItemData( type, label, parent ),
+ mEditorCsVoice1( 0 ),// TODO: null member pointers as it is good practice
+ mEditorCsVoice2( 0 ),
+ mEditorCsVideo1( 0 )
+{
+ _DBGLOG2("VmbxCpGroup::VmbxCpGroup label=",label)
+ mUiEngine = new VmbxUiEngine();
+ beforeLoadingConfigPlugins( itemDataHelper );
+ _DBGLOG("VmbxCpGroup::VmbxCpGroup <")
+}
+
+// -----------------------------------------------------------------------------
+// Comment me!
+// -----------------------------------------------------------------------------
+//
+// Todo: rename this method
+void VmbxCpGroup::beforeLoadingConfigPlugins( CpItemDataHelper &itemDataHelper )
+{
+ _DBGLOG("VmbxCpGroup::beforeLoadingConfigPlugins >")
+
+ // HbSettingFormDataItem::appendChild takes ownership
+
+ QString newUiValue("");
+
+ mEditorCsVoice1 = new CpSettingFormItemData(
+ HbDataFormModelItem::TextItem, tr("Call mailbox") );
+ _DBGLOG("VmbxCpGroup::beforeLoadingConfigPlugins appendChild")
+ itemDataHelper.addConnection(
+ mEditorCsVoice1,
+ SIGNAL(textChanged(QString)),
+ mUiEngine, SLOT(uiCsVoice1Changed(QString) )
+ );
+ appendChild( mEditorCsVoice1 );
+
+ // Todo: add csVoice2 if ALS supported
+
+ // Todo: add video only if supported
+ //mEditorCsVideo1 = new CpSettingFormItemData(
+ // HbDataFormModelItem::TextItem, tr("Video mailbox") );
+ //_DBGLOG("VmbxCpGroup::beforeLoadingConfigPlugins appendChild")
+ //appendChild( mEditorCsVideo1 );
+
+ // TODO: get all ps addresses AND THEIR NAMES from engine and add ui controls for them
+ // Set UI control pointers to mPsServiceEditors
+
+ updateAllMailboxesToUi();
+
+ // TODO: below connect ui editing signals and allow ui control
+ // eidting if vmbx allows editing
+
+ // TODO: here check CS ALS editing permission and connnect signal
+ // and enable editing
+
+ // TODO: here check video editing permission and connect signal
+ // if ok
+
+ // No need for Video ALS on UI, implement later if necessary.
+
+
+ // Editing of PS Services is not allowed by default, disable ui editing
+ // for them.
+
+ _DBGLOG("VmbxCpGroup::beforeLoadingConfigPlugins <")
+}
+
+// -----------------------------------------------------------------------------
+// Comment me!
+// -----------------------------------------------------------------------------
+//
+VmbxCpGroup::~VmbxCpGroup()
+{
+ _DBGLOG("VmbxCpGroup::~VmbxCpGroup")
+ if ( mUiEngine ) {
+ delete mUiEngine;
+ }
+ // TODO: check cleanup, this is draft project version
+}
+
+// -----------------------------------------------------------------------------
+// Comment me!
+// -----------------------------------------------------------------------------
+//
+void VmbxCpGroup::updateCsVoicePrimaryToUi()
+{
+ _DBGLOG("VmbxCpGroup::updateCsVoicePrimaryToUi")
+ if ( mEditorCsVoice1 &&mUiEngine) {
+ QString newUiValue("");
+ mUiEngine->GetCsVoice1Number( newUiValue );
+ mEditorCsVoice1->setContentWidgetData( "text", newUiValue );
+ }
+}
+
+// -----------------------------------------------------------------------------
+// Comment me!
+// -----------------------------------------------------------------------------
+//
+void VmbxCpGroup::updateCsVoiceAlsToUi()
+{
+ _DBGLOG("VmbxCpGroup::updateCsVoiceAlsToUi")
+ if ( mEditorCsVoice2 && mUiEngine )
+ {
+ QString newUiValue("");
+ mUiEngine->GetCsVoice1Number( newUiValue );
+ _DBGLOG2( "VmbxCpGroup::updateCsVoiceAlsToUi newUiValue=", newUiValue)
+ mEditorCsVoice2->setContentWidgetData( "text", newUiValue );
+ }
+}
+
+// -----------------------------------------------------------------------------
+// Comment me!
+// -----------------------------------------------------------------------------
+//
+void VmbxCpGroup::updateCsVideoPrimaryToUi()
+{
+ _DBGLOG("VmbxCpGroup::updateCsVoiceAlsToUi")
+ if ( mEditorCsVideo1 && mUiEngine )
+ {
+ QString newUiValue("");
+ mUiEngine->GetCsVideo1Number( newUiValue );
+ _DBGLOG2( "VmbxCpGroup::updateCsVideoPrimaryToUi newUiValue=", newUiValue)
+ mEditorCsVideo1->setContentWidgetData( "text", newUiValue );
+ }
+}
+
+// -----------------------------------------------------------------------------
+// Comment me!
+// -----------------------------------------------------------------------------
+//
+void VmbxCpGroup::updatePsServicesToUi()
+{
+ _DBGLOG("VmbxCpGroup::updatePsServicesToUi EMPTY METHOD WAITING FOR IMPLEMENTING")
+ /*
+ TODO: Set values from engine to ui
+ NOTICE: IT IS POSSIBLE THAT PS SERVICES WILL NOT BE DISPLAYED BY VMBX
+ CONTROL PANEL WHEN WE GET THE NEW UI CONCEPT!!!!!!
+ */
+}
+
+// -----------------------------------------------------------------------------
+// Comment me!
+// -----------------------------------------------------------------------------
+//
+void VmbxCpGroup::updateDefaultMailboxToUi()
+{
+ _DBGLOG("VmbxCpGroup::updateDefaultMailboxToUi EMPTY METHOD WAITING FOR IMPLEMENTING")
+ // TODO: implement me!
+ // Consider should you check here if the number length of the default mailbox
+ // and reset the default mailbox type selection to "none" if it is.
+ // If you do so, remember to save the new value to engine.
+}
+
+// -----------------------------------------------------------------------------
+// Comment me!
+// -----------------------------------------------------------------------------
+//
+void VmbxCpGroup::updateAllMailboxesToUi()
+{
+ _DBGLOG("VmbxCpGroup::updateAllMailboxesToUi")
+ updateCsVoicePrimaryToUi();
+ updateCsVoiceAlsToUi();
+ //updateCsVideoPrimaryToUi();
+ updatePsServicesToUi();
+ updateDefaultMailboxToUi();
+}
+
+// -----------------------------------------------------------------------------
+// Notification slot for engine signal about Voice Mailbox entries' changes
+// -----------------------------------------------------------------------------
+//
+void VmbxCpGroup::voiceMailboxEngineEntriesUpdated()
+{
+ _DBGLOG("VmbxCpGroup::voiceMailboxEngineEntriesUpdated")
+ /* TODO: consider is there need to pass the actual modified data
+ and mailbox type enum to slot (here) so only needed data can be updated.
+ */
+ updateAllMailboxesToUi();
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/src/vmbxcpplugin.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include <QDebug>
+#include <cpitemdatahelper.h>
+#include "vmbxcpplugin.h"
+#include "vmbxcpgroup.h"
+#include "loggerutil.h"
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+VmbxCpPlugin::VmbxCpPlugin()
+{
+}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+VmbxCpPlugin::~VmbxCpPlugin()
+{
+}
+
+// -----------------------------------------------------------------------------
+// Method returns the plugin uid for control panel framework.
+// -----------------------------------------------------------------------------
+//
+int VmbxCpPlugin::uid() const
+{
+ _DBGLOG2( "VmbxCpPlugin::uid=",0xEE1F4ECF )
+ return 0xEE1F4ECF;
+}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+CpSettingFormItemData* VmbxCpPlugin::createSettingFormItemData(
+ CpItemDataHelper &itemDataHelper ) const
+{
+ _DBGLOG( "VmbxCpPlugin::createSettingFormItemData" )
+ // TODO: remove the legacy arguments, these are not used!!!
+ VmbxCpGroup *itemData =
+ new VmbxCpGroup(
+ HbDataFormModelItem::GroupItem,
+ QString("Voice Mailbox"),
+ QString("vmbxcpplugin.cpcfg"),
+ 0,
+ itemDataHelper );
+ return itemData;
+}
+Q_EXPORT_PLUGIN2(VmbxCpPlugin, VmbxCpPlugin);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/src/vmbxuiengine.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,209 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *
+ */
+
+#include <cvoicemailbox.h>
+#include <cvoicemailboxentry.h>
+#include <QtGlobal>
+#include <QVariant>
+#include "vmbxuiengine.h"
+#include "loggerutil.h"
+
+
+// -----------------------------------------------------------------------------
+// Comment me!
+// -----------------------------------------------------------------------------
+//
+VmbxUiEngine::VmbxUiEngine() :
+ mVmbxEngine( 0 )
+{
+ _DBGLOG("VmbxUiEngine::VmbxUiEngine>")
+
+ // TODO: test that leave vs thrown exception really works
+ //mVmbxEngine = QT_TRAP_THROWING( CVoiceMailbox::NewL() ); this available in qt 4.6
+ // TODO: replace all this trapping&throwing using QT_TRAP_THROWING when qt 4.6
+ TRAPD( error, mVmbxEngine = CVoiceMailbox::NewL(); );
+ if ( error || !mVmbxEngine ) {
+ QT_THROW( 0 );
+ }
+ _DBGLOG("VmbxUiEngine::VmbxUiEngine <")
+}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+VmbxUiEngine::~VmbxUiEngine()
+{
+ _DBGLOG( "VmbxUiEngine::~VmbxUiEngine >")
+ delete mVmbxEngine;
+ // TODO: check cleanup, this is a first draft!
+ _DBGLOG( "VmbxUiEngine::~VmbxUiEngine <")
+ }
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void VmbxUiEngine::GetCsVoice1Number( QString& aValue )
+{
+ _DBGLOG("VmbxUiEngine::GetCsVoice1Number >")
+
+ CVoiceMailboxEntry* vmbxEntry = NULL;
+ TVoiceMailboxParams vmbxParams;
+ vmbxParams.iType = EVmbxVoice;
+ vmbxParams.iLineType = EVmbxAlsLine1;
+ vmbxParams.iServiceId = KVmbxServiceVoice;
+ TInt result = mVmbxEngine->GetStoredEntry( vmbxParams, vmbxEntry );
+ _DBGLOG2("VmbxUiEngine::GetCsVoice1Number, GetStoredEntry result=", result);
+ if ( KErrNone == result && vmbxEntry )
+ {
+ TPtrC entryNumber( KNullDesC );
+ result = vmbxEntry->GetVmbxNumber( entryNumber );
+ _DBGLOG3("VmbxUiEngine::GetCsVoice1Number, GetVmbxNumber result=",
+ result,
+ " but ignore code and allow returing of an empty string to UI");
+ aValue = QString( (QChar*)entryNumber.Ptr(), entryNumber.Length() );
+ }
+
+ _DBGLOG2("VmbxUiEngine::GetCsVoice1Number < , string=", aValue)
+}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void VmbxUiEngine::GetCsVoice2Number( QString& aValue )
+{
+ _DBGLOG("VmbxUiEngine::GetCsVoice2Number >")
+ CVoiceMailboxEntry* vmbxEntry = NULL;
+ TVoiceMailboxParams vmbxParams;
+ vmbxParams.iType = EVmbxVoice;
+ vmbxParams.iLineType = EVmbxAlsLine2;
+ vmbxParams.iServiceId = KVmbxServiceVoice;
+ TInt result = mVmbxEngine->GetStoredEntry( vmbxParams, vmbxEntry );
+ _DBGLOG2("VmbxUiEngine::GetCsVoice2Number, GetStoredEntry result=", result);
+ if ( KErrNone == result && vmbxEntry )
+ {
+ TPtrC entryNumber( KNullDesC );
+ result = vmbxEntry->GetVmbxNumber( entryNumber );
+ _DBGLOG3("VmbxUiEngine::GetCsVoice2Number, GetVmbxNumber result=",
+ result,
+ " but ignore code and allow returing of an empty string to UI");
+ aValue = QString( (QChar*)entryNumber.Ptr(),entryNumber.Length() );
+ }
+ _DBGLOG2("VmbxUiEngine::GetCsVoice2Number < , string=", aValue)
+}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+void VmbxUiEngine::GetCsVideo1Number( QString& aValue )
+{
+ _DBGLOG("VmbxUiEngine::GetCsVideo1Number >")
+ CVoiceMailboxEntry* vmbxEntry = NULL;
+ TVoiceMailboxParams vmbxParams;
+ vmbxParams.iType = EVmbxVideo;
+ vmbxParams.iLineType = EVmbxAlsLine1;
+ vmbxParams.iServiceId = KVmbxServiceVideo;
+ TInt result = mVmbxEngine->GetStoredEntry( vmbxParams, vmbxEntry );
+ _DBGLOG2("VmbxUiEngine::GetCsVideo1Number, GetStoredEntry result=", result);
+ if ( KErrNone == result && vmbxEntry )
+ {
+ TPtrC entryNumber( KNullDesC );
+ result = vmbxEntry->GetVmbxNumber( entryNumber );
+ _DBGLOG3("VmbxUiEngine::GetCsVideo1Number, GetVmbxNumber result=",
+ result,
+ " but ignore code and allow returing of an empty string to UI");
+ aValue = QString( (QChar*)entryNumber.Ptr(),entryNumber.Length() );
+ }
+ _DBGLOG2("VmbxUiEngine::GetCsVideo1Number < , string=", aValue)
+}
+
+// -----------------------------------------------------------------------------
+//
+// -----------------------------------------------------------------------------
+//
+VmbxUiEngine::TUiDefaultVoiceMailboxType VmbxUiEngine::DefaultMailboxType()
+{
+ _DBGLOG( "VmbxUiEngine::DefaultMailboxType")
+ TUiDefaultVoiceMailboxType result = EUiDefaultVmbxNone;
+ // TODO: get type from engine IF AND WHEN THIS FEATURE IS SUPPORTED
+ _DBGLOG2("VmbxUiEngine::GetCsVideo1Number < , string=", result)
+ return result;
+}
+
+// -----------------------------------------------------------------------------
+// Callback from voice mailbox engine when number has been updated
+// This method notifies the UI to refresh its data.
+// -----------------------------------------------------------------------------
+//
+void VmbxUiEngine::HandleNotifyL( const CVoiceMailboxEntry& /*aVmbxEntry*/ )
+{
+ _DBGLOG( "VmbxUiEngine::HandleNotifyL")
+ /* TODO: consider is there need to pass the actual modified data
+ and mailbox type enum to slot.
+
+ TODO: issue the notification request to vmbxengine, that is missing
+ at the moment !
+ */
+ emit voiceMailboxEngineEntriesUpdated();
+}
+
+// -----------------------------------------------------------------------------
+// Callback from voice mailbox engine when number has been updated
+// This method notifies the UI to refresh its data.
+// -----------------------------------------------------------------------------
+//
+void VmbxUiEngine::uiCsVoice1Changed( const QString& aValue )
+{
+ _DBGLOG2("VmbxUiEngine::uiCsVoice1Changed, value=",aValue)
+ CVoiceMailboxEntry* vmbxEntry = NULL;
+ TVoiceMailboxParams vmbxParams;
+ vmbxParams.iType = EVmbxVoice;
+ vmbxParams.iLineType = EVmbxAlsLine1;
+ vmbxParams.iServiceId = KVmbxServiceVoice;
+ TInt result = mVmbxEngine->GetStoredEntry( vmbxParams, vmbxEntry );
+ _DBGLOG2("VmbxUiEngine::uiCsVoice1Changed, GetStoredEntry result=", result);
+ if ( KErrNone != result )
+ {
+ // TODO: test that leave vs thrown exception really works
+ //vmbxEntry = QT_TRAP_THROWING( CVoiceMailboxEntry::NewL() ); this available in qt 4.6
+ // TODO: replace all this trapping using QT_TRAP_THROWING when qt 4.6
+ TRAP_IGNORE( vmbxEntry = CVoiceMailboxEntry::NewL() );
+ vmbxEntry->SetServiceId( KVmbxServiceVoice );
+ vmbxEntry->SetVoiceMailboxType( EVmbxVoice );
+ vmbxEntry->SetVmbxAlsLineType( EVmbxAlsLine1 );
+ // Service name for cs is basically the one in service table,
+ // but in this case it's not used for anything by vmbx.
+ // So let's not set anything as name...fix if problems arise
+ }
+ _DBGLOG( "VmbxUiEngine::uiCsVoice1Changed: cast to TPtrC")
+ TPtrC newNumber(
+ reinterpret_cast<const TUint16*>( aValue.utf16() ),
+ aValue.length() );
+ result = vmbxEntry->SetVmbxNumber( newNumber );
+ _DBGLOG2("VmbxUiEngine::uiCsVoice1Changed, SetVmbxNumber result=", result);
+
+ if ( KErrNone == result )
+ {
+ result = mVmbxEngine->SaveEntry( *vmbxEntry );
+ }
+ delete vmbxEntry;
+ // TODO: handle error here
+ _DBGLOG2("VmbxUiEngine::uiCsVoice1Changed <, SaveEntry result=", result);
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/tsrc/ut_vmbxcpplugin.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,181 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the Ut_vmbxCpPlugin class
+*
+*/
+
+//qt
+#include <QtGui>
+//hb
+#include <hbapplication.h>
+#include <hbmainwindow.h>
+#include <hbview.h>
+//symbian
+#include <e32base.h>
+
+#include <cvoicemailbox.h>
+#include <cvoicemailboxentry.h>
+#include <voicemailboxdefs.h>
+#include <mvoicemailboxobserver.h>
+
+#include "vmbxuiengine.h"
+#include "vmbxcpgroup.h"
+#include "Ut_vmbxCpPlugin.h"
+
+
+/*------------------------------------------------------------------------------
+This module testing project links to vmbxengine.dll.
+------------------------------------------------------------------------------*/
+
+// -----------------------------------------------------------------------------
+// Constants for verifying test case results
+// -----------------------------------------------------------------------------
+//
+
+
+ // -----------------------------------------------------------------------------
+// Ut_vmbxCpPlugin::Ut_vmbxCpPlugin
+// Default constructor, remember to null new members here.
+// -----------------------------------------------------------------------------
+//
+Ut_vmbxCpPlugin::Ut_vmbxCpPlugin()
+{
+ qDebug("Ut_vmbxCpPlugin::Ut_vmbxCpPlugin >");
+ qDebug("Ut_vmbxCpPlugin::Ut_vmbxCpPlugin <");
+}
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxCpPlugin::~Ut_vmbxCpPlugin
+// -----------------------------------------------------------------------------
+Ut_vmbxCpPlugin::~Ut_vmbxCpPlugin()
+{
+ qDebug("Ut_vmbxCpPlugin::~Ut_vmbxCpPlugin >");
+ qDebug("Ut_vmbxCpPlugin::~Ut_vmbxCpPlugin <");
+}
+
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxCpPlugin::initTestCase
+// QTestLib initialization method, called for each test case.
+// -----------------------------------------------------------------------------
+void Ut_vmbxCpPlugin::initTestCase()
+{
+ qDebug("Ut_vmbxCpPlugin::initTestCase >");
+ qDebug("Ut_vmbxCpPlugin::Create Window ");
+ mWindow = new HbMainWindow();
+ QVERIFY(mWindow);
+ mWindow->show();
+ qDebug("Ut_vmbxCpPlugin::Create VmbxCpGroup");
+ mCpGroup = new VmbxCpGroup();
+ QVERIFY(mCpGroup);
+ qDebug("Ut_vmbxCpPlugin::Create VmbxUiEngine");
+ mUiEngine = new VmbxUiEngine();
+ QVERIFY(mUiEngine);
+ qDebug("Ut_vmbxCpPlugin::initTestCase <");
+}
+
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxCpPlugin::cleanupTestCase
+// QTestLib cleanup method, called for each test case.
+// -----------------------------------------------------------------------------
+void Ut_vmbxCpPlugin::cleanupTestCase()
+{
+ qDebug("Mt_SatAppEngine::cleanupTestCase >");
+ if ( mWindow ) {
+ delete mWindow;
+ }
+ if ( mCpGroup ) {
+ delete mCpGroup;
+ }
+ if ( mUiEngine ) {
+ delete mUiEngine;
+ }
+ qDebug("Mt_SatAppEngine::cleanupTestCase <");
+}
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxCpPlugin::testGetCsVoice1Number
+// testCreateVmbxEntry test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Ut_vmbxCpPlugin::testGetCsVoice1Number()
+{
+ qDebug("Ut_vmbxCpPlugin::testGetCsVoice1Number >");
+ QString voiceNumber;
+ mUiEngine->GetCsVoice1Number(voiceNumber);
+ if ( voiceNumber.length()) {
+
+ }
+ //QVERIFY2(KErrNone == err, "create CVoiceMailboxEntry failed ");
+ qDebug("Ut_vmbxCpPlugin::testGetCsVoice1Number <");
+}
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxCpPlugin::testCreateVmbxMailbox
+// CreateVmbxMailbox test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Ut_vmbxCpPlugin::testGetCsVoice2Number()
+{
+ qDebug("Ut_vmbxCpPlugin::testGetCsVoice2Number >");
+ qDebug("Ut_vmbxCpPlugin::testGetCsVoice2Number <");
+}
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxCpPlugin::testGetCsVideo1Number
+// testVmbxType test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Ut_vmbxCpPlugin::testGetCsVideo1Number()
+{
+ qDebug("Ut_vmbxCpPlugin::testGetCsVideo1Number >");
+ //QVERIFY(mVmbxEntry);
+ //QCOMPARE(mVmbxEntry->VoiceMailboxType(), EVmbxVoice);
+ qDebug("Ut_vmbxCpPlugin::testGetCsVideo1Number <");
+}
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxCpPlugin::testDefaultMailboxType
+// testServiceId test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Ut_vmbxCpPlugin::testDefaultMailboxType()
+{
+ qDebug("Ut_vmbxCpPlugin::testDefaultMailboxType >");
+ qDebug("Ut_vmbxCpPlugin::testDefaultMailboxType <");
+}
+
+// -----------------------------------------------------------------------------
+// main()
+// Main method implemented for directing test output to a file.
+// -----------------------------------------------------------------------------
+int main(int argc, char *argv[])
+ {
+ qDebug("Ut_vmbxCpPlugin.cpp: main() >");
+ QApplication app(argc, argv);
+
+ qDebug("Ut_vmbxCpPlugin.cpp: Ut_vmbxCpPlugin");
+ Ut_vmbxCpPlugin tc;
+ char *pass[3];
+ pass[0] = argv[0];
+ pass[1] = "-o";
+ pass[2] = "c:\\logs\\vmbx\\Ut_vmbxCpPlugin.txt";
+ const int result = QTest::qExec(&tc, 3, pass);
+
+ qDebug("Ut_vmbxCpPlugin.cpp: main() <, result=%d", result);
+ return result;
+ }
+
+//End file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/tsrc/ut_vmbxcpplugin.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,110 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the Ut_vmbxCpPlugin class
+*
+*/
+
+
+#ifndef _UT_VMBXCPPLUGIN_H
+#define _UT_VMBXCPPLUGIN_H
+
+#include <QtTest/QtTest>
+#include <QString>
+#include <QStringList>
+#include <QSignalSpy>
+#include <QMetaType>
+#include <QObject>
+
+
+// Class forwards
+class VmbxCpGroup;
+class VmbxUiEngine;
+class HbMainWindow;
+
+
+/**
+ * Mt_vmbxEngine module test class.
+ *
+ * Tests Ut_vmbxCpPlugin interface.
+ * See cpp file for more information.
+ *
+ * @lib Ut_vmbxCpPlugin.lib
+ * @since S60 <TB10.1>
+ */
+class Ut_vmbxCpPlugin : public QObject
+{
+ Q_OBJECT
+
+public:
+ Ut_vmbxCpPlugin();
+
+ virtual ~Ut_vmbxCpPlugin();
+
+private slots:
+
+ /**
+ * Called before the first testfunction is executed.
+ *
+ */
+ void initTestCase();
+
+ /**
+ * Called after the last testfunction has been executed.
+ *
+ */
+ void cleanupTestCase();
+
+ /**
+ * Test first case,GetCsVoice1Number
+ *
+ */
+ void testGetCsVoice1Number();
+
+ /**
+ * Test second case, GetCsVoice2Number
+ *
+ */
+ void testGetCsVoice2Number();
+
+ /**
+ * Test middle case,GetCsVideo1Number
+ *
+ */
+ void testGetCsVideo1Number();
+
+ /**
+ * Test middle case,DefaultMailboxType
+ *
+ */
+ void testDefaultMailboxType();
+
+private: //data
+
+ /**
+ * Own.
+ */
+ VmbxCpGroup* mCpGroup;
+
+ /**
+ * Own.
+ */
+ VmbxUiEngine* mUiEngine;
+
+ /**
+ * Own.
+ */
+ HbMainWindow* mWindow;
+};
+
+#endif // _UT_VMBXCPPLUGIN_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/tsrc/ut_vmbxcpplugin.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,49 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: ut_vmbxcpplugin.exe
+#
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+CONFIG += hb
+CONFIG += qtestlib
+
+symbian: {
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
+}
+
+symbian {
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+ /epoc32/include/mw/QtTest \
+ ../../inc
+
+ LIBS += -lvmbxcpplugin.dll\
+ -lvmbxengine.dll\
+ -lflogger.dll\
+ -lcpframework
+
+
+}
+
+# Input
+HEADERS += ut_vmbxcpplugin.h\
+ ..\inc\vmbxcpgroup.h\
+ ..\inc\vmbxuiengine.h
+
+SOURCES += ut_vmbxcpplugin.cpp\
+ ..\src\vmbxcpgroup.cpp\
+ ..\src\vmbxuiengine.cpp
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/vmbxcpplugin.pri Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,70 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description: vmbxcpplugin source files
+#
+
+
+CONFIG += debug_and_release
+
+
+CONFIG(debug, debug|release) {
+ SUBDIRPART = debug
+} else {
+ SUBDIRPART = release
+}
+
+
+# Add the output dirs to the link path too
+LIBS += -L$$DESTDIR
+
+MOC_DIR = moc
+OBJECT_DIR = obj
+RCC_DIR = rcc
+
+#For some reason the default include path doesn't include MOC_DIR on symbian
+symbian {
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE
+ INCLUDEPATH += $$MOC_DIR
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
+ TARGET.EPOCALLOWDLLDATA = 1
+}
+
+
+CONFIG += hb plugin
+LIBS += -lcpframework\
+ -lvmbxengine
+
+symbian: plugin { # copy qtstub and manifest
+ PLUGIN_STUB_PATH = /resource/qt/plugins/controlpanel
+
+ deploy.path = C:
+ pluginstub.sources = $${TARGET}.dll
+ pluginstub.path = $$PLUGIN_STUB_PATH
+ DEPLOYMENT += pluginstub
+
+ qtplugins.path = $$PLUGIN_STUB_PATH
+ qtplugins.sources += qmakepluginstubs/$${TARGET}.qtplugin
+
+ for(qtplugin, qtplugins.sources):BLD_INF_RULES.prj_exports += "./$$qtplugin $$deploy.path$$qtplugins.path/$$basename(qtplugin)" \
+ "rom/vmbxcpplugin_stub.sis ZSYSTEM/install/vmbxcpplugin_stub.sis"
+}
+
+HEADERS += inc/vmbxcpplugin.h \
+ inc/vmbxcpgroup.h \
+ inc/vmbxuiengine.h \
+ inc/loggerutil.h
+
+SOURCES += src/vmbxcpplugin.cpp \
+ src/vmbxcpgroup.cpp \
+ src/vmbxuiengine.cpp
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxcpplugin/vmbxcpplugin.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,28 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = lib
+TARGET = vmbxcpplugin
+
+
+include (vmbxcpplugin.pri)
+
+# Input
+symbian: {
+ TARGET.UID3 = 0x20029F5D
+}
+
+include (rom/rom.pri)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/bwins/vmbxengineu.def Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,30 @@
+EXPORTS
+ ?NewL@CVoiceMailbox@@SAPAV1@XZ @ 1 NONAME ; class CVoiceMailbox * CVoiceMailbox::NewL(void)
+ ?QueryChangeEntry@CVoiceMailbox@@UAEHABVTVoiceMailboxParams@@AAPAVCVoiceMailboxEntry@@@Z @ 2 NONAME ; int CVoiceMailbox::QueryChangeEntry(class TVoiceMailboxParams const &, class CVoiceMailboxEntry * &)
+ ?GetBrandId@CVoiceMailboxEntry@@UBEHAAVTPtrC8@@@Z @ 3 NONAME ; int CVoiceMailboxEntry::GetBrandId(class TPtrC8 &) const
+ ?Reset@CVoiceMailboxEntry@@UAEXXZ @ 4 NONAME ; void CVoiceMailboxEntry::Reset(void)
+ ?NewL@CVoiceMailboxEntry@@SAPAV1@XZ @ 5 NONAME ; class CVoiceMailboxEntry * CVoiceMailboxEntry::NewL(void)
+ ?GetStoredEntry@CVoiceMailbox@@UBEHABVTVoiceMailboxParams@@AAPAVCVoiceMailboxEntry@@@Z @ 6 NONAME ; int CVoiceMailbox::GetStoredEntry(class TVoiceMailboxParams const &, class CVoiceMailboxEntry * &) const
+ ??0TVoiceMailboxParams@@QAE@ABVCVoiceMailboxEntry@@@Z @ 7 NONAME ; TVoiceMailboxParams::TVoiceMailboxParams(class CVoiceMailboxEntry const &)
+ ?NewLC@CVoiceMailbox@@SAPAV1@XZ @ 8 NONAME ; class CVoiceMailbox * CVoiceMailbox::NewLC(void)
+ ?SaveProvisionedEntry@CVoiceMailbox@@QAEHABVCVoiceMailboxEntry@@@Z @ 9 NONAME ; int CVoiceMailbox::SaveProvisionedEntry(class CVoiceMailboxEntry const &)
+ ?SetVmbxName@CVoiceMailboxEntry@@UAEHABVTDesC16@@@Z @ 10 NONAME ; int CVoiceMailboxEntry::SetVmbxName(class TDesC16 const &)
+ ?ServiceId@CVoiceMailboxEntry@@UBEIXZ @ 11 NONAME ; unsigned int CVoiceMailboxEntry::ServiceId(void) const
+ ?SaveEntry@CVoiceMailbox@@UAEHABVCVoiceMailboxEntry@@@Z @ 12 NONAME ; int CVoiceMailbox::SaveEntry(class CVoiceMailboxEntry const &)
+ ?GetVmbxName@CVoiceMailboxEntry@@UBEHAAVTPtrC16@@@Z @ 13 NONAME ; int CVoiceMailboxEntry::GetVmbxName(class TPtrC16 &) const
+ ?Version@TVoiceMailboxParams@@QAEHXZ @ 14 NONAME ; int TVoiceMailboxParams::Version(void)
+ ?CheckConfiguration@CVoiceMailbox@@UAEHABVTVoiceMailboxParams@@H@Z @ 15 NONAME ; int CVoiceMailbox::CheckConfiguration(class TVoiceMailboxParams const &, int)
+ ?UsingMemoryLocation@CVoiceMailboxEntry@@UBE?AW4TVmbxMemoryLocation@@XZ @ 16 NONAME ; enum TVmbxMemoryLocation CVoiceMailboxEntry::UsingMemoryLocation(void) const
+ ?SetVmbxNumber@CVoiceMailboxEntry@@UAEHABVTDesC16@@@Z @ 17 NONAME ; int CVoiceMailboxEntry::SetVmbxNumber(class TDesC16 const &)
+ ?VoiceMailboxType@CVoiceMailboxEntry@@UBE?AW4TVmbxType@@XZ @ 18 NONAME ; enum TVmbxType CVoiceMailboxEntry::VoiceMailboxType(void) const
+ ?VmbxAlsLineType@CVoiceMailboxEntry@@UBE?AW4TVmbxAlsLineType@@XZ @ 19 NONAME ; enum TVmbxAlsLineType CVoiceMailboxEntry::VmbxAlsLineType(void) const
+ ?NewLC@CVoiceMailboxEntry@@SAPAV1@XZ @ 20 NONAME ; class CVoiceMailboxEntry * CVoiceMailboxEntry::NewLC(void)
+ ?NotifyVmbxNumberChangeCancel@CVoiceMailbox@@UAEXXZ @ 21 NONAME ; void CVoiceMailbox::NotifyVmbxNumberChangeCancel(void)
+ ?QueryNewEntry@CVoiceMailbox@@UAEHABVTVoiceMailboxParams@@AAPAVCVoiceMailboxEntry@@@Z @ 22 NONAME ; int CVoiceMailbox::QueryNewEntry(class TVoiceMailboxParams const &, class CVoiceMailboxEntry * &)
+ ?GetServiceIds@CVoiceMailbox@@UBEHAAV?$RArray@I@@@Z @ 23 NONAME ; int CVoiceMailbox::GetServiceIds(class RArray<unsigned int> &) const
+ ??0TVoiceMailboxParams@@QAE@XZ @ 24 NONAME ; TVoiceMailboxParams::TVoiceMailboxParams(void)
+ ?GetVmbxNumber@CVoiceMailboxEntry@@UBEHAAVTPtrC16@@@Z @ 25 NONAME ; int CVoiceMailboxEntry::GetVmbxNumber(class TPtrC16 &) const
+ ?QueryVmbxType@CVoiceMailbox@@UAEHAAVTVoiceMailboxParams@@@Z @ 26 NONAME ; int CVoiceMailbox::QueryVmbxType(class TVoiceMailboxParams &)
+ ?SetVoiceMailboxType@CVoiceMailboxEntry@@UAEXABW4TVmbxType@@@Z @ 27 NONAME ; void CVoiceMailboxEntry::SetVoiceMailboxType(enum TVmbxType const &)
+ ?NotifyVmbxNumberChangeL@CVoiceMailbox@@UAEXAAVMVoiceMailboxObserver@@H@Z @ 28 NONAME ; void CVoiceMailbox::NotifyVmbxNumberChangeL(class MVoiceMailboxObserver &, int)
+
Binary file vmbx/vmbxengine/conf/voicemailbox.confml has changed
Binary file vmbx/vmbxengine/conf/voicemailbox_101F874F.crml has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/eabi/vmbxengineu.def Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,36 @@
+EXPORTS
+ _ZN13CVoiceMailbox13QueryNewEntryERK19TVoiceMailboxParamsRP18CVoiceMailboxEntry @ 1 NONAME
+ _ZN13CVoiceMailbox13QueryVmbxTypeER19TVoiceMailboxParams @ 2 NONAME
+ _ZN13CVoiceMailbox16QueryChangeEntryERK19TVoiceMailboxParamsRP18CVoiceMailboxEntry @ 3 NONAME
+ _ZN13CVoiceMailbox18CheckConfigurationERK19TVoiceMailboxParamsi @ 4 NONAME
+ _ZN13CVoiceMailbox20SaveProvisionedEntryERK18CVoiceMailboxEntry @ 5 NONAME
+ _ZN13CVoiceMailbox23NotifyVmbxNumberChangeLER21MVoiceMailboxObserveri @ 6 NONAME
+ _ZN13CVoiceMailbox28NotifyVmbxNumberChangeCancelEv @ 7 NONAME
+ _ZN13CVoiceMailbox4NewLEv @ 8 NONAME
+ _ZN13CVoiceMailbox5NewLCEv @ 9 NONAME
+ _ZN13CVoiceMailbox9SaveEntryERK18CVoiceMailboxEntry @ 10 NONAME
+ _ZN18CVoiceMailboxEntry11SetVmbxNameERK7TDesC16 @ 11 NONAME
+ _ZN18CVoiceMailboxEntry13SetVmbxNumberERK7TDesC16 @ 12 NONAME
+ _ZN18CVoiceMailboxEntry19SetVoiceMailboxTypeERK9TVmbxType @ 13 NONAME
+ _ZN18CVoiceMailboxEntry4NewLEv @ 14 NONAME
+ _ZN18CVoiceMailboxEntry5NewLCEv @ 15 NONAME
+ _ZN18CVoiceMailboxEntry5ResetEv @ 16 NONAME
+ _ZN19TVoiceMailboxParams7VersionEv @ 17 NONAME
+ _ZN19TVoiceMailboxParamsC1ERK18CVoiceMailboxEntry @ 18 NONAME
+ _ZN19TVoiceMailboxParamsC1Ev @ 19 NONAME
+ _ZN19TVoiceMailboxParamsC2ERK18CVoiceMailboxEntry @ 20 NONAME
+ _ZN19TVoiceMailboxParamsC2Ev @ 21 NONAME
+ _ZNK13CVoiceMailbox13GetServiceIdsER6RArrayIjE @ 22 NONAME
+ _ZNK13CVoiceMailbox14GetStoredEntryERK19TVoiceMailboxParamsRP18CVoiceMailboxEntry @ 23 NONAME
+ _ZNK18CVoiceMailboxEntry10GetBrandIdER6TPtrC8 @ 24 NONAME
+ _ZNK18CVoiceMailboxEntry11GetVmbxNameER7TPtrC16 @ 25 NONAME
+ _ZNK18CVoiceMailboxEntry13GetVmbxNumberER7TPtrC16 @ 26 NONAME
+ _ZNK18CVoiceMailboxEntry15VmbxAlsLineTypeEv @ 27 NONAME
+ _ZNK18CVoiceMailboxEntry16VoiceMailboxTypeEv @ 28 NONAME
+ _ZNK18CVoiceMailboxEntry19UsingMemoryLocationEv @ 29 NONAME
+ _ZNK18CVoiceMailboxEntry9ServiceIdEv @ 30 NONAME
+ _ZTI13CVoiceMailbox @ 31 NONAME
+ _ZTI18CVoiceMailboxEntry @ 32 NONAME
+ _ZTV13CVoiceMailbox @ 33 NONAME
+ _ZTV18CVoiceMailboxEntry @ 34 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/group/backup_registration.xml Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,5 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration version="1.0">
+ <proxy_data_manager sid = "0x10202BE9" />
+ <restore requires_reboot = "no"/>
+</backup_registration>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/group/bld.inf Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Build information file for project vmbxengine.
+*
+*/
+
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+//Backup registartion file
+backup_registration.xml /epoc32/data/z/private/100058F5/backup_registration.xml
+backup_registration.xml /epoc32/release/winscw/udeb/z/private/100058F5/backup_registration.xml
+backup_registration.xml /epoc32/release/winscw/urel/z/private/100058F5/backup_registration.xml
+
+// sis export
+vmbxengine_stub.sis /epoc32/data/z/system/install/vmbxengine_stub.sis
+
+// iby export
+../rom/vmbxengine.iby CORE_MW_LAYER_IBY_EXPORT_PATH(vmbxengine.iby)
+
+// Generic configuration interface for component cenrep settings
+../conf/voicemailbox.confml MW_LAYER_CONFML(voicemailbox.confml)
+../conf/voicemailbox_101F874F.crml MW_LAYER_CRML(voicemailbox_101F874F.crml)
+
+
+PRJ_MMPFILES
+
+vmbxengine.mmp
+
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/group/vmbxengine.mmp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: This is a project specification file for the
+* voice mailbox number interface.
+*
+*/
+
+#include <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+
+TARGET vmbxengine.dll
+TARGETTYPE dll
+// Enable global writeable static data, it's needed by dll for Qt
+EPOCALLOWDLLDATA
+
+UID 0x1000008d 0x1000590F
+
+CAPABILITY CAP_GENERAL_DLL
+
+epocstacksize 0x5000
+
+USERINCLUDE ../inc
+
+MW_LAYER_SYSTEMINCLUDE
+// Generated by qmake
+SYSTEMINCLUDE /epoc32/include/mw/hb/hbcore
+SYSTEMINCLUDE /epoc32/include/mw/hb/hbwidgets
+SYSTEMINCLUDE /epoc32/include/mw/QtGui
+SYSTEMINCLUDE /epoc32/include/mw/QtCore
+SYSTEMINCLUDE /epoc32/include/stdapis/stlportv5
+
+SOURCEPATH ../src
+
+SOURCE cvoicemailbox.cpp
+SOURCE cvoicemailboxentry.cpp
+SOURCE voicemailboximpl.cpp
+SOURCE vmbxpbkstore.cpp
+SOURCE vmbxetelconnection.cpp
+SOURCE vmbxsimhandler.cpp
+SOURCE vmbxcenrephandler.cpp
+SOURCE vmbxutilities.cpp
+SOURCE vmbxenginefactory.cpp
+SOURCE vmbxenginebase.cpp
+SOURCE vmbxcsvoiceengine.cpp
+SOURCE vmbxcsvideoengine.cpp
+SOURCE vmbxvoipengine.cpp
+SOURCE vmbxuiutilities.cpp
+SOURCE vmbxcenrepobserver.cpp
+SOURCE vmbxsimstoreobserver.cpp
+SOURCE vmbxsatrefreshobserver.cpp
+SOURCE vmbxemergencycall.cpp
+SOURCE vmbxobserver.cpp
+// for voip
+SOURCE vmbshandler.cpp
+SOURCE vmspshandler.cpp
+SOURCE vmsettingsuiiconfileprovider.cpp
+// qt UI
+SOURCE vmbxuihandler.cpp
+SOURCE vmbxqtuihandler.cpp
+
+// library
+LIBRARY euser.lib // for RArray
+LIBRARY etel.lib //for Sim files read/write
+LIBRARY etelmm.lib //for Sim files read/write
+LIBRARY sssettings.lib // for ALS
+LIBRARY phoneclient.lib // for PhCltUtils
+LIBRARY featmgr.lib // for video&voip supported or not checking
+LIBRARY satclient.lib // for notifying sim file refresh
+LIBRARY centralrepository.lib // for CenRep keys
+LIBRARY cenrepnotifhandler.lib // for Notifying CenRep value changed
+LIBRARY serviceprovidersettings.lib // for VoIP
+LIBRARY efsrv.lib
+LIBRARY flogger.lib
+// Libraries that are needed because of Qt
+LIBRARY hbcore.lib
+LIBRARY hbwidgets.lib
+LIBRARY qtgui.lib
+LIBRARY qtcore.lib
+LIBRARY libc.lib
+LIBRARY libm.lib
+LIBRARY libdl.lib
+LIBRARY libstdcppv5.lib
+
+OPTION CW -wchar_t on
+OPTION ARMCC --visibility_inlines_hidden
+
+PAGED
+
+STDCPP
+
+#if defined( EABI )
+deffile ../eabi/
+#elif defined( WINS )
+// no .def file used
+#elif defined( WINSCW )
+//no .def file used
+#else
+deffile ../BMARM/
+#endif
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/group/vmbxengine.pkg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,30 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: For packing vmbxengine.
+;
+&EN
+
+; Header
+#{"vmbxengine"},(0x1000590f),1,1,0
+
+;Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+;Files
+"\epoc32\RELEASE\armv5\UREL\vmbxengine.dll"-"!:\sys\bin\vmbxengine.dll"
+
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/group/vmbxengine_stub.pkg Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,28 @@
+;
+; Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+; All rights reserved.
+; This component and the accompanying materials are made available
+; under the terms of "Eclipse Public License v1.0"
+; which accompanies this distribution, and is available
+; at the URL "http://www.eclipse.org/legal/epl-v10.html".
+;
+; Initial Contributors:
+; Nokia Corporation - initial contribution.
+;
+; Contributors:
+;
+; Description: For packing vmbxengine stub.
+; Languages
+&EN
+
+; Header
+#{"vmbxengine"},(0x1000590F), 1, 0, 0, TYPE=SA
+
+;Localised Vendor name
+%{"Nokia"}
+
+; Unique Vendor name
+:"Nokia"
+
+;Files
+""-"z:\sys\bin\vmbxengine.dll"
Binary file vmbx/vmbxengine/group/vmbxengine_stub.sis has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/mvmbxcenrephandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,94 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: public VmbxCenrepHandler APIs for internal class
+* Interface : Internal, MVmbxCenrepHandler
+*
+*/
+
+
+#ifndef M_VMBXCENREPHANDLER_H
+#define M_VMBXCENREPHANDLER_H
+
+// INCLUDES
+
+// FORWARD DECLARATION
+class CVoiceMailboxEntry;
+
+// CLASS DECLARATION
+
+/**
+ * MVmbxCenrepHandler
+ *
+ * @since S60 v5.2
+ * @lib vmbxengine.lib
+ *
+ */
+NONSHARABLE_CLASS ( MVmbxCenrepHandler )
+ {
+
+public:
+
+ /**
+ * Get mailbox number from CenRep
+ *
+ * @since S60 v5.2
+ * @param in&out aEntry the voice mailbox information data type
+ * @return Symbian OS error code (KErrNone if successful)
+ */
+ virtual TInt GetVmbxNumber( CVoiceMailboxEntry& aEntry ) = 0;
+
+ /**
+ * Saves the mailbox number
+ *
+ * @since S60 v5.2
+ * @param in aEntry vmbx number data to save
+ * @return Symbian OS error code (KErrNone if successful)
+ */
+ virtual TInt Save( const CVoiceMailboxEntry& aEntry ) = 0;
+
+ /**
+ * Fetches active store type
+ *
+ * @since S60 v5.2
+ * @return aStoreType Active store in use
+ */
+ virtual TVmbxMemoryLocation StoreType() = 0;
+
+ /**
+ * Returns state of the video support
+ *
+ * @since S60 v5.2
+ * @return ETrue if supported
+ */
+ virtual TBool VideoSupported() = 0;
+
+ /**
+ * Returns ETrue if CenRep setting Sim read only
+ *
+ * @since S60 v5.2
+ * @return ETrue if Sim read only
+ */
+ virtual TBool IsSimReadOnly() = 0;
+
+ /**
+ * Returns ETrue if number allowed to user change
+ *
+ * @since S60 v5.2
+ * @return ETrue if from Sim
+ */
+ virtual TBool IsAllowedUserEdit() = 0;
+
+ };
+
+#endif // M_VMBXCENREPHANDLER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/mvmbxcenrepobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,49 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Notifies when CenRep is changed
+* Interface : Internal, MVmbxCenRepObserver
+*
+*/
+
+
+#ifndef M_VMBXCENREPOBSERVER_H
+#define M_VMBXCENREPOBSERVER_H
+
+// INCLUDES
+#include "voicemailboxdefsinternal.h"
+
+// CLASS DECLARATION
+
+/**
+ * MVmbxCenRepObserver
+ *
+ * @since S60 v5.2
+ * @lib vmbxengine.lib
+ *
+ */
+NONSHARABLE_CLASS ( MVmbxCenRepObserver )
+ {
+public:
+
+ /**
+ * Does the action user wants when the CenRep value has been changed.
+ *
+ * @since S60 v5.2
+ * @param aId id related with the key of CenRep
+ **/
+ virtual void HandleCenRepChange( TVmbxCenRepKey aId ) = 0;
+
+ };
+
+#endif // M_VMBXCENREPOBSERVER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/mvmbxchangeobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,69 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Notifies when vmbx interrelated modules are changed
+* Interface : Internal, MVmbxChangeObserver
+*
+*/
+
+
+#ifndef M_VMBXCHANGEOBSERVER_H
+#define M_VMBXCHANGEOBSERVER_H
+
+// INCLUDE
+#include "voicemailboxdefsinternal.h"
+
+// FORWORD
+
+// CLASS DECLARATION
+
+/**
+* Notifier for vmbx number/address changes
+*
+* @lib vmbxengine.lib
+*
+* @since S60 v5.2
+*
+**/
+NONSHARABLE_CLASS ( MVmbxChangeObserver )
+ {
+
+public:
+
+ /**
+ * Observer callback function which is called when
+ *sat refresh
+ *
+ * @since S60 5.2
+ **/
+ virtual void SatRefreshL() = 0;
+
+ /**
+ * Observer callback function which is called when
+ *CenRep Key value changed
+ *
+ * @param aId id related with the key of CenRep
+ * @since S60 5.2
+ **/
+ virtual void CenRepChangedL( TVmbxCenRepKey aId ) = 0;
+
+ /**
+ * Observer callback function which is called when
+ *sim store changed
+ *
+ * @since S60 5.2
+ **/
+ virtual void SimStoreChangedL() = 0;
+ };
+
+#endif // M_VMBXCHANGEOBSERVER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/mvmbxresourceprovider.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,58 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Notifies when ALS line is changed
+* Interface : Internal, MResourceProvider
+*
+*/
+
+
+#ifndef M_VMBXRESOURCEPROVIDER_H
+#define M_VMBXRESOURCEPROVIDER_H
+
+// INCLUDES
+#include "mvmbxuiutilities.h"
+#include "mvmbxcenrephandler.h"
+
+// CLASS DECLARATION
+
+/**
+ * Resource provider
+ *
+ * @since S60 v5.2
+ * @lib vmbxengine.lib
+ *
+ */
+NONSHARABLE_CLASS ( MVmbxResourceProvider )
+ {
+public:
+
+ /**
+ * Gets handler of MVmbxUiUtilities
+ *
+ * @since S60 v5.2
+ * @return handler of MVmbxUiUtilities
+ **/
+ virtual MVmbxUiUtilities& VmbxUiUtilities() = 0;
+
+ /**
+ * Gets handler of MVmbxCenrepHandler
+ *
+ * @since S60 v5.2
+ * @return handler of MVmbxCenrepHandler
+ **/
+ virtual MVmbxCenrepHandler& VmbxCenRepHandler() = 0;
+
+ };
+
+#endif // M_VMBXRESOURCEPROVIDER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/mvmbxsatrefreshobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,48 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Notifies when MBDN file is refreshed
+* Interface : Internal, MVmbxSatRefreshObserver
+*
+*/
+
+
+#ifndef M_VMBXSATREFRESHOBSERVER_H
+#define M_VMBXSATREFRESHOBSERVER_H
+
+// INCLUDES
+
+// CLASS DECLARATION
+
+/**
+ * Notifier for sim file refreshed
+ *
+ * @since S60 v5.2
+ * @lib vmbxengine.lib
+ *
+ */
+NONSHARABLE_CLASS ( MVmbxSatRefreshObserver )
+ {
+public:
+
+ /**
+ * Does the action user wants when the sim file is refreshed.
+ *
+ * @since S60 v5.2
+ * @param
+ **/
+ virtual void HandleSatRefresh() = 0;
+
+ };
+
+#endif // M_VMBXSATREFRESHOBSERVER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/mvmbxservicenotify.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,46 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: public Service profile changed
+* Interface : Internal, MServiceNotifyHandler
+*
+*/
+
+
+#ifndef M_VMBXSERVICENOTIFY_H
+#define M_VMBXSERVICENOTIFY_H
+
+// INCLUDES
+
+// FORWARD DECLARATION
+
+
+// CLASS DECLARATION
+
+/**
+ * MServiceNotifyHandler
+ *
+ * @since S60 v5.2
+ * @lib vmbxengine.lib
+ *
+ */
+NONSHARABLE_CLASS ( MServiceNotifyHandler )
+ {
+public:
+ /**
+ * Called when a Service profile has been changed.
+ */
+ virtual void HandleServiceNotifyL() = 0;
+ };
+
+#endif // M_VMBXSERVICENOTIFY_H
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/mvmbxsimstoreobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Notifies when Sim store is changed
+* Interface : Internal, MVmbxSimStoreObserver
+*
+*/
+
+
+#ifndef M_VMBXSIMSTOREOBSERVER_H
+#define M_VMBXSIMSTOREOBSERVER_H
+
+// INCLUDES
+
+// CLASS DECLARATION
+
+/**
+ * Notifier for sim store file entry changes
+ *
+ * @since S60 v5.2
+ * @lib vmbxengine.lib
+ *
+ */
+NONSHARABLE_CLASS ( MVmbxSimStoreObserver )
+ {
+public:
+
+ /**
+ * Does the user wants when the sim store file entry has been changed.
+ *
+ * @since S60 v5.2
+ **/
+ virtual void HandleSimStoreChanged() = 0;
+
+ };
+
+#endif // M_VMBXSIMSTOREOBSERVER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/mvmbxuihandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,124 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Interface : Internal, MVmbxUiHandler
+*
+*/
+
+
+#ifndef M_MVMBXUIHANDLER_H
+#define M_MVMBXUIHANDLER_H
+
+// INCLUDES
+
+// FORWARD DECLARATION
+
+
+// CLASS DECLARATION
+
+/**
+ * MVmbxUiHandler
+ *
+ * @since S60 v5.2
+ * @lib vmbxengine.lib
+ *
+ */
+NONSHARABLE_CLASS ( MVmbxUiHandler )
+ {
+
+public:
+
+ /**
+ * Show mailbox query dialog
+ *
+ * @since S60 v5.2
+ * @param aType in TVmbxType type
+ * @param aMode Tin VmbxQueryMode mode
+ * @param aNumber the voice mailbox number
+ * @param aResult out the result of dialog
+ */
+ virtual void ShowVmbxQueryDialog( const TVmbxType& aType,
+ const TVmbxQueryMode & aMode, TDes& aNumber, TInt& aResult )= 0;
+
+
+ /**
+ * Show define number in selection dialog
+ *
+ * @since S60 v5.2
+ * @param in aType vmbx type
+ * @param out aResult the result of dialog
+ */
+ virtual void ShowDefineSelectionDialog(
+ TVmbxType& aType, TInt& aResult ) = 0;
+
+ /**
+ * Show call number in selection dialog
+ *
+ * @since S60 v5.2
+ * @param in aArray array of the defined voice mailbox entry
+ * @param in aIcons icons of the defined voice mailbox
+ * @param out aParams the type TVoiceMailboxParams which should include
+ * the service id and the type of seclected TVmbxType
+ * @param out aResult the result user seclected
+ */
+ /*virtual void ShowCallSelectionDialogL(
+ const RPointerArray<CVoiceMailboxEntry>& aArray,
+ //CArrayPtr<CGulIcon>* aIcons,
+ TVoiceMailboxParams& aParams, TInt& aResult ) = 0;*/
+
+ /**
+ * Show confirmation dialog when save number to phone
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowSaveToPhoneNote() = 0;
+
+ /**
+ * Show confirmation dialog when save number to SIM
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowSaveToSimNote() = 0;
+
+ /**
+ * Show confirmation dialog when save video number
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowVideoSavedNote() = 0;
+
+ /**
+ * show an error dialog for invalid number
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowInvalidNumberNote() = 0;
+
+ /**
+ * show an error dialog for invalid number
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowInvalidWarningNote() = 0;
+
+ /**
+ * Show save empty information note
+ *
+ * @since S60 v5.2
+ * @param aType TVmbxType type
+ */
+ virtual void ShowSaveEmptyNote( const TVmbxType& aType ) = 0;
+ };
+
+#endif // M_MVMBXUIHANDLER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/mvmbxuiutilities.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,152 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Public APIs of VmbxUiUtilities to internal class
+* Interface : Internal, MVmbxUiutilities
+*
+*/
+
+
+#ifndef M_VMBXUIUTILITIES_H
+#define M_VMBXUIUTILITIES_H
+
+// INCLUDES
+#include <cvoicemailbox.h>
+
+// CLASS DECLARATION
+
+/**
+ * MVmbxUiUtilities
+ *
+ * @since S60 v5.2
+ * @lib vmbxengine.lib
+ *
+ */
+NONSHARABLE_CLASS ( MVmbxUiUtilities )
+ {
+
+public:
+ /**
+ * Show mailbox query
+ *
+ * @since S60 v5.2
+ * @param in aType TVmbxType type
+ * @param in aMode TVmbxQueryMode mode
+ * @param out aNumber the voice mailbox number
+ */
+ virtual void ShowQueryL( const TVmbxType& aType,
+ const TVmbxQueryMode& aMode,
+ TDes& aNumber ) = 0;
+
+ /**
+ * Show mailbox query dialog
+ * Leaves if user cancel selected.
+ *
+ * @since S60 v5.2
+ * @param aType in TVmbxType type
+ * @param aMode Tin VmbxQueryMode mode
+ * @param aNumber the voice mailbox number
+ * @param aResult out the result of dialog
+ */
+ virtual void ShowQueryDialogL( const TVmbxType& aType,
+ const TVmbxQueryMode & aMode, TDes& aNumber, TInt& aResult ) = 0;
+
+ /**
+ * Show confirmation dialog when save number to phone
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowSaveToPhoneNote() = 0;
+
+ /**
+ * Show confirmation dialog when save number to SIM
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowSaveToSimNote() = 0;
+
+ /**
+ * Show confirmation dialog when save video number
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowVideoSavedNote() = 0;
+
+ /**
+ * Show define number in selection dialog
+ * Leaves if user cancel selected.
+ *
+ * @since S60 v5.2
+ * @param in aType vmbx type
+ * @param out aResult the result of dialog
+ */
+ virtual void ShowDefineSelectionDialogL( TVmbxType& aType, TInt& aResult ) = 0;
+
+ /**
+ * Show call number in selection dialog
+ * Leaves if user cancel selected.
+ *
+ * @since S60 v5.2
+ * @param in aArray array of the defined voice mailbox entry
+ * @param in aIcons icons of the defined voice mailbox
+ * @param out aParams the type TVoiceMailboxParams which should include
+ * the service id and the type of seclected TVmbxType
+ * @param out aResult the result user seclected
+ */
+ virtual void ShowCallSelectionDialogL(
+ const RPointerArray<CVoiceMailboxEntry>& aArray,
+ // CArrayPtr<CGulIcon>* aIcons,
+ TVoiceMailboxParams& aParams, TInt& aResult ) = 0;
+
+ /**
+ * Tries to close all open dialogs
+ *
+ * @since S60 v5.2
+ */
+ virtual void DismissDialogL() = 0;
+
+ /**
+ * To get mailbox entry value
+ * Leaves with Symbian OS error code
+ *
+ * @since S60 v5.2
+ * @param aType TVmbxType type
+ */
+ virtual void ShowSaveEmptyNoteL( const TVmbxType& aType ) = 0;
+
+ /**
+ * Get Mailbox type default image.
+ * If get unseccessful, Leaves with Symbian OS error code
+ *
+ * @since S60 v5.2
+ * @param aParams Mailbox type for which image is needed.
+ * @return aImage New image. Ownership is transferred.
+ */
+ //virtual CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams ) = 0;
+
+ /**
+ * Show error dialog
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowErrorDialogL() = 0;
+
+ /**
+ * Show Invalid Warning dialog.
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowInvalidWarningDialogL() = 0;
+ };
+
+#endif // M_VMBXUIUTILITIES_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbshandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Branding for voice mailbox
+ *
+*/
+
+#ifndef C_VMBSHANDLER_H
+#define C_VMBSHANDLER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+
+// FORWARD DECLARATIONS
+
+
+// CLASS DECLARATION
+
+/**
+ * CVmBSHandler declaration.
+ *
+ * @since S60 3.2
+ */
+NONSHARABLE_CLASS( CVmBSHandler ) : public CBase
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ */
+ static CVmBSHandler* NewL();
+
+ /**
+ * Two-phased constructor.
+ */
+ static CVmBSHandler* NewLC();
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmBSHandler();
+
+public: // New functions
+
+ /**
+ * Get branded icon
+ * @since S60 3.2
+ * @param aBrandingId Brandind Id
+ * @param aBrandedBitmap Bitmap for branded icon
+ * @param aBrandedBitmapMask Mask to branded icon
+ */
+// void GetBrandedIconL( const TDesC8& aBrandingId,
+// CFbsBitmap*& aBrandedBitmap,
+// CFbsBitmap*& aBrandedBitmapMask ) const;
+
+private:
+
+ /**
+ * C++ default constructor.
+ */
+ CVmBSHandler();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+ };
+
+#endif // C_VMBSHANDLER_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxcenrephandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Access class to central repository
+* Interface : Private, CVmbxCenRepHandler
+*
+*/
+
+
+#ifndef C_VMBXCENREPHANDLER_H
+#define C_VMBXCENREPHANDLER_H
+
+// INCLUDES
+#include <e32base.h>
+
+#include <voicemailboxdefs.h>
+#include "mvmbxcenrephandler.h"
+
+
+// FORWARD DECLARATIONS
+class CRepository;
+class CVoiceMailboxEntry;
+
+// CLASS DECLARATION
+/**
+* Creates connection to central repository and handles data flow from/to it
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxCenRepHandler ) : public CBase,
+ public MVmbxCenrepHandler
+ {
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ */
+ static CVmbxCenRepHandler* NewL( );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmbxCenRepHandler();
+
+public: // New functions
+
+ /**
+ * Get saved mailbox number
+ *
+ * @since S60 v5.2
+ * @param aEntry saved vmbx number data
+ * @return Symbian OS error code (KErrNone if successful)
+ */
+ TInt GetVmbxNumber( CVoiceMailboxEntry& aEntry );
+
+ /**
+ * Saves the mailbox number
+ *
+ * @since S60 v5.2
+ * @param aEntry vmbx number data to save
+ * @return Symbian OS error code (KErrNone if successful)
+ */
+ TInt Save( const CVoiceMailboxEntry& aEntry );
+
+ /**
+ * Fetches active store type
+ *
+ * @since S60 v5.2
+ * @return aStoreType Active store in use
+ */
+ TVmbxMemoryLocation StoreType();
+
+ /**
+ * Returns state of the video support
+ *
+ * @since S60 v5.2
+ * @return ETrue if supported
+ */
+ TBool VideoSupported();
+
+ /**
+ * Returns ETrue if CenRep setting Sim read only
+ *
+ * @since S60 v5.2
+ * @return ETrue if CenRep setting Sim read only
+ */
+ TBool IsSimReadOnly();
+
+ /**
+ * Returns ETrue if number allowed to user change
+ *
+ * @since S60 v5.2
+ * @return ETrue if from Sim
+ */
+ TBool IsAllowedUserEdit();
+
+private: // New functions
+
+ /**
+ * C++ default constructor.
+ * @param aStoreHandler Reference to StoreHandler
+ */
+ CVmbxCenRepHandler();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+ /**
+ * Resolves Voice CenRep key to be used
+ *
+ * @since S60 v5.2
+ * @param in aLine current ALS lne
+ * @return CenRep key
+ */
+ TUint32 VoiceCenRepKey( const TVmbxAlsLineType& aLine );
+
+ /**
+ * Resolves Video CenRep key to be used
+ *
+ * @since S60 v5.2
+ * @param in aLine current ALS lne
+ * @return CenRep key
+ */
+ TUint32 VideoCenRepKey( const TVmbxAlsLineType& aLine );
+
+ /**
+ * Resolves CenRep key to be used
+ *
+ * @since S60 v5.2
+ * @param aEntry entry type
+ * @return CenRep key
+ */
+ TUint32 ResolveKeyByEntry( const CVoiceMailboxEntry& aEntry );
+
+private: //data
+
+ /**
+ * Central repository session
+ * Own.
+ */
+ CRepository* iCRSession;
+ };
+
+#endif // C_VMBXCENREPHANDLER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxcenrepobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,111 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Access class to Notify CenRep changed.
+* Interface : Private, CVmbxCenRepObserver
+ *
+*/
+
+#ifndef C_VMBXCENREPOBSERVER_H
+#define C_VMBXCENREPOBSERVER_H
+
+// INCLUDES
+#include <e32base.h>
+
+// for remote number change
+#include <cenrepnotifyhandler.h>
+#include "mvmbxcenrepobserver.h"
+
+
+// FORWARD DECLARATIONS
+class CRepository;
+
+// CLASS DECLARATION
+
+/**
+ * CVmbxCenRepObserver declaration.
+ *
+ * @since S60 5.2
+ */
+NONSHARABLE_CLASS( CVmbxCenRepObserver ) : public CBase,
+ public MCenRepNotifyHandlerCallback
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ * @since S60 v5.2
+ * @param in aObserver observer notify the CenRep changed.
+ * @return New instance of the object. Ownership transferred.
+ */
+ static CVmbxCenRepObserver* NewL( MVmbxCenRepObserver& aObserver );
+
+ /**
+ * Two-phased constructor.
+ * @since S60 v5.2
+ * @param in aObserver observer notify the CenRep changed.
+ * @return New instance of the object. Ownership transferred.
+ */
+ static CVmbxCenRepObserver* NewLC( MVmbxCenRepObserver& aObserver );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmbxCenRepObserver();
+
+
+private: // from base class MCenRepNotifyHandlerCallback
+
+ /**
+ * @see MCenRepNotifyHandlerCallback::HandleNotifyGeneric
+ */
+ void HandleNotifyGeneric( TUint32 aId );
+
+private:
+
+ /**
+ * C++ default constructor.
+ * @since S60 v5.2
+ * @param in aObserver observer notify the CenRep changed.
+ */
+ CVmbxCenRepObserver( MVmbxCenRepObserver& aObserver );
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+private: // data
+ /**
+ * Central repository session
+ * Own.
+ */
+ CRepository* iCRSession;
+
+ /**
+ * Central repository observer
+ * Own.
+ */
+ CCenRepNotifyHandler* iNotifyHandler;
+
+ /**
+ * Reference to MVmbxCenRepObserver
+ *
+ */
+ MVmbxCenRepObserver& iObserver;
+
+ };
+
+#endif // C_VMBXCENREPOBSERVER_H
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxcsvideoengine.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Video mailbox engine implementation
+* Interface : Private, CVmbxCsVideoEngine
+*
+*/
+
+#ifndef C_VMBXCSVIDEOENGINE_H
+#define C_VMBXCSVIDEOENGINE_H
+
+// INCLUDES
+#include "mvmbxresourceprovider.h"
+
+// FORWARD DECLARATIONS
+class CVmbxEngineBase;
+
+
+// CLASS DECLARATION
+
+/**
+* Implements functionality specifig to video mailbox implementation
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxCsVideoEngine ) : public CVmbxEngineBase
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor
+ * @param in aProvider Reference to Ui Utilities
+ * @return New instance of the object. Ownership transferred.
+ */
+ static CVmbxCsVideoEngine* NewL( MVmbxResourceProvider& aProvider );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmbxCsVideoEngine();
+
+// from base class CVmbxEntryBase
+
+ /**
+ * @see CVmbxEntryBase::GetL
+ *
+ * @since S60 v5.2
+ * @param in aEntry a pointer reference of CVoiceMailboxEntry
+ */
+ void GetL( CVoiceMailboxEntry*& aEntry );
+
+ /**
+ * @see CVmbxEntryBase::SaveL
+ *
+ * @since S60 v5.2
+ * @param aEntry Reference to CVoiceMailboxEntry
+ */
+ void SaveL( const CVoiceMailboxEntry& aEntry );
+
+ /**
+ * To save mailbox Provisioned entry value
+ *
+ * @since S60 v5.2
+ * @param in aEntry Reference to CVoiceMailboxEntry
+ */
+ void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry );
+
+private:
+
+ /**
+ * C++ default constructor.
+ *
+ * @since S60 v5.2
+ * @param in aProvider Reference to Ui Utilities
+ */
+ CVmbxCsVideoEngine( MVmbxResourceProvider& aProvider );
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ *
+ * @since S60 v5.2
+ */
+ void ConstructL();
+
+ };
+
+#endif // C_VMBXCSVIDEOENGINE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxcsvoiceengine.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,154 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Voice mailbox engine implementation
+* Interface : Private, CVmbxCsVoiceEngine
+*
+*/
+
+#ifndef C_VMBXCSVOICEENGINE_H
+#define C_VMBXCSVOICEENGINE_H
+
+// INCLUDES
+#include "mvmbxresourceprovider.h"
+
+// FORWARD DECLARATIONS
+class CVmbxEngineBase;
+class CVmbxSimHandler;
+
+
+// CLASS DECLARATION
+/**
+* Implements functionality specifig to voice mailbox entry
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxCsVoiceEngine ) : public CVmbxEngineBase
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor
+ * @since S60 v5.2
+ * @param aProvider Reference to MVmbxResourceProvider.
+ * @return New instance of the object. Ownership transferred.
+ */
+ static CVmbxCsVoiceEngine* NewL( MVmbxResourceProvider& aProvider );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmbxCsVoiceEngine();
+
+// from base class CVmbxEntryBase
+
+ /**
+ * @see CVmbxEntryBase::GetL
+ *
+ * @since S60 v5.2
+ * @param aEntry Reference to CVoiceMailboxEntry
+ */
+ void GetL( CVoiceMailboxEntry*& aEntry );
+
+ /**
+ * @see CVmbxEntryBase::SaveL
+ *
+ * @since S60 v5.2
+ * @param aEntry
+ */
+ void SaveL( const CVoiceMailboxEntry& aEntry );
+
+ /**
+ * To save mailbox Provisioned entry value
+ *
+ * @since S60 v5.2
+ * @param aEntry Provisioned Entry data
+ */
+ void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry );
+
+ /**
+ * @see CVoiceMailbox::CheckConfiguration
+ *
+ * @since S60 v5.2
+ * @param aParams Specifies which mailbox capabilities,
+ * the caller wants to check.
+ * @param aFlags Use TVmbxFeatureCapabilityFlag values for this parameter.
+ * Specifies what features client wants to check.
+
+ * @return True if feature(s) enabled.
+ */
+ TBool CheckConfiguration( const TVoiceMailboxParams& aParams,
+ const TInt aFlags );
+
+ /**
+ * Check Entry writable
+ *
+ * @since S60 v5.2
+ * @param aParams params of Entry data
+ * @return ETrue if entry is writable
+ */
+ TBool IsWritable( const TVoiceMailboxParams& aParams );
+
+private:
+
+ /**
+ * C++ default constructor.
+ *
+ * @since S60 v5.2
+ * @param aProvider Reference to MVmbxResourceProvider
+ */
+ CVmbxCsVoiceEngine( MVmbxResourceProvider& aProvider );
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ *
+ * @since S60 v5.2
+ */
+ void ConstructL();
+
+ /**
+ * Queries where to save and then saves
+ *
+ * @since S60 v5.2
+ * @param in aEntry Entry data
+ */
+ void SaveEntryToPhoneL( const CVoiceMailboxEntry& aEntry );
+
+ /**
+ * For saving to place that user selects
+ *
+ * @since S60 v5.2
+ * @param in aEntry Entry data
+ */
+ void SaveEntryToSimL( const CVoiceMailboxEntry& aEntry );
+
+ /**
+ * Returns Sim writable or not
+ *
+ * @since S60 v5.2
+ * @return ETrue if writable
+ */
+ TBool IsSimWritable();
+
+private: // data
+
+ /**
+ * CVmbxSimHandler
+ * Own.
+ */
+ CVmbxSimHandler* iSimHandler;
+ };
+
+#endif // C_VMBXCSVOICEENGINE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxemergencycall.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,99 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Class for dealing with Emergency Call
+* Interface : Private, CVmbxEmergencyCall
+*
+*/
+
+
+#ifndef C_VMBXEMERGENCYCALL_H
+#define C_VMBXEMERGENCYCALL_H
+
+// INCLUDES
+#include <e32base.h>
+#include <phclttypes.h> // from PhoneClient
+#include <mphcltemergencycallobserver.h>
+
+// CLASS DECLARATION
+
+/**
+* CVmbxEmergencyCall declaration
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxEmergencyCall ) : public CBase,
+ public MPhCltEmergencyCallObserver
+ {
+ public:
+
+ /**
+ * Two-phased constructor
+ * @since S60 v5.2
+ */
+ static CVmbxEmergencyCall* NewL();
+
+ /**
+ * Destructor.
+ * @since S60 v5.2
+ */
+ ~CVmbxEmergencyCall();
+
+ /**
+ * Verifies that the given number is not an emergency number.
+ *
+ * @since S60 v5.2
+ * @param aNumber Mailbox number
+ * @return ETrue if emergency number
+ */
+ TBool IsEmergencyNumber( const TDesC& aNumber );
+
+private: // New Functions
+
+ /**
+ * C++ default constructor.
+ *
+ * @since S60 v5.2
+ */
+ CVmbxEmergencyCall();
+
+ /**
+ * C++ Two-phased constructor.
+ * @since S60 v5.2
+ */
+ void ConstructL();
+
+private: // Functions from base classes
+
+ /**
+ * Handle dial request completion.
+ *
+ * @see MPhCltExtPhoneObserver::HandleDialL().
+ *
+ * @since S60 v5.2
+ * @param aEntry Reference to store handler
+ */
+ void HandleDialL( const TInt aStatus );
+
+ /**
+ * Handling of emergency dial result.
+ *
+ * @since S60 v5.2
+ * @param aEntry Reference to store handler
+ */
+ void HandleEmergencyDialL( const TInt aStatus );
+
+ };
+
+#endif // C_VMBXEMERGENCYCALL_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxenginebase.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,153 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Base class for different mailbox entries
+* Interface : Private, CVmbxEngineBase
+*
+*/
+
+
+#ifndef C_VMBXENGINEBASE_H
+#define C_VMBXENGINEBASE_H
+
+// INCLUDES
+#include <e32base.h>
+#include <cvoicemailbox.h>
+
+#include "mvmbxresourceprovider.h"
+
+//FORWARD DECLARATIONS
+
+// CLASS DECLARATION
+/**
+* Implemets mailbox entry base class functionality
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxEngineBase ) : public CBase
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * C++ default constructor.
+ * @param aProvider Reference to CVmbxUiUtilities
+ */
+ CVmbxEngineBase( MVmbxResourceProvider& aProvider );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmbxEngineBase();
+
+public: // New functions
+ /**
+ * To get mailbox entry value
+ * Leave if no number got or Symbian OS error code
+ *
+ * @since S60 v5.2
+ * @param aEntry Entry data
+ */
+ virtual void GetL( CVoiceMailboxEntry*& aEntry ) = 0;
+
+ /**
+ * To save mailbox entry value
+ * Leave with Symbian OS error code
+ *
+ * @since S60 v5.2
+ * @param aEntry Entry data
+ */
+ virtual void SaveL( const CVoiceMailboxEntry& aEntry ) = 0;
+
+ /**
+ * To save mailbox Provisioned entry value
+ * Leave with Symbian OS error code
+ *
+ * @since S60 v5.2
+ * @param aEntry Provisioned Entry data
+ */
+ virtual void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry ) = 0;
+
+ /**
+ * Checks the Voice Mailbox how many VoIP service Ids
+ * Leave with Symbian OS error code
+ *
+ * @since S60 v5.2
+ * @param aProfileIds id of voip profile
+ */
+ virtual void GetServiceIdsL( RIdArray& aProfileIds );
+
+ /**
+ * see CVoiceMailbox::GetVmbxImage
+ *
+ * @since S60 v5.2
+ */
+ //virtual CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams );
+
+ /**
+ * Sets the Voice Mailbox current service id.
+ *
+ * @since S60 v5.2
+ * @param aVmbxServiceId Voice Mailbox service id.
+ */
+ virtual void SetCurrentServiceId( const TServiceId& aVmbxServiceId );
+
+ /**
+ * Checks the Voice Mailbox configuration to find out if a features
+ * are disabled or enabled.
+ *
+ * @since S60 v5.2
+ * @param aParams Specifies which mailbox capabilities,
+ * the caller wants to check.
+ * @param aFlags Use TVmbxFeatureCapability values for this parameter.
+ * Specifies what features client wants to check.
+
+ * @return True if feature(s) enabled.
+ */
+ virtual TBool CheckConfiguration( const TVoiceMailboxParams&
+ aParams, const TInt aFlags );
+
+ /**
+ * Displays number query dialog
+ * Leave if user don't select or Symbian OS error code
+ *
+ * @since S60 v5.2
+ * @param aEntry CVoiceMailboxEntry
+ */
+ virtual void QueryDefineNumberL( CVoiceMailboxEntry& aEntry );
+
+ /**
+ * Displays number query dialog
+ * Leave if user don't select or Symbian OS error code
+ *
+ * @since S60 v5.2
+ * @param aEntry Entry data
+ */
+ virtual void QueryChangeNumberL( CVoiceMailboxEntry& aEntry );
+
+
+protected: // data
+
+ /**
+ * Reference to CVmbxUiUtilities
+ */
+ MVmbxResourceProvider& iProvider;
+
+ /**
+ * Mailbox service id.
+ */
+ TServiceId iVmbxServiceId;
+ };
+
+#endif // C_VMBXENGINEBASE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxenginefactory.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Factory class for different mailbox engines
+* Interface : Private, CVmbxEngineFactory
+*
+*/
+
+#ifndef C_VMBXENGINEFACTORY_H
+#define C_VMBXENGINEFACTORY_H
+
+// INCLUDES
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CVmbxEngineBase;
+
+
+// CLASS DECLARATION
+
+/**
+* CVmbxEngineFactory declaration
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxEngineFactory ) : public CBase
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor
+ * @since S60 v5.2
+ * @param aProvider Reference to MVmbxResourceProvider
+ */
+ static CVmbxEngineFactory* NewL( MVmbxResourceProvider& aProvider );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmbxEngineFactory();
+
+public: // New functions
+
+ /**
+ * Creates instance of the mailbox entry
+ *
+ * @since S60 v5.2
+ * @param aEngine ownership is transferred
+ * @param aType mailbox type
+ */
+ void CreateEngineL( CVmbxEngineBase*& aEngine, TVmbxType aType );
+
+private:
+
+ /**
+ * C++ default constructor.
+ * @since S60 v5.2
+ * @param aProvider Reference to MVmbxResourceProvider
+ */
+ CVmbxEngineFactory( MVmbxResourceProvider& aProvider );
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+private: // data
+
+ /**
+ * Reference to MVmbxResourceProvider
+ */
+ MVmbxResourceProvider& iProvider;
+ };
+
+#endif // C_VMBXENGINEFACTORY_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxetelconnection.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,98 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Encapsulates RTelServer and RMobilePhone sessions
+* Interface : Private, CVmbxETelConnection
+*
+*/
+
+
+#ifndef C_VMBXETELCONNECTION_H
+#define C_VMBXETELCONNECTION_H
+
+// INCLUDES
+#include <e32base.h>
+#include <voicemailboxdefs.h>
+#include <etelmm.h>
+
+// FORWARD DECLARATION
+class RTelServer;
+class RMobilePhone;
+
+// CLASS DECLARATION
+
+/**
+* Creates connection to RTelServer and opens RMobilePhone
+*
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxETelConnection ): public CBase
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ */
+ static CVmbxETelConnection* NewL();
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmbxETelConnection();
+
+
+public: // New functions
+
+ /**
+ * Returns a reference to the ETel RTelServer
+ *
+ * @since S60 v5.2
+ * @return a reference to the ETel RTelServer
+ */
+ RTelServer& TelServer();
+
+ /**
+ * Returns a reference to the ETel RMobilePhone
+ *
+ * @since S60 v5.2
+ * @return a reference to the ETel RMobilePhone
+ */
+ RMobilePhone& Phone();
+
+private:
+
+ /**
+ * C++ constructor.
+ */
+ CVmbxETelConnection();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+private: // data
+
+ /**
+ * The ETel RTelServer
+ */
+ RTelServer iTelServer;
+
+ /**
+ * The ETel phone
+ */
+ RMobilePhone iPhone;
+ };
+
+#endif // C_VMBXETELCONNECTION_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxlogger.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Provides macros for logging
+* Interface : Private
+*
+*/
+
+#ifndef __VMBXLOGGER_H__
+#define __VMBXLOGGER_H__
+
+// INCLUDES
+#include <e32def.h>
+
+/*
+-----------------------------------------------------------------------------
+
+ USER LOG SELECTION
+
+-----------------------------------------------------------------------------
+*/
+
+#ifndef _DEBUG
+
+/***************************
+* Logging method variants:
+* 0 = No logging
+* 1 = Flogger
+* 2 = RDebug
+***************************/
+
+#define VMB_LOGGING_METHOD 1 // UREL BUILD
+
+#else
+
+#ifdef __WINS__
+#define VMB_LOGGING_METHOD 2 // UDEB BUILD, WINS
+#else
+#define VMB_LOGGING_METHOD 2 // UDEB BUILD, HW
+#endif // __WINS__
+
+#endif // _DEBUG
+
+
+// Next is for backward compatibility
+#if VMB_LOGGING_METHOD > 0
+ #define VMB_LOGGING_ENABLED
+#endif //VMB_LOGGING_METHOD
+
+
+/**
+*
+* FLOGGER SETTINGS
+*
+*/
+#if VMB_LOGGING_METHOD == 1 // Flogger
+
+ #include <flogger.h>
+
+ _LIT(KVMBLogFolder, "VMBX");
+ _LIT(KVMBLogFile, "VMBX.TXT");
+
+#elif VMB_LOGGING_METHOD == 2 // RDebug
+
+ #include <e32svr.h>
+
+#endif //VMB_LOGGING_METHOD
+
+
+/**
+*
+* LOGGING MACROs
+*
+* USE THESE MACROS IN YOUR CODE !
+*
+*/
+
+#if VMB_LOGGING_METHOD == 1 // Flogger
+
+#define VMBLOGTEXT(AAA) /*lint -save -e960 */ { RFileLogger::Write(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,AAA); } /*lint -restore */
+#define VMBLOGSTRING(AAA) /*lint -save -e960 */ { _LIT(tempLogDes,AAA); RFileLogger::Write(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,tempLogDes()); } /*lint -restore */
+#define VMBLOGSTRING2(AAA,BBB) /*lint -save -e960 -e437 */ { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB); } /*lint -restore */
+#define VMBLOGSTRING3(AAA,BBB,CCC) /*lint -save -e960 */ { _LIT(tempLogDes,AAA); RFileLogger::WriteFormat(KVMBLogFolder(),KVMBLogFile(),EFileLoggingModeAppend,TRefByValue<const TDesC>(tempLogDes()),BBB,CCC); } /*lint -restore */
+
+#elif VMB_LOGGING_METHOD == 2 // RDebug
+
+#define VMBLOGTEXT(AAA) RDebug::Print(AAA);
+#define VMBLOGSTRING(AAA) RDebug::Print(_L(AAA));
+#define VMBLOGSTRING2(AAA,BBB) RDebug::Print(_L(AAA),BBB);
+#define VMBLOGSTRING3(AAA,BBB,CCC) RDebug::Print(_L(AAA),BBB,CCC);
+
+#else // VMB_LOGGING_METHOD == 0 or invalid
+
+// Example: VMBLOGTEXT(own_desc);
+#define VMBLOGTEXT(AAA)
+// Example: VMBLOGSTRING("Test");
+#define VMBLOGSTRING(AAA)
+// Example: VMBLOGSTRING("Test %i", aValue);
+#define VMBLOGSTRING2(AAA,BBB)
+// Example: VMBLOGSTRING("Test %i %i", aValue1, aValue2);
+#define VMBLOGSTRING3(AAA,BBB,CCC)
+
+#endif // VMB_LOGGING_METHOD
+
+#endif // VMBXLOGGER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,157 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Observer class to data refresh
+* Interface : Private, CVmbxObserver
+*
+*/
+
+#ifndef C_VMBXOBSERVER_H
+#define C_VMBXOBSERVER_H
+
+// INCLUDES
+#include <e32base.h>
+
+#include "mvmbxchangeobserver.h"
+#include "mvmbxsimstoreobserver.h"
+#include "mvmbxsatrefreshobserver.h"
+#include "mvmbxcenrepobserver.h"
+#include "mvmbxresourceprovider.h"
+#include "voicemailboxdefsinternal.h"
+
+
+// FORWARD DECLARATIONS
+class CVmbxSatRefreshObserver;
+class CVmbxSimStoreObserver;
+class CVmbxCenRepObserver;
+class CVmbxSimHandler;
+
+// CLASS DECLARATION
+
+/**
+ * Mailbox observer
+ *
+ * @lib vmbxengine.lib
+ * @since S60 v5.2
+ */
+NONSHARABLE_CLASS( CVmbxObserver ) : public CBase,
+ public MVmbxSimStoreObserver,
+ public MVmbxSatRefreshObserver,
+ public MVmbxCenRepObserver
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ * @param in aProvider Reference to MVmbxResourceProvider
+ * @since S60 v5.2
+ */
+ static CVmbxObserver* NewL( MVmbxResourceProvider& aProvider );
+
+ /**
+ * Two-phased constructor.
+ * @param in aProvider Reference to MVmbxResourceProvider
+ * @since S60 v5.2
+ */
+ static CVmbxObserver* NewLC( MVmbxResourceProvider& aProvider );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmbxObserver();
+
+public: // New functions
+
+ /**
+ * Observe vmbx change.
+ * @param in aObserver Reference to MVmbxChangeObserver
+ * @since S60 v5.2
+ */
+ void SetVmbxObserver( MVmbxChangeObserver& aObserver );
+
+public: // From base class
+
+ /**
+ * From MVmbxSimStoreObserver::HandleSimStoreChanged
+ * @since S60 v5.2
+ */
+ void HandleSimStoreChanged();
+
+ /**
+ * From MVmbxSatRefreshObserver::HandleSatRefresh
+ * @since S60 v5.2
+ */
+ void HandleSatRefresh();
+
+ /**
+ * From MVmbxCenRepObserver::HandleCenRepChange
+ * @param in aId the changed key Id
+ * @since S60 v5.2
+ */
+ void HandleCenRepChange( TVmbxCenRepKey aId );
+
+private:
+
+ /**
+ * C++ default constructor.
+ * @param in aProvider Reference to MVmbxResourceProvider
+ * @since S60 v5.2
+ */
+ CVmbxObserver( MVmbxResourceProvider& aProvider );
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+private: // data
+
+ /**
+ * Pointer to MVmbxChangeObserver
+ * Own.
+ */
+ MVmbxChangeObserver* iObserver;
+
+ /**
+ * Reference to MVmbxResourceProvider
+ *
+ */
+ MVmbxResourceProvider& iProvider;
+
+ /**
+ *Pointer to CVmbxCenRepHandler
+ * Own.
+ */
+ CVmbxCenRepObserver* iCenRepObserver;
+
+ /**
+ * Pointer to CVmbxSimHandler
+ * Own.
+ */
+ CVmbxSimHandler* iSimHandler;
+
+ /**
+ * CVmbxSatRefreshObserver
+ * Own.
+ */
+ CVmbxSatRefreshObserver* iSatObserver;
+
+ /**
+ * CVmbxSimStoreObserver
+ * Own.
+ */
+ CVmbxSimStoreObserver* iSimObserver;
+ };
+
+#endif // C_VMBXOBSERVER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxpbkstore.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,248 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Access class to SIM
+* Interface : Private, CVmbxPbkStore
+*
+*/
+
+
+#ifndef C_VMBXPHBSTORE_H
+#define C_VMBXPHBSTORE_H
+
+// INCLUDES
+#include <e32base.h>
+#include <etelmm.h>
+
+#include <voicemailboxdefs.h>
+#include "voicemailboxdefsinternal.h"
+
+// FORWARD DECLARATION
+class CVmbxETelConnection;
+class CPhoneBookBuffer;
+class CVoiceMailboxEntry;
+
+
+// CLASS DECLARATION
+/**
+* Creates connection to Sim phonebook and handles data flow from/to it
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxPbkStore ) : public CActive
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * C++ 2 constructor.
+ */
+ static CVmbxPbkStore* NewL();
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmbxPbkStore();
+
+public: // New functions
+
+ /**
+ * Sim write support
+ *
+ * @since S60 v5.2
+ * @return ETrue if writable
+ */
+ TBool IsWritable();
+
+ /**
+ * sim PhoneBook Type
+ * @since S60 v5.2
+ * @return TVmbxSimPhonebookType
+ */
+ TVmbxSimPhonebookType PhoneBookType();
+
+ /**
+ * Writes an entry into ICC-based phonebook.
+ *
+ * @since S60 v5.2
+ * @param in aEntry Reference of CVoiceMailboxEntry
+ * @return KErrNone if succesful,
+ * Other system wide errors.
+ **/
+ TInt Write( const CVoiceMailboxEntry& aEntry );
+
+ /**
+ * Retrieves hanlder of RMobilePhoneBookStore
+ *
+ * @since S60 v5.2
+ * @retuns hanlder of RMobilePhoneBookStore
+ */
+ RMobilePhoneBookStore& PhonebookStore();
+
+ /**
+ * Retrieves mailbox number from Sim
+ * @since S60 v5.2
+ * @param out aEntry a data type CVoiceMailboxEntry
+ */
+ void GetL( CVoiceMailboxEntry& aEntry );
+
+private: // from base class CActive
+
+ /**
+ * @see CActive::RunL
+ */
+ void RunL();
+
+ /**
+ * @see CActive::DoCancel
+ */
+ void DoCancel();
+
+ /**
+ * @see CActive::RunError
+ */
+ TInt RunError(TInt aError);
+
+private: // New functions
+
+ /**
+ * Reads an entry from the ICC-based phonebook.
+ *
+ * @since S60 v5.2
+ * @param out aEntry Reference of CVoiceMailboxEntry
+ **/
+ void SimReadL( CVoiceMailboxEntry& aEntry );
+
+ /**
+ * Opens VMBX phonebook
+ * @since S60 v5.2
+ * @retuns KErrNone if succesful
+ **/
+ TInt OpenVmbxPhonebook();
+
+ /**
+ * Opens MBDN phonebook
+ * @since S60 v5.2
+ * @retuns KErrNone if succesful
+ **/
+ TInt OpenMbdnPhonebook();
+
+ /**
+ * Get Phonebook Info
+ * @param out aInfo information from RPhonebookStore
+ *
+ * @since S60 v5.2
+ **/
+ TInt GetVmbxInfo( RMobilePhoneBookStore::TMobilePhoneBookInfoV1& aInfo );
+
+ /**
+ * Retrieves the Mailbox numbers identifier information
+ * @param in aAlsLine curent als line
+ * @param out aInfo information from RPhonebookStore
+ * @since S60 v5.2
+ * @retuns KErrNone if succesful
+ **/
+ TInt GetMbdnInfo( const TVmbxAlsLineType aAlsLine,
+ RMobilePhone::TMobilePhoneVoicemailIdsV3& aInfo );
+
+
+ /**
+ * Reads "ParseDataL" from phonebook data from Sim
+ *
+ * @since S60 v5.2
+ * @param out aEntry entry of CVoiceMailboxEntry
+ * @param in aPbData
+ */
+ void ParseDataL( CVoiceMailboxEntry& aEntry, TDes8& aPbData );
+
+ /**
+ * Reads "new-entry-tag" from phonebook data from Sim
+ *
+ * @since S60 v5.2
+ * @param in aPbkBuffer Phonebook data buffer
+ * @retuns KErrNone if succesful
+ */
+ TInt ReadNewEntryTag( CPhoneBookBuffer* aPbkBuffer );
+
+ /**
+ * Reads tags from buffer retrieved from sim
+ *
+ * @since S60 v5.2
+ * @param in aPbkBuffer Phonebook data buffer
+ * @param out aEntry Reference of CVoiceMailboxEntry
+ */
+ void ReadPbkDataL( CPhoneBookBuffer* aPbkBuffer,
+ CVoiceMailboxEntry& aEntry );
+
+ /**
+ * Checks if sim-card is USim
+ *
+ * @since S60 v5.2
+ * @return ETrue if USim
+ **/
+ TBool SimFileExistsAndReadAccess();
+
+protected:
+
+ /**
+ * C++ constructor.
+ *
+ * @since S60 v5.2
+ */
+ CVmbxPbkStore();
+
+ /**
+ * By default Symbian 2nd phase constructor is protected.
+ */
+ void ConstructL();
+
+protected: // data
+
+ /**
+ *Pointer to Telephony server and phone connection
+ *Own
+ */
+ CVmbxETelConnection* iETelConnection;
+
+ /**
+ * Phonebook store client
+ */
+ RMobilePhoneBookStore iPhoneBook;
+
+ /**
+ * Sim Phonebook type
+ */
+ TVmbxSimPhonebookType iPhoneBookType;
+
+ /**
+ * Alpha string which is read from the SIM card
+ * Own.
+ */
+ HBufC* iAlphaStringFromSIM;
+
+ /**
+ * CActiveSchedulerWait
+ * Own.
+ */
+ CActiveSchedulerWait* iWait;
+
+
+ /**
+ * Asynchronous operation type of sim card
+ */
+ TVmbxSimAsynType iAsynType;
+
+ };
+
+#endif // C_VMBXPHBSTORE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxqtuihandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Hanlder Ui which implement of qt.
+* Interface : Private, VmbxQtUiHandler
+*
+*/
+
+
+#ifndef VMBXQTUIHANDLER_H
+#define VMBXQTUIHANDLER_H
+
+// INCLUDES
+#include <QObject>
+#include <voicemailboxdefs.h>
+
+// FORWARD DECLARATION
+
+
+// CLASS DECLARATION
+
+/**
+* Dialog manager
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( VmbxQtUiHandler ): public QObject
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * C++ default constructor.
+ *
+ * @since S60 v5.2
+ */
+ VmbxQtUiHandler(QObject* parent = 0 );
+
+ /**
+ * Destructor.
+ */
+ ~VmbxQtUiHandler();
+
+ /**
+ * Show mailbox query dialog
+ *
+ * @since S60 v5.2
+ * @param aType in TVmbxType type
+ * @param aMode Tin VmbxQueryMode mode
+ * @param aNumber the voice mailbox number
+ * @param aResult out the result of dialog
+ */
+ void showVmbxQueryDialog(const TVmbxType& aType,
+ const TVmbxQueryMode& aMode,
+ QString& aNumber, int& aResult);
+
+ /**
+ * Show define number in selection dialog
+ * Leaves if user cancel selected.
+ *
+ * @since S60 v5.2
+ * @param in aType vmbx type
+ * @param out aResult the result of dialog
+ */
+ void showDefineSelectionDialog(TVmbxType& aType, int& aResult);
+
+ /**
+ * Show voice mailbox information number
+ *
+ * @since S60 v5.2
+ * @param aNoteType in TVmbxType type
+ */
+ void showInformationNote(int aNoteType);
+
+ /**
+ * Show save empty number note
+ *
+ * @since S60 v5.2
+ * @param aType in TVmbxType type
+ */
+ void showSaveEmptyNote(const TVmbxType& aType);
+ };
+
+#endif // VMBXQTUIHANDLER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxsatrefreshobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Observer to Sat refresh
+* Interface : Private, CVmbxSatRefreshObserver
+*
+*/
+
+
+#ifndef C_VMBXSATREFRESHOBSERVERR_H
+#define C_VMBXSATREFRESHOBSERVERR_H
+
+// INCLUDES
+#include <e32base.h>
+#include <RSatSession.h>
+#include <RSatRefresh.h>
+#include <msatrefreshobserver.h>
+#include "mvmbxsatrefreshobserver.h"
+
+
+// FORWARD DECLARATIONS
+
+
+// CLASS DECLARATION
+
+/**
+* Implements functionality specifig to voice mailbox entry
+*
+
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxSatRefreshObserver ) : public CBase,
+ public MSatRefreshObserver
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor
+ * @param in aObserver observer which want to notify sat refresh
+ */
+ static CVmbxSatRefreshObserver* NewL( MVmbxSatRefreshObserver& aObserver );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmbxSatRefreshObserver();
+
+public: // from base class MSatRefreshObserver
+
+ /**
+ * @See MSatRefreshObserver::AllowRefresh
+ */
+ TBool AllowRefresh( TSatRefreshType aType,
+ const TSatRefreshFiles& aFiles ) ;
+
+ /**
+ * @See MSatRefreshObserver::Refresh
+ */
+ void Refresh( TSatRefreshType aType, const TSatRefreshFiles& aFiles );
+
+private:
+
+ /**
+ * C++ default constructor.
+ * @param aObserver Reference to MVmbxSatRefreshObserver
+ */
+ CVmbxSatRefreshObserver( MVmbxSatRefreshObserver& aObserver);
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+private: // data
+
+ /**
+ * Sat server session
+ * Own
+ */
+ RSatSession iRSatSession;
+
+ /**
+ * Sat refresh connection
+ * Own
+ */
+ RSatRefresh iSatRefresh;
+
+ /**
+ * A package for the TRefreshFileList.
+ * list of files, waiting for notification.
+ */
+ RSat::TRefreshFileList iObservedFileList;
+
+ /**
+ * Reference to MVmbxSatRefreshObserver
+ */
+ MVmbxSatRefreshObserver& iObserver;
+ };
+
+#endif // C_VMBXSATREFRESHOBSERVERR_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxsimhandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,123 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Access class to SIM
+* Interface : Private, CVmbxSimHandler
+*
+*/
+
+
+#ifndef C_VMBXSIMHANDLER_H
+#define C_VMBXSIMHANDLER_H
+
+// INCLUDES
+#include <e32base.h>
+#include <voicemailboxdefs.h>
+#include "voicemailboxdefsinternal.h"
+
+
+// FORWARD DECLARATION
+class CVmbxPbkStore;
+class CVoiceMailboxEntry;
+
+
+// CLASS DECLARATION
+/**
+* Creates connection to Sim phonebook and handles data flow from/to it
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxSimHandler ) : public CBase
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ */
+ static CVmbxSimHandler* NewL();
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmbxSimHandler();
+
+public: // New functions
+
+ /**
+ * Retrieves mailbox number from Sim
+ * @since S60 v5.2
+ * @param in aEntry a data type of CVoiceMailboxEntry
+ */
+ void GetL( CVoiceMailboxEntry& aEntry );
+
+ /**
+ * Saves vmbx number to Sim
+ * @since S60 v5.2
+ * @param in aEntry a data type of CVoiceMailboxEntry
+ * @return Symbian OS error code (KErrNone if successful)
+ */
+ TInt Save( const CVoiceMailboxEntry& aEntry );
+
+ /**
+ * Returns sim write access info
+ * @since S60 v5.2
+ * @return ETrue if Sim is writable
+ **/
+ TBool IsWritable();
+
+ /**
+ * @see RMobilePhoneStore::NotifyStoreEvent
+ *
+ * @since S60 v5.2
+ */
+ void NotifyStoreEvent( TRequestStatus& aStatus,
+ TUint32& aEvent,
+ TInt& aIndex ) const;
+ /**
+ * Retrieves Sim PhoneBook Type
+ * @since S60 v5.2
+ * @return TVmbxSimPhonebookType
+ */
+ TVmbxSimPhonebookType PhoneBookType();
+
+ /**
+ * CancelAsyncRequest
+ * @since S60 v5.2
+ * @param aReqToCancel Entry data
+ */
+ void CancelAsyncRequest( TInt aReqToCancel ) const;
+
+protected:
+
+ /**
+ * C++ constructor.
+ */
+ CVmbxSimHandler();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+private: // data
+
+ /**
+ * pbk store
+ * Own.
+ */
+ CVmbxPbkStore* iPbkStore;
+ };
+
+#endif // C_VMBXSIMHANDLER_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxsimstoreobserver.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,122 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Observer to Sim Store changed
+* Interface : Private, CVmbxSimStoreObserver
+*
+*/
+
+
+#ifndef C_VMBXSIMSTOREOBSERVERR_H
+#define C_VMBXSIMSTOREOBSERVERR_H
+
+// INCLUDES
+#include <e32base.h>
+#include "mvmbxsimstoreobserver.h"
+
+// FORWARD DECLARATIONS
+class CVmbxSimHandler;
+
+// CLASS DECLARATION
+
+/**
+* DECLARATION CVmbxSimStoreObserver
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxSimStoreObserver ) : public CActive
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor
+ * @param in aSimHandler Reference to Sim handler
+ * @param in aObserver observer of MVmbxSimStoreObserver
+ */
+ static CVmbxSimStoreObserver* NewL( CVmbxSimHandler& aSimHandler,
+ MVmbxSimStoreObserver& aObserver );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmbxSimStoreObserver();
+
+public: // New functions
+
+ /**
+ * Activates this notification. Call ETel NotifyStoreEvent.
+ */
+ void ActivateL();
+
+private:
+
+ /**
+ * C++ default constructor.
+ * @param in aSimHandler Reference to Sim handler
+ * @param in aObserver observer of MVmbxSimStoreObserver
+ */
+ CVmbxSimStoreObserver( CVmbxSimHandler& aSimHandler,
+ MVmbxSimStoreObserver& aObserver );
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+ /**
+ * Informs SimHandler about changed number
+ */
+ void NotifySimHandler();
+
+// from base class CActive
+private:
+ /**
+ * @see CActive::RunL
+ */
+ void RunL();
+
+ /**
+ * @see CActive::DoCancel
+ */
+ void DoCancel();
+
+
+private: // data
+
+ /**
+ * The index of the entry that has been changed
+ */
+ TInt iIndex;
+
+ /**
+ * The events that ETel sends
+ */
+ TUint32 iEvents;
+
+ /**
+ * CVmbxSimHandler reference
+ *
+ */
+ CVmbxSimHandler& iSimHandler;
+
+ /**
+ * MVmbxSimStoreObserver reference
+ *
+ */
+ MVmbxSimStoreObserver& iObserver;
+
+ };
+
+#endif // C_VMBXSIMSTOREOBSERVERR_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxuihandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,159 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Handler ui related.
+* Interface : Private, CVmbxUiHandler
+*
+*/
+
+#ifndef VMBXENGINEQTUI_H
+#define VMBXENGINEQTUI_H
+
+
+#include <voicemailboxdefs.h>
+#include "mvmbxuihandler.h"
+
+// FORWARD DECLARATION
+class VmbxQtUiHandler;
+
+// CLASS DECLARATION
+
+/**
+*
+* @lib qvmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxUiHandler ):public CBase,
+ public MVmbxUiHandler
+ {
+
+public: // Constructors and destructor
+ /**
+ * Two-phased constructor
+ * @since S60 v5.2
+ */
+ static CVmbxUiHandler* NewL();
+
+ /**
+ * Destructor.
+ */
+ ~CVmbxUiHandler();
+
+//From MVmbxUiHandler
+
+ /**
+ * Show mailbox query dialog
+ * Leaves if user cancel selected.
+ *
+ * @since S60 v5.2
+ * @param aType in TVmbxType type
+ * @param aMode Tin VmbxQueryMode mode
+ * @param aNumber the voice mailbox number
+ * @param aResult out the result of dialog
+ */
+ virtual void ShowVmbxQueryDialog( const TVmbxType& aType,
+ const TVmbxQueryMode & aMode, TDes& aNumber, TInt& aResult );
+
+ /**
+ * Show define number in selection dialog
+ *
+ * @since S60 v5.2
+ * @param in aType vmbx type
+ * @param out aResult the result of dialog
+ */
+ virtual void ShowDefineSelectionDialog( TVmbxType& aType, TInt& aResult );
+
+ /**
+ * Show call number in selection dialog
+ *
+ * @since S60 v5.2
+ * @param in aArray array of the defined voice mailbox entry
+ * @param in aIcons icons of the defined voice mailbox
+ * @param out aParams the type TVoiceMailboxParams which should include
+ * the service id and the type of seclected TVmbxType
+ * @param out aResult the result user seclected
+ */
+ /*virtual void ShowCallSelectionDialogL(
+ const RPointerArray<CVoiceMailboxEntry>& aArray,
+ //CArrayPtr<CGulIcon>* aIcons,
+ TVoiceMailboxParams& aParams, TInt& aResult ) = 0;*/
+
+ /**
+ * Show confirmation dialog when save number to phone
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowSaveToPhoneNote();
+
+ /**
+ * Show confirmation dialog when save number to SIM
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowSaveToSimNote();
+
+ /**
+ * Show confirmation dialog when save video number
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowVideoSavedNote();
+
+ /**
+ * show an error dialog for invalid number
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowInvalidNumberNote();
+
+ /**
+ * show an error dialog for invalid number
+ *
+ * @since S60 v5.2
+ */
+ virtual void ShowInvalidWarningNote();
+
+ /**
+ * To get mailbox entry value
+ * Leaves if Symbian OS error code
+ *
+ * @since S60 v5.2
+ * @param aType TVmbxType type
+ */
+ virtual void ShowSaveEmptyNote( const TVmbxType& aType );
+
+private:
+
+ /** C++ default constructor.
+ *
+ * @since S60 v5.2
+ */
+ CVmbxUiHandler();
+
+ /**
+ * C++ Two-phased constructor.
+ * @since S60 v5.2
+ */
+ void ConstructL();
+
+private: // data
+
+ /**
+ * Dialog manage
+ * Own
+ */
+ VmbxQtUiHandler* iHandler;
+
+ };
+
+#endif // VMBXENGINEQTUI_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxuiutilities.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,200 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Utility methods for universal usage
+* Interface : Private, CVmbxUiUtilities
+*
+*/
+
+#ifndef C_VMBXUIUTILITIES_H
+#define C_VMBXUIUTILITIES_H
+
+// INCLUDES
+#include <e32base.h>
+#include <cvoicemailbox.h>
+
+#include "mvmbxuiutilities.h"
+#include "vmbxuihandler.h"
+
+// FORWARD DECLARATIONS
+
+
+// CLASS DECLARATION
+/**
+* Implementation of the auxiliary methods for the VMBX engine classes
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxUiUtilities ): public CBase,
+ public MVmbxUiUtilities
+ {
+
+public:
+
+ /**
+ * Two-phased constructor
+ * @since S60 v5.2
+ */
+ static CVmbxUiUtilities* NewL();
+
+ /**
+ * Destructor.
+ * @since S60 v5.2
+ */
+ ~CVmbxUiUtilities();
+
+ /**
+ * Show mailbox query
+ *
+ * @since S60 v5.2
+ * @param in aType TVmbxType type
+ * @param in aMode TVmbxQueryMode mode
+ * @param out aNumber the voice mailbox number
+ */
+ void ShowQueryL( const TVmbxType& aType,
+ const TVmbxQueryMode& aMode,
+ TDes& aNumber );
+
+ /**
+ * Show mailbox query dialog
+ * Leaves if user cancel selected.
+ *
+ * @since S60 v5.2
+ * @param aType in TVmbxType type
+ * @param aMode Tin VmbxQueryMode mode
+ * @param aNumber the voice mailbox number
+ * @param aResult out the result of dialog
+ */
+ void ShowQueryDialogL( const TVmbxType& aType,
+ const TVmbxQueryMode & aMode, TDes& aNumber, TInt& aResult );
+
+ /**
+ * Show confirmation dialog when save number to phone
+ *
+ * @since S60 v5.2
+ */
+ void ShowSaveToPhoneNote();
+
+ /**
+ * Show confirmation dialog when save number to SIM
+ *
+ * @since S60 v5.2
+ */
+ void ShowSaveToSimNote();
+
+ /**
+ * Show confirmation dialog when save video number
+ *
+ * @since S60 v5.2
+ */
+ void ShowVideoSavedNote();
+
+ /**
+ * Show define number in selection dialog
+ * Leaves if user cancel selected.
+ *
+ * @since S60 v5.2
+ * @param in aType vmbx type
+ * @param out aResult the result of dialog
+ */
+ void ShowDefineSelectionDialogL( TVmbxType& aType, TInt& aResult );
+
+ /**
+ * Show call number in selection dialog
+ * Leaves if user cancel selected.
+ *
+ * @since S60 v5.2
+ * @param in aArray array of the defined voice mailbox entry
+ * @param in aIcons icons of the defined voice mailbox
+ * @param out aParams the type TVoiceMailboxParams which should include
+ * the service id and the type of seclected TVmbxType
+ * @param out aResult the result user seclected
+ */
+ void ShowCallSelectionDialogL(
+ const RPointerArray<CVoiceMailboxEntry>& aArray,
+ //CArrayPtr<CGulIcon>* aIcons,
+ TVoiceMailboxParams& aParams, TInt& aResult );
+
+ /**
+ * Tries to close all open dialogs
+ *
+ * @since S60 v5.2
+ */
+ void DismissDialogL();
+
+ /**
+ * To get mailbox entry value
+ * Leaves if Symbian OS error code
+ *
+ * @since S60 v5.2
+ * @param aType TVmbxType type
+ */
+ void ShowSaveEmptyNoteL( const TVmbxType& aType );
+
+ /**
+ * Get Mailbox type default image.
+ * If get unseccessful, Leaves with Symbian OS error code
+ *
+ * @since S60 v5.2
+ * @param aParams Mailbox type for which image is needed.
+ * @return aImage New image. Ownership is transferred.
+ */
+ //CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams );
+
+ /**
+ * Show error dialog
+ *
+ * @since S60 v5.2
+ */
+ void ShowErrorDialogL();
+
+ /**
+ * Show invalid or warning dialog
+ *
+ * @since S60 v5.2
+ */
+ void ShowInvalidWarningDialogL();
+
+
+private: // data
+
+ /**
+ * C++ default constructor.
+ */
+ CVmbxUiUtilities();
+
+ /**
+ * C++ Two-phased constructor.
+ * @since S60 v5.2
+ */
+ void ConstructL();
+
+
+ /**
+ * Open phonebook's Single Fetch Dialog
+ * @since S60 v5.2
+ * @param aPhoneNumber Phone number
+ */
+ void FetchNumberFromPhonebook2L( TDes& aPhoneNumber );
+
+private:
+
+ /**
+ * Ui handler
+ * Own.
+ */
+ CVmbxUiHandler* iUiHandler;
+ };
+
+#endif // C_VMBXUIUTILITIES_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxutilities.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,119 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Utility methods for universal usage
+* Interface : Private, VmbxUtilities
+*
+*/
+
+
+#ifndef VMBXUTILITIES_H
+#define VMBXUTILITIES_H
+
+// INCLUDES
+#include <voicemailboxdefs.h>
+
+// FORWARD DECLARATIONS
+
+
+// CLASS DECLARATION
+
+/**
+* Implementation of the auxiliary methods for the VMBX engine classes
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( VmbxUtilities )
+ {
+
+public: // New functions
+
+ /**
+ * Verifies that the given string is a valid phone number.
+ * Rules:
+ * - '+' is only allowed as the first character
+ * - The phone number part must be between 3-40 digits
+ *
+ * @since S60 v5.2
+ * @param in aNumber Vmbx number
+ * @return ETrue if valid number
+ */
+ static TBool IsValidPhoneNumber( const TDesC& aNumber );
+
+ /**
+ /**
+ * Returns active ALS
+ *
+ * @since S60 v5.2
+ * @return Active ALS line
+ */
+ static TVmbxAlsLineType AlsLine();
+
+ /**
+ * Returns state of the video support
+ *
+ * @since S60 v5.2
+ * @return ETrue if Video supported
+ */
+ static TBool VideoSupported();
+
+ /**
+ * Returns state of the VoIP Support
+ *
+ * @since S60 v5.2
+ * @return ETrue if VoIP Supported
+ */
+ static TBool VoIPSupported();
+
+ /**
+ * Verifies that the given number is not an emergency number.
+ *
+ * @since S60 v5.2
+ * @param in aNumber Mailbox number
+ * @return ETrue if emergency number
+ */
+ static TBool IsEmergencyNumber( const TDesC& aNumber );
+
+private:
+
+ /**
+ * Verifies that the given string is a valid SS.
+ *
+ * @since S60 v5.2
+ * @param in&out aLexer string to be validate
+ * @return ETrue if supplementary service code validate
+ */
+ static TBool ValidateSsNum( TLex& aLexer );
+
+ /**
+ * Verifies that the given string is a valid Tel number.
+ *
+ * @since S60 v5.2
+ * @param in aLexer string to be validate
+ * @return ETrue if tel number validate
+ */
+ static TBool ValidateTelNum( TLex& aLexer );
+
+ /**
+ * Verifies that the given string is a valid DTMF number.
+ *
+ * @since S60 v5.2
+ * @param in aLexer string to be validate
+ * @return ETrue if DTMf validate
+ */
+ static TBool ValdateDtmfPart( TLex& aLexer );
+
+ };
+
+#endif // VMBXUTILITIES_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmbxvoipengine.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,189 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Access class to VoIp engine implementation
+* Interface : Private, CVmbxVoIpEngine
+*
+*/
+
+
+#ifndef C_VMBXVOIPENGINE_H
+#define C_VMBXVOIPENGINE_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+
+// FORWARD DECLARATIONS
+class CVmbxEngineBase;
+//class CGulIcon;
+class CVmSPSHandler;
+class CVmBSHandler;
+class TVmbxServiceInfo;
+//class CFbsBitmap;
+
+// CLASS DECLARATION
+
+/**
+* Implements functionality specifig to voip mailbox entry
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVmbxVoIpEngine ) : public CVmbxEngineBase
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor
+ * @param aProvider Reference to Ui Utilities
+ */
+ static CVmbxVoIpEngine* NewL( MVmbxResourceProvider& aProvider );
+
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmbxVoIpEngine();
+
+public: // from base class CVmbxEntryBase
+
+ /**
+ *
+ * @since S60 v5.2
+ * @see CVmbxEntryBase::GetL
+ * @param aEntry Reference to store handler
+ */
+ void GetL( CVoiceMailboxEntry*& aEntry );
+
+ /**
+ *
+ * @since S60 v5.2
+ * @see CVmbxEntryBase::SaveL
+ * @param aEntry Reference to CVoiceMailboxEntry
+ */
+ void SaveL( const CVoiceMailboxEntry& aEntry );
+
+ /**
+ * To save mailbox Provisioned entry value
+ *
+ * @since S60 v5.2
+ * @param aEntry Provisioned Entry data
+ */
+ void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry );
+
+ /**
+ * see CVmbxEntryBase::CheckConfiguration
+ *
+ * @since S60 v5.2
+ */
+ TBool CheckConfiguration( const TVoiceMailboxParams& aParams,
+ const TInt aFlags );
+
+ /**
+ * Displays number query dialog
+ *
+ * @since S60 v5.2
+ * @param aEntry CVoiceMailboxEntry
+ */
+ void QueryDefineNumberL( CVoiceMailboxEntry& aEntry );
+
+ /**
+ * Displays number query dialog
+ *
+ * @since S60 v5.2
+ * @param aEntry Entry data
+ */
+ void QueryChangeNumberL( CVoiceMailboxEntry& aEntry );
+
+private: // New function
+
+ /**
+ * C++ default constructor.
+ *
+ * @since S60 v5.2
+ * @param aProvider Reference to Ui Utilities
+ */
+ CVmbxVoIpEngine( MVmbxResourceProvider& aProvider );
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ *
+ * @since S60 v5.2
+ */
+ void ConstructL();
+
+ /**
+ * Check from SPSettings if there are VoIP profiles
+ * @since S60 3.2.3
+ * @param None
+ * @return ETrue if VoIP profiles were found, otherwise EFalse
+ */
+ TBool IsVoIPProfilesFound();
+
+ /**
+ * Checks the Voice Mailbox how many VoIP service Ids
+ *
+ * @since S60 v5.2
+ * @param aProfileIds
+ * @return KErrNone if get service Ids successfully.
+ */
+ void GetServiceIdsL( RIdArray& aProfileIds );
+
+ /**
+ * Get branded icon
+ * @since S60 v5.2
+ * @param in aBrandingId Brandind Id
+ * @param out aBrandedBitmap Bitmap for branded icon
+ * @param out aBrandedBitmapMask Mask to branded icon
+ */
+ //void GetBrandedIconL( const TDesC8& aBrandingId,
+ // CFbsBitmap*& aBrandedBitmap, CFbsBitmap*& aBrandedBitmapMask );
+
+ /**
+ * see CVoiceMailbox::GetVmbxImage
+ *
+ * @since S60 v5.2
+ */
+ //CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams );
+
+ /**
+ * Get brand id
+ * @since S60 v5.2
+ * @param in aServiceId Used Service
+ * @param out aBrandId On completion, contains Brand Id
+ */
+ void BrandIdL( TInt aServiceId, TDes8& aBrandId );
+
+ /**
+ * Get service ids
+ * @since S60 v5.2
+ * @param in&out aServiceInfo On completion contains service ids
+ */
+ TInt GetServiceInfo( TVmbxServiceInfo& aServiceInfo );
+
+private: // data
+
+ /**
+ * Handles Service proviver Settings, Own.
+ */
+ CVmSPSHandler* iVmSpsHandler;
+
+ /**
+ * Handles Branding Server, Own.
+ */
+ CVmBSHandler* iVmBsHandler;
+ };
+
+#endif // C_VMBXVOIPENGINE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmsettingsuiiconfileprovider.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,76 @@
+/*
+* Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+ *
+*/
+
+#ifndef C_VMSETTINGSUIICONFILEPROVIDER
+#define C_VMSETTINGSUIICONFILEPROVIDER
+
+#include <e32base.h>
+#include <AknIconUtils.h>
+
+/**
+ * CVmSettingsUiIconFileProvider class
+ * Declarition of CVmSettingsUiIconFileProvider.
+ *
+ * @since S60 v3.2
+ */
+NONSHARABLE_CLASS( CVmSettingsUiIconFileProvider ) : public CBase,
+ public MAknIconFileProvider
+ {
+public:
+
+ /**
+ * Two-phased constructor.
+ * @param in aFile for handle to file
+ */
+ static CVmSettingsUiIconFileProvider* NewL( RFile& aFile );
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmSettingsUiIconFileProvider();
+
+public: // from base class MAknIconFileProvider
+
+ /**
+ * from MAknIconFileProvider.
+ */
+ void RetrieveIconFileHandleL( RFile& aFile, const TIconFileType aType );
+
+ /**
+ * from MAknIconFileProvider.
+ */
+ void Finished();
+
+private:
+
+ /**
+ * C++ default constructor.
+ */
+ CVmSettingsUiIconFileProvider();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL( RFile& aFile );
+
+private: // data
+
+ // File handle. Own.
+ RFile iFile;
+ };
+
+#endif // C_VMSETTINGSUIICONFILEPROVIDER
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/vmspshandler.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,208 @@
+/*
+* Copyright (c) 2009-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Service provider settings handler
+ *
+*/
+
+#ifndef C_VMSPSHANDLER_H
+#define C_VMSPSHANDLER_H
+
+// INCLUDES
+#include <e32std.h>
+#include <e32base.h>
+#include <mspnotifychangeobserver.h>
+#include <spsettingsvoiputils.h>
+#include "mvmbxservicenotify.h"
+
+
+// FORWARD DECLARATIONS
+class CSPSettings;
+class CSPNotifyChange;
+class TVmbxServiceInfo;
+
+// CLASS DECLARATION
+
+/**
+ * CVmSPSHandler declaration.
+ * Service provider settings handler is used to access service and
+ * sub-service configuration data.
+ *
+ * @since S60 3.2
+ */
+NONSHARABLE_CLASS( CVmSPSHandler ) : public CBase,
+ private MSPNotifyChangeObserver
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor.
+ */
+ static CVmSPSHandler* NewL();
+
+ /**
+ * Two-phased constructor.
+ */
+ static CVmSPSHandler* NewLC();
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVmSPSHandler();
+
+public: // New functions
+
+ /**
+ * Get service ids which support Voice Mailbox
+ * @since S60 3.2
+ * @param aServiceIds On completion contains service ids
+ */
+ void GetServiceIdsL( RArray<TUint>& aServiceIds ) const;
+
+ /**
+ * Get service's info
+ * @since S60 3.2
+ * @param aServiceInfo On completion contains service info
+ */
+ TInt GetServiceInfo( TVmbxServiceInfo& aServiceInfo ) const;
+
+ /**
+ * Get service's VMBX address
+ * @since S60 3.2
+ * @param aServiceId Used Service
+ * @param aService On completion, contains service's address
+ */
+ void GetVmAddressL( const TUint32 aServiceId, TDes& aAddress ) const;
+
+ /**
+ * Get service's name
+ * @since S60 3.2
+ * @param aServiceId Used Service
+ * @param aName On completion, contains service's name
+ */
+ void GetServiceNameL( const TUint32 aServiceId, TDes& aName ) const;
+
+ /**
+ * Get SNAP id
+ * @since S60 3.2
+ * @param aServiceId Used Service
+ * @param aSNAPId On completion, contains SNAP Id
+ */
+ void GetSNAPIdL( TUint32 aServiceId, TInt& aSNAPId ) const;
+
+ /**
+ * Get brand id
+ * @since S60 3.2
+ * @param aServiceId Used Service
+ * @param aBrandId On completion, contains Brand Id
+ */
+ void BrandIdL( TInt aServiceId, TDes8& aBrandId );
+
+ /**
+ * Check is given service already activated
+ * @since S60 3.2
+ * @param aServiceId Used Service
+ * @return ETrue if Service is already activated
+ */
+ TBool IsActivatedL( TInt aServiceId );
+
+ /**
+ * Issues a notify request on a Service profile change.
+ * @param aHandler user's notify handler
+ */
+ void NotifyServiceChange( MServiceNotifyHandler* aHandler );
+
+ /**
+ * Cancels a notify request on a VoIP profile change.
+ */
+ void NotifyServiceChangeCancel();
+
+ /**
+ * Check from SPSettings if there are VoIP profiles
+ * @since S60 3.2.3
+ * @param None
+ * @return ETrue if VoIP profiles were found, otherwise EFalse
+ */
+ TBool IsVoIPProfilesFound();
+
+protected:
+
+ /**
+ * Handle notify change event.
+ * From MSPNotifyChangeObserver;
+ *
+ * @since S60 3.2
+ * @param aServiceId The service ID of changed service
+ */
+ void HandleNotifyChange( TServiceId aServiceId );
+
+ /**
+ * Handle error
+ *
+ * @since S60 3.2
+ */
+ void HandleError( TInt aError );
+
+private:
+
+ /**
+ * Is VMBX supported
+ * @since S60 3.2
+ * @param aServiceId Used Service
+ * @return ETrue if VMBX is supported
+ */
+ TBool IsVbmxSupportedL( TUint32 aServiceId ) const;
+
+ /**
+ * C++ default constructor.
+ */
+ CVmSPSHandler();
+
+ /**
+ * By default Symbian 2nd phase constructor is private.
+ */
+ void ConstructL();
+
+private: // data
+
+ /**
+ * CSPSettings. Own
+ */
+ CSPSettings* iSettings;
+
+ /**
+ * CSPSettingsVoIPUtils. Own
+ */
+ CSPSettingsVoIPUtils* iSpsSettingsVoipUtils;
+
+ /**
+ * Observer. Not own
+ */
+ MServiceNotifyHandler* iObserver;
+
+ /**
+ * Pointer to CSPNotifyChange
+ */
+ CSPNotifyChange* iNotifier;
+
+ /**
+ * Service id array
+ */
+ RIdArray iServiceIds;
+
+ };
+
+#endif // C_VMSPSHANDLER_H
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/voicemailboxdefsinternal.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Constant used for vmbx engine
+*
+*/
+
+#ifndef C_VOICEMAILBOXDEFSINTERNAL_H
+#define C_VOICEMAILBOXDEFSINTERNAL_H
+
+// INCLUDES
+#include <e32base.h>
+
+// CONSTANTS
+const TInt KVmLbxItemsArraySize = 3;
+
+/**Sim card voice mailbox file type*/
+enum TVmbxSimPhonebookType
+ {
+ /**
+ * Sim file using 6f17 file.
+ */
+ EVMBXPhoneBook = 0,
+ /**
+ * Sim file using 6fc7 file.
+ */
+ EMBDNPhoneBook
+ };
+
+/**CenRep Key which storaged value would be changed*/
+enum TVmbxCenRepKey
+ {
+ /**
+ * Storage Voice number of Line Primary.
+ */
+ EVmbxVoiceLinePrimaryKey = 0,
+ /**
+ * Storage Voice number of Line Alternate.
+ */
+ EVmbxVoiceLineAlternateKey,
+ /**
+ * Storage Video number of Line Primary.
+ */
+ EVmbxVideoLinePrimaryKey,
+ /**
+ * Storage Video number of Line Alternate.
+ */
+ EVmbxVideoLineAlternateKey,
+ /**
+ * the max value.
+ */
+ EVmbxCenRepMax
+ };
+
+/**
+ * TVmbxServiceInfo, contains Service information.
+ *
+ * @since S60 5.2
+ **/
+class TVmbxServiceInfo
+ {
+ public: // Constructors and destructor
+
+ TVmbxServiceInfo()
+ {
+ iServiceId = 0;
+ iSnapId = 0;
+ }
+
+ public: // Data
+
+ // Service's Id
+ TUint iServiceId;
+
+ // Service's SNAP Id
+ TUint32 iSnapId;
+
+ // Service's name.
+ TBuf<64> iName;
+
+ // Service's address.
+ TBuf<100> iAddress;
+ };
+
+/**Asynchronous operation type of sim card*/
+enum TVmbxSimAsynType
+ {
+ /**
+ * the default value.
+ */
+ EVmbxSimDefault,
+ /**
+ * Retrieves Phonebook stroe information.
+ */
+ EVmbxSimGetInfo,
+ /**
+ * Retrieves Phonebook entry for "voicemail" mailbox number.
+ */
+ EVmbxSimMbdnInfo,
+ /**
+ * Read "voicemail" mailbox number from phonebook store.
+ */
+ EVmbxSimEntryRead,
+ /**
+ * Write "voicemail" mailbox number to phonebook store.
+ */
+ EVmbxSimEntryWrite
+ };
+
+/**Note for vmbx ui utilities*/
+enum TVmbxNoteType
+ {
+ EInvalidNumber,
+ ESavedToPhoneMemory,
+ ESavedToSimMemory,
+ ENumberEmpty,
+ EVoiceNumberEmpty,
+ EVideoNumberEmpty,
+ EVideoNumberSaved
+ };
+
+#endif // C_VOICEMAILBOXDEFSINTERNAL_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/voicemailboxdomaincrkeys.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,39 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Interface : Domain
+*
+*/
+
+
+#ifndef VOICEMAILBOXDOMAINCRKEYS_H
+#define VOICEMAILBOXDOMAINCRKEYS_H
+#include <e32std.h>
+
+/** VoiceMailbox Settings API */
+/** Provides access to the VoiceMailbox video mailbox support key
+determination */
+
+const TUid KCRUidVideoMailbox = {0x101F874F};
+
+/**
+*
+* Integer type
+*
+* Default value: 1
+*/
+const TUint32 KVideoMbxSupport = 0x00000015;
+
+
+#endif // VOICEMAILBOXDOMAINCRKEYS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/voicemailboximpl.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,460 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation class for voice mailbox
+* Interface : Private, CVoiceMailboxImpl
+*
+*/
+
+#ifndef C_VOICEMAILBOXIMPL_H
+#define C_VOICEMAILBOXIMPL_H
+
+
+// INCLUDES
+#include <e32base.h>
+#include <cvoicemailbox.h>
+#include "mvmbxchangeobserver.h"
+#include "mvoicemailboxobserver.h"
+#include "mvmbxresourceprovider.h"
+#include "mvmbxuiutilities.h"
+#include "mvmbxcenrephandler.h"
+
+// FORWARD DECLARATIONS
+class CVmbxUiUtilities;
+class CVmbxEngineFactory;
+class CVmbxObserver;
+class CVmbxCenRepHandler;
+
+// CLASS DECLARATION
+
+/**
+* Implemets mailbox entry base class functionality
+*
+* @lib vmbxengine.lib
+* @since S60 v5.2
+*/
+NONSHARABLE_CLASS( CVoiceMailboxImpl ) : public CBase,
+ public MVmbxChangeObserver,
+ public MVmbxResourceProvider
+ {
+
+public: // Constructors and destructor
+
+ /**
+ * Two-phased constructor
+ */
+ static CVoiceMailboxImpl* NewL();
+
+ /**
+ * Two-phased constructor
+ */
+ static CVoiceMailboxImpl* NewLC();
+
+ /**
+ * Destructor.
+ */
+ virtual ~CVoiceMailboxImpl();
+
+public: // New functions
+
+ /**
+ * see CVoiceMailbox::GetStoredEntry
+ *
+ * @since S60 v5.2
+ */
+ TInt GetStoredEntry( const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry ) const;
+
+ /**
+ * see CVoiceMailbox::SaveEntry
+ *
+ * @since S60 v5.2
+ */
+ TInt SaveEntry( const CVoiceMailboxEntry& aEntry );
+
+ /**
+ * see CVoiceMailbox::QueryNewEntry
+ *
+ * @since S60 v5.2
+ */
+ TInt QueryNewEntry( const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry );
+
+ /**
+ * see CVoiceMailbox::QueryChangeEntry
+ *
+ * @since S60 v5.2
+ */
+ TInt QueryChangeEntry( const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry);
+
+ /**
+ * see CVoiceMailbox::QueryVmbxType
+ *
+ * @since S60 v5.2
+ */
+ TInt QueryVmbxType( TVoiceMailboxParams& aParams );
+
+ /**
+ * see CVoiceMailbox::NotifyVmbxNumberChangeL
+ *
+ * @since S60 v5.2
+ */
+ void NotifyVmbxNumberChangeL( MVoiceMailboxObserver& aObserver,
+ const TBool aNotifyOnActiveLineOnly );
+
+ /**
+ * see CVoiceMailbox::NotifyVmbxNumberChangeCancel
+ *
+ * @since S60 v5.2
+ */
+ void NotifyVmbxNumberChangeCancel();
+
+ /**
+ * see CVoiceMailbox::CheckConfiguration
+ *
+ * @since S60 v5.2
+ */
+ TBool CheckConfiguration( const TVoiceMailboxParams& aParams,
+ const TInt aFlags );
+
+ /**
+ * see CVoiceMailbox::GetServiceIds
+ *
+ * @since S60 v5.2
+ */
+ TInt GetServiceIds( RIdArray& aProfileIds );
+
+ /**
+ * see CVoiceMailbox::GetVmbxImage
+ *
+ * @since S60 v5.2
+ */
+ //CGulIcon* GetVmbxImage( const TVoiceMailboxParams& aParams );
+
+ /**
+ * see CVoiceMailbox::GetVmbxImages
+ *
+ * @since S60 v5.2
+ */
+ //CArrayPtr<CGulIcon>* GetVmbxImages(
+ // RArray<TVoiceMailboxParams>& aParams );
+
+ /**
+ * see CVoiceMailbox::SaveProvisionedEntry
+ *
+ * @since S60 v5.2
+ */
+ TInt SaveProvisionedEntry( const CVoiceMailboxEntry& aEntry );
+
+
+public: // From MVmbxChangeObserver
+
+ /**
+ * see MVmbxChangeObserver::SatRefreshL
+ *
+ * @since S60 v5.2
+ */
+ void SatRefreshL();
+
+ /**
+ * see MVmbxChangeObserver::CenRepChangedL
+ *
+ * @since S60 v5.2
+ */
+ void CenRepChangedL( TVmbxCenRepKey aId );
+
+ /**
+ * see MVmbxChangeObserver::SimStoreChangedL
+ *
+ * @since S60 v5.2
+ */
+ void SimStoreChangedL();
+
+public: // From MVmbxChangeObserver
+
+ /**
+ * Get Handler of VmbxUiUtilities
+ *
+ * @since S60 v5.2
+ * @return Refereance of MVmbxUiUtilities
+ */
+ MVmbxUiUtilities& VmbxUiUtilities();
+
+ /**
+ * Get Handler of VmbxCenrepHandler
+ *
+ * @since S60 v5.2
+ * @return Refereance of MVmbxCenrepHandler
+ */
+ MVmbxCenrepHandler& VmbxCenRepHandler();
+
+
+private: //New method
+
+ /**
+ * C++ default constructor.
+ *
+ */
+ CVoiceMailboxImpl();
+
+ /**
+ * ConstructL
+ *
+ * @since S60 v5.2
+ */
+ void ConstructL();
+
+ /**
+ * Retrieves voice mailbox entry for the specified service.
+ * Leave - KErrNotFound if no entry available
+ * - KErrArgument when illegal argument
+ * - Other system wide errors.
+ *
+ * @since S60 v5.2
+ * @param in Params Service id and type of the mailbox for which
+ * a number/address should be defined.
+ * @param out aEntry If successful, a new result container is
+ * created and ownership passed to the caller.
+ */
+ void GetStoredEntryL( const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry ) const;
+
+ /**
+ * Displays a query asking the user to define a mailbox number/address.
+ * Returns the input which the user entered, but does not save it.
+ * For that caller has to use SaveEntry().
+ * This method may display related UI notes or queries.
+ *
+ * If editing for the specified mailbox service is not allowed,
+ * this method displays an error note and returns an error.
+ * If client is interested, CheckConfiguration()
+ * can be used to check permissions.
+ *
+ * Leave - KErrNotFound if the number is not defined
+ * (user entered no number or selected Cancel)
+ * - KErrArgument When illegal argument.
+ * - KErrNotSupported if not capable or allowed to execute this
+ * for the specified mailbox.
+ * - Other system wide errors.
+ *
+ * @since S60 v5.2
+ * @param in aParams Service id and type of the mailbox for which
+ * a number/address should be defined.
+ * @param out aEntry If successful, a new result container is
+ * created and ownership passed to the caller.
+ */
+ void QueryNewEntryL( const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry );
+
+ /**
+ * Saves the vmbx entry to its storage.
+ * Leave - KErrNotSupported if not capable or allowed to execute this
+ * for the specified mailbox service.
+ * - KErrArgument When illegal argument was passed.
+ * - Other system wide errors.
+ *
+ * Some mailbox types may not support saving all arguments.
+ * In that case unsupported arguments are ignored.
+ * This method may display related UI notes or queries.
+ *
+ * @since S60 v5.2
+ * @param in aEntry The vmbx entry to save.
+ */
+ void SaveEntryL( const CVoiceMailboxEntry& aEntry );
+
+ /**
+ * Displays a query asking the user to change a mailbox number/address.
+ * Returns the input from user, but does not save it.
+ * For that caller has to use SaveEntry().
+ *
+ * If editing for the specified mailbox service is not allowed,
+ * this method displays an error note and returns an error.
+ * If client is interested, CheckConfiguration()
+ * can be used to check permissions.
+ *
+ * created and ownership passed to the caller.
+ * aNumber will contain the vmbx number.
+ * Leave - KErrCancel If the user selected Cancel.
+ * - KErrArgument When illegal argument.
+ * - KErrNotSupported if not capable or allowed to execute this
+ * for the specified mailbox.
+ * - Other system wide errors.
+ *
+ * @since S60 v5.2
+ * @param in aParams Service id and type of the mailbox.
+ * @param out aEntry If successful, a new result container is
+ */
+ void QueryChangeEntryL( const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry);
+
+ /**
+ * Displays a query on the screen asking the user to select a
+ * Voice Mailbox service.
+ *
+ * Leave - KErrCancel if user selected Cancel
+ * - KErrNotFound if there is no defined voice number and
+ * user have selected the type to define or the default
+ * type given.
+ * - Other system wide errors.
+ *
+ * @since S60 v5.2
+ * @param out aParams If successful,
+ * contains selected mailbox info.
+ */
+ void QueryVmbxTypeL( TVoiceMailboxParams& aParams );
+
+ /**
+ * Get defined entries via an array
+ * Leave with symbian OS error code except KErrNotFound and KErrSupported.
+ *
+ * @since S60 v5.2
+ * @param out aArray array contains the defined entries
+ */
+ void GetDefinedEntriesL( RPointerArray<CVoiceMailboxEntry>& aArray );
+
+ /**
+ * Get defined voice entry via an array
+ * Leave with symbian OS error code except KErrSupported.
+ *
+ * @since S60 v5.2
+ * @param out aArray array contains the defined entries
+ */
+ void GetDefinedVoiceEntryL(
+ RPointerArray<CVoiceMailboxEntry>& aArray );
+
+ /**
+ * Get defined video entry via an array
+ * Leave with symbian OS error code except KErrNotFound and KErrSupported.
+ *
+ * @since S60 v5.2
+ * @param out ay array contains the defined entries
+ */
+ void GetDefinedVideoEntryL(
+ RPointerArray<CVoiceMailboxEntry>& aArray );
+
+ /**
+ * Get defined voip entries via an array
+ * Leave with symbian OS error code except KErrNotFound and KErrSupported.
+ *
+ * @since S60 v5.2
+ * @param out aArray array contains the defined entries
+ */
+ void GetDefinedVoipEntriesL(
+ RPointerArray<CVoiceMailboxEntry>& aArray );
+
+ /**
+ * Checks the Voice Mailbox how many VoIP service Ids
+ * Leave with symbian OS error code
+ *
+ * @since S60 v5.2
+ * @param out aProfileIds
+ * @return KErrNone if get service Ids successfully.
+ */
+ void GetServiceIdsL( RIdArray& aProfileIds );
+
+ /**
+ * Retrieves an image associated with the specified mailbox,
+ * if an image is available.
+ * Image can be displayed e.g. in a selection list.
+ * Leave with symbian OS error code.
+ *
+ * @since S60 v5.2
+ * @param in aParams Mailbox service id and type for which image is needed.
+ * @return aImage New image. Ownership is transferred.
+ */
+ //CGulIcon* GetVmbxImageL( const TVoiceMailboxParams& aParams );
+
+ /**
+ * Retrieves images for the specified mailboxes.
+ * Image can be displayed e.g. in a selection list.
+ * Leave with symbian OS error code.
+ *
+ * If an image for a service is not available,
+ * then a NULL pointer is appended to the returned array, to an index
+ * corresponding to the index of the service id in the input
+ * array aMailboxServices.
+ * NULL array pointer is returned if not a signle icon was retrieved
+ * successfully.
+ *
+ * @since S60 v5.2
+ * @param in aParams Mailboxes (id and type) for which an image is needed.
+ * @return aImage Icons for the specified mailboxes.
+ * Index of an image in the returned array corresponds to the
+ * index of the service id in the input array.
+ * Array and icon ownerships are transferred to caller.
+ * A NULL array pointer is returned if not a single icon was
+ * retrieved successfully.
+ */
+ //CArrayPtr<CGulIcon>* GetVmbxImagesL(
+ // RArray<TVoiceMailboxParams>& aParams );
+
+ /**
+ * Notify entry changed
+ * Leave with symbian OS error code.
+ *
+ * @since S60 v5.2
+ * @param in aType Type of TVmbxType
+ */
+ void NotifyChangedL( TVmbxType aType);
+
+ /**
+ * Saves provisioned entry to corresponding storage.
+ *
+ * Leave - KErrNotSupported if not capable or allowed to execute this
+ * for the specified mailbox service.
+ * - KErrArgument When illegal argument was passed.
+ * - Other system wide errors.
+ *
+ * Some mailbox types may not support saving all arguments.
+ * In that case unsupported arguments are ignored.
+ *
+ * @since S60 v5.2
+ * @param in aEntry The provisioned vmbx entry to save.
+ */
+ void SaveProvisionedEntryL( const CVoiceMailboxEntry& aEntry );
+
+protected: // data
+
+ /**
+ * Pointer to CVmbxUiUtilities
+ * Own.
+ */
+ CVmbxUiUtilities* iUiUtilities;
+
+ /**
+ * Pointer to CVmbxEngineFactory
+ * Own.
+ */
+ CVmbxEngineFactory* iVmbxFactory;
+
+ /**
+ * Observer for user action for saved vmbx number
+ * Own.
+ */
+ MVoiceMailboxObserver* iNotifyCallBack;
+
+ /**
+ * Observer for user action for saved vmbx number
+ * Own.
+ */
+ CVmbxObserver* iVmbxObserver;
+
+ /**
+ * CVmbxCenRepHandler
+ * Own.
+ */
+ CVmbxCenRepHandler* iCenRepHandler;
+ };
+
+#endif // C_VOICEMAILBOXIMPL_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/inc/voicemailboxprivatecrkeys.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,97 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+* Interface : Private
+*
+*/
+
+
+#ifndef VOICEMAILBOXPRIVATECRKEYS_H
+#define VOICEMAILBOXPRIVATECRKEYS_H
+#include <e32std.h>
+
+const TInt KVmbxUiUserEditNotAllowed = 0x01;
+
+
+/** VoiceMailbox Settings API */
+/** Provides access to the VoiceMailbox numbers and settings */
+
+const TUid KCRUidVoiceMailbox = {0x101F874F};
+
+
+/** Flag which decides where the vmbx number is to be stored.
+* If this is On (equals 1) the voice mailbox number is stored in SIM memory,
+* else it is stored in Phone memory.
+*
+* Integer type
+*
+* Default value: 1
+*/
+const TUint32 KVmbxUsesSimMemory = 0x00000000;
+
+/** Flag which decides if writing to sim allowed.
+* If this is On (equals 1) writing to SIM is not allowed.
+* Writing is allowed with value 0
+* Value
+* Integer type
+*
+* Default value: 1
+*/
+const TUint32 KVmbxNoSimWriting = 0x00000001;
+
+/** Voice Mailbox number for primary line
+*
+** Text type
+*
+* Default value: ""
+*/
+const TUint32 KVmbxNumberLinePrimary = 0x00000002;
+
+/** Voice Mailbox number for Alternate line
+*
+** Text type
+*
+* Default value: ""
+*/
+const TUint32 KVmbxNumberLineAlternate = 0x00000003;
+
+/** Video Mailbox number for primary line
+*
+* Text type
+*
+* Default value: ""
+*/
+const TUint32 KVmbxVideoNmbrLinePrimary = 0x00000004;
+
+/** Video Mailbox number for Alternate line
+*
+* Text type
+*
+* Default value: ""
+*/
+const TUint32 KVmbxVideoNmbrLineAlternate = 0x00000005;
+
+/** Flag which User allowed or not allowed to change the VMBX number
+* If set value 0x01 no allowed to be edited by user.
+*
+* Integer type0
+* 0 indicate allowed
+* Default value: 0
+*/
+const TUint32 KVmbxUiCaps = 0x00000006;
+
+
+
+
+#endif // VOICEMAILBOXPRIVATECRKEYS_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/rom/vmbxengine.iby Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: IBY file for Voice mailbox Engine
+ *
+*/
+
+
+
+#ifndef __VMBXENGINE_IBY__
+#define __VMBXENGINE_IBY__
+
+//vmbxengine.dll
+file=ABI_DIR\BUILD_DIR\vmbxengine.dll SHARED_LIB_DIR\vmbxengine.dll
+
+
+// sis stub file
+data=ZSYSTEM\install\vmbxengine_stub.sis System\Install\vmbxengine_stub.sis
+
+#endif // __VMBXENGINE_IBY__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/cvoicemailbox.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,269 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the CVoiceMailbox class
+*
+*/
+
+// INCLUDE FILES
+#include <exception>
+
+#include <cvoicemailbox.h>
+#include <cvoicemailboxentry.h>
+#include "voicemailboximpl.h"
+#include "vmbxlogger.h"
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt TVoiceMailboxParams::Version()
+ {
+ return iVersion;
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TVoiceMailboxParams::TVoiceMailboxParams():
+ iType( EVmbxNone ),
+ iServiceId( KVmbxServiceIdNone ),
+ iLineType( EVmbxAlsLineDefault )
+ {
+ VMBLOGSTRING( "VMBX: TVoiceMailboxParams: default cnstructor =>" );
+ VMBLOGSTRING( "VMBX: TVoiceMailboxParams: default cnstructor<=" );
+ }
+
+// ---------------------------------------------------------------------------
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TVoiceMailboxParams::TVoiceMailboxParams(
+ const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: TVoiceMailboxParams: Entry cnstructor =>" );
+ iType = aEntry.VoiceMailboxType();
+ iServiceId = aEntry.ServiceId();
+ iLineType = aEntry.VmbxAlsLineType();
+ VMBLOGSTRING( "VMBX: TVoiceMailboxParams: Entry cnstructor <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::CVoiceMailboxImpl
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CVoiceMailbox::CVoiceMailbox()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::CVoiceMailbox <=>" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailbox::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::ConstructL =>" );
+ iBody =CVoiceMailboxImpl::NewL();
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CVoiceMailbox* CVoiceMailbox::NewL()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::NewL =>" );
+ CVoiceMailbox* self = CVoiceMailbox::NewLC();
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::NewL <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::NewLC
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CVoiceMailbox* CVoiceMailbox::NewLC()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::NewLC =>" );
+ CVoiceMailbox* self = new( ELeave ) CVoiceMailbox;
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::NewLC <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::~CVoiceMailbox
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CVoiceMailbox::~CVoiceMailbox()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::~CVoiceMailbox =>" );
+ delete iBody;
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::~CVoiceMailbox <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::GetStoredEntry
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CVoiceMailbox::GetStoredEntry(
+ const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry ) const
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::GetStoredEntry <=>" );
+ return iBody->GetStoredEntry( aParams, aEntry );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::SaveEntry
+// Destructor
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CVoiceMailbox::SaveEntry( const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::SaveEntry <=>" );
+ return iBody->SaveEntry( aEntry );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::QueryNewEntry
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CVoiceMailbox::QueryNewEntry(
+ const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::QueryNewEntry <=>" );
+ return iBody->QueryNewEntry( aParams, aEntry );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::QueryChangeEntry
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CVoiceMailbox::QueryChangeEntry(
+ const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::QueryChangeEntry <=>" );
+ return iBody->QueryChangeEntry( aParams, aEntry );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::QueryVmbxType
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CVoiceMailbox::QueryVmbxType(
+ TVoiceMailboxParams& aParams )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::QueryVmbxType <=>" );
+ return iBody->QueryVmbxType( aParams );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::NotifyVmbxNumberChangeL
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CVoiceMailbox::NotifyVmbxNumberChangeL(
+ MVoiceMailboxObserver& aObserver, const TBool aNotifyOnActiveLineOnly )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::NotifyVmbxNumberChangeL =>" );
+ iBody->NotifyVmbxNumberChangeL( aObserver,
+ aNotifyOnActiveLineOnly);
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::NotifyVmbxNumberChangeL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::NotifyVmbxNumberChangeCancel
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CVoiceMailbox::NotifyVmbxNumberChangeCancel()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::NotifyVmbxNumberChangeCancel =>" );
+ iBody->NotifyVmbxNumberChangeCancel();
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::NotifyVmbxNumberChangeCancel <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::CheckConfiguration
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CVoiceMailbox::CheckConfiguration(
+ const TVoiceMailboxParams& aParams, const TInt aFlags )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::CheckConfiguration <=>" );
+ return iBody->CheckConfiguration( aParams, aFlags );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::GetServiceIds
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CVoiceMailbox::GetServiceIds( RIdArray& aProfileIds ) const
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::GetServiceIds <=>" );
+ return iBody->GetServiceIds( aProfileIds );
+ }
+
+// Commented out because branding not yet supported.
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::GetVmbxImage
+//
+// ---------------------------------------------------------------------------
+/* EXPORT_C CGulIcon* CVoiceMailbox::GetVmbxImage(
+ const TVoiceMailboxParams& aParams ) const
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::GetVmbxImageL <=>" );
+ return iBody->GetVmbxImage( aParams );
+ }
+ */
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::GetVmbxImages
+//
+// ---------------------------------------------------------------------------
+//
+/* EXPORT_C CArrayPtr<CGulIcon>* CVoiceMailbox::GetVmbxImages(
+ RArray<TVoiceMailboxParams>& aParams ) const
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::GetVmbxImages <=>" );
+ return iBody->GetVmbxImages( aParams );
+ }
+ */
+// ---------------------------------------------------------------------------
+// CVoiceMailbox::SaveProvisionedEntry
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CVoiceMailbox::SaveProvisionedEntry(
+ const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailbox::SaveProvisionedEntry <=>" );
+ return iBody->SaveProvisionedEntry( aEntry );
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/cvoicemailboxentry.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,388 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the CVoiceMailboxEntry class
+*
+*/
+
+// INCLUDE FILES
+#include <cvoicemailboxentry.h>
+#include "vmbxlogger.h"
+
+// CONSTANTS
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::NewL
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CVoiceMailboxEntry* CVoiceMailboxEntry::NewL()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::NewL =>" );
+ CVoiceMailboxEntry* self = CVoiceMailboxEntry::NewLC();
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::NewL <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::NewLC
+//
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CVoiceMailboxEntry* CVoiceMailboxEntry::NewLC()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::NewLC =>" );
+ CVoiceMailboxEntry* self = new( ELeave ) CVoiceMailboxEntry;
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::NewLC <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::~CVoiceMailboxEntry
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CVoiceMailboxEntry::~CVoiceMailboxEntry()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::~CVoiceMailboxEntry =>" );
+ delete ivmbxNumber;
+ delete iVmbxBrandId;
+ delete ivmbxName;
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::~CVoiceMailboxEntry <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::ServiceId
+// Get ServiceId
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TServiceId CVoiceMailboxEntry::ServiceId() const
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::ServiceId =>" );
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::ServiceId:\
+ ServiceId=%d <=", iVmbxServiceId );
+ return iVmbxServiceId;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetServiceId
+// Set entry's service id
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxEntry::SetServiceId(
+ const TServiceId& aVmbxServiceId )
+ {
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetServiceId: ServiceId=%d =>",
+ aVmbxServiceId );
+ iVmbxServiceId = aVmbxServiceId;
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SetServiceId <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::VoiceMailboxType
+// Returns type of the entry instance
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TVmbxType CVoiceMailboxEntry::VoiceMailboxType( ) const
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::VoiceMailboxType <=>" );
+ return iVmbxType;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetVoiceMailboxType
+// Set Type of the entry instance
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CVoiceMailboxEntry::SetVoiceMailboxType( const TVmbxType& aType )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::SetVoiceMailboxType =>" );
+ iVmbxType = aType;
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetVoiceMailboxType:\
+ iVmbxType=%d <=", iVmbxType );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::VmbxAlsLineType
+// Get ALS line Type of the entry instance
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TVmbxAlsLineType CVoiceMailboxEntry::VmbxAlsLineType() const
+ {
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::VmbxAlsLineType:\
+ iVmbxLineType=%d <=>", iVmbxLineType );
+ return iVmbxLineType;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetVmbxAlsLineType
+// Set ALS line Type of the entry instance
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxEntry::SetVmbxAlsLineType(
+ const TVmbxAlsLineType& aLine )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::SetVmbxAlsLineType =>" );
+ if ( EVmbxAlsLineDefault == aLine )
+ {
+ iVmbxLineType = EVmbxAlsLine1;
+ }
+ else
+ {
+ iVmbxLineType = aLine;
+ }
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetVmbxAlsLineType:\
+ iVmbxLineType=%d <=", iVmbxLineType );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::GetVmbxNumber
+// Get number or address of the entry instance
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CVoiceMailboxEntry::GetVmbxNumber( TPtrC& aVmbxNumber ) const
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetVmbxNumber =>" );
+ TInt result( KErrNotFound );
+ if ( ivmbxNumber )
+ {
+ aVmbxNumber.Set( ivmbxNumber->Des() );
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::GetVmbxNumber:\
+ ivmbxNumber = %S", &aVmbxNumber );
+ result = KErrNone;
+ }
+ else
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetVmbxNumber:KNullDesC" );
+ aVmbxNumber.Set( KNullDesC );
+ }
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetVmbxNumber <=" );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetVmbxNumber
+// Set number or address of the entry instance
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CVoiceMailboxEntry::SetVmbxNumber( const TDesC& aVmbxNumber )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::SetVmbxNumber =>" );
+ TInt result( KErrNoMemory );
+ if ( aVmbxNumber.Length() > KVmbxMaxNumberLength )
+ {
+ result = KErrArgument;
+ }
+ else
+ {
+ delete ivmbxNumber;
+ ivmbxNumber = aVmbxNumber.Alloc(); // Returns NULL if fails.
+ if ( ivmbxNumber )
+ {
+ result = KErrNone;
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetVmbxNumber:\
+ ivmbxNumber = %S", ivmbxNumber );
+ }
+ }
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetVmbxNumber:\
+ result = %I<=", result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::GetVmbxAlsLineType
+// Get Brand Id of the entry instance
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CVoiceMailboxEntry::GetBrandId( TPtrC8& aBrandId ) const
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetBrandId =>" );
+ TInt result( KErrNotFound );
+ if ( iVmbxBrandId )
+ {
+ aBrandId.Set( iVmbxBrandId->Des() );
+ result = KErrNone;
+ }
+ else
+ {
+ aBrandId.Set( KNullDesC8 );
+ }
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetBrandId <=" );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetBrandId
+// Set Brand Id of the entry instance
+// ---------------------------------------------------------------------------
+//
+TInt CVoiceMailboxEntry::SetBrandId( const TDesC8& aBrandId )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::SetBrandId =>" );
+ TInt result( KErrNoMemory );
+ if ( KVmbxMaxNumberLength < aBrandId.Length() )
+ {
+ result = KErrArgument;
+ }
+ else
+ {
+ delete iVmbxBrandId;
+ iVmbxBrandId = aBrandId.Alloc();
+ if ( iVmbxBrandId )
+ {
+ result = KErrNone;
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetBrandId:\
+ iVmbxBrandId = %S", iVmbxBrandId );
+ }
+ }
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetBrandId:result = %d <=",
+ result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::GetVmbxName
+// Get Name of the entry instance
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CVoiceMailboxEntry::GetVmbxName( TPtrC& aVmbxName ) const
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetVmbxName =>" );
+ TInt result( KErrNotFound );
+ if ( ivmbxName )
+ {
+ aVmbxName.Set( ivmbxName->Des() );
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::GetVmbxName:\
+ ivmbxName = %S", &aVmbxName );
+ result = KErrNone;
+ }
+ else
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetVmbxName:KNullDesC" );
+ aVmbxName.Set( KNullDesC );
+ }
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::GetVmbxName <=" );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetVmbxName
+// Set Name of the entry instance
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CVoiceMailboxEntry::SetVmbxName( const TDesC& aVmbxName )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::SetVmbxName =>" );
+ TInt result( KErrNoMemory );
+ if ( KVmbxMaxNumberLength < aVmbxName.Length() )
+ {
+ result = KErrArgument;
+ }
+ else
+ {
+ delete ivmbxName;
+ ivmbxName = aVmbxName.Alloc(); // Returns NULL if fails.
+ if ( ivmbxName )
+ {
+ result = KErrNone;
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetVmbxName:\
+ ivmbxName = %S", ivmbxName );
+ }
+ }
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetVmbxName: result %d <=",
+ result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::UsingMemoryLocation
+// Returns memory location of the entry instance
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TVmbxMemoryLocation CVoiceMailboxEntry::UsingMemoryLocation( ) const
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::UsingMemoryLocation <=>" );
+ return iUsingMemory;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::Reset
+// Reset the data members of the entry instance
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CVoiceMailboxEntry::Reset()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::Reset =>" );
+ iVmbxServiceId = KVmbxServiceIdNone;
+ iVmbxType = EVmbxNone;
+ iVmbxLineType = EVmbxAlsLineDefault;
+ if ( ivmbxNumber )
+ {
+ ivmbxNumber->Des().Zero();
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::Reset vmbx number" );
+ }
+ if ( ivmbxName )
+ {
+ ivmbxName->Des().Zero();
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::Reset vmbx name" );
+ }
+ if ( iVmbxBrandId )
+ {
+ iVmbxBrandId->Des().Zero();
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::Reset vmbx brandId" );
+ }
+ iUsingMemory = EVmbxSimMemory;
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::Reset <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::SetUsingMemoryLocation
+// Set using memory of the entry instance
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxEntry::SetUsingMemoryLocation(
+ const TVmbxMemoryLocation& aType )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::SetUsingMemoryLocation =>" );
+ iUsingMemory = aType;
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxEntry::SetUsingMemoryLocation:\
+ iUsingMemory=%I <=", iUsingMemory );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::CVoiceMailboxEntry
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CVoiceMailboxEntry::CVoiceMailboxEntry()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::CVoiceMailboxEntry <=>" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxEntry::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxEntry::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxEntry::ConstructL <=>" );
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbshandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,170 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CVmBSHandler class.
+ *
+*/
+
+// INCLUDE FILES
+#include <mbsaccess.h>
+#include <cbsfactory.h>
+#include <mbselement.h>
+#include <cbsbitmap.h>
+#include <coemain.h>
+#include <AknsItemID.h>
+#include <AknsSkinInstance.h>
+#include <AknsUtils.h>
+
+#include "vmsettingsuiiconfileprovider.h"
+#include "vmbshandler.h"
+#include "vmbxlogger.h"
+
+
+// CONSTANTS used in VoIP branding, remove/update when branding is handled
+// Branding server & data constants.
+//const TInt KVmSettingsUiBrandingIconSize = 21; // icon size
+
+//_LIT8( KVmSettingsUiBSApplicationId, "xsp" ); // application id
+//_LIT8( KVmSettingsUiBSIconId, "service_active_image_small" ); // icon id
+
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVmBSHandler::CVmBSHandler
+// C++ default constructor can NOT contain any code, that might leave.
+// ---------------------------------------------------------------------------
+//
+CVmBSHandler::CVmBSHandler()
+ {
+ VMBLOGSTRING( "VMBX: CVmBSHandler::CVmBSHandler <=>" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmBSHandler::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CVmBSHandler::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmBSHandler::ConstructL <=>" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmBSHandler::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmBSHandler* CVmBSHandler::NewL( )
+ {
+ VMBLOGSTRING( "VMBX: CVmBSHandler::NewL =>" );
+ CVmBSHandler* self = CVmBSHandler::NewLC();
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVmBSHandler::NewL <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmBSHandler::NewLC
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmBSHandler* CVmBSHandler::NewLC()
+ {
+ VMBLOGSTRING( "VMBX: CVmBSHandler::NewLC =>" );
+ CVmBSHandler* self = new (ELeave) CVmBSHandler();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ VMBLOGSTRING( "VMBX: CVmBSHandler::NewLC =>" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmBSHandler::NewLC
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CVmBSHandler::~CVmBSHandler()
+ {
+ VMBLOGSTRING( "VMBX: CVmBSHandler::~CVmBSHandler <=>" );
+ }
+
+// Commented out because branding is not supported yet.
+// ---------------------------------------------------------------------------
+// CVmBSHandler::GetBrandedIconL
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+// void CVmBSHandler::GetBrandedIconL(
+// const TDesC8& aBrandingId,
+// CFbsBitmap*& aBrandedBitmap,
+// CFbsBitmap*& aBrandedBitmapMask ) const
+// {
+// VMBLOGSTRING( "VMBX: CVmBSHandler::GetBrandedIconL =>" );
+// // Create branding server factory and access to branding data.
+// CBSFactory* factory = CBSFactory::NewL(
+// aBrandingId, KVmSettingsUiBSApplicationId );
+// CleanupStack::PushL( factory );
+//
+// MBSAccess* access = factory->CreateAccessL(
+// aBrandingId, ELangInternationalEnglish );
+// CleanupClosePushL( *access );
+//
+// // Get structure which contains bitmap information.
+// MBSElement* element = access->GetStructureL( KVmSettingsUiBSIconId );
+// CleanupClosePushL( *element );
+// const CBSBitmap& bitmap = element->BitmapDataL();
+//
+// // Open file which contains branded bitmaps.
+// RFile file;
+// CleanupClosePushL( file );
+// access->GetFileL( bitmap.BitmapFileId(), file );
+//
+// // Try to load a skinned bitmap.
+// if ( CCoeEnv::Static() )
+// {
+// TAknsItemID itemId;
+// itemId.Set( bitmap.SkinIdMajor(), bitmap.SkinIdMinor() );
+// MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+// TRAP_IGNORE( ( aBrandedBitmap =
+// AknsUtils::CreateBitmapL( skin, itemId ) ) );
+// }
+//
+// // If skinned bitmaps was not found, try to load bitmaps manually.
+// if ( !aBrandedBitmap )
+// {
+// CVmSettingsUiIconFileProvider* ifp =
+// CVmSettingsUiIconFileProvider::NewL( file );
+//
+// AknIconUtils::CreateIconL(
+// aBrandedBitmap,
+// aBrandedBitmapMask,
+// *ifp,
+// bitmap.BitmapId(),
+// bitmap.BitmapMaskId() );
+// }
+//
+// // Set sizes.
+// const TInt iconSize( KVmSettingsUiBrandingIconSize );
+// AknIconUtils::SetSize( aBrandedBitmap, TSize( iconSize, iconSize ) );
+// AknIconUtils::SetSize( aBrandedBitmapMask, TSize( iconSize, iconSize ) );
+//
+// // Destroy some items.
+// CleanupStack::PopAndDestroy( &file );
+// CleanupStack::PopAndDestroy( element );
+// CleanupStack::PopAndDestroy( access );
+// CleanupStack::PopAndDestroy( factory );
+// VMBLOGSTRING( "VMBX: CVmBSHandler::GetBrandedIconL <=" );
+// }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxcenrephandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,324 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the CVmbxCenRepHandler class
+*
+*/
+
+
+// INCLUDE FILES
+#include <centralrepository.h>
+#include <cvoicemailboxentry.h>
+
+#include "voicemailboxdomaincrkeys.h"
+#include "voicemailboxprivatecrkeys.h"
+#include "vmbxlogger.h"
+#include "vmbxcenrephandler.h"
+
+// CONSTANTS
+const TUint32 KUnknownCenRepKey( 0xffffffff );
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepHandler::CVmbxCenRepHandler
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CVmbxCenRepHandler::CVmbxCenRepHandler()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::CVmbxCenRepHandler <=>" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepHandler::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CVmbxCenRepHandler::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::ConstructL =>" );
+ iCRSession = CRepository::NewL( KCRUidVoiceMailbox );
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepHandler::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxCenRepHandler* CVmbxCenRepHandler::NewL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::NewL =>" );
+ CVmbxCenRepHandler* self = new( ELeave ) CVmbxCenRepHandler();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::NewL <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepHandler::~CVmbxCenRepHandler
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CVmbxCenRepHandler::~CVmbxCenRepHandler()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::~CVmbxCenRepHandler =>" );
+ delete iCRSession;
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::~CVmbxCenRepHandler <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepHandler::GetVmbxNumber
+// Get saved entry number
+// ---------------------------------------------------------------------------
+//
+TInt CVmbxCenRepHandler::GetVmbxNumber( CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::GetVmbxNumber =>" );
+ TInt result( KErrNotFound );
+ // get right cenrep key
+ TUint32 cenRepKey = ResolveKeyByEntry( aEntry );
+ if ( KUnknownCenRepKey != cenRepKey )
+ {
+ HBufC* cenRepEntry = HBufC::New( KVmbxMaxNumberLength );
+ TPtr ptr( cenRepEntry->Des() );
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::GetVmbxNumber: CenRep Get" );
+ result = iCRSession->Get( cenRepKey, ptr );
+ // get cenrep value
+ if ( KErrNone == result )
+ {
+ if ( ptr.Length() )
+ {
+ result = aEntry.SetVmbxNumber( ptr );
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::GetVmbxNumber:\
+ Set Entry" );
+ }
+ else
+ {
+ result = KErrNotFound;
+ }
+ }
+ delete cenRepEntry;
+ cenRepEntry = NULL;
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::GetVmbxNumber: result%d <=",
+ result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepHandler::Save
+// Saves the mailbox number
+// ---------------------------------------------------------------------------
+//
+TInt CVmbxCenRepHandler::Save( const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::Save =>" );
+ TInt result( KErrNone );
+ // get right cenrep key
+ TUint32 cenRepKey = ResolveKeyByEntry( aEntry );
+
+ if ( KUnknownCenRepKey != cenRepKey )
+ {
+ // set cenrep value
+ TPtrC vmbxNumber( KNullDesC );
+ aEntry.GetVmbxNumber( vmbxNumber );
+ result = iCRSession->Set( cenRepKey, vmbxNumber );
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::Save result=%d <=", result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepHandler::ResolveKeyByEntry
+// Resolve CenRep key by entry
+// ---------------------------------------------------------------------------
+//
+TUint32 CVmbxCenRepHandler::ResolveKeyByEntry(
+ const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::ResolveKeyByEntry =>" );
+ TVmbxAlsLineType alsLine = aEntry.VmbxAlsLineType();
+ TVmbxType entryType = aEntry.VoiceMailboxType();
+
+ TUint32 cenRepKey( KUnknownCenRepKey );
+ switch ( entryType )
+ {
+ // Voice mailbox
+ case EVmbxVoice:
+ {
+ cenRepKey = VoiceCenRepKey( alsLine );
+ break;
+ }
+ // Video mailbox
+ case EVmbxVideo:
+ {
+ cenRepKey = VideoCenRepKey( alsLine );
+ break;
+ }
+ default:
+ break;
+ }
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::ResolveKeyByEntry <=" );
+ return cenRepKey;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepHandler::VoiceCenRepKey
+// Voice mailbox cenntral repository key value
+// ---------------------------------------------------------------------------
+//
+TUint32 CVmbxCenRepHandler::VoiceCenRepKey(
+ const TVmbxAlsLineType& aLine )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VoiceCenRepKey =>" );
+ TUint32 cenRepKey( KUnknownCenRepKey );
+ if ( EVmbxAlsLine2 == aLine )
+ {
+ cenRepKey = KVmbxNumberLineAlternate;
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VoiceCenRepKey:Line2" );
+ }
+ else
+ {
+ cenRepKey = KVmbxNumberLinePrimary;
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VoiceCenRepKey:Line1" );
+ }
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VoiceCenRepKey <=" );
+ return cenRepKey;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepHandler::VideoCenRepKey
+// Video mailbox cenntral repository key value
+// ---------------------------------------------------------------------------
+//
+TUint32 CVmbxCenRepHandler::VideoCenRepKey(
+ const TVmbxAlsLineType& aLine )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VideoCenRepKey =>" );
+ TUint32 cenRepKey( KUnknownCenRepKey );
+ VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::VideoCenRepKey: aLine = %d",
+ aLine );
+ if ( EVmbxAlsLine2 == aLine )
+ {
+ cenRepKey = KVmbxVideoNmbrLineAlternate;
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VideoCenRepKey:Line2" );
+ }
+ else
+ {
+ cenRepKey = KVmbxVideoNmbrLinePrimary;
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VideoCenRepKey:Line1" );
+ }
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VideoCenRepKey <=" );
+ return cenRepKey;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepHandler::StoreType
+// Fetches active store type
+// ---------------------------------------------------------------------------
+//
+TVmbxMemoryLocation CVmbxCenRepHandler::StoreType()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::StoreType =>" );
+ TVmbxMemoryLocation memoryLocation( EVmbxPhoneMemory );
+ TInt location;
+ TInt result = iCRSession->Get( KVmbxUsesSimMemory, location );
+ VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::StoreType: result = %d",
+ result );
+
+ if ( KErrNone == result && EVmbxSimMemory == location )
+ {
+ memoryLocation = EVmbxSimMemory;
+ }
+#ifdef __WINS__
+ memoryLocation = EVmbxPhoneMemory;
+#endif
+ VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::StoreType: memory = %d<=",
+ memoryLocation );
+ return memoryLocation;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepHandler::VideoSupported
+// Returns ETrue if supported
+// ---------------------------------------------------------------------------
+//
+TBool CVmbxCenRepHandler::VideoSupported()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VideoSupported =>" );
+ TBool supported( EFalse);
+
+ TInt res = iCRSession->Get( KVideoMbxSupport, supported );
+
+ if ( KErrNone != res )
+ {
+ supported = EFalse;
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::VideoSupported: result %d",
+ supported );
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::VideoSupported <=" );
+ return supported;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepHandler::IsSimReadOnly
+// ETrue if CenRep setting Sim read only
+// ---------------------------------------------------------------------------
+//
+TBool CVmbxCenRepHandler::IsSimReadOnly()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::IsSimReadOnly =>" );
+ TBool result( EFalse );
+ TInt res = iCRSession->Get( KVmbxNoSimWriting, result );
+
+ if ( KErrNone != res )
+ {
+ result = EFalse;
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::IsSimReadOnly: result %I <=",
+ result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepHandler::IsAllowedUserEdit
+// ETrue if number Allowed to edit
+// ---------------------------------------------------------------------------
+//
+TBool CVmbxCenRepHandler::IsAllowedUserEdit()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepHandler::IsAllowedUserEdit =>" );
+ TBool result( EFalse );
+ TInt temp( 0 );
+ TInt res = iCRSession->Get( KVmbxUiCaps, temp );
+ VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::IsAllowedUserEdit: res %d",
+ res );
+
+ VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::IsAllowedUserEdit: temp %d",
+ temp );
+
+ if ( ( KErrNone == res ) && !( KVmbxUiUserEditNotAllowed & temp ) )
+ {
+ result = ETrue;
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxCenRepHandler::IsAllowedUserEdit: result %d <=",
+ result );
+ return result;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxcenrepobserver.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,145 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CVmbxCenRepObserver class.
+ *
+*/
+
+// INCLUDE FILES
+#include <centralrepository.h>
+
+#include "vmbxlogger.h"
+#include "voicemailboxdomaincrkeys.h"
+#include "voicemailboxprivatecrkeys.h"
+#include "voicemailboxdefsinternal.h"
+#include "vmbxcenrepobserver.h"
+
+// CONSTANTS
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepObserver::CVmbxCenRepObserver
+// C++ default constructor can NOT contain any code, that might leave.
+// ---------------------------------------------------------------------------
+//
+CVmbxCenRepObserver::CVmbxCenRepObserver( MVmbxCenRepObserver& aObserver ):
+ iObserver( aObserver )
+ {
+ VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::CVmbxCenRepObserver =>" );
+ VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::CVmbxCenRepObserver <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepObserver::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CVmbxCenRepObserver::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::ConstructL =>" );
+ iCRSession = CRepository::NewL( KCRUidVoiceMailbox );
+ iNotifyHandler = CCenRepNotifyHandler::NewL( *this, *iCRSession );
+ iNotifyHandler->StartListeningL();
+ VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepObserver::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxCenRepObserver* CVmbxCenRepObserver::NewL( MVmbxCenRepObserver& aObserver )
+ {
+ VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::NewL =>" );
+ CVmbxCenRepObserver* self = CVmbxCenRepObserver::NewLC( aObserver );
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::NewL <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepObserver::NewLC
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxCenRepObserver* CVmbxCenRepObserver::NewLC( MVmbxCenRepObserver& aObserver )
+ {
+ VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::NewLC =>" );
+ CVmbxCenRepObserver* self = new (ELeave) CVmbxCenRepObserver( aObserver );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::NewLC <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepObserver::~CVmbxCenRepObserver
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CVmbxCenRepObserver::~CVmbxCenRepObserver()
+ {
+ VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::~CVmbxCenRepObserver =>" );
+ if ( iNotifyHandler )
+ {
+ iNotifyHandler->StopListening();
+ delete iNotifyHandler;
+ iNotifyHandler = NULL;
+ }
+ delete iCRSession;
+ VMBLOGSTRING( "VMBX:CVmbxCenRepObserver::~CVmbxCenRepObserver <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCenRepObserver::HandleNotifyGeneric
+// To notify the client about changes for string value keys
+// ---------------------------------------------------------------------------
+//
+void CVmbxCenRepObserver::HandleNotifyGeneric( TUint32 aId )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCenRepObserver::HandleNotifyGeneric =>" );
+ if ( KVmbxNumberLinePrimary == aId
+ || KVmbxVideoNmbrLinePrimary == aId
+ || KVmbxNumberLineAlternate == aId
+ || KVmbxVideoNmbrLineAlternate == aId
+ )
+ {
+ VMBLOGSTRING2( "VMBX: CVmbxCenRepObserver::HandleNotifyGeneric: aId %X",
+ aId );
+
+ TVmbxCenRepKey cenRepKey( EVmbxCenRepMax );
+ if ( KVmbxNumberLinePrimary == aId )
+ {
+ cenRepKey = EVmbxVoiceLinePrimaryKey;
+ }
+ else if ( KVmbxVideoNmbrLinePrimary == aId )
+ {
+ cenRepKey = EVmbxVideoLinePrimaryKey;
+ }
+ else if ( KVmbxNumberLineAlternate == aId )
+ {
+ cenRepKey = EVmbxVoiceLineAlternateKey;
+ }
+ else if ( KVmbxVideoNmbrLineAlternate == aId )
+ {
+ cenRepKey = EVmbxVideoLineAlternateKey;
+ }
+
+ // Notify the primary/alternate support keys are changed
+ iObserver.HandleCenRepChange( cenRepKey );
+ }
+ VMBLOGSTRING( "VMBX: CVmbxCenRepObserver::HandleNotifyGeneric<=");
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxcsvideoengine.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,168 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the CVmbxCsVideoEngine class
+*
+*/
+
+
+// INCLUDE FILES
+#include <cvoicemailboxentry.h>
+
+#include "vmbxuiutilities.h"
+#include "vmbxutilities.h"
+#include "vmbxenginebase.h"
+#include "vmbxlogger.h"
+#include "vmbxcenrephandler.h"
+#include "vmbxcsvideoengine.h"
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVmbxCsVideoEngine::CVmbxCsVideoEngine
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CVmbxCsVideoEngine::CVmbxCsVideoEngine( MVmbxResourceProvider& aProvider )
+ : CVmbxEngineBase( aProvider )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::CVmbxCsVideoEngine <=>" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCsVideoEngine::~CVmbxCsVideoEngine
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxCsVideoEngine::~CVmbxCsVideoEngine()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::~CVmbxCsVideoEngine <=>" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCsVideoEngine::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxCsVideoEngine* CVmbxCsVideoEngine::NewL( MVmbxResourceProvider& aProvider )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::NewL =>" );
+ if ( !VmbxUtilities::VideoSupported() )
+ {
+ User::Leave( KErrNotSupported );
+ }
+
+ CVmbxCsVideoEngine* self = new( ELeave ) CVmbxCsVideoEngine( aProvider );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::NewL <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCsVideoEngine::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CVmbxCsVideoEngine::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::ConstructL =>" );
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCsVideoEngine::GetL
+// Gets voice mailbox number
+// ---------------------------------------------------------------------------
+//
+void CVmbxCsVideoEngine::GetL( CVoiceMailboxEntry*& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::GetL =>" );
+ CVoiceMailboxEntry* vmbxEntry = CVoiceMailboxEntry::NewLC();
+ // get number from store
+ vmbxEntry->SetVoiceMailboxType( EVmbxVideo );
+ vmbxEntry->SetUsingMemoryLocation( EVmbxPhoneMemory );
+ vmbxEntry->SetVmbxAlsLineType( VmbxUtilities::AlsLine() );
+ vmbxEntry->SetServiceId( KVmbxServiceVideo );
+ TInt result = iProvider.VmbxCenRepHandler().GetVmbxNumber( *vmbxEntry );
+
+ VMBLOGSTRING2( "VMBX: CVmbxCsVideoEngine::GetL: result=%I ", result );
+ User::LeaveIfError( result );
+ CleanupStack::Pop( vmbxEntry );
+ aEntry = vmbxEntry;
+ vmbxEntry = NULL;
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::GetL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCsVideoEngine::SaveL
+// Saves voice mailbox number
+// ---------------------------------------------------------------------------
+//
+void CVmbxCsVideoEngine::SaveL( const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::SaveL =>" );
+
+ TPtrC vmbxNumber( KNullDesC );
+ aEntry.GetVmbxNumber( vmbxNumber );
+
+ if ( vmbxNumber.Length()
+ && ( !VmbxUtilities::IsValidPhoneNumber( vmbxNumber )
+ || VmbxUtilities::IsEmergencyNumber( vmbxNumber ) ) )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::SaveL: number invalid <=" );
+ User::Leave( KErrArgument );
+ }
+
+ // Save to cenrep
+ TInt result = iProvider.VmbxCenRepHandler().Save( aEntry );
+ VMBLOGSTRING2( "VMBX: CVmbxCsVideoEngine::SaveL: result%I ", result );
+ User::LeaveIfError( result );
+
+ // show note
+ if ( KErrNone == result )
+ {
+ if ( vmbxNumber.Length() )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::\
+ Save Number Length" );
+ iProvider.VmbxUiUtilities().ShowVideoSavedNote();
+ }
+ else
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::\
+ Save Number Length zero" );
+ iProvider.VmbxUiUtilities().ShowSaveEmptyNoteL(
+ aEntry.VoiceMailboxType() );
+ }
+ }
+
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::SaveL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCsVideoEngine::SaveL
+// Saves Provisioned video mailbox number
+// ---------------------------------------------------------------------------
+//
+void CVmbxCsVideoEngine::SaveProvisionedEntryL(
+ const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::SaveProvisionedEntryL =>" );
+ SaveL( aEntry );
+ VMBLOGSTRING( "VMBX: CVmbxCsVideoEngine::SaveProvisionedEntryL <=" );
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxcsvoiceengine.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,394 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the CVmbxCsVoiceEngine class
+*
+*/
+
+
+// INCLUDE FILES
+#include <cvoicemailboxentry.h>
+
+#include "vmbxenginebase.h"
+#include "vmbxutilities.h"
+
+#include "vmbxlogger.h"
+#include "vmbxcenrephandler.h"
+#include "vmbxsimhandler.h"
+#include "vmbxuiutilities.h"
+
+#include "vmbxcsvoiceengine.h"
+
+// CONSTANTS
+_LIT (KVmbxIllegalSimCharacter, "w");
+
+// ============================ MEMBER FUNCTIONS ==============================
+
+// ----------------------------------------------------------------------------
+// CVmbxCsVoiceEngine::CVmbxCsVoiceEngine
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ----------------------------------------------------------------------------
+//
+CVmbxCsVoiceEngine::CVmbxCsVoiceEngine( MVmbxResourceProvider& aProvider )
+ : CVmbxEngineBase( aProvider )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::CVmbxCsVoiceEngine =>" );
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::CVmbxCsVoiceEngine <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxCsVoiceEngine::~CVmbxCsVoiceEngine
+// Destructor.
+// ----------------------------------------------------------------------------
+//
+CVmbxCsVoiceEngine::~CVmbxCsVoiceEngine()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::~CVmbxCsVoiceEngine =>" );
+ delete iSimHandler;
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::~CVmbxCsVoiceEngine <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxCsVoiceEngine::NewL
+// Two-phased constructor.
+// ----------------------------------------------------------------------------
+//
+CVmbxCsVoiceEngine* CVmbxCsVoiceEngine::NewL( MVmbxResourceProvider& aProvider )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::NewL =>" );
+ CVmbxCsVoiceEngine* self =
+ new( ELeave ) CVmbxCsVoiceEngine( aProvider );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::NewL <=" );
+ return self;
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxCsVoiceEngine::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CVmbxCsVoiceEngine::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::ConstructL =>" );
+ TVmbxMemoryLocation storeType( EVmbxPhoneMemory );
+ storeType = iProvider.VmbxCenRepHandler().StoreType();
+ if ( EVmbxSimMemory == storeType )
+ {
+ // create SimHandler
+ TRAPD( err, iSimHandler = CVmbxSimHandler::NewL() );
+ // for avoid warning for compiling
+ err = err;
+ VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::ConstructL:\
+ Create SimHandler %I" , err);
+ }
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::ConstructL <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxCsVoiceEngine::GetL
+// Gets voice mailbox number
+// ----------------------------------------------------------------------------
+//
+void CVmbxCsVoiceEngine::GetL( CVoiceMailboxEntry*& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::GetL =>" );
+ TInt result( KErrNotFound );
+
+ CVoiceMailboxEntry* vmbxEntry = CVoiceMailboxEntry::NewLC();
+ // get als line info
+ vmbxEntry->SetVmbxAlsLineType( VmbxUtilities::AlsLine() );
+
+ vmbxEntry->SetVoiceMailboxType( EVmbxVoice );
+ vmbxEntry->SetServiceId( KVmbxServiceVideo );
+ // get store type from CenRep
+ TVmbxMemoryLocation storeType = iProvider.VmbxCenRepHandler().StoreType();
+
+ if ( EVmbxSimMemory == storeType && iSimHandler )
+ {
+ // read from sim if it is available and active
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::GetL:\
+ SIM available and active");
+ TRAP( result, iSimHandler->GetL( *vmbxEntry ) );
+
+ VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::GetL :Sim res=%d", result );
+ TPtrC vmbxNumber( KNullDesC );
+ vmbxEntry->GetVmbxNumber( vmbxNumber );
+
+ // if no number from sim(both MBDN file and VMBX file)
+ if ( KErrNone != result || !vmbxNumber.Length() )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::GetL:\
+ no number from sim, both MBDN file and VMBX file");
+ // Get CS number from phone memory
+ result = iProvider.VmbxCenRepHandler().GetVmbxNumber( *vmbxEntry );
+ vmbxEntry->SetUsingMemoryLocation( EVmbxPhoneMemory );
+ }
+ else
+ {
+ vmbxEntry->SetUsingMemoryLocation( EVmbxSimMemory );
+ }
+ }
+ // EVmbxPhoneMemory or sim not available
+ else
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::GetL:\
+ EVmbxPhoneMemory or sim not available " );
+ // Get CS number from phone memory
+ result = iProvider.VmbxCenRepHandler().GetVmbxNumber( *vmbxEntry );
+ vmbxEntry->SetUsingMemoryLocation( EVmbxPhoneMemory );
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::GetL: res=%d", result );
+
+ User::LeaveIfError( result );
+ CleanupStack::Pop( vmbxEntry );
+ aEntry = vmbxEntry;
+ vmbxEntry = NULL;
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::GetL <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxCsVoiceEngine::SaveL
+// Saves voice mailbox number
+// ----------------------------------------------------------------------------
+//
+void CVmbxCsVoiceEngine::SaveL( const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveL =>" );
+
+ TPtrC vmbxNumber( KNullDesC );
+ aEntry.GetVmbxNumber( vmbxNumber );
+
+ if ( vmbxNumber.Length()
+ && ( !VmbxUtilities::IsValidPhoneNumber( vmbxNumber )
+ || VmbxUtilities::IsEmergencyNumber( vmbxNumber ) ) )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveL: number invalid <=" );
+ User::Leave( KErrArgument );
+ }
+
+ TVoiceMailboxParams params;
+ if ( IsWritable( params ) )
+ {
+ TVmbxMemoryLocation storeType =
+ iProvider.VmbxCenRepHandler().StoreType();
+ VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::SaveL: storeType=%I",
+ storeType );
+ if ( EVmbxSimMemory == storeType && iSimHandler )
+ {
+ // Save to sim
+ SaveEntryToSimL( aEntry );
+ }
+ else
+ {
+ // Save to cenrep
+ SaveEntryToPhoneL( aEntry );
+ }
+ }
+ else
+ {
+ // sim files not exist, its may need by forcing save, eg, OMA.
+ if ( !iSimHandler )
+ {
+ SaveEntryToPhoneL( aEntry );
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveL: \
+ sim files not exist then save to phone" );
+ }
+ else
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveL: \
+ sim files unwritable<=" );
+ User::Leave( KErrNotSupported );
+ }
+ }
+
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveL <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxCsVoiceEngine::SaveProvisionedEntryL
+// Saves Provisioned voice mailbox number
+// ----------------------------------------------------------------------------
+//
+void CVmbxCsVoiceEngine::SaveProvisionedEntryL(
+ const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveProvisionedEntryL =>" );
+ SaveL( aEntry );
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveProvisionedEntryL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxCsVoiceEngine::CheckConfiguration
+//
+// ---------------------------------------------------------------------------
+//
+TBool CVmbxCsVoiceEngine::CheckConfiguration( const TVoiceMailboxParams& aParams,
+ const TInt aFlags )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::CheckConfiguration =>" );
+ TBool configuration( EFalse );
+ // check thr property whether allow user to edit number
+ if ( EVmbxChangeNbrNotAllowedOnUi & aFlags )
+ {
+ configuration = iProvider.VmbxCenRepHandler().IsAllowedUserEdit();
+ if ( configuration )
+ {
+ configuration = IsWritable( aParams );
+ }
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::CheckConfiguration: conf%I <=",
+ configuration );
+ return configuration;
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxCsVoiceEngine::SaveEntryToPhone
+// Saves number to storage that user selects from the offered list
+// ----------------------------------------------------------------------------
+//
+void CVmbxCsVoiceEngine::SaveEntryToPhoneL( const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveEntryToPhoneL: =>" );
+ TInt result( KErrArgument );
+
+ result = iProvider.VmbxCenRepHandler().Save( aEntry );
+
+ if ( KErrNone == result )
+ {
+ // observer to change vmbx number
+ TPtrC vmbxNumber( KNullDesC );
+ aEntry.GetVmbxNumber( vmbxNumber );
+ if ( vmbxNumber.Length() )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::\
+ SaveEntryToPhone Number Length" )
+ iProvider.VmbxUiUtilities().ShowSaveToPhoneNote();
+ }
+ else
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::\
+ SaveEntryToPhone Number Length zero" )
+ iProvider.VmbxUiUtilities().ShowSaveEmptyNoteL(
+ aEntry.VoiceMailboxType() );
+ }
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::SaveEntryToPhoneL: result=%I <=",
+ result );
+ User::LeaveIfError( result );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxCsVoiceEngine::SaveEntryToSim
+// For saving to place that user selects
+// ----------------------------------------------------------------------------
+//
+void CVmbxCsVoiceEngine::SaveEntryToSimL( const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::SaveEntryToSimL: =>" );
+ TInt result( KErrGeneral );
+
+ // number containing "w"-character is not allowed to save to sim
+ TPtrC ptrNumber( KNullDesC );
+ TInt numError = aEntry.GetVmbxNumber( ptrNumber );
+ if ( KErrNotFound != ptrNumber.Find( KVmbxIllegalSimCharacter ) )
+ {
+ result = KErrArgument;
+ }
+
+ if ( iSimHandler )
+ {
+ result = iSimHandler->Save( aEntry );
+ if ( KErrNone == result )
+ {
+ if ( ptrNumber.Length() )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::\
+ SaveEntryToSim Number Length" )
+ iProvider.VmbxUiUtilities().ShowSaveToSimNote();
+ }
+ else
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::\
+ SaveEntryToPhone Number Length zero" )
+ TRAP_IGNORE( iProvider.VmbxUiUtilities().
+ ShowSaveEmptyNoteL( aEntry.VoiceMailboxType() ) );
+ }
+ }
+ }
+
+ VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::\
+ SaveEntryToSimL: result=%I <=", result );
+
+ User::LeaveIfError( result );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxCsVoiceEngine::IsSimWritable
+// ETrue if Sim is allowed to be writable
+// ----------------------------------------------------------------------------
+TBool CVmbxCsVoiceEngine::IsSimWritable()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::IsSimWritable: =>" );
+ TBool result( EFalse );
+ if ( iSimHandler && iSimHandler->IsWritable()
+ && !( iProvider.VmbxCenRepHandler().IsSimReadOnly() ) )
+ {
+ result = ETrue;
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::IsSimWritable:\
+ result=%I <=", result );
+ return result;
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxCsVoiceEngine::IsWritable
+// ETrue if Sim is allowed to be writable
+// ----------------------------------------------------------------------------
+TBool CVmbxCsVoiceEngine::IsWritable( const TVoiceMailboxParams& /*aParams*/ )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::IsWritable =>" );
+ TBool result( EFalse );
+ TVmbxMemoryLocation storeType =
+ iProvider.VmbxCenRepHandler().StoreType();
+
+ if ( EVmbxPhoneMemory == storeType )
+ {
+ result = ETrue;
+ }
+ else
+ {
+ if ( iSimHandler )
+ {
+ #ifdef __WINS__
+ result = ETrue;
+ #else
+ result = IsSimWritable();
+ #endif
+ }
+ else
+ {
+ VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::IsWritable: \
+ sim files not exist then use phone memory" );
+ result = ETrue;
+ }
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::IsWritable:\
+ result=%I <=", result );
+ return result;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxemergencycall.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,134 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the CVmbxEmergencyCall class
+*
+*/
+
+// INCLUDE FILES
+#include <cphcltemergencycall.h>
+#include <phcltutils.h>
+#include "vmbxlogger.h"
+#include "vmbxemergencycall.h"
+
+// CONSTANTS
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVmbxEngineBase::CVmbxEngineBase
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CVmbxEmergencyCall::CVmbxEmergencyCall()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::CVmbxEmergencyCall =>" );
+ VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::CVmbxEmergencyCall <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxEmergencyCall::~CVmbxEngineBase
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CVmbxEmergencyCall::~CVmbxEmergencyCall()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::~CVmbxEmergencyCall =>" );
+ VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::~CVmbxEmergencyCall <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxEmergencyCall::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxEmergencyCall* CVmbxEmergencyCall::NewL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::NewL =>" );
+ CVmbxEmergencyCall* vmbx = new( ELeave )CVmbxEmergencyCall();
+ CleanupStack::PushL( vmbx );
+ vmbx->ConstructL();
+ CleanupStack::Pop( vmbx );
+ VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::NewL <=" );
+ return vmbx;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxEmergencyCall::ConstructL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+void CVmbxEmergencyCall::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::ConstructL =>" );
+ VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::ConstructL <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxEmergencyCall::HandleDialL
+//
+// ----------------------------------------------------------------------------
+//
+void CVmbxEmergencyCall::HandleDialL( const TInt /*aStatus*/ )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::HandleDialL =>" );
+ VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::HandleDialL <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxEmergencyCall::HandleEmergencyDialL()
+// ----------------------------------------------------------------------------
+//
+void CVmbxEmergencyCall::HandleEmergencyDialL( const TInt /*aStatus*/ )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::HandleEmergencyDialL =>" );
+ VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::HandleEmergencyDialL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxEmergencyCall::IsEmergencyNumber
+// Verifies if the given number is an emergency number
+// ---------------------------------------------------------------------------
+//
+TBool CVmbxEmergencyCall::IsEmergencyNumber( const TDesC& aNumber )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEmergencyCall::IsEmergencyNumber: =>" );
+ TBool isEmergency( EFalse );
+ // Emergency Call API does not strip invalid characters like Call UI does,
+ // so it is done manually here.
+
+ TPhCltTelephoneNumber number( aNumber.Left( KPhCltTelephoneNumberLength ) );
+ PhCltUtils::RemoveInvalidChars( number );
+ // Return value is KErrArgument, when number is more than 6 digits and
+ // then number cannot be emergency number.
+ // So no need to check the return value here.
+ CPhCltEmergencyCall* emCall( NULL );
+ TRAPD( err, emCall = CPhCltEmergencyCall::NewL( this ) );
+ if ( KErrNone == err )
+ {
+ TInt result = emCall->IsEmergencyPhoneNumber( aNumber, isEmergency );
+ if ( result != KErrNone )
+ {
+ isEmergency = EFalse;
+ }
+ }
+ delete emCall;
+
+ VMBLOGSTRING2( "VMBX: CVmbxEmergencyCall::IsEmergencyNumber%I <=",
+ isEmergency);
+
+ return isEmergency;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxenginebase.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,153 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the CVmbxEngineBase class
+*
+*/
+
+
+// INCLUDE FILES
+#include <cvoicemailboxentry.h>
+
+#include "vmbxlogger.h"
+#include "vmbxuiutilities.h"
+#include "vmbxenginebase.h"
+
+// CONSTANTS
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVmbxEngineBase::CVmbxEngineBase
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CVmbxEngineBase::CVmbxEngineBase( MVmbxResourceProvider& aProvider )
+ : iProvider( aProvider ),
+ iVmbxServiceId( KVmbxServiceIdNone )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::CVmbxEngineBase =>" );
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::CVmbxEngineBase <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxEngineBase::~CVmbxEngineBase
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CVmbxEngineBase::~CVmbxEngineBase()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::~CVmbxEngineBase =>" );
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::~CVmbxEngineBase <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxEngineBase::GetServiceIds()
+// ----------------------------------------------------------------------------
+//
+void CVmbxEngineBase::GetServiceIdsL( RIdArray& /*aProfileIds*/ )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::GetServiceIdsL <=>" );
+ User::Leave( KErrNotFound );
+ }
+
+// Commented out because branding is not supported yet.
+// ----------------------------------------------------------------------------
+// CVmbxEngineBase::GetVmbxImageL()
+// ----------------------------------------------------------------------------
+//
+/* CGulIcon* CVmbxEngineBase::GetVmbxImageL( const TVoiceMailboxParams& aParams )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::GetVmbxImageL =>" );
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::GetVmbxImageL <=" );
+ return iProvider.VmbxUiUtilities().GetVmbxImageL( aParams );
+ } */
+
+// ----------------------------------------------------------------------------
+// CVmbxEngineBase::SetCurrentServiceId()
+// ----------------------------------------------------------------------------
+//
+void CVmbxEngineBase::SetCurrentServiceId( const TServiceId& aVmbxServiceId )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::SetCurrentServiceId =>" );
+ iVmbxServiceId = aVmbxServiceId;
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::SetCurrentServiceId <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxEngineBase::CheckConfiguration()
+// ----------------------------------------------------------------------------
+//
+TBool CVmbxEngineBase::CheckConfiguration(
+ const TVoiceMailboxParams& /*aParams*/, const TInt aFlags )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::CheckConfiguration =>" );
+ TBool conf( EFalse );
+ if ( EVmbxChangeNbrNotAllowedOnUi & aFlags )
+ {
+ conf = iProvider.VmbxCenRepHandler().IsAllowedUserEdit();
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxEngineBase::CheckConfiguration: conf%I <=",
+ conf );
+ return conf;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxEngineBase::QueryDefineNumberL
+//
+// ---------------------------------------------------------------------------
+//
+void CVmbxEngineBase::QueryDefineNumberL( CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::QueryDefineNumberL =>" );
+ HBufC* defineNumber = HBufC::NewLC( KVmbxMaxNumberLength );
+ TPtr ptrNumber( defineNumber->Des() );
+
+ iProvider.VmbxUiUtilities().ShowQueryL( aEntry.VoiceMailboxType(),
+ EVmbxDefineMode, ptrNumber );
+ TInt err = aEntry.SetVmbxNumber( ptrNumber );
+ CleanupStack::PopAndDestroy( defineNumber );
+ VMBLOGSTRING2( "VMBX: CVmbxEngineBase::QueryDefineNumberL, err%I", err );
+ User::LeaveIfError( err );
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::QueryDefineNumberL <= ");
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxEngineBase::QueryChangeNumberL
+//
+// ----------------------------------------------------------------------------
+//
+void CVmbxEngineBase::QueryChangeNumberL( CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::QueryChangeNumberL =>" );
+ TInt err( KErrNone );
+ TPtrC vmbxNumber( KNullDesC );
+ err = aEntry.GetVmbxNumber( vmbxNumber );
+
+ if ( KErrNone == err )
+ {
+ HBufC* changeNumber = HBufC::NewLC( KVmbxMaxNumberLength );
+ TPtr tempNumber( changeNumber->Des() );
+ tempNumber.Copy( vmbxNumber );
+ iProvider.VmbxUiUtilities().ShowQueryL( aEntry.VoiceMailboxType(),
+ EVmbxChangeMode, tempNumber );
+ err = aEntry.SetVmbxNumber( tempNumber );
+ CleanupStack::PopAndDestroy( changeNumber );
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxEngineBase::QueryChangeNumberL, err%I", err );
+ User::LeaveIfError( err );
+ VMBLOGSTRING( "VMBX: CVmbxEngineBase::QueryChangeNumberL <=" );
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxenginefactory.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,148 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the CVmbxEngineFactory class
+*
+*/
+
+// INCLUDE FILES
+#include "vmbxenginebase.h"
+#include "vmbxcsvoiceengine.h"
+#include "vmbxcsvideoengine.h"
+#include "vmbxvoipengine.h"
+#include "vmbxutilities.h"
+
+#include "vmbxlogger.h"
+
+#include "vmbxenginefactory.h"
+
+
+// CONSTANTS
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVmbxEntryFactory::CVmbxEntryFactory
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CVmbxEngineFactory::CVmbxEngineFactory( MVmbxResourceProvider& aProvider )
+ : iProvider( aProvider )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEntryFactory::CVmbxEntryFactory <=>" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxEntryFactory::~CVmbxEntryFactory
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxEngineFactory::~CVmbxEngineFactory()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEntryFactory::~CVmbxEntryFactory <=>" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxEntryFactory::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxEngineFactory* CVmbxEngineFactory::NewL(
+ MVmbxResourceProvider& aProvider )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEntryFactory::NewL =>" );
+ CVmbxEngineFactory* self =
+ new( ELeave ) CVmbxEngineFactory( aProvider );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVmbxEntryFactory::NewL <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxEntryFactory::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CVmbxEngineFactory::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEntryFactory::ConstructL =>" );
+ VMBLOGSTRING( "VMBX: CVmbxEntryFactory::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxEntryFactory::CreateEngineL
+// Loads instance of the mailbox entry
+// ---------------------------------------------------------------------------
+//
+void CVmbxEngineFactory::CreateEngineL( CVmbxEngineBase*& aEngine,
+ TVmbxType aType )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxEntryFactory::CreateEngineL =>" );
+ aEngine = NULL;
+
+ TInt result( KErrNone );
+ switch( aType )
+ {
+ case EVmbxVoice:
+ {
+ // Create voice mailbox
+ CVmbxEngineBase* voice = CVmbxCsVoiceEngine::NewL( iProvider );
+ aEngine = voice;
+ }
+ break;
+ case EVmbxVideo:
+ {
+ if ( VmbxUtilities::VideoSupported() )
+ {
+ // Create video mailbox
+ CVmbxEngineBase* video = CVmbxCsVideoEngine::NewL( iProvider );
+ aEngine = video;
+ }
+ else
+ {
+ result = KErrNotSupported;
+ }
+ }
+ break;
+ case EVmbxVoip:
+ {
+ if ( VmbxUtilities::VoIPSupported() )
+ {
+ // Create Voip mailbox
+ CVmbxEngineBase* voip = CVmbxVoIpEngine::NewL( iProvider);
+ aEngine = voip;
+ }
+ else
+ {
+ result = KErrNotSupported;
+ }
+ }
+ break;
+ default:
+ result = KErrArgument;
+ break;
+ }
+
+ VMBLOGSTRING2( "VMBX: CVmbxEntryFactory::CreateEngineL: result%I",
+ result );
+ if ( KErrNone != result )
+ {
+ User::Leave( result );
+ }
+ VMBLOGSTRING( "VMBX: CVmbxEntryFactory::CreateEngineL <=" );
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxetelconnection.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,148 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the CVmbxETelConnection class
+*
+*/
+
+
+// INCLUDE FILES
+#include <mmtsy_names.h>
+
+#include "vmbxlogger.h"
+#include "vmbxetelconnection.h"
+
+// CONSTANTS
+// ETel connections attemps
+const TInt KTriesToConnectServer( 7 );
+// time between ETel connections attemps
+const TInt KTimeBeforeRetryingServerConnection( 100000 );
+// Index to the first phone info
+const TInt KFirstPhoneIndex = 0;
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVmbxETelConnection::CVmbxETelConnection
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CVmbxETelConnection::CVmbxETelConnection()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxETelConnection::CVmbxETelConnection <=>" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxETelConnection::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CVmbxETelConnection::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxETelConnection::ConstructL =>" );
+ TInt errorCode( KErrNone );
+ TInt thisTry( 0 );
+ RTelServer::TPhoneInfo info;
+ // connect to ETel server
+ while ( ( errorCode = iTelServer.Connect() ) != KErrNone &&
+ ( thisTry++ ) <= KTriesToConnectServer )
+ {
+ User::After( KTimeBeforeRetryingServerConnection );
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxETelConnection::ConstructL: errorCode %I",
+ errorCode );
+ User::LeaveIfError( errorCode );
+
+ // load TSY
+ errorCode = iTelServer.LoadPhoneModule( KMmTsyModuleName );
+ VMBLOGSTRING2( "VMBX: CVmbxETelConnection::ConstructL: err%I", errorCode );
+ if ( KErrNone != errorCode && KErrAlreadyExists != errorCode )
+ {
+ User::Leave( errorCode );
+ }
+
+ // This enables extended errors from low level which are needed
+ // to get detailed information when saving contacts
+ TInt errExtrnded = iTelServer.SetExtendedErrorGranularity(
+ RTelServer::EErrorExtended );
+ VMBLOGSTRING2( "VMBX: CVmbxETelConnection::ConstructL: errExtrnded %I",
+ errExtrnded );
+ User::LeaveIfError( errExtrnded );
+ // get info about default phone
+ TInt errGetInfo = iTelServer.GetPhoneInfo( KFirstPhoneIndex, info );
+ VMBLOGSTRING2( "VMBX: CVmbxETelConnection::ConstructL: errGetInfo %I",
+ errGetInfo );
+ User::LeaveIfError( errGetInfo );
+
+ TInt errInfoName = iPhone.Open( iTelServer, info.iName );
+ VMBLOGSTRING2( "VMBX: CVmbxETelConnection::ConstructL: errInfoName %I",
+ errInfoName );
+ User::LeaveIfError( errInfoName );
+
+ VMBLOGSTRING( "VMBX: CVmbxETelConnection::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxETelConnection::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxETelConnection* CVmbxETelConnection::NewL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxETelConnection::NewL =>" );
+ CVmbxETelConnection* self = new( ELeave ) CVmbxETelConnection();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop();
+ VMBLOGSTRING( "VMBX: CVmbxETelConnection::NewL <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxETelConnection::~CVmbxETelConnection()
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CVmbxETelConnection::~CVmbxETelConnection()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxETelConnection::~CVmbxETelConnection =>" );
+ // close ETel connection
+ iPhone.Close();
+ iTelServer.Close();
+ VMBLOGSTRING( "VMBX: CVmbxETelConnection::~CVmbxETelConnection <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxETelConnection::TelServer
+// Returns a reference to the ETel RTelServer
+// ---------------------------------------------------------------------------
+//
+RTelServer& CVmbxETelConnection::TelServer()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxETelConnection::TelServer <=>" );
+ return iTelServer;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxETelConnection::Phone
+// Returns a reference to the ETel RMobilePhone
+// ---------------------------------------------------------------------------
+//
+RMobilePhone& CVmbxETelConnection::Phone()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxETelConnection::Phone <=>" );
+ return iPhone;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxobserver.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,183 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CVmbxObserver class.
+ *
+*/
+
+// INCLUDE FILES
+#include "vmbxlogger.h"
+#include "vmbxcenrepobserver.h"
+#include "vmbxsimstoreobserver.h"
+#include "vmbxsatrefreshobserver.h"
+#include "vmbxsimhandler.h"
+
+#include "vmbxobserver.h"
+
+// CONSTANTS
+
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVmbxObserver::CVmbxObserver
+// C++ default constructor can NOT contain any code, that might leave.
+// ---------------------------------------------------------------------------
+//
+CVmbxObserver::CVmbxObserver( MVmbxResourceProvider& aProvider )
+ : iProvider( aProvider )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxObserver::CVmbxObserver <=>" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxObserver::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CVmbxObserver::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxObserver::ConstructL =>" );
+
+ iCenRepObserver = CVmbxCenRepObserver::NewL( *this );
+
+ TVmbxMemoryLocation storeType =
+ iProvider.VmbxCenRepHandler().StoreType();
+ if ( EVmbxSimMemory == storeType )
+ {
+ TRAPD( err, iSimHandler = CVmbxSimHandler::NewL() );
+ if ( KErrNone == err )
+ {
+ iSatObserver = CVmbxSatRefreshObserver::NewL( *this );
+ iSimObserver = CVmbxSimStoreObserver::NewL( *iSimHandler, *this );
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxObserver::ConstructL: err=%I", err );
+ }
+ VMBLOGSTRING( "VMBX: CVmbxObserver::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxObserver::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxObserver* CVmbxObserver::NewL( MVmbxResourceProvider& aProvider )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxObserver::NewL =>" );
+ CVmbxObserver* self = CVmbxObserver::NewLC( aProvider );
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVmbxObserver::NewL <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxObserver::NewLC
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxObserver* CVmbxObserver::NewLC( MVmbxResourceProvider& aProvider )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxObserver::NewLC =>" );
+ CVmbxObserver* self = new (ELeave) CVmbxObserver( aProvider );
+ CleanupStack::PushL( self );
+ VMBLOGSTRING( "VMBX: CVmbxObserver::NewLC <=" );
+ self->ConstructL();
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxObserver::SetVmbxObserver
+// Set observer
+// ---------------------------------------------------------------------------
+//
+void CVmbxObserver::SetVmbxObserver( MVmbxChangeObserver& aObserver )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxObserver::SetVmbxObserver =>" );
+ iObserver = &aObserver;
+ VMBLOGSTRING( "VMBX: CVmbxObserver::SetVmbxObserver <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxObserver::HandleSimStoreChanged
+// observe Sim store changed.
+// ---------------------------------------------------------------------------
+//
+void CVmbxObserver::HandleSimStoreChanged( )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxObserver::HandleSimStoreChanged =>" );
+ if ( iObserver )
+ {
+ TRAPD( err, iObserver->SimStoreChangedL() );
+ // avoid warning
+ err = err;
+ VMBLOGSTRING2( "VMBX: CVmbxObserver::HandleSimStoreChanged, err=%I",
+ err );
+ }
+
+ VMBLOGSTRING( "VMBX: CVmbxObserver::HandleSimStoreChanged <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxObserver::HandleSatRefresh
+// observe sat refresh.
+// ---------------------------------------------------------------------------
+//
+void CVmbxObserver::HandleSatRefresh( )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxObserver::HandleSatRefreshL =>" );
+ if ( iObserver )
+ {
+ TRAPD( err, iObserver->SatRefreshL() );
+ // avoid warning
+ err = err;
+ VMBLOGSTRING2( "VMBX: CVmbxObserver::HandleSatRefresh, err=%I",
+ err );
+ }
+ VMBLOGSTRING( "VMBX: CVmbxObserver::HandleSatRefreshL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxObserver::HandleCenRepChange
+// observe central Repository changed.
+// ---------------------------------------------------------------------------
+//
+void CVmbxObserver::HandleCenRepChange( TVmbxCenRepKey aId )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxObserver::HandleCenRepChange =>" );
+ if ( iObserver )
+ {
+ TRAPD( err, iObserver->CenRepChangedL( aId ) );
+ // avoid warning
+ err = err;
+ VMBLOGSTRING2( "VMBX: CVmbxObserver::HandleCenRepChange, err=%I",
+ err );
+ }
+ VMBLOGSTRING( "VMBX: CVmbxObserver::HandleCenRepChange <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxObserver::~CVmbxObserve
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxObserver::~CVmbxObserver()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxObserver::~CVmbxObserver =>" );
+ delete iSatObserver;
+ delete iSimObserver;
+ delete iCenRepObserver;
+ delete iSimHandler;
+ VMBLOGSTRING( "VMBX: CVmbxObserver::~CVmbxObserver <=" );
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxpbkstore.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,753 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the CVmbxPbkStore class
+*
+*/
+
+
+// INCLUDE FILES
+#include <commonphoneparser.h>
+#include <mpbutil.h>
+#include <cvoicemailboxentry.h>
+
+#include "vmbxutilities.h"
+#include "vmbxetelconnection.h"
+#include "vmbxlogger.h"
+
+#include "vmbxpbkstore.h"
+
+//CONSTANTS
+// Amount of retries to be performed.
+const TInt KVmbxPhonebookBufferSize( 150 );
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::CVmbxPbkStore
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CVmbxPbkStore::CVmbxPbkStore(): CActive(EPriorityStandard ),
+ iAsynType( EVmbxSimDefault )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::CVmbxPbkStore =>" );
+ CActiveScheduler::Add( this );
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::CVmbxPbkStore <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::~CVmbxPbkStore
+// destructor
+// ---------------------------------------------------------------------------
+//
+CVmbxPbkStore:: ~CVmbxPbkStore()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::~CVmbxPbkStore =>" );
+ Cancel();
+ iPhoneBook.Close();
+ delete iAlphaStringFromSIM;
+ delete iWait;
+ delete iETelConnection;
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::~CVmbxPbkStore <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::NewL
+// two phase constructor
+// ---------------------------------------------------------------------------
+//
+CVmbxPbkStore* CVmbxPbkStore::NewL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::NewL =>" );
+ CVmbxPbkStore* self = new( ELeave ) CVmbxPbkStore();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::NewL <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::ConstructL
+// two phase constructor
+// ---------------------------------------------------------------------------
+//
+void CVmbxPbkStore::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::ConstructL =>" );
+ // Open tel server and phone
+ iETelConnection = CVmbxETelConnection::NewL();
+
+ iWait = new( ELeave ) CActiveSchedulerWait;
+ TVmbxAlsLineType alsLine = VmbxUtilities::AlsLine();
+
+ // Supported ALS line
+ if ( EVmbxAlsLineDefault != alsLine )
+ {
+ // open 6f17 file
+ User::LeaveIfError( OpenVmbxPhonebook() );
+ }
+ // Not supported ALS line
+ else
+ {
+ // USIM exist
+ if ( SimFileExistsAndReadAccess() )
+ {
+ // Open 6fc7 file
+ User::LeaveIfError( OpenMbdnPhonebook() );
+ }
+ // USIM not exist, open 6f17 file
+ else
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::ConstructL: no mbdn file\
+ then open 6f17 file" );
+ User::LeaveIfError( OpenVmbxPhonebook() );
+ }
+ }
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::GetVmbxInfo
+// Activates phonebook info query
+// ---------------------------------------------------------------------------
+TInt CVmbxPbkStore::GetVmbxInfo(
+ RMobilePhoneBookStore::TMobilePhoneBookInfoV1& aInfo )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::GetVmbxInfo =>" );
+ TInt result( KErrInUse );
+ RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg
+ InfoPckg( aInfo );
+ // get Info from phonebook
+ if( !IsActive() && !iWait->IsStarted() )
+ {
+ iPhoneBook.GetInfo( iStatus, InfoPckg );
+ iAsynType = EVmbxSimGetInfo;
+ SetActive();
+ iWait->Start();
+
+ result = iStatus.Int();
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::PhonebookInfo: \
+ SIM Phonebook info read, status: %I", result );
+ }
+
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::GetVmbxInfo <=" );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::IsWritable
+// Sim write support
+// ---------------------------------------------------------------------------
+//
+TBool CVmbxPbkStore::IsWritable()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::IsWritable =>" );
+ TBool result( EFalse );
+ RMobilePhoneBookStore::TMobilePhoneBookInfoV1 info;
+ TInt temp = GetVmbxInfo( info );
+ if( KErrNone == temp )
+ {
+ result = ( info.iCaps &
+ RMobilePhoneBookStore::KCapsWriteAccess ? 1 : 0 );
+
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore:: IsWritable: info.iCaps %I",
+ info.iCaps );
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore:: IsWritable result %I <=", result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::PhoneBookType
+// PhoneBookType
+// ---------------------------------------------------------------------------
+//
+TVmbxSimPhonebookType CVmbxPbkStore::PhoneBookType()
+ {
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::PhoneBookType type %I",
+ iPhoneBookType );
+ return iPhoneBookType;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::Write
+// Write to SIM
+// ---------------------------------------------------------------------------
+//
+TInt CVmbxPbkStore::Write( const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::Write =>" );
+ TInt result( KErrInUse );
+ TBuf8<KVmbxPhonebookBufferSize> pbData;
+
+ CPhoneBookBuffer* pbkBuffer = new CPhoneBookBuffer();
+
+ if ( !pbkBuffer )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::Write: \
+ Phonebook creation error" );
+ result = KErrNoMemory;
+ }
+ else
+ {
+ pbkBuffer->Set( &pbData );
+ TInt activeAlsLine = aEntry.VmbxAlsLineType();
+ // New entry
+ result = pbkBuffer->AddNewEntryTag();
+ if ( KErrNone == result )
+ {
+ // Add index
+ // Type of index is TUint16 in Multimode ETel and TInt in old ETel.
+ result = pbkBuffer->PutTagAndValue(
+ RMobilePhoneBookStore::ETagPBAdnIndex, (TUint16)activeAlsLine );
+ }
+ // Add name if it existed on SIM card
+ // Type of ETagPBText is TDes16
+ if ( KErrNone == result && iAlphaStringFromSIM )
+ {
+ result = pbkBuffer->PutTagAndValue(
+ RMobilePhoneBookStore::ETagPBText, *iAlphaStringFromSIM );
+ // Add number,Type of ETagPBNumber is TDes16
+ if ( KErrNone == result )
+ {
+ TPtrC vmbxNumber( KNullDesC );
+ result = aEntry.GetVmbxNumber( vmbxNumber );
+ if ( KErrNone == result )
+ {
+ result = pbkBuffer->PutTagAndValue(
+ RMobilePhoneBookStore::ETagPBNumber, vmbxNumber );
+ }
+ }
+ }
+ if ( KErrNone == result )
+ {
+ if ( iPhoneBookType == EMBDNPhoneBook )
+ {
+ RMobilePhone::TMobilePhoneVoicemailIdsV3 mbdnInfo;
+ result = GetMbdnInfo( EVmbxAlsLine1, mbdnInfo );
+
+ if ( KErrNone == result )
+ {
+ TInt index = mbdnInfo.iVoice;
+ if( !IsActive() && !iWait->IsStarted() )
+ {
+ // write vmbx number to 6fc7 file
+ iPhoneBook.Write( iStatus, pbData, index );
+ // Wait for asynchronous call to finish
+ iAsynType = EVmbxSimEntryWrite;
+ SetActive();
+ iWait->Start();
+ result = iStatus.Int();
+ }
+ }
+ VMBLOGSTRING( "Mbdn writing" );
+ }
+ else
+ {
+ if( !IsActive() && !iWait->IsStarted() )
+ {
+ // write vmbx number to 6f17 file
+ iPhoneBook.Write( iStatus, pbData, activeAlsLine );
+ iAsynType = EVmbxSimEntryWrite;
+ // Wait for asynchronous call to finish
+ SetActive();
+ iWait->Start();
+ result = iStatus.Int();
+ }
+ VMBLOGSTRING( "CVmbxPbkStore::Write 6f17 writing" );
+ }
+ }
+ }
+ delete pbkBuffer;
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::Write: result=%I<=", result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::PhonebookStore
+// Return Phonebook
+// ---------------------------------------------------------------------------
+RMobilePhoneBookStore& CVmbxPbkStore::PhonebookStore()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::PhonebookStore <=>" );
+ return iPhoneBook;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::GetMbdnInfo
+// ---------------------------------------------------------------------------
+//
+TInt CVmbxPbkStore::GetMbdnInfo( const TVmbxAlsLineType aAlsLine,
+ RMobilePhone::TMobilePhoneVoicemailIdsV3& aInfo )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::GetMbdnInfo =>" );
+ TInt result( KErrInUse );
+ // Get identifiers
+ if ( !IsActive() && !iWait->IsStarted() )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::GetMbdnInfo: GetMailboxNumbers" );
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetMbdnInfo: iStatus %I",
+ iStatus.Int() );
+ RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg infoPckg( aInfo );
+ iETelConnection->Phone().GetMailboxNumbers( iStatus, infoPckg );
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetMbdnInfo :iStatus %I",
+ iStatus.Int() );
+ iAsynType = EVmbxSimMbdnInfo;
+ // Wait for asynchronous call to finish
+ SetActive();
+ iWait->Start();
+
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetMbdnInfo: iVoice value %I",
+ aInfo.iVoice );
+ if ( iStatus.Int() == KErrNotFound )
+ {
+ result = KErrNone;
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::GetMbdnInfo: KErrNotFound,\
+ but igorned and change to KErrNone" );
+ }
+ else
+ {
+ result = iStatus.Int();
+ }
+
+ if ( EVmbxAlsLineDefault == aAlsLine && KErrNone == result )
+ {
+ aInfo.iVoice = EVmbxAlsLine1;
+ }
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetMbdnInfo: result %I<=",
+ result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::OpenMbdnPhonebook
+// opening mbdn-type phonebook
+// ---------------------------------------------------------------------------
+//
+TInt CVmbxPbkStore::OpenMbdnPhonebook()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::OpenMbdnPhonebook =>" );
+ // try to open mbdn-type phonebook
+ TInt result = iPhoneBook.Open( iETelConnection->Phone(),
+ KETelIccMbdnPhoneBook );
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::OpenMbdnPhonebook :\
+ MBDN opening result = %I", result );
+ if ( KErrNone == result )
+ {
+ iPhoneBookType = EMBDNPhoneBook;
+ }
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::OpenMbdnPhonebook <=" );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::OpenVmbxPhonebook
+// opening vmbx-type phonebook
+// ---------------------------------------------------------------------------
+//
+TInt CVmbxPbkStore::OpenVmbxPhonebook()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::OpenVmbxPhonebook =>" );
+ // try to open vmbx-type phonebook
+ TInt result = iPhoneBook.Open( iETelConnection->Phone(),
+ KETelIccVoiceMailBox );
+ if ( KErrNone == result )
+ {
+ iPhoneBookType = EVMBXPhoneBook;
+ }
+ VMBLOGSTRING2( "Vmbx phonebook opening result = %I ", result );
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::OpenVmbxPhonebook <=" );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::GetL
+// Fetches mailbox number from Sim
+// ---------------------------------------------------------------------------
+//
+void CVmbxPbkStore::GetL( CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetL: iPhoneBookType %d=>",
+ iPhoneBookType );
+
+ if ( EMBDNPhoneBook == iPhoneBookType )
+ {
+ TRAPD( err, SimReadL( aEntry ) );
+
+ TPtrC vmbxNumber( KNullDesC );
+ if ( KErrNone == err )
+ {
+ err = aEntry.GetVmbxNumber( vmbxNumber );
+ }
+
+ // 6fc7 file empty
+ if ( ( KErrNone != err ) || ( !vmbxNumber.Length() ) )
+ {
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::GetL: \
+ no vmbx number in 6fc7 file then read from 6f17 file err%I", err );
+ // close 6fc7 and open 6f17 file
+ iPhoneBook.Close();
+ User::LeaveIfError( OpenVmbxPhonebook() );
+ // read vmbx number from 6f17 file
+ SimReadL( aEntry );
+ }
+ }
+ else
+ {
+ SimReadL( aEntry );
+ }
+
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::GetL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::SimReadL
+// read vmbx number from sim
+// ---------------------------------------------------------------------------
+//
+void CVmbxPbkStore::SimReadL( CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::SimReadL =>" );
+
+ TInt numEntries( 1 );
+ TBuf8<KVmbxPhonebookBufferSize> pbData;
+
+ delete iAlphaStringFromSIM;
+ iAlphaStringFromSIM = NULL;
+ TInt result( KErrInUse );
+ if ( iPhoneBookType == EMBDNPhoneBook )
+ {
+ RMobilePhone::TMobilePhoneVoicemailIdsV3 mbdnInfo;
+ result = GetMbdnInfo( EVmbxAlsLine1, mbdnInfo );
+ if ( KErrNone == result )
+ {
+ VMBLOGSTRING( "start MBDN PhoneBook read" );
+ if( !IsActive() && !iWait->IsStarted() )
+ {
+ // read vmbx number from 6fc7 file
+ iPhoneBook.Read(
+ iStatus, mbdnInfo.iVoice, numEntries, pbData );
+ iAsynType = EVmbxSimEntryRead;
+ // Wait for asynchronous call to finish
+ SetActive();
+ iWait->Start();
+ }
+ }
+ }
+ else
+ {
+ // Record#1 in sim is for line1 number and Record#2 in sim is for
+ // line2 number so line is used to fetch
+ VMBLOGSTRING( "start VMBX PhoneBook read" );
+ TInt activeAlsLine = aEntry.VmbxAlsLineType();
+ if( !IsActive() && !iWait->IsStarted() )
+ {
+ result = KErrNone;
+ // read vmbx number from 6f17 file
+ iPhoneBook.Read( iStatus, activeAlsLine, numEntries, pbData );
+ iAsynType = EVmbxSimEntryRead;
+ // Wait for asynchronous call to finish
+ SetActive();
+ iWait->Start();
+ }
+ }
+
+ User::LeaveIfError( result );
+ // asynchronous call finished
+ VMBLOGSTRING2( "PhoneBook read iStatus = %I", iStatus.Int() );
+
+ if( iStatus.Int() == KErrNone )
+ {
+ ParseDataL( aEntry, pbData );
+ }
+ else
+ {
+ User::Leave( iStatus.Int() );
+ }
+
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::SimReadL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::ParseDataL
+// read vmbx number from sim
+// ---------------------------------------------------------------------------
+//
+void CVmbxPbkStore::ParseDataL( CVoiceMailboxEntry& aEntry, TDes8& aPbData )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::ParseDataL =>" );
+ TInt result( KErrNotFound );
+ delete iAlphaStringFromSIM;
+ iAlphaStringFromSIM = NULL;
+
+ VMBLOGSTRING2( "CVmbxPbkStore::ParseDataL Lengh = %d", aPbData.Length() );
+
+ if ( aPbData.Length() )
+ {
+ // -> Search Tags "ETagPBNumber" and "ETagPBText"
+ // and read (decode) them
+ // create buffer
+ CPhoneBookBuffer* pbkBuffer = new( ELeave ) CPhoneBookBuffer();
+ CleanupStack::PushL( pbkBuffer );
+
+ // start read
+ pbkBuffer->Set( &aPbData );
+ pbkBuffer->StartRead();
+
+ result = ReadNewEntryTag( pbkBuffer );
+ // Read first "new-entry-tag"
+ if ( KErrNone == result )
+ {
+ ReadPbkDataL( pbkBuffer, aEntry );
+ }
+ CleanupStack::PopAndDestroy( pbkBuffer );
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ParseDataL: result %I", result );
+ User::LeaveIfError( result );
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::ParseDataL <=" );
+ }
+
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::ReadNewEntryTag
+// Reads "new-entry-tag" from phonebook data from Sim
+// ---------------------------------------------------------------------------
+//
+TInt CVmbxPbkStore::ReadNewEntryTag( CPhoneBookBuffer* aPbkBuffer )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::ReadNewEntryTag =>" );
+ TInt result( KErrNone );
+ TUint8 tagValue( 0 );
+ CPhoneBookBuffer::TPhBkTagType dataType(
+ CPhoneBookBuffer::EPhBkTypeNoData );
+
+ result = aPbkBuffer->GetTagAndType( tagValue, dataType );
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ReadNewEntryTag result = %d",
+ result );
+
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ReadNewEntryTag tagValue = %X",
+ tagValue );
+ if ( tagValue != RMobilePhoneBookStore::ETagPBNewEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::ParseDataL: Unknown result" );
+ result = KErrArgument; // Something wrong in TLV
+ }
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::ReadNewEntryTag <=" );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::ReadPbkData
+// Reads tags from buffer retrieved from sim
+// ---------------------------------------------------------------------------
+//
+void CVmbxPbkStore::ReadPbkDataL( CPhoneBookBuffer* aPbkBuffer,
+ CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::ReadPbkDataL =>" );
+
+ TInt result( KErrNone );
+ TUint8 tagValue( 0 );
+ CPhoneBookBuffer::TPhBkTagType dataType(
+ CPhoneBookBuffer::EPhBkTypeNoData );
+
+ result = aPbkBuffer->GetTagAndType( tagValue, dataType );
+
+ // loop through data to find a number and an possible alpha string
+ while ( result == KErrNone && aPbkBuffer->RemainingReadLength() > 0 )
+ {
+ VMBLOGSTRING2("VMBX: CVmbxPbkStore::ReadPbkDataL: tagValue: %d",
+ tagValue );
+ VMBLOGSTRING2("VMBX: CVmbxPbkStore::ReadPbkDataL: dataType: %d",
+ dataType );
+
+ // Check for text field
+ if ( tagValue == RMobilePhoneBookStore::ETagPBText )
+ {
+ // Alpha string field found from TLV entry,
+ // assuming 16bit data
+ TPtrC16 alphaPtrC;
+ result = aPbkBuffer->GetValue( alphaPtrC );
+ if ( KErrNone == result )
+ {
+ iAlphaStringFromSIM = alphaPtrC.AllocL();
+ VMBLOGSTRING2("VMBX: CVmbxPbkStore::ReadPbkDataL: \
+ iAlphaStringFromSIM: %S", iAlphaStringFromSIM );
+ }
+ }
+
+ // Check for number field
+ else if ( tagValue == RMobilePhoneBookStore::ETagPBNumber )
+ {
+ // Number field found from TLV entry, assuming 16bit data
+ TPtrC16 numberPtrC;
+ result = aPbkBuffer->GetValue( numberPtrC );
+
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::ReadPbkDataL:\
+ ETagPBNumber found" );
+
+ if ( KErrNone == result )
+ {
+ // Error code is returned if number not fit to
+ // local buffer.
+ if ( numberPtrC.Length() > KVmbxMaxNumberLength )
+ {
+ result = KErrOverflow;
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::ReadPbkDataL: \
+ Overflow error" );
+ }
+ else
+ {
+ result = aEntry.SetVmbxNumber( numberPtrC );
+ VMBLOGSTRING("VMBX: CVmbxPbkStore::ReadPbkDataL: \
+ ETagPBNumber found Number" );
+ break;
+ }
+ }
+ }
+ else
+ {
+ // skip field
+ aPbkBuffer->SkipValue( dataType );
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::ReadPbkDataL: SkipValue" );
+ }
+ // read next if no errors
+ if ( KErrNone == result )
+ {
+ // Read next field type
+ result = aPbkBuffer->GetTagAndType( tagValue, dataType );
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ReadPbkDataL: \
+ next GetTagAndType = %I", result );
+ }
+ }
+
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::ReadPbkDataL result=%I", result );
+ User::LeaveIfError( result );
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::ReadPbkDataL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::IsUsimSupport
+// Checks if USim card in the phone
+// ---------------------------------------------------------------------------
+TBool CVmbxPbkStore::SimFileExistsAndReadAccess()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::SimFileExistsAndReadAccess =>" );
+ TBool result( EFalse );
+
+ TUint32 capability;
+ TInt err = iETelConnection->Phone().GetIccAccessCaps( capability );
+ VMBLOGSTRING2( "VMBX: CVmbxSimHandler::SimFileExistsAndReadAccess:\
+ Err = %I", err);
+
+ if ( err == KErrNone &&
+ // Phone has a USIM and it currently supports USIM access by clients.
+ // the current sim card is 3G
+ capability & RMobilePhone::KCapsUSimAccessSupported )
+ {
+ result = ETrue;
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::SimFileExistsAndReadAccess \
+ return = %d <=", result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::RunL
+// read vmbx number from sim
+// ---------------------------------------------------------------------------
+//
+void CVmbxPbkStore::RunL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::RunL =>" );
+ if ( iWait->IsStarted() )
+ {
+ // stop blocking
+ iWait->AsyncStop();
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::RunL: AsyncStop" );
+ }
+ iAsynType = EVmbxSimDefault;
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::RunL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::DoCancel
+// read vmbx number from sim
+// ---------------------------------------------------------------------------
+//
+void CVmbxPbkStore::DoCancel()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel =>" );
+ if ( iWait->IsStarted() )
+ {
+ // stop blocking
+ iWait->AsyncStop();
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel: AsyncStop" );
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::DoCancel: iAsynType %I",iAsynType );
+ switch ( iAsynType )
+ {
+ // only for USIM
+ case EVmbxSimMbdnInfo:
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel : \
+ EVmbxSimMbdnInfo" );
+ iETelConnection->Phone().CancelAsyncRequest(
+ EMobilePhoneGetMailboxNumbers );
+ break;
+ }
+ case EVmbxSimGetInfo:
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel : \
+ EVmbxSimGetInfo" );
+ iETelConnection->Phone().CancelAsyncRequest(
+ EMobilePhoneStoreGetInfo );
+ break;
+ }
+ case EVmbxSimEntryRead:
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel : EVmbxSimEntryRead" );
+ iETelConnection->Phone().CancelAsyncRequest(
+ EMobilePhoneStoreRead );
+ break;
+ }
+ case EVmbxSimEntryWrite:
+ {
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel : EVmbxSimEntryWrite" );
+ iETelConnection->Phone().CancelAsyncRequest(
+ EMobilePhoneStoreWrite );
+ break;
+ }
+ default:
+ break;
+ }
+
+ VMBLOGSTRING( "VMBX: CVmbxPbkStore::DoCancel <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxPbkStore::RunError
+// read vmbx number from sim
+// ---------------------------------------------------------------------------
+//
+TInt CVmbxPbkStore::RunError(TInt aError)
+ {
+ VMBLOGSTRING2( "VMBX: CVmbxPbkStore::RunError: %I", aError );
+ return KErrNone;
+ }
+
+//End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxqtuihandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,272 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*
+*/
+
+// qt
+#include <QtGui/QtGui>
+#include <QString>
+#include <QObject>
+
+#include <hbdialog.h>
+#include <hblabel.h>
+#include <hbaction.h>
+#include <hbtextedit.h>
+#include <hbmessagebox.h>
+#include <hbvalidator.h>
+#include <hblineedit.h>
+#include <hbinputeditorinterface.h>
+#include <hblistwidget.h>
+
+#include "vmbxqtuihandler.h"
+#include "voicemailboxdefsinternal.h"
+#include "vmbxlogger.h"
+
+// ======== MEMBER FUNCTIONS ==================================================
+
+// ----------------------------------------------------------------------------
+// VmbxQtUiHandler::VmbxQtUiHandler
+// (Constructor).
+// ----------------------------------------------------------------------------
+//
+VmbxQtUiHandler::VmbxQtUiHandler(QObject* parent): QObject(parent)
+{
+ VMBLOGSTRING("VmbxQtUiHandler::VmbxQtUiHandler")
+ VMBLOGSTRING("VmbxQtUiHandler::VmbxQtUiHandler Exit")
+}
+
+// ----------------------------------------------------------------------------
+// VmbxQtUiHandler::~VmbxQtUiHandler
+// (Destructor).
+// ----------------------------------------------------------------------------
+//
+VmbxQtUiHandler::~VmbxQtUiHandler()
+{
+ VMBLOGSTRING("VmbxQtUiHandler::~VmbxQtUiHandler")
+ VMBLOGSTRING("VmbxQtUiHandler::~VmbxQtUiHandler Exit")
+}
+
+// ----------------------------------------------------------------------------
+// VmbxQtUiHandler::ShowVmbxQueryDialog
+// (show query dialog).
+// ----------------------------------------------------------------------------
+//
+void VmbxQtUiHandler::showVmbxQueryDialog(const TVmbxType& aType,
+ const TVmbxQueryMode& aMode,
+ QString& aNumber, int& aResult)
+{
+ VMBLOGSTRING("VmbxQtUiHandler::showVmbxQueryDialog")
+
+ HbDialog *displayPopup = new HbDialog();
+ displayPopup->setDismissPolicy(HbDialog ::NoDismiss);
+ displayPopup->setTimeout(HbDialog ::NoTimeout);
+
+ displayPopup->setModal(true);
+ QString header;
+ if (EVmbxVoice == aType) {
+ if (EVmbxDefineMode == aMode) {
+ header = tr("Define voice mailbox:");
+ } else {
+ header = tr("Change voice mailbox:");
+ }
+ } else {
+ // type of EVmbxVideo
+ if (EVmbxDefineMode == aMode) {
+ header = tr("Define video mailbox:");
+ } else {
+ header = tr("Change video mailbox:");
+ }
+ }
+ // Set the label as heading widget
+ displayPopup->setHeadingWidget(new HbLabel(header));
+ // Set the HbLineEdit as Content widget
+ // Define parameters for text box
+ HbLineEdit *lineEdit = new HbLineEdit();
+ lineEdit->setText( aNumber ); // default text
+ //lineEdit->setMaximumRows( 3 ); // just a magic number
+ HbEditorInterface inputMode(lineEdit); // Enables VKB
+ inputMode.setInputMode( HbInputModeNumeric );
+ // Limit charachter set
+ HbValidator *val = new HbValidator;
+ QRegExp r;
+ r.setPattern("[0123456789*#+]{0,255}"); // define what characters can be entered
+ val->setMasterValidator(new QRegExpValidator(r,0));
+ lineEdit->setValidator( val );
+
+ displayPopup->setContentWidget( lineEdit ); // ownership moved
+
+ HbAction* okAction = new HbAction(tr("Ok"));
+ // Sets the "OK"-action/button
+ displayPopup->setPrimaryAction(okAction);
+ bool ret = connect(okAction, SIGNAL(triggered()),
+ displayPopup, SLOT(close()));
+ VMBLOGSTRING2( "VmbxQtUiHandler::showVmbxQueryDialog:connect ok %d",
+ ret )
+ // Sets the "Back"-action/button
+ HbAction* cancelAction = new HbAction(tr("Cancel"));
+ displayPopup->setSecondaryAction(cancelAction);
+ ret = connect(okAction, SIGNAL(triggered()),
+ displayPopup, SLOT(close()));
+ VMBLOGSTRING2( "VmbxQtUiHandler::showVmbxQueryDialog:connect cancel %d",
+ ret )
+ VMBLOGSTRING( "VmbxQtUiHandler::ShowVmbxQueryDialog to show" )
+ HbAction* result = displayPopup->exec();
+ if( okAction == result ) {
+ VMBLOGSTRING( "VmbxQtUiHandler::showVmbxQueryDialog select OK" )
+ // asign OK KEY value
+ aResult = KErrNone;
+ aNumber = lineEdit->text();
+ VMBLOGSTRING2( "VmbxQtUiHandler::showVmbxQueryDialog number = %s",
+ aNumber.utf16() )
+ } else {
+ aResult = KErrCancel;
+ }
+ delete val;
+ val = 0;
+ delete displayPopup;
+ displayPopup = 0;
+ VMBLOGSTRING2("VmbxQtUiHandler::showVmbxQueryDialog aResult = %d", aResult)
+ VMBLOGSTRING("VmbxQtUiHandler::showVmbxQueryDialog Exit")
+}
+
+// ----------------------------------------------------------------------------
+// VmbxQtUiHandler::showDefineSelectionDialog
+// (Shoe define list dialog).
+// ----------------------------------------------------------------------------
+//
+void VmbxQtUiHandler::showDefineSelectionDialog(
+ TVmbxType& aType, int& aResult)
+{
+ VMBLOGSTRING("VmbxQtUiHandler::showDefineSelectionDialog")
+ HbDialog* defineListDialog = new HbDialog();
+ defineListDialog->setDismissPolicy(HbDialog::NoDismiss);
+ defineListDialog->setTimeout(HbDialog::NoTimeout);
+
+ defineListDialog->setModal(true);
+ // Set heading widget
+ defineListDialog->setHeadingWidget(new HbLabel(tr("Define number:")));
+ // Create a define list
+ HbListWidget *list = new HbListWidget();
+ list->addItem(tr("Voice Mailbox"));
+ list->addItem(tr("Video Mailbox"));
+ // Set content widget
+ defineListDialog->setContentWidget(list);
+
+ HbAction* okAction = new HbAction(tr("Ok"));
+ // Sets the "OK"-action/button
+ defineListDialog->setPrimaryAction(okAction);
+ // Sets the "Back"-action/button
+ HbAction* cancelAction = new HbAction(tr("Cancel"));
+ defineListDialog->setSecondaryAction(cancelAction);
+
+ connect(list, SIGNAL(activated(HbListWidgetItem*)),
+ defineListDialog, SLOT(close()));
+ HbAction* result = defineListDialog->exec();
+
+ if (cancelAction == result){
+ aType = EVmbxNone;
+ aResult = KErrCancel;
+ } else {
+ // OK or single click items
+ aResult = KErrNone;
+ int currentItem = list->row(list->currentItem());
+ VMBLOGSTRING2("VmbxQtUiHandler::showDefineSelectionDialog:\
+ currentItem %d", currentItem)
+ if (0 == currentItem) {
+ aType = EVmbxVoice;
+ } else {
+ aType = EVmbxVideo;
+ }
+ }
+ VMBLOGSTRING2("VmbxQtUiHandler::showDefineSelectionDialog: aType%d", aType)
+ VMBLOGSTRING2("VmbxQtUiHandler::showDefineSelectionDialog: aResult%d", \
+ aResult)
+ delete defineListDialog;
+ defineListDialog = 0;
+ VMBLOGSTRING("VmbxQtUiHandler::showDefineSelectionDialog Exit")
+}
+// ----------------------------------------------------------------------------
+// VmbxQtUiHandler::ShowInformationNote
+// (show information note).
+// ----------------------------------------------------------------------------
+//
+void VmbxQtUiHandler::showInformationNote(int aNoteType)
+{
+ VMBLOGSTRING("VmbxQtUiHandler::showInformationNote")
+ QString noteText;
+ QString iconName;
+ VMBLOGSTRING2("VmbxQtUiHandler::~showInformationNote type =%d", aNoteType)
+ switch (aNoteType) {
+ case EInvalidNumber:
+ noteText = tr("Invalid phone number.");
+ iconName = "note_error";
+ break;
+ case ESavedToPhoneMemory:
+ noteText = tr("Voice mailbox number saved to Phone memory.");
+ iconName = "note_info";
+ break;
+ case ESavedToSimMemory:
+ noteText = tr("Voice mailbox number saved to Sim card.");
+ iconName = "note_info";
+ break;
+ case EVideoNumberSaved:
+ noteText = tr("Video call mailbox saved.");
+ iconName = "note_info";
+ break;
+ default:
+ VMBLOGSTRING("VmbxQtUiHandler::ShowInformationNote default")
+ break;
+ }
+
+ HbMessageBox *msgBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
+ msgBox->setText(noteText);
+ msgBox->setIcon(HbIcon(iconName));
+ msgBox->exec();
+ delete msgBox;
+ VMBLOGSTRING("VmbxQtUiHandler::~ShowInformationNote Exit")
+
+}
+
+// ----------------------------------------------------------------------------
+// VmbxQtUiHandler::ShowSaveEmptyNote
+// (show information note).
+// ----------------------------------------------------------------------------
+//
+void VmbxQtUiHandler::showSaveEmptyNote(const TVmbxType& aType)
+{
+ VMBLOGSTRING("VmbxQtUiHandler::~showSaveEmptyNote")
+ QString noteText;
+ VMBLOGSTRING2("VmbxQtUiHandler::~showSaveEmptyNote type = %d", aType)
+ switch (aType) {
+ case EVmbxVoice:
+ noteText = tr("Voice mailbox number not defined.");
+ break;
+ case EVmbxVideo:
+ noteText = tr("Video mailbox number not defined.");
+ break;
+ default:
+ VMBLOGSTRING("VmbxQtUiHandler::ShowSaveEmptyNote default")
+ break;
+ }
+ HbMessageBox *msgBox = new HbMessageBox(HbMessageBox::MessageTypeInformation);
+ msgBox->setText(noteText);
+ msgBox->setIcon(HbIcon("note_error"));
+ msgBox->exec();
+ delete msgBox;
+ VMBLOGSTRING("VmbxQtUiHandler::~ShowSaveEmptyNote Exit")
+}
+
+//End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxsatrefreshobserver.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,135 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CVmbxSatRefreshObserver class.
+*
+*/
+
+
+// INCLUDE FILES
+#include "vmbxlogger.h"
+#include "vmbxsatrefreshobserver.h"
+
+// CONSTANTS
+const TInt KVmbxFile = 0x6f17;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CVmbxSatRefreshObserver::CVmbxSatRefreshObserver
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CVmbxSatRefreshObserver::CVmbxSatRefreshObserver(
+ MVmbxSatRefreshObserver& aObserver )
+ : iRSatSession(),
+ iSatRefresh( *this ),
+ iObserver( aObserver )
+ {
+ VMBLOGSTRING( "VMBX:CVmbxSatRefreshObserver::CVmbxSatRefreshObserver <=>" );
+ }
+
+// -----------------------------------------------------------------------------
+// CVmbxSatRefreshObserver::NewL
+// two phase constructor
+// -----------------------------------------------------------------------------
+//
+CVmbxSatRefreshObserver* CVmbxSatRefreshObserver::NewL(
+ MVmbxSatRefreshObserver& aObserver )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::NewL =>" );
+ CVmbxSatRefreshObserver* self = new( ELeave ) CVmbxSatRefreshObserver(
+ aObserver );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::NewL <=" );
+ return self;
+ }
+// ---------------------------------------------------------------------------
+// CVmbxSatRefreshObserver::ConstructL
+// two phase constructor
+// ---------------------------------------------------------------------------
+//
+void CVmbxSatRefreshObserver::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::ConstructL =>" );
+ iRSatSession.ConnectL();
+ iSatRefresh.OpenL( iRSatSession );
+ iObservedFileList.Append( KMbdnEf );
+ iObservedFileList.Append( KMbiEf );
+ iObservedFileList.Append( KVmbxFile );
+ iSatRefresh.NotifyFileChangeL( iObservedFileList );
+ VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxSatRefreshObserver::~CVmbxSatRefreshObserver
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CVmbxSatRefreshObserver::~CVmbxSatRefreshObserver()
+ {
+ VMBLOGSTRING( "VMBX:CVmbxSatRefreshObserver::~CVmbxSatRefreshObserver =>" );
+ iSatRefresh.Cancel();
+ iSatRefresh.Close();
+ iRSatSession.Close();
+ VMBLOGSTRING( "VMBX:CVmbxSatRefreshObserver::~CVmbxSatRefreshObserver <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxSatRefreshObserver::AllowRefresh
+// Refresh query callback for USim
+// ---------------------------------------------------------------------------
+ TBool CVmbxSatRefreshObserver::AllowRefresh( TSatRefreshType /*aType*/,
+ const TSatRefreshFiles& /*aFiles*/ )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::AllowRefresh =>" );
+ VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::AllowRefresh <=" );
+ return ETrue;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxSatRefreshObserver::Refresh
+// Refresh notification callback for USim
+// ---------------------------------------------------------------------------
+void CVmbxSatRefreshObserver::Refresh( TSatRefreshType aType,
+ const TSatRefreshFiles& aFiles )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::Refresh =>" );
+ if ( EFileChangeNotification == aType )
+ {
+ const TInt elFile1( aFiles.Locate( KMbdnEf ) );// 6fc7 file
+ VMBLOGSTRING2( "VMBX: CVmbxSatRefreshObserver::Refresh: elFile1%I",
+ elFile1 );
+ // 6fc9 file, indecator for 6fc7 file
+ const TInt elFile2( aFiles.Locate( KMbiEf ) );
+ VMBLOGSTRING2( "VMBX: CVmbxSatRefreshObserver::Refresh: elFile2%I",
+ elFile2 );
+ // 6f17 file
+ const TInt elFile3( aFiles.Locate( KVmbxFile ) );
+ VMBLOGSTRING2( "VMBX: CVmbxSatRefreshObserver::Refresh: elFile3%I",
+ elFile3 );
+
+ if ( KErrNotFound != elFile1 || KErrNotFound != elFile2
+ || KErrNotFound != KVmbxFile )
+ {
+ iObserver.HandleSatRefresh();
+ }
+ iSatRefresh.RefreshEFRead( EFalse );
+ }
+ VMBLOGSTRING( "VMBX: CVmbxSatRefreshObserver::Refresh <=" );
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxsimhandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,161 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the CVmbxSimHandler class
+*
+*/
+
+
+// INCLUDE FILES
+#include <mpbutil.h>
+#include <cvoicemailboxentry.h>
+
+#include "vmbxpbkstore.h"
+#include "vmbxlogger.h"
+#include "vmbxsimhandler.h"
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVmbxSimHandler::CVmbxSimHandler
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CVmbxSimHandler::CVmbxSimHandler( )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::CVmbxSimHandler =>" );
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::CVmbxSimHandler <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxSimHandler::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CVmbxSimHandler::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::ConstructL =>" );
+#ifndef __WINS__
+ // open created phonebook
+ iPbkStore = CVmbxPbkStore::NewL();
+#endif
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxSimHandler::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxSimHandler* CVmbxSimHandler::NewL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::NewL =>" );
+ CVmbxSimHandler* self = new( ELeave ) CVmbxSimHandler();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::NewL <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxSimHandler::~CVmbxSimHandler
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CVmbxSimHandler::~CVmbxSimHandler()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::~CVmbxSimHandler =>" );
+#ifndef __WINS__
+ delete iPbkStore;
+#endif
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::~CVmbxSimHandler <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxSimHandler::GetL
+// Fetches mailbox number from Sim
+// ---------------------------------------------------------------------------
+//
+void CVmbxSimHandler::GetL( CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::GetL =>" );
+ iPbkStore->GetL( aEntry );
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::GetL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxSimHandler::Save
+// Saves vmbx number to Sim
+// ---------------------------------------------------------------------------
+//
+TInt CVmbxSimHandler::Save( const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::Save =>" );
+ TInt result = iPbkStore->Write( aEntry );
+ VMBLOGSTRING2( "VMBX: CVmbxSimHandler::Save: result=%I <=", result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxSimHandler::IsWritable
+// Current file is writable
+// ---------------------------------------------------------------------------
+//
+TBool CVmbxSimHandler::IsWritable()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::IsWritable: =>" );
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::IsWritable: <=" );
+ return iPbkStore->IsWritable();
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxSimHandler::PhoneBookType
+// Returns Sim file type
+// ---------------------------------------------------------------------------
+//
+TVmbxSimPhonebookType CVmbxSimHandler::PhoneBookType()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::PhoneBookType =>" );
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::PhoneBookType <=" );
+ return iPbkStore->PhoneBookType();
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxSimHandler::NotifyStoreEvent
+// Notify phonebook store evnet
+// ---------------------------------------------------------------------------
+//
+void CVmbxSimHandler::NotifyStoreEvent( TRequestStatus& aStatus,
+ TUint32& aEvent,
+ TInt& aIndex ) const
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::NotifyStoreEvent: =>" );
+ iPbkStore->PhonebookStore().NotifyStoreEvent( aStatus, aEvent, aIndex );
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::NotifyStoreEvent: <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxSimHandler::CancelAsyncRequest
+// Cancel phonebook store oberseved
+// ---------------------------------------------------------------------------
+//
+void CVmbxSimHandler::CancelAsyncRequest( TInt aReqToCancel ) const
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::CancelAsyncRequest: =>" );
+ iPbkStore->PhonebookStore().CancelAsyncRequest( aReqToCancel );
+ VMBLOGSTRING( "VMBX: CVmbxSimHandler::CancelAsyncRequest: <=" );
+ }
+
+//End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxsimstoreobserver.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,132 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CVmbxSimStoreObserver class.
+*
+*/
+
+// INCLUDE FILES
+#include <etelmmcs.h>
+#include "vmbxsimstoreobserver.h"
+#include "vmbxsimhandler.h"
+#include "vmbxlogger.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// CVmbxSimStoreObserver::CVmbxSimStoreObserver
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// -----------------------------------------------------------------------------
+//
+CVmbxSimStoreObserver::CVmbxSimStoreObserver( CVmbxSimHandler& aSimHandler,
+ MVmbxSimStoreObserver& aObserver )
+ : CActive( EPriorityStandard ),
+ iSimHandler( aSimHandler ),
+ iObserver( aObserver )
+ {
+ VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::CVmbxSimStoreObserver =>" );
+ CActiveScheduler::Add( this );
+ VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::CVmbxSimStoreObserver <=" );
+ }
+
+// -----------------------------------------------------------------------------
+// CVmbxSimStoreObserver::~CVmbxSimStoreObserver
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CVmbxSimStoreObserver::~CVmbxSimStoreObserver()
+ {
+ VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::~CVmbxSimStoreObserver =>" );
+ Cancel();
+ VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::~CVmbxSimStoreObserver <=" );
+ }
+
+// -----------------------------------------------------------------------------
+// CVmbxSimStoreObserver::NewL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+CVmbxSimStoreObserver* CVmbxSimStoreObserver::NewL(
+ CVmbxSimHandler& aSimHandler, MVmbxSimStoreObserver& aObserver )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSimStoreObserver::NewL =>" );
+ CVmbxSimStoreObserver* self =
+ new( ELeave ) CVmbxSimStoreObserver( aSimHandler, aObserver );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVmbxSimStoreObserver::NewL <=" );
+ return self;
+ }
+
+// -----------------------------------------------------------------------------
+// CVmbxSimStoreObserver::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CVmbxSimStoreObserver::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxSimStoreObserver::ConstructL =>" );
+ ActivateL();
+ VMBLOGSTRING( "VMBX: CVmbxSimStoreObserver::ConstructL <=" );
+ }
+
+// -----------------------------------------------------------------------------
+// CVmbxSimStoreObserver::Activate
+//
+// -----------------------------------------------------------------------------
+//
+void CVmbxSimStoreObserver::ActivateL()
+ {
+ VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::ActivateL =>" );
+ if ( !IsActive() )
+ {
+ iSimHandler.NotifyStoreEvent( iStatus, iEvents, iIndex );
+ SetActive();
+ }
+ else
+ {
+ User::Leave( KErrInUse );
+ }
+ VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::ActivateL <=" );
+ }
+
+// -----------------------------------------------------------------------------
+// CVmbxSimStoreObserver::RunL
+// -----------------------------------------------------------------------------
+//
+void CVmbxSimStoreObserver::RunL()
+ {
+ VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::RunL =>" );
+ // Activate the notication again
+ ActivateL();
+ iObserver.HandleSimStoreChanged();
+ VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::RunL <=" );
+ }
+
+// -----------------------------------------------------------------------------
+// CVmbxSimStoreObserver::DoCancel
+// -----------------------------------------------------------------------------
+//
+void CVmbxSimStoreObserver::DoCancel()
+ {
+ VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::DoCancel =>" );
+ if ( IsActive() )
+ {
+ iSimHandler.CancelAsyncRequest( EMobilePhoneStoreNotifyStoreEvent );
+ }
+ VMBLOGSTRING( "VMBX:CVmbxSimStoreObserver::DoCancel <=" );
+ }
+
+//End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxuihandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,182 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*
+*/
+
+// qt
+#include <QString>
+
+#include "vmbxqtuihandler.h"
+#include "voicemailboxdefsinternal.h"
+#include "vmbxuihandler.h"
+#include "vmbxlogger.h"
+
+// ======== MEMBER FUNCTIONS ==================================================
+
+// ----------------------------------------------------------------------------
+// CVmbxUiHandler::NewL
+// (Constructor).
+// ----------------------------------------------------------------------------
+//
+CVmbxUiHandler* CVmbxUiHandler::NewL()
+{
+ VMBLOGSTRING( "CVmbxUiHandler::CVmbxUiHandler" )
+ CVmbxUiHandler* handler = new( ELeave ) CVmbxUiHandler();
+ CleanupStack::PushL( handler );
+ handler->ConstructL();
+ CleanupStack::Pop( handler );
+ VMBLOGSTRING( "CVmbxUiHandler::CVmbxUiHandler Exit" )
+ return handler;
+}
+
+void CVmbxUiHandler::ConstructL()
+{
+ VMBLOGSTRING( "CVmbxUiHandler::ConstructL" )
+ iHandler = new VmbxQtUiHandler;
+ VMBLOGSTRING( "CVmbxUiHandler::ConstructL Exit" )
+}
+// ----------------------------------------------------------------------------
+// CVmbxUiHandler::CVmbxUiHandler
+// (Constructor).
+// ----------------------------------------------------------------------------
+//
+CVmbxUiHandler::CVmbxUiHandler()
+{
+ VMBLOGSTRING( "CVmbxUiHandler::CVmbxUiHandler" )
+ VMBLOGSTRING( "CVmbxUiHandler::CVmbxUiHandler Exit" )
+}
+
+// ----------------------------------------------------------------------------
+// CVmbxUiHandler::~CVmbxUiHandler
+// (Destructor).
+// ----------------------------------------------------------------------------
+//
+CVmbxUiHandler::~CVmbxUiHandler()
+{
+ VMBLOGSTRING( "CVmbxUiHandler::~CVmbxUiHandler" )
+ delete iHandler;
+ VMBLOGSTRING( "CVmbxUiHandler::~CVmbxUiHandler Exit" )
+}
+
+// ----------------------------------------------------------------------------
+// CVmbxUiHandler::ShowVmbxQueryDialog
+// (Show query dialog).
+// ----------------------------------------------------------------------------
+//
+void CVmbxUiHandler::ShowVmbxQueryDialog(const TVmbxType& aType,
+ const TVmbxQueryMode& aMode,
+ TDes& aNumber, TInt& aResult)
+{
+ VMBLOGSTRING( "CVmbxUiHandler::ShowVmbxQueryDialog" )
+ QString vmbxNumber;
+ if ( aNumber.Length() > 0 )
+ {
+ vmbxNumber=QString::fromUtf16(aNumber.Ptr(), aNumber.Length());
+ }
+ iHandler->showVmbxQueryDialog( aType, aMode, vmbxNumber, aResult );
+ aNumber = vmbxNumber.utf16();
+ VMBLOGSTRING2( "CVmbxUiHandler::ShowVmbxQueryDialog:\
+ aNumber = %S", &aNumber );
+ VMBLOGSTRING( "CVmbxUiHandler::ShowVmbxQueryDialog show over" )
+ VMBLOGSTRING( "CVmbxUiHandler::ShowVmbxQueryDialog Exit" )
+}
+
+// ----------------------------------------------------------------------------
+// CVmbxUiHandler::ShowVmbxQueryDialog
+// (Show query dialog).
+// ----------------------------------------------------------------------------
+//
+void CVmbxUiHandler::ShowDefineSelectionDialog( TVmbxType& aType,
+ TInt& aResult )
+{
+ VMBLOGSTRING( "CVmbxUiHandler::ShowDefineSelectionDialog" )
+ iHandler->showDefineSelectionDialog( aType, aResult );
+ VMBLOGSTRING2( "CVmbxUiHandler::ShowDefineSelectionDialog:\
+ aType = %d", aType );
+ VMBLOGSTRING2( "CVmbxUiHandler::ShowDefineSelectionDialog:\
+ aResult = %d", aResult );
+ VMBLOGSTRING( "CVmbxUiHandler::ShowDefineSelectionDialog Exit" )
+
+}
+// ----------------------------------------------------------------------------
+// CVmbxUiHandler::ShowSaveToPhoneNote
+// ----------------------------------------------------------------------------
+//
+void CVmbxUiHandler::ShowSaveToPhoneNote()
+{
+ VMBLOGSTRING( "CVmbxUiHandler::ShowSaveToPhoneNote" )
+ iHandler->showInformationNote( ESavedToPhoneMemory );
+ VMBLOGSTRING( "CVmbxUiHandler::ShowSaveToPhoneNote Exit" )
+}
+
+// ----------------------------------------------------------------------------
+// CVmbxUiHandler::ShowSaveToSimNote
+// ----------------------------------------------------------------------------
+//
+void CVmbxUiHandler::ShowSaveToSimNote()
+{
+ VMBLOGSTRING( "CVmbxUiHandler::ShowSaveToSimNote" )
+ iHandler->showInformationNote( ESavedToSimMemory );
+ VMBLOGSTRING( "CVmbxUiHandler::ShowSaveToSimNote Exit" )
+}
+
+// ----------------------------------------------------------------------------
+// CVmbxUiHandler::ShowVideoSavedNote
+// ----------------------------------------------------------------------------
+//
+void CVmbxUiHandler::ShowVideoSavedNote()
+{
+ VMBLOGSTRING( "CVmbxUiHandler::ShowVideoSavedNote" )
+ iHandler->showInformationNote( EVideoNumberSaved );
+ VMBLOGSTRING( "CVmbxUiHandler::ShowVideoSavedNote Exit" )
+}
+
+// ----------------------------------------------------------------------------
+// CVmbxUiHandler::ShowInvalidNumberNote
+// ----------------------------------------------------------------------------
+//
+
+void CVmbxUiHandler::ShowInvalidNumberNote()
+{
+ VMBLOGSTRING( "CVmbxUiHandler::ShowInvalidNumberNote" )
+ iHandler->showInformationNote( EInvalidNumber );
+ VMBLOGSTRING( "CVmbxUiHandler::ShowInvalidNumberNote Exit" )
+}
+
+// ----------------------------------------------------------------------------
+// CVmbxUiHandler::ShowInvalidWarningNote
+// ----------------------------------------------------------------------------
+//
+
+void CVmbxUiHandler::ShowInvalidWarningNote()
+{
+ VMBLOGSTRING( "CVmbxUiHandler::ShowInvalidWarningNote" )
+ iHandler->showInformationNote( EInvalidNumber );
+ VMBLOGSTRING( "CVmbxUiHandler::ShowInvalidWarningNote Exit" )
+}
+
+// ----------------------------------------------------------------------------
+// CVmbxUiHandler::ShowSaveEmptyNote
+// ----------------------------------------------------------------------------
+//
+void CVmbxUiHandler::ShowSaveEmptyNote( const TVmbxType& aType )
+{
+ VMBLOGSTRING( "CVmbxUiHandler::ShowSaveEmptyNote" )
+ iHandler->showSaveEmptyNote( aType );
+ VMBLOGSTRING( "CVmbxUiHandler::ShowSaveEmptyNote Exit" )
+}
+
+//End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxuiutilities.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,304 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the VmbxUtilities class
+*
+*/
+
+
+// INCLUDE FILES
+#include <cvoicemailboxentry.h>
+
+#include "voicemailboxdefsinternal.h"
+#include "vmbxutilities.h"
+#include "vmbxlogger.h"
+#include "vmbxuiutilities.h"
+#include "vmbxuihandler.h"
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::CVmbxUiUtilities
+// C++ default constructor can NOT contain any code
+// ---------------------------------------------------------------------------
+CVmbxUiUtilities::CVmbxUiUtilities()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::CVmbxUiUtilities <=>" );
+ }
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::~CVmbxUiUtilities
+// Destructor
+// ---------------------------------------------------------------------------
+CVmbxUiUtilities::~CVmbxUiUtilities()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::~CVmbxUiUtilities =>" );
+ delete iUiHandler;
+ //If there are still dialog is running, The dialogs should be dismissed.
+ //The leave will be ignored as the CVmbxUiUtilities is distructing
+ TRAP_IGNORE( DismissDialogL() );
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::~CVmbxUiUtilities <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxUiUtilities* CVmbxUiUtilities::NewL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::NewL =>" );
+ CVmbxUiUtilities* vmbx = new( ELeave )CVmbxUiUtilities();
+ CleanupStack::PushL( vmbx );
+ vmbx->ConstructL();
+ CleanupStack::Pop( vmbx );
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::NewL <=" );
+ return vmbx;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::ConstructL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+void CVmbxUiUtilities::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ConstructL =>" );
+ // create resource handler
+ iUiHandler = CVmbxUiHandler::NewL();
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::ShowQuery
+// Show query
+// ---------------------------------------------------------------------------
+//
+void CVmbxUiUtilities::ShowQueryL( const TVmbxType& aType,
+ const TVmbxQueryMode & aMode, TDes& aNumber )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowQueryL =>" );
+ VMBLOGSTRING2( "VMBX: CVmbxUiUtilities::ShowQueryL: aNumber =%S ", &aNumber );
+ TInt result( KErrNone );
+ FOREVER
+ {
+ ShowQueryDialogL( aType, aMode, aNumber, result );
+ if ( KErrCancel == result )
+ {
+ break;
+ }
+
+ if ( KErrNone == result )
+ {
+ if ( aNumber.Length() )
+ {
+ // Convert back to western digits
+ // check the given number here (emergency numbers not allowed)
+ if ( VmbxUtilities::IsValidPhoneNumber( aNumber )
+ && !VmbxUtilities::IsEmergencyNumber( aNumber ) )
+ {
+ break;
+ }// valid number
+ else
+ {
+ //invalid dialog
+ ShowInvalidWarningDialogL();
+ continue;
+ }// invalid number
+ }
+ else
+ {
+ result = KErrNone;
+ break;
+ }// number NULL
+ }
+ }// End FOREVER;
+ VMBLOGSTRING2( "VMBX: CVmbxUiUtilities::ShowQueryL: result=%I ", result );
+ User::LeaveIfError( result );
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowQueryL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::ShowQueryDialogL
+// Show query dialog
+// ---------------------------------------------------------------------------
+//
+void CVmbxUiUtilities::ShowQueryDialogL( const TVmbxType& aType,
+ const TVmbxQueryMode& aMode,
+ TDes& aNumber, TInt& aResult )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowQueryDialogL =>" );
+
+ if( EVmbxVideo != aType && EVmbxVoice != aType )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowQueryDialogL: \
+ User::Leave( KErrNotSupported )" );
+ User::Leave( KErrNotSupported );
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxUiUtilities::ShowQueryDialogL: in\
+ aNumber = %S", &aNumber );
+ // to show dialog via qt part
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowQueryDialogL to show qt" );
+ iUiHandler->ShowVmbxQueryDialog( aType, aMode, aNumber, aResult );
+ VMBLOGSTRING2( "VMBX: CVmbxUiUtilities::ShowQueryDialogL: out\
+ aNumber = %S", &aNumber );
+ VMBLOGSTRING2( "VMBX: CVmbxUiUtilities::ShowQueryDialogL: aResult=%I <=",
+ aResult );
+ }
+
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::ShowSaveEmptyNoteL
+// Show dialog when save empty data
+// ---------------------------------------------------------------------------
+//
+void CVmbxUiUtilities::ShowSaveEmptyNoteL( const TVmbxType& aType )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowSaveEmptyNoteL =>" );
+ if ( EVmbxVoice != aType && EVmbxVideo != aType )
+ {
+ User::Leave( KErrNotSupported );
+ }
+ iUiHandler->ShowSaveEmptyNote( aType );
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowSaveEmptyNoteL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::ShowInvalidWarningDialogL
+// Check the characters
+// ---------------------------------------------------------------------------
+//
+void CVmbxUiUtilities::ShowInvalidWarningDialogL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowInvalidWarningDialogL =>" );
+ iUiHandler->ShowInvalidWarningNote();
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowInvalidWarningDialogL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::ShowSaveToPhoneNote
+// Check the characters
+// ---------------------------------------------------------------------------
+//
+void CVmbxUiUtilities::ShowSaveToPhoneNote()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowSaveToPhoneConfirmDialog =>" );
+ iUiHandler->ShowSaveToPhoneNote();
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowSaveToPhoneConfirmDialog <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::ShowSaveToSimConfirmDialog
+// Check the characters
+// ---------------------------------------------------------------------------
+//
+void CVmbxUiUtilities::ShowSaveToSimNote()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowSaveToSimNote =>" );
+ iUiHandler->ShowSaveToSimNote();
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowSaveToSimNote <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::ShowVideoSaveConfirmDialog
+// Check the characters
+// ---------------------------------------------------------------------------
+//
+void CVmbxUiUtilities::ShowVideoSavedNote()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowVideoSavedNote =>" );
+ iUiHandler->ShowVideoSavedNote();
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowVideoSavedNote <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::ShowDefineSelectionDialog
+// Show define number in selection list
+// ---------------------------------------------------------------------------
+//
+void CVmbxUiUtilities::ShowDefineSelectionDialogL( TVmbxType& aType,
+ TInt& aResult )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowDefineSelectionDialogL =>" );
+ iUiHandler->ShowDefineSelectionDialog( aType, aResult );
+ VMBLOGSTRING3( "VMBX: CVmbxUiUtilities::ShowDefineSelectionDialogL: \
+ aType=%I, aResult=%I <=", aType, aResult );
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowDefineSelectionDialogL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::ShowCallSelectionDialog
+// Show call number in selection list
+// ---------------------------------------------------------------------------
+//
+void CVmbxUiUtilities::ShowCallSelectionDialogL(
+ const RPointerArray<CVoiceMailboxEntry>& aArray,
+ TVoiceMailboxParams& aParams,
+ TInt& aResult )
+ {
+ VMBLOGSTRING(
+ "VMBX: CVmbxUiUtilities::ShowCallSelectionDialog EMPTY IMPLEMENTATION! =>"
+ );
+ // TODO: not supported yet, to be implemented.
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowCallSelectionDialog <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::DismissDialogL
+// Tries to close all open dialogs
+// ---------------------------------------------------------------------------
+//
+void CVmbxUiUtilities::DismissDialogL()
+ {
+ VMBLOGSTRING(
+ "VMBX: CVmbxUiUtilities::DismissDialogL EMPTY IMPLEMENTATION!=>" );
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::DismissDialogL <=" );
+ }
+
+// Commented out because branding is not supported yet.
+// ---------------------------------------------------------------------------
+// CVmbxUiUtilities::GetVmbxImageL
+//
+// ---------------------------------------------------------------------------
+/*
+CGulIcon* CVmbxUiUtilities::GetVmbxImageL(
+ const TVoiceMailboxParams& aParams )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::GetVmbxImageL" );
+*/
+
+// --------------------------------------------------------------------------
+// CVmbxUiUtilities::ShowErrorDialogL
+// --------------------------------------------------------------------------
+//
+void CVmbxUiUtilities::ShowErrorDialogL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowErrorDialogL =>" );
+ iUiHandler->ShowInvalidNumberNote();// temporary dialog
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::ShowErrorDialogL <=" );
+ }
+
+// -----------------------------------------------------------------------------
+// CVmbxUiUtilities::FetchNumberFromPhonebook2L
+// Create and show Phonebook's Single Fetch Dialog
+// -----------------------------------------------------------------------------
+//
+void CVmbxUiUtilities::FetchNumberFromPhonebook2L(
+ TDes& aPhoneNumber )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::FetchNumberFromPhonebook2L =>" );
+ /* TODO: Later remove this or replace with some Qt Phonebook API
+ */
+ VMBLOGSTRING( "VMBX: CVmbxUiUtilities::FetchNumberFromPhonebook2L <=" );
+ }
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxutilities.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,334 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the VmbxUtilities class
+*
+*/
+
+
+// INCLUDE FILES
+#include <featmgr.h>
+#include <msssettingsobserver.h> // ALS changes
+
+#include "vmbxlogger.h"
+#include "vmbxcenrephandler.h"
+#include "vmbxemergencycall.h"
+#include "vmbxutilities.h"
+
+// CONSTANTS
+const TInt KVmbxPhoneNumMinLength = 2;
+const TInt KVmbxPhoneNumMaxLength = 40;
+const TInt KVmbxPhoneCharMaxLength = 48;
+
+_LIT( KAllowedTelNumChars, "0123456789" );
+_LIT( KAllowedDtmfChars, "0123456789+pwPW" );
+_LIT( KAllowedSSChars, "*+0123456789#" );
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::IsValidPhoneNumber
+// Validates phone number
+// ---------------------------------------------------------------------------
+//
+TBool VmbxUtilities::IsValidPhoneNumber( const TDesC& aNumber )
+ {
+ VMBLOGSTRING( "VMBX: VmbxUtilities::IsValidPhoneNumber: =>" );
+ TBool result( EFalse );
+ if ( KVmbxPhoneNumMinLength < aNumber.Length()
+ && KVmbxPhoneCharMaxLength >= aNumber.Length() )
+ {
+ VMBLOGSTRING2( "VMBX: VmbxUtilities::IsValidPhoneNumber: aNumber %S",
+ &aNumber );
+ TLex lexer( aNumber );
+ lexer.SkipSpace();
+ TChar current = lexer.Peek();
+ // If no SS code then consider this is valid and return true.
+ if ( '#' == current || '*' == current )
+ {
+ // check whether accord ss regulation,
+ result = ValidateSsNum( lexer );
+ }
+ else
+ {
+ result = ValidateTelNum( lexer );
+ // If zero length then consider as valid and return value of
+ // result, If not the end of the string, check if it's DTMF numbers
+ if ( !lexer.Eos() && result )
+ {
+ result = ValdateDtmfPart( lexer );
+ }
+ }
+ }
+ VMBLOGSTRING2( "VMBX: VmbxUtilities::IsValidPhoneNumber: result = %d<=",
+ result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::AlsLine
+//
+// ---------------------------------------------------------------------------
+//
+TVmbxAlsLineType VmbxUtilities::AlsLine()
+ {
+ VMBLOGSTRING( "VMBX: VmbxUtilities::AlsLine: =>" );
+ TInt ssLine( ESSSettingsAlsNotSupported );
+ TVmbxAlsLineType alsLine( EVmbxAlsLineDefault );
+ RSSSettings ssSettings;
+ TInt res = ssSettings.Open();
+ if( KErrNone == res )
+ {
+ res = ssSettings.Get( ESSSettingsAls, ssLine );
+ if( KErrNone == res )
+ {
+ if ( ESSSettingsAlsAlternate == ssLine )
+ {
+ alsLine = EVmbxAlsLine2;
+ }
+ else if ( ESSSettingsAlsPrimary == ssLine )
+ {
+ alsLine = EVmbxAlsLine1;
+ }
+ }
+ }
+ ssSettings.Close();
+ VMBLOGSTRING2( "VMBX: VmbxUtilities::AlsLine: alsLine=%I <=",
+ alsLine );
+ return alsLine;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxUiUtilities::VideoSupported
+//
+// ---------------------------------------------------------------------------
+//
+TBool VmbxUtilities::VideoSupported()
+ {
+ VMBLOGSTRING( "VMBX: VmbxUtilities::VideoSupported: =>" );
+ TBool result( EFalse );
+
+ if ( FeatureManager::FeatureSupported( KFeatureIdCsVideoTelephony ) )
+ {
+ CVmbxCenRepHandler* cenRepHandler( NULL );
+ // TRAP_IGNORE for no leave function
+ TRAP_IGNORE( cenRepHandler = CVmbxCenRepHandler::NewL() );
+ if ( cenRepHandler )
+ {
+ result = cenRepHandler->VideoSupported();
+ }
+ delete cenRepHandler;
+ cenRepHandler = NULL;
+ }
+ VMBLOGSTRING2( "VMBX: VmbxUtilities::VideoSupported: %d <=", result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// VmbxUtilities::IsEmergencyNumber
+// Verifies if the given number is an emergency number
+// ---------------------------------------------------------------------------
+//
+TBool VmbxUtilities::IsEmergencyNumber( const TDesC& aNumber )
+ {
+ VMBLOGSTRING( "VMBX: VmbxUtilities::IsEmergencyNumber: =>" );
+ TBool result( EFalse );
+ CVmbxEmergencyCall* emergencyCall( NULL );
+ // TRAP_IGNORE for no leave function
+ TRAP_IGNORE( emergencyCall = CVmbxEmergencyCall::NewL() );
+ if ( emergencyCall )
+ {
+ result = emergencyCall->IsEmergencyNumber( aNumber );
+ }
+ delete emergencyCall;
+ emergencyCall = NULL;
+ VMBLOGSTRING2( "VMBX: VmbxUtilities::IsEmergencyNumber: result%d <=",
+ result);
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxUiUtilities::VoIPSupported
+//
+// ---------------------------------------------------------------------------
+//
+TBool VmbxUtilities::VoIPSupported()
+ {
+ VMBLOGSTRING( "VMBX: VmbxUtilities::VoIPSupported: <=>" );
+ return FeatureManager::FeatureSupported( KFeatureIdCommonVoip );
+ }
+
+// -----------------------------------------------------------------------------
+// VmbxUtilities::ValidateSSfix
+// Skips over SS code if it exists.
+// -----------------------------------------------------------------------------
+//
+TBool VmbxUtilities::ValidateSsNum( TLex& aLexer )
+ {
+ VMBLOGSTRING( "VMBX: VmbxUtilities::ValidateSsNum: =>" );
+ //The procedure always starts with *, #, **, ## or *# and is finished by #.
+ // Each part within the procedure is separated by *.
+
+ TBool result( EFalse );
+ // Get and skip the first '#' or '*' separator
+ TChar current = aLexer.Get();
+
+ current = aLexer.Peek();
+
+ if ( '#' == current || '*' == current )
+ {
+ aLexer.Inc(); // Skip the second '#' or '*' separator
+ }
+ // Define another string which aready skip the prefix '*' or
+ // '#', the sring to judge the string whether end of '#' and
+ // valid
+ TLex nextLexer( aLexer );
+ TChar nextChar = nextLexer.Peek();
+ TBool invalidCharFound( EFalse );
+ while ( !nextLexer.Eos() && !invalidCharFound )
+ {
+ nextChar = nextLexer.Get();
+ VMBLOGSTRING2( "VMBX: VmbxUtilities::ValidateTelNum:\
+ nextChar %S", &nextChar );
+ // Check the string valid or invalid for SS string
+ if ( KErrNotFound == KAllowedSSChars().Locate( nextChar ) )
+ {
+ invalidCharFound = ETrue;
+ }
+ }
+
+ // Check if the string end of '#' and check if it's validate ss code.
+ if ( nextLexer.Eos() && ( '#' == nextChar ) && !invalidCharFound )
+ {
+ result = ETrue;
+ if ( result && !aLexer.Eos() )
+ {
+ // It already skip prefix and
+ // Check SC(Service Code) length,it should be more than 2 digits
+ result = ValidateTelNum( aLexer );
+ }
+ }
+ VMBLOGSTRING2( "VMBX: VmbxUtilities::ValidateSsNum: result = %d<=",
+ result );
+ return result;
+ }
+
+// -----------------------------------------------------------------------------
+// VmbxUtilities::ValidateTelNum
+// Parses string until end or invalid tel number character is found.
+// Check number length.
+// -----------------------------------------------------------------------------
+//
+TBool VmbxUtilities::ValidateTelNum( TLex& aLexer )
+ {
+ VMBLOGSTRING( "VMBX: VmbxUtilities::ValidateTelNum: =>" );
+ TBool result( ETrue );
+
+ // Skip country code prefix '+'
+ if ( '+' == aLexer.Peek() )
+ {
+ aLexer.Inc(); // Skip country code separator
+ }
+
+ TInt telNumDigits( 0 );
+ TBool invalidCharFound( EFalse );
+ // Parse until invalid telnumber char found
+ while ( !aLexer.Eos() && !invalidCharFound )
+ {
+ const TChar nextChar = aLexer.Peek();
+ // Check validSS chars
+ if ( KErrNotFound == KAllowedTelNumChars().Locate( nextChar ) )
+ {
+ // Invalid char found so string before it is the tel number part
+ invalidCharFound = ETrue;
+ }
+ else
+ {
+ aLexer.Inc();
+ telNumDigits++;
+ }
+ }
+
+ VMBLOGSTRING2( "VMBX: VmbxUtilities::ValidateTelNum:\
+ telNumDigits %d", telNumDigits );
+
+ if ( KVmbxPhoneNumMinLength > telNumDigits
+ || KVmbxPhoneNumMaxLength < telNumDigits
+ || invalidCharFound )
+ {
+ result = EFalse;
+ }
+
+ VMBLOGSTRING2( "VMBX: VmbxUtilities::ValidateTelNum:\
+ result %d<=", result );
+ return result;
+ }
+
+// -----------------------------------------------------------------------------
+// VmbxUtilities::ValdateDtmfPart
+// Parse string until end and validate for allowed characters.
+// -----------------------------------------------------------------------------
+//
+TBool VmbxUtilities::ValdateDtmfPart( TLex& aLexer )
+ {
+ VMBLOGSTRING( "VMBX: VmbxUtilities::ValdateDtmfPart: =>" );
+ // DTMF string consists of following three parts:
+ // the first part of the string is a phone number,
+ // the second part of the string a DTMF special character (p, w or +),
+ // the last third part is an actual DTMF tone string, which is sent to the
+ // remote end.
+ TBool result( ETrue );
+ TLex lexer( aLexer );
+ TInt telNumDigitsBeforeDtmf( 0 );
+ TBool isDtmfNumberDiscover( EFalse );
+ TBool invalidCharFound( EFalse );
+ // check the second part of the string
+ while ( !lexer.Eos() && !invalidCharFound )
+ {
+ const TChar nextChar = aLexer.Peek();
+ // Check valid DTMF chars
+ if ( KErrNotFound == KAllowedDtmfChars().Locate( lexer.Get() ) )
+ {
+ invalidCharFound = ETrue;
+ }
+ else
+ {
+ // Check DTMF number discover or not
+ if ( 'p' == nextChar || 'P'== nextChar
+ || 'w'== nextChar || 'w'== nextChar )
+ {
+ isDtmfNumberDiscover = ETrue;
+ }
+ // Telnumber count without '+' before 'p' or 'w'
+ if ( '+' != aLexer.Peek() && !isDtmfNumberDiscover )
+ {
+ telNumDigitsBeforeDtmf++;
+ }
+ aLexer.Inc();
+ }
+ VMBLOGSTRING2( "VMBX: VmbxUtilities::ValdateDtmfPart:\
+ telNumDigitsBeforeDtmf %d", telNumDigitsBeforeDtmf );
+ }
+
+ if ( KVmbxPhoneNumMinLength > telNumDigitsBeforeDtmf
+ || KVmbxPhoneNumMaxLength < telNumDigitsBeforeDtmf
+ || invalidCharFound )
+ {
+ result = EFalse;
+ }
+ VMBLOGSTRING2( "VMBX: VmbxUtilities::ValdateDtmfPart: result = %d<=",
+ result );
+ return result;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmbxvoipengine.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,327 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the CVmbxVoIpEngine class
+*
+*/
+
+// INCLUDE FILES
+#include <fbs.h>
+#include <cvoicemailboxentry.h>
+
+#include "vmbxenginebase.h"
+#include "vmbxlogger.h"
+#include "vmbxuiutilities.h"
+#include "vmbxutilities.h"
+#include "vmspshandler.h"
+#include "vmbshandler.h"
+#include "voicemailboxdefsinternal.h"
+#include "vmbxvoipengine.h"
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::CVmbxVoIpEngine
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CVmbxVoIpEngine::CVmbxVoIpEngine( MVmbxResourceProvider& aProvider )
+ : CVmbxEngineBase( aProvider )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::CVmbxVoIpEngine =>" );
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::CVmbxVoIpEngine <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::~CVmbxVoIpEngine
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxVoIpEngine::~CVmbxVoIpEngine()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::~CVmbxVoIpEngine =>" );
+ delete iVmSpsHandler;
+ delete iVmBsHandler;
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::~CVmbxVoIpEngine <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmbxVoIpEngine* CVmbxVoIpEngine::NewL( MVmbxResourceProvider& aProvider)
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::NewL =>" );
+ if ( !VmbxUtilities::VoIPSupported() )
+ {
+ User::Leave( KErrNotSupported );
+ }
+
+ CVmbxVoIpEngine* self = new( ELeave ) CVmbxVoIpEngine( aProvider );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::NewL <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CVmbxVoIpEngine::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::ConstructL =>" );
+ if ( VmbxUtilities::VoIPSupported() )
+ {
+ iVmSpsHandler = CVmSPSHandler::NewL();
+ }
+
+ iVmBsHandler = CVmBSHandler::NewL();
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::GetL
+// Gets voice mailbox number
+// ---------------------------------------------------------------------------
+//
+void CVmbxVoIpEngine::GetL( CVoiceMailboxEntry*& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetL =>" );
+ TInt result( KErrNone );
+ CVoiceMailboxEntry* vmbxEntry = CVoiceMailboxEntry::NewLC();
+
+ vmbxEntry->SetVoiceMailboxType( EVmbxVoip );
+ vmbxEntry->SetServiceId( iVmbxServiceId );
+
+ HBufC8* brandId = HBufC8::NewLC( KSPMaxDesLength );
+ TPtr8 ptr( brandId->Des() );
+ BrandIdL( iVmbxServiceId, ptr );
+ // set brand id
+ result = vmbxEntry->SetBrandId( ptr );
+ CleanupStack::PopAndDestroy( brandId );
+ if ( KErrNone == result )
+ {
+ TVmbxServiceInfo serviceInfo;
+ serviceInfo.iServiceId = iVmbxServiceId;
+ result = GetServiceInfo( serviceInfo );
+ if ( KErrNone == result )
+ {
+ // set voip name
+ result = vmbxEntry->SetVmbxName( serviceInfo.iName );
+ if ( KErrNone == result )
+ {
+ // set voip address
+ result = vmbxEntry->SetVmbxNumber( serviceInfo.iAddress );
+ }
+ }
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxVoIpEngine::GetL: result=%I", result );
+ User::LeaveIfError( result );
+ CleanupStack::Pop( vmbxEntry );
+ aEntry = vmbxEntry;
+ vmbxEntry = NULL;
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::SaveL
+// Saves voice mailbox number
+// ---------------------------------------------------------------------------
+//
+void CVmbxVoIpEngine::SaveL( const CVoiceMailboxEntry& /*aEntry*/ )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::SaveL <=>" );
+ User::Leave( KErrNotSupported );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::SaveProvisionedEntryL
+// Saves Provisioned voice mailbox number
+// ---------------------------------------------------------------------------
+//
+void CVmbxVoIpEngine::SaveProvisionedEntryL(
+ const CVoiceMailboxEntry& /*aEntry*/ )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::SaveProvisionedEntryL <=>" );
+ User::Leave( KErrNotSupported );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxVoIpEngine::CheckConfiguration()
+// ----------------------------------------------------------------------------
+//
+TBool CVmbxVoIpEngine::CheckConfiguration(
+ const TVoiceMailboxParams& /*aParams*/, const TInt aFlags )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::CheckConfiguration: =>" );
+ TBool result( ETrue );
+ if ( EVmbxChangeNbrNotAllowedOnUi & aFlags )
+ {
+ result = EFalse;
+ }
+ VMBLOGSTRING2( "VMBX: CVmbxVoIpEngine::CheckConfiguration: result%I <=",
+ result );
+ return result;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::QueryDefineNumberL
+//
+// ---------------------------------------------------------------------------
+//
+void CVmbxVoIpEngine::QueryDefineNumberL( CVoiceMailboxEntry& /*aEntry*/ )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::QueryDefineNumberL <=>" );
+ User::Leave( KErrNotSupported );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmbxEngineBase::QueryChangeNumberL
+//
+// ----------------------------------------------------------------------------
+//
+void CVmbxVoIpEngine::QueryChangeNumberL( CVoiceMailboxEntry& /*aEntry*/ )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::QueryChangeNumberL <=>" );
+ User::Leave( KErrNotSupported );
+ }
+
+// Commented out because branding is not supported yet.
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::GetVmbxImageL
+//
+// ---------------------------------------------------------------------------
+//
+/* CGulIcon* CVmbxVoIpEngine::GetVmbxImageL( const TVoiceMailboxParams& aParams )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetVmbxImageL =>" );
+ CGulIcon* guiIcon( NULL );
+ if ( IsVoIPProfilesFound() )
+ {
+ TBuf8<KSPMaxDesLength> brandId( KNullDesC8 );
+ BrandIdL(aParams.iServiceId, brandId );
+
+ CFbsBitmap* brandedBitmap( NULL );
+ CFbsBitmap* brandedBitmapMask( NULL );
+ TRAPD( err, GetBrandedIconL(
+ brandId, brandedBitmap, brandedBitmapMask ) );
+
+ if ( KErrNotFound == err )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetVmbxImageL: \
+ no found profiles<= " );
+ guiIcon = iProvider.VmbxUiUtilities().GetVmbxImageL( aParams );
+ }
+ else if ( KErrNone == err )
+ {
+ guiIcon =
+ CGulIcon::NewL( brandedBitmap, brandedBitmapMask );
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetVmbxImageL: \
+ found profiles" );
+ }
+ }
+ else
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetVmbxImageL: use default " );
+ guiIcon = iProvider.VmbxUiUtilities().GetVmbxImageL( aParams );
+ }
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetVmbxImageL <=" );
+ return guiIcon;
+ } */
+
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::IsVoIPProfilesFound
+//
+// ---------------------------------------------------------------------------
+//
+TBool CVmbxVoIpEngine::IsVoIPProfilesFound()
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::IsVoIPProfilesFound <=>" );
+ return iVmSpsHandler->IsVoIPProfilesFound();
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::GetServiceIds
+//
+// ---------------------------------------------------------------------------
+//
+void CVmbxVoIpEngine::GetServiceIdsL( RIdArray& aProfileIds )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetServiceIds: =>" );
+ if ( VmbxUtilities::VoIPSupported() && IsVoIPProfilesFound() )
+ {
+ iVmSpsHandler->GetServiceIdsL( aProfileIds );
+ }
+ else
+ {
+ User::Leave( KErrNotFound );
+ }
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetServiceIds: <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::GetBrandedIconL
+//
+// ---------------------------------------------------------------------------
+//
+/* void CVmbxVoIpEngine::GetBrandedIconL( const TDesC8& aBrandingId,
+ CFbsBitmap*& aBrandedBitmap, CFbsBitmap*& aBrandedBitmapMask )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetBrandedIconL: =>" );
+
+ iVmBsHandler->GetBrandedIconL(
+ aBrandingId, aBrandedBitmap, aBrandedBitmapMask );
+
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetBrandedIconL: <=" );
+ }
+ */
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::BrandIdL
+//
+// ---------------------------------------------------------------------------
+//
+void CVmbxVoIpEngine::BrandIdL( TInt aServiceId, TDes8& aBrandId )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::BrandIdL: =>" );
+
+ if ( VmbxUtilities::VoIPSupported() )
+ {
+ iVmSpsHandler->BrandIdL( aServiceId, aBrandId );
+ }
+
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::BrandIdL: <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmbxVoIpEngine::GetServiceInfo
+//
+// ---------------------------------------------------------------------------
+//
+TInt CVmbxVoIpEngine::GetServiceInfo( TVmbxServiceInfo& aServiceInfo )
+ {
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetServiceInfo: =>" );
+ TInt ret( KErrNotFound );
+ if ( VmbxUtilities::VoIPSupported() )
+ {
+ ret = iVmSpsHandler->GetServiceInfo( aServiceInfo );
+ }
+ VMBLOGSTRING( "VMBX: CVmbxVoIpEngine::GetServiceInfo: <=" );
+ return ret;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmsettingsuiiconfileprovider.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,101 @@
+/*
+* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CVmSettingsUiIconFileProvider class.
+*
+*/
+
+#include "vmbxlogger.h"
+#include "vmsettingsuiiconfileprovider.h"
+
+// ================= MEMBER FUNCTIONS ==========================================
+
+// -----------------------------------------------------------------------------
+// CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider
+//
+// -----------------------------------------------------------------------------
+//
+CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider()
+ {
+ VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::CVmSettingsUiIconFileProvider <=>" );
+ }
+
+// -----------------------------------------------------------------------------
+// CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider
+//
+// -----------------------------------------------------------------------------
+//
+CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider()
+ {
+ VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider <=" );
+ iFile.Close();
+ VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::~CVmSettingsUiIconFileProvider =>" );
+ }
+
+// -----------------------------------------------------------------------------
+// CVmSettingsUiIconFileProvider::ConstructL
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CVmSettingsUiIconFileProvider::ConstructL( RFile& aFile )
+ {
+ VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::ConstructL <=" );
+ User::LeaveIfError( iFile.Duplicate( aFile ) );
+ VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::ConstructL =>" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmSettingsUiIconFileProvider::NewL
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CVmSettingsUiIconFileProvider* CVmSettingsUiIconFileProvider::NewL(
+ RFile& aFile )
+ {
+ VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::NewL <=" );
+ CVmSettingsUiIconFileProvider* self =
+ new ( ELeave ) CVmSettingsUiIconFileProvider();
+ CleanupStack::PushL( self );
+ self->ConstructL( aFile );
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::NewL =>" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// From MAknIconFileProvider
+//
+// ---------------------------------------------------------------------------
+//
+void CVmSettingsUiIconFileProvider::RetrieveIconFileHandleL(
+ RFile& aFile, const TIconFileType /*aType*/ )
+ {
+ VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::RetrieveIconFileHandleL <=" );
+ // duplicate the file's handle
+ User::LeaveIfError( aFile.Duplicate( iFile ) );
+ VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::RetrieveIconFileHandleL =>" );
+ }
+
+// ---------------------------------------------------------------------------
+// From MAknIconFileProvider
+//
+// ---------------------------------------------------------------------------
+//
+void CVmSettingsUiIconFileProvider::Finished()
+ {
+ VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::Finished <=" );
+ delete this;
+ VMBLOGSTRING( "VMBX: CVmSettingsUiIconFileProvider::Finished =>" );
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/vmspshandler.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,430 @@
+/*
+* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CVmSPSHandler class.
+*
+*/
+
+// INCLUDE FILES
+#include <spsettings.h>
+#include <spentry.h>
+#include <spproperty.h>
+#include <spnotifychange.h>
+#include <featmgr.h>
+#include "vmspshandler.h"
+#include "voicemailboxdefsinternal.h"
+
+#include "vmbxlogger.h"
+
+
+// CONSTANTS
+/** Maximum length of descriptor data */
+const TInt KVmbxMaxDesLength = 512;
+
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::CVmSPSHandler
+// C++ default constructor can NOT contain any code, that might leave.
+// ---------------------------------------------------------------------------
+//
+CVmSPSHandler::CVmSPSHandler()
+ {
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CVmSPSHandler::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::ConstructL =>" );
+ iSettings = CSPSettings::NewL();
+ iSpsSettingsVoipUtils = CSPSettingsVoIPUtils::NewL();
+
+ iNotifier = CSPNotifyChange::NewL( *this );
+
+ // Subscribe to service change notifies
+ // Empty array so that new services will be notified also
+ RIdArray array;
+ CleanupClosePushL( array );
+ // Commented out because voip is not supported yet.
+ //iNotifier->NotifyChangeL( iServiceIds );
+ iNotifier->NotifyChangeL( array );
+ CleanupStack::PopAndDestroy( &array );
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmSPSHandler* CVmSPSHandler::NewL( )
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::NewL =>" );
+ CVmSPSHandler* self = CVmSPSHandler::NewLC();
+ CleanupStack::Pop( self );
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::NewL <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::NewLC
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVmSPSHandler* CVmSPSHandler::NewLC()
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::NewLC =>" );
+ CVmSPSHandler* self = new (ELeave) CVmSPSHandler();
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::NewLC <=" );
+ return self;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::~CVmSPSHandler
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CVmSPSHandler::~CVmSPSHandler()
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::~CVmSPSHandler =>" );
+ iObserver = NULL;
+
+ if ( iNotifier )
+ {
+ iNotifier->Cancel();
+ delete iNotifier;
+ }
+
+ delete iSettings;
+
+ delete iSpsSettingsVoipUtils;
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::~CVmSPSHandler <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::GetServiceIdsL
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CVmSPSHandler::GetServiceIdsL( RArray<TUint>& aServiceIds ) const
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceIdsL =>" );
+ RArray<TUint> serviceIds;
+ CleanupClosePushL( serviceIds );
+ // Get all service Ids and..
+ iSettings->FindServiceIdsL( serviceIds );
+ // ..remove service if VMBX is not defined or if VMBX address is empty
+ for ( TInt i( 0 ); i < serviceIds.Count(); i++ )
+ {
+ if ( IsVbmxSupportedL( serviceIds[ i ] ) )
+ {
+ aServiceIds.Append( serviceIds[ i ] );
+ }
+ }
+
+ VMBLOGSTRING2( "VMBX: CVmSPSHandler::GetServiceIdsL: found %d \
+ Voip mailbox services", serviceIds.Count() );
+
+ CleanupStack::PopAndDestroy( &serviceIds );
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceIdsL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::IsVbmxSupportedL
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+TBool CVmSPSHandler::IsVbmxSupportedL( TUint32 aServiceId ) const
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::IsVbmxSupportedL =>" );
+ TBool supported( EFalse );
+ // Get entry
+ CSPEntry* entry = CSPEntry::NewLC();
+ iSettings->FindEntryL( aServiceId, *entry );
+
+ // Get all service properties a.k.a subservices
+ RPropertyArray properties;
+ properties = entry->GetAllProperties();
+
+ TServicePropertyName propertyName;
+
+ for ( TInt i( 0 ); i < properties.Count() && !supported; i++ )
+ {
+ propertyName = properties[ i ]->GetName();
+
+ supported = propertyName == EPropertyVMBXSubServicePluginId;
+
+ if ( supported )
+ {
+ TVmbxServiceInfo serviceInfo;
+ TRAPD( found, GetVmAddressL( aServiceId, serviceInfo.iAddress ) );
+
+ supported = KErrNotFound != found;
+ }
+ }
+
+ CleanupStack::PopAndDestroy( entry );
+ VMBLOGSTRING2( "VMBX: CVmSPSHandler::IsVbmxSupportedL: %d<=", supported );
+ return supported;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::GetServiceInfo
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+TInt CVmSPSHandler::GetServiceInfo( TVmbxServiceInfo& aServiceInfo ) const
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceInfo =>" );
+ TInt ret( KErrNone );
+ TRAP( ret,
+ {
+ GetServiceNameL( aServiceInfo.iServiceId, aServiceInfo.iName );
+
+ GetVmAddressL( aServiceInfo.iServiceId, aServiceInfo.iAddress );
+
+ TInt snap( 0 );
+ GetSNAPIdL( aServiceInfo.iServiceId, snap );
+ aServiceInfo.iSnapId = static_cast<TUint32> ( snap );
+ } );
+
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceInfo <=" );
+ return ret;
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::GetVmAddressL
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CVmSPSHandler::GetVmAddressL( const TUint32 aServiceId,
+ TDes& aAddress ) const
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::GetVmAddressL =>" );
+ RBuf buffer;
+ CleanupClosePushL( buffer );
+ buffer.ReAllocL( KVmbxMaxDesLength );
+
+ CSPEntry* entry = CSPEntry::NewLC();
+ const CSPProperty* property = NULL;
+
+ iSettings->FindEntryL( aServiceId, *entry );
+
+ // Find correct subservice
+ TInt err = entry->GetProperty( property, ESubPropertyVMBXListenAddress );
+ VMBLOGSTRING2( "VMBX: CVmSPSHandler::GetVmAddressL: err%d", err );
+ User::LeaveIfError( err );
+
+ property->GetValue( buffer );
+ buffer.Length() > aAddress.MaxLength() ?
+ User::Leave( KErrOverflow ) : aAddress.Copy( buffer );
+
+ CleanupStack::PopAndDestroy( entry );
+ CleanupStack::PopAndDestroy( &buffer );
+
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::GetVmAddressL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::GetServiceNameL
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CVmSPSHandler::GetServiceNameL( const TUint32 aServiceId,
+ TDes& aName ) const
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: =>" );
+ RBuf buffer;
+ CleanupClosePushL( buffer );
+ buffer.ReAllocL( KVmbxMaxDesLength );
+
+ // Get entry
+ CSPEntry* entry = CSPEntry::NewLC();
+
+ iSettings->FindEntryL( aServiceId, *entry );
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: 1" );
+ // Read service id and service name
+ buffer.Copy( entry->GetServiceName() );
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: 2" );
+ buffer.Length() > aName.MaxLength() ?
+ User::Leave( KErrOverflow ) : aName.Copy( buffer );
+
+ CleanupStack::PopAndDestroy( entry );
+ CleanupStack::PopAndDestroy( &buffer );
+
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::GetServiceNameL: <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::GetSNAPIdL
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CVmSPSHandler::GetSNAPIdL( TUint32 aServiceId, TInt& aSNAPId ) const
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::GetSNAPIdL: =>" );
+ CSPEntry* entry = CSPEntry::NewLC();
+ const CSPProperty* property = NULL;
+ iSettings->FindEntryL( aServiceId, *entry );
+ // Find correct subservice
+ TInt error(
+ entry->GetProperty( property, ESubPropertyVMBXPreferredSNAPId ) );
+ VMBLOGSTRING2( "VMBX: CVmSPSHandler::GetSNAPIdL: error%d", error );
+
+ if ( KErrNotFound != error )
+ {
+ property->GetValue( aSNAPId );
+ }
+
+ CleanupStack::PopAndDestroy( entry );
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::GetSNAPIdL: <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::BrandIdL
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CVmSPSHandler::BrandIdL( TInt aServiceId, TDes8& aBrandId )
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::BrandIdL: =>" );
+ CSPEntry* entry = CSPEntry::NewLC();
+ const CSPProperty* property = NULL;;
+ TBuf<KSPMaxDesLength> brandId( KNullDesC );
+
+ TInt err = iSettings->FindEntryL( aServiceId, *entry );
+ VMBLOGSTRING2( "VMBX: CVmSPSHandler::BrandIdL: err%d", err );
+ User::LeaveIfError( err );
+
+ err = entry->GetProperty( property, EPropertyBrandId );
+ VMBLOGSTRING2( "VMBX: CVmSPSHandler::BrandIdL: err%d", err );
+ User::LeaveIfError( err );
+
+ if ( property )
+ {
+ property->GetValue( brandId );
+ }
+
+ if ( brandId.Length() )
+ {
+ aBrandId.Copy( brandId );
+ }
+ CleanupStack::PopAndDestroy( entry );
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::BrandIdL: <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::IsActivatedL
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+TBool CVmSPSHandler::IsActivatedL( TInt aServiceId )
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::IsActivatedL: =>" );
+ TBool enabled( EFalse );
+ CSPEntry* entry = CSPEntry::NewLC();
+ const CSPProperty* property = NULL;
+
+ iSettings->FindEntryL( aServiceId, *entry );
+
+ // Find correct subservice
+ TInt error(
+ entry->GetProperty( property, ESubPropertyVMBXEnabled ) );
+
+ if ( KErrNotFound != error )
+ {
+ TOnOff onOff( EOONotSet );
+ property->GetValue( onOff );
+ enabled = onOff == EOn;
+ }
+
+ CleanupStack::PopAndDestroy( entry );
+
+ VMBLOGSTRING2( "VMBX: CVmSPSHandler::IsActivatedL: %d", enabled );
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::IsActivatedL: <=" );
+ return enabled;
+ }
+
+// ----------------------------------------------------------------------------
+// CVmSPSHandler::NotifyServiceChange
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void CVmSPSHandler::NotifyServiceChange( MServiceNotifyHandler* aHandler )
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChange: =>" );
+ iObserver = aHandler;
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChange: <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVmSPSHandler::NotifyServiceChangeCancel
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void CVmSPSHandler::NotifyServiceChangeCancel()
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChangeCancel: =>" );
+ iObserver = NULL;
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::NotifyServiceChangeCancel: <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::HandleNotifyChange
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CVmSPSHandler::HandleNotifyChange( TServiceId /*ServiceId*/ )
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::HandleNotifyChange: =>" );
+ if ( iObserver )
+ {
+ TRAP_IGNORE( iObserver->HandleServiceNotifyL() );
+ }
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::HandleNotifyChange: <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::HandleError
+// (other items were commented in a header).
+// ---------------------------------------------------------------------------
+//
+void CVmSPSHandler::HandleError( TInt aError )
+ {
+ VMBLOGSTRING2( "VMBX: CVmSPSHandler::HandleError: aError %d", aError );
+ }
+
+// ---------------------------------------------------------------------------
+// CVmSPSHandler::IsVoIPProfilesFound
+//
+// ---------------------------------------------------------------------------
+//
+TBool CVmSPSHandler::IsVoIPProfilesFound()
+ {
+ VMBLOGSTRING( "VMBX: CVmSPSHandler::IsVoIPProfilesFound" );
+ TBool ret( EFalse );
+ if ( FeatureManager::FeatureSupported( KFeatureIdCommonVoip ) )
+ {
+ TRAP_IGNORE( ret = iSpsSettingsVoipUtils->VoIPProfilesExistL() );
+ }
+ VMBLOGSTRING2( "VMBX: CVmSPSHandler::IsVoIPProfilesFound: return %I", ret );
+ return ret;
+ }
+
+// End of File
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/src/voicemailboximpl.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,861 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the CVoiceMailboxImpl class
+*
+*/
+
+
+// INCLUDE FILES
+#include <featmgr.h>
+#include <cvoicemailboxentry.h>
+#include "voicemailboxdefsinternal.h"
+
+#include "vmbxenginebase.h"
+#include "vmbxuiutilities.h"
+#include "vmbxenginefactory.h"
+#include "vmbxobserver.h"
+#include "vmbxlogger.h"
+#include "vmbxutilities.h"
+#include "vmbxcenrephandler.h"
+#include "voicemailboximpl.h"
+
+// ============================ MEMBER FUNCTIONS =============================
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVoiceMailboxImpl* CVoiceMailboxImpl::NewL()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NewL =>" );
+ CVoiceMailboxImpl* vmbx = CVoiceMailboxImpl::NewLC();
+ CleanupStack::Pop( vmbx );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NewL <=" );
+ return vmbx;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::NewLC
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CVoiceMailboxImpl* CVoiceMailboxImpl::NewLC()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NewLC =>" );
+ CVoiceMailboxImpl* vmbx = new( ELeave ) CVoiceMailboxImpl();
+ CleanupStack::PushL( vmbx );
+ vmbx->ConstructL();
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NewLC <=" );
+ return vmbx;
+ }
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::~CVoiceMailboxImpl
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CVoiceMailboxImpl::~CVoiceMailboxImpl()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::~CVoiceMailboxImpl =>" );
+ FeatureManager::UnInitializeLib();
+ delete iUiUtilities;
+ delete iVmbxFactory;
+ delete iVmbxObserver;
+ delete iCenRepHandler;
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::~CVoiceMailboxImpl <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::GetStoredEntry
+//
+// ---------------------------------------------------------------------------
+//
+TInt CVoiceMailboxImpl::GetStoredEntry( const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry ) const
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetStoredEntry =>" );
+ TRAPD( err, GetStoredEntryL( aParams, aEntry ) );
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetStoredEntry: err%I <=", err );
+ return err;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::SaveEntry
+//
+// ---------------------------------------------------------------------------
+//
+TInt CVoiceMailboxImpl::SaveEntry( const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SaveEntry =>" );
+ TRAPD( err, SaveEntryL( aEntry ) );
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::SaveEntry: err%I <=", err );
+ return err;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::QueryNewEntry
+//
+// ---------------------------------------------------------------------------
+//
+TInt CVoiceMailboxImpl::QueryNewEntry( const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryNewEntry =>" );
+ TRAPD( err, QueryNewEntryL( aParams, aEntry ) );
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::QueryNewEntry err%I <=",
+ err );
+ return err;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::QueryChangeEntry
+//
+// ---------------------------------------------------------------------------
+//
+TInt CVoiceMailboxImpl::QueryChangeEntry( const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryChangeEntry =>" );
+ TRAPD( err, QueryChangeEntryL( aParams, aEntry ) );
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::QueryChangeEntry: err%I <=",
+ err );
+ return err;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::QueryVmbxType
+//
+// ---------------------------------------------------------------------------
+//
+TInt CVoiceMailboxImpl::QueryVmbxType( TVoiceMailboxParams& aParams )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryVmbxType =>" );
+ TRAPD( err, QueryVmbxTypeL( aParams ) );
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::QueryVmbxType: err%I<=", err );
+ return err;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::NotifyVmbxNumberChangeL
+//
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::NotifyVmbxNumberChangeL(
+ MVoiceMailboxObserver& aObserver,
+ const TBool /*aNotifyOnActiveLineOnly*/ )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NotifyVmbxNumberChangeL =>" );
+ if ( !iNotifyCallBack )
+ {
+ iNotifyCallBack = &aObserver;
+ iVmbxObserver = CVmbxObserver::NewL( *this );
+ iVmbxObserver->SetVmbxObserver( *this );
+ }
+ else
+ {
+ User::Leave( KErrInUse );
+ }
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NotifyVmbxNumberChangeL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::NotifyVmbxNumberChangeCancel
+//
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::NotifyVmbxNumberChangeCancel()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NotifyVmbxNumberChangeCancel =>" );
+ iNotifyCallBack = NULL;
+ delete iVmbxObserver;
+ iVmbxObserver = NULL;
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NotifyVmbxNumberChangeCancel <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::CheckConfiguration
+//
+// ---------------------------------------------------------------------------
+//
+TBool CVoiceMailboxImpl::CheckConfiguration( const TVoiceMailboxParams& aParams,
+ const TInt aFlags )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CheckConfiguration =>" );
+ TBool configuration( EFalse );
+ CVmbxEngineBase* vmbx = NULL;
+ TRAPD( res, iVmbxFactory->CreateEngineL( vmbx, aParams.iType ) );
+ if ( KErrNone == res && vmbx )
+ {
+ configuration = vmbx->CheckConfiguration( aParams, aFlags );
+ }
+ delete vmbx;
+ vmbx = NULL;
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CheckConfiguration <=" );
+ return configuration;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::GetServiceIds
+//
+// ---------------------------------------------------------------------------
+//
+TInt CVoiceMailboxImpl::GetServiceIds( RIdArray& aProfileIds )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetServiceIds =>" );
+ TRAPD( err, GetServiceIdsL( aProfileIds ) );
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetServiceIds: err%I <=", err );
+ return err;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::GetVmbxImage
+//
+// ---------------------------------------------------------------------------
+/* CGulIcon* CVoiceMailboxImpl::GetVmbxImage(
+ const TVoiceMailboxParams& aParams )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetVmbxImage =>" );
+ CGulIcon* guiIcon( NULL );
+ TRAPD( err, guiIcon = GetVmbxImageL( aParams ) );
+ if ( KErrNone != err )
+ {
+ delete guiIcon;
+ guiIcon = NULL;
+ }
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetVmbxImage: err%I <=", err );
+ return guiIcon;
+ } */
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::GetVmbxImages
+//
+// ---------------------------------------------------------------------------
+//
+/* CArrayPtr<CGulIcon>* CVoiceMailboxImpl::GetVmbxImages(
+ RArray<TVoiceMailboxParams>& aParams )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetVmbxImages =>" );
+ CArrayPtr<CGulIcon>* guiIcons( NULL );
+ TRAPD( err, guiIcons = GetVmbxImagesL( aParams ) );
+ if ( KErrNone != err )
+ {
+ if ( guiIcons )
+ {
+ guiIcons->ResetAndDestroy();
+ }
+ }
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetVmbxImages: err%I <=", err );
+ return guiIcons;
+ } */
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::SaveProvisionedEntry
+//
+// ---------------------------------------------------------------------------
+//
+TInt CVoiceMailboxImpl::SaveProvisionedEntry(
+ const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SaveProvisionedEntry =>" );
+ TRAPD( err, SaveProvisionedEntryL( aEntry ) );
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::SaveProvisionedEntry: err%I <=",
+ err );
+ return err;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::SatRefreshL
+//
+// notify Sat Refresh
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::SatRefreshL()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SatRefreshL =>" );
+ // notify sim file's entry changed
+ NotifyChangedL( EVmbxVoice );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SatRefreshL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::CenRepChangedL
+//
+// notify CenRep Changed
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::CenRepChangedL( TVmbxCenRepKey aId )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CenRepChangedL =>" );
+ TVmbxAlsLineType alsLine = VmbxUtilities::AlsLine();
+ if ( ( ( EVmbxVoiceLinePrimaryKey == aId
+ || EVmbxVideoLinePrimaryKey == aId ) // primary value changed
+ && EVmbxAlsLine2 != alsLine )// line 1 active or using default line
+ || ( ( EVmbxVoiceLineAlternateKey == aId
+ || EVmbxVideoLineAlternateKey == aId )// alternate value changed
+ && EVmbxAlsLine2 == alsLine ) )// line 2 active
+ {
+ if ( VmbxUtilities::VideoSupported()
+ && ( ( EVmbxVideoLinePrimaryKey == aId
+ || EVmbxVideoLineAlternateKey == aId ) ) )
+ {
+ NotifyChangedL( EVmbxVideo );
+ }
+ else
+ {
+ NotifyChangedL( EVmbxVoice );
+ }
+ }
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CenRepChangedL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::SimStoreChangedL
+// notify sim store changed
+//
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::SimStoreChangedL()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SimStoreChangedL =>" );
+ // notify sim file changed
+ NotifyChangedL( EVmbxVoice );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SimStoreChangedL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::CVoiceMailboxImpl
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------
+//
+CVoiceMailboxImpl::CVoiceMailboxImpl()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::CVoiceMailboxImpl <=>" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::ConstructL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::ConstructL()
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::ConstructL =>" );
+ FeatureManager::InitializeLibL();
+
+ // Create Ui utilities for dialog and images
+ iUiUtilities = CVmbxUiUtilities::NewL();
+ // create CenRep
+ iCenRepHandler = CVmbxCenRepHandler::NewL();
+
+ // Create factory for voice/video/voip engine
+ iVmbxFactory = CVmbxEngineFactory::NewL( *this );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::ConstructL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::GetStoredEntryL
+//
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::GetStoredEntryL( const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry ) const
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetStoredEntryL =>" );
+ CVoiceMailboxEntry* entry( NULL );
+ CVmbxEngineBase* vmbxBox( NULL );
+ iVmbxFactory->CreateEngineL( vmbxBox, aParams.iType );
+ CleanupStack::PushL( vmbxBox );
+ vmbxBox->GetL( entry );
+ CleanupStack::PopAndDestroy( vmbxBox );
+ aEntry = entry;
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetStoredEntryL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::SaveEntryL
+//
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::SaveEntryL( const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SaveEntryL =>" );
+ TVoiceMailboxParams params( aEntry );
+ CVmbxEngineBase* vmbxBox( NULL );
+ iVmbxFactory->CreateEngineL( vmbxBox, aEntry.VoiceMailboxType() );
+ CleanupStack::PushL( vmbxBox );
+ if ( vmbxBox->CheckConfiguration( params, EVmbxChangeNbrNotAllowedOnUi ) )
+ {
+ vmbxBox->SaveL( aEntry );
+ }
+ else
+ {
+ User::Leave( KErrNotSupported );
+ }
+ CleanupStack::PopAndDestroy( vmbxBox );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SaveEntryL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::QueryNewEntryL
+//
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::QueryNewEntryL( const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryNewEntryL =>" );
+ CVmbxEngineBase* vmbxBox( NULL );
+ iVmbxFactory->CreateEngineL( vmbxBox, aParams.iType );
+ CleanupStack::PushL( vmbxBox );
+ if ( vmbxBox->CheckConfiguration( aParams, EVmbxChangeNbrNotAllowedOnUi ) )
+ {
+ CVoiceMailboxEntry* entry = CVoiceMailboxEntry::NewLC();
+ entry->SetVoiceMailboxType( aParams.iType );
+ entry->SetServiceId( aParams.iServiceId );
+ vmbxBox->QueryDefineNumberL( *entry );
+ CleanupStack::Pop( entry );
+ aEntry = entry;
+ }
+ else
+ {
+ // show error note
+ iUiUtilities->ShowErrorDialogL();
+ }
+ CleanupStack::PopAndDestroy( vmbxBox );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryNewEntryL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::QueryChangeEntryL
+//
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::QueryChangeEntryL( const TVoiceMailboxParams& aParams,
+ CVoiceMailboxEntry*& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryChangeEntryL =>" );
+ CVmbxEngineBase* vmbxBox( NULL );
+ iVmbxFactory->CreateEngineL( vmbxBox, aParams.iType );
+ CleanupStack::PushL( vmbxBox );
+ if ( vmbxBox->CheckConfiguration( aParams, EVmbxChangeNbrNotAllowedOnUi ) )
+ {
+ CVoiceMailboxEntry* entry( NULL );
+ GetStoredEntryL( aParams, entry );
+ CleanupStack::PushL( entry );
+ vmbxBox->QueryChangeNumberL( *entry );
+ CleanupStack::Pop( entry );
+ aEntry = entry;
+ }
+ else
+ {
+ // show error note
+ iUiUtilities->ShowErrorDialogL();
+ }
+ CleanupStack::PopAndDestroy( vmbxBox );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryChangeEntryL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CleanupRPointerArray
+// avoid memory leak when using RPointerArray
+// ---------------------------------------------------------------------------
+//
+LOCAL_C void CleanupRPointerArray( TAny* aParam )
+ {
+ if ( aParam )
+ {
+ static_cast< RPointerArray<CVoiceMailboxEntry>* >( aParam )
+ ->ResetAndDestroy();
+ }
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::QueryVmbxTypeL
+// Query vmbx type
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::QueryVmbxTypeL( TVoiceMailboxParams& aParams )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL =>" );
+ aParams.iType = EVmbxNone;
+ aParams.iServiceId = KVmbxServiceIdNone;
+
+ TInt result ( KErrNotFound );
+ RPointerArray<CVoiceMailboxEntry> array;
+ TCleanupItem item( CleanupRPointerArray, &array );
+ CleanupStack::PushL( item );
+ GetDefinedEntriesL( array );
+
+ TInt definedCount = array.Count();
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL:\
+ definedCount%I", definedCount );
+ // more than one number defined
+ if ( definedCount > 1 )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL:\
+ more than one number Denfined" );
+ // query call type
+ RArray<TVoiceMailboxParams> paramsArray;
+ CleanupClosePushL( paramsArray );
+ TVoiceMailboxParams entryParams;
+ for ( TInt i = 0; i < array.Count(); i++ )
+ {
+ entryParams.iType = array[i]->VoiceMailboxType();
+ entryParams.iServiceId = array[i]->ServiceId();
+ paramsArray.AppendL( entryParams );
+ }
+ //CArrayPtr<CGulIcon>* dialogIcons = GetVmbxImagesL( paramsArray );
+ //CleanupStack::PushL( dialogIcons );
+ iUiUtilities->ShowCallSelectionDialogL(
+ array, /* dialogIcons, */ aParams, result );
+ //CleanupStack::Pop( dialogIcons );
+ CleanupStack::PopAndDestroy( ¶msArray );
+ }
+ // only one number defined
+ else if ( 1 == definedCount )
+ {
+ // return the onle defined number
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL:\
+ One number Denfined" );
+ aParams.iType = array[0]->VoiceMailboxType();
+ result = KErrNone;
+ }
+ // there is no number defined
+ else
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL:\
+ no number Denfined" );
+ // define number
+ if ( VmbxUtilities::VideoSupported() )
+ {
+ // query to be defined type
+ iUiUtilities->ShowDefineSelectionDialogL( aParams.iType, result );
+ // if result is KErrNone(but result should be also KErrNotFound ),
+ // it means user have seclected the defined type;
+ // else user cancel to select the type, so should return result value
+ if ( KErrNone == result )
+ {
+ result = KErrNotFound;
+ }
+ }
+ else
+ {
+ aParams.iType = EVmbxVoice;
+ }
+ }
+
+ CleanupStack::PopAndDestroy(); //item
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL: result%I",
+ result );
+ User::LeaveIfError( result );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::QueryVmbxTypeL <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVoiceMailboxImpl::GetDefinedEntriesL
+//
+// ----------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::GetDefinedEntriesL(
+ RPointerArray<CVoiceMailboxEntry>& aArray )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedEntriesL =>" );
+ TRAPD( voiceErr,GetDefinedVoiceEntryL( aArray ));
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetDefinedEntriesL: voiceErr%I",
+ voiceErr );
+ // It should be ignored when video/voip unsupported or no number defined
+ if ( KErrNotFound != voiceErr )
+ {
+ User::LeaveIfError( voiceErr );
+ }
+
+ TRAPD( videoErr, GetDefinedVideoEntryL( aArray ) );
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetDefinedEntriesL: videoErr%I",
+ videoErr );
+ if ( KErrNotSupported != videoErr && KErrNotFound != videoErr )
+ {
+ User::LeaveIfError( videoErr );
+ }
+
+ TRAPD( voIperr, GetDefinedVoipEntriesL( aArray ));
+
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetDefinedEntriesL: voIperr%I",
+ voIperr );
+ // It should be ignored when video/voip unsupported or no number defined
+ if ( KErrNotSupported != voIperr && KErrNotFound != voIperr )
+ {
+ User::LeaveIfError( voIperr );
+ }
+
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedEntriesL <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVoiceMailboxImpl::GetDefinedVoiceEntryL
+//
+// ----------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::GetDefinedVoiceEntryL(
+ RPointerArray<CVoiceMailboxEntry>& aArray )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedVoiceEntryL =>" );
+ // check voice mailbox
+ CVmbxEngineBase* voiceBox( NULL );
+ iVmbxFactory->CreateEngineL( voiceBox, EVmbxVoice );
+ CleanupStack::PushL( voiceBox );
+ // get voice entry
+ CVoiceMailboxEntry* voiceEntry( NULL);
+ voiceBox->GetL( voiceEntry );
+ CleanupStack::PushL( voiceEntry );
+ // get voice number
+ TPtrC vmbxVoiceNumber( KNullDesC );
+ TInt resVoice = voiceEntry->GetVmbxNumber( vmbxVoiceNumber );
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetDefinedVoiceEntryL:\
+ VoiceNumber = %S ", &vmbxVoiceNumber );
+ if ( KErrNone == resVoice && vmbxVoiceNumber.Length() )
+ {
+ aArray.AppendL( voiceEntry );
+ }
+ CleanupStack::Pop( voiceEntry );
+ CleanupStack::PopAndDestroy( voiceBox );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedVoiceEntryL <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVoiceMailboxImpl::GetDefinedVideoEntryL
+//
+// ----------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::GetDefinedVideoEntryL(
+ RPointerArray<CVoiceMailboxEntry>& aArray )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedVideoEntryL =>" );
+ // check video mailbox
+ CVmbxEngineBase* videoBox = NULL;
+ iVmbxFactory->CreateEngineL( videoBox, EVmbxVideo );
+ CleanupStack::PushL( videoBox );
+
+ CVoiceMailboxEntry* videoEntry( NULL );
+ // get video entry
+ videoBox->GetL( videoEntry );
+ CleanupStack::PushL( videoEntry );
+ TPtrC vmbxVideoNumber( KNullDesC );
+
+ TInt resVideo = videoEntry->GetVmbxNumber( vmbxVideoNumber );
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetDefinedVideoEntryL:\
+ VideoNumber = %S ", &vmbxVideoNumber );
+
+ if ( KErrNone == resVideo && vmbxVideoNumber.Length() )
+ {
+ aArray.AppendL( videoEntry );
+ }
+ CleanupStack::Pop( videoEntry );
+ CleanupStack::PopAndDestroy( videoBox );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedVideoEntryL <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVoiceMailboxImpl::GetDefinedVoipEntriesL
+//
+// ----------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::GetDefinedVoipEntriesL(
+ RPointerArray<CVoiceMailboxEntry>& aArray )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedVoipEntriesL =>" );
+ // check VoIP mailbox
+ CVmbxEngineBase* voIPBox = NULL;
+ iVmbxFactory->CreateEngineL( voIPBox, EVmbxVoip );
+ CleanupStack::PushL( voIPBox );
+
+ RIdArray profileIds;
+ CleanupClosePushL( profileIds );
+
+ voIPBox->GetServiceIdsL( profileIds );
+ TInt profileCounts = profileIds.Count();
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetDefinedVoipEntriesL:\
+ VoIP profileCounts%I ", profileCounts);
+ if ( 0 < profileCounts )
+ {
+ for ( TInt i( 0 ); i < profileCounts; i++ )
+ {
+ voIPBox->SetCurrentServiceId( profileIds[i] );
+ CVoiceMailboxEntry* voIPEntry( NULL );
+ // get voip entry
+ voIPBox->GetL( voIPEntry );
+ CleanupStack::PushL( voIPEntry );
+ TPtrC vmbxVoIPName( KNullDesC );
+ TInt resVoIP = voIPEntry->GetVmbxName( vmbxVoIPName );
+
+ TPtrC vmbxVoIPAddress( KNullDesC );
+ if ( KErrNone == resVoIP )
+ {
+ VMBLOGSTRING2(
+ "VMBX: CVoiceMailboxImpl::GetDefinedVoipEntriesL:\
+ vmbxVoIPName = %S ", &vmbxVoIPName );
+ resVoIP = voIPEntry->GetVmbxNumber( vmbxVoIPAddress );
+ }
+ if ( KErrNone == resVoIP && vmbxVoIPAddress.Length()
+ && vmbxVoIPName.Length() )
+ {
+ VMBLOGSTRING2(
+ "VMBX: CVoiceMailboxImpl::GetDefinedVoipEntriesL:\
+ vmbxVoIPAddress = %S ", &vmbxVoIPAddress );
+ aArray.AppendL( voIPEntry );
+ }
+ CleanupStack::Pop( voIPEntry );
+ }
+ }
+ CleanupStack::PopAndDestroy( &profileIds );
+ CleanupStack::PopAndDestroy( voIPBox );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetDefinedVoipEntriesL <=" );
+ }
+
+// ----------------------------------------------------------------------------
+// CVoiceMailboxImpl::GetServiceIdsL
+//
+// ----------------------------------------------------------------------------
+void CVoiceMailboxImpl::GetServiceIdsL( RIdArray& aProfileIds )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetServiceIdsL =>" );
+ // Get all Service Ids
+ RIdArray profileIds;
+ CleanupClosePushL( profileIds );
+ CVmbxEngineBase* vmbx = NULL;
+ iVmbxFactory->CreateEngineL( vmbx, EVmbxVoip );
+ CleanupStack::PushL( vmbx );
+ vmbx->GetServiceIdsL( profileIds );
+ for ( TInt i( 0 ); i < profileIds.Count(); i++ )
+ {
+ aProfileIds.AppendL( profileIds[i]);
+ }
+ CleanupStack::PopAndDestroy( vmbx );
+ CleanupStack::Pop( &profileIds );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetServiceIdsL <=");
+ }
+
+// ----------------------------------------------------------------------------
+// CVoiceMailboxImpl::GetVmbxImageL
+//
+// ----------------------------------------------------------------------------
+/* CGulIcon* CVoiceMailboxImpl::GetVmbxImageL(
+ const TVoiceMailboxParams& aParams )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetVmbxImageL =>" );
+ CGulIcon* guiIcon( NULL );
+ CVmbxEngineBase* vmbxEngine = NULL;
+ iVmbxFactory->CreateEngineL( vmbxEngine, aParams.iType );
+ CleanupStack::PushL( vmbxEngine );
+ if ( vmbxEngine )
+ {
+ guiIcon = vmbxEngine->GetVmbxImageL( aParams );
+ }
+ CleanupStack::PopAndDestroy( vmbxEngine );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetVmbxImageL <=" );
+ return guiIcon;
+ } */
+
+// ----------------------------------------------------------------------------
+// CVoiceMailboxImpl::GetVmbxImagesL
+//
+// ----------------------------------------------------------------------------
+//
+/* CArrayPtr<CGulIcon>* CVoiceMailboxImpl::GetVmbxImagesL(
+ RArray<TVoiceMailboxParams>& aParams )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetVmbxImagesL =>" );
+ CAknIconArray* icons =
+ new( ELeave ) CAknIconArray( KVmLbxItemsArraySize );
+ CleanupStack::PushL( icons );
+
+ const TInt count = aParams.Count();
+ VMBLOGSTRING2( "VMBX: CVoiceMailboxImpl::GetVmbxImagesL count %I",
+ count);
+ for( TInt i = 0; i < count; i++ )
+ {
+ CGulIcon *icon = GetVmbxImageL( aParams[i] );
+ icons->AppendL( icon );
+ }
+ CleanupStack::Pop( icons );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::GetVmbxImagesL <=" );
+ return icons;
+ } */
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::SaveProvisionedEntryL
+//
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::SaveProvisionedEntryL(
+ const CVoiceMailboxEntry& aEntry )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SaveProvisionedEntryL =>" );
+ CVmbxEngineBase* vmbxEngine = NULL;
+ iVmbxFactory->CreateEngineL( vmbxEngine, aEntry.VoiceMailboxType() );
+ CleanupStack::PushL( vmbxEngine );
+ TVoiceMailboxParams params( aEntry );
+ vmbxEngine->SaveProvisionedEntryL( aEntry );
+ CleanupStack::PopAndDestroy( vmbxEngine );
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::SaveProvisionedEntryL <=");
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::NotifyChangedL
+// notify changed and tell the change to observer
+//
+// ---------------------------------------------------------------------------
+//
+void CVoiceMailboxImpl::NotifyChangedL( TVmbxType aType )
+ {
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NotifyChangedL =>" );
+ iUiUtilities->DismissDialogL();
+ if ( iNotifyCallBack )
+ {
+ CVmbxEngineBase* vmbxEngine = NULL;
+ iVmbxFactory->CreateEngineL( vmbxEngine, aType );
+ CleanupStack::PushL( vmbxEngine );
+ CVoiceMailboxEntry* entry( NULL );
+ vmbxEngine->GetL( entry );
+ CleanupStack::PushL( entry );
+ iNotifyCallBack->HandleNotifyL( *entry );
+ CleanupStack::PopAndDestroy( entry );
+ CleanupStack::PopAndDestroy( vmbxEngine );
+ }
+ VMBLOGSTRING( "VMBX: CVoiceMailboxImpl::NotifyChangedL <=" );
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::VmbxUiUtilities
+// notify changed and tell the change to observer
+//
+// ---------------------------------------------------------------------------
+//
+MVmbxUiUtilities& CVoiceMailboxImpl::VmbxUiUtilities()
+ {
+ return *iUiUtilities;
+ }
+
+// ---------------------------------------------------------------------------
+// CVoiceMailboxImpl::VmbxCenRepHandler
+// notify changed and tell the change to observer
+//
+// ---------------------------------------------------------------------------
+//
+MVmbxCenrepHandler& CVoiceMailboxImpl::VmbxCenRepHandler()
+ {
+ return *iCenRepHandler;
+ }
+
+// End of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/ut_vmbxengine.cpp Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,237 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the Ut_vmbxEngine class
+*
+*/
+
+#include <QtGui>
+
+
+#include <hbapplication.h>
+#include <hbmainwindow.h>
+
+#include "../../../inc/cvoicemailbox.h"
+#include "../../../inc/cvoicemailboxentry.h"
+#include "../../../inc/voicemailboxdefs.h"
+#include "../../../inc/mvoicemailboxobserver.h"
+#include "../../../inc/vmbxqtuihandler.h"
+#include "../../../inc/vmbxuihandler.h"
+
+#include "ut_vmbxengine.h"
+
+// -----------------------------------------------------------------------------
+// Constants for verifying test case results
+// -----------------------------------------------------------------------------
+//
+
+
+ // -----------------------------------------------------------------------------
+// Ut_vmbxEngine::Ut_vmbxEngine
+// Default constructor, remember to null new members here.
+// -----------------------------------------------------------------------------
+//
+Ut_vmbxEngine::Ut_vmbxEngine()
+{
+ qDebug("Ut_vmbxEngine::Ut_vmbxEngine >");
+ qDebug("Ut_vmbxEngine::Ut_vmbxEngine <");
+}
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxEngine::~Ut_vmbxEngine
+// -----------------------------------------------------------------------------
+Ut_vmbxEngine::~Ut_vmbxEngine()
+{
+ qDebug("Ut_vmbxEngine::~Ut_vmbxEngine >");
+ qDebug("Ut_vmbxEngine::~Ut_vmbxEngine <");
+}
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxEngine::initTestCase
+// QTestLib initialization method, called before the last testfunction .
+// -----------------------------------------------------------------------------
+void Ut_vmbxEngine::initTestCase()
+{
+ qDebug("Ut_vmbxEngine::initTestCase >");
+ mQtUiHandler = new VmbxQtUiHandler();
+ QVERIFY(mQtUiHandler);
+ qDebug("Ut_vmbxEngine::initTestCase <");
+}
+
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxEngine::cleanupTestCase
+// QTestLib cleanup method, called after the last testfunction .
+// -----------------------------------------------------------------------------
+void Ut_vmbxEngine::cleanupTestCase()
+{
+ qDebug("Ut_vmbxEngine::cleanupTestCase >");
+ delete mQtUiHandler;
+ mQtUiHandler = 0;
+ qDebug("Ut_vmbxEngine::cleanupTestCase <");
+}
+
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxEngine::testCreateVmbxMailbox
+// CreateVmbxMailbox test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Ut_vmbxEngine::testCreateVmbxMailbox()
+{
+ qDebug("Ut_vmbxEngine::testCreateVmbxMailbox >");
+ TRAPD(err,mVmbxEngine = CVoiceMailbox::NewL());
+ QVERIFY2(KErrNone == err, "CVoiceMailbox::NewL failed");
+ qDebug("Ut_vmbxEngine::testCreateVmbxMailbox <");
+}
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxEngine::testCreateWindow
+// testCreateWindow test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Ut_vmbxEngine::testCreateWindow()
+{
+ qDebug("Mt_vmbxEngine::testCreateWindow >");
+ mWindow = new HbMainWindow();
+ QVERIFY(mWindow);
+ mWindow->show();
+ qDebug("Mt_vmbxEngine::testCreateWindow Windowshow");
+ qDebug("Mt_vmbxEngine::testCreateWindow <");
+}
+// -----------------------------------------------------------------------------
+// Ut_vmbxEngine::testshowVmbxQueryDialog
+// Define selection dialog test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Ut_vmbxEngine::testshowVmbxQueryDialog()
+{
+ qDebug("Mt_vmbxEngine::testshowVmbxQueryDialog >");
+ QVERIFY(mQtUiHandler);
+ TVmbxType vmbxtype(EVmbxVoice);
+ TVmbxQueryMode queryMode(EVmbxDefineMode);
+ QString number(tr(""));
+ int result(0);
+ mQtUiHandler->showVmbxQueryDialog(
+ EVmbxVoice, EVmbxDefineMode, number, result);
+ if ( KErrCancel == result ) {
+ QCOMPARE(number, tr(""));
+ }
+ number = tr("123456");
+ mQtUiHandler->showVmbxQueryDialog(
+ EVmbxVoice, EVmbxChangeMode, number, result);
+
+ if ( KErrCancel == result ) {
+ QCOMPARE(number, tr(""));
+ }
+ qDebug("Mt_vmbxEngine::testshowVmbxQueryDialog <");
+}
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxEngine::testshowDefineSelectionDialog
+// Define selection dialog test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Ut_vmbxEngine::testshowDefineSelectionDialog()
+{
+ qDebug("Ut_vmbxEngine::testshowDefineSelectionDialog >");
+ QVERIFY(mQtUiHandler);
+ TVmbxType vmbxtype;
+ int result;
+ mQtUiHandler->showDefineSelectionDialog(vmbxtype, result);
+ if (KErrCancel == result && EVmbxNone != vmbxtype) {
+ QFAIL("Ut_vmbxEngine::testshowDefineSelectionDialog:Cancel");
+ } else if ( KErrNone == result && EVmbxNone == vmbxtype ){
+ QFAIL("Ut_vmbxEngine::testshowDefineSelectionDialog:vmbxtype wrong");
+ }
+ qDebug("Ut_vmbxEngine::testshowDefineSelectionDialog:vmbxtype%d",
+ vmbxtype);
+ qDebug("Ut_vmbxEngine::testshowDefineSelectionDialog:result%d",
+ result);
+ qDebug("Ut_vmbxEngine::testshowDefineSelectionDialog <");
+}
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxEngine::testshowSaveEmptyNote
+// CreateVmbxMailbox test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Ut_vmbxEngine::testshowSaveEmptyNote()
+{
+ qDebug("Ut_vmbxEngine::testshowSaveEmptyNote >");
+ TRAPD(err,mUiHandler = CVmbxUiHandler::NewL());
+ QVERIFY2(KErrNone == err, "create CVmbxUiHandler failed");
+ TVmbxType vmbxtype(EVmbxVoice);
+ mUiHandler->ShowSaveEmptyNote(vmbxtype);
+ qDebug("Ut_vmbxEngine::testQueryVmbxMailbox show voice");
+ vmbxtype = EVmbxVideo;
+ mUiHandler->ShowSaveEmptyNote(vmbxtype);
+ qDebug("Ut_vmbxEngine::testQueryVmbxMailbox show video");
+ delete mUiHandler;
+ mUiHandler = 0;
+ qDebug("Ut_vmbxEngine::testshowSaveEmptyNote <");
+}
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxEngine::testDeleteWindow
+// testDeleteWindow test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Ut_vmbxEngine::testDeleteWindow()
+{
+ qDebug("Mt_vmbxEngine::testDeleteWindow >");
+ delete mWindow;
+ mWindow = 0;
+ qDebug("Mt_vmbxEngine::testDeleteWindow <");
+}
+
+// -----------------------------------------------------------------------------
+// Ut_vmbxEngine::testCreateVmbxMailbox
+// CreateVmbxMailbox test case
+// Connects to test object signal and verifies received data.
+// -----------------------------------------------------------------------------
+void Ut_vmbxEngine::testDeleteVmbxMailbox()
+{
+ qDebug("Ut_vmbxEngine::testDeleteVmbxMailbox >");
+ delete mVmbxEngine;
+ mVmbxEngine = 0;
+ qDebug("Ut_vmbxEngine::testDeleteVmbxMailbox <");
+}
+
+// TODO: move main method to a separate file
+
+// -----------------------------------------------------------------------------
+// main()
+// Main method implemented for directing test output to a file.
+// -----------------------------------------------------------------------------
+int main(int argc, char *argv[])
+ {
+ qDebug("ut_vmbxengine.cpp: main() >");
+ QApplication app(argc, argv);
+
+ qDebug("ut_vmbxengine.cpp: Ut_vmbxEngine");
+ Ut_vmbxEngine tc;
+ char *pass[3];
+ pass[0] = argv[0];
+ pass[1] = "-o";
+ pass[2] = "c:\\logs\\vmbx\\ut_vmbxengine.txt";
+ const int result = QTest::qExec(&tc, 3, pass);
+
+ qDebug("ut_vmbxengine.cpp: main() <, result=%d", result);
+ return result;
+ }
+
+// .moc file was not created during build for some reason, but looks like
+// we don't need it since this works.
+//#include "ut_vmbxengine.moc"
+//#include "moc_ut_vmbxengine.cpp"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/ut_vmbxengine.h Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,134 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of the Ut_vmbxEngine class
+*
+*/
+
+#ifndef _UT_VMBXENGINE_H
+#define _UT_VMBXENGINE_H
+
+#include <QtTest/QtTest>
+#include <QString>
+#include <QStringList>
+#include <QSignalSpy>
+#include <QMetaType>
+#include <QObject>
+
+
+// Class forwards
+class CVoiceMailbox;
+class CVmbxUiHandler;
+class VmbxQtUiHandler;
+class HbMainWindow;
+
+
+/**
+ * Ut_vmbxEngine unit test class.
+ *
+ * Tests vmbxEngine cpp files public APIS.
+ * See cpp file for more information.
+ *
+ * @lib ut_vmbxengine.lib
+ * @since S60 <TB10.1>
+ */
+class Ut_vmbxEngine : public QObject
+{
+ Q_OBJECT
+
+public:
+ Ut_vmbxEngine();
+ virtual ~Ut_vmbxEngine();
+
+ //void testResult(const bool aResult);
+
+private slots:
+
+ /**
+ * Called before the first testfunction is executed.
+ * Handles the SetUpMenu command.
+ */
+ void initTestCase();
+
+ /**
+ * Called after the last testfunction has been executed.
+ *
+ */
+ void cleanupTestCase();
+
+ /**
+ * Test middle case,CreateWindow
+ *
+ * provide window for UI
+ */
+ void testCreateWindow();
+
+ /**
+ * Test middle case,showVmbxQueryDialog
+ *
+ */
+ void testshowVmbxQueryDialog();
+
+ /**
+ * Test middle case,showDefineSelectionDialog
+ *
+ */
+ void testshowDefineSelectionDialog();
+
+ /**
+ * Test first case,Create CVoiceMailbox
+ *
+ */
+ void testCreateVmbxMailbox();
+
+ /**
+ * Test middle case,showSaveEmptyNote
+ *
+ */
+ void testshowSaveEmptyNote();
+
+ /**
+ * Test middle case,delete HbMainWindow
+ *
+ */
+ void testDeleteWindow();
+ /**
+ * Test last case,delete CVoiceMailbox
+ *
+ */
+ void testDeleteVmbxMailbox();
+
+private: //data
+
+ /**
+ * Own.
+ */
+ CVoiceMailbox* mVmbxEngine;
+
+ /**
+ * Own.
+ */
+ CVmbxUiHandler *mUiHandler;
+
+ /**
+ * Own.
+ */
+ VmbxQtUiHandler *mQtUiHandler;
+
+ /**
+ * Own.
+ */
+ HbMainWindow* mWindow;
+};
+
+#endif // _UT_VMBXENGINE_H
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/vmbx/vmbxengine/tsrc/ut_vmbxengine/ut_vmbxengine.pro Fri Mar 19 09:40:14 2010 +0200
@@ -0,0 +1,63 @@
+#
+# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of "Eclipse Public License v1.0"
+# which accompanies this distribution, and is available
+# at the URL "http://www.eclipse.org/legal/epl-v10.html".
+#
+# Initial Contributors:
+# Nokia Corporation - initial contribution.
+#
+# Contributors:
+#
+# Description:
+#
+
+TEMPLATE = app
+TARGET =
+DEPENDPATH += .
+INCLUDEPATH += .
+CONFIG += hb
+CONFIG += qtestlib
+
+symbian: {
+ TARGET.CAPABILITY = CAP_GENERAL_DLL
+}
+
+symbian {
+ INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE \
+ /epoc32/include/mw/QtTest \
+ ../../inc
+
+ LIBS += -lvmbxengine.dll\
+ -lflogger.dll
+ TARGET.CAPABILITY = ALL -TCB
+}
+
+# Input
+HEADERS += $$PUBLIC_HEADERS
+HEADERS += ut_vmbxengine.h
+SOURCES += ut_vmbxengine.cpp\
+ ..\..\src\vmbxuihandler.cpp\
+ ..\..\src\vmbxqtuihandler.cpp\
+ ..\..\src\voicemailboximpl.cpp\
+ ..\..\src\vmbxpbkstore.cpp\
+ ..\..\src\vmbxetelconnection.cpp\
+ ..\..\src\vmbxsimhandler.cpp\
+ ..\..\src\vmbxcenrephandler.cpp\
+ ..\..\src\vmbxutilities.cpp\
+ ..\..\src\vmbxenginefactory.cpp\
+ ..\..\src\vmbxenginebase.cpp\
+ ..\..\src\vmbxcsvoiceengine.cpp\
+ ..\..\src\vmbxcsvideoengine.cpp\
+ ..\..\src\vmbxvoipengine.cpp\
+ ..\..\src\vmbxemergencycall.cpp\
+ ..\..\src\vmbxuiutilities.cpp\
+ ..\..\src\vmbxcenrepobserver.cpp\
+ ..\..\src\vmbxsimstoreobserver.cpp\
+ ..\..\src\vmbxsatrefreshobserver.cpp\
+ ..\..\src\vmbxobserver.cpp\
+ ..\..\src\vmbshandler.cpp\
+ ..\..\src\vmspshandler.cpp\
+ ..\..\src\vmsettingsuiiconfileprovider.cpp