eventsui/eventsutils/inc/evtinfonoteparams.h
branchRCL_3
changeset 17 1fc85118c3ae
parent 16 8173571d354e
child 18 870918037e16
equal deleted inserted replaced
16:8173571d354e 17:1fc85118c3ae
     1 /*
       
     2 * Copyright (c) 2008 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:  Exchange parameters for exchange between the Events UI server
       
    15 *                Event Info Note pop-up
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef C_EVTINFONOTEPARAMS_H
       
    21 #define C_EVTINFONOTEPARAMS_H
       
    22 
       
    23 // System Includes
       
    24 #include <e32base.h>
       
    25 #include <s32strm.h>
       
    26 
       
    27 // User Includes
       
    28 
       
    29 // Forward Declarations
       
    30 
       
    31 /**
       
    32  * Input paramters for Events UI info note display
       
    33  *
       
    34  * This class provides the Internalize and Externalize functionalities
       
    35  * for the input parameters in Events UI info display. The parameters
       
    36  * currently contain
       
    37  * 1. The Name of the trigger
       
    38  * 2. Detailed description of the trigger
       
    39  * 3. Trigerring accuracy
       
    40  * 4. Tone String
       
    41  * 5. Tone Repeat Flag
       
    42  * 6. Tone Enable Flag
       
    43  * 7. Snooze Flag
       
    44  *
       
    45  * @since S60 v9.1
       
    46  */
       
    47 class CEvtInfoNoteInputParam : public CBase
       
    48     {
       
    49 public:
       
    50     /**
       
    51      * Enumeration to define the accuracy of the fired triggers
       
    52      * @since S60 v9.1      
       
    53      */
       
    54     enum TEvtTriggerAccuracy
       
    55         {
       
    56         /**
       
    57          * Enum value for an accurate trigger
       
    58          */
       
    59         EEvtAccurateTrigger = 0,
       
    60          
       
    61         /**
       
    62          * Enum value for an inaccurate trigger
       
    63          */
       
    64         EEvtInaccurateTrigger, 
       
    65         /**
       
    66          * Enum value for a heavily inaccurate trigger
       
    67          */
       
    68         EEvtHighlyInaccurateTrigger
       
    69         };
       
    70         	
       
    71 public:
       
    72     /**
       
    73      * Static two phase constructor
       
    74      * @since S60 v9.1      
       
    75      */
       
    76     IMPORT_C static CEvtInfoNoteInputParam* NewL();
       
    77     
       
    78     /**
       
    79      * Destructor.
       
    80      * @since S60 v9.1     
       
    81      */
       
    82     virtual ~CEvtInfoNoteInputParam();
       
    83     
       
    84     /**
       
    85      * Retrieves the subject/name field for the trigger.
       
    86      *
       
    87      * @since S60 v9.1     
       
    88      * @return, The subject/name of the trigger
       
    89      */      
       
    90     IMPORT_C TPtrC Subject() const;
       
    91     
       
    92     /**
       
    93      * Sets the subject/name field for the trigger.
       
    94      *
       
    95      * @since S60 v5.0     
       
    96      * @param aSubject The subject/name of the trigger.
       
    97      */     
       
    98     IMPORT_C void SetSubjectL( const TDesC&  aSubject );    
       
    99 
       
   100     /**
       
   101      * Retrieves the Description field for the trigger.
       
   102      *
       
   103      * @since S60 v9.1     
       
   104      * @return, The Description of the trigger
       
   105      */      
       
   106     IMPORT_C TPtrC Description() const;
       
   107     
       
   108     /**
       
   109      * Sets the Description field for the trigger.
       
   110      *
       
   111      * @since S60 v9.1    
       
   112      * @param aDescripion The Description of the trigger.
       
   113      */     
       
   114     IMPORT_C void SetDescriptionL( const TDesC&  aDescription );
       
   115     
       
   116      /**
       
   117      * The accuracy with which the trigger has been fired.
       
   118      *
       
   119      * @since S60 v9.1     
       
   120      * @return Triggering Accuracy      
       
   121      */
       
   122     IMPORT_C TEvtTriggerAccuracy TrigerringAccuracy() const;
       
   123 
       
   124     /** 
       
   125      * Sets the Mode in which the Location Application would be launched.
       
   126      *
       
   127      * @since S60 v9.1    
       
   128      * @param[in] aAccuracy Triggering Accuracy
       
   129      */
       
   130     IMPORT_C void SetTrigerringAccuracy( TEvtTriggerAccuracy  aAccuracy );
       
   131         
       
   132     /**
       
   133      * Externalizes the contents of this Array into a buffer.
       
   134      *
       
   135      * @since S60 v5.0
       
   136      * @param aWriteStream  Buffer onto which the contents of this structure
       
   137      *                      would be externalized.
       
   138      */
       
   139     IMPORT_C void ExternalizeL( RWriteStream&   aWriteStream );
       
   140    
       
   141     /**
       
   142      * Internalized the contents of the buffer into this array.
       
   143      * 
       
   144      * @since S60 v5.0
       
   145      * @param aReadStream   Buffer from which the contents of this
       
   146      *                      structures would be populated.
       
   147      */
       
   148     IMPORT_C void InternalizeL( RReadStream&    aReadStream );
       
   149     
       
   150     /**
       
   151      * Retrieves the Tone field for the trigger.
       
   152      *
       
   153      * @since S60 v9.1     
       
   154      * @return, The Tone of the trigger
       
   155      */      
       
   156     IMPORT_C TPtrC Tone() const;
       
   157     
       
   158     /**
       
   159      * Sets the Tone field for the trigger.
       
   160      *
       
   161      * @since S60 v9.1    
       
   162      * @param aDescripion The Tone of the trigger.
       
   163      */     
       
   164     IMPORT_C void SetToneL( const TDesC&  aDescription );
       
   165     
       
   166     /**
       
   167      * Tone Repeatition 
       
   168      *
       
   169      * @since S60 v9.1     
       
   170      * @return Boolean value to indicate whether tone is to be repeated
       
   171      */
       
   172     IMPORT_C TBool  ToneRepeat() const;
       
   173 
       
   174     /** 
       
   175      * Tone Repeatition 
       
   176      *
       
   177      * @since S60 v9.1    
       
   178      * @param[in] aRepeat Boolean value to indicate whether tone is to be repeated
       
   179      */
       
   180     IMPORT_C void SetToneRepeat( TBool  aRepeat );      
       
   181     
       
   182     /**
       
   183      * Tone Enabled 
       
   184      *
       
   185      * @since S60 v9.1     
       
   186      * @return Boolean value to indicate whether tone is enabled
       
   187      */
       
   188     IMPORT_C TBool  ToneEnabled() const;
       
   189 
       
   190     /** 
       
   191      * Tone Enabled 
       
   192      *
       
   193      * @since S60 v9.1    
       
   194      * @param[in] aRepeat Boolean value to indicate whether tone is enabled
       
   195      */
       
   196     IMPORT_C void SetToneEnabled( TBool  aRepeat );   
       
   197     
       
   198     /**
       
   199      * Show Snooze 
       
   200      *
       
   201      * @since S60 v9.1     
       
   202      * @return Boolean value to indicate whether snooze is shown
       
   203      */
       
   204     IMPORT_C TBool  ShowSnooze() const;
       
   205 
       
   206     /** 
       
   207      * Show Snooze 
       
   208      *
       
   209      * @since S60 v9.1    
       
   210      * @param[in] aSnooze Boolean value to indicate whether snooze is shown
       
   211      */
       
   212     IMPORT_C void SetShowSnooze( TBool  aSnooze );   
       
   213     	                
       
   214 protected:
       
   215     /**
       
   216      * C++ constructor made protected for this class must not be instantiated
       
   217      * directly
       
   218      */
       
   219     CEvtInfoNoteInputParam();
       
   220     
       
   221     /**
       
   222      * Second phase of the two phase constructor
       
   223      */
       
   224     void ConstructL();
       
   225             
       
   226 private:  // Data members
       
   227     /**
       
   228      * Buffer which holds the Subject/Name field of the trigger
       
   229      * Owns
       
   230      */
       
   231     HBufC*                      iSubject;
       
   232     
       
   233     /**
       
   234      * Buffer which holds the Description field of the trigger
       
   235      * Owns
       
   236      */
       
   237     HBufC*                      iDescription;
       
   238     
       
   239     /**
       
   240      * Tone field for the trigger. If there is expectation that no tone
       
   241      * must be played, then this can be left empty
       
   242      */
       
   243     HBufC*                      iTone;
       
   244     
       
   245     /**
       
   246      * Boolean value to denote whether the tone is to be repeated.
       
   247      */
       
   248     TBool                       iToneRepeat;
       
   249     
       
   250     /**
       
   251      * Boolean value to denote whether the tone is enabled.
       
   252      */
       
   253     TBool                       iToneEnabled;
       
   254     
       
   255     /**
       
   256      * Enum value for the Trigger accuracy
       
   257      */
       
   258     TEvtTriggerAccuracy         iAccuracy;
       
   259     
       
   260     /**
       
   261      * Boolean value to show Snooze.
       
   262      */
       
   263     TBool                       iShowSnooze;
       
   264     };
       
   265 
       
   266 #endif // C_EVTINFONOTEPARAMS_H