dlnasrv_plat/upnp_command_api/inc/upnpbrowsecommand.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /** @file
       
     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:  Helper class to ease the use of the Upnp Framework's
       
    15 *                UpnpCommand API when browsing the Upnp home network.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef UPNP_BROWSE_COMMAND_H
       
    21 #define UPNP_BROWSE_COMMAND_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CUpnpCommand;
       
    28 
       
    29 // CLASS DEFINITION
       
    30 class CUpnpBrowseCommand: public CBase
       
    31     {
       
    32 
       
    33     public: // Construction/destruction methods
       
    34 
       
    35         /**
       
    36          * Creates a new UpnpCommand for Upnp home network browsing purposes.
       
    37          * Does not instantiate Upnp Framework services yet at this point.
       
    38          *
       
    39          * Leaves with KErrNotReady if Upnp dedicated IAP is not set, or with
       
    40          * using standard e32err.h error code if construction fails.
       
    41          *
       
    42          * @since S60 3.2
       
    43          * @return a new CUpnpBrowseCommand object
       
    44          */
       
    45         IMPORT_C static CUpnpBrowseCommand* NewL();
       
    46 
       
    47         /**
       
    48          * Destructor.
       
    49          *
       
    50          * @since S60 3.2
       
    51          */
       
    52         virtual ~CUpnpBrowseCommand();
       
    53 
       
    54     public: // Business logic methods
       
    55 
       
    56         /**
       
    57          * Returns the availability information of the command.
       
    58          *
       
    59          * @since S60 3.2
       
    60          * @return TBool (ETrue if available)
       
    61          */
       
    62         IMPORT_C static TBool IsAvailableL();
       
    63 
       
    64         /**
       
    65          * Allocates Upnp Framework resources, and initiates Upnp home network
       
    66          * browsing.
       
    67          *
       
    68          * Leaves if the operation fails. Standard system wide (e32err.h)
       
    69          * error codes will be used.
       
    70          *
       
    71          * @since S60 3.2
       
    72          */
       
    73         IMPORT_C void BrowseHomeNetworkL();
       
    74 
       
    75     private: // Private construction methods
       
    76 
       
    77         /**
       
    78          * Constructor
       
    79          *
       
    80          * @since S60 3.2
       
    81          */
       
    82         CUpnpBrowseCommand();
       
    83 
       
    84         /**
       
    85          * Second phase constructor
       
    86          *
       
    87          * @since S60 3.2
       
    88          */
       
    89         void ConstructL();
       
    90 
       
    91     private: // Data members
       
    92 
       
    93         /*
       
    94          * UpnpCommand instance, owned
       
    95          */
       
    96         CUpnpCommand*    iCommand;
       
    97 
       
    98     };
       
    99 
       
   100 #endif // UPNP_BROWSE_COMMAND_H
       
   101 
       
   102 // End of File