testexecfw/stf/stffw/eventsystem/server/inc/stateevent.h
changeset 2 8bb370ba6d1d
equal deleted inserted replaced
1:bbd31066657e 2:8bb370ba6d1d
       
     1 /*
       
     2 * Copyright (c) 2010 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: 
       
    15 *
       
    16 */
       
    17 #ifndef STATEEVENT_H
       
    18 #define STATEEVENT_H
       
    19 
       
    20 // INCLUDES
       
    21 #include <e32std.h>
       
    22 #include <e32base.h>
       
    23 
       
    24 // CLASS DECLARATION
       
    25 
       
    26 
       
    27 /**
       
    28  *  CStateEvent - class representing state events 
       
    29  * 
       
    30  */
       
    31 class CStateEvent : public CBase
       
    32     {
       
    33     public:
       
    34         // Destructor.
       
    35         ~CStateEvent();
       
    36 
       
    37         // Two-phased constructor.
       
    38         static CStateEvent* NewL(const TDesC& aEventName);
       
    39 
       
    40         // Two-phased constructor.
       
    41         static CStateEvent* NewLC(const TDesC& aEventName);
       
    42         
       
    43         // Checks if event name is the same as provided in argument
       
    44         TInt IsMatchingEvent(const TDesC& aEventName);
       
    45         
       
    46         // Set flag which says that event will be unset when matching event will be released
       
    47         void NotifyToBeUnset(TBool aValue);
       
    48 
       
    49         // Returns flag which says that event will be unset when matching waiting event will be released
       
    50         bool IsToBeUnset();
       
    51         
       
    52     private:
       
    53         // Constructor for performing 1st stage construction
       
    54         CStateEvent();
       
    55 
       
    56         // Constructor for performing 2nd stage construction
       
    57         void ConstructL(const TDesC& aEventName);
       
    58         
       
    59     private:
       
    60         // Event name
       
    61         HBufC* iEventName;
       
    62         
       
    63         // Candidate to be unset as only matching event will be released
       
    64         TBool iToBeUnset;
       
    65         
       
    66     };
       
    67 
       
    68 #endif // STATEEVENT_H
       
    69 
       
    70 // EOF