upnp/upnpstack/serviceframework/inc/upnpsilentdeviceimplementation.h
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     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:  Declares the CUpnpSilentDeviceImplementation class
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CUPNPSILENTDEVICEIMPLEMENTATION_H
       
    20 #define C_CUPNPSILENTDEVICEIMPLEMENTATION_H
       
    21 
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32std.h>
       
    25 #include <badesca.h>
       
    26 #include "upnpdeviceimplementationbase.h"
       
    27 
       
    28 
       
    29 //FORWARD DECLARATIONS
       
    30 class MUpnpDeviceDescriptionProvider;
       
    31 
       
    32 /**
       
    33  *  CUpnpSilentDeviceImplementation
       
    34  *
       
    35  *  Prior using the CUpnpDevice class, client application has to create the network
       
    36  *  connection. If connection is not up and running, the
       
    37  *  CUpnpDispatcherEngine class construction will fail.
       
    38  *  See UPnP Interface Design document for instuctions.
       
    39  *
       
    40  *  @since Series60 3.2
       
    41  */
       
    42 class CUpnpSilentDeviceImplementation : public CUpnpDeviceImplementationBase
       
    43     {
       
    44 public:
       
    45 
       
    46     /**
       
    47      * Two-phased constructor.
       
    48      * The most important operations invoked inside this method:
       
    49      * 1. Start Upnp Stack (if not started yet)
       
    50      * 2. Parse device description to DOM for further updating purpose.
       
    51      *
       
    52      * @since Series60 3.2
       
    53      * @param aFilename File to create device from, name include full path.
       
    54      * @return A new CUpnpDevice instance.
       
    55      */
       
    56     IMPORT_C static CUpnpSilentDeviceImplementation* NewL( 
       
    57             const TDesC8& aUri, 
       
    58             CUpnpDeviceDescriptionStore& aDescriptionStore,
       
    59             MUpnpDeviceDescriptionProvider& aProvider );
       
    60 
       
    61     /**
       
    62      * Called after the device is constructed.
       
    63      * The most important operations invoked inside this method:
       
    64      * 1. Start the HTTP server.
       
    65      * 2. Generate the UUID (if missing in the device description)
       
    66      * 3. Save the device description to the file.
       
    67      * 
       
    68      * @since Series60 3.2
       
    69      * @return none
       
    70      */
       
    71     IMPORT_C virtual void StartL( const TInt aPort = KRandomPort );
       
    72 
       
    73     /**
       
    74      * Stops the device.
       
    75      * @since Series60 3.2
       
    76      */
       
    77     IMPORT_C virtual void StopL();
       
    78 
       
    79     /**
       
    80      * C++ default constructor.
       
    81      */
       
    82     CUpnpSilentDeviceImplementation();
       
    83 
       
    84     /**
       
    85      * Destructor.
       
    86      */
       
    87     IMPORT_C virtual ~CUpnpSilentDeviceImplementation();
       
    88 
       
    89 private:
       
    90 
       
    91     /**
       
    92      * Symbian 2nd phase constructor can leave
       
    93      * @since Series60 3.2
       
    94      * @param aFilename File to create device from
       
    95      */
       
    96     void ConstructL( const TDesC8& aUri, 
       
    97                      CUpnpDeviceDescriptionStore& aDescriptionStore,
       
    98                      MUpnpDeviceDescriptionProvider& aProvider );
       
    99 
       
   100     /**
       
   101      * Internal: Stops device and HTTP server
       
   102      * @since Series60 3.2
       
   103      */
       
   104     void StopDeviceL();
       
   105 
       
   106     };
       
   107 
       
   108 #endif  // C_CUPNPSILENTDEVICEIMPLEMENTATION_H
       
   109 
       
   110 // End of File