phoneapp/phoneuiutils/src/tphonecmdparamspeeddial.cpp
changeset 0 5f000ab63145
child 21 92ab7f8d0eab
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2006 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 TPhoneCmdParamSpeedDial class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "tphonecmdparamspeeddial.h"   
       
    21 #include "phoneui.pan"
       
    22 
       
    23 // ================= MEMBER FUNCTIONS =======================
       
    24 
       
    25 // -----------------------------------------------------------------------------
       
    26 // TPhoneCmdParamSpeedDial::TPhoneCmdParamSpeedDial
       
    27 // C++ default constructor can NOT contain any code, that
       
    28 // might leave.
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 EXPORT_C TPhoneCmdParamSpeedDial::TPhoneCmdParamSpeedDial() :
       
    32     TPhoneCommandParam(),
       
    33     iPhoneNumber( NULL ),
       
    34     iNumberType( EPhoneNumberTypeNotFound ),
       
    35     iLocation( KErrNotFound ),
       
    36     iServiceId( 0 )
       
    37     {
       
    38     iParamId = EPhoneParamIdSpeedDial;
       
    39     }
       
    40 
       
    41 // ---------------------------------------------------------
       
    42 // TPhoneCmdParamSpeedDial::SetPhoneNumber
       
    43 // Sets the phone number.
       
    44 // (other items were commented in a header).
       
    45 // ---------------------------------------------------------
       
    46 //
       
    47 EXPORT_C void TPhoneCmdParamSpeedDial::SetPhoneNumber( TPtr* aPhoneNumber )
       
    48    	{
       
    49    	__ASSERT_DEBUG( aPhoneNumber, 
       
    50    		Panic( EPhoneUtilsParameterNotInitialized ) );
       
    51    	iPhoneNumber = aPhoneNumber;   
       
    52    	}
       
    53 
       
    54 // ---------------------------------------------------------
       
    55 // TPhoneCmdParamSpeedDial::PhoneNumber
       
    56 // Returns the phone number.
       
    57 // (other items were commented in a header).
       
    58 // ---------------------------------------------------------
       
    59 //
       
    60 EXPORT_C TPtr* TPhoneCmdParamSpeedDial::PhoneNumber()
       
    61    	{
       
    62    	__ASSERT_DEBUG( iPhoneNumber, 
       
    63    		Panic( EPhoneUtilsInvariant ) );
       
    64    	return iPhoneNumber;
       
    65    	}
       
    66 
       
    67 // ---------------------------------------------------------
       
    68 // TPhoneCmdParamSpeedDial::SetNumberType
       
    69 // Sets the phone number's type.
       
    70 // (other items were commented in a header).
       
    71 // ---------------------------------------------------------
       
    72 //
       
    73 EXPORT_C void TPhoneCmdParamSpeedDial::SetNumberType( TPhoneNumberType aNumberType )
       
    74    {
       
    75    iNumberType = aNumberType;   
       
    76    }
       
    77 
       
    78 // ---------------------------------------------------------
       
    79 // TPhoneCmdParamSpeedDial::NumberType
       
    80 // Returns the phone number's type.
       
    81 // (other items were commented in a header).
       
    82 // ---------------------------------------------------------
       
    83 //
       
    84 EXPORT_C TPhoneNumberType TPhoneCmdParamSpeedDial::NumberType()
       
    85    {
       
    86    return iNumberType;
       
    87    }
       
    88 
       
    89 // ---------------------------------------------------------
       
    90 // TPhoneCmdParamSpeedDial::SetLocation
       
    91 // Sets the speed dial location.
       
    92 // (other items were commented in a header).
       
    93 // ---------------------------------------------------------
       
    94 //
       
    95 EXPORT_C void TPhoneCmdParamSpeedDial::SetLocation( TInt aLocation )
       
    96    	{
       
    97    	__ASSERT_DEBUG( aLocation >= 0, 
       
    98    		Panic( EPhoneUtilsParameterNotInitialized ) );
       
    99    	iLocation = aLocation;   
       
   100    	}
       
   101 
       
   102 // ---------------------------------------------------------
       
   103 // TPhoneCmdParamSpeedDial::Location
       
   104 // Returns the speed dial location.
       
   105 // (other items were commented in a header).
       
   106 // ---------------------------------------------------------
       
   107 //
       
   108 EXPORT_C TInt TPhoneCmdParamSpeedDial::Location()
       
   109    	{
       
   110    	__ASSERT_DEBUG( iLocation >= 0, 
       
   111    		Panic( EPhoneUtilsInvariant ) );
       
   112    	return iLocation;
       
   113    	}
       
   114 
       
   115 // ---------------------------------------------------------
       
   116 // TPhoneCmdParamSpeedDial::SetServiceId
       
   117 // Sets the serviceId
       
   118 // ---------------------------------------------------------
       
   119 //
       
   120 EXPORT_C void TPhoneCmdParamSpeedDial::SetServiceId( TUint aServiceId )
       
   121     {
       
   122     iServiceId = aServiceId;
       
   123     }
       
   124 
       
   125 // ---------------------------------------------------------
       
   126 // TPhoneCmdParamSpeedDial::ServiceId
       
   127 // Returns the serviceId
       
   128 // ---------------------------------------------------------
       
   129 //
       
   130 EXPORT_C TUint TPhoneCmdParamSpeedDial::ServiceId() const
       
   131     {
       
   132     return iServiceId;
       
   133     }
       
   134 
       
   135 //  End of File