profilesservices/ProfileEngine/EngSrc/CProfilePresenceImpl.h
changeset 0 8c5d936e5675
child 8 f62c3a3d66b8
equal deleted inserted replaced
-1:000000000000 0:8c5d936e5675
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Profile presence settings implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CPROFILEPRESENCEIMPL_H
       
    21 #define __CPROFILEPRESENCEIMPL_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include "MProfilePresence.h"
       
    26 #include "MProfileSetPresence.h"
       
    27 
       
    28 // CONSTANTS
       
    29 // MACROS
       
    30 // DATA TYPES
       
    31 // FUNCTION PROTOTYPES
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CRepository;
       
    35 
       
    36 // CLASS DECLARATION
       
    37 
       
    38 /**
       
    39 *  Profile presence settings implementation.
       
    40 *
       
    41 *  @lib ?library
       
    42 *  @since 2.0
       
    43 */
       
    44 NONSHARABLE_CLASS(CProfilePresenceImpl) : public CBase,
       
    45                              public MProfilePresence,
       
    46                              public MProfileSetPresence
       
    47     {
       
    48     public:  // Constructors and destructor
       
    49 
       
    50         /**
       
    51         * Two-phased constructor.
       
    52         * @param aFs Ref. to file server session.
       
    53         */
       
    54         static CProfilePresenceImpl* NewL();
       
    55 
       
    56         /**
       
    57         * Two-phased constructor. Copy constructor.
       
    58         * @param aFs Ref. to file server session.
       
    59         * @param aPresence Profile presence settings.
       
    60         */
       
    61         static CProfilePresenceImpl* NewL(
       
    62             const MProfilePresence& aPresence );
       
    63 
       
    64         /**
       
    65         * Destructor.
       
    66         */
       
    67         virtual ~CProfilePresenceImpl();
       
    68 
       
    69     public: // New functions
       
    70 
       
    71         /**
       
    72         * Internalize data from the Central Repository.
       
    73         * @since 2.0
       
    74         * @param aCenRep profiles central repository
       
    75         * @param aProfileId id of the profile which is read
       
    76         */
       
    77         void InternalizeL( CRepository& aCenRep, TInt aProfileId );
       
    78 
       
    79         /**
       
    80         * Externalize data to the Central Repository.
       
    81         * @since 2.0
       
    82         * @param aCenRep profiles central repository
       
    83         * @param aProfileId id of the profile which is written
       
    84         */
       
    85         void ExternalizeL( CRepository& aCenRep, TInt aProfileId ) const;
       
    86 
       
    87     public: // Functions from base classes
       
    88 
       
    89         /**
       
    90         * From MProfilePresence.
       
    91         */
       
    92         virtual TUint32 AvailabilityAttribute() const;
       
    93 
       
    94         /**
       
    95         * From MProfilePresence.
       
    96         */
       
    97         virtual const TDesC& StatusMessage() const;
       
    98 
       
    99         /**
       
   100         * From MProfileSetPresence.
       
   101         */
       
   102         virtual void SetAvailabilityAttribute(
       
   103             const TUint32 aAvailabilityAttribute );
       
   104 
       
   105         /**
       
   106         * From MProfileSetPresence.
       
   107         */
       
   108         virtual void SetStatusMessageL( const TDesC& aStatusMessage );
       
   109 
       
   110     private:
       
   111 
       
   112         /**
       
   113         * C++ default constructor.
       
   114         * @param aFs Ref. to file server session.
       
   115         */
       
   116         CProfilePresenceImpl();
       
   117 
       
   118         /**
       
   119         * By default Symbian 2nd phase constructor is private.
       
   120         */
       
   121         void ConstructL();
       
   122 
       
   123         /**
       
   124         * By default Symbian 2nd phase constructor is private.
       
   125         * @param aPresence Presence settings.
       
   126         */
       
   127         void ConstructL( const MProfilePresence& aPresence );
       
   128 
       
   129     private:    // Data
       
   130 
       
   131         // Own: Availability attribute
       
   132         TUint32 iAvailabilityAttribute;
       
   133 
       
   134         // Own: Status message
       
   135         HBufC* iStatusMessage;
       
   136 
       
   137     };
       
   138 
       
   139 #endif      //  __CPROFILEPRESENCEIMPL_H
       
   140 
       
   141 // End of File