upnp/upnpstack/serviceframework/inc/upnpnonmoderatedeventqueuemanager.h
changeset 0 f5a58ecadc66
equal deleted inserted replaced
-1:000000000000 0:f5a58ecadc66
       
     1 /** @file
       
     2 * Copyright (c) 2008-2008 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:  Implements algoritms for modereted events
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_CUPNPNONMODERATEDEVENTQUEUEMANAGER_H
       
    20 #define C_CUPNPNONMODERATEDEVENTQUEUEMANAGER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 #include <e32base.h>
       
    25 
       
    26 #include "upnphttptransaction.h"
       
    27 #include "upnpserviceimplementation.h"
       
    28 #include "upnpeventcontroller.h"
       
    29 #include "upnpeventqueuemanagerbase.h"
       
    30 #include "upnpsubscriberlibrary.h"
       
    31 
       
    32 
       
    33 // CLASS DECLARATION
       
    34 
       
    35 /**
       
    36 *  Implements algoritms for serving nonmoderated events
       
    37 * 
       
    38 */
       
    39 NONSHARABLE_CLASS( CUpnpNonModeratedEventQueueManager ): public CUpnpEventQueueManagerBase
       
    40     {
       
    41 public:
       
    42     // Constructors and destructor
       
    43 
       
    44     /**
       
    45      * Destructor.
       
    46      */
       
    47     ~CUpnpNonModeratedEventQueueManager();
       
    48 
       
    49     /**
       
    50      * Two-phased constructor.
       
    51      */
       
    52     static CUpnpNonModeratedEventQueueManager* NewL( CUpnpServiceImplementation& aServiceImpl,
       
    53                                                      CUpnpEventController& aEventController,
       
    54                                                      CUpnpSubscriberLibrary* aSubscriberLibrary );
       
    55 
       
    56     /**
       
    57      * Two-phased constructor.
       
    58      */
       
    59     static CUpnpNonModeratedEventQueueManager* NewLC( CUpnpServiceImplementation& aServiceImpl,
       
    60                                                       CUpnpEventController& aEventController,
       
    61                                                       CUpnpSubscriberLibrary* aSubscriberLibrary );
       
    62                                                       
       
    63 private:    
       
    64 
       
    65     /**
       
    66     * algoritm implemetation
       
    67     */
       
    68     void SendEvent();
       
    69     
       
    70     /**
       
    71     * algoritm implemetation
       
    72     * @param aEvent buffer for message body
       
    73     * @param aVariableList list of evented variables
       
    74     * @return number of evented variables
       
    75     */
       
    76     TInt FillEventBodyL( TDes8& aEvent, const RPointerArray<CUpnpStateVariable>& aVariableList );
       
    77     
       
    78     /**
       
    79     * Creates event message
       
    80     * @param aMessage will be encapsulete into http transaction
       
    81     * @return Http transcaction with event message
       
    82     */
       
    83     CUpnpHttpTransaction* CreateTransactionL( CUpnpHttpMessage* aMessage );                                                      
       
    84     
       
    85     /**
       
    86     * 
       
    87     */
       
    88     void SendEventL();
       
    89     
       
    90 private:
       
    91 
       
    92     /**
       
    93      * Constructor for performing 1st stage construction
       
    94      */
       
    95     CUpnpNonModeratedEventQueueManager( CUpnpServiceImplementation& iServiceImpl,
       
    96                                         CUpnpEventController& iEventController,
       
    97                                         CUpnpSubscriberLibrary* aSubscriberLibrary );
       
    98 
       
    99     /**
       
   100     * Constructor for performing 2st stage construction
       
   101     */
       
   102     void ConstructL();
       
   103 
       
   104 private:
       
   105     
       
   106     };
       
   107 
       
   108 #endif // C_CUPNPNONMODERATEDEVENTQUEUEMANAGER_H
       
   109 //end of file