Synchronized tizen_2.1 branch with master
[platform/framework/native/telephony.git] / inc / FTelCallInfo.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17 /**
18  * @file    FTelCallInfo.h
19  * @brief   This is the header file for the %CallInfo class.
20  *
21  * This header file contains the declarations of the %CallInfo class.
22  */
23 #ifndef _FTEL_CALL_INFO_H_
24 #define _FTEL_CALL_INFO_H_
25
26 #include <FBase.h>
27 #include <FTelTypes.h>
28
29 namespace Tizen { namespace Telephony
30 {
31 class _CallInfoImpl;
32
33 /**
34  * @class   CallInfo
35  * @brief   This class provides methods to obtain detailed information about a call.
36  *
37  * @since   2.0
38  *
39  * The %CallInfo class provides methods to obtain detailed call information, such as the call type and number.
40  */
41 class _OSP_EXPORT_ CallInfo
42         : public Tizen::Base::Object
43 {
44 public:
45         /**
46      * This is the default constructor for this class.
47      *
48      * @since   2.0
49      */
50         CallInfo(void);
51
52         /**
53      * Copying of objects using this copy constructor is allowed.
54      *
55      * @since   2.0
56      *
57      * @param[in] rhs The call information
58      */
59         CallInfo(const CallInfo& rhs);
60
61         /**
62      * This destructor overrides Tizen::Base::Object::~Object().         
63      *
64      * @since   2.0
65      */
66         virtual ~CallInfo(void);
67
68         /**
69      * Gets the call type of a call.
70      *
71      * @since   2.0
72      *
73      * @return  The current call type
74      */
75         CallType GetCallType(void) const;
76
77         /**
78      * Gets the correspondent's phone number.
79      *
80      * @since   2.0
81          *
82      * @return  The phone number
83      * @remarks This information is valid only for an incoming event.
84      */
85         Tizen::Base::String GetNumber(void) const;
86
87         /**
88     * Checks whether the specified instance of %CallInfo equals the current instance.
89     *
90     * @since    2.0
91         *
92     * @return   @c true if the specified instance equals the current instance, @n
93     *           else @c false
94     * @param[in]    obj An instance of %CallInfo
95     * @remarks The method returns @c false if the specified object is not %CallInfo.
96     */
97         virtual bool Equals(const Tizen::Base::Object& obj) const;
98
99         /**
100      * Gets the hash value of the current instance.
101      *
102      * @since   2.0
103      *
104      * @return  The hash value of the current instance
105      */
106         virtual int GetHashCode(void) const;
107
108         /**
109      * Copying of objects using this copy assignment operator is allowed.        
110      *
111      * @since 2.0
112      *
113      * @return  The reference of this instance
114      * @param[in]   rhs   An instance of %CallInfo to copy
115      */
116         CallInfo& operator=(const CallInfo& rhs);
117
118 private:
119         /**
120      * This constructor is intentionally declared as private so that only the platform can create an instance.
121      *
122      * @param[in]   type   The call type
123      * @param[in]   number The phone number @n
124      */
125         CallInfo(CallType type, const Tizen::Base::String& number);
126
127 private:
128         _CallInfoImpl* __pCallInfoImpl;
129
130         friend class _CallInfoImpl;
131 }; // CallInfo
132
133 } } // Tizen::Telephony
134 #endif // _FTEL_CALL_INFO_H_