1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/hwrmhaptics.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -0,0 +1,1713 @@
1.4 +/*
1.5 +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* 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
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: This file contains the header of the CHWRMHaptics class.
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#ifndef C_HWRMHAPTICS_H
1.23 +#define C_HWRMHAPTICS_H
1.24 +
1.25 +#include <e32base.h>
1.26 +#include <hwrmlogicalactuators.h>
1.27 +#include <hwrmhapticsobserver.h>
1.28 +#include <hwrmhapticsactuatorobserver.h>
1.29 +
1.30 +/** Minimum magnitude value. */
1.31 +const TInt KHWRMHapticsMinMagnitude = 0;
1.32 +
1.33 +/** Maximum magnitude value. */
1.34 +const TInt KHWRMHapticsMaxMagnitude = 10000;
1.35 +
1.36 +/**
1.37 +* Minimum device priority.
1.38 +*
1.39 +* To be used with SetDeviceProperty().
1.40 +*/
1.41 +const TInt KHWRMHapticsMinDevicePriority = 0;
1.42 +
1.43 +/**
1.44 +* Maximum device priority.
1.45 +*
1.46 +* To be used with SetDeviceProperty().
1.47 +*/
1.48 +const TInt KHWRMHapticsMaxDevicePriority = 15;
1.49 +
1.50 +
1.51 +/** Minimum strength value. */
1.52 +const TInt KHWRMHapticsMinStrength = 0;
1.53 +
1.54 +/** Maximum strength value. */
1.55 +const TInt KHWRMHapticsMaxStrength = 10000;
1.56 +
1.57 +
1.58 + /**
1.59 + * The class used to control the device's haptics feature.
1.60 + *
1.61 + * The Haptics API provides the ability to control the device's haptics feature.
1.62 + * The API provides methods for receiving the current status and effect
1.63 + * completion of the haptics. The API provides synchronous and asynchronous
1.64 + * versions of playing methods due to the nature of effect playing
1.65 + * where multiple calls may be made to play effects.
1.66 + * Synchronous methods are provided for other API functionality.
1.67 + * They will block the calling client during their execution.
1.68 + * The API is meant for all applications which need to control the
1.69 + * device's haptics feature.
1.70 + *
1.71 + * The API consist of the class CHWRMHaptics and related observer classes:
1.72 + * MHWRMHapticsObserver and MHWRMHapticsActuatorObserver. If the client
1.73 + * requires up-to-date status information, it can be achieved by deriving
1.74 + * the client from MHWRMHapticsObserver or MHWRMHapticsActuatorObserver or
1.75 + * from both and providing a callback pointer(s) of the implementing class
1.76 + * for the NewL() method.
1.77 + *
1.78 + * @code
1.79 + *
1.80 + * // ===================================================================
1.81 + * // Usage example 1:
1.82 + * // - Setting the license key.
1.83 + * // - Playing a periodic effect
1.84 + * // - Preconditions:
1.85 + * // - Haptics feature must be enabled by the system.
1.86 + * // ===================================================================
1.87 + *
1.88 + * #include <hwrmhaptics.h> // link against hwrmhapticsclient.lib
1.89 + * #include <hwrmlogicalactuators.h> // enumeration of logical actuators
1.90 + *
1.91 + * TInt minPeriod( 0 );
1.92 + * TInt effectHandle( 0 );
1.93 + * TInt suppAct( 0 );
1.94 + *
1.95 + * CHWRMHaptics* haptics = CHWRMHaptics::NewL( NULL, NULL );
1.96 + *
1.97 + * haptics->SupportedActuators( suppAct );
1.98 + *
1.99 + * if( EHWRMLogicalActuatorDevice & suppAct )
1.100 + * {
1.101 + * haptics->OpenActuatorL( EHWRMLogicalActuatorDevice )
1.102 + * }
1.103 + * else if ( EHWRMLogicalActuatorAny & suppAct )
1.104 + * {
1.105 + * haptics->OpenActuatorL( EHWRMLogicalActuatorAny )
1.106 + * }
1.107 + *
1.108 + *
1.109 + * // 3rd party developers can obtain the license key from Forum Nokia
1.110 + * _LIT8( KLicenseKey,"_this_value_must_be_32_in_length" );
1.111 + *
1.112 + * User::LeaveIfError(
1.113 + * haptics->SetDeviceProperty(
1.114 + * THWRMHapticsDevicePropertyTypes::EHWRMHapticsLicenseKey,
1.115 + * KLicenseKey ) );
1.116 + *
1.117 + * // --> now playing effects is possible
1.118 + *
1.119 + * THWRMHapticsPeriodicEffect periodicEff;
1.120 + *
1.121 + * periodicEff.iDuration = 5000;
1.122 + * periodicEff.iMagnitude = 5000;
1.123 + * periodicEff.iPeriod = minPeriod;
1.124 + * periodicEff.iStyle = EHWRMHapticsStyleSharp;
1.125 + * periodicEff.iAttackTime = 250;
1.126 + * periodicEff.iAttackLevel = 10000;
1.127 + * periodicEff.iFadeTime = 250;
1.128 + * periodicEff.iFadeLevel = 0;
1.129 + *
1.130 + * haptics->PlayPeriodicEffect( periodicEff, effectHandle );
1.131 + *
1.132 + * // ... something happened in the application and it has lost focus
1.133 + * // so stop the effect immediately
1.134 + *
1.135 + * haptics->StopPlayingEffect( effectHandle );
1.136 + *
1.137 + * // ================================================================
1.138 + * // Usage example 2:
1.139 + * // - Loading effect data from a file and playing effects from the
1.140 + * // loaded data.
1.141 + * // - Preconditions:
1.142 + * // - license key is set
1.143 + * // - Recommended usage style:
1.144 + * // - Effect data file can contain definition(s) of periodic
1.145 + * // effects, magsweep effects or a combination of these basic
1.146 + * // types called timeline effects, which call basic effects in
1.147 + * // sequence thus forming new more complex effects.
1.148 + * // - Load the effect data once in the client application.
1.149 + * // - Play effects from the loaded data using the effectIndex
1.150 + * // ================================================================
1.151 + *
1.152 + * // Use S60 FileSystem to load the effect data file to a buffer
1.153 + *
1.154 + * ...
1.155 + *
1.156 + * // Effect data has been read into a descriptor by the user.
1.157 + * // Load the effect data to be used by the haptic subsystem.
1.158 + * TInt fileHandle( 0 );
1.159 + * User::LeaveIfError( haptics->LoadEffectData( data, fileHandle ) );
1.160 + *
1.161 + * TInt effectIndex = 0;
1.162 + * TInt hapticsStatus = haptics->PlayEffect( fileHandle,
1.163 + * effectIndex,
1.164 + * effectHandle );
1.165 + *
1.166 + * hapticsStatus = haptics->DeleteEffectData( fileHandle );
1.167 + *
1.168 + * if( KErrNone != hapticsStatus )
1.169 + * {
1.170 + * // do some error handling...
1.171 + * }
1.172 + *
1.173 + * delete haptics;
1.174 + * haptics = NULL;
1.175 + *
1.176 + * @endcode
1.177 + *
1.178 + * Common error codes returned by the Haptics API methods.
1.179 + *
1.180 + * KErrArgument Argument is invalid, e.g., malformatted effect data, or too
1.181 + * large magnitude value.
1.182 + * KErrAccessDenied The license key is not set when trying to use some
1.183 + * haptics method.
1.184 + * KErrNoMemory There is insufficient memory available for the method to
1.185 + * complete.
1.186 + * KErrNotReady Initialization has not been done properly when trying to use
1.187 + * a haptics method.
1.188 + *
1.189 + * @lib hwrmhapticsclient.dll
1.190 + * @since S60 5.1
1.191 + */
1.192 +
1.193 + class CHWRMHaptics : public CBase
1.194 + {
1.195 +public:
1.196 +
1.197 + /**
1.198 + * Defines the paramaters used in a magsweep effect.
1.199 + *
1.200 + * Used by
1.201 + * PlayMagSweepEffect(),
1.202 + * ModifyPlayingMagSweepEffect(),
1.203 + * GetMagSweepEffectDefinition().
1.204 + */
1.205 + struct THWRMHapticsMagSweepEffect
1.206 + {
1.207 + /**
1.208 + * Duration of the effect. Unit is milliseconds.
1.209 + *
1.210 + * To specify an infinite duration, the effect duration
1.211 + * should be set to a value returned by InfiniteDuration().
1.212 + * For a finite duration, the effect duration is clamped to a value
1.213 + * from 0 to the value returned by GetDeviceCapability()
1.214 + * for the EHWRMHapticsMaxEffectDuration capability type.
1.215 + */
1.216 + TInt iDuration;
1.217 +
1.218 + /**
1.219 + * Magnitude of the effect.
1.220 + *
1.221 + * The effect magnitude is clamped to a value from
1.222 + * KHWRMHapticsMinMagnitude to KHWRMHapticsMaxMagnitude.
1.223 + */
1.224 + TInt iMagnitude;
1.225 +
1.226 + /**
1.227 + * Style of the effect.
1.228 + *
1.229 + * Can be one of THWRMHapticsEffectStyles.
1.230 + */
1.231 + TInt iStyle;
1.232 +
1.233 + /**
1.234 + * Attack time of the effect. Unit is milliseconds.
1.235 + *
1.236 + * The attack time is clamped to a value from 0 to the value returned
1.237 + * by GetDeviceCapability() for the EHWRMHapticsMaxEnvelopeTime
1.238 + * capability type.
1.239 + */
1.240 + TInt iAttackTime;
1.241 +
1.242 + /**
1.243 + * Attack level of the effect.
1.244 + *
1.245 + * The attack level is clamped to a value from KHWRMHapticsMinMagnitude
1.246 + * to KHWRMHapticsMaxMagnitude.
1.247 + */
1.248 + TInt iAttackLevel;
1.249 +
1.250 + /**
1.251 + * Fade time of the effect. Unit is milliseconds.
1.252 + *
1.253 + * The fade time is clamped to a value from 0 to the value returned
1.254 + * by GetDeviceCapability() for the EHWRMHapticsMaxEnvelopeTime
1.255 + * capability type.
1.256 + */
1.257 + TInt iFadeTime;
1.258 +
1.259 + /**
1.260 + * Fade level of the effect.
1.261 + *
1.262 + * The fade level is clamped to a value from KHWRMHapticsMinMagnitude
1.263 + * to KHWRMHapticsMaxMagnitude inclusive.
1.264 + */
1.265 + TInt iFadeLevel;
1.266 + };
1.267 +
1.268 + /**
1.269 + * Defines the parameters used in a periodic effect.
1.270 + *
1.271 + * Used by
1.272 + * PlayPeriodicEffect(),
1.273 + * ModifyPlayingPeriodicEffect(),
1.274 + * GetPeriodicEffectDefinition().
1.275 + */
1.276 + struct THWRMHapticsPeriodicEffect
1.277 + {
1.278 + /**
1.279 + * Duration of the effect. Unit is milliseconds.
1.280 + *
1.281 + * To specify an infinite duration, the effect duration
1.282 + * should be set to InfiniteDuration().
1.283 + * For a finite duration, the effect duration is clamped to a value
1.284 + * from 0 to the value returned by GetDeviceCapability()
1.285 + * for the EHWRMHapticsMaxEffectDuration capability type.
1.286 + */
1.287 + TInt iDuration;
1.288 +
1.289 + /**
1.290 + * Magnitude of the effect.
1.291 + *
1.292 + * The effect magnitude is clamped to a value from
1.293 + * KHWRMHapticsMinMagnitude to KHWRMHapticsMaxMagnitude.
1.294 + */
1.295 + TInt iMagnitude;
1.296 +
1.297 + /**
1.298 + * Period of the effect. Unit is milliseconds.
1.299 + *
1.300 + * The period is clamped to a value returned by GetDeviceCapability()
1.301 + * for EHWRMHapticsMinPeriod capability type to the value returned
1.302 + * by GetDeviceCapability() for the EHWRMHapticsMaxEnvelopeTime
1.303 + * capability type.
1.304 + */
1.305 + TInt iPeriod;
1.306 +
1.307 + /**
1.308 + * Style of the effect.
1.309 + *
1.310 + * Can be one of THWRMHapticsEffectStyles.
1.311 + */
1.312 + TInt iStyle;
1.313 +
1.314 + /**
1.315 + * Attack time of the effect. Unit is milliseconds.
1.316 + *
1.317 + * The attack time is clamped to a value from 0 to the value returned
1.318 + * by GetDeviceCapability() for the EHWRMHapticsMaxEnvelopeTime
1.319 + * capability type.
1.320 + */
1.321 + TInt iAttackTime;
1.322 +
1.323 + /**
1.324 + * Attack level of the effect.
1.325 + *
1.326 + * The attack level is clamped to a value from KHWRMHapticsMinMagnitude
1.327 + * to KHWRMHapticsMaxMagnitude.
1.328 + */
1.329 + TInt iAttackLevel;
1.330 +
1.331 + /**
1.332 + * Fade time of the effect. Unit is milliseconds.
1.333 + *
1.334 + * The fade time is clamped to a value from 0 to the value returned
1.335 + * by GetDeviceCapability() for the EHWRMHapticsMaxEnvelopeTime
1.336 + * capability type.
1.337 + */
1.338 + TInt iFadeTime;
1.339 +
1.340 + /**
1.341 + * Fade level of the effect.
1.342 + *
1.343 + * The fade level is clamped to a value from KHWRMHapticsMinMagnitude
1.344 + * to KHWRMHapticsMaxMagnitude.
1.345 + */
1.346 + TInt iFadeLevel;
1.347 + };
1.348 +
1.349 + /**
1.350 + * THWRMHapticsDevicePropertyTypes enumeration
1.351 + * Use SetDeviceProperty() to set properties for the haptics
1.352 + * and GetDeviceProperty() to get properties currently in use.
1.353 + */
1.354 + enum THWRMHapticsDevicePropertyTypes
1.355 + {
1.356 + /**
1.357 + * License key property. Usable with SetDeviceProperty() only.
1.358 + * Use const TDesC8& overloaded version of the method.
1.359 + *
1.360 + * Setting this property to a valid license key unlocks the haptics
1.361 + * subsystem in the device. Setting this property to an invalid
1.362 + * license key locks the haptics in the device (for this client).
1.363 + * The haptics in the device are locked from clients by default.
1.364 + * When haptics is locked, all haptics related operations on the
1.365 + * device, except for setting the license key and closing the device,
1.366 + * fail.
1.367 + * Haptics must be unlocked on a per instance basis.
1.368 + */
1.369 + EHWRMHapticsLicensekey = 0,
1.370 +
1.371 + /**
1.372 + * Property used to set/get the priority for effects to played for
1.373 + * the given haptics instance (i.e., for the given client).
1.374 + *
1.375 + * Use TInt overloaded version of the methods SetDeviceProperty()and
1.376 + * GetDeviceProperty() to use this property.
1.377 + *
1.378 + * Different haptics instances can use different priorities
1.379 + * on the same physical device. The priority determines which haptics
1.380 + * instance's effects are played when multiple haptics instances
1.381 + * are attempting to play effects at the same time.
1.382 + * The default priority is DefaultDevicePriority().
1.383 + * Priority values can range from KHWRMHapticsMinDevicePriority
1.384 + * to KHWRMHapticsMaxDevicePriority.
1.385 + * GetDeviceProperty() returns a value inside
1.386 + * TInt& aDevicePropertyValue in the range of
1.387 + * KHWRMHapticsMinDevicePriority
1.388 + * to KHWRMHapticsMaxDevicePriority. If the client has not set
1.389 + * the EHWRMHapticsPriority property GetDeviceProperty() returns
1.390 + * a value of DefaultDevicePriority().
1.391 + */
1.392 + EHWRMHapticsPriority,
1.393 +
1.394 + /**
1.395 + * Property used to disable effects for the client's haptics instance.
1.396 + *
1.397 + * Use TBool overloaded version of the methods SetDeviceProperty() and
1.398 + * GetDeviceProperty() to use this property.
1.399 + *
1.400 + * When this property is set to true, any playing effects are
1.401 + * immediately stopped and subsequent requests to play
1.402 + * effects are ignored. Applies to the calling client's
1.403 + * haptics instance only. When this property is set to false,
1.404 + * subsequent requests to play effects are honored.
1.405 + * The default value for this property is false.
1.406 + */
1.407 + EHWRMHapticsDisableEffects,
1.408 +
1.409 + /**
1.410 + * A property that reduces/increases the magnitude of all effects
1.411 + * for a particular haptics instance.
1.412 + *
1.413 + * Use TInt overloaded version of the methods SetDeviceProperty()and
1.414 + * GetDeviceProperty() to use this property.
1.415 +
1.416 + * Strength values can vary from KHWRMHapticsMinStrength ("mute")
1.417 + * to KHWRMHapticsMaxStrength.
1.418 + * The default value for EHWRMHapticsStrength is
1.419 + * KHWRMHapticsMaxStrength. If the EHWRMHapticsStrength property is
1.420 + * not set, the default value is used.
1.421 + * When reducing/increasing the magnitude of the effects by setting
1.422 + * the EHWRMHapticsStrength property, it only applies to the haptics
1.423 + * instance of the client which called the function. If there is a
1.424 + * second haptics instance held by the same or a different client,
1.425 + * it is not affected by the setting of the EHWRMHapticsStrength
1.426 + * property of the first client's haptics instance.
1.427 + *
1.428 + * Modifying the EHWRMHapticsStrength property of the haptics instance
1.429 + * does not affect currently playing effects, only effects played or
1.430 + * modified after calling the SetDeviceProperty() method using the new
1.431 + * EHWRMHapticsStrength value.
1.432 + */
1.433 + EHWRMHapticsStrength,
1.434 +
1.435 + /**
1.436 + * A property that reduces/increases the magnitude of all effects
1.437 + * for all haptics instances (whole device).
1.438 + *
1.439 + * Use TInt overloaded version of the methods SetDeviceProperty()and
1.440 + * GetDeviceProperty() to use this property.
1.441 + *
1.442 + * Strength values can vary from KHWRMHapticsMinStrength ("mute")
1.443 + * to KHWRMHapticsMaxStrength.
1.444 + * The default value for Master Strength is KHWRMHapticsMaxStrength.
1.445 + * If the client does not set the EHWRMHapticsMasterStrength property
1.446 + * of the haptics instance, the default value is used.
1.447 + * When reducing/increasing the magnitude of the effects,
1.448 + * EHWRMHapticsMasterStrength property affects all playing effects on
1.449 + * all haptics instances (whole device).
1.450 + * This means that all the haptics instances, held by other
1.451 + * clients are affected by the setting of EHWRMHapticsMasterStrength
1.452 + * property of the first client's haptics instance.
1.453 + *
1.454 + * The client which wants to set the EHWRMHapticsMasterStrength
1.455 + * property must have a haptics instance that has a maximum effect
1.456 + * priority.
1.457 + * The haptics client instance must set itself to a maximum priority
1.458 + * by calling SetDeviceProperty() using EHWRMHapticsPriority property
1.459 + * type and KMaxDevicePriority value before changing the
1.460 + * EHWRMHapticsMasterStrength property's value.
1.461 + *
1.462 + * Note: A licensee license key, provided to licensees only,
1.463 + * changes the EHWRMHapticsMasterStrength property.
1.464 + * A call to SetDeviceProperty( EHWRMHapticsMasterStrength, aValue )
1.465 + * always returns KErrAccessDenied for haptics instances that are
1.466 + * not using a licensee license key.
1.467 + */
1.468 + EHWRMHapticsMasterStrength
1.469 + };
1.470 +
1.471 + /**
1.472 + * Device's capability types.
1.473 + *
1.474 + * Use TInt& aDeviceCapabilityValue overloaded version of the
1.475 + * method GetDeviceCapability() unless otherwise mentioned.
1.476 + */
1.477 + enum THWRMHapticsDeviceCapabilityTypes
1.478 + {
1.479 + /**
1.480 + * Device category. See THWRMHapticsDeviceCategory enumeration defined
1.481 + * later in this API header for possible values.
1.482 + */
1.483 + EHWRMHapticsDeviceCategory = 0,
1.484 +
1.485 + /**
1.486 + * The maximum number of nested repeat bars supported for Timeline effects.
1.487 + *
1.488 + * Any repeat bars nested beyond this level are played only once.
1.489 + */
1.490 + EHWRMHapticsMaxNestedRepeats,
1.491 +
1.492 + /**
1.493 + * Number of vibration actuators present in the device.
1.494 + */
1.495 + EHWRMHapticsNumActuators,
1.496 +
1.497 + /**
1.498 + * Actuator type See THWRMHapticsActuatorType enumeration defined
1.499 + * later in this API header for possible values.
1.500 + */
1.501 + EHWRMHapticsActuatorType,
1.502 +
1.503 + /**
1.504 + * Number of effect slots.
1.505 + *
1.506 + * The number of effect slots represents the maximum number
1.507 + * of simple effects that can play simultaneously.
1.508 + * If an attempt is made to play more than this number of effects
1.509 + * at the same time, some of the simple effects do not play.
1.510 + */
1.511 + EHWRMHapticsNumEffectSlots,
1.512 +
1.513 + /**
1.514 + * Supported effect styles, stored as a bitfield. See
1.515 + * THWRMHapticsSupportedEffectStyles enumeration defined later in this
1.516 + * API header for possible values.
1.517 + */
1.518 + EHWRMHapticsSupportedStyles,
1.519 +
1.520 + /**
1.521 + * Minimum period for Periodic effects.
1.522 + */
1.523 + EHWRMHapticsMinPeriod,
1.524 +
1.525 + /**
1.526 + * Maximum period for Periodic effects.
1.527 + */
1.528 + EHWRMHapticsMaxPeriod,
1.529 +
1.530 + /**
1.531 + * Maximum duration for MagSweep and Periodic effects measured
1.532 + * in milliseconds.
1.533 + */
1.534 + EHWRMHapticsMaxEffectDuration,
1.535 +
1.536 + /**
1.537 + * Supported effect types. Stored as a bitfield. See
1.538 + * THWRMHapticsSupportedEffectTypes enumeration defined later in this
1.539 + * API header for possible values.
1.540 + */
1.541 + EHWRMHapticsSupportedEffects,
1.542 +
1.543 + /**
1.544 + * Device name.
1.545 + *
1.546 + * Use TDes8& aDeviceCapabilityValue overloaded version of the
1.547 + * method GetDeviceCapability().
1.548 + */
1.549 + EHWRMHapticsDeviceName,
1.550 +
1.551 + /**
1.552 + * Maximum start time or fade time in milliseconds for
1.553 + * effect envelopes of MagSweep or periodic effects.
1.554 + */
1.555 + EHWRMHapticsMaxEnvelopeTime,
1.556 +
1.557 + /**
1.558 + * Version number of the physical haptics player in the device in
1.559 + * hexadecimal format.
1.560 + *
1.561 + * The format is OxMMNNSSBB, where MM is the major
1.562 + * version number, NN is the minor version number,
1.563 + * SS is a special build number and BB is the VTMP build number.
1.564 + * For example, for the hexadecimal format 0x02000053 the version
1.565 + * number is 2.0.83
1.566 + */
1.567 + EHWRMHapticsAPIVersionNumber,
1.568 +
1.569 + /**
1.570 + * Maximum size in bytes of effect data (buffer) that can be played
1.571 + * on a non-tethered device.
1.572 + */
1.573 + EHWRMHapticsMaxEffectDataSize = 14
1.574 + };
1.575 +
1.576 + /**
1.577 + * Device category.
1.578 + */
1.579 + enum THWRMHapticsDeviceCategory
1.580 + {
1.581 + EHWRMHapticsVirtual = 2,
1.582 + EHWRMHapticsEmbedded = 3,
1.583 + };
1.584 +
1.585 + /**
1.586 + * Bitmask for effect support.
1.587 + *
1.588 + * To be used to analyze value returned by GetDeviceCapability().
1.589 + */
1.590 + enum THWRMHapticsSupportedEffectTypes
1.591 + {
1.592 + EHWRMHapticsSupportPeriodic = 1,
1.593 + EHWRMHapticsSupportMagSweep = 2,
1.594 + EHWRMHapticsSupportTimeline = 4,
1.595 + EHWRMHapticsSupportStreaming = 8
1.596 + };
1.597 +
1.598 + /**
1.599 + * Effect types
1.600 + */
1.601 + enum THWRMHapticsEffectTypes
1.602 + {
1.603 + EHWRMHapticsTypePeriodic = 0,
1.604 + EHWRMHapticsTypeMagSweep,
1.605 + EHWRMHapticsTypeTimeline,
1.606 + EHWRMHapticsTypeStreaming
1.607 + };
1.608 +
1.609 + /**
1.610 + * Bitmask for supported effect styles.
1.611 + *
1.612 + * To be used to analyze the value returned by GetDeviceCapability().
1.613 + */
1.614 + enum THWRMHapticsSupportedEffectStyles
1.615 + {
1.616 + EHWRMHapticsSupportSmooth = 1,
1.617 + EHWRMHapticsSupportStrong = 2,
1.618 + EHWRMHapticsSupportSharp = 4
1.619 + };
1.620 +
1.621 + /**
1.622 + * Effect styles
1.623 + *
1.624 + * Used to specify Periodic or MagSweep effect style when calling
1.625 + * PlayMagSweepEffect(),
1.626 + * PlayPeriodicEffect(),
1.627 + * ModifyPlayingMagSweepEffect() and
1.628 + * ModifyPlayingPeriodicEffect().
1.629 + */
1.630 + enum THWRMHapticsEffectStyles
1.631 + {
1.632 + EHWRMHapticsStyleSmooth = 0,
1.633 + EHWRMHapticsStyleStrong,
1.634 + EHWRMHapticsStyleSharp
1.635 + };
1.636 +
1.637 + /**
1.638 + * Actuator types.
1.639 + *
1.640 + * To be used with GetDeviceCapability().
1.641 + */
1.642 + enum THWRMHapticsActuatorTypes
1.643 + {
1.644 + /**
1.645 + * Eccentric Rotating Mass actuator
1.646 + */
1.647 + EHWRMHapticsTypeERM = 0,
1.648 +
1.649 + /**
1.650 + * Linear Resonant actuator
1.651 + */
1.652 + EHWRMHapticsTypeLRA = 2
1.653 + };
1.654 +
1.655 + /**
1.656 + * Effect states.
1.657 + *
1.658 + * As returned in a call to GetEffectState().
1.659 + */
1.660 + enum THWRMHapticsEffectStates
1.661 + {
1.662 + EHWRMHapticsEffectNotPlaying = 0,
1.663 + EHWRMHapticsEffectPlaying,
1.664 + EHWRMHapticsEffectPaused
1.665 + };
1.666 +
1.667 + /**
1.668 + * Two-phased constructor.
1.669 + * Use this method for creating a haptics instance with callbacks.
1.670 + *
1.671 + * @param aHapticsCallback Pointer to callback instance. Can be NULL.
1.672 + * @param aActuatorCallback Pointer to callback instance. Can be NULL.
1.673 + *
1.674 + * @return A pointer to a new instance of the CHWRMHaptics class.
1.675 + *
1.676 + * @since S60 5.1
1.677 + */
1.678 + IMPORT_C static CHWRMHaptics* NewL(
1.679 + MHWRMHapticsObserver* aHapticsCallback,
1.680 + MHWRMHapticsActuatorObserver* aActuatorCallback );
1.681 +
1.682 + /**
1.683 + * @overload
1.684 + *
1.685 + * @param[out] aStatus Request status. On completion contains:
1.686 + * KErrNone, if successful,
1.687 + * otherwise one of the other system-wide error codes.
1.688 + */
1.689 + IMPORT_C static CHWRMHaptics* NewL(
1.690 + MHWRMHapticsObserver* aHapticsCallback,
1.691 + MHWRMHapticsActuatorObserver* aActuatorCallback,
1.692 + TRequestStatus& aStatus );
1.693 +
1.694 + /**
1.695 + * Method for opening a logical actuator for use.
1.696 + *
1.697 + * This method must be called before using any other methods of this class,
1.698 + * except when using GetXXX methods.
1.699 + * The Haptics API supports a limited number of instances of CHWRMHaptics
1.700 + * class.
1.701 + * If all instances are currently in use, the next attempt to call
1.702 + * OpenActuatorL() from any client fails.
1.703 + * Applications should not use more instances than necessary as this
1.704 + * may prevent other applications from instantiating the CHWRMHaptics
1.705 + * class.
1.706 + *
1.707 + * @param aActuator Enumeration of the type of logical actuator the client
1.708 + * wants to use.
1.709 + *
1.710 + * @leave TInt KErrNotSupported, if the used logical actuator is not
1.711 + * supported by the system.
1.712 + * @leave TInt KErrAlreadyExists, if the used logical actuator is already
1.713 + * opened.
1.714 + * @leave TInt KErrInUse, if some other actuator is already opened.
1.715 + * @leave TInt KErrArgument, if aActuator is not valid enumeration value.
1.716 + *
1.717 + * @see THWRMLogicalActuators for a list of usable actuators.
1.718 + *
1.719 + * @since S60 5.1
1.720 + */
1.721 + virtual void OpenActuatorL( THWRMLogicalActuators aActuator ) = 0;
1.722 +
1.723 + /**
1.724 + * Method for getting a bitmask value of supported logical actuators.
1.725 + *
1.726 + * Developer needs to evaluate the returned bitmask against
1.727 + * THWRMLogicalActuators enumeration values to know the
1.728 + * supported logical actuators.
1.729 + *
1.730 + * @param[out] aActuators Bitmask of supported logical actuators.
1.731 + *
1.732 + * @return TInt KErrNone, if successful, otherwise one of the other
1.733 + * system-wide error codes.
1.734 + *
1.735 + * @see THWRMLogicalActuators for a list of usable actuators.
1.736 + *
1.737 + * @since S60 5.1
1.738 + */
1.739 + virtual TInt SupportedActuators( TUint32& aActuators ) = 0;
1.740 +
1.741 + /**
1.742 + * Reserves haptics feature exclusively for this client.
1.743 + * A higher priority client may cause lower priority client reservation
1.744 + * to be temporarily suspended. The suspended client does not get
1.745 + * any notification about suspension. If haptics is already reserved
1.746 + * by a higher or equal priority client, reserving still succeeds,
1.747 + * but reservation is immediately suspended. When the reservation
1.748 + * is suspended, playing effects do not actually cause the effects to be
1.749 + * played.
1.750 + * Note: Unless the client has instantiated the Haptics API with the status
1.751 + * observer, it does not receive any notifications about the fact that its
1.752 + * effects are not actually played by the physical player when the client
1.753 + * has been suspended by a higher priority reservation.
1.754 + * Note also that even if haptics is reserved by some client, a higher
1.755 + * priority client succeeds in playing its effects.
1.756 + *
1.757 + * Calling this method is equal to call ReserveHapticsL(EFalse),
1.758 + * i.e. CCoeEnv background/foreground status is always used
1.759 + * to control further reservations.
1.760 + */
1.761 + virtual void ReserveHapticsL() = 0;
1.762 +
1.763 + /**
1.764 + * Reserves haptics feature exclusively for this client.
1.765 + * A higher priority client may cause lower priority client reservation
1.766 + * to be temporarily suspended. The suspended client does not get
1.767 + * any notifications about suspension. If haptics is already reserved
1.768 + * by a higher or equal priority client, reserving still succeeds,
1.769 + * but reservation is immediately suspended. When the reservation
1.770 + * is suspended, playing effects does not actually cause the effects to be
1.771 + * played.
1.772 + * Note: Unless the client has instantiated the Haptics API with the status
1.773 + * observer, it does not receive any notifications about the fact that its
1.774 + * effects are not actually played by the physical player when the client
1.775 + * has been suspended by a higher priority reservation.
1.776 + * Note also that even if haptics is reserved by some client, a higher
1.777 + * priority client succeeds in playing its effects.
1.778 + *
1.779 + * @param aForceNoCCoeEnv If EFalse, then reservation requires that
1.780 + * this client has the keyboard focus at the time of
1.781 + * reservation and haptics is automatically
1.782 + * released and re-reserved based on the keyboard
1.783 + * focus status of this client.
1.784 + * This also implies that CCoeEnv::Static() != NULL
1.785 + * is required.
1.786 + * If ETrue, the client does not require CCoeEnv to
1.787 + * be present nor does it automatically reserve or
1.788 + * release haptics by depending on the foreground or
1.789 + * background status of the client. Only trusted
1.790 + * clients are allowed to set this flag to ETrue.
1.791 + * The client application is considered trusted if
1.792 + * it has a priority defined in haptics policy file. * The policy files can be modified by S60 licensees.
1.793 + *
1.794 + * @leave KErrAccessDenied Parameter aForceNoCCoeEnv is ETrue
1.795 + * and client is not trusted.
1.796 + * @leave KErrBadHandle Parameter aForceNoCCoeEnv is EFalse
1.797 + * and no CCoeEnv present.
1.798 + * @leave KErrNotReady Trying to reserve while on background and parameter
1.799 + * aForceNoCCoeEnv is EFalse.
1.800 + * @leave KErrNoMemory There is a memory allocation failure.
1.801 + */
1.802 + virtual void ReserveHapticsL( TBool aForceNoCCoeEnv ) = 0;
1.803 +
1.804 + /**
1.805 + * Releases haptics feature if it was previously reserved for this client.
1.806 + *
1.807 + * If this client has not reserved haptics feature, does nothing.
1.808 + * If haptics is on when it is released and no other client has a suspended
1.809 + * reservation, haptics is stopped.
1.810 + */
1.811 + virtual void ReleaseHaptics() = 0;
1.812 +
1.813 + /**
1.814 + * This method retrieves the current haptics status.
1.815 + *
1.816 + * @return THWRMHapticsStatus indicating the current haptics status
1.817 + *
1.818 + * @see THWRMHapticsStatus
1.819 + */
1.820 + virtual MHWRMHapticsObserver::THWRMHapticsStatus HapticsStatus() const=0;
1.821 +
1.822 + /**
1.823 + * Sets a property of the haptics.
1.824 + *
1.825 + * Some properties affect all haptics instances, some only
1.826 + * the current instance of the haptics. More about that can be found
1.827 + * in THWRMHapticsDevicePropertyTypes.
1.828 + *
1.829 + * @param[in] aDevicePropertyType Property type for the
1.830 + * property to be set.
1.831 + * @param[in] aDevicePropertyValue Value of the property to set.
1.832 + *
1.833 + * @return TInt KErrNone if successful, otherwise one of the other
1.834 + * system-wide error codes.
1.835 + *
1.836 + * @see THWRMHapticsDevicePropertyTypes for a list of valid property types
1.837 + *
1.838 + * @since S60 5.1
1.839 + */
1.840 + virtual TInt SetDeviceProperty( TInt aDevicePropertyType,
1.841 + TInt aDevicePropertyValue ) = 0;
1.842 +
1.843 + /**
1.844 + * @overload
1.845 + */
1.846 + virtual TInt SetDeviceProperty( TInt aDevicePropertyType,
1.847 + const TDesC8& aDevicePropertyValue ) = 0;
1.848 +
1.849 + /**
1.850 + * Gets a property value of the haptics.
1.851 + *
1.852 + * @param[in] aDevicePropertyType Property type for the property to get.
1.853 + * @param[out] aDevicePropertyValue Reference to the variable that
1.854 + * receives the requested property
1.855 + * value of the device.
1.856 + *
1.857 + * @return TInt KErrNone if successful, otherwise one of the other
1.858 + * system-wide error codes.
1.859 + *
1.860 + * @see THWRMHapticsDevicePropertyTypes for a list of the valid property
1.861 + * types.
1.862 + *
1.863 + * @since S60 5.1
1.864 + */
1.865 + virtual TInt GetDeviceProperty( TInt aDevicePropertyType,
1.866 + TInt& aDevicePropertyValue ) = 0;
1.867 +
1.868 + /**
1.869 + * @overload
1.870 + *
1.871 + * @return KErrNone if successful,
1.872 + * KErrArgument if the length of the given string is less
1.873 + * than MaxPropertyStringLength(),
1.874 + * otherwise one of the other system-wide error codes.
1.875 + */
1.876 + virtual TInt GetDeviceProperty( TInt aDevicePropertyType,
1.877 + TDes8& aDevicePropertyValue ) = 0;
1.878 +
1.879 + /**
1.880 + * Gets a capability value of the haptics.
1.881 + *
1.882 + * @param[in] aDeviceCapabilityType Capability type of the
1.883 + * capability to get.
1.884 + * @param[out] aDeviceCapabilityValue Reference to the variable that
1.885 + * receives the requested capability
1.886 + * value of the device.
1.887 + *
1.888 + * @return TInt KErrNone if successful,
1.889 + * KErrNotReady if no actuator has been opened,
1.890 + * otherwise one of the other system-wide error codes.
1.891 + *
1.892 + * @see THWRMHapticsDeviceCapabilityTypes
1.893 + *
1.894 + * @since S60 5.1
1.895 + */
1.896 + virtual TInt GetDeviceCapability( TInt aDeviceCapabilityType,
1.897 + TInt& aDeviceCapabilityValue ) = 0;
1.898 +
1.899 + /**
1.900 + * @overload
1.901 + *
1.902 + * @return TInt KErrNone if successful,
1.903 + * KErrNotReady if no actuator has been opened,
1.904 + * KErrArgument if the length of the given string is less
1.905 + * than MaxCapabilityStringLength(),
1.906 + * otherwise one of the other system-wide error codes.
1.907 + */
1.908 + virtual TInt GetDeviceCapability( TInt aDeviceCapabilityType,
1.909 + TDes8& aDeviceCapabilityValue ) = 0;
1.910 +
1.911 + /**
1.912 + * Retrieves the status of an effect (playing, not playing, paused).
1.913 + *
1.914 + * @param[in] aEffectHandle Handle to the effect which must have been
1.915 + * obtained by calling
1.916 + * PlayMagSweepEffect(),
1.917 + * PlayPeriodicEffect(),
1.918 + * PlayEffect(),
1.919 + * PlayEffectRepeat() or
1.920 + * CreateStreamingEffect()
1.921 + * @param[out] aEffectState Pointer to the variable that receives
1.922 + * the status bits of the effect.
1.923 + *
1.924 + * @return TInt KErrNone if successful, otherwise one of the other
1.925 + * system-wide error codes.
1.926 + *
1.927 + * @see THWRMHapticsEffectStates for a list of valid effect states.
1.928 + *
1.929 + * @since S60 5.1
1.930 + */
1.931 + virtual TInt GetEffectState( TInt aEffectHandle, TInt& aEffectState ) = 0;
1.932 +
1.933 + /**
1.934 + * Creates a streaming effect.
1.935 + *
1.936 + * Client calls CreateStreamingEffect() to create a new streaming
1.937 + * effect and gets a new handle for it; it should use that effect handle
1.938 + * to play a streaming sample by calling PlayStreamingSample().
1.939 + *
1.940 + * @param[out] aEffectHandle Reference to the variable that receives
1.941 + * a handle to the streaming effect.
1.942 + *
1.943 + * @return TInt KErrNone if successful, otherwise one of the other
1.944 + * system-wide error codes.
1.945 + *
1.946 + * @since S60 5.1
1.947 + */
1.948 + virtual TInt CreateStreamingEffect( TInt& aEffectHandle ) = 0;
1.949 +
1.950 + /**
1.951 + * Plays a streaming sample given in the parameter defining the effect.
1.952 + *
1.953 + * Streaming sample can only be played after calling
1.954 + * CreateStreamingEffect() and by using the effecthandle it returns.
1.955 + *
1.956 + * Synchronous method returns when the haptic command has been evaluated
1.957 + * and the return value is valid.
1.958 + *
1.959 + * @param[in] aEffectHandle Handle to the streaming effect to play.
1.960 + * @param[in] aStreamingSample Reference to streaming sample data
1.961 + * containing the definition of
1.962 + * the effect to play.
1.963 + *
1.964 + * @return TInt KErrNone if successful, otherwise one of the other
1.965 + * system-wide error codes.
1.966 + * @return TInt KErrInUse when haptics is reserved for a higher or
1.967 + * equal priority client.
1.968 + *
1.969 + * @since S60 5.1
1.970 + */
1.971 + virtual TInt PlayStreamingSample( TInt aEffectHandle,
1.972 + const TDesC8& aStreamingSample ) = 0;
1.973 + /**
1.974 + * @overload
1.975 + *
1.976 + * @param[out] aStatus Request status. On completion contains:
1.977 + * KErrNone, if successful,
1.978 + * KErrInUse when haptics is reserved for a higher or
1.979 + * equal priority client,
1.980 + * otherwise one of the other system-wide error codes.
1.981 + */
1.982 + virtual void PlayStreamingSample( TInt aEffectHandle,
1.983 + const TDesC8& aStreamingSample,
1.984 + TRequestStatus& aStatus ) = 0;
1.985 +
1.986 + /**
1.987 + * Plays a streaming sample with a time offset given in the parameters
1.988 + * defining the effect.
1.989 + *
1.990 + * Client calls CreateStreamingEffect() to create a new streaming
1.991 + * effect and gets a new handle for it; it should use that effect handle
1.992 + * to play the streaming sample with this method.
1.993 + *
1.994 + * Synchronous method returns when the haptic command has been evaluated
1.995 + * and the return value is valid.
1.996 + *
1.997 + * @param[in] aEffectHandle Handle to the streaming effect to play.
1.998 + * @param[in] aStreamingSample Reference to streaming sample data
1.999 + * containing the definition of the
1.1000 + * effect to play.
1.1001 + * @param[in] aOffsetTime For aOffsetTime values that are greater than 0,
1.1002 + * playback is delayed for aOffsetTime
1.1003 + * in milliseconds.
1.1004 + * For aOffsetTime values that are less than 0,
1.1005 + * sample playback begins in offset time
1.1006 + * in milliseconds into the current sample.
1.1007 + *
1.1008 + * @return TInt KErrNone if successful, otherwise one of the other
1.1009 + * system-wide error codes.
1.1010 + * @return TInt KErrInUse when haptics is reserved for a higher or
1.1011 + * equal priority client.
1.1012 + *
1.1013 + * @since S60 5.1
1.1014 + */
1.1015 + virtual TInt PlayStreamingSampleWithOffset( TInt aEffectHandle,
1.1016 + const TDesC8& aStreamingSample,
1.1017 + TInt aOffsetTime ) = 0;
1.1018 +
1.1019 + /**
1.1020 + * @overload
1.1021 + *
1.1022 + * @param[out] aStatus Request status. On completion contains:
1.1023 + * KErrNone, if successful,
1.1024 + * KErrInUse when haptics is reserved for a higher or
1.1025 + * equal priority client,
1.1026 + * otherwise one of the other system-wide error codes.
1.1027 + */
1.1028 + virtual void PlayStreamingSampleWithOffset( TInt aEffectHandle,
1.1029 + const TDesC8& aStreamingSample,
1.1030 + TInt aOffsetTime,
1.1031 + TRequestStatus& aStatus ) = 0;
1.1032 +
1.1033 + /**
1.1034 + * Destroys a streaming effect previously created in a successful
1.1035 + * call to CreateStreamingEffect().
1.1036 + *
1.1037 + * @param[in] aEffectHandle Handle to the streaming effect to destroy.
1.1038 + *
1.1039 + * @return TInt KErrNone if successful, otherwise one of the other
1.1040 + * system-wide error codes.
1.1041 + *
1.1042 + * @since S60 5.1
1.1043 + */
1.1044 + virtual TInt DestroyStreamingEffect( TInt aEffectHandle ) = 0;
1.1045 +
1.1046 + /**
1.1047 + * Modifies a playing MagSweep effect.
1.1048 + *
1.1049 + * Synchronous method returns when the haptic command has been evaluated
1.1050 + * and the return value is valid.
1.1051 + *
1.1052 + * @param[in] aEffectHandle Handle to the playing MagSweep effect
1.1053 + * to modify. The handle to the effect must have
1.1054 + * been obtained by calling
1.1055 + * PlayMagSweepEffect(),
1.1056 + * PlayEffect() or
1.1057 + * PlayEffectRepeat().
1.1058 + * @param[in] aEffect Reference to a struct defining the effect parameters.
1.1059 + *
1.1060 + * @return TInt KErrNone if successful, otherwise one of the other
1.1061 + * system-wide error codes.
1.1062 + *
1.1063 + * @see THWRMHapticsMagSweepEffect for effect definition.
1.1064 + *
1.1065 + * @since S60 5.1
1.1066 + */
1.1067 + virtual TInt ModifyPlayingMagSweepEffect( TInt aEffectHandle,
1.1068 + const CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect ) = 0;
1.1069 +
1.1070 + /**
1.1071 + * @overload
1.1072 + *
1.1073 + * @param[out] aStatus Request status. On completion contains:
1.1074 + * KErrNone, if successful,
1.1075 + * otherwise one of the other system-wide error codes.
1.1076 + */
1.1077 + virtual void ModifyPlayingMagSweepEffect( TInt aEffectHandle,
1.1078 + const CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect,
1.1079 + TRequestStatus& aStatus ) = 0;
1.1080 +
1.1081 + /**
1.1082 + * Modifies a playing periodic effect.
1.1083 + *
1.1084 + * Synchronous method returns when the haptic command has been evaluated
1.1085 + * and the return value is valid.
1.1086 + *
1.1087 + * @param[in] aEffectHandle Handle to the playing periodic effect
1.1088 + * to modify. The handle to the effect must have
1.1089 + * been obtained by calling
1.1090 + * PlayPeriodicEffect(),
1.1091 + * PlayEffect() or
1.1092 + * PlayEffectRepeat().
1.1093 + * @param[in] aEffect Reference to a struct defining the effect parameters.
1.1094 + *
1.1095 + * @return TInt KErrNone if successful, otherwise one of the other
1.1096 + * system-wide error codes.
1.1097 + *
1.1098 + * @see THWRMHapticsPeriodicEffect for effect definition.
1.1099 + *
1.1100 + * @since S60 5.1
1.1101 + */
1.1102 + virtual TInt ModifyPlayingPeriodicEffect( TInt aEffectHandle,
1.1103 + const CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect ) = 0;
1.1104 +
1.1105 + /**
1.1106 + * @overload
1.1107 + *
1.1108 + * @param[out] aStatus Request status. On completion contains:
1.1109 + * KErrNone, if successful,
1.1110 + * otherwise one of the other system-wide error codes.
1.1111 + */
1.1112 + virtual void ModifyPlayingPeriodicEffect( TInt aEffectHandle,
1.1113 + const CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect,
1.1114 + TRequestStatus& aStatus ) = 0;
1.1115 +
1.1116 +
1.1117 + /**
1.1118 + * Load effect data defined in effect data buffer (obtained e.g. from a
1.1119 + * file containing the effect data).
1.1120 + *
1.1121 + * @param[in] aData Reference to allocated effect data buffer.
1.1122 + *
1.1123 + * @param[out] aFileHandle On return contains a handle to the passed
1.1124 + * effect data. This handle is haptics specific,
1.1125 + * i.e., it is not a file system handle but just
1.1126 + * a handle to the loaded effect data buffer.
1.1127 + *
1.1128 + * @return TInt KErrNone if successful, otherwise one of the other
1.1129 + * system-wide error codes.
1.1130 + * @return TInt KErrArgument if the effect data is invalid.
1.1131 + *
1.1132 + * @since S60 5.1
1.1133 + */
1.1134 + virtual TInt LoadEffectData( const TDesC8& aData, TInt& aFileHandle ) = 0;
1.1135 +
1.1136 + /**
1.1137 + * Delete loaded effect data referenced by file handle.
1.1138 + *
1.1139 + * @param[in] aFileHandle Handle to file.
1.1140 + *
1.1141 + * @return TInt KErrNone if successful, otherwise one of the other
1.1142 + * system-wide error codes.
1.1143 + *
1.1144 + * @since S60 5.1
1.1145 + */
1.1146 + virtual TInt DeleteEffectData( TInt aFileHandle ) = 0;
1.1147 +
1.1148 + /**
1.1149 + * Delete all loaded effect datas.
1.1150 + *
1.1151 + * @return TInt KErrNone if successful, otherwise one of the other
1.1152 + * system-wide error codes.
1.1153 + *
1.1154 + * @since S60 5.1
1.1155 + */
1.1156 + virtual TInt DeleteAllEffectData() = 0;
1.1157 +
1.1158 + /**
1.1159 + * Plays an effect defined in loaded effect data buffer.
1.1160 + *
1.1161 + * Synchronous method returns when the haptic command has been evaluated
1.1162 + * and the return value is valid.
1.1163 + *
1.1164 + * @param[in] aFileHandle Handle to the loaded effect data.
1.1165 + *
1.1166 + * @param[in] aEffectIndex Index of the effect to play. The index of the
1.1167 + * effect must be greater than or equal to 0 and
1.1168 + * less than the number of effects returned by
1.1169 + * GetEffectCount().
1.1170 + * @param[out] aEffectHandle Reference to the variable that receives
1.1171 + * a handle to the playing effect.
1.1172 + *
1.1173 + * @return TInt KErrNone if successful, otherwise one of the other
1.1174 + * system-wide error codes.
1.1175 + * @return TInt KErrInUse when haptics is reserved for a higher or
1.1176 + * equal priority client.
1.1177 + *
1.1178 + * @since S60 5.1
1.1179 + */
1.1180 + virtual TInt PlayEffect( TInt aFileHandle,
1.1181 + TInt aEffectIndex,
1.1182 + TInt& aEffectHandle ) = 0;
1.1183 +
1.1184 + /**
1.1185 + * @overload
1.1186 + *
1.1187 + * @param[out] aStatus Request status. On completion contains:
1.1188 + * KErrNone, if successful,
1.1189 + * KErrInUse when haptics is reserved for a higher or
1.1190 + * equal priority client,
1.1191 + * otherwise one of the other system-wide error codes.
1.1192 + */
1.1193 + virtual void PlayEffect( TInt aFileHandle,
1.1194 + TInt aEffectIndex,
1.1195 + TInt& aEffectHandle,
1.1196 + TRequestStatus& aStatus ) = 0;
1.1197 +
1.1198 + /**
1.1199 + * Repeatedly plays a Timeline effect defined in loaded effect data buffer.
1.1200 + *
1.1201 + * The current implementation of PlayEffectRepeat() repeats only
1.1202 + * Timeline effects. If the given effect index refers to a simple effect,
1.1203 + * PlayEffectRepeat() ignores the aRepeat parameter and plays the
1.1204 + * simple effect once. In that case, PlayEffectRepeat() behaves
1.1205 + * like PlayEffect(). PlayEffectRepeat() does not return a warning
1.1206 + * when requested to repeat a simple effect.
1.1207 + *
1.1208 + * Synchronous method returns when the haptic command has been evaluated
1.1209 + * and the return value is valid.
1.1210 + *
1.1211 + * @param[in] aFileHandle Handle to the loaded effect data.
1.1212 + * @param[in] aEffectIndex Index of the effect to play. The index of the
1.1213 + * effect must be greater than or equal to 0 and
1.1214 + * less than the number of effects returned by
1.1215 + * GetEffectCount().
1.1216 + * @param[in] aRepeat Number of times to repeat the effect. To play the
1.1217 + * effect indefinitely, set aRepeat to
1.1218 + * InfiniteRepeat(). To repeat the effect a
1.1219 + * finite number of times, set aRepeat to a value from
1.1220 + * 0 to InfiniteRepeat() - 1.
1.1221 + * The effect can be repeated at most
1.1222 + * InfiniteRepeat() - 1 times.
1.1223 + * Setting aRepeat to 0 plays the effect once (repeats
1.1224 + * the effect zero times) and is equivalent to calling
1.1225 + * PlayEffect().
1.1226 + * To stop the effect before it has
1.1227 + * repeated the requested number of times or to stop
1.1228 + * an effect that is playing indefinitely, call
1.1229 + * StopPlayingEffect() or StopAllPlayingEffects()
1.1230 + * @param[out] aEffectHandle Reference to the variable that receives
1.1231 + * a handle to the playing effect.
1.1232 + *
1.1233 + * @return TInt KErrNone if successful, otherwise one of the other
1.1234 + * system-wide error codes.
1.1235 + * @return TInt KErrInUse when haptics is reserved for a higher or
1.1236 + * equal priority client.
1.1237 + *
1.1238 + * @since S60 5.1
1.1239 + */
1.1240 + virtual TInt PlayEffectRepeat( TInt aFileHandle,
1.1241 + TInt aEffectIndex,
1.1242 + TUint8 aRepeat,
1.1243 + TInt& aEffectHandle ) = 0;
1.1244 +
1.1245 + /**
1.1246 + * @overload
1.1247 + *
1.1248 + * @param[out] aStatus Request status. On completion contains:
1.1249 + * KErrNone, if successful,
1.1250 + * KErrInUse when haptics is reserved for a higher or
1.1251 + * equal priority client,
1.1252 + * otherwise one of the other system-wide error codes.
1.1253 + */
1.1254 + virtual void PlayEffectRepeat( TInt aFileHandle,
1.1255 + TInt aEffectIndex,
1.1256 + TUint8 aRepeat,
1.1257 + TInt& aEffectHandle,
1.1258 + TRequestStatus& aStatus ) = 0;
1.1259 +
1.1260 + /**
1.1261 + * Plays an effect defined in effect data buffer.
1.1262 + *
1.1263 + * Synchronous method returns when the haptic command has been evaluated
1.1264 + * and the return value is valid.
1.1265 + *
1.1266 + * @param[in] aData Reference to effect data buffer containing the
1.1267 + * definition of the effect to play.
1.1268 + * @param[in] aEffectIndex Index of the effect to play. The index of the
1.1269 + * effect must be greater than or equal to 0 and
1.1270 + * less than the number of effects returned by
1.1271 + * GetEffectCount().
1.1272 + * @param[out] aEffectHandle Reference to the variable that receives
1.1273 + * a handle to the playing effect.
1.1274 + *
1.1275 + * @return TInt KErrNone if successful, otherwise one of the other
1.1276 + * system-wide error codes.
1.1277 + * @return TInt KErrArgument if the data is invalid.
1.1278 + * @return TInt KErrInUse when haptics is reserved for a higher or
1.1279 + * equal priority client.
1.1280 + *
1.1281 + * @since S60 5.1
1.1282 + */
1.1283 + virtual TInt PlayEffect( const TDesC8& aData,
1.1284 + TInt aEffectIndex,
1.1285 + TInt& aEffectHandle ) = 0;
1.1286 +
1.1287 + /**
1.1288 + * @overload
1.1289 + *
1.1290 + * @param[out] aStatus Request status. On completion contains:
1.1291 + * KErrNone, if successful,
1.1292 + * KErrArgument, if the data is invalid,
1.1293 + * KErrInUse when haptics is reserved for a higher or
1.1294 + * equal priority client,
1.1295 + * otherwise one of the other system-wide error codes.
1.1296 + */
1.1297 + virtual void PlayEffect( const TDesC8& aData,
1.1298 + TInt aEffectIndex,
1.1299 + TInt& aEffectHandle,
1.1300 + TRequestStatus& aStatus ) = 0;
1.1301 +
1.1302 + /**
1.1303 + * Repeatedly plays a Timeline effect defined in effect data buffer.
1.1304 + *
1.1305 + * The current implementation of PlayEffectRepeat() repeats only
1.1306 + * Timeline effects. If the given effect index refers to a simple effect,
1.1307 + * PlayEffectRepeat() ignores the aRepeat parameter and plays the
1.1308 + * simple effect once. In that case, PlayEffectRepeat() behaves
1.1309 + * similarly to PlayEffect(). PlayEffectRepeat() does not return a warning
1.1310 + * when requested to repeat a simple effect.
1.1311 + *
1.1312 + * Synchronous method returns when the haptic command has been evaluated
1.1313 + * and the return value is valid.
1.1314 + *
1.1315 + * @param[in] aData Reference to effect data buffer containing the
1.1316 + * definition of the effect to play.
1.1317 + * @param[in] aEffectIndex Index of the effect to play. The index of the
1.1318 + * effect must be greater than or equal to 0 and
1.1319 + * less than the number of effects returned by
1.1320 + * GetEffectCount().
1.1321 + * @param[in] aRepeat Number of times to repeat the effect. To play the
1.1322 + * effect indefinitely, set aRepeat to
1.1323 + * InfiniteRepeat(). To repeat the effect a
1.1324 + * finite number of times, set aRepeat to a value from
1.1325 + * 0 to InfiniteRepeat() - 1. The effect can
1.1326 + * be repeated at most InfiniteRepeat() - 1
1.1327 + * times.
1.1328 + * Setting aRepeat to 0 plays the effect once (repeats
1.1329 + * the effect zero times) and is equivalent to calling
1.1330 + * PlayEffect().
1.1331 + * To stop the effect before it has
1.1332 + * repeated the requested number of times or to stop
1.1333 + * an effect that is playing indefinitely, call
1.1334 + * StopPlayingEffect() or StopAllPlayingEffects()
1.1335 + * @param[out] aEffectHandle Reference to the variable that receives
1.1336 + * a handle to the playing effect.
1.1337 + *
1.1338 + * @return TInt KErrNone if successful, otherwise one of the other
1.1339 + * system-wide error codes.
1.1340 + * @return TInt KErrArgument if the data is invalid.
1.1341 + * @return TInt KErrInUse when haptics is reserved for a higher or
1.1342 + * equal priority client.
1.1343 + *
1.1344 + * @since S60 5.1
1.1345 + */
1.1346 + virtual TInt PlayEffectRepeat( const TDesC8& aData,
1.1347 + TInt aEffectIndex,
1.1348 + TUint8 aRepeat,
1.1349 + TInt& aEffectHandle )=0;
1.1350 +
1.1351 + /**
1.1352 + * @overload
1.1353 + *
1.1354 + * @param[out] aStatus Request status. On completion contains:
1.1355 + * KErrNone, if successful,
1.1356 + * KErrArgument, if the data is invalid,
1.1357 + * KErrInUse when haptics is reserved for a higher or
1.1358 + * equal priority client,
1.1359 + * otherwise one of the other system-wide error codes.
1.1360 + */
1.1361 + virtual void PlayEffectRepeat( const TDesC8& aData,
1.1362 + TInt aEffectIndex,
1.1363 + TUint8 aRepeat,
1.1364 + TInt& aEffectHandle,
1.1365 + TRequestStatus& aStatus )=0;
1.1366 +
1.1367 + /**
1.1368 + * Plays a MagSweep effect given in the parameters defining the effect.
1.1369 + *
1.1370 + * Synchronous method returns when the haptic command has been evaluated
1.1371 + * and the return value is valid.
1.1372 + *
1.1373 + * @param[in] aEffect Reference to a struct defining the effect parameters.
1.1374 + * @param[out] aEffectHandle Reference to the variable that receives
1.1375 + * a handle to the playing effect.
1.1376 + *
1.1377 + * @return TInt KErrNone if successful, otherwise one of the other
1.1378 + * system-wide error codes.
1.1379 + * @return TInt KErrInUse when haptics is reserved for a higher or
1.1380 + * equal priority client.
1.1381 + *
1.1382 + * @see THWRMHapticsMagSweepEffect for effect definition.
1.1383 + *
1.1384 + * @since S60 5.1
1.1385 + */
1.1386 + virtual TInt PlayMagSweepEffect(
1.1387 + const CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect,
1.1388 + TInt& aEffectHandle ) = 0;
1.1389 +
1.1390 + /**
1.1391 + * @overload
1.1392 + *
1.1393 + * @param[out] aStatus Request status. On completion contains:
1.1394 + * KErrNone, if successful,
1.1395 + * KErrInUse when haptics is reserved for a higher or
1.1396 + * equal priority client,
1.1397 + * otherwise one of the other system-wide error codes.
1.1398 + */
1.1399 + virtual void PlayMagSweepEffect(
1.1400 + const CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect,
1.1401 + TInt& aEffectHandle,
1.1402 + TRequestStatus& aStatus ) = 0;
1.1403 +
1.1404 + /**
1.1405 + * Plays a Periodic effect given in the parameters defining the effect.
1.1406 + *
1.1407 + * Synchronous method returns when the haptic command has been evaluated
1.1408 + * and the return value is valid.
1.1409 + *
1.1410 + * @param[in] aEffect Reference to a struct defining the effect parameters.
1.1411 + * @param[out] aEffectHandle Reference to the variable that receives
1.1412 + * a handle to the playing effect.
1.1413 + *
1.1414 + * @return TInt KErrNone if successful, otherwise one of the other
1.1415 + * system-wide error codes.
1.1416 + * @return TInt KErrInUse when haptics is reserved for a higher or
1.1417 + * equal priority client.
1.1418 + *
1.1419 + * @see THWRMHapticsPeriodicEffect for effect definition.
1.1420 + *
1.1421 + * @since S60 5.1
1.1422 + */
1.1423 + virtual TInt PlayPeriodicEffect(
1.1424 + const CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect,
1.1425 + TInt& aEffectHandle ) = 0;
1.1426 +
1.1427 + /**
1.1428 + * @overload
1.1429 + *
1.1430 + * @param[out] aStatus Request status. On completion contains:
1.1431 + * KErrNone, if successful,
1.1432 + * KErrInUse when haptics is reserved for a higher or
1.1433 + * equal priority client,
1.1434 + * otherwise one of the other system-wide error codes.
1.1435 + */
1.1436 + virtual void PlayPeriodicEffect(
1.1437 + const CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect,
1.1438 + TInt& aEffectHandle,
1.1439 + TRequestStatus& aStatus ) = 0;
1.1440 +
1.1441 + /**
1.1442 + * Pauses a playing effect.
1.1443 + *
1.1444 + * @param[in] aEffectHandle Handle to the playing effect to pause.
1.1445 + * The handle to the effect must have been
1.1446 + * obtained by calling
1.1447 + * PlayMagSweepEffect(),
1.1448 + * PlayPeriodicEffect() ,
1.1449 + * PlayEffect() ,
1.1450 + * PlayEffectRepeat() or
1.1451 + * CreateStreamingEffect().
1.1452 + *
1.1453 + * @return TInt KErrNone if successful, otherwise one of the other
1.1454 + * system-wide error codes.
1.1455 + *
1.1456 + * @since S60 5.1
1.1457 + */
1.1458 + virtual TInt PausePlayingEffect( TInt aEffectHandle ) = 0;
1.1459 +
1.1460 + /**
1.1461 + * Resumes playback on a paused effect from the point where
1.1462 + * the effect was paused.
1.1463 + *
1.1464 + * Depending on the available slots, it is possible that all simple
1.1465 + * effects from a paused effect data buffer or streaming sample cannot
1.1466 + * be resumed. The API returns success when it is able to play one of
1.1467 + * these simple effects.
1.1468 + *
1.1469 + * @param[in] aEffectHandle Handle to the paused effect to resume.
1.1470 + * The handle to the effect must have been
1.1471 + * obtained by calling
1.1472 + * PlayMagSweepEffect(),
1.1473 + * PlayPeriodicEffect(),
1.1474 + * PlayEffect(),
1.1475 + * PlayEffectRepeat() or
1.1476 + * CreateStreamingEffect().
1.1477 + *
1.1478 + * @return TInt KErrNone if successful, otherwise one of the other
1.1479 + * system-wide error codes.
1.1480 + *
1.1481 + * @since S60 5.1
1.1482 + */
1.1483 + virtual TInt ResumePausedEffect( TInt aEffectHandle ) = 0;
1.1484 +
1.1485 + /**
1.1486 + * Stops a playing effect.
1.1487 + *
1.1488 + * @param[in] aEffectHandle Handle to the playing effect to stop.
1.1489 + * The handle to the effect must have been
1.1490 + * obtained by calling
1.1491 + * PlayMagSweepEffect(),
1.1492 + * PlayPeriodicEffect(),
1.1493 + * PlayEffect(),
1.1494 + * PlayEffectRepeat() or
1.1495 + * CreateStreamingEffect().
1.1496 + *
1.1497 + * @return TInt KErrNone if successful, otherwise one of the other
1.1498 + * system-wide error codes.
1.1499 + *
1.1500 + * @since S60 5.1
1.1501 + */
1.1502 + virtual TInt StopPlayingEffect( TInt aEffectHandle ) = 0;
1.1503 +
1.1504 + /**
1.1505 + * Stops all playing and paused effects of a haptics instance.
1.1506 + *
1.1507 + * @return TInt KErrNone if successful, otherwise one of the other
1.1508 + * system-wide error codes.
1.1509 + *
1.1510 + * @since S60 5.1
1.1511 + */
1.1512 + virtual TInt StopAllPlayingEffects() = 0;
1.1513 +
1.1514 + /**
1.1515 + * Get a number of effects defined in a loaded effect data buffer.
1.1516 + *
1.1517 + * @param[in] aFileHandle Handle to the loaded effect data buffer.
1.1518 + * @param[out] aCount Number of effects in the effect data buffer.
1.1519 + *
1.1520 + * @return TInt KErrNone if successful, otherwise one of the other
1.1521 + * system-wide error codes.
1.1522 + *
1.1523 + * @since S60 5.1
1.1524 + */
1.1525 + virtual TInt GetEffectCount ( TInt aFileHandle,
1.1526 + TInt& aCount ) const = 0;
1.1527 +
1.1528 + /**
1.1529 + * Get the duration of an effect defined in a loaded effect data buffer.
1.1530 + *
1.1531 + * @param[in] aFileHandle Handle to the loaded effect data buffer.
1.1532 + * @param[in] aEffectIndex Effect for which the duration is wanted.
1.1533 + * @param[out] aEffectDuration Reference to the variable that receives
1.1534 + * the requested effect's duration value.
1.1535 + * Duration is in milliseconds.
1.1536 + *
1.1537 + * @return TInt KErrNone if successful, otherwise one of the other
1.1538 + * system-wide error codes.
1.1539 + * @since S60 5.1
1.1540 + */
1.1541 + virtual TInt GetEffectDuration ( TInt aFileHandle,
1.1542 + TInt aEffectIndex,
1.1543 + TInt& aEffectDuration ) const = 0;
1.1544 +
1.1545 + /**
1.1546 + * Gets the index of an effect defined in a loaded effect data buffer
1.1547 + * from the name of the effect.
1.1548 + *
1.1549 + * @param[in] aFileHandle Handle to the loaded effect data buffer.
1.1550 + * @param[in] aEffectName Name of the effect for which the index is wanted.
1.1551 + * @param[out] aEffectIndex Reference to the variable that receives
1.1552 + * the requested effect's index value.
1.1553 + *
1.1554 + * @return TInt KErrNone if successful, otherwise one of the other
1.1555 + * system-wide error codes.
1.1556 + *
1.1557 + * @since S60 5.1
1.1558 + */
1.1559 + virtual TInt GetEffectIndexFromName ( TInt aFileHandle,
1.1560 + const TDesC8& aEffectName,
1.1561 + TInt& aEffectIndex ) const = 0;
1.1562 +
1.1563 + /**
1.1564 + * Gets the type of an effect defined in loaded effect data buffer.
1.1565 + *
1.1566 + * @param[in] aFileHandle Handle to loaded effect data buffer.
1.1567 + * @param[in] aEffectIndex Index of an effect for which a type is wanted.
1.1568 + * @param[out] aEffectType Reference to the variable that receives
1.1569 + * the requested effect's type value.
1.1570 + *
1.1571 + * @return TInt KErrNone if successful, otherwise one of the other
1.1572 + * system-wide error codes.
1.1573 + *
1.1574 + * @since S60 5.1
1.1575 + */
1.1576 + virtual TInt GetEffectType( TInt aFileHandle,
1.1577 + TInt aEffectIndex,
1.1578 + TInt& aEffectType ) const = 0;
1.1579 +
1.1580 + /**
1.1581 + * Gets the name of an effect defined in a loaded effect data buffer.
1.1582 + *
1.1583 + * @param[in] aFileHandle Handle to the loaded effect data buffer.
1.1584 + * @param[in] aEffectIndex Index of an effect for which a name is wanted.
1.1585 + * @param[out] aEffectName Reference to the variable that receives
1.1586 + * the requested effect's name. Note that the
1.1587 + * descriptor's size must be at least the size
1.1588 + * given from MaxPropertyStringLength().
1.1589 + *
1.1590 + * @return TInt KErrNone if successful, otherwise one of the other
1.1591 + * system-wide error codes.
1.1592 + *
1.1593 + * @since S60 5.1
1.1594 + */
1.1595 + virtual TInt GetEffectName( TInt aFileHandle,
1.1596 + TInt aEffectIndex,
1.1597 + TDes8& aEffectName ) const = 0;
1.1598 +
1.1599 + /**
1.1600 + * Gets the parameters of a MagSweep effect defined in a loaded effect data
1.1601 + * buffer.
1.1602 + *
1.1603 + * @param[in] aFileHandle Handle to the loaded effect data buffer.
1.1604 + * @param[in] aEffectIndex Index of an effect for which a definition is
1.1605 + * wanted.
1.1606 + * @param[out] aEffect Reference to the variable that receives
1.1607 + * the effect definition.
1.1608 + *
1.1609 + * @return TInt KErrNone if successful, otherwise one of the other
1.1610 + * system-wide error codes.
1.1611 + *
1.1612 + * @see THWRMHapticsMagSweepEffect for effect definition.
1.1613 + *
1.1614 + * @since S60 5.1
1.1615 + */
1.1616 + virtual TInt GetMagSweepEffectDefinition(
1.1617 + TInt aFileHandle,
1.1618 + TInt aEffectIndex,
1.1619 + CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect ) const = 0;
1.1620 +
1.1621 + /**
1.1622 + * Gets the parameters of a periodic effect defined in a loaded effect data
1.1623 + * buffer.
1.1624 + *
1.1625 + * @param[in] aFileHandle Handle to the loaded effect data buffer.
1.1626 + * @param[in] aEffectIndex Index of an effect for which a definition is wanted.
1.1627 + * @param[out] aEffect Reference to the variable that receives
1.1628 + * the effect definition.
1.1629 + *
1.1630 + * @return TInt KErrNone if successful, otherwise one of the other
1.1631 + * system-wide error codes.
1.1632 + *
1.1633 + * @see THWRMHapticsPeriodicEffect for effect definition.
1.1634 + *
1.1635 + * @since S60 5.1
1.1636 + */
1.1637 + virtual TInt GetPeriodicEffectDefinition(
1.1638 + TInt aFileHandle,
1.1639 + TInt aEffectIndex,
1.1640 + CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect ) const = 0;
1.1641 +
1.1642 + /**
1.1643 + * Gets the value that represents infinite repeats. Method may be used
1.1644 + * only after an actuator has been opened successfully.
1.1645 + *
1.1646 + * @return TInt Value that represents infinite repeats. KErrNotReady, if
1.1647 + * an actuator has not been opened.
1.1648 + */
1.1649 + virtual TInt InfiniteRepeat() const = 0;
1.1650 +
1.1651 + /**
1.1652 + * Gets the value that represents infinite duration. Method may be used
1.1653 + * only after an actuator has been opened successfully.
1.1654 + *
1.1655 + * @return TInt Value that represents infinite duration. KErrNotReady, if
1.1656 + * an actuator has not been opened.
1.1657 + */
1.1658 + virtual TInt InfiniteDuration() const = 0;
1.1659 +
1.1660 + /**
1.1661 + * Gets the maximum length of an effect name stored in a loaded
1.1662 + * effect data file. Method may be used only after an actuator
1.1663 + * has been opened successfully.
1.1664 + *
1.1665 + * @return TInt Maximum effect name length. KErrNotReady, if
1.1666 + * an actuator has not been opened.
1.1667 + */
1.1668 + virtual TInt MaxEffectNameLength() const = 0;
1.1669 +
1.1670 + /**
1.1671 + * Gets the maximum device name length. Method may be used
1.1672 + * only after an actuator has been opened successfully.
1.1673 + *
1.1674 + * @return TInt Maximum device name length. KErrNotReady, if
1.1675 + * an actuator has not been opened.
1.1676 + */
1.1677 + virtual TInt MaxDeviceNameLength() const = 0;
1.1678 +
1.1679 + /**
1.1680 + * Gets the maximum capability string length. Method may be used
1.1681 + * only after an actuator has been opened successfully.
1.1682 + *
1.1683 + * @return TInt Maximum capability string length. KErrNotReady, if
1.1684 + * an actuator has not been opened.
1.1685 + */
1.1686 + virtual TInt MaxCapabilityStringLength() const = 0;
1.1687 +
1.1688 + /**
1.1689 + * Gets the maximum property string length. Method may be used
1.1690 + * only after an actuator has been opened successfully.
1.1691 + *
1.1692 + * @return TInt Maximum property string length. KErrNotReady, if
1.1693 + * an actuator has not been opened.
1.1694 + */
1.1695 + virtual TInt MaxPropertyStringLength() const = 0;
1.1696 +
1.1697 + /**
1.1698 + * Gets the maximum streaming sample size. Method may be used
1.1699 + * only after an actuator has been opened successfully.
1.1700 + *
1.1701 + * @return TInt Maximum streaming sample size. KErrNotReady, if
1.1702 + * an actuator has not been opened.
1.1703 + */
1.1704 + virtual TInt MaxStreamingSampleSize() const = 0;
1.1705 +
1.1706 + /**
1.1707 + * Gets the default device priority. Method may be used
1.1708 + * only after an actuator has been opened successfully.
1.1709 + *
1.1710 + * @return TInt Default device property. KErrNotReady, if
1.1711 + * an actuator has not been opened.
1.1712 + */
1.1713 + virtual TInt DefaultDevicePriority() const = 0;
1.1714 + };
1.1715 +
1.1716 +#endif