javauis/mmapi_qt/baseline/src/cmmaevent.cpp
branchRCL_3
changeset 24 0fd27995241b
child 26 dc7c549001d5
equal deleted inserted replaced
20:f9bb0fca356a 24:0fd27995241b
       
     1 /*
       
     2 * Copyright (c) 2002 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:  This class is used to post events to the java.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 //  INCLUDE FILES
       
    20 #include <logger.h>
       
    21 
       
    22 #include "cmmaevent.h"
       
    23 
       
    24 CMMAEvent::CMMAEvent(jobject aNotifyObject,
       
    25                      jmethodID aHandleEventMethod,
       
    26                      TDisposability aDisposable):
       
    27         iListenerObject(aNotifyObject),
       
    28         iHandleEventMethod(aHandleEventMethod)
       
    29 {
       
    30 }
       
    31 
       
    32 
       
    33 CMMAEvent::CMMAEvent(TDisposability /*aDisposable*/)
       
    34 {
       
    35 }
       
    36 
       
    37 
       
    38 void CMMAEvent::SetEventData(TInt aEventData)
       
    39 {
       
    40     iEventData = aEventData;
       
    41 }
       
    42 
       
    43 
       
    44 // from CJavaEvent
       
    45 void CMMAEvent::Dispatch(JNIEnv& aJni)
       
    46 {
       
    47     LOG1( EJavaMMAPI, EInfo, "MMA::CMMAEvent::Dispatch iEventData=%d", iEventData);
       
    48 
       
    49     aJni.CallVoidMethod(iListenerObject,
       
    50                         iHandleEventMethod,
       
    51                         iEventData);
       
    52 }
       
    53 
       
    54 //  END OF FILE