upnpavcontroller/upnpavcontrollerserver/inc/upnpfilesharingactive.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /*
       
     2 * Copyright (c) 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:      AO for file sharing operations
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef C_UPNPFILESHARINGACTIVE_H
       
    24 #define C_UPNPFILESHARINGACTIVE_H
       
    25 
       
    26 // INCLUDE FILES
       
    27 #include <e32std.h>
       
    28 #include <e32base.h>
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CUPnPAVRenderingSessionImpl;
       
    32 class CUpnpFileSharing;
       
    33 class CUpnpItem;
       
    34 
       
    35 /**
       
    36  *  Used to make an asynchronous file sharing operation to synchronous
       
    37  *  operation. Handles UPnP Security for a file.
       
    38  *
       
    39  *  @since S60 v3.1
       
    40  */
       
    41 class CUPnPFileSharingActive : public CActive
       
    42     {
       
    43 
       
    44 public:
       
    45 
       
    46     /**
       
    47      * Static 1st phase construct
       
    48      */
       
    49     static CUPnPFileSharingActive* NewL();
       
    50     
       
    51     /**
       
    52      * Destructor
       
    53      */
       
    54     virtual ~CUPnPFileSharingActive();
       
    55        
       
    56 private:
       
    57 
       
    58     /**
       
    59      * Constructor
       
    60      */
       
    61     CUPnPFileSharingActive();
       
    62     
       
    63     void ConstructL();
       
    64 
       
    65 private: // Private methods for accessing UPnP security
       
    66 
       
    67     /**
       
    68      * Allows/denied access to the files to which the given item's res-
       
    69      * elements are pointing.
       
    70      *
       
    71      * @since Series 60 3.2
       
    72      * @param aItem the item
       
    73      * @param aAccessAllowed ETrue to allow and EFalse to deny the access
       
    74      */
       
    75     void SetAccesstoItemResourcesL( CUpnpItem& aItem, TBool aAccessAllowed );
       
    76     
       
    77 protected: // From CActive
       
    78 
       
    79     /**
       
    80      * See e32base.h
       
    81      */
       
    82     void RunL();
       
    83     
       
    84     /**
       
    85      * See e32base.h
       
    86      */
       
    87     void DoCancel();
       
    88     
       
    89     /**
       
    90      * See e32base.h
       
    91      */
       
    92     TInt RunError( TInt aError );
       
    93 
       
    94 public: // New functions    
       
    95 
       
    96     /**
       
    97      * Shares an item
       
    98      *
       
    99      * @param item to share
       
   100      */
       
   101     void ShareItemL( CUpnpItem& aItem );
       
   102     
       
   103     /**
       
   104      * Unshares an item
       
   105      *
       
   106      * @param aId item to unshare (id)
       
   107      */
       
   108     void UnShareItemL( const TDesC8& aId );
       
   109 
       
   110 private:
       
   111     
       
   112     CUpnpFileSharing* iFileSharing; // Own
       
   113     
       
   114     };
       
   115 
       
   116 #endif // C_UPNPAVEVENTACTIVE_H