mmserv/radioutility/radio_utility/src/RadioRdsUtility.cpp
changeset 0 71ca22bcf22a
child 16 43d09473c595
equal deleted inserted replaced
-1:000000000000 0:71ca22bcf22a
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Radio RDS Utility API implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "RadioRdsUtilityBody.h"
       
    20 
       
    21 // -----------------------------------------------------------------------------
       
    22 // CRadioRdsUtility::NewL
       
    23 // (other items were commented in a header).
       
    24 // -----------------------------------------------------------------------------
       
    25 //
       
    26 CRadioRdsUtility* CRadioRdsUtility::NewL(
       
    27     RRadioSession& aRadioSession,
       
    28     MRadioRdsObserver& aObserver)
       
    29     {
       
    30     CRadioRdsUtility* self = new(ELeave) CRadioRdsUtility;
       
    31     CleanupStack::PushL(self);
       
    32     self->iBody = CRadioRdsUtility::CBody::NewL(aRadioSession, aObserver);
       
    33     CleanupStack::Pop();
       
    34     return self;
       
    35     }
       
    36 
       
    37 // -----------------------------------------------------------------------------
       
    38 // CRadioRdsUtility::~CRadioRdsUtility
       
    39 // (other items were commented in a header).
       
    40 // -----------------------------------------------------------------------------
       
    41 //
       
    42 CRadioRdsUtility::~CRadioRdsUtility()
       
    43     {
       
    44         delete iBody;
       
    45     }
       
    46 
       
    47 // -----------------------------------------------------------------------------
       
    48 // CRadioRdsUtility::CRadioRdsUtility
       
    49 // (other items were commented in a header).
       
    50 // -----------------------------------------------------------------------------
       
    51 //
       
    52 CRadioRdsUtility::CRadioRdsUtility()
       
    53     {
       
    54     }
       
    55 
       
    56 // -----------------------------------------------------------------------------
       
    57 // CRadioRdsUtility::Close
       
    58 // (other items were commented in a header).
       
    59 // -----------------------------------------------------------------------------
       
    60 EXPORT_C void CRadioRdsUtility::Close()
       
    61     {
       
    62     ASSERT(iBody);
       
    63     return iBody->Close();
       
    64     }
       
    65 
       
    66 // -----------------------------------------------------------------------------
       
    67 // CRadioRdsUtility::GetCapabilities
       
    68 // (other items were commented in a header).
       
    69 // -----------------------------------------------------------------------------
       
    70 EXPORT_C TInt CRadioRdsUtility::GetCapabilities(
       
    71     TRdsCapabilities& aCaps ) const
       
    72     {
       
    73     ASSERT(iBody);
       
    74     return iBody->GetCapabilities(aCaps);
       
    75     }
       
    76 
       
    77 // -----------------------------------------------------------------------------
       
    78 // CRadioRdsUtility::GetRdsSignalStatus
       
    79 // (other items were commented in a header).
       
    80 // -----------------------------------------------------------------------------
       
    81 EXPORT_C TInt CRadioRdsUtility::GetRdsSignalStatus(
       
    82     TBool& aRdsSignal ) const
       
    83     {
       
    84     ASSERT(iBody);
       
    85     return iBody->GetRdsSignalStatus( aRdsSignal );
       
    86     }
       
    87 
       
    88 // -----------------------------------------------------------------------------
       
    89 // CRadioRdsUtility::NotifyRdsDataChange
       
    90 // (other items were commented in a header).
       
    91 // -----------------------------------------------------------------------------
       
    92 EXPORT_C TInt CRadioRdsUtility::NotifyRdsDataChange(
       
    93     TRdsData aRdsData )
       
    94     {
       
    95     ASSERT(iBody);
       
    96     return iBody->NotifyRdsDataChange( aRdsData );
       
    97     }
       
    98 
       
    99 // -----------------------------------------------------------------------------
       
   100 // CRadioRdsUtility::CancelNotifyRdsDataChange
       
   101 // (other items were commented in a header).
       
   102 // -----------------------------------------------------------------------------
       
   103 EXPORT_C void CRadioRdsUtility::CancelNotifyRdsDataChange()
       
   104     {
       
   105     ASSERT(iBody);
       
   106     iBody->CancelNotifyRdsDataChange();
       
   107     }
       
   108 
       
   109 // -----------------------------------------------------------------------------
       
   110 // CRadioRdsUtility::SetAutomaticSwitching
       
   111 // (other items were commented in a header).
       
   112 // -----------------------------------------------------------------------------
       
   113 EXPORT_C TInt CRadioRdsUtility::SetAutomaticSwitching(
       
   114     TBool aAuto )
       
   115     {
       
   116     ASSERT(iBody);
       
   117     return iBody->SetAutomaticSwitching(aAuto);
       
   118     }
       
   119 
       
   120 // -----------------------------------------------------------------------------
       
   121 // CRadioRdsUtility::GetAutomaticSwitching
       
   122 // (other items were commented in a header).
       
   123 // -----------------------------------------------------------------------------
       
   124 EXPORT_C TInt CRadioRdsUtility::GetAutomaticSwitching(
       
   125     TBool& aAuto )
       
   126     {
       
   127     ASSERT(iBody);
       
   128     return iBody->GetAutomaticSwitching(aAuto);
       
   129     }
       
   130 
       
   131 // -----------------------------------------------------------------------------
       
   132 // CRadioRdsUtility::CancelAFSearch
       
   133 // (other items were commented in a header).
       
   134 // -----------------------------------------------------------------------------
       
   135 EXPORT_C void CRadioRdsUtility::CancelAFSearch()
       
   136     {
       
   137     ASSERT(iBody);
       
   138     iBody->CancelAFSearch();
       
   139     }
       
   140 
       
   141 // -----------------------------------------------------------------------------
       
   142 // CRadioRdsUtility::SetAutomaticTrafficAnnouncement
       
   143 // (other items were commented in a header).
       
   144 // -----------------------------------------------------------------------------
       
   145 EXPORT_C TInt CRadioRdsUtility::SetAutomaticTrafficAnnouncement(
       
   146     TBool aAuto )
       
   147     {
       
   148     ASSERT(iBody);
       
   149     return iBody->SetAutomaticTrafficAnnouncement(aAuto);
       
   150     }
       
   151 
       
   152 // -----------------------------------------------------------------------------
       
   153 // CRadioRdsUtility::GetAutomaticTrafficAnnouncement
       
   154 // (other items were commented in a header).
       
   155 // -----------------------------------------------------------------------------
       
   156 EXPORT_C TInt CRadioRdsUtility::GetAutomaticTrafficAnnouncement(
       
   157     TBool& aAuto )
       
   158     {
       
   159     ASSERT(iBody);
       
   160     return iBody->GetAutomaticTrafficAnnouncement(aAuto);
       
   161     }
       
   162 
       
   163 // -----------------------------------------------------------------------------
       
   164 // CRadioRdsUtility::StationSeekByPTY
       
   165 // (other items were commented in a header).
       
   166 // -----------------------------------------------------------------------------
       
   167 EXPORT_C void CRadioRdsUtility::StationSeekByPTY(
       
   168     TRdsProgrammeType aPty,
       
   169     TBool aUpwards )
       
   170     {
       
   171     ASSERT(iBody);
       
   172     iBody->StationSeekByPTY(aPty, aUpwards);
       
   173     }
       
   174 
       
   175 // -----------------------------------------------------------------------------
       
   176 // CRadioRdsUtility::StationSeekByTA
       
   177 // (other items were commented in a header).
       
   178 // -----------------------------------------------------------------------------
       
   179 EXPORT_C void CRadioRdsUtility::StationSeekByTA(
       
   180     TBool aSeekUp )
       
   181     {
       
   182     ASSERT(iBody);
       
   183     iBody->StationSeekByTA(aSeekUp);
       
   184     }
       
   185 
       
   186 // -----------------------------------------------------------------------------
       
   187 // CRadioRdsUtility::StationSeekByTP
       
   188 // (other items were commented in a header).
       
   189 // -----------------------------------------------------------------------------
       
   190 EXPORT_C void CRadioRdsUtility::StationSeekByTP(
       
   191     TBool aSeekUp )
       
   192     {
       
   193     ASSERT(iBody);
       
   194     iBody->StationSeekByTP(aSeekUp);
       
   195     }
       
   196 
       
   197 // -----------------------------------------------------------------------------
       
   198 // CRadioRdsUtility::CancelRdsStationSeek
       
   199 // (other items were commented in a header).
       
   200 // -----------------------------------------------------------------------------
       
   201 EXPORT_C void CRadioRdsUtility::CancelRdsStationSeek()
       
   202     {
       
   203     ASSERT(iBody);
       
   204     iBody->CancelRdsStationSeek();
       
   205     }
       
   206 
       
   207 // -----------------------------------------------------------------------------
       
   208 // CRadioRdsUtility::GetFreqByPTY
       
   209 // (other items were commented in a header).
       
   210 // -----------------------------------------------------------------------------
       
   211 EXPORT_C void CRadioRdsUtility::GetFreqByPTY(
       
   212     TRdsProgrammeType aPty )
       
   213     {
       
   214     ASSERT(iBody);
       
   215     iBody->GetFreqByPTY( aPty );
       
   216     }
       
   217 
       
   218 // -----------------------------------------------------------------------------
       
   219 // CRadioRdsUtility::CancelGetFreqByPTY
       
   220 // (other items were commented in a header).
       
   221 // -----------------------------------------------------------------------------
       
   222 EXPORT_C void CRadioRdsUtility::CancelGetFreqByPTY()
       
   223     {
       
   224     ASSERT(iBody);
       
   225     iBody->CancelGetFreqByPTY();
       
   226     }
       
   227 
       
   228 // -----------------------------------------------------------------------------
       
   229 // CRadioRdsUtility::GetFreqByTA
       
   230 // (other items were commented in a header).
       
   231 // -----------------------------------------------------------------------------
       
   232 EXPORT_C void CRadioRdsUtility::GetFreqByTA()
       
   233     {
       
   234     ASSERT(iBody);
       
   235     iBody->GetFreqByTA();
       
   236     }
       
   237 
       
   238 // -----------------------------------------------------------------------------
       
   239 // CRadioRdsUtility::CancelGetFreqByTA
       
   240 // (other items were commented in a header).
       
   241 // -----------------------------------------------------------------------------
       
   242 EXPORT_C void CRadioRdsUtility::CancelGetFreqByTA()
       
   243     {
       
   244     ASSERT(iBody);
       
   245     iBody->CancelGetFreqByTA();
       
   246     }
       
   247 
       
   248 // -----------------------------------------------------------------------------
       
   249 // CRadioRdsUtility::GetPSByPTY
       
   250 // (other items were commented in a header).
       
   251 // -----------------------------------------------------------------------------
       
   252 EXPORT_C void CRadioRdsUtility::GetPSByPTY(
       
   253     TRdsProgrammeType aPty )
       
   254     {
       
   255     ASSERT(iBody);
       
   256     iBody->GetPSByPTY( aPty );
       
   257     }
       
   258 
       
   259 // -----------------------------------------------------------------------------
       
   260 // CRadioRdsUtility::CancelGetPSByPTY
       
   261 // (other items were commented in a header).
       
   262 // -----------------------------------------------------------------------------
       
   263 EXPORT_C void CRadioRdsUtility::CancelGetPSByPTY()
       
   264     {
       
   265     ASSERT(iBody);
       
   266     iBody->CancelGetPSByPTY();
       
   267     }
       
   268 
       
   269 // -----------------------------------------------------------------------------
       
   270 // CRadioRdsUtility::GetPSByTA
       
   271 // (other items were commented in a header).
       
   272 // -----------------------------------------------------------------------------
       
   273 EXPORT_C void CRadioRdsUtility::GetPSByTA()
       
   274     {
       
   275     ASSERT(iBody);
       
   276     iBody->GetPSByTA();
       
   277     }
       
   278 
       
   279 // -----------------------------------------------------------------------------
       
   280 // CRadioRdsUtility::CancelGetPSByTA
       
   281 // (other items were commented in a header).
       
   282 // -----------------------------------------------------------------------------
       
   283 EXPORT_C void CRadioRdsUtility::CancelGetPSByTA()
       
   284     {
       
   285     ASSERT(iBody);
       
   286     iBody->CancelGetPSByTA();
       
   287     }
       
   288 
       
   289 // -----------------------------------------------------------------------------
       
   290 // CRadioRdsUtility::GetProgrammeIdentification
       
   291 // (other items were commented in a header).
       
   292 // -----------------------------------------------------------------------------
       
   293 EXPORT_C TInt CRadioRdsUtility::GetProgrammeIdentification(
       
   294     TInt& aPi )
       
   295     {
       
   296     ASSERT(iBody);
       
   297     return iBody->GetProgrammeIdentification( aPi );
       
   298     }
       
   299 
       
   300 // -----------------------------------------------------------------------------
       
   301 // CRadioRdsUtility::GetProgrammeType
       
   302 // (other items were commented in a header).
       
   303 // -----------------------------------------------------------------------------
       
   304 EXPORT_C TInt CRadioRdsUtility::GetProgrammeType(
       
   305     TRdsProgrammeType& aPty )
       
   306     {
       
   307     ASSERT(iBody);
       
   308     return iBody->GetProgrammeType( aPty );
       
   309     }
       
   310 
       
   311 // -----------------------------------------------------------------------------
       
   312 // CRadioRdsUtility::GetProgrammeService
       
   313 // (other items were commented in a header).
       
   314 // -----------------------------------------------------------------------------
       
   315 EXPORT_C TInt CRadioRdsUtility::GetProgrammeService(
       
   316     TRdsPSName& aPs )
       
   317     {
       
   318     ASSERT(iBody);
       
   319     return iBody->GetProgrammeService( aPs );
       
   320     }
       
   321 
       
   322 // -----------------------------------------------------------------------------
       
   323 // CRadioRdsUtility::GetRadioText
       
   324 // (other items were commented in a header).
       
   325 // -----------------------------------------------------------------------------
       
   326 EXPORT_C TInt CRadioRdsUtility::GetRadioText(
       
   327     TRdsRadioText& aRt )
       
   328     {
       
   329     ASSERT(iBody);
       
   330     return iBody->GetRadioText( aRt );
       
   331     }
       
   332 
       
   333 // -----------------------------------------------------------------------------
       
   334 // CRadioRdsUtility::GetRadioTextPlus
       
   335 // (other items were commented in a header).
       
   336 // -----------------------------------------------------------------------------
       
   337 EXPORT_C TInt CRadioRdsUtility::GetRadioTextPlus(
       
   338     TRdsRTplusClass aRtPlusClass,
       
   339     TRdsRadioText& aRtPlusData )
       
   340     {
       
   341     ASSERT(iBody);
       
   342     return iBody->GetRadioTextPlus( aRtPlusClass,aRtPlusData );
       
   343     }
       
   344 
       
   345 // -----------------------------------------------------------------------------
       
   346 // CRadioRdsUtility::GetClockTime
       
   347 // (other items were commented in a header).
       
   348 // -----------------------------------------------------------------------------
       
   349 EXPORT_C TInt CRadioRdsUtility::GetClockTime(
       
   350     TDateTime& aCt )
       
   351     {
       
   352     ASSERT(iBody);
       
   353     return iBody->GetClockTime( aCt );
       
   354     }
       
   355 
       
   356 // -----------------------------------------------------------------------------
       
   357 // CRadioRdsUtility::GetTrafficAnnouncementStatus
       
   358 // (other items were commented in a header).
       
   359 // -----------------------------------------------------------------------------
       
   360 EXPORT_C TInt CRadioRdsUtility::GetTrafficAnnouncementStatus(
       
   361     TBool& aTaStatus )
       
   362     {
       
   363     ASSERT(iBody);
       
   364     return iBody->GetTrafficAnnouncementStatus( aTaStatus );
       
   365     }
       
   366 
       
   367 // -----------------------------------------------------------------------------
       
   368 // CRadioRdsUtility::GetTrafficProgrammeStatus
       
   369 // (other items were commented in a header).
       
   370 // -----------------------------------------------------------------------------
       
   371 EXPORT_C TInt CRadioRdsUtility::GetTrafficProgrammeStatus(
       
   372     TBool& aTpStatus )
       
   373     {
       
   374     ASSERT(iBody);
       
   375     return iBody->GetTrafficProgrammeStatus( aTpStatus );
       
   376     }
       
   377 
       
   378 
       
   379 // End of File