|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 //debug |
|
20 #include "caleninstanceid.h" |
|
21 |
|
22 #include <e32def.h> |
|
23 #include <agendaentry.h> |
|
24 |
|
25 const ulong KNullLocalUid = 0; |
|
26 const AgendaEntry::Type KNullEntryType = AgendaEntry::TypeAppoinment; |
|
27 |
|
28 |
|
29 // ----------------------------------------------------------------------------- |
|
30 // ?classname::?member_function |
|
31 // ?implementation_description |
|
32 // (other items were commented in a header). |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 inline TCalenInstanceId TCalenInstanceId::create( const AgendaEntry& entry ) |
|
36 { |
|
37 TCalenInstanceId id; |
|
38 id.mEntryLocalUid = entry.id(); |
|
39 id.mInstanceTime = entry.startTime(); |
|
40 id.mType = entry.type(); |
|
41 return id; |
|
42 } |
|
43 |
|
44 |
|
45 inline TCalenInstanceId TCalenInstanceId::create( const AgendaEntry& entry,const QDateTime& instanceTime ) |
|
46 { |
|
47 TCalenInstanceId id; |
|
48 id.mEntryLocalUid = entry.id(); |
|
49 id.mInstanceTime = instanceTime; |
|
50 id.mType = entry.type(); |
|
51 return id; |
|
52 |
|
53 } |
|
54 |
|
55 // ----------------------------------------------------------------------------- |
|
56 // TCalenInstanceId::NullInstanceIdL |
|
57 // Returns a null instance id |
|
58 // (other items were commented in a header). |
|
59 // ----------------------------------------------------------------------------- |
|
60 // |
|
61 inline TCalenInstanceId TCalenInstanceId::nullInstanceId() |
|
62 { |
|
63 return TCalenInstanceId(); |
|
64 } |
|
65 |
|
66 // ----------------------------------------------------------------------------- |
|
67 // ?classname::?member_function |
|
68 // ?implementation_description |
|
69 // (other items were commented in a header). |
|
70 // ----------------------------------------------------------------------------- |
|
71 // |
|
72 inline TCalenInstanceId::TCalenInstanceId() |
|
73 : mEntryLocalUid( KNullLocalUid ), |
|
74 mInstanceTime( QDateTime() ), |
|
75 mType( KNullEntryType ) |
|
76 { |
|
77 } |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // ?classname::?member_function |
|
81 // ?implementation_description |
|
82 // (other items were commented in a header). |
|
83 // ----------------------------------------------------------------------------- |
|
84 // |
|
85 /*inline TCalenInstanceId TCalenInstanceId::TCalenInstanceIdWithType( |
|
86 const ulong luid, |
|
87 const QDateTime& instanceTime, |
|
88 AgendaEntry::Type type ) |
|
89 { |
|
90 |
|
91 }*/ |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // ?classname::?member_function |
|
95 // ?implementation_description |
|
96 // (other items were commented in a header). |
|
97 // ----------------------------------------------------------------------------- |
|
98 // |
|
99 inline bool TCalenInstanceId::operator==( const TCalenInstanceId& aX ) const |
|
100 { |
|
101 return aX.mEntryLocalUid == mEntryLocalUid |
|
102 && aX.mInstanceTime == mInstanceTime; |
|
103 } |
|
104 |
|
105 // ----------------------------------------------------------------------------- |
|
106 // ?classname::?member_function |
|
107 // ?implementation_description |
|
108 // (other items were commented in a header). |
|
109 // ----------------------------------------------------------------------------- |
|
110 // |
|
111 inline TCalenInstanceId TCalenInstanceId::create(const ulong& luid, |
|
112 const QDateTime& instanceTime, |
|
113 bool instanceViewed) |
|
114 { |
|
115 return TCalenInstanceId( luid ,instanceTime, instanceViewed ); |
|
116 } |
|
117 |
|
118 // ----------------------------------------------------------------------------- |
|
119 // ?classname::?member_function |
|
120 // ?implementation_description |
|
121 // (other items were commented in a header). |
|
122 // ----------------------------------------------------------------------------- |
|
123 // |
|
124 inline TCalenInstanceId::TCalenInstanceId( |
|
125 const ulong& luid, |
|
126 const QDateTime& instanceTime, |
|
127 bool instanceViewed) |
|
128 : mEntryLocalUid( luid ), |
|
129 mInstanceTime( instanceTime ), |
|
130 mInstanceViewed( instanceViewed ) |
|
131 { |
|
132 } |