iaupdate/IAD/backgroundchecker/inc/iaupdatebgnotifyhandler.h
author hgs
Thu, 22 Jul 2010 14:08:51 +0300
changeset 55 ac7f90a6ff4c
permissions -rw-r--r--
201029_02
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
     1
/*
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
     3
* All rights reserved.
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
     4
* This component and the accompanying materials are made available
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
     6
* which accompanies this distribution, and is available
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
     8
*
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
     9
* Initial Contributors:
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    11
*
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    12
* Contributors:
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    13
*
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    14
* Description:   This file contains the header file of the CIAUpdateBGNotifyhandler
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    15
*                class 
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    16
*
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    17
*/
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    18
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    19
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    20
#ifndef __IAUPDATEBGNOTIFYHANDLER_H__
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    21
#define __IAUPDATEBGNOTIFYHHANDLER_H__
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    22
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    23
// INCLUDES
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    24
#include <e32base.h>
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    25
#include <e32property.h>
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    26
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    27
// FORWARD DECLARATIONS
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    28
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    29
// CLASS DECLARATIONS
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    30
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    31
/**
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    32
*  Observer
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    33
*/
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    34
class MIAUpdateBGNotifyObserver
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    35
{
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    36
public: // Observer API
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    37
    /**
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    38
    * Called by CIAUpdateBGNotifyHandler when indicator is to
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    39
    * be removed 
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    40
    */ 
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    41
    virtual void HandleIndicatorRemoveL() = 0;
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    42
};
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    43
/**
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    44
*
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    45
*/
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    46
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    47
class CIAUpdateBGNotifyHandler : public CActive
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    48
    {
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    49
public:
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    50
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    51
    /**
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    52
    * Construct a CIAUpdateBGNotifyHandler using two phase construction,
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    53
    * and return a pointer to the created object
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    54
    * @return A pointer to the created instance of CIAUpdateBGNotifyHandler
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    55
    */
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    56
    static CIAUpdateBGNotifyHandler* NewL();
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    57
    
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    58
    /**
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    59
    * Construct a CIAUpdateBGNotifyHandler using two phase construction,
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    60
    * and return a pointer to the created object
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    61
    * @return A pointer to the created instance of CIAUpdateBGNotifyHandler
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    62
    */
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    63
    static CIAUpdateBGNotifyHandler* NewLC();
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    64
    
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    65
    /**
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    66
    * Destructor
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    67
    */
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    68
    ~CIAUpdateBGNotifyHandler();
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    69
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    70
public: // new functions
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    71
    
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    72
    /**
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    73
    *
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    74
    */
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    75
    void StartListeningL( MIAUpdateBGNotifyObserver* iObserver );
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    76
    
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    77
private: // CActive
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    78
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    79
    /**
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    80
     * @see CActive::DoCancel
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    81
     */
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    82
    void DoCancel();
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    83
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    84
    /**
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    85
     * @see CActive::RunL
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    86
     */
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    87
    void RunL();
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    88
   
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    89
    /**
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    90
     * @see CActive::RunError
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    91
     */ 
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    92
    TInt RunError( TInt aError );
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    93
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    94
private:
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    95
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    96
    /**
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    97
    * C++ constructor 
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    98
    */
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
    99
    CIAUpdateBGNotifyHandler();
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   100
    
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   101
    /**
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   102
     * Perform the second phase construction of a CIAUpdateBGNotifyHandler object
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   103
     */
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   104
    void ConstructL();
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   105
    
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   106
private: //data
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   107
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   108
    RProperty iProperty;
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   109
    
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   110
    MIAUpdateBGNotifyObserver* iObserver;
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   111
    
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   112
    };
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   113
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   114
ac7f90a6ff4c 201029_02
hgs
parents:
diff changeset
   115
#endif // __IAUPDATEBGNOTIFYHANDLER_H__