phonesrv_plat/call_information_api/inc/xqcallinfo.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     1 /*!
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Provides information about ongoing calls.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef XQCALLINFO_H
       
    19 #define XQCALLINFO_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <QString>
       
    23 #include <ccpdefs.h>
       
    24 
       
    25 
       
    26 // forward declarations 
       
    27 class XQCallInfoImpl;
       
    28 
       
    29 /*!
       
    30     CallInfo
       
    31     Holds calls information.
       
    32 */
       
    33 NONSHARABLE_CLASS( CallInfo )
       
    34     {
       
    35 public:
       
    36     int callIndex() const { return  m_Index; }
       
    37     CCPCall::TCallType callType() const { return  m_Type; }
       
    38     CCPCall::TCallState callState() const { return  m_State; }
       
    39     unsigned int serviceId() const { return  m_ServiceId; }
       
    40     CCPCall::TCallDirection callDirection() const { return  m_Direction; }
       
    41     
       
    42     CCPCall::TCallState m_State;
       
    43     CCPCall::TCallType  m_Type;
       
    44     CCPCall::TCallDirection  m_Direction;
       
    45     int  m_Index;
       
    46     unsigned int  m_ServiceId;
       
    47     };
       
    48 
       
    49 
       
    50 #ifdef BUILD_XQCALLINFO
       
    51 #define XQCALLINFO_EXPORT Q_DECL_EXPORT
       
    52 #else
       
    53 #define XQCALLINFO_EXPORT Q_DECL_IMPORT
       
    54 #endif
       
    55 /*!
       
    56     XQCallInfo
       
    57     Class to be used for receiving information about ongoing calls. 
       
    58 
       
    59     @code
       
    60     XQCallInfo *callInfo = XQCallInfo::create(); 
       
    61     @endcode
       
    62     
       
    63 */
       
    64 class XQCALLINFO_EXPORT XQCallInfo: public QObject
       
    65 {
       
    66     Q_OBJECT
       
    67     
       
    68 public:
       
    69     
       
    70     /*!
       
    71         \fn XQCallInfo *create
       
    72         
       
    73         Creates XQCallInfo instance.
       
    74     */
       
    75     static XQCallInfo *create();
       
    76     
       
    77     /*!
       
    78         \fn void getCallsL(QList<CallInfo> &calls)
       
    79         
       
    80         Gets the snapshot of ongoing calls.
       
    81     */
       
    82     virtual void getCalls(QList<CallInfo> &calls) = 0;
       
    83     
       
    84     /*!
       
    85         \fn bool isCallInState( CCPCall::TCallState state ) const
       
    86         
       
    87         Returns information whether call in given state exist.
       
    88     */
       
    89     virtual bool isCallInState(CCPCall::TCallState state) const = 0;
       
    90 
       
    91 signals:
       
    92     
       
    93     /*!
       
    94         \fn void CallInformationChanged()
       
    95         
       
    96         Signals that there are changes in ongoing calls. Client should fetch 
       
    97         the call infomations after receiving the notification.
       
    98     */
       
    99     void callInformationChanged();
       
   100     
       
   101 protected:
       
   102     
       
   103     /*!
       
   104         \fn void sendSignal()
       
   105         
       
   106         Sends signal call info changed signal to client's.
       
   107     */
       
   108     void sendCallInfoChangedSignal();
       
   109     
       
   110     /*!
       
   111        Constructor
       
   112     */
       
   113     XQCallInfo();
       
   114 };
       
   115 
       
   116 #endif // XQCALLINFO_H