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