phoneapp/phoneuistates/tsrc/common/phoneuiutils.cpp
changeset 77 2be0b271d017
equal deleted inserted replaced
72:c76a0b1755b9 77:2be0b271d017
       
     1 /*
       
     2 * Copyright (c) 2008 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:  PhoneUIUtils.lib stubs
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "tphonecmdparamcallheaderdata.h"
       
    20 #include "tphonecmdparaminteger.h"
       
    21 #include "tphonecmdparamboolean.h"
       
    22 #include "tphonecmdparamkeyevent.h"
       
    23 #include "tphonecmdparamstring.h"
       
    24 #include "tphonecmdparamaudiooutput.h"
       
    25 #include "tphonecmdparamemergencycallheaderdata.h"
       
    26 #include "tphonecmdparamcallstatedata.h"
       
    27 #include "tphonecmdparamglobalnote.h"
       
    28 #include "tphonecmdparamappinfo.h"
       
    29 #include "cphonepubsubproxy.h"
       
    30 #include "cphonelogger.h"
       
    31 #include "cphoneresourceresolverbase.h"
       
    32 #include "cphonemainerrormessageshandler.h"
       
    33 #include "cphonekeys.h"
       
    34 #include <eikenv.h>
       
    35 
       
    36 // Note: Commented out functions are not in use in this stub (yet).
       
    37 //       They are left in place in case they are needed later.
       
    38 
       
    39 
       
    40 // ================= MEMBER FUNCTIONS =======================
       
    41 CPhoneMainErrorMessagesHandler * CPhoneMainErrorMessagesHandler::Instance()
       
    42     {
       
    43     
       
    44     }
       
    45 
       
    46 CPhoneResourceResolverBase::CPhoneResourceResolverBase() :
       
    47     iEnv( *CEikonEnv::Static() )
       
    48     {
       
    49     }
       
    50 
       
    51 CPhoneResourceResolverBase::~CPhoneResourceResolverBase()
       
    52     {
       
    53     }
       
    54 
       
    55 TInt CPhoneResourceResolverBase::ResolveResourceID( const TInt& /*aParam*/ ) const
       
    56     {
       
    57     }
       
    58 
       
    59 TInt CPhoneResourceResolverBase::IsTelephonyFeatureSupported( TInt /*aParam*/ ) const
       
    60     {
       
    61     }
       
    62 
       
    63 TPhoneCmdParamEmergencyCallHeaderData::TPhoneCmdParamEmergencyCallHeaderData()
       
    64     {
       
    65     }
       
    66 
       
    67 void TPhoneCmdParamEmergencyCallHeaderData::SetHeaderText( const TDesC16& /*aParam*/ )
       
    68     {
       
    69     }
       
    70 
       
    71 void TPhoneCmdParamEmergencyCallHeaderData::SetCiphering( TBool /*aParam*/ )
       
    72     {
       
    73     }
       
    74 
       
    75 void TPhoneCmdParamEmergencyCallHeaderData::SetCipheringIndicatorAllowed( TBool /*aParam*/ )
       
    76     {
       
    77     }
       
    78 
       
    79 int CPhoneKeys::IsNumericKey(const TKeyEvent& /*aEvent*/, TEventCode /*aKey*/ )
       
    80     {
       
    81     }
       
    82 
       
    83 TPhoneCmdParamAudioOutput::TPhoneCmdParamAudioOutput()
       
    84     {
       
    85     }
       
    86 
       
    87 void TPhoneCmdParamAudioOutput::SetAudioOutput( TPEAudioOutput /*aParam*/ )
       
    88     {
       
    89     }
       
    90 
       
    91 TPhoneCmdParamString::TPhoneCmdParamString()
       
    92     {
       
    93     }
       
    94 
       
    95 TPhoneCmdParamKeyEvent::TPhoneCmdParamKeyEvent()
       
    96     {
       
    97     }
       
    98 
       
    99 void TPhoneCmdParamString::SetString( TPtr16* /*aString*/ )
       
   100     {
       
   101     }
       
   102 
       
   103 void TPhoneCmdParamKeyEvent::SetKeyEvent( const TKeyEvent& /*aEvent*/ )
       
   104     {
       
   105     }
       
   106 
       
   107 void TPhoneCmdParamKeyEvent::SetEventCode( TEventCode /*aEvent*/ )
       
   108     {
       
   109     }
       
   110 
       
   111 TPhoneCmdParamInteger::TPhoneCmdParamInteger():
       
   112     TPhoneCommandParam(),
       
   113     iInteger( 0 )
       
   114     {
       
   115     iParamId = EPhoneParamIdInteger;
       
   116     }
       
   117 
       
   118 void TPhoneCmdParamInteger::SetInteger( TInt aInteger )
       
   119    {
       
   120    iInteger = aInteger;   
       
   121    }
       
   122 
       
   123 TInt TPhoneCmdParamInteger::Integer() const
       
   124    {
       
   125    return iInteger;
       
   126    }
       
   127 
       
   128 TPhoneCmdParamBoolean::TPhoneCmdParamBoolean() :
       
   129     TPhoneCommandParam(),
       
   130     iBoolean( EFalse )
       
   131     {
       
   132     iParamId = EPhoneParamIdBoolean;
       
   133     }
       
   134 
       
   135 void TPhoneCmdParamBoolean::SetBoolean( TBool aBoolean )
       
   136    {
       
   137    iBoolean = aBoolean;   
       
   138    }
       
   139 
       
   140 TBool TPhoneCmdParamBoolean::Boolean() const
       
   141    {
       
   142    return iBoolean;
       
   143    }
       
   144     
       
   145 TPhoneCmdParamCallStateData::TPhoneCmdParamCallStateData()
       
   146     {
       
   147     }
       
   148     
       
   149 void TPhoneCmdParamCallStateData::SetCallId( TInt /*aParam*/ )
       
   150     {
       
   151     }
       
   152 
       
   153 TInt TPhoneCmdParamCallStateData::CallId() const
       
   154     {
       
   155     }
       
   156     
       
   157 void TPhoneCmdParamCallStateData::SetCallState( TInt /*aState*/ )
       
   158     {
       
   159     }
       
   160 
       
   161 TInt TPhoneCmdParamCallStateData::CallState() const
       
   162     {
       
   163     }
       
   164     
       
   165 TPhoneCmdParamGlobalNote::TPhoneCmdParamGlobalNote()
       
   166     {
       
   167     }
       
   168     
       
   169 void TPhoneCmdParamGlobalNote::SetTextResourceId( TInt /*aResource*/ )
       
   170     {
       
   171     }
       
   172 
       
   173 void TPhoneCmdParamGlobalNote::SetText( const TDesC16& /*aParam*/ )
       
   174     {
       
   175     }
       
   176     
       
   177 TPhoneCmdParamAppInfo::TPhoneCmdParamAppInfo()
       
   178     {
       
   179     }
       
   180     
       
   181 void TPhoneCmdParamAppInfo::SetAppUid( const TUid& /*aUid*/ )
       
   182     {
       
   183     }
       
   184     
       
   185 void TPhoneCmdParamAppInfo::SetViewUid( const TUid& /*aUid*/ )
       
   186     {
       
   187     }
       
   188     
       
   189 void TPhoneCmdParamAppInfo::SetCustomMessageId( const TUid& /*aUid*/ )
       
   190     {
       
   191     }
       
   192     
       
   193 TInt CPhonePubSubProxy::Value( const TUid& /*aUid*/, TUint /*aValue*/ )
       
   194     {
       
   195     }
       
   196     
       
   197     
       
   198 void CPhoneLogger::LogIt( TPhoneUILoggingLevel /*aLevel*/, 
       
   199             TPhoneUILoggingComponent /*aLoggingComponent*/, 
       
   200             TRefByValue<const TDesC> /*aFmt*/, ...)
       
   201     {
       
   202     }
       
   203     
       
   204 void CPhoneLogger::LogStateChange( 
       
   205     const TInt /*aCurrentState*/, 
       
   206     const TInt /*aNewState*/ )
       
   207     {
       
   208     }
       
   209 
       
   210 // -----------------------------------------------------------------------------
       
   211 // TPhoneCommandParam::TPhoneCommandParam
       
   212 // C++ default constructor can NOT contain any code, that
       
   213 // might leave.
       
   214 // -----------------------------------------------------------------------------
       
   215 //
       
   216 TPhoneCommandParam::TPhoneCommandParam()
       
   217     {
       
   218     }
       
   219 
       
   220 // -----------------------------------------------------------------------------
       
   221 // TPhoneCommandParam::ParamId
       
   222 // -----------------------------------------------------------------------------
       
   223 //
       
   224 TPhoneCommandParam::TPhoneParamId TPhoneCommandParam::ParamId() const
       
   225     {
       
   226     return iParamId;
       
   227     }
       
   228 //
       
   229 // -----------------------------------------------------------------------------
       
   230 // TPhoneCmdParamCallHeaderData::TPhoneCmdParamCallHeaderData
       
   231 // C++ default constructor can NOT contain any code, that
       
   232 // might leave.
       
   233 // -----------------------------------------------------------------------------
       
   234 //
       
   235 TPhoneCmdParamCallHeaderData::TPhoneCmdParamCallHeaderData() :
       
   236         TPhoneCommandParam(),
       
   237         iLabelText( NULL ),
       
   238         iShortLabelText( NULL ),
       
   239         iCallState( 0 ),
       
   240         iNumberType( 0 ),
       
   241         iCiphering( EFalse ),
       
   242         iCLIText( NULL ),
       
   243         iCNAPText( NULL ),
       
   244         iPicture( NULL ),
       
   245         iLine2 ( EFalse ),
       
   246         iThumbnail( NULL ),
       
   247         iCallerText( KNullDesC ),
       
   248         iParticipantListCLI( EPhoneParticipantCLIText ),
       
   249         iCipheringIndicatorAllowed( ETrue ),
       
   250         iContactLink( KNullDesC8 ),
       
   251         iRemotePhoneNumber( KNullDesC ),
       
   252         iDiverted( EFalse )
       
   253         {
       
   254         iParamId = EPhoneParamIdCallHeaderData;
       
   255         }
       
   256 
       
   257 //// ---------------------------------------------------------
       
   258 //// TPhoneCmdParamCallHeaderData::SetLabelText
       
   259 //// Sets the call header label text
       
   260 //// (other items were commented in a header).
       
   261 //// ---------------------------------------------------------
       
   262 ////
       
   263 void TPhoneCmdParamCallHeaderData::SetLabelText(
       
   264    const TDesC& aLabelText )
       
   265     {
       
   266     delete iLabelText;
       
   267     iLabelText = aLabelText.Alloc();
       
   268     }
       
   269 
       
   270 // ---------------------------------------------------------
       
   271 // TPhoneCmdParamCallHeaderData::SetShortLabelText
       
   272 // Sets the call header short label text
       
   273 // (other items were commented in a header).
       
   274 // ---------------------------------------------------------
       
   275 //
       
   276 void TPhoneCmdParamCallHeaderData::SetShortLabelText(
       
   277    const TDesC& aShortLabelText )
       
   278     {
       
   279     delete iShortLabelText;
       
   280     iShortLabelText = aShortLabelText.Alloc();
       
   281     }
       
   282 
       
   283 // ---------------------------------------------------------
       
   284 // TPhoneCmdParamCallHeaderData::SetCallState
       
   285 // Sets the call header call state
       
   286 // (other items were commented in a header).
       
   287 // ---------------------------------------------------------
       
   288 //
       
   289 void TPhoneCmdParamCallHeaderData::SetCallState( TInt aCallState )
       
   290    {
       
   291    iCallState = aCallState;
       
   292    }
       
   293 
       
   294 // ---------------------------------------------------------
       
   295 // TPhoneCmdParamCallHeaderData::SetCallType
       
   296 // Sets the call header call type
       
   297 // (other items were commented in a header).
       
   298 // ---------------------------------------------------------
       
   299 //
       
   300 void TPhoneCmdParamCallHeaderData::SetCallType( TInt aCallType )
       
   301    {
       
   302    iCallType = aCallType;
       
   303    }
       
   304 
       
   305 //// ---------------------------------------------------------
       
   306 //// TPhoneCmdParamCallHeaderData::SetNumberType
       
   307 //// Sets the call header number type
       
   308 //// (other items were commented in a header).
       
   309 //// ---------------------------------------------------------
       
   310 ////
       
   311 void TPhoneCmdParamCallHeaderData::SetNumberType( TInt aNumberType )
       
   312    {
       
   313    iNumberType = aNumberType;
       
   314    }
       
   315 
       
   316 // ---------------------------------------------------------
       
   317 // TPhoneCmdParamCallHeaderData::SetCiphering
       
   318 // Sets the call header ciphering status
       
   319 // (other items were commented in a header).
       
   320 // ---------------------------------------------------------
       
   321 //
       
   322 void TPhoneCmdParamCallHeaderData::SetCiphering(
       
   323    TBool aCiphering )
       
   324    {
       
   325    iCiphering = aCiphering;
       
   326    }
       
   327 
       
   328 // ---------------------------------------------------------
       
   329 // TPhoneCmdParamCallHeaderData::SetCLIText
       
   330 // Sets the call header CLI text
       
   331 // (other items were commented in a header).
       
   332 // ---------------------------------------------------------
       
   333 //
       
   334 void TPhoneCmdParamCallHeaderData::SetCLIText( 
       
   335    const TDesC& aCLIText,
       
   336    TPhoneTextClippingDirection aDirection )
       
   337    {
       
   338    delete iCLIText;
       
   339    iCLIText = aCLIText.Alloc();
       
   340    iCLITextClippingDirection = aDirection; 
       
   341    }
       
   342 
       
   343 // ---------------------------------------------------------
       
   344 // TPhoneCmdParamCallHeaderData::CallState
       
   345 // Returns the call header call state
       
   346 // (other items were commented in a header).
       
   347 // ---------------------------------------------------------
       
   348 //
       
   349 TInt TPhoneCmdParamCallHeaderData::CallState() const
       
   350    {
       
   351    return iCallState;
       
   352    }
       
   353 
       
   354 // ---------------------------------------------------------
       
   355 // TPhoneCmdParamCallHeaderData::CallType
       
   356 // Returns the call header call type
       
   357 // (other items were commented in a header).
       
   358 // ---------------------------------------------------------
       
   359 //
       
   360 TInt TPhoneCmdParamCallHeaderData::CallType() const
       
   361    {
       
   362    return iCallType;
       
   363    }
       
   364 
       
   365 // ---------------------------------------------------------
       
   366 // TPhoneCmdParamCallHeaderData::Line2
       
   367 // Returns the call header line2
       
   368 // (other items were commented in a header).
       
   369 // ---------------------------------------------------------
       
   370 //
       
   371 TBool TPhoneCmdParamCallHeaderData::Line2() const
       
   372    {
       
   373    return iLine2;
       
   374    }
       
   375 
       
   376 //// ---------------------------------------------------------
       
   377 //// TPhoneCmdParamCallHeaderData::SetCipheringIndicatorAllowed
       
   378 //// Sets the ciphering indicator allowed status
       
   379 //// (other items were commented in a header).
       
   380 //// ---------------------------------------------------------
       
   381 ////
       
   382 void TPhoneCmdParamCallHeaderData::SetCipheringIndicatorAllowed(
       
   383     TBool aAllowed )
       
   384     {
       
   385     iCipheringIndicatorAllowed = aAllowed;
       
   386     }
       
   387 
       
   388 // ---------------------------------------------------------
       
   389 // TPhoneCmdParamCallHeaderData::SetServiceId
       
   390 // ---------------------------------------------------------
       
   391 //
       
   392 void TPhoneCmdParamCallHeaderData::SetServiceId( TUint32 aServiceId )
       
   393     {
       
   394     iServiceId = aServiceId;
       
   395     }
       
   396 
       
   397 // ---------------------------------------------------------
       
   398 // TPhoneCmdParamCallHeaderData::ServiceId
       
   399 // ---------------------------------------------------------
       
   400 //
       
   401 TUint32 TPhoneCmdParamCallHeaderData::ServiceId() const
       
   402     {
       
   403     return iServiceId;
       
   404     }
       
   405 
       
   406 // ---------------------------------------------------------
       
   407 // TPhoneCmdParamCallHeaderData::SetContactLink
       
   408 // ---------------------------------------------------------
       
   409 //
       
   410 void TPhoneCmdParamCallHeaderData::SetContactLink(
       
   411     const TDesC8& aContactLink )
       
   412     {
       
   413     iContactLink.Set( aContactLink );
       
   414     }
       
   415 
       
   416 // ---------------------------------------------------------
       
   417 // TPhoneCmdParamCallHeaderData::ContactLink
       
   418 // ---------------------------------------------------------
       
   419 //
       
   420 const TDesC8& TPhoneCmdParamCallHeaderData::ContactLink() const
       
   421     {
       
   422     return iContactLink;
       
   423     }
       
   424 
       
   425 // ---------------------------------------------------------
       
   426 // TPhoneCmdParamCallHeaderData::SetRemotePhoneNumber
       
   427 // ---------------------------------------------------------
       
   428 //
       
   429 void TPhoneCmdParamCallHeaderData::SetRemotePhoneNumber(
       
   430     const TDesC& aPhoneNumber )
       
   431     {
       
   432     iRemotePhoneNumber.Set( aPhoneNumber );
       
   433     }
       
   434 
       
   435 // ---------------------------------------------------------
       
   436 // TPhoneCmdParamCallHeaderData::RemotePhoneNumber
       
   437 // ---------------------------------------------------------
       
   438 //
       
   439 const TDesC& TPhoneCmdParamCallHeaderData::RemotePhoneNumber() const
       
   440     {
       
   441     return iRemotePhoneNumber;
       
   442     }
       
   443 
       
   444 void TPhoneCmdParamCallHeaderData::SetCNAPText( 
       
   445   const TDesC& aCNAPText,
       
   446   TPhoneTextClippingDirection aDirection )
       
   447   {
       
   448   delete iCNAPText;
       
   449   iCNAPText = aCNAPText.Alloc();
       
   450   iCNAPTextClippingDirection = aDirection; 
       
   451   }
       
   452 
       
   453 void TPhoneCmdParamCallHeaderData::SetPicture( 
       
   454    const TDesC& aPicture )
       
   455    {
       
   456    iPicture.Set( aPicture );
       
   457    }
       
   458 
       
   459 void TPhoneCmdParamCallHeaderData::SetDiverted(
       
   460     TBool aDiverted )
       
   461     {
       
   462     iDiverted = aDiverted;        
       
   463     }
       
   464 
       
   465 void TPhoneCmdParamCallHeaderData::SetLine2(
       
   466     TBool aLine2 )
       
   467    {
       
   468    iLine2 = aLine2;
       
   469    }
       
   470     
       
   471 const TDesC& TPhoneCmdParamCallHeaderData::LabelText() const
       
   472    {
       
   473    return iLabelText ? *iLabelText : KNullDesC();
       
   474    }
       
   475 
       
   476 TBool TPhoneCmdParamCallHeaderData::Ciphering() const
       
   477    {
       
   478    return iCiphering;
       
   479    }
       
   480 
       
   481 const TDesC& TPhoneCmdParamCallHeaderData::CLIText() const
       
   482    {
       
   483    return iCLIText ? *iCLIText : KNullDesC();
       
   484    }
       
   485 
       
   486 TPhoneCmdParamCallHeaderData::TPhoneTextClippingDirection 
       
   487 TPhoneCmdParamCallHeaderData::CLITextClippingDirection() const
       
   488     {
       
   489     return iCLITextClippingDirection;
       
   490     }
       
   491 
       
   492 TPhoneCmdParamCallHeaderData::TPhoneTextClippingDirection 
       
   493 TPhoneCmdParamCallHeaderData::CNAPTextClippingDirection() const
       
   494     {
       
   495     return iCNAPTextClippingDirection;
       
   496     }
       
   497 
       
   498 const TDesC& TPhoneCmdParamCallHeaderData::CNAPText() const
       
   499    {
       
   500    return iCNAPText ? *iCNAPText : KNullDesC();
       
   501    }
       
   502 const TDesC& TPhoneCmdParamCallHeaderData::Picture() const
       
   503   {
       
   504   return iPicture;
       
   505   }
       
   506 TBool TPhoneCmdParamCallHeaderData::Diverted() const
       
   507     {
       
   508     return iDiverted;        
       
   509     }
       
   510 CFbsBitmap* TPhoneCmdParamCallHeaderData::Thumbnail() const
       
   511    {
       
   512    return iThumbnail;
       
   513    }
       
   514 void TPhoneCmdParamCallHeaderData::SetThumbnail( 
       
   515    CFbsBitmap* aThumbnail )
       
   516    {
       
   517    iThumbnail = aThumbnail;
       
   518    }
       
   519 void TPhoneCmdParamCallHeaderData::SetCallerText( 
       
   520    const TDesC& aCallerText )
       
   521    {
       
   522    iCallerText.Set( aCallerText );
       
   523    }
       
   524 const TDesC& TPhoneCmdParamCallHeaderData::CallerText() const
       
   525   {
       
   526   return iCallerText;
       
   527   }
       
   528 
       
   529 void TPhoneCmdParamCallHeaderData::SetParticipantListCLI(
       
   530     TPhoneParticipantListCLI aCLIType )
       
   531     {
       
   532     iParticipantListCLI = aCLIType;
       
   533     }
       
   534 
       
   535 TPhoneCmdParamCallHeaderData::TPhoneParticipantListCLI 
       
   536     TPhoneCmdParamCallHeaderData::ParticipantCLI() const
       
   537     {
       
   538     return iParticipantListCLI;    
       
   539     }       
       
   540 
       
   541 TBool TPhoneCmdParamCallHeaderData::HasThumbnail() const
       
   542     {
       
   543     return iHasThumbnail;
       
   544     }    
       
   545 
       
   546 void TPhoneCmdParamCallHeaderData::SetHasThumbnail( TBool aStatus )
       
   547     {
       
   548     iHasThumbnail = aStatus;
       
   549     }
       
   550 
       
   551 TBool TPhoneCmdParamCallHeaderData::CipheringIndicatorAllowed() const    
       
   552    {
       
   553    return iCipheringIndicatorAllowed;
       
   554    }
       
   555 
       
   556 TPhoneCmdParamCallHeaderData::~TPhoneCmdParamCallHeaderData()
       
   557    {
       
   558    delete iLabelText;
       
   559    delete iShortLabelText;
       
   560    delete iCLIText;
       
   561    delete iCNAPText;
       
   562    }
       
   563 
       
   564 // end of file