2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
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
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: This file contains the header of the CHWRMHaptics class.
19 #ifndef C_HWRMHAPTICS_H
20 #define C_HWRMHAPTICS_H
23 #include <hwrmlogicalactuators.h>
24 #include <hwrmhapticsobserver.h>
25 #include <hwrmhapticsactuatorobserver.h>
27 /** Minimum magnitude value. */
28 const TInt KHWRMHapticsMinMagnitude = 0;
30 /** Maximum magnitude value. */
31 const TInt KHWRMHapticsMaxMagnitude = 10000;
34 * Minimum device priority.
36 * To be used with SetDeviceProperty().
38 const TInt KHWRMHapticsMinDevicePriority = 0;
41 * Maximum device priority.
43 * To be used with SetDeviceProperty().
45 const TInt KHWRMHapticsMaxDevicePriority = 15;
48 /** Minimum strength value. */
49 const TInt KHWRMHapticsMinStrength = 0;
51 /** Maximum strength value. */
52 const TInt KHWRMHapticsMaxStrength = 10000;
56 * The class used to control the device's haptics feature.
58 * The Haptics API provides the ability to control the device's haptics feature.
59 * The API provides methods for receiving the current status and effect
60 * completion of the haptics. The API provides synchronous and asynchronous
61 * versions of playing methods due to the nature of effect playing
62 * where multiple calls may be made to play effects.
63 * Synchronous methods are provided for other API functionality.
64 * They will block the calling client during their execution.
65 * The API is meant for all applications which need to control the
66 * device's haptics feature.
68 * The API consist of the class CHWRMHaptics and related observer classes:
69 * MHWRMHapticsObserver and MHWRMHapticsActuatorObserver. If the client
70 * requires up-to-date status information, it can be achieved by deriving
71 * the client from MHWRMHapticsObserver or MHWRMHapticsActuatorObserver or
72 * from both and providing a callback pointer(s) of the implementing class
73 * for the NewL() method.
77 * // ===================================================================
79 * // - Setting the license key.
80 * // - Playing a periodic effect
82 * // - Haptics feature must be enabled by the system.
83 * // ===================================================================
85 * #include <hwrmhaptics.h> // link against hwrmhapticsclient.lib
86 * #include <hwrmlogicalactuators.h> // enumeration of logical actuators
88 * TInt minPeriod( 0 );
89 * TInt effectHandle( 0 );
92 * CHWRMHaptics* haptics = CHWRMHaptics::NewL( NULL, NULL );
94 * haptics->SupportedActuators( suppAct );
96 * if( EHWRMLogicalActuatorDevice & suppAct )
98 * haptics->OpenActuatorL( EHWRMLogicalActuatorDevice )
100 * else if ( EHWRMLogicalActuatorAny & suppAct )
102 * haptics->OpenActuatorL( EHWRMLogicalActuatorAny )
106 * // 3rd party developers can obtain the license key from Forum Nokia
107 * _LIT8( KLicenseKey,"_this_value_must_be_32_in_length" );
109 * User::LeaveIfError(
110 * haptics->SetDeviceProperty(
111 * THWRMHapticsDevicePropertyTypes::EHWRMHapticsLicenseKey,
114 * // --> now playing effects is possible
116 * THWRMHapticsPeriodicEffect periodicEff;
118 * periodicEff.iDuration = 5000;
119 * periodicEff.iMagnitude = 5000;
120 * periodicEff.iPeriod = minPeriod;
121 * periodicEff.iStyle = EHWRMHapticsStyleSharp;
122 * periodicEff.iAttackTime = 250;
123 * periodicEff.iAttackLevel = 10000;
124 * periodicEff.iFadeTime = 250;
125 * periodicEff.iFadeLevel = 0;
127 * haptics->PlayPeriodicEffect( periodicEff, effectHandle );
129 * // ... something happened in the application and it has lost focus
130 * // so stop the effect immediately
132 * haptics->StopPlayingEffect( effectHandle );
134 * // ================================================================
135 * // Usage example 2:
136 * // - Loading effect data from a file and playing effects from the
138 * // - Preconditions:
139 * // - license key is set
140 * // - Recommended usage style:
141 * // - Effect data file can contain definition(s) of periodic
142 * // effects, magsweep effects or a combination of these basic
143 * // types called timeline effects, which call basic effects in
144 * // sequence thus forming new more complex effects.
145 * // - Load the effect data once in the client application.
146 * // - Play effects from the loaded data using the effectIndex
147 * // ================================================================
149 * // Use S60 FileSystem to load the effect data file to a buffer
153 * // Effect data has been read into a descriptor by the user.
154 * // Load the effect data to be used by the haptic subsystem.
155 * TInt fileHandle( 0 );
156 * User::LeaveIfError( haptics->LoadEffectData( data, fileHandle ) );
158 * TInt effectIndex = 0;
159 * TInt hapticsStatus = haptics->PlayEffect( fileHandle,
163 * hapticsStatus = haptics->DeleteEffectData( fileHandle );
165 * if( KErrNone != hapticsStatus )
167 * // do some error handling...
175 * Common error codes returned by the Haptics API methods.
177 * KErrArgument Argument is invalid, e.g., malformatted effect data, or too
178 * large magnitude value.
179 * KErrAccessDenied The license key is not set when trying to use some
181 * KErrNoMemory There is insufficient memory available for the method to
183 * KErrNotReady Initialization has not been done properly when trying to use
186 * @lib hwrmhapticsclient.dll
190 class CHWRMHaptics : public CBase
195 * Defines the paramaters used in a magsweep effect.
198 * PlayMagSweepEffect(),
199 * ModifyPlayingMagSweepEffect(),
200 * GetMagSweepEffectDefinition().
202 struct THWRMHapticsMagSweepEffect
205 * Duration of the effect. Unit is milliseconds.
207 * To specify an infinite duration, the effect duration
208 * should be set to a value returned by InfiniteDuration().
209 * For a finite duration, the effect duration is clamped to a value
210 * from 0 to the value returned by GetDeviceCapability()
211 * for the EHWRMHapticsMaxEffectDuration capability type.
216 * Magnitude of the effect.
218 * The effect magnitude is clamped to a value from
219 * KHWRMHapticsMinMagnitude to KHWRMHapticsMaxMagnitude.
224 * Style of the effect.
226 * Can be one of THWRMHapticsEffectStyles.
231 * Attack time of the effect. Unit is milliseconds.
233 * The attack time is clamped to a value from 0 to the value returned
234 * by GetDeviceCapability() for the EHWRMHapticsMaxEnvelopeTime
240 * Attack level of the effect.
242 * The attack level is clamped to a value from KHWRMHapticsMinMagnitude
243 * to KHWRMHapticsMaxMagnitude.
248 * Fade time of the effect. Unit is milliseconds.
250 * The fade time is clamped to a value from 0 to the value returned
251 * by GetDeviceCapability() for the EHWRMHapticsMaxEnvelopeTime
257 * Fade level of the effect.
259 * The fade level is clamped to a value from KHWRMHapticsMinMagnitude
260 * to KHWRMHapticsMaxMagnitude inclusive.
266 * Defines the parameters used in a periodic effect.
269 * PlayPeriodicEffect(),
270 * ModifyPlayingPeriodicEffect(),
271 * GetPeriodicEffectDefinition().
273 struct THWRMHapticsPeriodicEffect
276 * Duration of the effect. Unit is milliseconds.
278 * To specify an infinite duration, the effect duration
279 * should be set to InfiniteDuration().
280 * For a finite duration, the effect duration is clamped to a value
281 * from 0 to the value returned by GetDeviceCapability()
282 * for the EHWRMHapticsMaxEffectDuration capability type.
287 * Magnitude of the effect.
289 * The effect magnitude is clamped to a value from
290 * KHWRMHapticsMinMagnitude to KHWRMHapticsMaxMagnitude.
295 * Period of the effect. Unit is milliseconds.
297 * The period is clamped to a value returned by GetDeviceCapability()
298 * for EHWRMHapticsMinPeriod capability type to the value returned
299 * by GetDeviceCapability() for the EHWRMHapticsMaxEnvelopeTime
305 * Style of the effect.
307 * Can be one of THWRMHapticsEffectStyles.
312 * Attack time of the effect. Unit is milliseconds.
314 * The attack time is clamped to a value from 0 to the value returned
315 * by GetDeviceCapability() for the EHWRMHapticsMaxEnvelopeTime
321 * Attack level of the effect.
323 * The attack level is clamped to a value from KHWRMHapticsMinMagnitude
324 * to KHWRMHapticsMaxMagnitude.
329 * Fade time of the effect. Unit is milliseconds.
331 * The fade time is clamped to a value from 0 to the value returned
332 * by GetDeviceCapability() for the EHWRMHapticsMaxEnvelopeTime
338 * Fade level of the effect.
340 * The fade level is clamped to a value from KHWRMHapticsMinMagnitude
341 * to KHWRMHapticsMaxMagnitude.
347 * THWRMHapticsDevicePropertyTypes enumeration
348 * Use SetDeviceProperty() to set properties for the haptics
349 * and GetDeviceProperty() to get properties currently in use.
351 enum THWRMHapticsDevicePropertyTypes
354 * License key property. Usable with SetDeviceProperty() only.
355 * Use const TDesC8& overloaded version of the method.
357 * Setting this property to a valid license key unlocks the haptics
358 * subsystem in the device. Setting this property to an invalid
359 * license key locks the haptics in the device (for this client).
360 * The haptics in the device are locked from clients by default.
361 * When haptics is locked, all haptics related operations on the
362 * device, except for setting the license key and closing the device,
364 * Haptics must be unlocked on a per instance basis.
366 EHWRMHapticsLicensekey = 0,
369 * Property used to set/get the priority for effects to played for
370 * the given haptics instance (i.e., for the given client).
372 * Use TInt overloaded version of the methods SetDeviceProperty()and
373 * GetDeviceProperty() to use this property.
375 * Different haptics instances can use different priorities
376 * on the same physical device. The priority determines which haptics
377 * instance's effects are played when multiple haptics instances
378 * are attempting to play effects at the same time.
379 * The default priority is DefaultDevicePriority().
380 * Priority values can range from KHWRMHapticsMinDevicePriority
381 * to KHWRMHapticsMaxDevicePriority.
382 * GetDeviceProperty() returns a value inside
383 * TInt& aDevicePropertyValue in the range of
384 * KHWRMHapticsMinDevicePriority
385 * to KHWRMHapticsMaxDevicePriority. If the client has not set
386 * the EHWRMHapticsPriority property GetDeviceProperty() returns
387 * a value of DefaultDevicePriority().
389 EHWRMHapticsPriority,
392 * Property used to disable effects for the client's haptics instance.
394 * Use TBool overloaded version of the methods SetDeviceProperty() and
395 * GetDeviceProperty() to use this property.
397 * When this property is set to true, any playing effects are
398 * immediately stopped and subsequent requests to play
399 * effects are ignored. Applies to the calling client's
400 * haptics instance only. When this property is set to false,
401 * subsequent requests to play effects are honored.
402 * The default value for this property is false.
404 EHWRMHapticsDisableEffects,
407 * A property that reduces/increases the magnitude of all effects
408 * for a particular haptics instance.
410 * Use TInt overloaded version of the methods SetDeviceProperty()and
411 * GetDeviceProperty() to use this property.
413 * Strength values can vary from KHWRMHapticsMinStrength ("mute")
414 * to KHWRMHapticsMaxStrength.
415 * The default value for EHWRMHapticsStrength is
416 * KHWRMHapticsMaxStrength. If the EHWRMHapticsStrength property is
417 * not set, the default value is used.
418 * When reducing/increasing the magnitude of the effects by setting
419 * the EHWRMHapticsStrength property, it only applies to the haptics
420 * instance of the client which called the function. If there is a
421 * second haptics instance held by the same or a different client,
422 * it is not affected by the setting of the EHWRMHapticsStrength
423 * property of the first client's haptics instance.
425 * Modifying the EHWRMHapticsStrength property of the haptics instance
426 * does not affect currently playing effects, only effects played or
427 * modified after calling the SetDeviceProperty() method using the new
428 * EHWRMHapticsStrength value.
430 EHWRMHapticsStrength,
433 * A property that reduces/increases the magnitude of all effects
434 * for all haptics instances (whole device).
436 * Use TInt overloaded version of the methods SetDeviceProperty()and
437 * GetDeviceProperty() to use this property.
439 * Strength values can vary from KHWRMHapticsMinStrength ("mute")
440 * to KHWRMHapticsMaxStrength.
441 * The default value for Master Strength is KHWRMHapticsMaxStrength.
442 * If the client does not set the EHWRMHapticsMasterStrength property
443 * of the haptics instance, the default value is used.
444 * When reducing/increasing the magnitude of the effects,
445 * EHWRMHapticsMasterStrength property affects all playing effects on
446 * all haptics instances (whole device).
447 * This means that all the haptics instances, held by other
448 * clients are affected by the setting of EHWRMHapticsMasterStrength
449 * property of the first client's haptics instance.
451 * The client which wants to set the EHWRMHapticsMasterStrength
452 * property must have a haptics instance that has a maximum effect
454 * The haptics client instance must set itself to a maximum priority
455 * by calling SetDeviceProperty() using EHWRMHapticsPriority property
456 * type and KMaxDevicePriority value before changing the
457 * EHWRMHapticsMasterStrength property's value.
459 * Note: A licensee license key, provided to licensees only,
460 * changes the EHWRMHapticsMasterStrength property.
461 * A call to SetDeviceProperty( EHWRMHapticsMasterStrength, aValue )
462 * always returns KErrAccessDenied for haptics instances that are
463 * not using a licensee license key.
465 EHWRMHapticsMasterStrength
469 * Device's capability types.
471 * Use TInt& aDeviceCapabilityValue overloaded version of the
472 * method GetDeviceCapability() unless otherwise mentioned.
474 enum THWRMHapticsDeviceCapabilityTypes
477 * Device category. See THWRMHapticsDeviceCategory enumeration defined
478 * later in this API header for possible values.
480 EHWRMHapticsDeviceCategory = 0,
483 * The maximum number of nested repeat bars supported for Timeline effects.
485 * Any repeat bars nested beyond this level are played only once.
487 EHWRMHapticsMaxNestedRepeats,
490 * Number of vibration actuators present in the device.
492 EHWRMHapticsNumActuators,
495 * Actuator type See THWRMHapticsActuatorType enumeration defined
496 * later in this API header for possible values.
498 EHWRMHapticsActuatorType,
501 * Number of effect slots.
503 * The number of effect slots represents the maximum number
504 * of simple effects that can play simultaneously.
505 * If an attempt is made to play more than this number of effects
506 * at the same time, some of the simple effects do not play.
508 EHWRMHapticsNumEffectSlots,
511 * Supported effect styles, stored as a bitfield. See
512 * THWRMHapticsSupportedEffectStyles enumeration defined later in this
513 * API header for possible values.
515 EHWRMHapticsSupportedStyles,
518 * Minimum period for Periodic effects.
520 EHWRMHapticsMinPeriod,
523 * Maximum period for Periodic effects.
525 EHWRMHapticsMaxPeriod,
528 * Maximum duration for MagSweep and Periodic effects measured
531 EHWRMHapticsMaxEffectDuration,
534 * Supported effect types. Stored as a bitfield. See
535 * THWRMHapticsSupportedEffectTypes enumeration defined later in this
536 * API header for possible values.
538 EHWRMHapticsSupportedEffects,
543 * Use TDes8& aDeviceCapabilityValue overloaded version of the
544 * method GetDeviceCapability().
546 EHWRMHapticsDeviceName,
549 * Maximum start time or fade time in milliseconds for
550 * effect envelopes of MagSweep or periodic effects.
552 EHWRMHapticsMaxEnvelopeTime,
555 * Version number of the physical haptics player in the device in
556 * hexadecimal format.
558 * The format is OxMMNNSSBB, where MM is the major
559 * version number, NN is the minor version number,
560 * SS is a special build number and BB is the VTMP build number.
561 * For example, for the hexadecimal format 0x02000053 the version
564 EHWRMHapticsAPIVersionNumber,
567 * Maximum size in bytes of effect data (buffer) that can be played
568 * on a non-tethered device.
570 EHWRMHapticsMaxEffectDataSize = 14
576 enum THWRMHapticsDeviceCategory
578 EHWRMHapticsVirtual = 2,
579 EHWRMHapticsEmbedded = 3,
583 * Bitmask for effect support.
585 * To be used to analyze value returned by GetDeviceCapability().
587 enum THWRMHapticsSupportedEffectTypes
589 EHWRMHapticsSupportPeriodic = 1,
590 EHWRMHapticsSupportMagSweep = 2,
591 EHWRMHapticsSupportTimeline = 4,
592 EHWRMHapticsSupportStreaming = 8
598 enum THWRMHapticsEffectTypes
600 EHWRMHapticsTypePeriodic = 0,
601 EHWRMHapticsTypeMagSweep,
602 EHWRMHapticsTypeTimeline,
603 EHWRMHapticsTypeStreaming
607 * Bitmask for supported effect styles.
609 * To be used to analyze the value returned by GetDeviceCapability().
611 enum THWRMHapticsSupportedEffectStyles
613 EHWRMHapticsSupportSmooth = 1,
614 EHWRMHapticsSupportStrong = 2,
615 EHWRMHapticsSupportSharp = 4
621 * Used to specify Periodic or MagSweep effect style when calling
622 * PlayMagSweepEffect(),
623 * PlayPeriodicEffect(),
624 * ModifyPlayingMagSweepEffect() and
625 * ModifyPlayingPeriodicEffect().
627 enum THWRMHapticsEffectStyles
629 EHWRMHapticsStyleSmooth = 0,
630 EHWRMHapticsStyleStrong,
631 EHWRMHapticsStyleSharp
637 * To be used with GetDeviceCapability().
639 enum THWRMHapticsActuatorTypes
642 * Eccentric Rotating Mass actuator
644 EHWRMHapticsTypeERM = 0,
647 * Linear Resonant actuator
649 EHWRMHapticsTypeLRA = 2
655 * As returned in a call to GetEffectState().
657 enum THWRMHapticsEffectStates
659 EHWRMHapticsEffectNotPlaying = 0,
660 EHWRMHapticsEffectPlaying,
661 EHWRMHapticsEffectPaused
665 * Two-phased constructor.
666 * Use this method for creating a haptics instance with callbacks.
668 * @param aHapticsCallback Pointer to callback instance. Can be NULL.
669 * @param aActuatorCallback Pointer to callback instance. Can be NULL.
671 * @return A pointer to a new instance of the CHWRMHaptics class.
675 IMPORT_C static CHWRMHaptics* NewL(
676 MHWRMHapticsObserver* aHapticsCallback,
677 MHWRMHapticsActuatorObserver* aActuatorCallback );
682 * @param[out] aStatus Request status. On completion contains:
683 * KErrNone, if successful,
684 * otherwise one of the other system-wide error codes.
686 IMPORT_C static CHWRMHaptics* NewL(
687 MHWRMHapticsObserver* aHapticsCallback,
688 MHWRMHapticsActuatorObserver* aActuatorCallback,
689 TRequestStatus& aStatus );
692 * Method for opening a logical actuator for use.
694 * This method must be called before using any other methods of this class,
695 * except when using GetXXX methods.
696 * The Haptics API supports a limited number of instances of CHWRMHaptics
698 * If all instances are currently in use, the next attempt to call
699 * OpenActuatorL() from any client fails.
700 * Applications should not use more instances than necessary as this
701 * may prevent other applications from instantiating the CHWRMHaptics
704 * @param aActuator Enumeration of the type of logical actuator the client
707 * @leave TInt KErrNotSupported, if the used logical actuator is not
708 * supported by the system.
709 * @leave TInt KErrAlreadyExists, if the used logical actuator is already
711 * @leave TInt KErrInUse, if some other actuator is already opened.
712 * @leave TInt KErrArgument, if aActuator is not valid enumeration value.
714 * @see THWRMLogicalActuators for a list of usable actuators.
718 virtual void OpenActuatorL( THWRMLogicalActuators aActuator ) = 0;
721 * Method for getting a bitmask value of supported logical actuators.
723 * Developer needs to evaluate the returned bitmask against
724 * THWRMLogicalActuators enumeration values to know the
725 * supported logical actuators.
727 * @param[out] aActuators Bitmask of supported logical actuators.
729 * @return TInt KErrNone, if successful, otherwise one of the other
730 * system-wide error codes.
732 * @see THWRMLogicalActuators for a list of usable actuators.
736 virtual TInt SupportedActuators( TUint32& aActuators ) = 0;
739 * Reserves haptics feature exclusively for this client.
740 * A higher priority client may cause lower priority client reservation
741 * to be temporarily suspended. The suspended client does not get
742 * any notification about suspension. If haptics is already reserved
743 * by a higher or equal priority client, reserving still succeeds,
744 * but reservation is immediately suspended. When the reservation
745 * is suspended, playing effects do not actually cause the effects to be
747 * Note: Unless the client has instantiated the Haptics API with the status
748 * observer, it does not receive any notifications about the fact that its
749 * effects are not actually played by the physical player when the client
750 * has been suspended by a higher priority reservation.
751 * Note also that even if haptics is reserved by some client, a higher
752 * priority client succeeds in playing its effects.
754 * Calling this method is equal to call ReserveHapticsL(EFalse),
755 * i.e. CCoeEnv background/foreground status is always used
756 * to control further reservations.
758 virtual void ReserveHapticsL() = 0;
761 * Reserves haptics feature exclusively for this client.
762 * A higher priority client may cause lower priority client reservation
763 * to be temporarily suspended. The suspended client does not get
764 * any notifications about suspension. If haptics is already reserved
765 * by a higher or equal priority client, reserving still succeeds,
766 * but reservation is immediately suspended. When the reservation
767 * is suspended, playing effects does not actually cause the effects to be
769 * Note: Unless the client has instantiated the Haptics API with the status
770 * observer, it does not receive any notifications about the fact that its
771 * effects are not actually played by the physical player when the client
772 * has been suspended by a higher priority reservation.
773 * Note also that even if haptics is reserved by some client, a higher
774 * priority client succeeds in playing its effects.
776 * @param aForceNoCCoeEnv If EFalse, then reservation requires that
777 * this client has the keyboard focus at the time of
778 * reservation and haptics is automatically
779 * released and re-reserved based on the keyboard
780 * focus status of this client.
781 * This also implies that CCoeEnv::Static() != NULL
783 * If ETrue, the client does not require CCoeEnv to
784 * be present nor does it automatically reserve or
785 * release haptics by depending on the foreground or
786 * background status of the client. Only trusted
787 * clients are allowed to set this flag to ETrue.
788 * 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.
791 * @leave KErrAccessDenied Parameter aForceNoCCoeEnv is ETrue
792 * and client is not trusted.
793 * @leave KErrBadHandle Parameter aForceNoCCoeEnv is EFalse
794 * and no CCoeEnv present.
795 * @leave KErrNotReady Trying to reserve while on background and parameter
796 * aForceNoCCoeEnv is EFalse.
797 * @leave KErrNoMemory There is a memory allocation failure.
799 virtual void ReserveHapticsL( TBool aForceNoCCoeEnv ) = 0;
802 * Releases haptics feature if it was previously reserved for this client.
804 * If this client has not reserved haptics feature, does nothing.
805 * If haptics is on when it is released and no other client has a suspended
806 * reservation, haptics is stopped.
808 virtual void ReleaseHaptics() = 0;
811 * This method retrieves the current haptics status.
813 * @return THWRMHapticsStatus indicating the current haptics status
815 * @see THWRMHapticsStatus
817 virtual MHWRMHapticsObserver::THWRMHapticsStatus HapticsStatus() const=0;
820 * Sets a property of the haptics.
822 * Some properties affect all haptics instances, some only
823 * the current instance of the haptics. More about that can be found
824 * in THWRMHapticsDevicePropertyTypes.
826 * @param[in] aDevicePropertyType Property type for the
827 * property to be set.
828 * @param[in] aDevicePropertyValue Value of the property to set.
830 * @return TInt KErrNone if successful, otherwise one of the other
831 * system-wide error codes.
833 * @see THWRMHapticsDevicePropertyTypes for a list of valid property types
837 virtual TInt SetDeviceProperty( TInt aDevicePropertyType,
838 TInt aDevicePropertyValue ) = 0;
843 virtual TInt SetDeviceProperty( TInt aDevicePropertyType,
844 const TDesC8& aDevicePropertyValue ) = 0;
847 * Gets a property value of the haptics.
849 * @param[in] aDevicePropertyType Property type for the property to get.
850 * @param[out] aDevicePropertyValue Reference to the variable that
851 * receives the requested property
852 * value of the device.
854 * @return TInt KErrNone if successful, otherwise one of the other
855 * system-wide error codes.
857 * @see THWRMHapticsDevicePropertyTypes for a list of the valid property
862 virtual TInt GetDeviceProperty( TInt aDevicePropertyType,
863 TInt& aDevicePropertyValue ) = 0;
868 * @return KErrNone if successful,
869 * KErrArgument if the length of the given string is less
870 * than MaxPropertyStringLength(),
871 * otherwise one of the other system-wide error codes.
873 virtual TInt GetDeviceProperty( TInt aDevicePropertyType,
874 TDes8& aDevicePropertyValue ) = 0;
877 * Gets a capability value of the haptics.
879 * @param[in] aDeviceCapabilityType Capability type of the
881 * @param[out] aDeviceCapabilityValue Reference to the variable that
882 * receives the requested capability
883 * value of the device.
885 * @return TInt KErrNone if successful,
886 * KErrNotReady if no actuator has been opened,
887 * otherwise one of the other system-wide error codes.
889 * @see THWRMHapticsDeviceCapabilityTypes
893 virtual TInt GetDeviceCapability( TInt aDeviceCapabilityType,
894 TInt& aDeviceCapabilityValue ) = 0;
899 * @return TInt KErrNone if successful,
900 * KErrNotReady if no actuator has been opened,
901 * KErrArgument if the length of the given string is less
902 * than MaxCapabilityStringLength(),
903 * otherwise one of the other system-wide error codes.
905 virtual TInt GetDeviceCapability( TInt aDeviceCapabilityType,
906 TDes8& aDeviceCapabilityValue ) = 0;
909 * Retrieves the status of an effect (playing, not playing, paused).
911 * @param[in] aEffectHandle Handle to the effect which must have been
912 * obtained by calling
913 * PlayMagSweepEffect(),
914 * PlayPeriodicEffect(),
916 * PlayEffectRepeat() or
917 * CreateStreamingEffect()
918 * @param[out] aEffectState Pointer to the variable that receives
919 * the status bits of the effect.
921 * @return TInt KErrNone if successful, otherwise one of the other
922 * system-wide error codes.
924 * @see THWRMHapticsEffectStates for a list of valid effect states.
928 virtual TInt GetEffectState( TInt aEffectHandle, TInt& aEffectState ) = 0;
931 * Creates a streaming effect.
933 * Client calls CreateStreamingEffect() to create a new streaming
934 * effect and gets a new handle for it; it should use that effect handle
935 * to play a streaming sample by calling PlayStreamingSample().
937 * @param[out] aEffectHandle Reference to the variable that receives
938 * a handle to the streaming effect.
940 * @return TInt KErrNone if successful, otherwise one of the other
941 * system-wide error codes.
945 virtual TInt CreateStreamingEffect( TInt& aEffectHandle ) = 0;
948 * Plays a streaming sample given in the parameter defining the effect.
950 * Streaming sample can only be played after calling
951 * CreateStreamingEffect() and by using the effecthandle it returns.
953 * Synchronous method returns when the haptic command has been evaluated
954 * and the return value is valid.
956 * @param[in] aEffectHandle Handle to the streaming effect to play.
957 * @param[in] aStreamingSample Reference to streaming sample data
958 * containing the definition of
959 * the effect to play.
961 * @return TInt KErrNone if successful, otherwise one of the other
962 * system-wide error codes.
963 * @return TInt KErrInUse when haptics is reserved for a higher or
964 * equal priority client.
968 virtual TInt PlayStreamingSample( TInt aEffectHandle,
969 const TDesC8& aStreamingSample ) = 0;
973 * @param[out] aStatus Request status. On completion contains:
974 * KErrNone, if successful,
975 * KErrInUse when haptics is reserved for a higher or
976 * equal priority client,
977 * otherwise one of the other system-wide error codes.
979 virtual void PlayStreamingSample( TInt aEffectHandle,
980 const TDesC8& aStreamingSample,
981 TRequestStatus& aStatus ) = 0;
984 * Plays a streaming sample with a time offset given in the parameters
985 * defining the effect.
987 * Client calls CreateStreamingEffect() to create a new streaming
988 * effect and gets a new handle for it; it should use that effect handle
989 * to play the streaming sample with this method.
991 * Synchronous method returns when the haptic command has been evaluated
992 * and the return value is valid.
994 * @param[in] aEffectHandle Handle to the streaming effect to play.
995 * @param[in] aStreamingSample Reference to streaming sample data
996 * containing the definition of the
998 * @param[in] aOffsetTime For aOffsetTime values that are greater than 0,
999 * playback is delayed for aOffsetTime
1001 * For aOffsetTime values that are less than 0,
1002 * sample playback begins in offset time
1003 * in milliseconds into the current sample.
1005 * @return TInt KErrNone if successful, otherwise one of the other
1006 * system-wide error codes.
1007 * @return TInt KErrInUse when haptics is reserved for a higher or
1008 * equal priority client.
1012 virtual TInt PlayStreamingSampleWithOffset( TInt aEffectHandle,
1013 const TDesC8& aStreamingSample,
1014 TInt aOffsetTime ) = 0;
1019 * @param[out] aStatus Request status. On completion contains:
1020 * KErrNone, if successful,
1021 * KErrInUse when haptics is reserved for a higher or
1022 * equal priority client,
1023 * otherwise one of the other system-wide error codes.
1025 virtual void PlayStreamingSampleWithOffset( TInt aEffectHandle,
1026 const TDesC8& aStreamingSample,
1028 TRequestStatus& aStatus ) = 0;
1031 * Destroys a streaming effect previously created in a successful
1032 * call to CreateStreamingEffect().
1034 * @param[in] aEffectHandle Handle to the streaming effect to destroy.
1036 * @return TInt KErrNone if successful, otherwise one of the other
1037 * system-wide error codes.
1041 virtual TInt DestroyStreamingEffect( TInt aEffectHandle ) = 0;
1044 * Modifies a playing MagSweep effect.
1046 * Synchronous method returns when the haptic command has been evaluated
1047 * and the return value is valid.
1049 * @param[in] aEffectHandle Handle to the playing MagSweep effect
1050 * to modify. The handle to the effect must have
1051 * been obtained by calling
1052 * PlayMagSweepEffect(),
1054 * PlayEffectRepeat().
1055 * @param[in] aEffect Reference to a struct defining the effect parameters.
1057 * @return TInt KErrNone if successful, otherwise one of the other
1058 * system-wide error codes.
1060 * @see THWRMHapticsMagSweepEffect for effect definition.
1064 virtual TInt ModifyPlayingMagSweepEffect( TInt aEffectHandle,
1065 const CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect ) = 0;
1070 * @param[out] aStatus Request status. On completion contains:
1071 * KErrNone, if successful,
1072 * otherwise one of the other system-wide error codes.
1074 virtual void ModifyPlayingMagSweepEffect( TInt aEffectHandle,
1075 const CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect,
1076 TRequestStatus& aStatus ) = 0;
1079 * Modifies a playing periodic effect.
1081 * Synchronous method returns when the haptic command has been evaluated
1082 * and the return value is valid.
1084 * @param[in] aEffectHandle Handle to the playing periodic effect
1085 * to modify. The handle to the effect must have
1086 * been obtained by calling
1087 * PlayPeriodicEffect(),
1089 * PlayEffectRepeat().
1090 * @param[in] aEffect Reference to a struct defining the effect parameters.
1092 * @return TInt KErrNone if successful, otherwise one of the other
1093 * system-wide error codes.
1095 * @see THWRMHapticsPeriodicEffect for effect definition.
1099 virtual TInt ModifyPlayingPeriodicEffect( TInt aEffectHandle,
1100 const CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect ) = 0;
1105 * @param[out] aStatus Request status. On completion contains:
1106 * KErrNone, if successful,
1107 * otherwise one of the other system-wide error codes.
1109 virtual void ModifyPlayingPeriodicEffect( TInt aEffectHandle,
1110 const CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect,
1111 TRequestStatus& aStatus ) = 0;
1115 * Load effect data defined in effect data buffer (obtained e.g. from a
1116 * file containing the effect data).
1118 * @param[in] aData Reference to allocated effect data buffer.
1120 * @param[out] aFileHandle On return contains a handle to the passed
1121 * effect data. This handle is haptics specific,
1122 * i.e., it is not a file system handle but just
1123 * a handle to the loaded effect data buffer.
1125 * @return TInt KErrNone if successful, otherwise one of the other
1126 * system-wide error codes.
1127 * @return TInt KErrArgument if the effect data is invalid.
1131 virtual TInt LoadEffectData( const TDesC8& aData, TInt& aFileHandle ) = 0;
1134 * Delete loaded effect data referenced by file handle.
1136 * @param[in] aFileHandle Handle to file.
1138 * @return TInt KErrNone if successful, otherwise one of the other
1139 * system-wide error codes.
1143 virtual TInt DeleteEffectData( TInt aFileHandle ) = 0;
1146 * Delete all loaded effect datas.
1148 * @return TInt KErrNone if successful, otherwise one of the other
1149 * system-wide error codes.
1153 virtual TInt DeleteAllEffectData() = 0;
1156 * Plays an effect defined in loaded effect data buffer.
1158 * Synchronous method returns when the haptic command has been evaluated
1159 * and the return value is valid.
1161 * @param[in] aFileHandle Handle to the loaded effect data.
1163 * @param[in] aEffectIndex Index of the effect to play. The index of the
1164 * effect must be greater than or equal to 0 and
1165 * less than the number of effects returned by
1167 * @param[out] aEffectHandle Reference to the variable that receives
1168 * a handle to the playing effect.
1170 * @return TInt KErrNone if successful, otherwise one of the other
1171 * system-wide error codes.
1172 * @return TInt KErrInUse when haptics is reserved for a higher or
1173 * equal priority client.
1177 virtual TInt PlayEffect( TInt aFileHandle,
1179 TInt& aEffectHandle ) = 0;
1184 * @param[out] aStatus Request status. On completion contains:
1185 * KErrNone, if successful,
1186 * KErrInUse when haptics is reserved for a higher or
1187 * equal priority client,
1188 * otherwise one of the other system-wide error codes.
1190 virtual void PlayEffect( TInt aFileHandle,
1192 TInt& aEffectHandle,
1193 TRequestStatus& aStatus ) = 0;
1196 * Repeatedly plays a Timeline effect defined in loaded effect data buffer.
1198 * The current implementation of PlayEffectRepeat() repeats only
1199 * Timeline effects. If the given effect index refers to a simple effect,
1200 * PlayEffectRepeat() ignores the aRepeat parameter and plays the
1201 * simple effect once. In that case, PlayEffectRepeat() behaves
1202 * like PlayEffect(). PlayEffectRepeat() does not return a warning
1203 * when requested to repeat a simple effect.
1205 * Synchronous method returns when the haptic command has been evaluated
1206 * and the return value is valid.
1208 * @param[in] aFileHandle Handle to the loaded effect data.
1209 * @param[in] aEffectIndex Index of the effect to play. The index of the
1210 * effect must be greater than or equal to 0 and
1211 * less than the number of effects returned by
1213 * @param[in] aRepeat Number of times to repeat the effect. To play the
1214 * effect indefinitely, set aRepeat to
1215 * InfiniteRepeat(). To repeat the effect a
1216 * finite number of times, set aRepeat to a value from
1217 * 0 to InfiniteRepeat() - 1.
1218 * The effect can be repeated at most
1219 * InfiniteRepeat() - 1 times.
1220 * Setting aRepeat to 0 plays the effect once (repeats
1221 * the effect zero times) and is equivalent to calling
1223 * To stop the effect before it has
1224 * repeated the requested number of times or to stop
1225 * an effect that is playing indefinitely, call
1226 * StopPlayingEffect() or StopAllPlayingEffects()
1227 * @param[out] aEffectHandle Reference to the variable that receives
1228 * a handle to the playing effect.
1230 * @return TInt KErrNone if successful, otherwise one of the other
1231 * system-wide error codes.
1232 * @return TInt KErrInUse when haptics is reserved for a higher or
1233 * equal priority client.
1237 virtual TInt PlayEffectRepeat( TInt aFileHandle,
1240 TInt& aEffectHandle ) = 0;
1245 * @param[out] aStatus Request status. On completion contains:
1246 * KErrNone, if successful,
1247 * KErrInUse when haptics is reserved for a higher or
1248 * equal priority client,
1249 * otherwise one of the other system-wide error codes.
1251 virtual void PlayEffectRepeat( TInt aFileHandle,
1254 TInt& aEffectHandle,
1255 TRequestStatus& aStatus ) = 0;
1258 * Plays an effect defined in effect data buffer.
1260 * Synchronous method returns when the haptic command has been evaluated
1261 * and the return value is valid.
1263 * @param[in] aData Reference to effect data buffer containing the
1264 * definition of the effect to play.
1265 * @param[in] aEffectIndex Index of the effect to play. The index of the
1266 * effect must be greater than or equal to 0 and
1267 * less than the number of effects returned by
1269 * @param[out] aEffectHandle Reference to the variable that receives
1270 * a handle to the playing effect.
1272 * @return TInt KErrNone if successful, otherwise one of the other
1273 * system-wide error codes.
1274 * @return TInt KErrArgument if the data is invalid.
1275 * @return TInt KErrInUse when haptics is reserved for a higher or
1276 * equal priority client.
1280 virtual TInt PlayEffect( const TDesC8& aData,
1282 TInt& aEffectHandle ) = 0;
1287 * @param[out] aStatus Request status. On completion contains:
1288 * KErrNone, if successful,
1289 * KErrArgument, if the data is invalid,
1290 * KErrInUse when haptics is reserved for a higher or
1291 * equal priority client,
1292 * otherwise one of the other system-wide error codes.
1294 virtual void PlayEffect( const TDesC8& aData,
1296 TInt& aEffectHandle,
1297 TRequestStatus& aStatus ) = 0;
1300 * Repeatedly plays a Timeline effect defined in effect data buffer.
1302 * The current implementation of PlayEffectRepeat() repeats only
1303 * Timeline effects. If the given effect index refers to a simple effect,
1304 * PlayEffectRepeat() ignores the aRepeat parameter and plays the
1305 * simple effect once. In that case, PlayEffectRepeat() behaves
1306 * similarly to PlayEffect(). PlayEffectRepeat() does not return a warning
1307 * when requested to repeat a simple effect.
1309 * Synchronous method returns when the haptic command has been evaluated
1310 * and the return value is valid.
1312 * @param[in] aData Reference to effect data buffer containing the
1313 * definition of the effect to play.
1314 * @param[in] aEffectIndex Index of the effect to play. The index of the
1315 * effect must be greater than or equal to 0 and
1316 * less than the number of effects returned by
1318 * @param[in] aRepeat Number of times to repeat the effect. To play the
1319 * effect indefinitely, set aRepeat to
1320 * InfiniteRepeat(). To repeat the effect a
1321 * finite number of times, set aRepeat to a value from
1322 * 0 to InfiniteRepeat() - 1. The effect can
1323 * be repeated at most InfiniteRepeat() - 1
1325 * Setting aRepeat to 0 plays the effect once (repeats
1326 * the effect zero times) and is equivalent to calling
1328 * To stop the effect before it has
1329 * repeated the requested number of times or to stop
1330 * an effect that is playing indefinitely, call
1331 * StopPlayingEffect() or StopAllPlayingEffects()
1332 * @param[out] aEffectHandle Reference to the variable that receives
1333 * a handle to the playing effect.
1335 * @return TInt KErrNone if successful, otherwise one of the other
1336 * system-wide error codes.
1337 * @return TInt KErrArgument if the data is invalid.
1338 * @return TInt KErrInUse when haptics is reserved for a higher or
1339 * equal priority client.
1343 virtual TInt PlayEffectRepeat( const TDesC8& aData,
1346 TInt& aEffectHandle )=0;
1351 * @param[out] aStatus Request status. On completion contains:
1352 * KErrNone, if successful,
1353 * KErrArgument, if the data is invalid,
1354 * KErrInUse when haptics is reserved for a higher or
1355 * equal priority client,
1356 * otherwise one of the other system-wide error codes.
1358 virtual void PlayEffectRepeat( const TDesC8& aData,
1361 TInt& aEffectHandle,
1362 TRequestStatus& aStatus )=0;
1365 * Plays a MagSweep effect given in the parameters defining the effect.
1367 * Synchronous method returns when the haptic command has been evaluated
1368 * and the return value is valid.
1370 * @param[in] aEffect Reference to a struct defining the effect parameters.
1371 * @param[out] aEffectHandle Reference to the variable that receives
1372 * a handle to the playing effect.
1374 * @return TInt KErrNone if successful, otherwise one of the other
1375 * system-wide error codes.
1376 * @return TInt KErrInUse when haptics is reserved for a higher or
1377 * equal priority client.
1379 * @see THWRMHapticsMagSweepEffect for effect definition.
1383 virtual TInt PlayMagSweepEffect(
1384 const CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect,
1385 TInt& aEffectHandle ) = 0;
1390 * @param[out] aStatus Request status. On completion contains:
1391 * KErrNone, if successful,
1392 * KErrInUse when haptics is reserved for a higher or
1393 * equal priority client,
1394 * otherwise one of the other system-wide error codes.
1396 virtual void PlayMagSweepEffect(
1397 const CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect,
1398 TInt& aEffectHandle,
1399 TRequestStatus& aStatus ) = 0;
1402 * Plays a Periodic effect given in the parameters defining the effect.
1404 * Synchronous method returns when the haptic command has been evaluated
1405 * and the return value is valid.
1407 * @param[in] aEffect Reference to a struct defining the effect parameters.
1408 * @param[out] aEffectHandle Reference to the variable that receives
1409 * a handle to the playing effect.
1411 * @return TInt KErrNone if successful, otherwise one of the other
1412 * system-wide error codes.
1413 * @return TInt KErrInUse when haptics is reserved for a higher or
1414 * equal priority client.
1416 * @see THWRMHapticsPeriodicEffect for effect definition.
1420 virtual TInt PlayPeriodicEffect(
1421 const CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect,
1422 TInt& aEffectHandle ) = 0;
1427 * @param[out] aStatus Request status. On completion contains:
1428 * KErrNone, if successful,
1429 * KErrInUse when haptics is reserved for a higher or
1430 * equal priority client,
1431 * otherwise one of the other system-wide error codes.
1433 virtual void PlayPeriodicEffect(
1434 const CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect,
1435 TInt& aEffectHandle,
1436 TRequestStatus& aStatus ) = 0;
1439 * Pauses a playing effect.
1441 * @param[in] aEffectHandle Handle to the playing effect to pause.
1442 * The handle to the effect must have been
1443 * obtained by calling
1444 * PlayMagSweepEffect(),
1445 * PlayPeriodicEffect() ,
1447 * PlayEffectRepeat() or
1448 * CreateStreamingEffect().
1450 * @return TInt KErrNone if successful, otherwise one of the other
1451 * system-wide error codes.
1455 virtual TInt PausePlayingEffect( TInt aEffectHandle ) = 0;
1458 * Resumes playback on a paused effect from the point where
1459 * the effect was paused.
1461 * Depending on the available slots, it is possible that all simple
1462 * effects from a paused effect data buffer or streaming sample cannot
1463 * be resumed. The API returns success when it is able to play one of
1464 * these simple effects.
1466 * @param[in] aEffectHandle Handle to the paused effect to resume.
1467 * The handle to the effect must have been
1468 * obtained by calling
1469 * PlayMagSweepEffect(),
1470 * PlayPeriodicEffect(),
1472 * PlayEffectRepeat() or
1473 * CreateStreamingEffect().
1475 * @return TInt KErrNone if successful, otherwise one of the other
1476 * system-wide error codes.
1480 virtual TInt ResumePausedEffect( TInt aEffectHandle ) = 0;
1483 * Stops a playing effect.
1485 * @param[in] aEffectHandle Handle to the playing effect to stop.
1486 * The handle to the effect must have been
1487 * obtained by calling
1488 * PlayMagSweepEffect(),
1489 * PlayPeriodicEffect(),
1491 * PlayEffectRepeat() or
1492 * CreateStreamingEffect().
1494 * @return TInt KErrNone if successful, otherwise one of the other
1495 * system-wide error codes.
1499 virtual TInt StopPlayingEffect( TInt aEffectHandle ) = 0;
1502 * Stops all playing and paused effects of a haptics instance.
1504 * @return TInt KErrNone if successful, otherwise one of the other
1505 * system-wide error codes.
1509 virtual TInt StopAllPlayingEffects() = 0;
1512 * Get a number of effects defined in a loaded effect data buffer.
1514 * @param[in] aFileHandle Handle to the loaded effect data buffer.
1515 * @param[out] aCount Number of effects in the effect data buffer.
1517 * @return TInt KErrNone if successful, otherwise one of the other
1518 * system-wide error codes.
1522 virtual TInt GetEffectCount ( TInt aFileHandle,
1523 TInt& aCount ) const = 0;
1526 * Get the duration of an effect defined in a loaded effect data buffer.
1528 * @param[in] aFileHandle Handle to the loaded effect data buffer.
1529 * @param[in] aEffectIndex Effect for which the duration is wanted.
1530 * @param[out] aEffectDuration Reference to the variable that receives
1531 * the requested effect's duration value.
1532 * Duration is in milliseconds.
1534 * @return TInt KErrNone if successful, otherwise one of the other
1535 * system-wide error codes.
1538 virtual TInt GetEffectDuration ( TInt aFileHandle,
1540 TInt& aEffectDuration ) const = 0;
1543 * Gets the index of an effect defined in a loaded effect data buffer
1544 * from the name of the effect.
1546 * @param[in] aFileHandle Handle to the loaded effect data buffer.
1547 * @param[in] aEffectName Name of the effect for which the index is wanted.
1548 * @param[out] aEffectIndex Reference to the variable that receives
1549 * the requested effect's index value.
1551 * @return TInt KErrNone if successful, otherwise one of the other
1552 * system-wide error codes.
1556 virtual TInt GetEffectIndexFromName ( TInt aFileHandle,
1557 const TDesC8& aEffectName,
1558 TInt& aEffectIndex ) const = 0;
1561 * Gets the type of an effect defined in loaded effect data buffer.
1563 * @param[in] aFileHandle Handle to loaded effect data buffer.
1564 * @param[in] aEffectIndex Index of an effect for which a type is wanted.
1565 * @param[out] aEffectType Reference to the variable that receives
1566 * the requested effect's type value.
1568 * @return TInt KErrNone if successful, otherwise one of the other
1569 * system-wide error codes.
1573 virtual TInt GetEffectType( TInt aFileHandle,
1575 TInt& aEffectType ) const = 0;
1578 * Gets the name of an effect defined in a loaded effect data buffer.
1580 * @param[in] aFileHandle Handle to the loaded effect data buffer.
1581 * @param[in] aEffectIndex Index of an effect for which a name is wanted.
1582 * @param[out] aEffectName Reference to the variable that receives
1583 * the requested effect's name. Note that the
1584 * descriptor's size must be at least the size
1585 * given from MaxPropertyStringLength().
1587 * @return TInt KErrNone if successful, otherwise one of the other
1588 * system-wide error codes.
1592 virtual TInt GetEffectName( TInt aFileHandle,
1594 TDes8& aEffectName ) const = 0;
1597 * Gets the parameters of a MagSweep effect defined in a loaded effect data
1600 * @param[in] aFileHandle Handle to the loaded effect data buffer.
1601 * @param[in] aEffectIndex Index of an effect for which a definition is
1603 * @param[out] aEffect Reference to the variable that receives
1604 * the effect definition.
1606 * @return TInt KErrNone if successful, otherwise one of the other
1607 * system-wide error codes.
1609 * @see THWRMHapticsMagSweepEffect for effect definition.
1613 virtual TInt GetMagSweepEffectDefinition(
1616 CHWRMHaptics::THWRMHapticsMagSweepEffect& aEffect ) const = 0;
1619 * Gets the parameters of a periodic effect defined in a loaded effect data
1622 * @param[in] aFileHandle Handle to the loaded effect data buffer.
1623 * @param[in] aEffectIndex Index of an effect for which a definition is wanted.
1624 * @param[out] aEffect Reference to the variable that receives
1625 * the effect definition.
1627 * @return TInt KErrNone if successful, otherwise one of the other
1628 * system-wide error codes.
1630 * @see THWRMHapticsPeriodicEffect for effect definition.
1634 virtual TInt GetPeriodicEffectDefinition(
1637 CHWRMHaptics::THWRMHapticsPeriodicEffect& aEffect ) const = 0;
1640 * Gets the value that represents infinite repeats. Method may be used
1641 * only after an actuator has been opened successfully.
1643 * @return TInt Value that represents infinite repeats. KErrNotReady, if
1644 * an actuator has not been opened.
1646 virtual TInt InfiniteRepeat() const = 0;
1649 * Gets the value that represents infinite duration. Method may be used
1650 * only after an actuator has been opened successfully.
1652 * @return TInt Value that represents infinite duration. KErrNotReady, if
1653 * an actuator has not been opened.
1655 virtual TInt InfiniteDuration() const = 0;
1658 * Gets the maximum length of an effect name stored in a loaded
1659 * effect data file. Method may be used only after an actuator
1660 * has been opened successfully.
1662 * @return TInt Maximum effect name length. KErrNotReady, if
1663 * an actuator has not been opened.
1665 virtual TInt MaxEffectNameLength() const = 0;
1668 * Gets the maximum device name length. Method may be used
1669 * only after an actuator has been opened successfully.
1671 * @return TInt Maximum device name length. KErrNotReady, if
1672 * an actuator has not been opened.
1674 virtual TInt MaxDeviceNameLength() const = 0;
1677 * Gets the maximum capability string length. Method may be used
1678 * only after an actuator has been opened successfully.
1680 * @return TInt Maximum capability string length. KErrNotReady, if
1681 * an actuator has not been opened.
1683 virtual TInt MaxCapabilityStringLength() const = 0;
1686 * Gets the maximum property string length. Method may be used
1687 * only after an actuator has been opened successfully.
1689 * @return TInt Maximum property string length. KErrNotReady, if
1690 * an actuator has not been opened.
1692 virtual TInt MaxPropertyStringLength() const = 0;
1695 * Gets the maximum streaming sample size. Method may be used
1696 * only after an actuator has been opened successfully.
1698 * @return TInt Maximum streaming sample size. KErrNotReady, if
1699 * an actuator has not been opened.
1701 virtual TInt MaxStreamingSampleSize() const = 0;
1704 * Gets the default device priority. Method may be used
1705 * only after an actuator has been opened successfully.
1707 * @return TInt Default device property. KErrNotReady, if
1708 * an actuator has not been opened.
1710 virtual TInt DefaultDevicePriority() const = 0;