hapticsservices_plat/tacticon_api/inc/tacticon.h
changeset 0 d54f32e146dd
equal deleted inserted replaced
-1:000000000000 0:d54f32e146dd
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 * 
       
    14 * Description: Client interface for using Tacticon server.
       
    15 * Part of:     Tacticon Server
       
    16 */
       
    17 
       
    18 #ifndef R_TACTICON_H
       
    19 #define R_TACTICON_H
       
    20 
       
    21 // INCLUDES
       
    22 #include <e32base.h>
       
    23 #include <tacticon.hrh>
       
    24 
       
    25 /**
       
    26 *  Client interface to tacticon server.
       
    27 *  @lib tacticon.lib
       
    28 *  @since S60 5.2
       
    29 */
       
    30 class RTacticon : public RSessionBase
       
    31     {
       
    32 public:
       
    33 
       
    34     /**
       
    35      * C++ default constructor.
       
    36      * @since S60 5.2   
       
    37      */
       
    38     IMPORT_C RTacticon();
       
    39     
       
    40     /**
       
    41      * Creates connection to tacticon server.
       
    42      * @since S60 5.2
       
    43      * @return KErrNone if successful, or one of standard Symbian OS
       
    44      *         error codes if creating connection fails.
       
    45      */
       
    46     IMPORT_C TInt Connect();
       
    47     
       
    48     /**
       
    49      * Closes connection to tacticon server.
       
    50      * @since S60 5.2
       
    51      */
       
    52     IMPORT_C void Close();
       
    53     
       
    54 public:
       
    55     /**
       
    56      * Plays tacticon according to a given tacticon type.
       
    57      *
       
    58      * @since S60 5.2
       
    59      * @param aTacticonType - Logical tacticon type.       
       
    60      */
       
    61     IMPORT_C void PlayTacticon( TTacticonType aTacticonType );
       
    62     
       
    63     
       
    64     /**
       
    65      * Stops playing current tacticon
       
    66      *
       
    67      * @since S60 5.2
       
    68      */    
       
    69     IMPORT_C void StopTacticon();       
       
    70     
       
    71     /**
       
    72      * Sets tacticon playback enabled/disabled.
       
    73      * Client must have Write Device Data capability to use this function.
       
    74      * 
       
    75      * @since S60 5.2
       
    76      * @param aEnabled - ETrue sets tacticon playback enabled.
       
    77      *                 - EFalse sets tacticon playback disabled.
       
    78      * @return KErrNone if succesful, or one of standard Symbian OS
       
    79      *         error codes.
       
    80      *         KErrPermissionDenied if client does not have required 
       
    81      *         capability.
       
    82      */        
       
    83     IMPORT_C TInt EnableTacticons( TBool aEnabled );
       
    84     
       
    85     /**
       
    86      * Returns boolean value whether tacticons are enabled or disabled.
       
    87      * 
       
    88      * @since S60 5.2
       
    89      * @return ETrue if tacticons are enabled, EFalse if disabled.  
       
    90      */            
       
    91     IMPORT_C TBool TacticonsEnabled();
       
    92 
       
    93 private:
       
    94     /*
       
    95      * @return Version of Tacticon Server.
       
    96      */
       
    97     TVersion Version() const;   
       
    98 
       
    99     };
       
   100     
       
   101 #endif // R_TACTICON_H
       
   102 
       
   103 //End of File
       
   104