upnpavcontrolpoint/avcontrolframework/src/upnpavtactionfactory.cpp
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     1 /** @file
       
     2 * Copyright (c) 2005-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:  Produces avt actions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "upnpavtactionfactory.h"
       
    21 #include "upnpavcontrolpoint.h"
       
    22 #include "upnpavcpstring.h"
       
    23 
       
    24 // CONSTANTS
       
    25 using namespace UpnpAVCPStrings;
       
    26 const TInt KMaxIntLength = 10;
       
    27 
       
    28 // ============================= LOCAL FUNCTIONS ===============================
       
    29 
       
    30 
       
    31 
       
    32 // ================= MEMBER FUNCTIONS =======================
       
    33 
       
    34 // -----------------------------------------------------------------------------
       
    35 // CUpnpAvtActionFactory::CUpnpAvtActionFactory
       
    36 // C++ default constructor can NOT contain any code, that
       
    37 // might leave.
       
    38 // -----------------------------------------------------------------------------
       
    39 //
       
    40 CUpnpAvtActionFactory::CUpnpAvtActionFactory( MUpnpAVControlPointObserver& aAVCPObserver,
       
    41                                      CUpnpAVControlPoint& aAVCP )
       
    42 :iAVControlPointObserver( aAVCPObserver ), iAVCP( aAVCP )
       
    43     {
       
    44     }
       
    45 
       
    46 // -----------------------------------------------------------------------------
       
    47 // CUpnpAvtActionFactory::ConstructL
       
    48 // Symbian 2nd phase constructor can leave.
       
    49 // -----------------------------------------------------------------------------
       
    50 //
       
    51 void CUpnpAvtActionFactory::ConstructL() 
       
    52     {
       
    53     }
       
    54 
       
    55 // -----------------------------------------------------------------------------
       
    56 // CUpnpAvtActionFactory::NewL
       
    57 // Two-phased constructor.
       
    58 // -----------------------------------------------------------------------------
       
    59 //
       
    60 CUpnpAvtActionFactory* CUpnpAvtActionFactory::NewL( 
       
    61                                       MUpnpAVControlPointObserver& aAVCPObserver,
       
    62                                       CUpnpAVControlPoint& aAVCP )
       
    63     {
       
    64     CUpnpAvtActionFactory* self = new (ELeave) CUpnpAvtActionFactory( 
       
    65         aAVCPObserver,
       
    66         aAVCP );
       
    67     CleanupStack::PushL( self );
       
    68     self->ConstructL();
       
    69     CleanupStack::Pop( self );
       
    70     return self;
       
    71     }
       
    72 
       
    73 // -----------------------------------------------------------------------------
       
    74 // CUpnpAvtActionFactory::~CUpnpAvtActionFactory
       
    75 // Destructor
       
    76 // -----------------------------------------------------------------------------
       
    77 //
       
    78 CUpnpAvtActionFactory::~CUpnpAvtActionFactory()
       
    79     {
       
    80     }
       
    81 
       
    82 // -----------------------------------------------------------------------------
       
    83 // CUpnpAvtActionFactory::AvtSetTransportUriActionLC
       
    84 // Creates an action for setting URI for transport.
       
    85 // (other items were commented in a header)
       
    86 // -----------------------------------------------------------------------------
       
    87 //
       
    88 TInt CUpnpAvtActionFactory::AvtSetTransportUriActionLC(CUpnpAction*& aAction,
       
    89                                             CUpnpDevice* aMediaRenderer,
       
    90                                             TInt aInstanceId,
       
    91                                             const TDesC8& aCurrentUri,
       
    92                                             const TDesC8& aCurrentMetaData)
       
    93     {
       
    94     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
    95     if( !service )
       
    96         {
       
    97         return KErrUnknown;
       
    98         }
       
    99     TBuf8<KMaxIntLength> instanceId;
       
   100 	instanceId.Num( aInstanceId );
       
   101 
       
   102     aAction = service->CreateActionLC( KSetAVTransportURI );
       
   103     if( aAction )
       
   104         {
       
   105         aAction->SetArgumentL( KInstanceID, instanceId );
       
   106         aAction->SetArgumentL( KCurrentURI, aCurrentUri );
       
   107         aAction->SetArgumentL( KCurrentURIMetaData, aCurrentMetaData );
       
   108         return KErrNone;
       
   109         }
       
   110     else
       
   111         {
       
   112         return KErrGeneral;
       
   113         }
       
   114     }
       
   115 
       
   116 // -----------------------------------------------------------------------------
       
   117 // CUpnpAvtActionFactory::AvtSetNextTransportUriActionLC
       
   118 // Creates an action for setting URI for next transport.
       
   119 // (other items were commented in a header)
       
   120 // -----------------------------------------------------------------------------
       
   121 //
       
   122 TInt CUpnpAvtActionFactory::AvtSetNextTransportUriActionLC(
       
   123                                                    CUpnpAction*& aAction,
       
   124                                                     CUpnpDevice* aMediaRenderer,
       
   125                                                     TInt aInstanceId,
       
   126                                                     const TDesC8& aNextUri,
       
   127                                                     const TDesC8& aNextMetaData)
       
   128     {
       
   129     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   130     if( !service )
       
   131         {
       
   132         return KErrUnknown;
       
   133         }
       
   134     TBuf8<KMaxIntLength> instanceId;
       
   135 	instanceId.Num( aInstanceId );
       
   136 
       
   137     aAction = service->CreateActionLC( KSetNextAVTransportURI );
       
   138     if( aAction )
       
   139         {
       
   140         aAction->SetArgumentL( KInstanceID, instanceId );
       
   141         aAction->SetArgumentL( KNextURI, aNextUri );
       
   142         aAction->SetArgumentL( KNextURIMetaData, aNextMetaData );
       
   143         return KErrNone;
       
   144         }
       
   145     else
       
   146         {
       
   147         return KErrGeneral;
       
   148         }
       
   149     }
       
   150 // -----------------------------------------------------------------------------
       
   151 // CUpnpAvtActionFactory::AvtSeekActionLC
       
   152 // Creates an action for seeking through the resource.
       
   153 // (other items were commented in a header)
       
   154 // -----------------------------------------------------------------------------
       
   155 //
       
   156 TInt CUpnpAvtActionFactory::AvtSeekActionLC(CUpnpAction*& aAction,
       
   157                                         CUpnpDevice* aMediaRenderer,
       
   158                                         TInt aInstanceId,
       
   159                                         const TDesC8& aUnit,
       
   160                                         const TDesC8& aTarget)
       
   161     {
       
   162     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   163     if( !service )
       
   164         {
       
   165         return KErrUnknown;
       
   166         }
       
   167     TBuf8<KMaxIntLength> instanceId;
       
   168 	instanceId.Num( aInstanceId );
       
   169 
       
   170     aAction = service->CreateActionLC( KSeek );
       
   171     if( aAction )
       
   172         {
       
   173         aAction->SetArgumentL( KInstanceID, instanceId );
       
   174         aAction->SetArgumentL( KUnit, aUnit );
       
   175         aAction->SetArgumentL( KTarget, aTarget );
       
   176         return KErrNone;
       
   177         }
       
   178     else
       
   179         {
       
   180         return KErrGeneral;
       
   181         }
       
   182     }
       
   183 // -----------------------------------------------------------------------------
       
   184 // CUpnpAvtActionFactory::AvtMediaInfoActionLC
       
   185 // Creates an action for gettin media info.
       
   186 // (other items were commented in a header)
       
   187 // -----------------------------------------------------------------------------
       
   188 //
       
   189 TInt CUpnpAvtActionFactory::AvtMediaInfoActionLC(CUpnpAction*& aAction,
       
   190                                             CUpnpDevice* aMediaRenderer,
       
   191                                             TInt aInstanceId)
       
   192     {
       
   193     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   194     if( !service )
       
   195         {
       
   196         return KErrUnknown;
       
   197         }
       
   198     TBuf8<KMaxIntLength> instanceId;
       
   199 	instanceId.Num( aInstanceId );
       
   200 
       
   201     aAction = service->CreateActionLC( KGetMediaInfo );
       
   202     if( aAction )
       
   203         {
       
   204         aAction->SetArgumentL( KInstanceID, instanceId );
       
   205         return KErrNone;
       
   206         }
       
   207     else
       
   208         {
       
   209         return KErrGeneral;
       
   210         }
       
   211     }
       
   212 // -----------------------------------------------------------------------------
       
   213 // CUpnpAvtActionFactory::AvtTransportInfoActionLC
       
   214 // Creates an action for gettting transport info.
       
   215 // (other items were commented in a header)
       
   216 // -----------------------------------------------------------------------------
       
   217 //
       
   218 TInt CUpnpAvtActionFactory::AvtTransportInfoActionLC(CUpnpAction*& aAction,
       
   219                                             CUpnpDevice* aMediaRenderer,
       
   220                                             TInt aInstanceId)
       
   221     {
       
   222     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   223     if( !service )
       
   224         {
       
   225         return KErrUnknown;
       
   226         }
       
   227     TBuf8<KMaxIntLength> instanceId;
       
   228 	instanceId.Num( aInstanceId );
       
   229     
       
   230     aAction = service->CreateActionLC( KGetTransportInfo );
       
   231     if( aAction )
       
   232         {
       
   233         aAction->SetArgumentL( KInstanceID, instanceId );
       
   234         return KErrNone;
       
   235         }
       
   236     else
       
   237         {
       
   238         return KErrGeneral;
       
   239         }
       
   240     }
       
   241 // -----------------------------------------------------------------------------
       
   242 // CUpnpAvtActionFactory::AvtPositionInfoActionLC
       
   243 // Creates an action for getting position info.
       
   244 // (other items were commented in a header)
       
   245 // -----------------------------------------------------------------------------
       
   246 //
       
   247 TInt CUpnpAvtActionFactory::AvtPositionInfoActionLC(CUpnpAction*& aAction,
       
   248                                             CUpnpDevice* aMediaRenderer,
       
   249                                             TInt aInstanceId)
       
   250     {
       
   251     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   252     if( !service )
       
   253         {
       
   254         return KErrUnknown;
       
   255         }
       
   256     TBuf8<KMaxIntLength> instanceId;
       
   257 	instanceId.Num( aInstanceId );
       
   258 
       
   259     aAction = service->CreateActionLC( KGetPositionInfo );
       
   260     if( aAction )
       
   261         {
       
   262         aAction->SetArgumentL( KInstanceID, instanceId );
       
   263         return KErrNone;
       
   264         }
       
   265     else
       
   266         {
       
   267         return KErrGeneral;
       
   268         }
       
   269     }
       
   270 // -----------------------------------------------------------------------------
       
   271 // CUpnpAvtActionFactory::AvtDeviceCapabilitiesActionLC
       
   272 // Creates an action for getting device capabilities.
       
   273 // (other items were commented in a header)
       
   274 // -----------------------------------------------------------------------------
       
   275 //
       
   276 TInt CUpnpAvtActionFactory::AvtDeviceCapabilitiesActionLC(CUpnpAction*& aAction,
       
   277                                             CUpnpDevice* aMediaRenderer,
       
   278                                             TInt aInstanceId)
       
   279     {
       
   280     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   281     if( !service )
       
   282         {
       
   283         return KErrUnknown;
       
   284         }
       
   285     TBuf8<KMaxIntLength> instanceId;
       
   286 	instanceId.Num( aInstanceId );
       
   287 
       
   288     aAction = service->CreateActionLC( KGetDeviceCapabilities );
       
   289     if( aAction )
       
   290         {
       
   291         aAction->SetArgumentL( KInstanceID, instanceId );
       
   292         return KErrNone;
       
   293         }
       
   294     else
       
   295         {
       
   296         return KErrGeneral;
       
   297         }
       
   298     }
       
   299 // -----------------------------------------------------------------------------
       
   300 // CUpnpAvtActionFactory::AvtTransportSettingsActionLC
       
   301 // Creates an action for getting transport settings.
       
   302 // (other items were commented in a header)
       
   303 // -----------------------------------------------------------------------------
       
   304 //
       
   305 TInt CUpnpAvtActionFactory::AvtTransportSettingsActionLC(CUpnpAction*& aAction,
       
   306                                             CUpnpDevice* aMediaRenderer,
       
   307                                             TInt aInstanceId)
       
   308     {
       
   309     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   310     if( !service )
       
   311         {
       
   312         return KErrUnknown;
       
   313         }
       
   314     TBuf8<KMaxIntLength> instanceId;
       
   315 	instanceId.Num( aInstanceId );
       
   316 
       
   317     aAction = service->CreateActionLC( KGetTransportSettings );
       
   318     if( aAction )
       
   319         {
       
   320         aAction->SetArgumentL( KInstanceID, instanceId );
       
   321         return KErrNone;
       
   322         }
       
   323     else
       
   324         {
       
   325         return KErrGeneral;
       
   326         }
       
   327     }
       
   328 // -----------------------------------------------------------------------------
       
   329 // CUpnpAvtActionFactory::AvtStopActionLC
       
   330 // Creates an action for stopping transport.
       
   331 // (other items were commented in a header)
       
   332 // -----------------------------------------------------------------------------
       
   333 //
       
   334 TInt CUpnpAvtActionFactory::AvtStopActionLC(CUpnpAction*& aAction,
       
   335                                             CUpnpDevice* aMediaRenderer,
       
   336                                             TInt aInstanceId)
       
   337     {
       
   338     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   339     if( !service )
       
   340         {
       
   341         return KErrUnknown;
       
   342         }
       
   343     TBuf8<KMaxIntLength> instanceId;
       
   344 	instanceId.Num( aInstanceId );
       
   345 
       
   346     aAction = service->CreateActionLC( KStop );
       
   347     if( aAction )
       
   348         {
       
   349         aAction->SetArgumentL( KInstanceID, instanceId );
       
   350         return KErrNone;
       
   351         }
       
   352     else
       
   353         {
       
   354         return KErrGeneral;
       
   355         }
       
   356     }
       
   357 // -----------------------------------------------------------------------------
       
   358 // CUpnpAvtActionFactory::AvtPlayActionLC
       
   359 // Creates an action for playing.
       
   360 // (other items were commented in a header)
       
   361 // -----------------------------------------------------------------------------
       
   362 //
       
   363 TInt CUpnpAvtActionFactory::AvtPlayActionLC(CUpnpAction*& aAction,
       
   364                                             CUpnpDevice* aMediaRenderer,
       
   365                                             TInt aInstanceId,
       
   366                                             const TDesC8& aSpeed)
       
   367     {
       
   368     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   369     if( !service )
       
   370         {
       
   371         return KErrUnknown;
       
   372         }
       
   373     TBuf8<KMaxIntLength> instanceId;
       
   374 	instanceId.Num( aInstanceId );
       
   375 
       
   376     aAction = service->CreateActionLC( KPlay );
       
   377     if( aAction )
       
   378         {
       
   379         aAction->SetArgumentL( KInstanceID, instanceId );
       
   380         aAction->SetArgumentL( KSpeed, aSpeed );
       
   381         return KErrNone;
       
   382         }
       
   383     else
       
   384         {
       
   385         return KErrGeneral;
       
   386         }
       
   387     }
       
   388 // -----------------------------------------------------------------------------
       
   389 // CUpnpAvtActionFactory::AvtPauseActionLC
       
   390 // Creates an action for pause.
       
   391 // (other items were commented in a header)
       
   392 // -----------------------------------------------------------------------------
       
   393 //
       
   394 TInt CUpnpAvtActionFactory::AvtPauseActionLC(CUpnpAction*& aAction,
       
   395                                             CUpnpDevice* aMediaRenderer,
       
   396                                             TInt aInstanceId)
       
   397     {
       
   398     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   399     if( !service )
       
   400         {
       
   401         return KErrUnknown;
       
   402         }
       
   403     TBuf8<KMaxIntLength> instanceId;
       
   404 	instanceId.Num( aInstanceId );
       
   405 
       
   406     aAction = service->CreateActionLC( KPause );
       
   407     if( aAction )
       
   408         {
       
   409         aAction->SetArgumentL( KInstanceID, instanceId );
       
   410         return KErrNone;
       
   411         }
       
   412     else
       
   413         {
       
   414         return KErrGeneral;
       
   415         }
       
   416     }
       
   417 // -----------------------------------------------------------------------------
       
   418 // CUpnpAvtActionFactory::AvtRecordActionLC
       
   419 // Creates an action for recording.
       
   420 // (other items were commented in a header)
       
   421 // -----------------------------------------------------------------------------
       
   422 //
       
   423 TInt CUpnpAvtActionFactory::AvtRecordActionLC(CUpnpAction*& aAction,
       
   424                                             CUpnpDevice* aMediaRenderer,
       
   425                                             TInt aInstanceId)
       
   426     {
       
   427     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   428     if( !service )
       
   429         {
       
   430         return KErrUnknown;
       
   431         }
       
   432     TBuf8<KMaxIntLength> instanceId;
       
   433 	instanceId.Num( aInstanceId );
       
   434 
       
   435     aAction = service->CreateActionLC( KRecord );
       
   436     if( aAction )
       
   437         {
       
   438         aAction->SetArgumentL( KInstanceID, instanceId );
       
   439         return KErrNone;
       
   440         }
       
   441     else
       
   442         {
       
   443         return KErrGeneral;
       
   444         }
       
   445     }
       
   446 // -----------------------------------------------------------------------------
       
   447 // CUpnpAvtActionFactory::AvtNextActionLC
       
   448 // Creates an action for playing next item.
       
   449 // (other items were commented in a header)
       
   450 // -----------------------------------------------------------------------------
       
   451 //
       
   452 TInt CUpnpAvtActionFactory::AvtNextActionLC(CUpnpAction*& aAction,
       
   453                                             CUpnpDevice* aMediaRenderer,
       
   454                                             TInt aInstanceId)
       
   455     {
       
   456     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   457     if( !service )
       
   458         {
       
   459         return KErrUnknown;
       
   460         }
       
   461     TBuf8<KMaxIntLength> instanceId;
       
   462 	instanceId.Num( aInstanceId );
       
   463 
       
   464     aAction = service->CreateActionLC( KNext );
       
   465     if( aAction )
       
   466         {
       
   467         aAction->SetArgumentL( KInstanceID, instanceId );
       
   468         return KErrNone;
       
   469         }
       
   470     else
       
   471         {
       
   472         return KErrGeneral;
       
   473         }
       
   474     }
       
   475 // -----------------------------------------------------------------------------
       
   476 // CUpnpAvtActionFactory::AvtPreviousActionLC
       
   477 // Creates an action for palying previous item.
       
   478 // (other items were commented in a header)
       
   479 // -----------------------------------------------------------------------------
       
   480 //
       
   481 TInt CUpnpAvtActionFactory::AvtPreviousActionLC(CUpnpAction*& aAction,
       
   482                                             CUpnpDevice* aMediaRenderer,
       
   483                                             TInt aInstanceId)
       
   484     {
       
   485     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   486     if( !service )
       
   487         {
       
   488         return KErrUnknown;
       
   489         }
       
   490     TBuf8<KMaxIntLength> instanceId;
       
   491 	instanceId.Num( aInstanceId );
       
   492 
       
   493     aAction = service->CreateActionLC( KPrevious );
       
   494     if( aAction )
       
   495         {
       
   496         aAction->SetArgumentL( KInstanceID, instanceId );
       
   497         return KErrNone;
       
   498         }
       
   499     else
       
   500         {
       
   501         return KErrGeneral;
       
   502         }
       
   503     }
       
   504 // -----------------------------------------------------------------------------
       
   505 // CUpnpAvtActionFactory::AvtSetPlayModeActionLC
       
   506 // Creates an action for setting playmode.
       
   507 // (other items were commented in a header)
       
   508 // -----------------------------------------------------------------------------
       
   509 //
       
   510 TInt CUpnpAvtActionFactory::AvtSetPlayModeActionLC(CUpnpAction*& aAction,
       
   511                                             CUpnpDevice* aMediaRenderer,
       
   512                                             TInt aInstanceId,
       
   513                                             const TDesC8& aPlayMode)
       
   514     {
       
   515     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   516     if( !service )
       
   517         {
       
   518         return KErrUnknown;
       
   519         }
       
   520     TBuf8<KMaxIntLength> instanceId;
       
   521 	instanceId.Num( aInstanceId );
       
   522 
       
   523     aAction = service->CreateActionLC( KSetPlayMode );
       
   524     if( aAction )
       
   525         {
       
   526         aAction->SetArgumentL( KInstanceID, instanceId );
       
   527         aAction->SetArgumentL( KNewPlayMode, aPlayMode );
       
   528         return KErrNone;
       
   529         }
       
   530     else
       
   531         {
       
   532         return KErrGeneral;
       
   533         }
       
   534     }
       
   535 // -----------------------------------------------------------------------------
       
   536 // CUpnpAvtActionFactory::AvtSetRecordModeActionLC
       
   537 // Creates an action for setting record quality mode.
       
   538 // (other items were commented in a header)
       
   539 // -----------------------------------------------------------------------------
       
   540 //
       
   541 TInt CUpnpAvtActionFactory::AvtSetRecordModeActionLC(CUpnpAction*& aAction,
       
   542                                             CUpnpDevice* aMediaRenderer,
       
   543                                             TInt aInstanceId,
       
   544                                             const TDesC8& aRecordMode)
       
   545     {
       
   546     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   547     if( !service )
       
   548         {
       
   549         return KErrUnknown;
       
   550         }
       
   551     TBuf8<KMaxIntLength> instanceId;
       
   552 	instanceId.Num( aInstanceId );
       
   553 
       
   554     aAction = service->CreateActionLC( KSetRecordQualityMode );
       
   555     if( aAction )
       
   556         {
       
   557         aAction->SetArgumentL( KInstanceID, instanceId );
       
   558         aAction->SetArgumentL( KNewRecordQualityMode, aRecordMode );
       
   559         return KErrNone;
       
   560         }
       
   561     else
       
   562         {
       
   563         return KErrGeneral;
       
   564         }
       
   565     }
       
   566 // -----------------------------------------------------------------------------
       
   567 // CUpnpAvtActionFactory::AvtTransportsActionLC
       
   568 // Creates an action for getting current transports info.
       
   569 // (other items were commented in a header)
       
   570 // -----------------------------------------------------------------------------
       
   571 //
       
   572 TInt CUpnpAvtActionFactory::AvtTransportsActionLC(CUpnpAction*& aAction,
       
   573                                             CUpnpDevice* aMediaRenderer,
       
   574                                             TInt aInstanceId)
       
   575     {
       
   576     CUpnpService* service = iAVCP.Service(aMediaRenderer, KAVTransport);
       
   577     if( !service )
       
   578         {
       
   579         return KErrUnknown;
       
   580         }
       
   581     TBuf8<KMaxIntLength> instanceId;
       
   582 	instanceId.Num( aInstanceId );
       
   583 
       
   584     aAction = service->CreateActionLC( KGetCurrentTransportActions );
       
   585     if( aAction )
       
   586         {
       
   587         aAction->SetArgumentL( KInstanceID, instanceId );
       
   588         return KErrNone;
       
   589         }
       
   590     else
       
   591         {
       
   592         return KErrGeneral;
       
   593         }
       
   594     }
       
   595 //end of file