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_
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 ~CallInfo(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 if a call is held call or not
71 //Sets the held call for the call
72 void SetOnHold(bool onHold);
73 //get the connected time for the call
74 long long GetCallConnectTime(void);
75 //Sets the connected time when call started
76 void SetCallConnectTime(long long connectTime);
77 //get the notified / dialed time when call started
78 long long GetCallNotificationTime(void);
79 //Sets the notified / dialed time when call started
80 void SetCallNotificationTime(long long callNotificationTime);
81 //gets the end call cause
82 Tizen::Base::String& GetEndCallCause(void);
83 //Sets the end call cause
84 void SetEndCallCause(Tizen::Base::String& pEndCause);
85 //gets the caller list for a conference call
86 Tizen::Base::Collection::IListT<CallInfo>* GetCallerList(void);
87 //Adds a call to conference call list
88 result AddCallToCallerList(CallInfo& callInfo);
89 //removes a call from the conference call list
90 result RemoveCallFromCallerList(int index);
91 //returns the number of calls in conference
92 int GetCallerListCount(void);
93 //sets the type of the call for the logs application
94 void SetCalllogType(CallLogType callLogType);
95 //returns the type of the call log
96 CallLogType GetCalllogType(void);
98 * This is the equality operator for this CallInfo.
99 * returns true, if both have same value for call handle.
101 * @param[in] rhs A reference to the %CallInfo instance
103 bool operator ==(const CallInfo& rhs) const;
106 * This is the InEquality operator for this CallInfo.
107 * returns true, if value for call handle is different.
109 * @param[in] rhs A reference to the %CallInfo instance
111 bool operator !=(const CallInfo& rhs) const;
114 * This is the assignment operator for this class.
115 * @param[in] rhs A reference to the %CallInfo instance
117 CallInfo& operator =(const CallInfo& rhs);
119 // this funtion fetches the contact person's name.
120 Tizen::Base::String* FetchCallerNameN(void);
121 // this funtion fetches the contact person's photo id, if present.
122 Tizen::Graphics::Bitmap* FetchCallerPhotoN(void);
123 //returns true if number is present in contacts
124 bool IsNumberPresent(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<CallInfo>* __pParticipantCallHandles;
156 //used to store previously fetched contact.
157 Tizen::Social::Contact* __pContact;
160 #endif // _PHN_CALL_INFO_H_