upnpmediaserver/contentdirectoryservice/inc/upnpstatehandler.h
author Sampo Huttunen <sampo.huttunen@nokia.com>
Wed, 24 Nov 2010 09:39:46 +0200
branchIOP_Improvements
changeset 45 a6c41ca11adf
parent 0 7f85d04be362
permissions -rw-r--r--
Updated the SIS package, there was some BC issue with the earlier version. Also updated the platform UID to S^3 version.

/** @file
* Copyright (c) 2005-2006 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies  this distribution, and is available 
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  State handler
*
*/


#ifndef C_CUPNPSTATEHANDLER_H
#define C_CUPNPSTATEHANDLER_H

//  INCLUDES
#include "e32base.h"

class TUpnpContainerUpdateId;
class CUpnpContentDirectory;

class CUpnpStateHandler :
        public CBase              
    {
    public: // Constructor and destructor

        /**
        * Two-phased constructor.
        */
        CUpnpStateHandler (  );

        /**
        * Destructor.
        */
        ~CUpnpStateHandler ();  
                                                                
    public: // New functions
        static CUpnpStateHandler* NewL(CUpnpContentDirectory* aCd);         
        void  ConstructL(CUpnpContentDirectory* aCd);        
        /**
        * This fuction increases a value of SystemUpdateID. 
        * @since Series 60 2.6
        * @return a new value of SystemUpdateID 
        */
        TInt IncreaseSystemUpdateIdL();
        
        /**
        * This fuctions increases a container update ID.
        * @since Series 60 2.6
        * @param aContainerID a ID of the container whichs updateID is increased
        */
        void IncreaseContainerUpdateIdL( const TDesC8& aContainerID );
        
        
        RArray<TUpnpContainerUpdateId>& ContainerUpdateIds( );
        TInt ContainerUpdateId( const TDesC8& aContainerID );
        /**
        * This function is for informing service from evented statevariables.
        * @since Series 60 2.6
        * @param aVariableName Name of the evented statevariable.
        */
        void StateVariableEvented(const TDesC8& aVariableName);
        TBool IsEnable();
    private:        
        //array for containerUpdateId elements
        RArray<TUpnpContainerUpdateId>  iContainerUpdateIds;
        // This must be changed everytime when content changes.
        TUint iSystemUpdateId;
        // iContainerUpdateIds subarray. 
        //It contains info about some containers' changes,
        // collected before sending next NOTIFY event.             
        RArray<TUpnpContainerUpdateId>  iCurrentContainerUpdateIds;
        // this tells if statevariable is evented after last modification
        TBool iContainerUpdateIdsEvented;
        CUpnpContentDirectory* iCd;
    };
    

#endif      // C_CUPNPSTATEHANDLER_H
        
// End of File