phonesrv_plat/phone_settings_api/inc/psetcallwaitingwrapper.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:
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef PSETCALLWAITINGWRAPPER_H_
       
    19 #define PSETCALLWAITINGWRAPPER_H_
       
    20 
       
    21 #include <QObject>
       
    22 #include <psetwrappertypes.h>
       
    23 
       
    24 // Forward declarations 
       
    25 class CPsetContainer;
       
    26 class CPsetCallWaiting;
       
    27 class PSetCallWaitingWrapperPrivate;
       
    28 
       
    29 #ifdef BUILD_PSETWRAPPER
       
    30 #define PSETWRAPPER_EXPORT Q_DECL_EXPORT
       
    31 #else
       
    32 #define PSETWRAPPER_EXPORT Q_DECL_IMPORT
       
    33 #endif
       
    34 
       
    35 class PSETWRAPPER_EXPORT PSetCallWaitingWrapper: 
       
    36     public QObject
       
    37 {
       
    38     Q_OBJECT
       
    39 
       
    40 public:
       
    41     
       
    42     explicit PSetCallWaitingWrapper( CPsetContainer &psetContainer, 
       
    43             QObject *parent = NULL);
       
    44     
       
    45     ~PSetCallWaitingWrapper();
       
    46 
       
    47 
       
    48     // Call waiting status
       
    49     enum PsCallWaitingStatus
       
    50     {
       
    51         StatusActive,
       
    52         StatusDisabled,
       
    53         StatusNotAvailable,
       
    54         StatusNotProvisioned,
       
    55         StatusUnknown
       
    56     };
       
    57 
       
    58     // Call waiting action
       
    59     enum PsCallWaitingCommand
       
    60     {
       
    61         ActivateCallWaiting,
       
    62         DeactivateCallWaiting,
       
    63         CheckCallWaitingStatus
       
    64     };
       
    65     
       
    66 public: // Functions (adaptees):  
       
    67 
       
    68     /**
       
    69     * Sets call waiting to the network.
       
    70     *
       
    71     * @param aSetting New settings for the Call Waiting.
       
    72     * @param aBsc Basic service group concerned.
       
    73     */
       
    74     void setCallWaiting( PsCallWaitingCommand aSetting,
       
    75             int aBasicServiceGroup );
       
    76 
       
    77     /**
       
    78     * Checks the call waiting status from network.
       
    79     */
       
    80     void getCallWaitingStatus();
       
    81 
       
    82     /**
       
    83     * Cancels the call waiting-request process.
       
    84     */
       
    85     void cancelProcess();
       
    86     
       
    87     /**
       
    88     * Get CPsetCallwaiting reference.
       
    89     */
       
    90     CPsetCallWaiting &  getCPsetCallWaiting() const;
       
    91 
       
    92 signals: // Notify via signals     
       
    93 
       
    94     void handleCallWaitingGetStatus( 
       
    95         PSetCallWaitingWrapper::PsCallWaitingStatus aStatus,
       
    96         const QList<unsigned char> &basicServiceGroupIds);
       
    97     
       
    98     void handleCallWaitingChanged( 
       
    99         PSetCallWaitingWrapper::PsCallWaitingCommand aSetting,
       
   100         int aResult );
       
   101     
       
   102     void handleCallWaitingRequesting( bool ongoing, bool interrupted ); 
       
   103 
       
   104     void handleCallWaitingError( int aError );
       
   105 
       
   106 private: // Data: 
       
   107     
       
   108     // Phone setting handlers, own
       
   109     CPsetCallWaiting *m_psetCallWaiting;
       
   110     
       
   111     // Own
       
   112     QScopedPointer<PSetCallWaitingWrapperPrivate> m_privateImpl;
       
   113     friend class PSetCallWaitingWrapperPrivate;
       
   114 };
       
   115 
       
   116 
       
   117 #endif /* PSETCALLWAITINGWRAPPER_H_ */