javauis/mmapi_qt/directcontent/src/cmmadcfullscreenevent.cpp
branchRCL_3
changeset 17 0fd27995241b
equal deleted inserted replaced
15:f9bb0fca356a 17:0fd27995241b
       
     1 /*
       
     2 * Copyright (c) 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:  This class is used to send direct content fullscreen event.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 //  INCLUDE FILES
       
    20 #include <logger.h>
       
    21 
       
    22 #include "cmmadcfullscreenevent.h"
       
    23 
       
    24 CMMADCFullScreenEvent::CMMADCFullScreenEvent(jobject aGUIObject, TBool aFullScreen):
       
    25         CMMAEvent(EDisposableEvent)
       
    26 {
       
    27     iListenerObject = aGUIObject;
       
    28     iEventData = aFullScreen;
       
    29 }
       
    30 
       
    31 // from CJavaEvent
       
    32 void CMMADCFullScreenEvent::Dispatch(JNIEnv& aJni)
       
    33 {
       
    34     LOG( EJavaMMAPI, EInfo, "MMA::CMMADCFullScreenEvent::Dispatch");
       
    35     iHandleEventMethod = aJni.GetMethodID(aJni.GetObjectClass(iListenerObject),
       
    36                                           "setFullScreen",
       
    37                                           "(Z)V");
       
    38     if (iHandleEventMethod &&
       
    39             (aJni.IsSameObject(iListenerObject, 0) == JNI_FALSE))
       
    40     {
       
    41         aJni.CallVoidMethod(iListenerObject,
       
    42                             iHandleEventMethod,
       
    43                             iEventData);
       
    44     }
       
    45 }
       
    46 
       
    47 //  END OF FILE