javauis/mmapi_qt/baseline/inc/cmmaevent.h
branchRCL_3
changeset 24 0fd27995241b
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 #ifndef CMMAEVENT_H
       
    20 #define CMMAEVENT_H
       
    21 
       
    22 // #include <mevents.h>
       
    23 #include "mmapiutils.h"
       
    24 
       
    25 class MMAFunctionServer;
       
    26 
       
    27 //  CLASS DECLARATION
       
    28 /**
       
    29 *   This class is used to post events to the java.
       
    30 *
       
    31 *
       
    32 */
       
    33 
       
    34 NONSHARABLE_CLASS(CMMAEvent) // public CJavaEvent< MMAFunctionServer >
       
    35 {
       
    36 public:
       
    37 
       
    38     enum {EEventPriority = 0, ENotifyPriority = 1, ELastPriority = 1};
       
    39     enum TDisposability { EDisposableEvent, EReusableEvent };
       
    40 
       
    41     CMMAEvent(jobject aNotifyObject,
       
    42     jmethodID aHandleEventMethod,
       
    43     TDisposability aDisposable = EDisposableEvent);
       
    44 
       
    45 protected:
       
    46     CMMAEvent(TDisposability aDisposable);
       
    47 
       
    48 public:
       
    49     void SetEventData(TInt aEventData);
       
    50 
       
    51 
       
    52 public: // from CJavaEvent
       
    53     virtual void Dispatch(JNIEnv& aJni);
       
    54 
       
    55 protected:
       
    56     jobject iListenerObject;
       
    57     jmethodID iHandleEventMethod;
       
    58     TInt iEventData;
       
    59 };
       
    60 
       
    61 #endif // CMMAEVENT_H