epoc32/include/hwrmhaptics.h
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     1 /*
     1 /*
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     8 *
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    93  *
    93  *
    94  * haptics->SupportedActuators( suppAct );
    94  * haptics->SupportedActuators( suppAct );
    95  *
    95  *
    96  * if( EHWRMLogicalActuatorDevice & suppAct )
    96  * if( EHWRMLogicalActuatorDevice & suppAct )
    97  *     {
    97  *     {
    98  *     haptics->OpenActuatorL( EHWRMLogicalActuatorDevice )
    98  *     haptics->OpenActuatorL( EHWRMLogicalActuatorDevice );
    99  *     }
    99  *     }
   100  * else if ( EHWRMLogicalActuatorAny & suppAct )
   100  * else if ( EHWRMLogicalActuatorAny & suppAct )
   101  *     {
   101  *     {
   102  *     haptics->OpenActuatorL( EHWRMLogicalActuatorAny )
   102  *     haptics->OpenActuatorL( EHWRMLogicalActuatorAny );
   103  *     }
   103  *     }
   104  *
   104  *
   105  *
   105  *
   106  * // 3rd party developers can obtain the license key from Forum Nokia
   106  * // 3rd party developers can obtain the license key from Forum Nokia
   107  * _LIT8( KLicenseKey,"_this_value_must_be_32_in_length" );
   107  * _LIT8( KLicenseKey,"_this_value_must_be_32_in_length" );
   111  *         THWRMHapticsDevicePropertyTypes::EHWRMHapticsLicenseKey,
   111  *         THWRMHapticsDevicePropertyTypes::EHWRMHapticsLicenseKey,
   112  *         KLicenseKey ) );
   112  *         KLicenseKey ) );
   113  *
   113  *
   114  * // --> now playing effects is possible
   114  * // --> now playing effects is possible
   115  *
   115  *
   116  * THWRMHapticsPeriodicEffect periodicEff;
   116  * CHWRMHaptics::THWRMHapticsPeriodicEffect periodicEff;
   117  *
   117  *
   118  * periodicEff.iDuration = 5000;
   118  * periodicEff.iDuration = 5000;
   119  * periodicEff.iMagnitude = 5000;
   119  * periodicEff.iMagnitude = 5000;
   120  * periodicEff.iPeriod = minPeriod;
   120  * periodicEff.iPeriod = minPeriod;
   121  * periodicEff.iStyle = EHWRMHapticsStyleSharp;
   121  * periodicEff.iStyle = CHWRMHaptics::EHWRMHapticsStyleSharp;
   122  * periodicEff.iAttackTime = 250;
   122  * periodicEff.iAttackTime = 250;
   123  * periodicEff.iAttackLevel = 10000;
   123  * periodicEff.iAttackLevel = 10000;
   124  * periodicEff.iFadeTime = 250;
   124  * periodicEff.iFadeTime = 250;
   125  * periodicEff.iFadeLevel = 0;
   125  * periodicEff.iFadeLevel = 0;
   126  *
   126  *
   750     * has been suspended by a higher priority reservation.
   750     * has been suspended by a higher priority reservation.
   751     * Note also that even if haptics is reserved by some client, a higher 
   751     * Note also that even if haptics is reserved by some client, a higher 
   752     * priority client succeeds in playing its effects.
   752     * priority client succeeds in playing its effects.
   753     *
   753     *
   754     * Calling this method is equal to call ReserveHapticsL(EFalse),
   754     * Calling this method is equal to call ReserveHapticsL(EFalse),
   755     * i.e. CCoeEnv background/foreground status is always used
   755     * i.e. foreground status is always used to control further reservations.
   756     * to control further reservations.
   756     * However, this is a future feature, and not implemented in current version.
   757     */
   757     */
   758     virtual void ReserveHapticsL() = 0;
   758     virtual void ReserveHapticsL() = 0;
   759 
   759 
   760     /**
   760     /**
   761     * Reserves haptics feature exclusively for this client.
   761     * Reserves haptics feature exclusively for this client.
   771     * effects are not actually played by the physical player when the client
   771     * effects are not actually played by the physical player when the client
   772     * has been suspended by a higher priority reservation.
   772     * has been suspended by a higher priority reservation.
   773     * Note also that even if haptics is reserved by some client, a higher 
   773     * Note also that even if haptics is reserved by some client, a higher 
   774     * priority client succeeds in playing its effects.
   774     * priority client succeeds in playing its effects.
   775     *
   775     *
   776     * @param aForceNoCCoeEnv If EFalse, then reservation requires that
   776     * @param aForceNoCCoeEnv (Note: This is a future feature, and not
       
   777     *                        implemented in current version.  You can think of
       
   778     *                        it ETrue always.)
       
   779     *                        If EFalse, then reservation requires that
   777     *                        this client has the keyboard focus at the time of
   780     *                        this client has the keyboard focus at the time of
   778     *                        reservation and haptics is automatically
   781     *                        reservation and haptics is automatically
   779     *                        released and re-reserved based on the keyboard
   782     *                        released and re-reserved based on the keyboard
   780     *                        focus status of this client.
   783     *                        focus status of this client.
   781     *                        This also implies that CCoeEnv::Static() != NULL
   784     *                        This also implies that CCoeEnv::Static() != NULL
   784     *                        be present nor does it automatically reserve or
   787     *                        be present nor does it automatically reserve or
   785     *                        release haptics by depending on the foreground or
   788     *                        release haptics by depending on the foreground or
   786     *                        background status of the client. Only trusted
   789     *                        background status of the client. Only trusted
   787     *                        clients are allowed to set this flag to ETrue.
   790     *                        clients are allowed to set this flag to ETrue.
   788     *                        The client application is considered trusted if 
   791     *                        The client application is considered trusted if 
   789     *                it has a priority defined in haptics policy file.                              *                The policy files can be modified by S60 licensees.
   792     *                        it has a priority defined in haptics policy file. 
       
   793     *                        The policy files can be modified by S60 licensees. 
   790     *
   794     *
   791     * @leave KErrAccessDenied Parameter aForceNoCCoeEnv is ETrue
   795     * @leave KErrAccessDenied Parameter aForceNoCCoeEnv is ETrue
   792     *                         and client is not trusted.
   796     *                         and client is not trusted.
   793     * @leave KErrBadHandle Parameter aForceNoCCoeEnv is EFalse
   797     * @leave KErrBadHandle Parameter aForceNoCCoeEnv is EFalse
   794     *                      and no CCoeEnv present.
   798     *                      and no CCoeEnv present.