PECengine/AttributeLibrary2/SrcAttributeBase/CPEngPresenceAttrModelStorageProxy.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Presence attribute store proxy.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CPENGPRESENCEATTRMODELSTORAGEPROXY_H
       
    19 #define CPENGPRESENCEATTRMODELSTORAGEPROXY_H
       
    20 
       
    21 //  INCLUDES
       
    22 #include "MPEngPresenceAttrManager.h"
       
    23 #include <E32Base.h>
       
    24 
       
    25 
       
    26 //FORWARD DECLARATIONS
       
    27 class CPEngPresenceAttrModel;
       
    28 class CPEngModelStoreEntryAdapter;
       
    29 class MPEngStorageManager;
       
    30 
       
    31 
       
    32 
       
    33 // CLASS DECLARATION
       
    34 /**
       
    35  * Presence Storage support
       
    36  *
       
    37  * @since 3.0
       
    38  */
       
    39 NONSHARABLE_CLASS( CPEngPresenceAttrModelStorageProxy ) : public CBase
       
    40     {
       
    41 public:  // Constructors and destructor
       
    42 
       
    43     /**
       
    44      * Two-phased constructor.
       
    45      */
       
    46     static CPEngPresenceAttrModelStorageProxy* NewL( CPEngPresenceAttrModel& aAttributeModel );
       
    47 
       
    48 
       
    49     /**
       
    50      * Destructor.
       
    51      */
       
    52     virtual ~CPEngPresenceAttrModelStorageProxy();
       
    53 
       
    54 
       
    55 private: // Constructors.
       
    56 
       
    57     /**
       
    58      * C++ default constructor.
       
    59      */
       
    60     CPEngPresenceAttrModelStorageProxy( CPEngPresenceAttrModel& aAttributeModel );
       
    61 
       
    62 
       
    63 
       
    64 public: // Presence Storage.
       
    65 
       
    66     void ConnectStorageL( TBool aUserModel,
       
    67                           HBufC* aStoreId,
       
    68                           MPEngStorageManager& aStorageManager );
       
    69 
       
    70 
       
    71     TInt RetrieveFromStorageL();
       
    72     void StoreToStorageL( TBool aForceStore = EFalse ) const;
       
    73     void RemoveFromStorageL();
       
    74     TBool IsFromThisStorage( const MPEngStorageManager& aStorageManager ) const;
       
    75 
       
    76 
       
    77     void GainEditLockL( TBool aCreationAllowed );
       
    78     TInt StopEditSupport();
       
    79     TBool IsEditLocked() const;
       
    80     void ForceSendAttrEventIfNeededL() const;
       
    81 
       
    82 
       
    83 
       
    84 private:    // Data
       
    85 
       
    86     //REF: The attribute model to store
       
    87     CPEngPresenceAttrModel&     iAttributeModel;
       
    88 
       
    89     //OWN: Store entry adapter. Lazy initalized
       
    90     CPEngModelStoreEntryAdapter*    iStoreEntry;
       
    91 
       
    92     //OWN: Does storage proxy instance own the edit lock?
       
    93     TBool   iEditLockOwned;
       
    94 
       
    95     //OWN: Is force notification needed?
       
    96     TBool   iForceNotifySidChange;
       
    97 
       
    98     };
       
    99 
       
   100 
       
   101 
       
   102 #endif      // CPENGPRESENCEATTRMODELSTORAGEPROXY_H
       
   103 
       
   104 // End of File