2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an AS IS BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file PhnCallLogPresentationModel.h
19 * @brief This is the header file for the %CalLogPresentationModel class.
21 * This header file contains the declarations for %CalLogPresentationModel class.
24 #ifndef PHNLOGPRESENTATIONMODEL_H_
25 #define PHNLOGPRESENTATIONMODEL_H_
28 #include <FTelephony.h>
29 #include "PhnCalllogManager.h"
30 #include "PhnICalllogChangeListener.h"
35 class CalLogPresentationModel: public Tizen::App::IAppControlResponseListener
38 //create a singleton instance
39 static CalLogPresentationModel* GetInstance(void);
41 void AddCalllogChangeListener(ICalllogChangeListener& listner);
42 void DeleteCalllogByDbId(int dbId);
43 void DeleteItemAtGroupIndex(int groupIndex, int itemIndex);
\r
44 void RemoveCalllogChangeListner(ICalllogChangeListener& listner);
45 void ResetAndNotifyCalllogData(void);
46 int GetAllCallLogCount(void);
\r
47 int GetCallLogsViewedCount(void);
\r
48 Tizen::Base::Collection::ArrayListT<CallLogDetails>* GetCallogListByNumberFromDatabaseN(char* pNumber);
49 int GetCalllogCountByNumber(void);
50 void GetCalllogContactName(Tizen::Base::String number, Tizen::Base::String& name);
51 Tizen::Base::Collection::IListT<CallLogDetails>* GetCalllogListByNumValues(void);
52 //result GetCallLogItemAtIndex(int index, CallLogDetails* calllogInfo);
\r
53 //Used to make an outgoing call
54 ErrorCodes DialCall(const Tizen::Base::String& contactNumber);
55 result LaunchAddContactsAppControl(Tizen::Base::String& contactNumber);
56 //Called when the application control is completed.
57 virtual void OnAppControlCompleteResponseReceived(const Tizen::App::AppId& appId, const Tizen::Base::String& operationId, Tizen::App::AppCtrlResult appControlResult, const Tizen::Base::Collection::IMap* pExtraData);
60 void SetMissedCallSeenStatus(CallLogDetails* pDetails);
61 void UpdateCallLogList(void);
62 int GetUnknownLogCount(int dbId);
63 Tizen::Base::Collection::ArrayList* GetCallLogGroups(void);
65 //API to check if the database is updated
66 bool IsDataUpdated(void);
\r
68 static void setCallLogViewbyID(CallLogType id);
\r
69 static int getCallLogViewbyID();
\r
71 CalLogPresentationModel();
72 virtual ~CalLogPresentationModel();
74 result Construct(void);
75 static void CreateInstance(void);
76 static void DestroyInstance(void);
77 //used to make an outgoing call request using call appcontrol
78 result LaunchCallAppControl(const Tizen::Base::String& contactNumber);
80 result GetSimInfo(void);
81 bool IsSimAvailable(void);
84 static CalLogPresentationModel* __pInstance;
85 CallLogManager* __pCallMgr;
86 //used to check if call AppControl is already running
87 bool __isCallAppControlRunning;
91 #endif /* PHNLOGPRESENTATIONMODEL_H_ */