mmserv/radioutility/fmpresetutility/src/RadioFmPresetUtility.cpp
changeset 12 5a06f39ad45b
parent 0 71ca22bcf22a
child 14 80975da52420
equal deleted inserted replaced
0:71ca22bcf22a 12:5a06f39ad45b
     1 /*
       
     2 * Copyright (c) 2002-2004 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:  Contains implementation of the CRadioFmPresetUtility class,
       
    15 *             	which controlls the presets for an FM tuner.
       
    16 *
       
    17 */
       
    18 
       
    19  
       
    20 #include <RadioPresetUtility.h>
       
    21 #include <RadioFmPresetUtility.h>
       
    22 #include "RadioFmPresetUtilityBody.h"
       
    23 
       
    24 EXPORT_C CRadioFmPresetUtility* CRadioFmPresetUtility::NewL( MRadioPresetObserver& aObserver )
       
    25 	{
       
    26 	CRadioFmPresetUtility* self = new(ELeave) CRadioFmPresetUtility(aObserver);
       
    27 	CleanupStack::PushL(self);
       
    28 	self->iBody = CRadioFmPresetUtility::CBody::NewL( aObserver );
       
    29 	CleanupStack::Pop(self);
       
    30 	return self;
       
    31 	}
       
    32 
       
    33 // Destructor
       
    34 EXPORT_C CRadioFmPresetUtility::~CRadioFmPresetUtility()
       
    35 	{
       
    36 		delete iBody;
       
    37 	}
       
    38 
       
    39 CRadioFmPresetUtility::CRadioFmPresetUtility(MRadioPresetObserver& /*aObserver*/)
       
    40 	{
       
    41 	}
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // CRadioFmPresetUtility::SetPresetL
       
    45 // 
       
    46 // (other items were commented in a header).
       
    47 // -----------------------------------------------------------------------------
       
    48 //
       
    49 EXPORT_C void CRadioFmPresetUtility::SetPresetL( TInt aIndex, const TFmPresetName& aName, TInt aFrequency )
       
    50 	{	
       
    51 	iBody->SetPresetL(aIndex,aName,aFrequency);
       
    52 	}
       
    53 
       
    54 // -----------------------------------------------------------------------------
       
    55 // CRadioFmPresetUtility::SetPresetUrlL
       
    56 // 
       
    57 // (other items were commented in a header).
       
    58 // -----------------------------------------------------------------------------
       
    59 //
       
    60 EXPORT_C void CRadioFmPresetUtility::SetPresetUrlL( TInt aIndex, const TFmPresetUrl& aUrl )
       
    61     {
       
    62     iBody->SetPresetUrlL(aIndex, aUrl);
       
    63     }
       
    64 
       
    65 // -----------------------------------------------------------------------------
       
    66 // CRadioFmPresetUtility::SetPresetPtyL
       
    67 // 
       
    68 // (other items were commented in a header).
       
    69 // -----------------------------------------------------------------------------
       
    70 //
       
    71 EXPORT_C void CRadioFmPresetUtility::SetPresetPtyL( TInt aIndex, TUint aPty )
       
    72     {
       
    73     iBody->SetPresetPtyL(aIndex, aPty);
       
    74     }
       
    75 
       
    76 // -----------------------------------------------------------------------------
       
    77 // CRadioFmPresetUtility::SetPresetPICodeL
       
    78 // 
       
    79 // (other items were commented in a header).
       
    80 // -----------------------------------------------------------------------------
       
    81 //
       
    82 EXPORT_C void CRadioFmPresetUtility::SetPresetPICodeL( TInt aIndex, TUint aPICode )
       
    83     {
       
    84     iBody->SetPresetPICodeL(aIndex, aPICode);
       
    85     }
       
    86 // -----------------------------------------------------------------------------
       
    87 // CRadioFmPresetUtility::SetPresetFavouriteInfoL
       
    88 // 
       
    89 // (other items were commented in a header).
       
    90 // -----------------------------------------------------------------------------
       
    91 //
       
    92 EXPORT_C void CRadioFmPresetUtility::SetPresetFavouriteInfoL( TInt aIndex, TBool aFavourite )
       
    93     {
       
    94     iBody->SetPresetFavouriteInfoL(aIndex, aFavourite);
       
    95     }
       
    96 
       
    97 // -----------------------------------------------------------------------------
       
    98 // CRadioFmPresetUtility::SetPresetUserRenameInfoL
       
    99 // 
       
   100 // (other items were commented in a header).
       
   101 // -----------------------------------------------------------------------------
       
   102 //
       
   103 EXPORT_C void CRadioFmPresetUtility::SetPresetUserRenameInfoL( TInt aIndex, TBool aRename )
       
   104     {
       
   105     iBody->SetPresetUserRenameInfoL(aIndex, aRename);
       
   106     }
       
   107 
       
   108 // -----------------------------------------------------------------------------
       
   109 // CRadioFmPresetUtility::GetPresetL
       
   110 // 
       
   111 // (other items were commented in a header).
       
   112 // -----------------------------------------------------------------------------
       
   113 //	
       
   114 EXPORT_C void CRadioFmPresetUtility::GetPresetL( TInt aIndex, TFmPresetName& aName, TInt& aFrequency )
       
   115 	{
       
   116     iBody->GetPresetL(aIndex,aName,aFrequency);
       
   117 	}
       
   118 
       
   119 // -----------------------------------------------------------------------------
       
   120 // CRadioFmPresetUtility::GetPresetNameL
       
   121 // 
       
   122 // (other items were commented in a header).
       
   123 // -----------------------------------------------------------------------------
       
   124 //	
       
   125 EXPORT_C void CRadioFmPresetUtility::GetPresetNameL( TInt aIndex, TFmPresetName& aName)
       
   126 	{
       
   127     iBody->GetPresetNameL(aIndex,aName);
       
   128 	}
       
   129 
       
   130 // -----------------------------------------------------------------------------
       
   131 // CRadioFmPresetUtility::GetPresetUrlL
       
   132 // 
       
   133 // (other items were commented in a header).
       
   134 // -----------------------------------------------------------------------------
       
   135 //	
       
   136 EXPORT_C void CRadioFmPresetUtility::GetPresetUrlL( TInt aIndex, TFmPresetUrl& aUrl)
       
   137 	{
       
   138     iBody->GetPresetUrlL(aIndex,aUrl);
       
   139 	}
       
   140 
       
   141 // -----------------------------------------------------------------------------
       
   142 // CRadioFmPresetUtility::GetPresetPtyL
       
   143 // 
       
   144 // (other items were commented in a header).
       
   145 // -----------------------------------------------------------------------------
       
   146 //  
       
   147 EXPORT_C void CRadioFmPresetUtility::GetPresetPtyL( TInt aIndex, TUint& aPty)
       
   148     {
       
   149     iBody->GetPresetPtyL(aIndex,aPty);
       
   150     }
       
   151 
       
   152 // -----------------------------------------------------------------------------
       
   153 // CRadioFmPresetUtility::GetPresetPICodeL
       
   154 // 
       
   155 // (other items were commented in a header).
       
   156 // -----------------------------------------------------------------------------
       
   157 //  
       
   158 EXPORT_C void CRadioFmPresetUtility::GetPresetPICodeL( TInt aIndex, TUint& aPICode)
       
   159     {
       
   160     iBody->GetPresetPICodeL(aIndex,aPICode);
       
   161     }
       
   162 
       
   163 
       
   164 // -----------------------------------------------------------------------------
       
   165 // CRadioFmPresetUtility::GetPresetFavouriteInfoL
       
   166 // 
       
   167 // (other items were commented in a header).
       
   168 // -----------------------------------------------------------------------------
       
   169 //  
       
   170 EXPORT_C void CRadioFmPresetUtility::GetPresetFavouriteInfoL( TInt aIndex, TBool& aFavourite)
       
   171     {
       
   172     iBody->GetPresetFavouriteInfoL(aIndex,aFavourite);
       
   173     }
       
   174 
       
   175 // -----------------------------------------------------------------------------
       
   176 // CRadioFmPresetUtility::GetPresetUserRenameInfoL
       
   177 // 
       
   178 // (other items were commented in a header).
       
   179 // -----------------------------------------------------------------------------
       
   180 //  
       
   181 EXPORT_C void CRadioFmPresetUtility::GetPresetUserRenameInfoL( TInt aIndex, TBool& aRename)
       
   182     {
       
   183     iBody->GetPresetUserRenameInfoL(aIndex,aRename);
       
   184     }
       
   185 
       
   186 // -----------------------------------------------------------------------------
       
   187 // CRadioFmPresetUtility::GetPresetFrequencyL
       
   188 // 
       
   189 // (other items were commented in a header).
       
   190 // -----------------------------------------------------------------------------
       
   191 //	
       
   192 EXPORT_C void CRadioFmPresetUtility::GetPresetFrequencyL( TInt aIndex, TInt& aFrequency)
       
   193 	{
       
   194     iBody->GetPresetFrequencyL(aIndex,aFrequency);
       
   195 	}
       
   196 
       
   197 // -----------------------------------------------------------------------------
       
   198 // CRadioFmPresetUtility::GetMaxNumberOfPresets
       
   199 // 
       
   200 // (other items were commented in a header).
       
   201 // -----------------------------------------------------------------------------
       
   202 //
       
   203 EXPORT_C TInt CRadioFmPresetUtility::GetMaxNumberOfPresets( TInt& aMaxNumOfPresets ) const
       
   204 	{
       
   205 	return iBody->GetMaxNumberOfPresets(aMaxNumOfPresets);
       
   206 	}
       
   207 
       
   208 // -----------------------------------------------------------------------------
       
   209 // CRadioFmPresetUtility::GetNumberOfPresets
       
   210 // 
       
   211 // (other items were commented in a header).
       
   212 // -----------------------------------------------------------------------------
       
   213 //	
       
   214 EXPORT_C TInt CRadioFmPresetUtility::GetNumberOfPresets( TInt& aNumOfPresets ) const
       
   215 	{
       
   216 	return iBody->GetNumberOfPresets(aNumOfPresets);
       
   217 	}
       
   218 
       
   219 // -----------------------------------------------------------------------------
       
   220 // CRadioFmPresetUtility::GetFirstPresetL
       
   221 // 
       
   222 // (other items were commented in a header).
       
   223 // -----------------------------------------------------------------------------
       
   224 //
       
   225 EXPORT_C void CRadioFmPresetUtility::GetFirstPresetL( TInt& aIndex) const
       
   226 	{
       
   227     iBody->GetFirstPresetL(aIndex);
       
   228 	}
       
   229 
       
   230 // -----------------------------------------------------------------------------
       
   231 // CRadioFmPresetUtility::GetNextPresetL
       
   232 // 
       
   233 // (other items were commented in a header).
       
   234 // -----------------------------------------------------------------------------
       
   235 //
       
   236 EXPORT_C void CRadioFmPresetUtility::GetNextPresetL( TInt aIndex, TInt& aNextIndex ) const
       
   237 	{
       
   238     iBody->GetNextPresetL(aIndex,aNextIndex);
       
   239 	}
       
   240 
       
   241 // -----------------------------------------------------------------------------
       
   242 // CRadioFmPresetUtility::DeletePresetL
       
   243 // 
       
   244 // (other items were commented in a header).
       
   245 // -----------------------------------------------------------------------------
       
   246 //	
       
   247 EXPORT_C void CRadioFmPresetUtility::DeletePresetL( TInt aIndex )
       
   248 	{
       
   249     iBody->DeletePresetL(aIndex);
       
   250 	}
       
   251 // End of File