efd3734967c978ac8fb208386effb1f5c18dd856
[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      * @see Tizen::Telephony::CallType
75      */
76         CallType GetCallType(void) const;
77
78         /**
79      * Gets the correspondent's phone number.
80      *
81      * @since   2.0
82          *
83      * @return  The phone number
84      * @remarks This information is valid only for an incoming event.
85      */
86         Tizen::Base::String GetNumber(void) const;
87
88         /**
89     * Checks whether the specified instance of %CallInfo equals the current instance.
90     *
91     * @since    2.0
92         *
93     * @return   @c true if the specified instance equals the current instance, @n
94     *           else @c false
95     * @param[in]    obj An instance of %CallInfo
96     * @remarks The method returns @c false if the specified object is not %CallInfo.
97     */
98         virtual bool Equals(const Tizen::Base::Object& obj) const;
99
100         /**
101      * Gets the hash value of the current instance.
102      *
103      * @since   2.0
104      *
105      * @return  The hash value of the current instance
106      */
107         virtual int GetHashCode(void) const;
108
109         /**
110      * Copying of objects using this copy assignment operator is allowed.        
111      *
112      * @since 2.0
113      *
114      * @return  The reference of this instance
115      * @param[in]   rhs   An instance of %CallInfo to copy
116      */
117         CallInfo& operator=(const CallInfo& rhs);
118
119 private:
120         /**
121      * This constructor is intentionally declared as private so that only the platform can create an instance.
122      *
123      * @param[in]   type   The call type
124      * @param[in]   number The phone number @n
125      */
126         CallInfo(CallType type, const Tizen::Base::String& number);
127
128 private:
129         _CallInfoImpl* __pCallInfoImpl;
130
131         friend class _CallInfoImpl;
132 }; // CallInfo
133
134 } } // Tizen::Telephony
135 #endif // _FTEL_CALL_INFO_H_