mmserv/tms/tmscallserver/src/dtmfnotifier.cpp
changeset 14 80975da52420
parent 12 5a06f39ad45b
child 16 43d09473c595
child 19 4a629bc82c5e
equal deleted inserted replaced
12:5a06f39ad45b 14:80975da52420
     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: Telephony Multimedia Service
       
    15  *
       
    16  */
       
    17 
       
    18 // INCLUDE FILES
       
    19 #include "dtmfnotifier.h"
       
    20 #include "tmsclientserver.h"
       
    21 #include "tmsutility.h"
       
    22 
       
    23 using namespace TMS;
       
    24 
       
    25 // CONSTANTS
       
    26 _LIT_SECURITY_POLICY_PASS(KTMSServerReadPolicy);
       
    27 _LIT_SECURITY_POLICY_C1(KTMSServerWritePolicy, ECapabilityWriteUserData);
       
    28 
       
    29 // -----------------------------------------------------------------------------
       
    30 // TMSDtmfNotifier::TMSDtmfNotifier
       
    31 // C++ default constructor can NOT contain any code, that
       
    32 // might leave.
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 TMSDtmfNotifier::TMSDtmfNotifier()
       
    36     {
       
    37     }
       
    38 
       
    39 // -----------------------------------------------------------------------------
       
    40 // TMSDtmfNotifier::ConstructL
       
    41 // Symbian 2nd phase constructor can leave.
       
    42 // -----------------------------------------------------------------------------
       
    43 //
       
    44 void TMSDtmfNotifier::ConstructL()
       
    45     {
       
    46     TRACE_PRN_FN_ENT;
       
    47     TInt err = RProperty::Define(EDtmfPs, RProperty::EByteArray,
       
    48             KTMSServerReadPolicy, KTMSServerWritePolicy);
       
    49     TRACE_PRN_N1(_L("DtmfSetting::ConstructL err:%d"),err);
       
    50 
       
    51     if (err != KErrAlreadyExists)
       
    52         {
       
    53         User::LeaveIfError(err);
       
    54         }
       
    55     TRACE_PRN_FN_EXT;
       
    56     }
       
    57 
       
    58 // -----------------------------------------------------------------------------
       
    59 // TMSDtmfNotifier::NewL
       
    60 // Two-phased constructor.
       
    61 // -----------------------------------------------------------------------------
       
    62 //
       
    63 TMSDtmfNotifier* TMSDtmfNotifier::NewL()
       
    64     {
       
    65     TMSDtmfNotifier* self = new (ELeave) TMSDtmfNotifier();
       
    66     CleanupStack::PushL(self);
       
    67     self->ConstructL();
       
    68     CleanupStack::Pop(self);
       
    69     return self;
       
    70     }
       
    71 
       
    72 // Destructor
       
    73 TMSDtmfNotifier::~TMSDtmfNotifier()
       
    74     {
       
    75     TRACE_PRN_FN_ENT;
       
    76     TInt err = RProperty::Delete(KTMSPropertyCategory, EDtmfPs);
       
    77     TRACE_PRN_N1(_L("DtmfSetting::~TMSDtmfNotifier err:%d"),err);
       
    78     TRACE_PRN_FN_ENT;
       
    79     }
       
    80 
       
    81 // -----------------------------------------------------------------------------
       
    82 // TMSDtmfNotifier::SetVolume
       
    83 // -----------------------------------------------------------------------------
       
    84 //
       
    85 void TMSDtmfNotifier::SetDtmf(TmsMsgBufPckg dtmfpckg, TBool aPublish)
       
    86     {
       
    87     TRACE_PRN_FN_ENT;
       
    88     //TInt err(KErrNone);
       
    89     if (aPublish)
       
    90         {
       
    91         /*err =*/RProperty::Set(KTMSPropertyCategory, EDtmfPs, dtmfpckg);
       
    92         }
       
    93 
       
    94     //TRACE_PRN_N1(_L("DtmfSetting::SetDtmf err:%d"),err);
       
    95     TRACE_PRN_FN_EXT;
       
    96     }
       
    97 
       
    98 //  End of File