javauis/amms_qt/javasrc/com/nokia/amms/control/audio3d/CommitControl.java
changeset 23 98ccebc37403
equal deleted inserted replaced
21:2a9601315dfc 23:98ccebc37403
       
     1 /*
       
     2 * Copyright (c) 2005 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:
       
    15 *
       
    16 */
       
    17 
       
    18 package com.nokia.amms.control.audio3d;
       
    19 
       
    20 import com.nokia.microedition.media.NativeError;
       
    21 
       
    22 /**
       
    23  * Please refer to JSR 234 for more details.
       
    24  */
       
    25 public class CommitControl
       
    26         extends com.nokia.amms.control.ControlImpl
       
    27         implements javax.microedition.amms.control.audio3d.CommitControl
       
    28 {
       
    29     // data
       
    30     private boolean iIsDeferred = false;
       
    31 
       
    32     /**
       
    33      * Constructor
       
    34      */
       
    35     public CommitControl()
       
    36     {
       
    37     }
       
    38 
       
    39     /**
       
    40      * Please refer to JSR 234 for more details.
       
    41      */
       
    42     public void setDeferred(boolean aDeferred)
       
    43     {
       
    44         checkValid();
       
    45 
       
    46         int err = _setDeferred(iEventSource, iControlHandle, aDeferred);
       
    47 
       
    48         // check error
       
    49         NativeError.check(err);
       
    50 
       
    51         iIsDeferred = aDeferred;
       
    52     }
       
    53 
       
    54     /**
       
    55      * Please refer to JSR 234 for more details.
       
    56      */
       
    57     public boolean isDeferred()
       
    58     {
       
    59         checkValid();
       
    60 
       
    61         return iIsDeferred;
       
    62     }
       
    63 
       
    64     /**
       
    65      * Please refer to JSR 234 for more details.
       
    66      */
       
    67     public void commit()
       
    68     {
       
    69         checkValid();
       
    70 
       
    71         int err = _commit(iEventSource, iControlHandle);
       
    72 
       
    73         // check error
       
    74         NativeError.check(err);
       
    75     }
       
    76 
       
    77     // native function
       
    78     private static native int _setDeferred(int aEventSource, int aControlHandle, boolean aDeferred);
       
    79     private static native int _commit(int aEventSource, int aControlHandle);
       
    80 }