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.
19 * @brief This is the header file for the %CallInfo class.
21 * This header file contains the declarations for %CallInfo class.
23 #ifndef _PHN_CALL_INFO_H_
24 #define _PHN_CALL_INFO_H_
28 #include <FSclTypes.h>
29 #include "CallTypes.h"
33 * @brief This class holds information about currently active Single party,
34 * mutli-party or conference calls.
38 : public Tizen::Base::Object
44 VIDEO_CALL, // Currently not supported
48 // Default Constructor.
50 virtual ~AppCallInfo(void);
52 //returns if a call is conference call or not
53 bool IsConferenceCall(void);
54 //Sets the conferenceflag for a call
55 void SetConference(bool isConferenceCall);
56 //returns if a call is emergency call or not
57 bool IsEmergency(void);
58 //Sets if a call is emergency call
59 void SetEmergency(bool isEmergency);
61 Tizen::Base::Long* GetCallHandle(void);
63 void SetCallHandle(unsigned int handle);
64 //Get for Contact Number for the call
65 Tizen::Base::String& GetContactNumber(void);
66 //Set the contact number for the call
67 void SetContactNumber(Tizen::Base::String& contactNumber);
68 void ResetContactNumber(Tizen::Base::String* contactNumber);
69 void ResetContactInfo(const Tizen::Social::Contact* contact);
70 //Sets the contact info for the call
71 void SetContactInfo(const Tizen::Social::Contact& contact);
72 //returns contact info if present in contacts db
73 const Tizen::Social::Contact* GetContactInfo(void);
74 //returns if a call is held call or not
76 //Sets the held call for the call
77 void SetOnHold(bool onHold);
78 //get the connected time for the call
79 long long GetCallConnectTime(void);
80 //Sets the connected time when call started
81 void SetCallConnectTime(long long connectTime);
82 //Set the duration time wrt to call app time
83 void SetDurationTime(long long durationTime);
84 //get the notified / dialed time when call started
85 long long GetCallNotificationTime(void);
86 //Gets the duration wrt to callapp time
87 long long GetDurationTime(void);
88 //Sets the notified / dialed time when call started
89 void SetCallNotificationTime(long long callNotificationTime);
90 //gets the end call cause
91 Tizen::Base::String& GetEndCallCause(void);
92 //Sets the end call cause
93 void SetEndCallCause(Tizen::Base::String& pEndCause);
94 //gets the caller list for a conference call
95 Tizen::Base::Collection::IListT<AppCallInfo>* GetCallerList(void);
96 //Adds a call to conference call list
97 result AddCallToCallerList(AppCallInfo& callInfo);
98 //removes a call from the conference call list
99 result RemoveCallFromCallerList(int index);
100 //returns the number of calls in conference
101 int GetCallerListCount(void);
102 //sets the type of the call for the logs application
103 void SetCalllogType(CallLogType callLogType);
104 //returns the type of the call log
105 CallLogType GetCalllogType(void);
107 * This is the equality operator for this CallInfo.
108 * returns true, if both have same value for call handle.
110 * @param[in] rhs A reference to the %CallInfo instance
112 bool operator ==(const AppCallInfo& rhs) const;
115 * This is the InEquality operator for this CallInfo.
116 * returns true, if value for call handle is different.
118 * @param[in] rhs A reference to the %CallInfo instance
120 bool operator !=(const AppCallInfo& rhs) const;
123 * This is the assignment operator for this class.
124 * @param[in] rhs A reference to the %CallInfo instance
126 AppCallInfo& operator =(const AppCallInfo& rhs);
128 // this funtion fetches the contact person's name.
129 Tizen::Base::String* FetchCallerNameN(void);
130 //Returns the latest Caller Name for a Number from address book
131 Tizen::Base::String* FetchLatestCallerNameN(const Tizen::Base::String& phoneNumber);
132 // this funtion fetches the contact person's photo id, if present.
133 Tizen::Graphics::Bitmap* FetchCallerPhotoN(void);
134 //Returns the latest Caller Photo for a Number from address book
135 Tizen::Graphics::Bitmap* FetchLatestCallerPhotoN(const Tizen::Base::String& phoneNumber);
136 //Returns the Contact Matched for the PhoneNumber from address book
137 Tizen::Social::Contact* FetchContactN(const Tizen::Base::String& phoneNumber);
145 ///Calllog type information like outgoing, incoming, missed call
146 CallLogType __calllogType;
148 //To uniquely identify both Single / Conf. Call.
149 Tizen::Base::Long* __pCallHandle;
153 //applicable only for Single Call
154 Tizen::Base::String __contactNumber;
159 //system time when call connected
160 long long __callConnectTime;
162 long long __durationTime;
164 //system time when the call was notified / dialed
165 long long __callNotificationTime;
168 Tizen::Base::String* __pEndCallCause;
170 //callHandles for individual callers in conf. calls
171 Tizen::Base::Collection::ArrayListT<AppCallInfo>* __pParticipantCallHandles;
173 //used to store previously fetched contact.
174 Tizen::Social::Contact* __pContact;
175 // having the address book here
176 Tizen::Social::Addressbook* __pAddressBook;
179 #endif // _PHN_CALL_INFO_H_