organizer_plat/calendar_custamization_api/inc/CalenInstanceId.inl
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     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:  Inline functions for the CalenInstanceId class.
       
    15 *
       
    16 */
       
    17 
       
    18 // System includes
       
    19 #include <e32def.h>
       
    20 #include <calentry.h>
       
    21 #include <calinstance.h>
       
    22 #include <caleninstanceid.h>
       
    23 
       
    24 // Constants
       
    25 const TCalLocalUid KNullLocalUid = 0;
       
    26 const CCalEntry::TType KNullEntryType = CCalEntry::EAppt;
       
    27 
       
    28 // ----------------------------------------------------------------------------
       
    29 // TCalenInstanceId::CreateL
       
    30 // rest of the details are commented in the header
       
    31 // ----------------------------------------------------------------------------
       
    32 //
       
    33 inline TCalenInstanceId TCalenInstanceId::CreateL( const CCalInstance& aInstance )
       
    34     {
       
    35     return TCalenInstanceId( aInstance.Entry().LocalUidL(),
       
    36                              aInstance.Time().TimeLocalL(),
       
    37                              aInstance.Entry().EntryTypeL(),
       
    38                              aInstance.InstanceIdL().iCollectionId );
       
    39     }
       
    40 
       
    41 // --------------------------------------------------------------------------
       
    42 // TCalenInstanceId::CreateL
       
    43 // rest of the details are commented in the header
       
    44 // ----------------------------------------------------------------------------
       
    45 //
       
    46 inline TCalenInstanceId TCalenInstanceId::CreateL( const CCalEntry& aEntry,
       
    47 						   const TCalTime& aInstanceTime,
       
    48 						   const TCalCollectionId aColId )
       
    49     {
       
    50     return TCalenInstanceId( aEntry.LocalUidL(),
       
    51                              aInstanceTime.TimeLocalL(),
       
    52                              aEntry.EntryTypeL(), 
       
    53                              aColId );
       
    54     }
       
    55 
       
    56 // --------------------------------------------------------------------------
       
    57 // TCalenInstanceId::CreateL
       
    58 // rest of the details are commented in the header
       
    59 // ----------------------------------------------------------------------------
       
    60 //
       
    61 inline TCalenInstanceId TCalenInstanceId::CreateL( const TCalLocalUid& aLuid,
       
    62 						   const TTime& aInstanceTime,
       
    63 						   TBool aInstanceViewed,
       
    64 						   const TCalCollectionId aColId )
       
    65     {
       
    66     return TCalenInstanceId( aLuid ,aInstanceTime, aInstanceViewed, aColId );
       
    67     }
       
    68 
       
    69 
       
    70 // -----------------------------------------------------------------------
       
    71 // TCalenInstanceId::NullInstanceIdL
       
    72 // rest of the details are commented in the header
       
    73 // ----------------------------------------------------------------------------
       
    74 //
       
    75 inline TCalenInstanceId TCalenInstanceId::NullInstanceId()
       
    76     {
       
    77     return TCalenInstanceId();
       
    78     }
       
    79 
       
    80 // ------------------------------------------------------------------------
       
    81 // TCalenInstanceId::TCalenInstanceId
       
    82 // rest of the details are commented in the header
       
    83 // ----------------------------------------------------------------------------
       
    84 //
       
    85 inline TCalenInstanceId::TCalenInstanceId()
       
    86     : iEntryLocalUid( KNullLocalUid ),
       
    87       iInstanceTime( Time::NullTTime() ),
       
    88       iType( KNullEntryType ),
       
    89       iColId( -1 )
       
    90     {
       
    91     // No implemenatation yet
       
    92     }
       
    93 
       
    94 // ----------------------------------------------------------------------------
       
    95 // TCalenInstanceId::TCalenInstanceId
       
    96 // rest of the details are commented in the header
       
    97 // ----------------------------------------------------------------------------
       
    98 //
       
    99 inline TCalenInstanceId::TCalenInstanceId( const TCalLocalUid& aLuid,
       
   100 					   const TTime& aInstanceTime,
       
   101 					   CCalEntry::TType aType,
       
   102 					   const TCalCollectionId aColId ) : iEntryLocalUid( aLuid ),
       
   103 					   				     iInstanceTime( aInstanceTime ),
       
   104 									     iType( aType ),
       
   105 									     iColId( aColId )
       
   106     {
       
   107     // No implemenatation yet
       
   108     }
       
   109 
       
   110 // ----------------------------------------------------------------------------
       
   111 // TCalenInstanceId::TCalenInstanceId
       
   112 // rest of the details are commented in the header
       
   113 // ----------------------------------------------------------------------------
       
   114 //
       
   115 inline TCalenInstanceId::TCalenInstanceId( const TCalLocalUid& aLuid,
       
   116 					   const TTime& aInstanceTime,
       
   117 					   TBool aInstanceViewed,
       
   118 					   const TCalCollectionId aColId ) : iEntryLocalUid( aLuid ),
       
   119 					   				     iInstanceTime( aInstanceTime ),
       
   120 									     iInstanceViewed( aInstanceViewed ),
       
   121 									     iColId( aColId )
       
   122     {
       
   123     // No implemenatation yet
       
   124     }
       
   125 
       
   126 // ----------------------------------------------------------------------------
       
   127 // TCalenInstanceId::operator==
       
   128 // rest of the details are commented in the header
       
   129 // ----------------------------------------------------------------------------
       
   130 //
       
   131 inline TBool TCalenInstanceId::operator==( const TCalenInstanceId& aX ) const
       
   132     {
       
   133     return aX.iEntryLocalUid == iEntryLocalUid
       
   134         && aX.iInstanceTime == iInstanceTime
       
   135         && aX.iColId == iColId;
       
   136     }
       
   137 
       
   138 // End of file