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 //get the notified / dialed time when call started
83 long long GetCallNotificationTime(void);
84 //Sets the notified / dialed time when call started
85 void SetCallNotificationTime(long long callNotificationTime);
86 //gets the end call cause
87 Tizen::Base::String& GetEndCallCause(void);
88 //Sets the end call cause
89 void SetEndCallCause(Tizen::Base::String& pEndCause);
90 //gets the caller list for a conference call
91 Tizen::Base::Collection::IListT<AppCallInfo>* GetCallerList(void);
92 //Adds a call to conference call list
93 result AddCallToCallerList(AppCallInfo& callInfo);
94 //removes a call from the conference call list
95 result RemoveCallFromCallerList(int index);
96 //returns the number of calls in conference
97 int GetCallerListCount(void);
98 //sets the type of the call for the logs application
99 void SetCalllogType(CallLogType callLogType);
100 //returns the type of the call log
101 CallLogType GetCalllogType(void);
103 * This is the equality operator for this CallInfo.
104 * returns true, if both have same value for call handle.
106 * @param[in] rhs A reference to the %CallInfo instance
108 bool operator ==(const AppCallInfo& rhs) const;
111 * This is the InEquality operator for this CallInfo.
112 * returns true, if value for call handle is different.
114 * @param[in] rhs A reference to the %CallInfo instance
116 bool operator !=(const AppCallInfo& rhs) const;
119 * This is the assignment operator for this class.
120 * @param[in] rhs A reference to the %CallInfo instance
122 AppCallInfo& operator =(const AppCallInfo& rhs);
124 // this funtion fetches the contact person's name.
125 Tizen::Base::String* FetchCallerNameN(void);
126 //Returns the latest Caller Name for a Number from address book
127 Tizen::Base::String* FetchLatestCallerNameN(const Tizen::Base::String& phoneNumber);
128 // this funtion fetches the contact person's photo id, if present.
129 Tizen::Graphics::Bitmap* FetchCallerPhotoN(void);
130 //Returns the latest Caller Photo for a Number from address book
131 Tizen::Graphics::Bitmap* FetchLatestCallerPhotoN(const Tizen::Base::String& phoneNumber);
132 //Returns the Contact Matched for the PhoneNumber from address book
133 Tizen::Social::Contact* FetchContactN(const Tizen::Base::String& phoneNumber);
141 ///Calllog type information like outgoing, incoming, missed call
142 CallLogType __calllogType;
144 //To uniquely identify both Single / Conf. Call.
145 Tizen::Base::Long* __pCallHandle;
149 //applicable only for Single Call
150 Tizen::Base::String __contactNumber;
155 //system time when call connected
156 long long __callConnectTime;
158 //system time when the call was notified / dialed
159 long long __callNotificationTime;
162 Tizen::Base::String* __pEndCallCause;
164 //callHandles for individual callers in conf. calls
165 Tizen::Base::Collection::ArrayListT<AppCallInfo>* __pParticipantCallHandles;
167 //used to store previously fetched contact.
168 Tizen::Social::Contact* __pContact;
169 // having the address book here
170 Tizen::Social::Addressbook* __pAddressBook;
173 #endif // _PHN_CALL_INFO_H_