vmbx/vmbxengine/tsrc/ut_vmbxengine/src/etel_mock.cpp
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     1 #include <etelmm.h>
       
     2 #include <etel.h>
       
     3 #include <e32std.h>
       
     4 #include <rsssettings.h>
       
     5 #include <QtTest/QtTest>
       
     6 
       
     7 RPhone::RPhone()
       
     8 {
       
     9 }
       
    10 
       
    11 void RPhone::ConstructL()
       
    12 {   
       
    13 }
       
    14 
       
    15 TInt RPhone::Open(RTelServer& /*aSession*/,const TDesC& /*aName*/)
       
    16 {
       
    17     return KErrNone;
       
    18 }
       
    19 
       
    20 void RPhone::Close()
       
    21 {   
       
    22 }
       
    23 
       
    24 void RPhone::Destruct()
       
    25 {
       
    26 }
       
    27 
       
    28 RMobilePhone::RMobilePhone()
       
    29 {
       
    30 }
       
    31 
       
    32 void RMobilePhone::ConstructL()
       
    33 {    
       
    34 }
       
    35 
       
    36 RMobilePhone::TMultimodeType::TMultimodeType()
       
    37 {
       
    38 }
       
    39 
       
    40 TInt RMobilePhone::TMultimodeType::ExtensionId() const
       
    41 {
       
    42     return 0;
       
    43 }
       
    44 
       
    45 void RMobilePhone::GetMailboxNumbers(
       
    46     TRequestStatus& aReqStatus, 
       
    47     TDes8& aMailBox) const
       
    48 {
       
    49     RMobilePhone::TMobilePhoneVoicemailIdsV3 info;
       
    50     RMobilePhone::TMobilePhoneVoicemailIdsV3Pckg infoPckg(info);
       
    51     info.iVoice = 1;
       
    52     aMailBox.Copy(infoPckg);
       
    53     TRequestStatus* tmp = &aReqStatus;
       
    54     User::RequestComplete(tmp, KErrNone);
       
    55     qDebug("RMobilePhoneStore::GetMailboxNumbers mock");
       
    56 }
       
    57 
       
    58 RMobilePhone::TMobilePhoneVoicemailIdsV3::TMobilePhoneVoicemailIdsV3()
       
    59     : iVoice(0),
       
    60       iData(0),
       
    61       iFax(0),
       
    62       iOther(0) 
       
    63 {  
       
    64 }
       
    65 
       
    66 void RMobilePhone::Destruct()
       
    67 {   
       
    68 }
       
    69 
       
    70 TInt RMobilePhone::GetIccAccessCaps(TUint32& /*aCaps*/) const
       
    71 {   
       
    72     return KErrNone;
       
    73 }
       
    74 
       
    75 RTelServer::RTelServer()
       
    76 { 
       
    77 }
       
    78 
       
    79 TInt RTelServer::Connect(TInt /*aMessageSlots*/)
       
    80 {
       
    81     return KErrNone;
       
    82 }
       
    83 
       
    84 TInt RTelServer::LoadPhoneModule(const TDesC& /*aFileName*/) const
       
    85 {
       
    86     return KErrNone;
       
    87 }
       
    88 
       
    89 TInt RTelServer::SetExtendedErrorGranularity(
       
    90     const TErrorGranularity /*aGranularity*/) const
       
    91 {
       
    92     return KErrNone;
       
    93 }
       
    94 
       
    95 TInt RTelServer::GetPhoneInfo(
       
    96     const TInt /*aIndex*/, TPhoneInfo& /*aInfo*/) const
       
    97 {
       
    98     return KErrNone;
       
    99 }
       
   100 
       
   101 RMobilePhoneStore::RMobilePhoneStore()
       
   102 {
       
   103 }
       
   104 
       
   105 void RMobilePhoneStore::GetInfo(
       
   106     TRequestStatus& aReqStatus, TDes8& aInfo) const
       
   107 {
       
   108     RMobilePhoneBookStore::TMobilePhoneBookInfoV1 info;
       
   109     info.iCaps = 0x10000000;
       
   110     RMobilePhoneBookStore::TMobilePhoneBookInfoV1Pckg pckgInfo( info );
       
   111     aInfo.Copy( pckgInfo ); 
       
   112     TRequestStatus* tmp = &aReqStatus;
       
   113     User::RequestComplete(tmp, KErrNone);
       
   114     qDebug("RMobilePhoneStore::GetInfo mock");
       
   115 }
       
   116 
       
   117 RMobilePhoneBookStore::RMobilePhoneBookStore()
       
   118 {    
       
   119 }
       
   120 
       
   121 TInt RMobilePhoneBookStore::Open(
       
   122     RMobilePhone& /*aPhone*/, const TDesC& /*aStore*/)
       
   123 {
       
   124     return KErrNone;
       
   125 }
       
   126 
       
   127 RMobilePhoneStore::TMobilePhoneStoreInfoV1::TMobilePhoneStoreInfoV1()
       
   128     :iType(RMobilePhoneStore::EPhoneStoreTypeUnknown),
       
   129     iTotalEntries(0),
       
   130     iUsedEntries(0),
       
   131     iCaps(0),
       
   132     iName(0)
       
   133 {   
       
   134 }
       
   135 
       
   136 RMobilePhoneBookStore::TMobilePhoneBookInfoV1::TMobilePhoneBookInfoV1()
       
   137     :iMaxNumLength(0),
       
   138      iMaxTextLength(0),
       
   139      iLocation(RMobilePhoneBookStore::ELocationUnknown),
       
   140      iChangeCounter(0),
       
   141      iIdentity(0) 
       
   142 {
       
   143 }
       
   144 
       
   145 void RMobilePhoneBookStore::Close()
       
   146 {
       
   147 }
       
   148 
       
   149 void RMobilePhoneBookStore::Read(
       
   150     TRequestStatus& aReqStatus, TInt /*aIndex*/, 
       
   151     TInt /*aNumSlots*/, TDes8& aPBData) const
       
   152 { 
       
   153     TRequestStatus* tmp = &aReqStatus;
       
   154 // data ?
       
   155     TBuf<5> pbdata(_L("data5"));
       
   156     aPBData.Copy(pbdata);
       
   157     
       
   158     User::RequestComplete(tmp, KErrNone);
       
   159 }
       
   160 
       
   161 void RMobilePhoneBookStore::Write(
       
   162     TRequestStatus& aReqStatus, 
       
   163     const TDesC8& /*aPBData*/, TInt& /*aIndex*/) const
       
   164 {
       
   165     TRequestStatus* tmp = &aReqStatus;
       
   166     User::RequestComplete(tmp, KErrNone);
       
   167 }
       
   168 
       
   169 void RMobilePhoneStore::NotifyStoreEvent(
       
   170     TRequestStatus& aReqStatus, 
       
   171     TUint32& /*aEvent*/, TInt& /*aIndex*/) const
       
   172 {
       
   173     TRequestStatus* tmp = &aReqStatus;
       
   174     User::RequestComplete(tmp, KErrNone);
       
   175 }
       
   176 
       
   177 RTelSubSessionBase::RTelSubSessionBase()
       
   178 {
       
   179 }
       
   180 
       
   181 void RTelSubSessionBase::CancelAsyncRequest(TInt /*aReqToCancel*/) const
       
   182 {
       
   183 // refers to ut_ussd
       
   184 }
       
   185 
       
   186 TInt RSSSettings::Get( 
       
   187     TSSSettingsSetting /*aSetting*/,
       
   188     TInt& aValue )
       
   189 {
       
   190 	aValue = ESSSettingsAlsPrimary;
       
   191 	return KErrNone;
       
   192 }
       
   193