upnpavcontroller/upnpxmlparser/src/upnpxmleventparser.cpp
branchnew development branch with rendering state machine and other goodies
changeset 38 5360b7ddc251
parent 0 7f85d04be362
equal deleted inserted replaced
32:3785f754ee62 38:5360b7ddc251
     1 /*
     1 /*
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2006,2009 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    13 *
    13 *
    14 * Description:      XML SAX Parser for UPnP.
    14 * Description:      XML SAX Parser for UPnP.
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #include <xml/parser.h>
    18 #include <xml/parser.h>
    24 #include <xml/parserfeature.h>
    19 #include <xml/parserfeature.h>
    25 #include <upnpstring.h>
    20 #include <upnpstring.h>
    26 #include <xml/matchdata.h>
    21 #include <xml/matchdata.h>
    27 
    22 
    28 #include "upnpxmleventparser.h"
    23 #include "upnpxmleventparser.h"
       
    24 #include "upnpavtevent.h"
    29 
    25 
    30 _LIT( KComponentLogfile, "upnpxmlparser.txt");
    26 _LIT( KComponentLogfile, "upnpxmlparser.txt");
    31 #include "upnplog.h"
    27 #include "upnplog.h"
    32 
    28 
    33 _LIT8( KXmlMimeType,    "text/xml"     );
    29 _LIT8( KXmlMimeType,    "text/xml"     );
    41 _LIT8( KDesc,           "desc"          );
    37 _LIT8( KDesc,           "desc"          );
    42 _LIT8( KDlnaDoc,        "X_DLNADOC"     );
    38 _LIT8( KDlnaDoc,        "X_DLNADOC"     );
    43 _LIT8( KVal,            "val"           );
    39 _LIT8( KVal,            "val"           );
    44 _LIT8( KChannel,        "channel"       );
    40 _LIT8( KChannel,        "channel"       );
    45 _LIT8( KMaster,         "Master"       );
    41 _LIT8( KMaster,         "Master"       );
       
    42 _LIT8( KTransportState, "TransportState" );
       
    43 _LIT8( KTransportURI,   "AVTransportURI" );
    46 
    44 
    47 // --------------------------------------------------------------------------
    45 // --------------------------------------------------------------------------
    48 // CUPnPXMLEventParser::CUPnPXMLEventParser()
    46 // CUPnPXMLEventParser::CUPnPXMLEventParser()
    49 // See upnpxmlparser.h
    47 // See upnpxmlparser.h
    50 // --------------------------------------------------------------------------
    48 // --------------------------------------------------------------------------
    51 CUPnPXMLEventParser::CUPnPXMLEventParser()
    49 CUPnPXMLEventParser::CUPnPXMLEventParser()
    52     {
    50     {
       
    51     // No implementation required
    53     }
    52     }
    54 
    53 
    55 // --------------------------------------------------------------------------
    54 // --------------------------------------------------------------------------
    56 // CUPnPXMLEventParser::ConstructL
    55 // CUPnPXMLEventParser::ConstructL
    57 // See upnpxmlparser.h
    56 // See upnpxmlparser.h
    58 // --------------------------------------------------------------------------
    57 // --------------------------------------------------------------------------
    59 void CUPnPXMLEventParser::ConstructL()
    58 void CUPnPXMLEventParser::ConstructL()
    60     {
    59     {
    61     __LOG( "CUPnPXMLEventParser::CostructL" );
    60     __LOG( "CUPnPXMLEventParser::CostructL" );
    62     
    61     
       
    62     iAvtEvent = CUPnPAVTEvent::NewL();
       
    63     iAvtResultEvent = CUPnPAVTEvent::NewL();
    63     }
    64     }
    64 
    65 
    65 // --------------------------------------------------------------------------
    66 // --------------------------------------------------------------------------
    66 // CUPnPXMLEventParser::NewL
    67 // CUPnPXMLEventParser::NewL
    67 // See upnpxmlparser.h
    68 // See upnpxmlparser.h
    82 // --------------------------------------------------------------------------
    83 // --------------------------------------------------------------------------
    83 CUPnPXMLEventParser::~CUPnPXMLEventParser()
    84 CUPnPXMLEventParser::~CUPnPXMLEventParser()
    84     {
    85     {
    85     __LOG( "CUPnPXMLEventParser::~CUPnPXMLEventParser" );
    86     __LOG( "CUPnPXMLEventParser::~CUPnPXMLEventParser" );
    86     
    87     
    87     }
    88     delete iAvtEvent;
    88 
    89     delete iAvtResultEvent;
    89 // --------------------------------------------------------------------------
    90     }
    90 // CUPnPXMLEventParser::ParseResultDataL
    91 
    91 // See upnpxmlparser.h
    92 // --------------------------------------------------------------------------
    92 // --------------------------------------------------------------------------
    93 // CUPnPXMLEventParser::ParseRcEventDataL
    93 EXPORT_C void CUPnPXMLEventParser::ParseResultDataL( const TDesC8& aData,
    94 // See upnpxmlparser.h
    94         TInt& aInstanceId, TInt& aVolume, TBool& aMute )
    95 // --------------------------------------------------------------------------
    95     {
    96 EXPORT_C CUPnPAVTEvent* CUPnPXMLEventParser::ParseRcEventDataL(
    96     __LOG( "CUPnPXMLEventParser::ParseResultDataL, begin" );
    97     const TDesC8& aData, const TInt aInstanceId )
       
    98     {
       
    99     __LOG( "CUPnPXMLEventParser::ParseRcEventDataL, begin" );
    97     
   100     
    98     if ( !aData.Length() )
   101     if ( !aData.Length() )
    99         {
   102         {
   100         User::Leave( KErrArgument );
   103         User::Leave( KErrArgument );
   101         }
   104         }
   102 
   105 
   103     Reset();
   106     Reset();
       
   107     ResetResult();
       
   108     iSessionInstanceID = aInstanceId;
   104         
   109         
   105     // Create parser 
   110     // Create parser 
   106     CMatchData* matchData = CMatchData::NewLC();
   111     CMatchData* matchData = CMatchData::NewLC();
   107     matchData->SetMimeTypeL( KXmlMimeType ); 
   112     matchData->SetMimeTypeL( KXmlMimeType ); 
   108     matchData->SetVariantL( KLIB2XML ); 
   113     matchData->SetVariantL( KLIB2XML ); 
   112     Xml::ParseL( *parser, aData );    
   117     Xml::ParseL( *parser, aData );    
   113     
   118     
   114     CleanupStack::PopAndDestroy( parser );
   119     CleanupStack::PopAndDestroy( parser );
   115     CleanupStack::PopAndDestroy( matchData );
   120     CleanupStack::PopAndDestroy( matchData );
   116     
   121     
   117     if( iInstanceID != KErrNotFound )
   122     if( iAvtResultEvent->InstanceID() == KErrNotFound )
   118         {
   123         {
   119         aInstanceId = iInstanceID;
   124         __LOG1( "CUPnPXMLEventParser::ParseRcEventDataL \
   120         if( iVolume != KErrNotFound )
   125 instanceid not matching %d",  iSessionInstanceID );
   121             {
   126         User::Leave( KErrNotFound );
   122             aVolume = iVolume;    
   127         }  
   123             }
   128         
   124         if( iMute != KErrNotFound )
   129     return CUPnPAVTEvent::CloneL( *iAvtResultEvent );
   125             {
   130     }
   126             aMute = iMute;    
   131 
   127             }
   132 
   128         }
   133 // --------------------------------------------------------------------------
   129     else
   134 // CUPnPXMLEventParser::ParseAVTEventDataL
       
   135 // See upnpxmlparser.h
       
   136 // --------------------------------------------------------------------------
       
   137 EXPORT_C CUPnPAVTEvent* CUPnPXMLEventParser::ParseAvtEventDataL(
       
   138     const TDesC8& aData, const TInt aInstanceId )
       
   139     {
       
   140     __LOG( "CUPnPXMLEventParser::ParseAvtEventDataL, begin" );
       
   141     
       
   142     if ( !aData.Length() )
   130         {
   143         {
   131         User::Leave( KErrArgument );
   144         User::Leave( KErrArgument );
   132         }    
   145         }
   133     
   146     
   134     __LOG( "CUPnPXMLEventParser::ParseResultDataL, end" );
   147     Reset();
   135     }
   148     ResetResult();
       
   149     iSessionInstanceID = aInstanceId;
       
   150         
       
   151     // Create parser 
       
   152     CMatchData* matchData = CMatchData::NewLC();
       
   153     matchData->SetMimeTypeL( KXmlMimeType ); 
       
   154     matchData->SetVariantL( KLIB2XML ); 
       
   155     CParser* parser = CParser::NewLC( *matchData, *this ); 
       
   156     parser->EnableFeature( Xml::EReportNamespaceMapping );
       
   157     
       
   158     Xml::ParseL( *parser, aData );    
       
   159     
       
   160     CleanupStack::PopAndDestroy( parser );
       
   161     CleanupStack::PopAndDestroy( matchData );
       
   162     
       
   163     if( iAvtResultEvent->InstanceID() == KErrNotFound )
       
   164         {
       
   165         __LOG1( "CUPnPXMLEventParser::ParseAvtEventDataL \
       
   166 instanceid not matching %d", iSessionInstanceID );
       
   167         User::Leave( KErrNotFound );
       
   168         }
       
   169     
       
   170     return CUPnPAVTEvent::CloneL( *iAvtResultEvent );
       
   171     }
       
   172 
   136 
   173 
   137 // --------------------------------------------------------------------------
   174 // --------------------------------------------------------------------------
   138 // CUPnPXMLEventParser::OnStartDocumentL
   175 // CUPnPXMLEventParser::OnStartDocumentL
   139 // See upnpxmlparser.h
   176 // See upnpxmlparser.h
   140 // --------------------------------------------------------------------------
   177 // --------------------------------------------------------------------------
   159 // See upnpxmlparser.h
   196 // See upnpxmlparser.h
   160 // --------------------------------------------------------------------------
   197 // --------------------------------------------------------------------------
   161 void CUPnPXMLEventParser::OnStartElementL( const RTagInfo& aElement, 
   198 void CUPnPXMLEventParser::OnStartElementL( const RTagInfo& aElement, 
   162                                       const RAttributeArray& aAttributes,
   199                                       const RAttributeArray& aAttributes,
   163                                       TInt aErrorCode )
   200                                       TInt aErrorCode )
   164     {
   201     {   
   165     __LOG1( "CUPnPXMLEventParser::OnStartElementL, error: %d", aErrorCode );
       
   166     if ( aErrorCode != KErrNone )
   202     if ( aErrorCode != KErrNone )
   167         {
   203         {
       
   204         __LOG1( "CUPnPXMLEventParser::OnStartElementL, error: %d",
       
   205                                                                 aErrorCode );
   168         return;
   206         return;
   169         }
   207         }
   170     const TDesC8& desName = aElement.LocalName().DesC();
   208     const TDesC8& desName = aElement.LocalName().DesC();
   171     //const TDesC8& prefix = aElement.Prefix().DesC();
   209     __LOG8_1("CUPnPXMLEventParser::OnStartElementL name = %S", &desName );
   172       
   210   
   173     if ( !desName.CompareF( KEvent ) )
   211     if ( !desName.CompareF( KEvent ) )
   174         {
   212         {
   175         iParserState = EEvent;
   213         iParserState = EEvent;
   176         }
   214         }
   177     else if ( !desName.CompareF( KInstanceID ) )
   215     else if ( !desName.CompareF( KInstanceID ) )
   178         {
   216         {
   179         iParserState = EInstanceID;
   217         iParserState = EInstanceID;
   180         SetAttributesL( aAttributes );
   218         SetAttributesL( aAttributes );
   181         }
   219         }
       
   220     //Rc events
   182     else if( !desName.CompareF( KVolume ) )
   221     else if( !desName.CompareF( KVolume ) )
   183         {
   222         {
   184         iParserState = EVolume;
   223         iParserState = EVolume;
   185         SetAttributesL( aAttributes );
   224         SetAttributesL( aAttributes );
   186         }
   225         }
   187     else if( !desName.CompareF( KMute ) )
   226     else if( !desName.CompareF( KMute ) )
   188         {
   227         {
   189         iParserState = EMute;
   228         iParserState = EMute;
   190         SetAttributesL( aAttributes );
   229         SetAttributesL( aAttributes );
   191         }
   230         }  
       
   231     // Avt events 
       
   232     else if( !desName.CompareF( KTransportState ) )
       
   233         {
       
   234         iParserState = ETransportState;
       
   235         SetAttributesL( aAttributes );
       
   236         }
       
   237     else if ( !desName.CompareF( KTransportURI ) )
       
   238         {
       
   239         iParserState = ETransportURI;
       
   240         SetAttributesL( aAttributes );
       
   241         }
       
   242     
   192     // Ignore DIDL-Lite, desc and X_DLNADOC -elements (DLNA req)
   243     // Ignore DIDL-Lite, desc and X_DLNADOC -elements (DLNA req)
   193     else if( desName.Compare( KDIDL ) == KErrNone ||
   244     else if( desName.Compare( KDIDL ) == KErrNone ||
   194              desName.Compare( KDesc ) == KErrNone ||
   245              desName.Compare( KDesc ) == KErrNone ||
   195              desName.Compare( KDlnaDoc ) == KErrNone    
   246              desName.Compare( KDlnaDoc ) == KErrNone    
   196            )
   247            )
   197         {
   248         {
   198         // Ignore
   249         // Ignore
   199         }
   250         }
   200     else 
   251     else 
   201         {
   252         {
   202         __LOG( "OnStartElementL - unknown element!" );
   253         // just print attribute values
   203         __LOG8( desName );
   254         iParserState = ENotSupported;
   204         }
   255         SetAttributesL( aAttributes );
   205     
   256         }
   206     __LOG( "CUPnPXMLEventParser::OnStartElementL, end" );
       
   207     }
   257     }
   208 
   258 
   209 // --------------------------------------------------------------------------
   259 // --------------------------------------------------------------------------
   210 // CUPnPXMLEventParser::OnEndElementL
   260 // CUPnPXMLEventParser::OnEndElementL
   211 // See upnpxmlparser.h
   261 // See upnpxmlparser.h
   212 // --------------------------------------------------------------------------
   262 // --------------------------------------------------------------------------
   213 void CUPnPXMLEventParser::OnEndElementL( const RTagInfo& /*aElement*/, 
   263 void CUPnPXMLEventParser::OnEndElementL( const RTagInfo& aElement, 
   214                                     TInt /*aErrorCode*/ )
   264                                     TInt /*aErrorCode*/ )
   215     {
   265     {
   216     __LOG( "CUPnPXMLSAXParser::OnEndElementL(), begin" );
   266     // if we have finished parsing one event,
       
   267     // check that it belongs to our session
       
   268     const TDesC8& desName = aElement.LocalName().DesC();
       
   269     
       
   270     if ( !desName.CompareF( KInstanceID ) )
       
   271         {
       
   272         if( iAvtEvent->InstanceID() == iSessionInstanceID )
       
   273             {
       
   274             iAvtResultEvent->Reset();
       
   275             iAvtResultEvent->SetInstanceID( iAvtEvent->InstanceID() );
       
   276             iAvtResultEvent->SetMute( iAvtEvent->Mute() );
       
   277             iAvtResultEvent->SetVolume( iAvtEvent->Volume() );
       
   278             iAvtResultEvent->SetTransportState( iAvtEvent->TransportState() );
       
   279             iAvtResultEvent->SetTransportURIL( iAvtEvent->TransportURI() );
       
   280             
       
   281             __LOG( "CUPnPXMLEventParser::OnEndElementL() valid event" );
       
   282             }
       
   283         else
       
   284             {
       
   285             __LOG2( "CUPnPXMLEventParser OnEndElementL ERROR instanceid not \
       
   286 matching session %d, event %d", iSessionInstanceID, iAvtEvent->InstanceID());
       
   287             }
       
   288             
       
   289         Reset();
       
   290         }
   217     }
   291     }
   218 
   292 
   219 // --------------------------------------------------------------------------
   293 // --------------------------------------------------------------------------
   220 // CUPnPXMLEventParser::OnContentL
   294 // CUPnPXMLEventParser::OnContentL
   221 // See upnpxmlparser.h
   295 // See upnpxmlparser.h
   222 // --------------------------------------------------------------------------
   296 // --------------------------------------------------------------------------
   223 void CUPnPXMLEventParser::OnContentL( const TDesC8& /*aBytes*/,
   297 void CUPnPXMLEventParser::OnContentL( const TDesC8& /*aBytes*/,
   224     TInt /*aErrorCode*/ )
   298     TInt /*aErrorCode*/ )
   225     {
   299     {
   226     __LOG( "CUPnPXMLSAXParser::OnContentL(), begin" );
   300     // No implementation needed
   227     }
   301     }
   228 
   302 
   229 // --------------------------------------------------------------------------
   303 // --------------------------------------------------------------------------
   230 // CUPnPXMLEventParser::OnStartPrefixMappingL
   304 // CUPnPXMLEventParser::OnStartPrefixMappingL
   231 // See upnpxmlparser.h
   305 // See upnpxmlparser.h
   269 
   343 
   270 // --------------------------------------------------------------------------
   344 // --------------------------------------------------------------------------
   271 // CUPnPXMLEventParser::OnProcessingInstructionL
   345 // CUPnPXMLEventParser::OnProcessingInstructionL
   272 // See upnpxmlparser.h
   346 // See upnpxmlparser.h
   273 // --------------------------------------------------------------------------
   347 // --------------------------------------------------------------------------
   274 void CUPnPXMLEventParser::OnProcessingInstructionL( const TDesC8& /*aTarget*/, 
   348 void CUPnPXMLEventParser::OnProcessingInstructionL(
   275                                                   const TDesC8& /*aData*/, 
   349     const TDesC8& /*aTarget*/, const TDesC8& /*aData*/, TInt /*aErrorCode*/ )
   276                                                   TInt /*aErrorCode*/ )
       
   277     {
   350     {
   278     // No implementation needed
   351     // No implementation needed
   279     }
   352     }
   280 
   353 
   281 // --------------------------------------------------------------------------
   354 // --------------------------------------------------------------------------
   302 // See upnpxmlparser.h
   375 // See upnpxmlparser.h
   303 // --------------------------------------------------------------------------
   376 // --------------------------------------------------------------------------
   304 void CUPnPXMLEventParser::SetAttributesL(
   377 void CUPnPXMLEventParser::SetAttributesL(
   305     const RAttributeArray& aAttributes )
   378     const RAttributeArray& aAttributes )
   306     {
   379     {
   307     __LOG( "CUPnPXMLEventParser::SetAttributesL" );
       
   308 
       
   309     RAttribute attribute;
   380     RAttribute attribute;
   310     TInt count = aAttributes.Count();
   381     TInt count = aAttributes.Count();
   311     TInt volume = KErrNotFound;
   382     TInt volume = KErrNotFound;
   312     iMasterVolumeState = EFalse;
   383     iMasterVolumeState = EFalse;
       
   384     
   313     for ( TInt i = 0; i < count ; i++ )
   385     for ( TInt i = 0; i < count ; i++ )
   314         {
   386         {
   315         attribute = aAttributes[i];
   387         attribute = aAttributes[i];
   316         const TDesC8& name = attribute.Attribute().LocalName().DesC();
   388         const TDesC8& name = attribute.Attribute().LocalName().DesC();
   317 
   389         const TDesC8& value = attribute.Value().DesC();
       
   390         if( value.Length() )
       
   391             {
       
   392             __LOG8_1( "CUPnPXMLEventParser::SetAttributesL value = %S",
       
   393                     &value );
       
   394             }
       
   395         
       
   396         // volume & channel
   318         if ( iParserState == EVolume )
   397         if ( iParserState == EVolume )
   319             {
   398             {
   320             // assign the value of Volume to volume 
   399             // assign the value of Volume to volume 
   321             if ( name.CompareF( KVal ) == KErrNone )
   400             if ( name.CompareF( KVal ) == KErrNone )
   322                 {
   401                 {
   323                 __LOG( "SetAttributesL - \"val\" found!" );
   402                 TLex8 lexer( value );
   324                 TLex8 lexer( attribute.Value().DesC() );
       
   325                 User::LeaveIfError( lexer.Val(volume) );
   403                 User::LeaveIfError( lexer.Val(volume) );
   326                 __LOG1( "SetAttributesL - volume = %d", volume );
       
   327                 }
   404                 }
   328             else if ( name.CompareF( KChannel ) == KErrNone )
   405             else if ( name.CompareF( KChannel ) == KErrNone )
   329                 {
   406                 {
   330                 // channel is found, check if is Master
   407                 // channel is found, check if is Master
   331                 const TDesC8& channelname = attribute.Value().DesC();
   408                 if ( value.CompareF( KMaster ) == KErrNone )
   332                 if ( channelname.CompareF( KMaster ) == KErrNone )
       
   333                     {
   409                     {
   334                     __LOG( "SetAttributesL - MasterVolume found!" );
   410                     __LOG( "CUPnPXMLEventParser::SetAttributesL - \
       
   411 MasterVolume found!" );
   335                     iMasterVolumeState = ETrue;
   412                     iMasterVolumeState = ETrue;
   336                     }
   413                     }
   337                 }
   414                 }
   338             }
   415             }
   339         else
   416           
       
   417           
       
   418                      
       
   419               
       
   420         // other values
       
   421         else if ( name.Compare( KVal ) == KErrNone )
   340             {
   422             {
   341 
   423             TLex8 lexer( value );
   342             if ( name.Compare( KVal ) == KErrNone )
   424             
   343                 {
   425             if ( iParserState == EInstanceID )
   344                 __LOG( "SetAttributesL - \"val\" found!" );
   426                 {
   345 
   427                 TInt id = KErrNotFound;
   346                 TLex8 lexer( attribute.Value().DesC() );
   428                 User::LeaveIfError( lexer.Val( id ) );
   347                 if ( iParserState == EInstanceID )
   429                 iAvtEvent->SetInstanceID( id );
   348                     {
   430                 }
   349                     User::LeaveIfError( lexer.Val( iInstanceID ) );
   431             else if ( iParserState == EMute )
   350                     }
   432                 {
   351                 else
   433                 TInt mute = KErrNotFound;
   352                     if ( iParserState == EMute )
   434                 User::LeaveIfError( lexer.Val( mute ) );
   353                         {
   435                 iAvtEvent->SetMute( mute );
   354                         User::LeaveIfError( lexer.Val( iMute ) );
   436                 }
   355                         }
   437             else if ( iParserState == ETransportState )
   356                     else
   438                 {
   357                         {
   439                 iAvtEvent->SetTransportState( value );
   358                         __LOG( "SetAttributesL - unknown state!" );
   440                 }
   359                         }
   441             else if ( iParserState == ETransportURI )
       
   442                 {
       
   443                 iAvtEvent->SetTransportURIL( value );
       
   444                 }
       
   445             else
       
   446                 {
       
   447                 __LOG( "CUPnPXMLEventParser::SetAttributesL - \
       
   448 unknown state" );
   360                 }
   449                 }
   361             }
   450             }
   362         }
   451         }
   363     
   452     
   364     // check Mastervolume if was found, and volume if was found
   453     // check Mastervolume and volume
   365     if ( iParserState == EVolume && 
   454     if ( iParserState == EVolume && 
   366          iMasterVolumeState && 
   455          iMasterVolumeState && 
   367          volume != KErrNotFound )
   456          volume != KErrNotFound )
   368         {
   457         {
   369         // all is found ,so assign the iVolume
   458         // all is found ,so assign the iVolume
   370         __LOG1( "SetAttributesL - set iVolume : %d", volume );
   459         __LOG1( "CUPnPXMLEventParser::SetAttributesL - set iVolume : %d",
   371         iVolume = volume;       
   460                                                                      volume );
   372         }
   461         iAvtEvent->SetVolume( volume );       
   373     
   462         }
   374     __LOG( "CUPnPXMLEventParser::SetAttributesL - End" );
   463     }
   375     }
   464     
   376 
       
   377 // --------------------------------------------------------------------------
   465 // --------------------------------------------------------------------------
   378 // CUPnPXMLEventParser::Reset
   466 // CUPnPXMLEventParser::Reset
   379 // See upnpxmlparser.h
   467 // See upnpxmlparser.h
   380 // --------------------------------------------------------------------------
   468 // --------------------------------------------------------------------------
   381 void CUPnPXMLEventParser::Reset()
   469 void CUPnPXMLEventParser::Reset()
   382     {
   470     {
   383     iInstanceID = KErrNotFound;
       
   384     iMute = KErrNotFound;
       
   385     iVolume = KErrNotFound;
       
   386     iParserState = ENotSupported;
   471     iParserState = ENotSupported;
   387     iMasterVolumeState = EFalse;
   472     iMasterVolumeState = EFalse;
   388     }
   473     
   389       
   474     iAvtEvent->Reset();
       
   475     }
       
   476 
       
   477 // --------------------------------------------------------------------------
       
   478 // CUPnPXMLEventParser::ResetResult
       
   479 // See upnpxmlparser.h
       
   480 // --------------------------------------------------------------------------
       
   481 void CUPnPXMLEventParser::ResetResult()
       
   482     {
       
   483     iSessionInstanceID = KErrNotFound;
       
   484     iParserState = ENotSupported;
       
   485     iMasterVolumeState = EFalse;
       
   486     
       
   487     iAvtResultEvent->Reset();
       
   488     }     
       
   489          
   390 // end of file
   490 // end of file
   391 
   491