webengine/device/inc/ServiceEventHandler.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 27 Aug 2009 07:44:59 +0300
changeset 16 a359256acfc6
parent 0 dd21522fd290
permissions -rw-r--r--
Revision: 200929 Kit: 200935

/*
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "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:  Implemetation of ServiceEventHandler
*
*/


#ifndef __SERVICE_EVT_HANDLER_H__
#define __SERVICE_EVT_HANDLER_H__

namespace KJS
    {
    class JSObject;
    class JSValue;
    class ExecState;
    class ProtectedObject;
    class ProtectedValue;
    class List;

    class ServiceEventHandler
        {
        public: // constructor and destructor

           /**
            * Constructor
            * @return none
            * @since 5.0
            **/
            ServiceEventHandler(
                ExecState* execState,
                const JSObject* aObject,
                const JSValue* aValue,
				const TInt aTransId);

           /**
            * Destructor
            * @return none
            * @since 5.0
            **/
            virtual ~ServiceEventHandler();

        public:

           /**
            * Invoke callback function
            * @return none
            * @since 5.0
            **/
            void InvokeCall( const List& aParam );

           /**
            * Get event handler
            * @return Value
            * @since 5.0
            **/
            JSValue* CallbackFunc() const;

           /**
            * Get transaction id
            * @return Value
            * @since 5.0
            **/
			TInt TransId() const { return iTransId; }



        private:
            JSObject* iInterfaceFunc;
            JSValue* iCallbackFunc;
			TInt iTransId;
            ExecState* iGlobalExecState;
        };

    }

#endif