ximpfw/presence/srcpresencedatamodel/presenceinfo/devicepresenceinfoimp.h
changeset 0 e6b17d312c8b
equal deleted inserted replaced
-1:000000000000 0:e6b17d312c8b
       
     1 /*
       
     2 * Copyright (c) 2006 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:  Implementation of MDevicePresenceInfo object.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CDEVICEPRESENCEINFOIMP_H
       
    19 #define CDEVICEPRESENCEINFOIMP_H
       
    20 
       
    21 #include <e32std.h>
       
    22 #include <s32strm.h>
       
    23 #include <ximpbase.h>
       
    24 #include <devicepresenceinfo.h>
       
    25 #include "ximpapidataobjbase.h"
       
    26 #include "presenceapiobjbase.h"
       
    27 
       
    28 
       
    29 class CPresenceInfoFieldCollectionImp;
       
    30 class CPresenceInfoFilterImp;
       
    31 
       
    32 /**
       
    33  * Implementation of MDevicePresenceInfo object.
       
    34  *
       
    35  * @since S60 v3.2
       
    36  */
       
    37 NONSHARABLE_CLASS( CDevicePresenceInfoImp ): public CXIMPApiDataObjBase,
       
    38                                                  public MDevicePresenceInfo
       
    39     {
       
    40     public:
       
    41 
       
    42     /** The class ID. */
       
    43     enum { KClassId = PRIMP_CLSID_CDEVICEPRESENCEINFOIMP };
       
    44 
       
    45 public:
       
    46 
       
    47     IMPORT_C static CDevicePresenceInfoImp* NewLC();
       
    48 
       
    49     virtual ~CDevicePresenceInfoImp();
       
    50 
       
    51 private:
       
    52 
       
    53     CDevicePresenceInfoImp();
       
    54     void ConstructL();
       
    55 
       
    56     /**
       
    57      * @see CXIMPApiDataObjBase
       
    58      */
       
    59     XIMPIMP_DECLARE_DATAOBJ_BASE_PRIV_METHODS
       
    60 
       
    61 
       
    62 public: // From MXIMPBase
       
    63 
       
    64     /**
       
    65      * Implementation of MXIMPBase interface methods
       
    66      * @see MXIMPBase
       
    67      */
       
    68     XIMPIMP_DECLARE_IF_BASE_METHODS
       
    69 
       
    70     /**
       
    71      * @see CXIMPApiDataObjBase
       
    72      */
       
    73     XIMPIMP_DECLARE_DATAOBJ_BASE_METHODS
       
    74 
       
    75 
       
    76 public: // New functions
       
    77 
       
    78     /**
       
    79      * Internalizes object data from given stream.
       
    80      * @param aStream Stream to read.
       
    81      */
       
    82     IMPORT_C void InternalizeL( RReadStream& aStream );
       
    83 
       
    84 
       
    85 
       
    86 public: // from MDevicePresenceInfo
       
    87 
       
    88     /**
       
    89      * @see MDevicePresenceInfo
       
    90      */
       
    91     const TPtrC8 DeviceName() const;
       
    92     void SetDeviceNameL( const TDesC8& aDeviceName );
       
    93     const MPresenceInfoFieldCollection& Fields() const;
       
    94     MPresenceInfoFieldCollection& Fields();
       
    95 
       
    96 public: // new methods
       
    97 
       
    98     /**
       
    99      * Remove from this info field implementation the fields which do not match
       
   100      * the given filter.
       
   101      * @param aFilter The filter implementation
       
   102      */
       
   103     void FilterWithL( const CPresenceInfoFilterImp& aFilter );
       
   104 
       
   105 private: // data
       
   106 
       
   107     CPresenceInfoFieldCollectionImp* iFields;
       
   108     
       
   109     RBuf8 iDeviceName;
       
   110     };
       
   111 
       
   112 
       
   113 #endif // CDEVICEPRESENCEINFOIMP_H
       
   114 
       
   115 
       
   116