phoneapp/phoneuiutils/src/tphonecmdparamnote.cpp
changeset 37 ba76fc04e6c2
child 51 f39ed5e045e0
equal deleted inserted replaced
36:2eacb6118286 37:ba76fc04e6c2
       
     1 /*
       
     2 * Copyright (c) 2005 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 TPhoneCmdParamNote class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "tphonecmdparamnote.h" 
       
    21 #include "phoneui.pan"
       
    22 
       
    23 // ================= MEMBER FUNCTIONS =======================
       
    24 
       
    25 // -----------------------------------------------------------------------------
       
    26 // TPhoneCmdParamNote::TPhoneCmdParamNote
       
    27 // C++ default constructor can NOT contain any code, that
       
    28 // might leave.
       
    29 // -----------------------------------------------------------------------------
       
    30 //
       
    31 EXPORT_C TPhoneCmdParamNote::TPhoneCmdParamNote():
       
    32     TPhoneCommandParam(),
       
    33     iType( EPhoneNoteCustom ),
       
    34     iResourceId( 0 ),
       
    35     iTextResourceId( 0 ),
       
    36     iText( KNullDesC ),
       
    37     iTone( CAknNoteDialog::ENoTone ),
       
    38     iTimeout( CAknNoteDialog::ENoTimeout )
       
    39     {
       
    40     iParamId = EPhoneParamIdNote;
       
    41     }
       
    42 
       
    43 // ---------------------------------------------------------
       
    44 // TPhoneCmdParamNote::SetType
       
    45 // Sets the note type
       
    46 // (other items were commented in a header).
       
    47 // ---------------------------------------------------------
       
    48 //
       
    49 EXPORT_C void TPhoneCmdParamNote::SetType( TPhoneNoteType aType )
       
    50    {
       
    51    iType = aType;   
       
    52    }
       
    53 
       
    54 // ---------------------------------------------------------
       
    55 // TPhoneCmdParamNote::SetResourceId
       
    56 // Sets the note resource ID
       
    57 // (other items were commented in a header).
       
    58 // ---------------------------------------------------------
       
    59 //
       
    60 EXPORT_C void TPhoneCmdParamNote::SetResourceId( TInt aResourceId )
       
    61    {
       
    62    __ASSERT_DEBUG( aResourceId, Panic( EPhoneUtilsParameterNotInitialized ) );
       
    63    iResourceId = aResourceId;   
       
    64    }
       
    65 
       
    66 // ---------------------------------------------------------
       
    67 // TPhoneCmdParamNote::SetTextResourceId
       
    68 // Sets the note text resource ID
       
    69 // (other items were commented in a header).
       
    70 // ---------------------------------------------------------
       
    71 //
       
    72 EXPORT_C void TPhoneCmdParamNote::SetTextResourceId( TInt aTextResourceId )
       
    73     {
       
    74     __ASSERT_DEBUG( aTextResourceId,
       
    75         Panic( EPhoneUtilsParameterNotInitialized ) );
       
    76     iTextResourceId = aTextResourceId;   
       
    77     }
       
    78 
       
    79 // ---------------------------------------------------------
       
    80 // TPhoneCmdParamNote::SetText
       
    81 // Sets the note text
       
    82 // (other items were commented in a header).
       
    83 // ---------------------------------------------------------
       
    84 //
       
    85 EXPORT_C void TPhoneCmdParamNote::SetText( const TDesC& aText )
       
    86    {
       
    87    iText.Set( aText );   
       
    88    }
       
    89 
       
    90 // ---------------------------------------------------------
       
    91 // TPhoneCmdParamNote::SetTone
       
    92 // Sets the note tone
       
    93 // (other items were commented in a header).
       
    94 // ---------------------------------------------------------
       
    95 //
       
    96 EXPORT_C void TPhoneCmdParamNote::SetTone( CAknNoteDialog::TTone aTone )
       
    97    {
       
    98    iTone = aTone;   
       
    99    }
       
   100 
       
   101 // ---------------------------------------------------------
       
   102 // TPhoneCmdParamNote::SetTimeout
       
   103 // Sets the note timeout
       
   104 // (other items were commented in a header).
       
   105 // ---------------------------------------------------------
       
   106 //
       
   107 EXPORT_C void TPhoneCmdParamNote::SetTimeout( 
       
   108    CAknNoteDialog::TTimeout aTimeout )
       
   109    {
       
   110    iTimeout = aTimeout;   
       
   111    }
       
   112 
       
   113 // ---------------------------------------------------------
       
   114 // TPhoneCmdParamNote::Type
       
   115 // Returns the note type
       
   116 // (other items were commented in a header).
       
   117 // ---------------------------------------------------------
       
   118 //
       
   119 EXPORT_C TPhoneNoteType TPhoneCmdParamNote::Type() const
       
   120    {
       
   121    return iType;
       
   122    }
       
   123 
       
   124 // ---------------------------------------------------------
       
   125 // TPhoneCmdParamNote::ResourceId
       
   126 // Returns the note resource ID
       
   127 // (other items were commented in a header).
       
   128 // ---------------------------------------------------------
       
   129 //
       
   130 EXPORT_C TInt TPhoneCmdParamNote::ResourceId() const
       
   131     {
       
   132     return iResourceId;
       
   133     }
       
   134 
       
   135 // ---------------------------------------------------------
       
   136 // TPhoneCmdParamNote::TextResourceId
       
   137 // Returns the note text resource ID
       
   138 // (other items were commented in a header).
       
   139 // ---------------------------------------------------------
       
   140 //
       
   141 EXPORT_C TInt TPhoneCmdParamNote::TextResourceId() const
       
   142     {
       
   143     return iTextResourceId;
       
   144     }
       
   145 
       
   146 // ---------------------------------------------------------
       
   147 // TPhoneCmdParamNote::Text
       
   148 // Returns the note text
       
   149 // (other items were commented in a header).
       
   150 // ---------------------------------------------------------
       
   151 //
       
   152 EXPORT_C const TDesC& TPhoneCmdParamNote::Text() const
       
   153    {
       
   154    return iText;
       
   155    }
       
   156 
       
   157 // ---------------------------------------------------------
       
   158 // TPhoneCmdParamNote::Tone
       
   159 // Returns the note tone
       
   160 // (other items were commented in a header).
       
   161 // ---------------------------------------------------------
       
   162 //
       
   163 EXPORT_C CAknNoteDialog::TTone TPhoneCmdParamNote::Tone() const
       
   164    {
       
   165    return iTone;
       
   166    }
       
   167 
       
   168 // ---------------------------------------------------------
       
   169 // TPhoneCmdParamNote::Timeout
       
   170 // Returns the note timeout
       
   171 // (other items were commented in a header).
       
   172 // ---------------------------------------------------------
       
   173 //
       
   174 EXPORT_C CAknNoteDialog::TTimeout TPhoneCmdParamNote::Timeout() const
       
   175    {
       
   176    return iTimeout;
       
   177    }
       
   178 
       
   179 //  End of File