2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.0 (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 "CallTypes.h"
32 * @brief This class holds information about currently active Single party,
33 * mutli-party or conference calls.
37 : public Tizen::Base::Object
43 VIDEO_CALL, // Currently not supported
47 // Default Constructor.
49 virtual ~AppCallInfo(void);
51 //returns if a call is conference call or not
52 bool IsConferenceCall(void);
53 //Sets the conferenceflag for a call
54 void SetConference(bool isConferenceCall);
55 //returns if a call is emergency call or not
56 bool IsEmergency(void);
57 //Sets if a call is emergency call
58 void SetEmergency(bool isEmergency);
60 Tizen::Base::Long* GetCallHandle(void);
62 void SetCallHandle(unsigned int handle);
63 //Get for Contact Number for the call
64 Tizen::Base::String& GetContactNumber(void);
65 //Set the contact number for the call
66 void SetContactNumber(Tizen::Base::String& contactNumber);
67 //Sets the contact info for the call
68 void SetContactInfo(const Tizen::Social::Contact& contact);
69 //returns contact info if present in contacts db
70 const Tizen::Social::Contact* GetContactInfo(void);
71 //returns if a call is held call or not
73 //Sets the held call for the call
74 void SetOnHold(bool onHold);
75 //get the connected time for the call
76 long long GetCallConnectTime(void);
77 //Sets the connected time when call started
78 void SetCallConnectTime(long long connectTime);
79 //get the notified / dialed time when call started
80 long long GetCallNotificationTime(void);
81 //Sets the notified / dialed time when call started
82 void SetCallNotificationTime(long long callNotificationTime);
83 //gets the end call cause
84 Tizen::Base::String& GetEndCallCause(void);
85 //Sets the end call cause
86 void SetEndCallCause(Tizen::Base::String& pEndCause);
87 //gets the caller list for a conference call
88 Tizen::Base::Collection::IListT<AppCallInfo>* GetCallerList(void);
89 //Adds a call to conference call list
90 result AddCallToCallerList(AppCallInfo& callInfo);
91 //removes a call from the conference call list
92 result RemoveCallFromCallerList(int index);
93 //returns the number of calls in conference
94 int GetCallerListCount(void);
95 //sets the type of the call for the logs application
96 void SetCalllogType(CallLogType callLogType);
97 //returns the type of the call log
98 CallLogType GetCalllogType(void);
100 * This is the equality operator for this CallInfo.
101 * returns true, if both have same value for call handle.
103 * @param[in] rhs A reference to the %CallInfo instance
105 bool operator ==(const AppCallInfo& rhs) const;
108 * This is the InEquality operator for this CallInfo.
109 * returns true, if value for call handle is different.
111 * @param[in] rhs A reference to the %CallInfo instance
113 bool operator !=(const AppCallInfo& rhs) const;
116 * This is the assignment operator for this class.
117 * @param[in] rhs A reference to the %CallInfo instance
119 AppCallInfo& operator =(const AppCallInfo& rhs);
121 // this funtion fetches the contact person's name.
122 Tizen::Base::String* FetchCallerNameN(void);
123 // this funtion fetches the contact person's photo id, if present.
124 Tizen::Graphics::Bitmap* FetchCallerPhotoN(void);
130 ///Calllog type information like outgoing, incoming, missed call
131 CallLogType __calllogType;
133 //To uniquely identify both Single / Conf. Call.
134 Tizen::Base::Long* __pCallHandle;
138 //applicable only for Single Call
139 Tizen::Base::String __contactNumber;
144 //system time when call connected
145 long long __callConnectTime;
147 //system time when the call was notified / dialed
148 long long __callNotificationTime;
151 Tizen::Base::String* __pEndCallCause;
153 //callHandles for individual callers in conf. calls
154 Tizen::Base::Collection::ArrayListT<AppCallInfo>* __pParticipantCallHandles;
156 //used to store previously fetched contact.
157 Tizen::Social::Contact* __pContact;
160 #endif // _PHN_CALL_INFO_H_