presencecache/presencecachesymbian/presencecacheserver2/inc/presencecacheexpiry.h
changeset 40 b46a585f6909
equal deleted inserted replaced
37:fd64c38c277d 40:b46a585f6909
       
     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:  
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CPRESENCECACHEEXPIRY_H
       
    20 #define CPRESENCECACHEEXPIRY_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 class CPresenceCacheServer;
       
    26 class CPresenceCacheBuddyStore;
       
    27 
       
    28 // CLASS DECLARATION
       
    29 /**
       
    30 * 
       
    31 *  @lib N/A
       
    32 *  @since 9.2
       
    33 */
       
    34 class CPresenceCacheExpiry : public CBase
       
    35     {
       
    36     public:  // Constructors and destructor
       
    37 
       
    38         /**
       
    39         * Two-phased constructor.
       
    40         */
       
    41         static CPresenceCacheExpiry* NewL(
       
    42                 CPresenceCacheServer& aServer );
       
    43 
       
    44         /**
       
    45         * Destructor.
       
    46         */
       
    47         virtual ~CPresenceCacheExpiry();
       
    48         
       
    49     public:  // New functions
       
    50         /**
       
    51          * Start expiry check if not ongoing
       
    52          * Non-blocking function
       
    53          */
       
    54         inline void Start();
       
    55 
       
    56     private:  // New functions
       
    57         static TInt ExpiryCheck(TAny *aPtr);
       
    58         void DoExpiryCheckL();
       
    59         void NotifySubscribersL( 
       
    60                 CPresenceCacheBuddyStore& aBuddyStore );
       
    61         
       
    62     private:
       
    63 
       
    64         /**
       
    65         * C++ default constructor.
       
    66         */
       
    67         inline CPresenceCacheExpiry( CPresenceCacheServer& aServer );
       
    68 
       
    69     private:    // Data
       
    70         CAsyncCallBack iAsyncCallBack;
       
    71         CPresenceCacheServer& iServer;
       
    72     };
       
    73 
       
    74 inline void CPresenceCacheExpiry::Start()
       
    75     {
       
    76     iAsyncCallBack.CallBack();
       
    77     }
       
    78 
       
    79 
       
    80 #endif      // CPRESENCECACHEEXPIRY_H
       
    81 
       
    82 // End of File