khronosfws/openmax_al/src/adaptation/xavibraitfadaptation.c
changeset 12 5a06f39ad45b
equal deleted inserted replaced
0:71ca22bcf22a 12:5a06f39ad45b
       
     1 /*
       
     2 * Copyright (c) 2009 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 #include "XAVibraAdaptCtx.h"
       
    19 #include "XAVibraItfAdaptation.h"
       
    20 #include "XAAdaptation.h"
       
    21 
       
    22 /*
       
    23  * XAresult XAVibraItfAdapt_Vibrate( XAAdaptationBaseCtx *bCtx, XAboolean vibrate );
       
    24  */
       
    25 XAresult XAVibraItfAdapt_Vibrate( XAAdaptationBaseCtx *bCtx, XAboolean vibrate )
       
    26 {
       
    27     XAresult ret = XA_RESULT_SUCCESS;
       
    28     if(vibrate)
       
    29     {
       
    30         DEBUG_API("->XAVibraItfAdapt_Vibrate: ON");
       
    31     }
       
    32     else
       
    33         DEBUG_API("->XAVibraItfAdapt_Vibrate: OFF");
       
    34 
       
    35 
       
    36     if(!bCtx || bCtx->ctxId != XAVibraAdaptation )
       
    37     {
       
    38         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
       
    39         DEBUG_API("<-XAVibraItfAdapt_Vibrate");
       
    40         return XA_RESULT_PARAMETER_INVALID;
       
    41     }
       
    42 
       
    43     DEBUG_INFO("No support > stubbed.");
       
    44     DEBUG_API("<-XAVibraItfAdapt_Vibrate");
       
    45 
       
    46     return ret;
       
    47 }
       
    48 /*
       
    49  * XAresult XAVibraItfAdapt_SetFrequency ( XAAdaptationBaseCtx *bCtx,   XAmilliHertz frequency );
       
    50  */
       
    51 XAresult XAVibraItfAdapt_SetFrequency ( XAAdaptationBaseCtx *bCtx,  XAmilliHertz frequency )
       
    52 {
       
    53     XAresult ret = XA_RESULT_SUCCESS;
       
    54     DEBUG_API_A1("->XAVibraItfAdapt_SetFrequency %ld", frequency);
       
    55 
       
    56     if(!bCtx || bCtx->ctxId != XAVibraAdaptation )
       
    57     {
       
    58         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
       
    59         DEBUG_API("<-XAVibraItfAdapt_SetFrequency");
       
    60         return XA_RESULT_PARAMETER_INVALID;
       
    61     }
       
    62 
       
    63     DEBUG_INFO("No support > stubbed.");
       
    64     DEBUG_API("<-XAVibraItfAdapt_SetFrequency");
       
    65     return ret;
       
    66 }
       
    67 /*
       
    68  * XAresult XAVibraItfAdapt_SetIntensity ( XAAdaptationBaseCtx *bCtx,   XApermille intensity );
       
    69  */
       
    70 XAresult XAVibraItfAdapt_SetIntensity ( XAAdaptationBaseCtx *bCtx,  XApermille intensity )
       
    71 {
       
    72     XAresult ret = XA_RESULT_SUCCESS;
       
    73     DEBUG_API_A1("->XAVibraItfAdapt_SetIntensity %d", intensity);
       
    74 
       
    75     if(!bCtx || bCtx->ctxId != XAVibraAdaptation )
       
    76     {
       
    77         DEBUG_ERR("XA_RESULT_PARAMETER_INVALID");
       
    78         DEBUG_API("<-XAVibraItfAdapt_SetIntensity");
       
    79         return XA_RESULT_PARAMETER_INVALID;
       
    80     }
       
    81 
       
    82     DEBUG_INFO("No support > stubbed.");
       
    83     DEBUG_API("<-XAVibraItfAdapt_SetIntensity");
       
    84     return ret;
       
    85 }