, public Tizen::Ui::Controls::IFormBackEventListener
, public Tizen::Ui::Controls::ITableViewItemProvider
, public Tizen::Ui::IOrientationEventListener
+ , public Tizen::Social::IAddressbookChangeEventListener
{
public:
ConfCallerListForm(void);
virtual result OnDraw(void);
// Handle change in conf call list
void HandleParticipantsChanged(void);
+ //IAddressbookChangeEventListener
+ virtual void OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList);
+ virtual void OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList);
virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
virtual void OnFormBackRequested(Tizen::Ui::Controls::Form& source);
AppCallInfo* __pConfCallInfo;
//Timer used to show call time
Tizen::Base::Runtime::Timer* __pConfCallTimer;
+ Tizen::Social::Addressbook* __pAddressbook;
Tizen::Ui::Controls::TableView* __pList;
bool __isCallSplit;
};
extern const wchar_t* IDS_VIEW_CONTACT;
extern const wchar_t* IDS_INVALID_NUMBER;
extern const wchar_t* IDS_NUMBER_UNKNOWN;
-extern const wchar_t* IDS_GPRS_NUMBER;
+extern const wchar_t* IDS_USSD_NUMBER;
extern const wchar_t* IDS_CONFERENCE_CALL_STRING;
//Panel
extern const wchar_t* PANEL_DIALER;
ERROR_BARRING_PWD_TOO_LONG,
ERROR_FLIGHT_MODE_SET,
ERROR_GENERAL,
- ERROR_GPRS_NUMBER,
+ ERROR_USSD_NUMBER,
};
enum DialerRequestType
<text id="IDS_DATETIME_JAN">Jan</text>
<text id="IDS_SELECTED_ITEM_STRING">%d call log selected</text>
<text id="IDS_NUMBER_UNKNOWN">Unknown</text>
- <text id="IDS_GPRS_NUMBER">GPRS is not supported</text>
+ <text id="IDS_USSD_NUMBER">USSD is not supported</text>
<text id="IDS_END_CALL_STRING">Call Ended</text>
<text id="IDS_SWAP_BTN_NAME">Swap</text>
<text id="IDS_CONF_TITLE_LABEL">Conference Call</text>
This XML file was automatically generated by UiBuilder - do not modify by hand.
-->
<!DOCTYPE Scene SYSTEM "UIForm.dtd">
-<Scene Bversion="2.0.0.201305162056" Dversion="20120315">
+<Scene Bversion="2.0.0.201307011454" Dversion="20120315">
<LogicalCoordinate>720</LogicalCoordinate>
<Form id="IDL_END_CALL_FORM">
<property backgroundColor="#000000" backgroundColorOpacity="100" notificationTrayOpenEnabled="false" orientation="Automatic:4Dir" softKey0NormalIcon="" softKey0PressedIcon="" softKey0Text="" softKey1NormalIcon="" softKey1PressedIcon="" softKey1Text="" title="" titleAlign="ALIGN_CENTER" titleIcon="" translucentFooter="false" translucentHeader="false" translucentIndicator="false"/>
<Label id="IDC_CALLER1_BIGPHOTO_LABEL" parent="IDL_END_CALL_FORM">
<property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
<layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="true" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="500.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_END_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
- <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="660.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="720.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_END_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="0.0"/>
+ <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="720.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="720.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_END_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="560.0" x="0.0" y="0.0"/>
</Label>
<Label id="IDC_BACKGROUND_LABEL" parent="IDL_END_CALL_FORM">
<property accessibilityHint="" backgroundBitmapPath="C01-1_end call_BG_01.png" backgroundColor="#000000" backgroundColorOpacity="50" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
<layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="0.0"/>
- <layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="160.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_END_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="0.0"/>
+ <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="220.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="500.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDL_END_CALL_FORM" topRelationType="RECT_EDGE_RELATION_TOP_TO_TOP" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="0.0"/>
</Label>
<Label id="IDC_CALLER1_LABEL" parent="IDL_END_CALL_FORM">
<property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="58.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
<Label id="IDC_CALL_TIME_LABEL" parent="IDL_END_CALL_FORM">
<property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_RIGHT" leftMargin="16" text="::IDS_END_CALL_STRING" textColor="#FF4800" textSize="30.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
<layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="0.0" marginLeft="0.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="177.0" x="519.0" y="99.0"/>
- <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="16.0" marginLeft="0.0" marginRight="24.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="188.0" x="1068.0" y="98.0"/>
+ <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="" leftRelationType="" marginBottom="16.0" marginLeft="0.0" marginRight="24.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="188.0" x="1068.0" y="158.0"/>
</Label>
<Label id="IDC_NUMBER1_LABEL" parent="IDL_END_CALL_FORM">
<property accessibilityHint="" backgroundBitmapPath="" backgroundColor="#FFFFFF" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="#FFFFFF" textSize="38.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_MIDDLE"/>
<layout bottomRelation="" bottomRelationType="" centerHorizontal="false" centerVertical="false" height="46.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="24.0" marginRight="24.0" marginTop="6.0" mode="Portrait" rightRelation="IDC_CALL_TIME_LABEL" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_LEFT" topRelation="" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="471.0" x="24.0" y="99.0"/>
- <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="16.0" marginLeft="24.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="484.0" x="584.0" y="92.0"/>
+ <layout bottomRelation="IDC_BACKGROUND_LABEL" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="52.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_BACKGROUND_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="16.0" marginLeft="24.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="" rightRelationType="" topRelation="" topRelationType="" verticalFitPolicy="FIT_POLICY_FIXED" width="484.0" x="584.0" y="152.0"/>
</Label>
<Label id="IDC_KEY_BG_LABEL" parent="IDL_END_CALL_FORM">
<property accessibilityHint="" backgroundBitmapPath="" backgroundColor="" backgroundColorOpacity="0" horizontalAlign="ALIGN_LEFT" leftMargin="16" text="" textColor="" textSize="33.0" textStyle="LABEL_TEXT_STYLE_NORMAL" topMargin="0" verticalAlign="ALIGN_TOP"/>
<layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDL_END_CALL_FORM" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_LEFT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Portrait" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_CALLER1_BIGPHOTO_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="0.0" y="720.0"/>
- <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="160.0"/>
+ <layout bottomRelation="IDL_END_CALL_FORM" bottomRelationType="RECT_EDGE_RELATION_BOTTOM_TO_BOTTOM" centerHorizontal="false" centerVertical="false" height="500.0" horizontalFitPolicy="FIT_POLICY_FIXED" leftRelation="IDC_CALLER1_BIGPHOTO_LABEL" leftRelationType="RECT_EDGE_RELATION_LEFT_TO_RIGHT" marginBottom="0.0" marginLeft="0.0" marginRight="0.0" marginTop="0.0" mode="Landscape" rightRelation="IDL_END_CALL_FORM" rightRelationType="RECT_EDGE_RELATION_RIGHT_TO_RIGHT" topRelation="IDC_BACKGROUND_LABEL" topRelationType="RECT_EDGE_RELATION_TOP_TO_BOTTOM" verticalFitPolicy="FIT_POLICY_FIXED" width="720.0" x="560.0" y="220.0"/>
</Label>
</Scene>
}
delete pKey;
//Check if its a valid number
- if(CheckNumberIsValid(phoneNumber) == false)
+ /* if(CheckNumberIsValid(phoneNumber) == false)
{
//go back to previous scene if App was already running, else exit application.
if(__initialSceneId.IsEmpty() == true)
//and show current screen, if any calls is present.
return;
}
- }
+ }*/
//call type
pKey = new (std::nothrow) String(PARAM_CALL_TYPE);
if(pArgsMap->ContainsKey(*pKey) == true)
__pConfCallInfo = null;
__pConfCallTimer = null;
__isCallSplit = false;
+ __pAddressbook = null;
}
ConfCallerListForm::~ConfCallerListForm(void)
__pConfCallInfo = __pCallPresentor->GetConferenceCallInfoN();
AppLogDebug("Enter %x",__pConfCallInfo);
+ AddressbookManager* pAddressbookManager = AddressbookManager::GetInstance();
+ __pAddressbook = pAddressbookManager->GetAddressbookN(DEFAULT_ADDRESSBOOK_ID);
+ if(__pAddressbook != null)
+ {
+ __pAddressbook->SetAddressbookChangeEventListener(this);
+ }
+
//show active call timer
ShowTimerInfo(IDC_CALL_TIME_LABEL, __pConfCallInfo->GetCallConnectTime());
delete __pConfCallTimer;
__pConfCallTimer = null;
}
+ if(__pAddressbook != null)
+ {
+ __pAddressbook->SetAddressbookChangeEventListener(null);
+ }
}
result
}
void
+ConfCallerListForm::OnContactsChanged(const Tizen::Base::Collection::IList& contactChangeInfoList)
+{
+ __pList->UpdateTableView();
+}
+
+void
+ConfCallerListForm::OnCategoriesChanged(const Tizen::Base::Collection::IList& categoryChangeInfoList)
+{
+ //No implementation
+}
+
+void
ConfCallerListForm::CreateItemAndAddActionListener( Button& splitButton,
Button& endButton, Label& callerLabel, SplitConfCallerCmdIds splitCmdId,
EndConfCallerCmdIds EndCmdId, const String& displayName)
pContactNo.Append(AppUtility::GetResourceString(IDS_NUMBER_UNKNOWN));
}
//fetch contact details based on phone number
- String* pDisplayName = callInfo.FetchCallerNameN();
+ String* pDisplayName = callInfo.FetchLatestCallerNameN(pContactNo);
if(pDisplayName != null)
{
}
break;
- case ERROR_GPRS_NUMBER:
+ case ERROR_USSD_NUMBER:
{
- msg.Append(AppUtility::GetResourceString(IDS_GPRS_NUMBER));
+ msg.Append(AppUtility::GetResourceString(IDS_USSD_NUMBER));
}
break;
numberEndsWithHash = IfNumberEndsWithHash(contactNumber);
if(numberEndsWithHash == true)
{
- __pTelEventListener->HandleTelephonyError(ERROR_GPRS_NUMBER);
+ __pTelEventListener->HandleTelephonyError(ERROR_USSD_NUMBER);
return ;
}
using namespace Tizen::System;
using namespace Tizen::Base::Collection;
using namespace Tizen::Telephony;
+using namespace Tizen::Base::Utility;
const char* callEventList[] = {
TAPI_NOTI_VOICE_CALL_STATUS_IDLE,
{
r = E_FAILURE;
}
+
+ //Pattern to compare all characters except 0-9 * # P ; , +
+ String phoneNumberPattern(L"[^0-9*#P,p+;]");
+ RegularExpression checkPhoneNumber;
+ checkPhoneNumber.Construct(phoneNumberPattern);
+ //If there is any character other than these listed above then display invalid number
+ bool resultMatch = checkPhoneNumber.Match(contactNumber,false);
+ //return false for patterns other than 0-9 * # P ; , +
+ if(resultMatch == true)
+ {
+ //return phone number is invalid
+ r = E_FAILURE;
+ }
//TODO: check if valid phone number else return error message
return r;
}
const wchar_t* IDS_VIEW_CONTACT = L"IDS_VIEW_CONTACT";
const wchar_t* IDS_INVALID_NUMBER = L"IDS_INVALID_NUMBER";
const wchar_t* IDS_NUMBER_UNKNOWN = L"IDS_NUMBER_UNKNOWN";
-const wchar_t* IDS_GPRS_NUMBER = L"IDS_GPRS_NUMBER";
+const wchar_t* IDS_USSD_NUMBER = L"IDS_USSD_NUMBER";
const wchar_t* IDS_CONFERENCE_CALL_STRING = L"IDS_CONFERENCE_CALL_STRING";
//Panel
const wchar_t* PANEL_DIALER = L"PanelDialer";