phonesrv_plat/phone_settings_api/inc/psetcallbarringwrapper.h
branchRCL_3
changeset 19 7d48bed6ce0c
equal deleted inserted replaced
18:594d59766373 19:7d48bed6ce0c
       
     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 PSETCALLBARRINGGWRAPPER_H
       
    19 #define PSETCALLBARRINGGWRAPPER_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <psetwrappertypes.h>
       
    23 
       
    24 // Forward declarations 
       
    25 class CPsetContainer;
       
    26 class PSetCallBarringWrapperPrivate;
       
    27 
       
    28 #ifdef BUILD_PSETWRAPPER
       
    29 #define PSETWRAPPER_EXPORT Q_DECL_EXPORT
       
    30 #else
       
    31 #define PSETWRAPPER_EXPORT Q_DECL_IMPORT
       
    32 #endif
       
    33 
       
    34 class PSETWRAPPER_EXPORT PSetCallBarringWrapper : public QObject
       
    35 {
       
    36     Q_OBJECT
       
    37 
       
    38 public:
       
    39     
       
    40     /** barring types */
       
    41     enum BarringType
       
    42         {
       
    43         BarringTypeAllBarrings                              = 0x0001,
       
    44         BarringTypeAllOutgoing                              = 0x0002,
       
    45         BarringTypeOutgoingInternational                    = 0x0004,
       
    46         BarringTypeOutgoingInternationalExceptToHomeCountry = 0x0008,
       
    47         BarringTypeAllIncoming                              = 0x0010,
       
    48         BarringTypeIncomingWhenRoaming                      = 0x0020,
       
    49         BarringTypeAllServices,
       
    50         BarringTypeAllOutgoingServices,
       
    51         BarringTypeAllIncomingServices
       
    52         };
       
    53     
       
    54     /** barring status */
       
    55     enum BarringStatus
       
    56         {
       
    57         BarringStatusUnknown,
       
    58         BarringStatusActive,
       
    59         BarringStatusInactive,
       
    60         BarringStatusNotProvisioned,
       
    61         BarringStatusUnavailable
       
    62         };
       
    63     
       
    64     /** barring error */
       
    65     enum BarringError
       
    66     {
       
    67         BarringErrorNone
       
    68     };
       
    69     
       
    70 public:
       
    71     
       
    72     explicit PSetCallBarringWrapper( 
       
    73         CPsetContainer &psetContainer, 
       
    74         QObject *parent = NULL);
       
    75     
       
    76     ~PSetCallBarringWrapper();
       
    77     
       
    78     /**
       
    79      * Checks the barring status from network. Result is signaled with 
       
    80      * barringStatusRequestCompleted.
       
    81      * 
       
    82      * @param   serviceGroup  Service group concerned.
       
    83      * @param   barringType   Barring type.
       
    84      */
       
    85     void barringStatus(
       
    86         PsServiceGroup serviceGroup, 
       
    87         BarringType barringType);
       
    88 
       
    89     /**
       
    90      * Enables specified barring. Result is signaled with 
       
    91      * enableBarringRequestCompleted.
       
    92      * 
       
    93      * @param   serviceGroup    Service group concerned.
       
    94      * @param   barringType     Barring type.
       
    95      * @param   barringPassword Barring password.
       
    96      */
       
    97     void enableBarring(
       
    98         PsServiceGroup serviceGroup,
       
    99         BarringType barringType,
       
   100         QString barringPassword);
       
   101     
       
   102     /**
       
   103      * Disables specified barring. Result is signaled with 
       
   104      * disableBarringRequestCompleted.
       
   105      * 
       
   106      * @param   serviceGroup    Service group concerned.
       
   107      * @param   barringType     Barring type.
       
   108      * @param   barringPassword Barring password.
       
   109      */
       
   110     void disableBarring(
       
   111         PsServiceGroup serviceGroup,
       
   112         BarringType barringType,
       
   113         QString barringPassword);
       
   114     
       
   115     /**
       
   116      * Changes barring password. Maximum password length is 10.
       
   117      * 
       
   118      * @param   oldPassword         Old barring password.
       
   119      * @param   newPassword         New barring password.
       
   120      * @param   verifiedPassword    New password verified.
       
   121      */
       
   122     void changeBarringPassword(
       
   123         const QString &oldPassword, 
       
   124         const QString &newPassword,
       
   125         const QString &verifiedPassword);
       
   126     
       
   127 signals:
       
   128     
       
   129     /**
       
   130      * This signal is emitted when barring status query request is completed.
       
   131      * 
       
   132      * Basic service group identifier list contains items only if status is
       
   133      * queried for several services at once and barrings are active for some
       
   134      * of those services.
       
   135      *
       
   136      * @param   result                  0 if request was completed successfully 
       
   137      * or error code defined either in gsmerror.h or exterror.h.
       
   138      * @param   basicServiceGroupIds    Service group identifiers.
       
   139      * @param   status                  Barring status.
       
   140      */
       
   141     void barringStatusRequestCompleted(
       
   142         int result,
       
   143         const QList<unsigned char> & basicServiceGroupIds,
       
   144         PSetCallBarringWrapper::BarringStatus status);
       
   145     
       
   146     /**
       
   147      * This signal is emitted when barring enabling is completed.
       
   148      * 
       
   149      * @param   result                  0 if request was completed successfully 
       
   150      * or error code defined either in gsmerror.h or exterror.h.
       
   151      * @param   barringType             Service group identifiers.
       
   152      * @param   barringStatus           Barring status.
       
   153      * @param   plural                  Plurality.
       
   154      */
       
   155     void enableBarringRequestCompleted(
       
   156         int result,
       
   157         PSetCallBarringWrapper::BarringType barringType,
       
   158         PSetCallBarringWrapper::BarringStatus barringStatus, 
       
   159         bool plural);
       
   160 
       
   161     /**
       
   162      * This signal is emitted when barring disabling is completed.
       
   163      * 
       
   164      * @param   result                  0 if request was completed successfully 
       
   165      * or error code defined either in gsmerror.h or exterror.h.
       
   166      * @param   barringType             Service group identifiers.
       
   167      * @param   barringStatus           Barring status.
       
   168      * @param   plural                  Plurality.
       
   169      */
       
   170     void disableBarringRequestCompleted(
       
   171         int result,
       
   172         PSetCallBarringWrapper::BarringType barringType,
       
   173         PSetCallBarringWrapper::BarringStatus barringStatus, 
       
   174         bool plural);
       
   175     
       
   176     /**
       
   177      * This signal is emitted when barring password change request is completed.
       
   178      * 
       
   179      * @param   result                  0 if request was completed successfully 
       
   180      * or error code defined either in gsmerror.h or exterror.h.
       
   181      */
       
   182     void barringPasswordChangeRequestCompleted(int result);
       
   183     
       
   184 private: // data 
       
   185     
       
   186     /** Own. Private implementation. */
       
   187     QScopedPointer<PSetCallBarringWrapperPrivate> m_privateImpl;
       
   188     friend class PSetCallBarringWrapperPrivate;
       
   189 };
       
   190 
       
   191 #endif // PSETCALLBARRINGGWRAPPER_H