vmbx/vmbxcpplugin/tsrc/src/ut_dummyvoicemailbox.cpp
changeset 13 e32024264ebb
child 19 e44a8c097b15
equal deleted inserted replaced
12:ae8abd0db65c 13:e32024264ebb
       
     1 /*
       
     2 * Copyright (c) 2009 - 2010 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:  Implementation of the CVoiceMailbox class
       
    15 *
       
    16 */
       
    17 
       
    18 // System includes
       
    19 #include <QtTest/QtTest>
       
    20 #include <cvoicemailbox.h>
       
    21 #include <cvoicemailboxentry.h>
       
    22 
       
    23 // ============================ MEMBER FUNCTIONS =============================
       
    24 
       
    25  TInt TVoiceMailboxParams::Version()
       
    26     {
       
    27     qDebug("TVoiceMailboxParams::Version <>");
       
    28     return iVersion;
       
    29     }
       
    30     
       
    31 
       
    32  TVoiceMailboxParams::TVoiceMailboxParams():
       
    33                                         iType( EVmbxNone ),
       
    34                                         iServiceId( KVmbxServiceIdNone ),
       
    35                                         iLineType( EVmbxAlsLineDefault )
       
    36     {
       
    37     qDebug("TVoiceMailboxParams default constructor <>");
       
    38     }
       
    39     
       
    40  TVoiceMailboxParams::TVoiceMailboxParams( 
       
    41                         const CVoiceMailboxEntry& aEntry )
       
    42     {
       
    43     qDebug("TVoiceMailboxParams Entry cnstructor >");
       
    44     iType = aEntry.VoiceMailboxType();
       
    45     iServiceId = aEntry.ServiceId();
       
    46     iLineType = aEntry.VmbxAlsLineType();
       
    47     qDebug("TVoiceMailboxParams Entry cnstructor <");
       
    48     }
       
    49 
       
    50 // ---------------------------------------------------------------------------
       
    51 // CVoiceMailbox::CVoiceMailboxImpl
       
    52 // C++ default constructor can NOT contain any code, that
       
    53 // might leave.
       
    54 // ---------------------------------------------------------------------------
       
    55 //
       
    56 CVoiceMailbox::CVoiceMailbox()
       
    57     {
       
    58     qDebug("DummyVoiceMailbox::CVoiceMailbox <>");
       
    59     }
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 // CVoiceMailbox::ConstructL
       
    63 // Symbian 2nd phase constructor can leave.
       
    64 // ---------------------------------------------------------------------------
       
    65 //
       
    66 void CVoiceMailbox::ConstructL()
       
    67     {
       
    68     qDebug("DummyVoiceMailbox::ConstructL <>");
       
    69     }
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // CVoiceMailbox::NewL
       
    73 // Two-phased constructor.
       
    74 // ---------------------------------------------------------------------------
       
    75 //
       
    76 CVoiceMailbox* CVoiceMailbox::NewL()
       
    77 {
       
    78     qDebug("DummyVoiceMailbox::NewL" );
       
    79 
       
    80     CVoiceMailbox * self = NULL;
       
    81     self = CVoiceMailbox::NewLC();
       
    82     CleanupStack::Pop( self );
       
    83     qDebug("DummyVoiceMailbox::NewL <");
       
    84     return self;   
       
    85     }
       
    86 
       
    87 // ---------------------------------------------------------------------------
       
    88 // CVoiceMailbox::NewLC
       
    89 // Two-phased constructor.
       
    90 // ---------------------------------------------------------------------------
       
    91 //
       
    92 CVoiceMailbox* CVoiceMailbox::NewLC()
       
    93     {
       
    94     qDebug("DummyVoiceMailbox::NewLC >");
       
    95     CVoiceMailbox* self = new( ELeave ) CVoiceMailbox;
       
    96     CleanupStack::PushL( self );
       
    97     self->ConstructL();
       
    98     qDebug("DummyVoiceMailbox::NewLC <");
       
    99     return self;
       
   100     }
       
   101 
       
   102 // ---------------------------------------------------------------------------
       
   103 // CVoiceMailbox::~CVoiceMailbox
       
   104 // Destructor
       
   105 // ---------------------------------------------------------------------------
       
   106 //
       
   107 CVoiceMailbox::~CVoiceMailbox()
       
   108     {
       
   109     qDebug("DummyVoiceMailbox::~CVoiceMailbox > <");
       
   110     }
       
   111 
       
   112 // ---------------------------------------------------------------------------
       
   113 // CVoiceMailbox::GetStoredEntry
       
   114 //
       
   115 // ---------------------------------------------------------------------------
       
   116 //
       
   117  TInt CVoiceMailbox::GetStoredEntry( 
       
   118     const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry) const
       
   119     {
       
   120     qDebug("DummyVoiceMailbox::GetStoredEntry <>");
       
   121     Q_UNUSED(aParams);
       
   122     TRAPD (err, aEntry = CVoiceMailboxEntry::NewL());    
       
   123     qDebug("DummyVoiceMailbox::GetStoredEntry err %d<", err);
       
   124     return err;
       
   125     }
       
   126 
       
   127 // ---------------------------------------------------------------------------
       
   128 // CVoiceMailbox::SaveEntry
       
   129 // Destructor
       
   130 // ---------------------------------------------------------------------------
       
   131 //
       
   132  TInt CVoiceMailbox::SaveEntry(const CVoiceMailboxEntry& aEntry)
       
   133     {
       
   134     qDebug("DummyVoiceMailbox::SaveEntry <>");
       
   135     Q_UNUSED(aEntry);
       
   136     return KErrNone;
       
   137     }
       
   138 
       
   139 // ---------------------------------------------------------------------------
       
   140 // CVoiceMailbox::QueryNewEntry
       
   141 //
       
   142 // ---------------------------------------------------------------------------
       
   143 //
       
   144  TInt CVoiceMailbox::QueryNewEntry(
       
   145         const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry)
       
   146     {
       
   147     qDebug("DummyVoiceMailbox::QueryNewEntry <>");
       
   148     Q_UNUSED(aParams);
       
   149     TRAPD (err, aEntry = CVoiceMailboxEntry::NewL());
       
   150     return err;
       
   151     }
       
   152 
       
   153 // ---------------------------------------------------------------------------
       
   154 // CVoiceMailbox::QueryChangeEntry
       
   155 //
       
   156 // ---------------------------------------------------------------------------
       
   157 //
       
   158  TInt CVoiceMailbox::QueryChangeEntry( 
       
   159         const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry)
       
   160     {
       
   161     qDebug("DummyVoiceMailbox::QueryChangeEntry <>");
       
   162     Q_UNUSED(aParams);
       
   163     TRAPD (err, aEntry = CVoiceMailboxEntry::NewL());
       
   164     return err;
       
   165     }
       
   166 
       
   167 // ---------------------------------------------------------------------------
       
   168 // CVoiceMailbox::QueryVmbxType
       
   169 //
       
   170 // ---------------------------------------------------------------------------
       
   171 //
       
   172  TInt CVoiceMailbox::QueryVmbxType(
       
   173                             TVoiceMailboxParams& aParams )
       
   174     {
       
   175     qDebug("DummyVoiceMailbox::QueryVmbxType <>");
       
   176     aParams.iType = EVmbxVoice;
       
   177     aParams.iServiceId = KVmbxServiceVoice;
       
   178     aParams.iLineType = EVmbxAlsLine1;
       
   179     return KErrNone;
       
   180     }
       
   181 
       
   182 // ---------------------------------------------------------------------------
       
   183 // CVoiceMailbox::NotifyVmbxNumberChangeL
       
   184 //
       
   185 // ---------------------------------------------------------------------------
       
   186 //
       
   187  void CVoiceMailbox::NotifyVmbxNumberChangeL(
       
   188     MVoiceMailboxObserver& aObserver, const TBool aNotifyOnActiveLineOnly )
       
   189     {
       
   190     qDebug("DummyVoiceMailbox::NotifyVmbxNumberChangeL <>");
       
   191     Q_UNUSED(aObserver);
       
   192     Q_UNUSED(aNotifyOnActiveLineOnly);
       
   193     }
       
   194 
       
   195 // ---------------------------------------------------------------------------
       
   196 // CVoiceMailbox::NotifyVmbxNumberChangeCancel
       
   197 //
       
   198 // ---------------------------------------------------------------------------
       
   199 //
       
   200  void CVoiceMailbox::NotifyVmbxNumberChangeCancel()
       
   201     {
       
   202     qDebug("DummyVoiceMailbox::NotifyVmbxNumberChangeCancel <>");
       
   203     }
       
   204 
       
   205 // ---------------------------------------------------------------------------
       
   206 //  CVoiceMailbox::CheckConfiguration
       
   207 //
       
   208 // ---------------------------------------------------------------------------
       
   209 //
       
   210  TBool CVoiceMailbox::CheckConfiguration(
       
   211     const TVoiceMailboxParams& aParams, const TInt aFlags )
       
   212     {
       
   213     qDebug("DummyVoiceMailbox::CheckConfiguration <>");
       
   214     Q_UNUSED(aParams);
       
   215     Q_UNUSED(aFlags);
       
   216     return ETrue;
       
   217     }
       
   218 
       
   219 // ---------------------------------------------------------------------------
       
   220 // CVoiceMailbox::GetServiceIds
       
   221 //
       
   222 // ---------------------------------------------------------------------------
       
   223 //
       
   224  TInt CVoiceMailbox::GetServiceIds( RIdArray& aProfileIds ) const
       
   225     {
       
   226     qDebug("DummyVoiceMailbox::GetServiceIds <>");
       
   227     Q_UNUSED(aProfileIds);
       
   228     return 0;
       
   229     }
       
   230 
       
   231 
       
   232 // ---------------------------------------------------------------------------
       
   233 // CVoiceMailbox::SaveProvisionedEntry
       
   234 //
       
   235 // ---------------------------------------------------------------------------
       
   236 //
       
   237  TInt CVoiceMailbox::SaveProvisionedEntry( 
       
   238                                 const CVoiceMailboxEntry& aEntry)
       
   239     {
       
   240     qDebug("DummyVoiceMailbox::SaveProvisionedEntry <>");
       
   241     Q_UNUSED(aEntry);
       
   242     return KErrNone;
       
   243     }
       
   244 
       
   245 // End of file