vmbx/vmbxcpplugin/tsrc/src/ut_dummyvoicemailbox.cpp
changeset 19 e44a8c097b15
parent 13 e32024264ebb
equal deleted inserted replaced
15:d7fc66ccd6fb 19:e44a8c097b15
    17 
    17 
    18 // System includes
    18 // System includes
    19 #include <QtTest/QtTest>
    19 #include <QtTest/QtTest>
    20 #include <cvoicemailbox.h>
    20 #include <cvoicemailbox.h>
    21 #include <cvoicemailboxentry.h>
    21 #include <cvoicemailboxentry.h>
       
    22 // For global export return value
       
    23 #include "ut_vmbxuiengine.h"
    22 
    24 
    23 // ============================ MEMBER FUNCTIONS =============================
    25 // ============================ MEMBER FUNCTIONS =============================
    24 
    26 
    25  TInt TVoiceMailboxParams::Version()
    27  TInt TVoiceMailboxParams::Version()
    26     {
    28     {
   112 // ---------------------------------------------------------------------------
   114 // ---------------------------------------------------------------------------
   113 // CVoiceMailbox::GetStoredEntry
   115 // CVoiceMailbox::GetStoredEntry
   114 //
   116 //
   115 // ---------------------------------------------------------------------------
   117 // ---------------------------------------------------------------------------
   116 //
   118 //
   117  TInt CVoiceMailbox::GetStoredEntry( 
   119 TInt CVoiceMailbox::GetStoredEntry( 
   118     const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry) const
   120     const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry) const
   119     {
   121     {
   120     qDebug("DummyVoiceMailbox::GetStoredEntry <>");
   122     qDebug("DummyVoiceMailbox::GetStoredEntry >");
   121     Q_UNUSED(aParams);
   123     Q_UNUSED(aParams);
   122     TRAPD (err, aEntry = CVoiceMailboxEntry::NewL());    
   124     TRAPD (err, aEntry = CVoiceMailboxEntry::NewL());    
   123     qDebug("DummyVoiceMailbox::GetStoredEntry err %d<", err);
   125     qDebug("DummyVoiceMailbox::GetStoredEntry err %d<", err);
   124     return err;
   126     return globalExpRet;
   125     }
   127     }
   126 
   128 
   127 // ---------------------------------------------------------------------------
   129 // ---------------------------------------------------------------------------
   128 // CVoiceMailbox::SaveEntry
   130 // CVoiceMailbox::SaveEntry
   129 // Destructor
   131 // Destructor
   130 // ---------------------------------------------------------------------------
   132 // ---------------------------------------------------------------------------
   131 //
   133 //
   132  TInt CVoiceMailbox::SaveEntry(const CVoiceMailboxEntry& aEntry)
   134 TInt CVoiceMailbox::SaveEntry(const CVoiceMailboxEntry& aEntry)
   133     {
   135     {
   134     qDebug("DummyVoiceMailbox::SaveEntry <>");
   136     qDebug("DummyVoiceMailbox::SaveEntry <>");
   135     Q_UNUSED(aEntry);
   137     Q_UNUSED(aEntry);
   136     return KErrNone;
   138     return globalExpRet;
   137     }
   139     }
   138 
   140 
   139 // ---------------------------------------------------------------------------
   141 // ---------------------------------------------------------------------------
   140 // CVoiceMailbox::QueryNewEntry
   142 // CVoiceMailbox::QueryNewEntry
   141 //
   143 //
   142 // ---------------------------------------------------------------------------
   144 // ---------------------------------------------------------------------------
   143 //
   145 //
   144  TInt CVoiceMailbox::QueryNewEntry(
   146 TInt CVoiceMailbox::QueryNewEntry(
   145         const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry)
   147         const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry)
   146     {
   148     {
   147     qDebug("DummyVoiceMailbox::QueryNewEntry <>");
   149     qDebug("DummyVoiceMailbox::QueryNewEntry <>");
   148     Q_UNUSED(aParams);
   150     Q_UNUSED(aParams);
   149     TRAPD (err, aEntry = CVoiceMailboxEntry::NewL());
   151     TRAPD (err, aEntry = CVoiceMailboxEntry::NewL());
   150     return err;
   152     return globalExpRet;
   151     }
   153     }
   152 
   154 
   153 // ---------------------------------------------------------------------------
   155 // ---------------------------------------------------------------------------
   154 // CVoiceMailbox::QueryChangeEntry
   156 // CVoiceMailbox::QueryChangeEntry
   155 //
   157 //
   156 // ---------------------------------------------------------------------------
   158 // ---------------------------------------------------------------------------
   157 //
   159 //
   158  TInt CVoiceMailbox::QueryChangeEntry( 
   160 TInt CVoiceMailbox::QueryChangeEntry( 
   159         const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry)
   161         const TVoiceMailboxParams& aParams, CVoiceMailboxEntry*& aEntry)
   160     {
   162     {
   161     qDebug("DummyVoiceMailbox::QueryChangeEntry <>");
   163     qDebug("DummyVoiceMailbox::QueryChangeEntry <>");
   162     Q_UNUSED(aParams);
   164     Q_UNUSED(aParams);
   163     TRAPD (err, aEntry = CVoiceMailboxEntry::NewL());
   165     TRAPD (err, aEntry = CVoiceMailboxEntry::NewL());
   164     return err;
   166     return globalExpRet;
   165     }
   167     }
   166 
   168 
   167 // ---------------------------------------------------------------------------
   169 // ---------------------------------------------------------------------------
   168 // CVoiceMailbox::QueryVmbxType
   170 // CVoiceMailbox::QueryVmbxType
   169 //
   171 //
   170 // ---------------------------------------------------------------------------
   172 // ---------------------------------------------------------------------------
   171 //
   173 //
   172  TInt CVoiceMailbox::QueryVmbxType(
   174 TInt CVoiceMailbox::QueryVmbxType(
   173                             TVoiceMailboxParams& aParams )
   175                             TVoiceMailboxParams& aParams )
   174     {
   176     {
   175     qDebug("DummyVoiceMailbox::QueryVmbxType <>");
   177     qDebug("DummyVoiceMailbox::QueryVmbxType <>");
   176     aParams.iType = EVmbxVoice;
   178     aParams.iType = EVmbxVoice;
   177     aParams.iServiceId = KVmbxServiceVoice;
   179     aParams.iServiceId = KVmbxServiceVoice;
   178     aParams.iLineType = EVmbxAlsLine1;
   180     aParams.iLineType = EVmbxAlsLine1;
   179     return KErrNone;
   181     return globalExpRet;
   180     }
   182     }
   181 
   183 
   182 // ---------------------------------------------------------------------------
   184 // ---------------------------------------------------------------------------
   183 // CVoiceMailbox::NotifyVmbxNumberChangeL
   185 // CVoiceMailbox::NotifyVmbxNumberChangeL
   184 //
   186 //
   185 // ---------------------------------------------------------------------------
   187 // ---------------------------------------------------------------------------
   186 //
   188 //
   187  void CVoiceMailbox::NotifyVmbxNumberChangeL(
   189 void CVoiceMailbox::NotifyVmbxNumberChangeL(
   188     MVoiceMailboxObserver& aObserver, const TBool aNotifyOnActiveLineOnly )
   190     MVoiceMailboxObserver& aObserver, const TBool aNotifyOnActiveLineOnly )
   189     {
   191     {
   190     qDebug("DummyVoiceMailbox::NotifyVmbxNumberChangeL <>");
   192     qDebug("DummyVoiceMailbox::NotifyVmbxNumberChangeL <>");
   191     Q_UNUSED(aObserver);
   193     Q_UNUSED(aObserver);
   192     Q_UNUSED(aNotifyOnActiveLineOnly);
   194     Q_UNUSED(aNotifyOnActiveLineOnly);
   195 // ---------------------------------------------------------------------------
   197 // ---------------------------------------------------------------------------
   196 // CVoiceMailbox::NotifyVmbxNumberChangeCancel
   198 // CVoiceMailbox::NotifyVmbxNumberChangeCancel
   197 //
   199 //
   198 // ---------------------------------------------------------------------------
   200 // ---------------------------------------------------------------------------
   199 //
   201 //
   200  void CVoiceMailbox::NotifyVmbxNumberChangeCancel()
   202 void CVoiceMailbox::NotifyVmbxNumberChangeCancel()
   201     {
   203     {
   202     qDebug("DummyVoiceMailbox::NotifyVmbxNumberChangeCancel <>");
   204     qDebug("DummyVoiceMailbox::NotifyVmbxNumberChangeCancel <>");
   203     }
   205     }
   204 
   206 
   205 // ---------------------------------------------------------------------------
   207 // ---------------------------------------------------------------------------
   206 //  CVoiceMailbox::CheckConfiguration
   208 //  CVoiceMailbox::CheckConfiguration
   207 //
   209 //
   208 // ---------------------------------------------------------------------------
   210 // ---------------------------------------------------------------------------
   209 //
   211 //
   210  TBool CVoiceMailbox::CheckConfiguration(
   212 TBool CVoiceMailbox::CheckConfiguration(
   211     const TVoiceMailboxParams& aParams, const TInt aFlags )
   213     const TVoiceMailboxParams& aParams, const TInt aFlags )
   212     {
   214     {
   213     qDebug("DummyVoiceMailbox::CheckConfiguration <>");
   215     qDebug("DummyVoiceMailbox::CheckConfiguration <>");
   214     Q_UNUSED(aParams);
   216     Q_UNUSED(aParams);
   215     Q_UNUSED(aFlags);
   217     Q_UNUSED(aFlags);
   216     return ETrue;
   218     return globalExpRet;
   217     }
   219     }
   218 
   220 
   219 // ---------------------------------------------------------------------------
   221 // ---------------------------------------------------------------------------
   220 // CVoiceMailbox::GetServiceIds
   222 // CVoiceMailbox::GetServiceIds
   221 //
   223 //
   222 // ---------------------------------------------------------------------------
   224 // ---------------------------------------------------------------------------
   223 //
   225 //
   224  TInt CVoiceMailbox::GetServiceIds( RIdArray& aProfileIds ) const
   226 TInt CVoiceMailbox::GetServiceIds( RIdArray& aProfileIds ) const
   225     {
   227     {
   226     qDebug("DummyVoiceMailbox::GetServiceIds <>");
   228     qDebug("DummyVoiceMailbox::GetServiceIds <>");
   227     Q_UNUSED(aProfileIds);
   229     Q_UNUSED(aProfileIds);
   228     return 0;
   230     return 0;
   229     }
   231     }
   232 // ---------------------------------------------------------------------------
   234 // ---------------------------------------------------------------------------
   233 // CVoiceMailbox::SaveProvisionedEntry
   235 // CVoiceMailbox::SaveProvisionedEntry
   234 //
   236 //
   235 // ---------------------------------------------------------------------------
   237 // ---------------------------------------------------------------------------
   236 //
   238 //
   237  TInt CVoiceMailbox::SaveProvisionedEntry( 
   239 TInt CVoiceMailbox::SaveProvisionedEntry( 
   238                                 const CVoiceMailboxEntry& aEntry)
   240                                 const CVoiceMailboxEntry& aEntry)
   239     {
   241     {
   240     qDebug("DummyVoiceMailbox::SaveProvisionedEntry <>");
   242     qDebug("DummyVoiceMailbox::SaveProvisionedEntry <>");
   241     Q_UNUSED(aEntry);
   243     Q_UNUSED(aEntry);
   242     return KErrNone;
   244     return globalExpRet;
   243     }
   245     }
   244 
   246 
   245 // End of file
   247 // End of file