upnpavcontroller/upnpavcontrollerserver/inc/upnpuploadsession.h
changeset 0 7f85d04be362
child 38 5360b7ddc251
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     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:      implementation for session towards a media server
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef C_UPNPUPLOADSESSION_H
       
    24 #define C_UPNPUPLOADSESSION_H
       
    25 
       
    26 // EXTERNAL INCLUDES
       
    27 #include <e32base.h>
       
    28 #include <upnpavcontrolpointobserver.h>
       
    29 
       
    30 // INTERNAL INCLUDES
       
    31 #include "httptransferobserver.h"
       
    32 #include "upnpfiletransfersessionbase.h"
       
    33 #include "tupnpfiletransferevent.h"
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 class CHttpUploader;
       
    37 class CUpnpFileTransferItem;
       
    38 class CUPnPResourceHelper;
       
    39 class CUpnpDlnaProtocolInfo;
       
    40 class CUpnpObject;
       
    41 class CUpnpAttribute;
       
    42 
       
    43 // CLASS DECLARATION
       
    44 /**
       
    45  * Implements AV Controller server side upload session
       
    46  *
       
    47  * @since S60 v3.2
       
    48  */
       
    49 class CUPnPUploadSession :  public CUPnPFileTransferSessionBase,
       
    50                             public MHttpTransferObserver,
       
    51                             public MUpnpAVControlPointObserver
       
    52     {
       
    53         
       
    54 public:
       
    55 
       
    56     /**
       
    57      * Static 1st phase constructor
       
    58      *
       
    59      * @param aServer AV Controller server handle
       
    60      * @param aSessionId session id
       
    61      * @param aUuid device Uuid
       
    62      */
       
    63     static CUPnPUploadSession* NewL( CUpnpAVControllerServer& aServer,
       
    64         TInt aSessionId, const TDesC8& aUuid );
       
    65     
       
    66     /**
       
    67      * Destructor
       
    68      */
       
    69     virtual ~CUPnPUploadSession();
       
    70     
       
    71 private:
       
    72 
       
    73     /**
       
    74      * Private constructor
       
    75      *
       
    76      * @param aServer AV Controller server handle
       
    77      * @param aSessionId session id
       
    78      */
       
    79     CUPnPUploadSession( CUpnpAVControllerServer& aServer,
       
    80         TInt aSessionId );
       
    81     
       
    82     /**
       
    83      * 2ns phase constructor
       
    84      *
       
    85      * @param aUuid device uuid
       
    86      */
       
    87     void ConstructL( const TDesC8& aUuid );
       
    88 
       
    89 private: // From MHttpTransferObserver
       
    90     
       
    91     /**
       
    92      * See httptransferobserver.h
       
    93      */
       
    94     void TransferProgress( TAny* aKey, TInt aBytes, TInt aTotalBytes );
       
    95 
       
    96     /**
       
    97      * See httptransferobserver.h
       
    98      */
       
    99     void ReadyForTransferL( TAny* aKey );
       
   100 
       
   101     /**
       
   102      * See httptransferobserver.h
       
   103      */
       
   104     void TransferCompleted( TAny* aKey, TInt aStatus );
       
   105 
       
   106 private: // From MUpnpAVControlPointObserver
       
   107 
       
   108     /**
       
   109      * See upnpavcontrolpointobserver.h
       
   110      */
       
   111     void RcSetVolumeResponse(
       
   112         const TDesC8& /*aUuid*/,
       
   113         TInt /*aSessionId*/,
       
   114         TInt /*aErr*/, 
       
   115         const TDesC8& /*aInstance*/, 
       
   116         const TDesC8& /*aChannel*/, 
       
   117         const TDesC8& /*aDesiredVolume*/ ) {}
       
   118         
       
   119     /**
       
   120      * See upnpavcontrolpointobserver.h
       
   121      */
       
   122     void RcVolumeResponse(
       
   123         const TDesC8& /*aUuid*/,
       
   124         TInt /*aSessionId*/,
       
   125         TInt /*aErr*/, 
       
   126         const TDesC8& /*aInstance*/, 
       
   127         const TDesC8& /*aChannel*/, 
       
   128         const TDesC8& /*aCurrentVolume*/) {}
       
   129          
       
   130     /**
       
   131      * See upnpavcontrolpointobserver.h
       
   132      */
       
   133     void RcSetMuteResponse(
       
   134         const TDesC8& /*aUuid*/,
       
   135         TInt /*aSessionId*/,
       
   136         TInt /*aErr*/, 
       
   137         const TDesC8& /*aInstance*/, 
       
   138         const TDesC8& /*aChannel*/, 
       
   139         const TDesC8& /*aDesiredMute*/) {}
       
   140         
       
   141     /**
       
   142      * See upnpavcontrolpointobserver.h
       
   143      */
       
   144     void RcMuteResponse(
       
   145         const TDesC8& /*aUuid*/,
       
   146         TInt /*aSessionId*/,
       
   147         TInt /*aErr*/, 
       
   148         const TDesC8& /*aInstance*/, 
       
   149         const TDesC8& /*aChannel*/, 
       
   150         const TDesC8& /*aCurrentMute*/) {} 
       
   151 
       
   152     /**
       
   153      * See upnpavcontrolpointobserver.h
       
   154      */
       
   155     void AvtSetTransportUriResponse(
       
   156         const TDesC8& /*aUuid*/,
       
   157         TInt /*aSessionId*/,
       
   158         TInt /*aErr*/,
       
   159         const TDesC8& /*aInstanceId*/,
       
   160         const TDesC8& /*aCurrentUri*/,
       
   161         const TDesC8& /*aCurrentUriMetaData*/) {}
       
   162         
       
   163     /**
       
   164      * See upnpavcontrolpointobserver.h
       
   165      */
       
   166     virtual void AvtSetNextTransportUriResponse(
       
   167         const TDesC8& /*aUuid*/,
       
   168         TInt /*aSessionId*/,
       
   169         TInt /*aErr*/,
       
   170         const TDesC8& /*aInstanceId*/,
       
   171         const TDesC8& /*aNextUri*/,
       
   172         const TDesC8& /*aNextUriMetaData*/) {}
       
   173         
       
   174     /**
       
   175      * See upnpavcontrolpointobserver.h
       
   176      */
       
   177     void AvtMediaInfoResponse(
       
   178         const TDesC8& /*aUuid*/,
       
   179         TInt /*aSessionId*/,
       
   180         TInt /*aErr*/,
       
   181         const TDesC8& /*aInstanceId*/,
       
   182         const TDesC8& /*aNrTracks*/,
       
   183         const TDesC8& /*aMediaDuration*/,
       
   184         const TDesC8& /*aCurrentUri*/,
       
   185         const TDesC8& /*aCurrentUriMetaData*/,
       
   186         const TDesC8& /*aNextUri*/,
       
   187         const TDesC8& /*aNextUriMetaData*/,
       
   188         const TDesC8& /*aPlayMedium*/,
       
   189         const TDesC8& /*aRecordMedium*/,
       
   190         const TDesC8& /*aWriteStatus*/) {}
       
   191         
       
   192     /**
       
   193      * See upnpavcontrolpointobserver.h
       
   194      */
       
   195     void AvtGetTransportInfoResponse(
       
   196         const TDesC8& /*aUuid*/,
       
   197         TInt /*aSessionId*/,
       
   198         TInt /*aErr*/,
       
   199         const TDesC8& /*aInstanceId*/,
       
   200         const TDesC8& /*aCurrenTransportState*/,
       
   201         const TDesC8& /*aCurrentTransportStatus*/,
       
   202         const TDesC8& /*aCurrentSpeed*/) {}
       
   203         
       
   204     /**
       
   205      * See upnpavcontrolpointobserver.h
       
   206      */
       
   207     void AvtPositionInfoResponse(
       
   208         const TDesC8& /*aUuid*/,
       
   209         TInt /*aSessionId*/,
       
   210         TInt /*aErr*/,
       
   211         const TDesC8& /*aInstanceId*/,
       
   212         const TDesC8& /*aTrack*/,
       
   213         const TDesC8& /*aTrackDuration*/,
       
   214         const TDesC8& /*aTrackMetaData*/,
       
   215         const TDesC8& /*aTrackURI*/,
       
   216         const TDesC8& /*aRelTime*/,
       
   217         const TDesC8& /*aAbsTime*/,
       
   218         const TDesC8& /*aRelCount*/,
       
   219         const TDesC8& /*aAbsCount*/) {}
       
   220         
       
   221     /**
       
   222      * See upnpavcontrolpointobserver.h
       
   223      */
       
   224     void AvtDeviceCapabilitiesResponse(
       
   225         const TDesC8& /*aUuid*/,
       
   226         TInt /*aSessionId*/,
       
   227         TInt /*aErr*/,
       
   228         const TDesC8& /*aInstanceId*/,
       
   229         const TDesC8& /*aPlayMedia*/,
       
   230         const TDesC8& /*aRecMedia*/,
       
   231         const TDesC8& /*aRecQualityMode*/) {}
       
   232         
       
   233     /**
       
   234      * See upnpavcontrolpointobserver.h
       
   235      */
       
   236     void AvtTransportSettingsResponse(
       
   237         const TDesC8& /*aUuid*/,
       
   238         TInt /*aSessionId*/,
       
   239         TInt /*aErr*/,
       
   240         const TDesC8& /*aInstanceId*/,
       
   241         const TDesC8& /*aPlayMode*/,
       
   242         const TDesC8& /*aRecQualityMode*/) {}
       
   243         
       
   244     /**
       
   245      * See upnpavcontrolpointobserver.h
       
   246      */
       
   247     void AvtStopResponse(
       
   248         const TDesC8& /*aUuid*/,
       
   249         TInt /*aSessionId*/,
       
   250         TInt /*aErr*/,
       
   251         const TDesC8& /*aInstanceId*/) {}
       
   252         
       
   253     /**
       
   254      * See upnpavcontrolpointobserver.h
       
   255      */
       
   256     void AvtPlayResponse(
       
   257         const TDesC8& /*aUuid*/,
       
   258         TInt /*aSessionId*/,
       
   259         TInt /*aErr*/,
       
   260         const TDesC8& /*aInstanceId*/,
       
   261         const TDesC8& /*aSpeed*/) {}
       
   262     
       
   263     /**
       
   264      * See upnpavcontrolpointobserver.h
       
   265      */
       
   266     void AvtPauseResponse(
       
   267         const TDesC8& /*aUuid*/,
       
   268         TInt /*aSessionId*/,
       
   269         TInt /*aErr*/,
       
   270         const TDesC8& /*aInstanceId*/) {}
       
   271         
       
   272     /**
       
   273      * See upnpavcontrolpointobserver.h
       
   274      */
       
   275     void AvtRecordResponse(
       
   276         const TDesC8& /*aUuid*/,
       
   277         TInt /*aSessionId*/,
       
   278         TInt /*aErr*/,
       
   279         const TDesC8& /*aInstanceId*/) {}
       
   280         
       
   281     /**
       
   282      * See upnpavcontrolpointobserver.h
       
   283      */
       
   284     void AvtSeekResponse(
       
   285         const TDesC8& /*aUuid*/,
       
   286         TInt /*aSessionId*/,
       
   287         TInt /*aErr*/,
       
   288         const TDesC8& /*aInstanceId*/,
       
   289         const TDesC8& /*aUnit*/,
       
   290         const TDesC8& /*aTarget*/) {}
       
   291         
       
   292     /**
       
   293      * See upnpavcontrolpointobserver.h
       
   294      */
       
   295     void AvtNextResponse(
       
   296         const TDesC8& /*aUuid*/,
       
   297         TInt /*aSessionId*/,
       
   298         TInt /*aErr*/,
       
   299         const TDesC8& /*aInstanceId*/) {}
       
   300         
       
   301     /**
       
   302      * See upnpavcontrolpointobserver.h
       
   303      */
       
   304     void AvtPreviousResponse(
       
   305         const TDesC8& /*aUuid*/,
       
   306         TInt /*aSessionId*/,
       
   307         TInt /*aErr*/,
       
   308         const TDesC8& /*aInstanceId*/) {}
       
   309     
       
   310     /**
       
   311      * See upnpavcontrolpointobserver.h
       
   312      */
       
   313     void AvtSetPlayModeResponse(
       
   314         const TDesC8& /*aUuid*/,
       
   315         TInt /*aSessionId*/,
       
   316         TInt /*aErr*/,
       
   317         const TDesC8& /*aInstanceId*/,
       
   318         const TDesC8& /*aNewPlayMode*/) {}
       
   319         
       
   320     /**
       
   321      * See upnpavcontrolpointobserver.h
       
   322      */
       
   323     void AvtSetRecordModeResponse(
       
   324         const TDesC8& /*aUuid*/,
       
   325         TInt /*aSessionId*/,
       
   326         TInt /*aErr*/,
       
   327         const TDesC8& /*aInstanceId*/,
       
   328         const TDesC8& /*aNewRecordQuality*/) {}
       
   329         
       
   330     /**
       
   331      * See upnpavcontrolpointobserver.h
       
   332      */
       
   333     void CdsSearchCapabilitiesResponse(
       
   334         const TDesC8& /*aUuid*/,
       
   335         TInt /*aSessionId*/,
       
   336         TInt /*aErr*/,
       
   337         const TDesC8& /*aSearchCaps*/) {}
       
   338         
       
   339     /**
       
   340      * See upnpavcontrolpointobserver.h
       
   341      */
       
   342     void CdsSortCapabilitiesResponse(
       
   343         const TDesC8& /*aUuid*/,
       
   344         TInt /*aSessionId*/,
       
   345         TInt /*aErr*/,
       
   346         const TDesC8& /*aSortCaps*/) {}
       
   347 
       
   348     /**
       
   349      * See upnpavcontrolpointobserver.h
       
   350      */
       
   351     void CdsSystemUpdateIdResponse(
       
   352         const TDesC8& /*aUuid*/,
       
   353         TInt /*aSessionId*/,
       
   354         TInt /*aErr*/,
       
   355         TInt /*aSystemUpdateId*/) {}
       
   356         
       
   357     /**
       
   358      * See upnpavcontrolpointobserver.h
       
   359      */
       
   360     void CdsBrowseResponse(
       
   361         const TDesC8& /*aUuid*/,
       
   362         TInt /*aSessionId*/,
       
   363         TInt /*aErr*/,
       
   364         const TDesC8& /*aObjectID*/,
       
   365         const TDesC8& /*aBrowseFlag*/,
       
   366         const TDesC8& /*aFilter*/,
       
   367         TInt /*aIndex*/,
       
   368         TInt /*aRequest*/,
       
   369         const TDesC8& /*aSortCriteria*/,
       
   370         const TDesC8& /*aResult*/,
       
   371         TInt /*aReturned*/,
       
   372         TInt /*aMatches*/,
       
   373         const TDesC8& /*aUpdateID*/) {}
       
   374         
       
   375     /**
       
   376      * See upnpavcontrolpointobserver.h
       
   377      */
       
   378     void CdsSearchResponse(
       
   379         const TDesC8& /*aUuid*/,
       
   380         TInt /*aSessionId*/,
       
   381         TInt /*aErr*/,
       
   382         const TDesC8& /*aContainerId*/,
       
   383         const TDesC8& /*aSearchCriteria*/,
       
   384         const TDesC8& /*aFilter*/,
       
   385         TInt /*aIndex*/,
       
   386         TInt /*aRequest*/,
       
   387         const TDesC8& /*aSortCriteria*/,
       
   388         const TDesC8& /*aResult*/,
       
   389         TInt /*aReturned*/,
       
   390         TInt /*aMatches*/,
       
   391         const TDesC8& /*aUpdateID*/) {}
       
   392         
       
   393     /**
       
   394      * See upnpavcontrolpointobserver.h
       
   395      */
       
   396     void CdsDestroyObjectResponse(
       
   397         const TDesC8& /*aUuid*/,
       
   398         TInt /*aSessionId*/,
       
   399         TInt /*aErr*/,
       
   400         const TDesC8& /*aObjectId*/ ) {}
       
   401         
       
   402     /**
       
   403      * See upnpavcontrolpointobserver.h
       
   404      */
       
   405     void CdsUpdateObjectResponse(
       
   406         const TDesC8& /*aUuid*/,
       
   407         TInt /*aSessionId*/,
       
   408         TInt /*aErr*/,
       
   409         const TDesC8& /*aObjectId*/,
       
   410         const TDesC8& /*aCurrentTagValue*/,
       
   411         const TDesC8& /*aNewTagValue*/ ) {}
       
   412         
       
   413     /**
       
   414      * See upnpavcontrolpointobserver.h
       
   415      */
       
   416     void CdsImportResponse(
       
   417         const TDesC8& /*aUuid*/,
       
   418         TInt /*aSessionId*/,
       
   419         TInt /*aErr*/,
       
   420         const TDesC8& /*aSourceURI*/,
       
   421         const TDesC8& /*aDestinationURI*/,
       
   422         const TDesC8& /*aTransferId*/ ) {}
       
   423         
       
   424     /**
       
   425      * See upnpavcontrolpointobserver.h
       
   426      */
       
   427     void CdsExportResponse(
       
   428         const TDesC8& /*aUuid*/,
       
   429         TInt /*aSessionId*/,
       
   430         TInt /*aErr*/,
       
   431         const TDesC8& /*aSourceURI*/,
       
   432         const TDesC8& /*aDestinationURI*/,
       
   433         const TDesC8& /*aTransferId*/ ) {}
       
   434         
       
   435     /**
       
   436      * See upnpavcontrolpointobserver.h
       
   437      */
       
   438     void CdsStopTransferResponse(
       
   439         const TDesC8& /*aUuid*/,
       
   440         TInt /*aSessionId*/,
       
   441         TInt /*aErr*/,
       
   442         const TDesC8& /*aTransferId*/ ) {}
       
   443     
       
   444     /**
       
   445      * See upnpavcontrolpointobserver.h
       
   446      */
       
   447     virtual void CdsCTransferProgressResponse(
       
   448         const TDesC8& /*aUuid*/,
       
   449         TInt /*aSessionId*/,
       
   450         TInt /*aErr*/,
       
   451         const TDesC8& /*aTransferId*/,
       
   452         const TDesC8& /*aTransferStatus*/,
       
   453         const TDesC8& /*aTransferLength*/,            
       
   454         const TDesC8& /*aTransferTotal*/ ) {}
       
   455         
       
   456     /**
       
   457      * See upnpavcontrolpointobserver.h
       
   458      */
       
   459     void CdsDeleteResourceResponse(
       
   460         const TDesC8& /*aUuid*/,
       
   461         TInt /*aSessionId*/,
       
   462         TInt /*aErr*/,
       
   463         const TDesC8& /*aResourceUri*/ ) {}
       
   464         
       
   465     /**
       
   466      * See upnpavcontrolpointobserver.h
       
   467      */
       
   468     void CdsCreateReferenceResponse(
       
   469         const TDesC8& /*aUuid*/,
       
   470         TInt /*aSessionId*/,
       
   471         TInt /*aErr*/,
       
   472         const TDesC8& /*aContainerId*/, 
       
   473         const TDesC8& /*aObjectId*/, 
       
   474         const TDesC8& /*aNewId*/ ) {}
       
   475         
       
   476     /**
       
   477      * See upnpavcontrolpointobserver.h
       
   478      */
       
   479     void CdsCreateObjectResponse(
       
   480         const TDesC8& aUuid,
       
   481         TInt aSessionId,
       
   482         TInt aErr,
       
   483         const TDesC8& aContainerID, 
       
   484         const TDesC8& aElements, 
       
   485         const TDesC8& aObjectID, 
       
   486         const TDesC8& aResult );
       
   487         
       
   488     /**
       
   489      * See upnpavcontrolpointobserver.h
       
   490      */
       
   491     void CmProtocolInfoResponse(
       
   492         const TDesC8& /*aUuid*/,
       
   493         TInt /*aSessionId*/,
       
   494         TInt /*aErr*/,
       
   495         const TDesC8& /*aSource*/, 
       
   496         const TDesC8& /*aSink*/ ) {}
       
   497     
       
   498     /**
       
   499      * See upnpavcontrolpointobserver.h
       
   500      */
       
   501     void CmPrepareResponse(
       
   502         const TDesC8& /*aUuid*/,
       
   503         TInt /*aSessionId*/,
       
   504         TInt /*aErr*/,
       
   505         const TDesC8& /*aRemoteProtocolInfo*/,
       
   506         const TDesC8& /*aPeerConnectionManager*/,
       
   507         const TDesC8& /*aPeerConnectionId*/,
       
   508         const TDesC8& /*aDirection*/,
       
   509         TInt /*aConnection*/,
       
   510         TInt /*aTransport*/,
       
   511         TInt /*aRsc*/ ) {}
       
   512     
       
   513     /**
       
   514      * See upnpavcontrolpointobserver.h
       
   515      */
       
   516     void CmComplete(
       
   517         const TDesC8& /*aUuid*/,
       
   518         TInt /*aSessionId*/,
       
   519         TInt /*aErr*/,
       
   520         TInt /*aConnection*/ ) {}
       
   521         
       
   522     /**
       
   523      * See upnpavcontrolpointobserver.h
       
   524      */
       
   525     void CmCurrentConnections(
       
   526         const TDesC8& /*aUuid*/,
       
   527         TInt /*aSessionId*/,
       
   528         TInt /*aErr*/,
       
   529         const TDesC8& /*aConnections*/) {}
       
   530         
       
   531     /**
       
   532      * See upnpavcontrolpointobserver.h
       
   533      */
       
   534     void CmCurrentInfo(
       
   535         const TDesC8& /*aUuid*/,
       
   536         TInt /*aSessionId*/,
       
   537         TInt /*aErr*/,
       
   538         TInt /*rscId*/, 
       
   539         TInt /*transportId*/, 
       
   540         const TDesC8& /*aProtocolInfo*/,
       
   541         const TDesC8& /*aPeerConnectionManager*/, 
       
   542         TInt /*peerId*/, 
       
   543         const TDesC8& /*aDirection*/, 
       
   544         const TDesC8& /*aStatus*/ ) {}
       
   545 
       
   546     /**
       
   547      * See upnpavcontrolpointobserver.h
       
   548      */
       
   549     void CdsUpdateEvent(
       
   550             const TDesC8& /*aUuid*/,
       
   551             TInt /*aSystemUpdateId*/
       
   552             ) {}
       
   553             
       
   554     /**
       
   555      * See upnpavcontrolpointobserver.h
       
   556      */
       
   557     void CdsContainerEvent(
       
   558             const TDesC8& /*aUuid*/,
       
   559             const TDesC8& /*aConteinerIds*/
       
   560             ) {}
       
   561             
       
   562     /**
       
   563      * See upnpavcontrolpointobserver.h
       
   564      */
       
   565     void CdsTransferEvent(
       
   566             const TDesC8& /*aUuid*/,
       
   567             const TDesC8& /*aTransferIds*/
       
   568             ) {}
       
   569             
       
   570     /**
       
   571      * See upnpavcontrolpointobserver.h
       
   572      */
       
   573     void RcLastChangeEvent(
       
   574             const TDesC8& /*aUuid*/,
       
   575             const TDesC8& /*aLastChange*/
       
   576             ) {}
       
   577             
       
   578     /**
       
   579      * See upnpavcontrolpointobserver.h
       
   580      */
       
   581     void AvtLastChangeEvent(
       
   582             const TDesC8& /*aUuid*/,
       
   583             const TDesC8& /*aLastChange*/
       
   584             ) {}
       
   585     /**
       
   586      * See upnpavcontrolpointobserver.h
       
   587      */
       
   588     void CmSourceEvent(
       
   589             const TDesC8& /*aUuid*/,
       
   590             const TDesC8& /*aSource*/
       
   591             ) {}
       
   592             
       
   593     /**
       
   594      * See upnpavcontrolpointobserver.h
       
   595      */
       
   596     void CmSinkEvent(
       
   597             const TDesC8& /*aUuid*/,
       
   598             const TDesC8& /*aSink*/
       
   599             ) {}
       
   600             
       
   601     /**
       
   602      * See upnpavcontrolpointobserver.h
       
   603      */
       
   604     void CmConnectionsEvent(
       
   605             const TDesC8& /*aUuid*/,
       
   606             const TDesC8& /*aConnections*/
       
   607             ) {}
       
   608 
       
   609     /**
       
   610      * See upnpavcontrolpointobserver.h
       
   611      */
       
   612     void HttpResponseL( CUpnpHttpMessage* /*aMessage*/ ) {}
       
   613 
       
   614 public:
       
   615 
       
   616     /**
       
   617      * See upnpavcontrolpointobserver.h
       
   618      */
       
   619     void DeviceDiscoveredL( CUpnpDevice* /*aDevice*/ ) {} 
       
   620 
       
   621     /**
       
   622      * See upnpavcontrolpointobserver.h
       
   623      */
       
   624     void DeviceDisappearedL( CUpnpDevice* /*aDevice*/ ) {}
       
   625      
       
   626 public: // New functions
       
   627 
       
   628     /**
       
   629      * Starts upload
       
   630      *
       
   631      * @param aMessage message
       
   632      */
       
   633     void StartUploadL( const RMessage2& aMessage );
       
   634     
       
   635     /**
       
   636      * Cancels upload
       
   637      *
       
   638      * @param aMessage message
       
   639      */
       
   640     void CancelUploadL( const RMessage2& aMessage );
       
   641 
       
   642     /**
       
   643      * Cancels uploads
       
   644      *
       
   645      * @param aMessage message
       
   646      */
       
   647     void CancelAllUploadsL( const RMessage2& aMessage );
       
   648     
       
   649     /**
       
   650      * Start tracking progress
       
   651      *
       
   652      * @param aMessage message
       
   653      */
       
   654     void StartTrackingUploadProgressL( const RMessage2& aMessage );
       
   655 
       
   656     /**
       
   657      * Stop tracking progress
       
   658      *
       
   659      * @param aMessage message
       
   660      */
       
   661     void StopTrackingUploadProgressL( const RMessage2& aMessage );
       
   662 
       
   663     /**
       
   664      * Saves a message to receive events
       
   665      *
       
   666      * @param aMessage message
       
   667      */
       
   668     void GetUploadEventL( const RMessage2& aMessage );
       
   669     
       
   670     /**
       
   671      * Cancels events
       
   672      *
       
   673      * @param aMessage message
       
   674      */
       
   675     void CancelGetUploadEventL( const RMessage2& aMessage );
       
   676 
       
   677     /**
       
   678      * Handles UPnP device disappears.
       
   679      *
       
   680      * @param aDevice Device that disappeared.
       
   681      */
       
   682     void DeviceDisappearedL( CUpnpAVDeviceExtended& aDevice );
       
   683 
       
   684 private:
       
   685 
       
   686     /**
       
   687      * Set mandatory transfer headers
       
   688      *
       
   689      * @param aInfo protocolInfo
       
   690      * @param aKey transfer id
       
   691      */
       
   692     void SetHeadersL( const TDesC8& aInfo, TAny* aKey );
       
   693     
       
   694     /**
       
   695      * Prepares for upload
       
   696      *
       
   697      * @param aEvent transfer event
       
   698      */
       
   699     void ReadyForTransferL( TUpnpFileTransferEvent& aEvent );
       
   700   
       
   701     /**
       
   702      * Parsers CreateObject-response
       
   703      *
       
   704      * @param aResponse CreateObject-response
       
   705      * @return importUri
       
   706      */
       
   707     HBufC8* ParseCreateObjectResponseL( const TDesC8& aResponse );
       
   708     
       
   709     
       
   710     /**
       
   711      * Handles CreateObject-response
       
   712      *
       
   713      * @param aResponse aObjectID object id
       
   714      * @param aResult CreateObject-response
       
   715      */
       
   716     void HandleObjectResponseL( const TDesC8& aObjectID,
       
   717         const TDesC8& aResult );
       
   718         
       
   719     /**
       
   720      * Finds and return importUri from an item
       
   721      *
       
   722      * @param aObject UPnP item
       
   723      * @return importUri
       
   724      */
       
   725     HBufC8* ImportURIFromItemL( const CUpnpObject& aObject );
       
   726     
       
   727     /**
       
   728      * Converts DLNA compliant protocolInfo to UPnP protocolInfo
       
   729      *
       
   730      * @param aInfo DLNA protolInfo
       
   731      */
       
   732     void ProtocolInfoToUPnPL( const CUpnpAttribute* aInfo );    
       
   733     
       
   734     /**
       
   735      * Issues active scheduler's wait stop request(with/without callback)
       
   736      *
       
   737      * @param none
       
   738      * @return none
       
   739      */
       
   740     void StopWait();
       
   741 
       
   742     /**
       
   743      * Callback for active scheduler's wait stop request
       
   744      *
       
   745      */
       
   746     static TInt SchedulerStoppedCallBack( TAny* aPtr );
       
   747     
       
   748     /**
       
   749      * Does necessary action on active scheduler's wait stop complete
       
   750      *
       
   751      * @param none
       
   752      * @return none
       
   753      */
       
   754     void DoSchedulerStoppedCallBack();
       
   755     
       
   756 private:
       
   757 
       
   758     /**
       
   759      * Http Uploader, used to upload files
       
   760      *
       
   761      * Owned
       
   762      */
       
   763     CHttpUploader*                          iUploader;
       
   764     
       
   765     /**
       
   766      * Used to synchronize CreateObject-action 
       
   767      */
       
   768     CActiveSchedulerWait                    iWait;
       
   769             
       
   770     /**
       
   771      * Resource helper array
       
   772      *
       
   773      * Owned
       
   774      */
       
   775     RPointerArray<CUPnPResourceHelper>      iResources;
       
   776         
       
   777     /**
       
   778      * Resource index
       
   779      */
       
   780     TInt                                    iResourceIndex;
       
   781     
       
   782     /**
       
   783      * Stores error (status) code from CreateObject-action
       
   784      */
       
   785     TInt                                    iAsyncError;
       
   786     
       
   787     /**
       
   788      * Session id for CreateObject-action
       
   789      */
       
   790     TInt                                    iIPSessionId;
       
   791     
       
   792     /**
       
   793      * Scheduler stop request
       
   794      */
       
   795     TBool                                   iSchedulerStopped;
       
   796     };
       
   797 
       
   798 #endif // C_UPNPUPLOADSESSION_H
       
   799 
       
   800 // End of file
       
   801