|
1 /** |
|
2 * Copyright (c) 2005-2009 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 |
|
20 /** Generic*/ |
|
21 #include <e32test.h> |
|
22 #include <s32file.h> |
|
23 #include <e32std.h> |
|
24 /** File Access*/ |
|
25 #include <calsession.h> |
|
26 #include <calcategorymanager.h> |
|
27 #include <calinstanceview.h> |
|
28 #include <consolealarmalertservermain.h> |
|
29 /** Entry/Instance*/ |
|
30 #include <coreappstest/testserver.h> |
|
31 #include <calentry.h> |
|
32 #include <calentryview.h> |
|
33 #include <calrrule.h> |
|
34 #include <calprogresscallback.h> |
|
35 #include <caluser.h> |
|
36 #include <calalarm.h> |
|
37 |
|
38 _LIT(KColon, ":"); |
|
39 |
|
40 /** Constants used by the ConsoleAlarmAlertServer*/ |
|
41 #ifdef __WINS__ |
|
42 const TUid KServerUid2={0x1000008D}; |
|
43 const TUid KServerUid3={0x101F502A}; |
|
44 const TUidType serverUid(KNullUid,KServerUid2,KServerUid3); |
|
45 #endif |
|
46 |
|
47 const TInt KNumberOfEntries = 100; |
|
48 //total number of entries that must be in CITVCal.dat |
|
49 const TInt KNumberOfEntriesInCITVCal = 16; |
|
50 |
|
51 _LIT8(KGUID, "A_Global_UID"); |
|
52 _LIT (KCITFS326, "Executing Integration Tests for Section 3.2.6 in FS"); |
|
53 _LIT (KCITFS321, "Executing Integration Tests for Section 3.2.1 in FS"); |
|
54 _LIT(KComment, "//"); |
|
55 |
|
56 /** Test Agenda File*/ |
|
57 _LIT(KFileName, "C:CITFileAccess.vcs"); |
|
58 _LIT(KAgendaFile,"C:CITVCalv92.dat"); |
|
59 _LIT(KAgendaRestoreFile,"C:CITVCalv91.dat"); |
|
60 _LIT(KCalendarFile,"C:CITCal.vcs"); |
|
61 |
|
62 /** CTestCalInterimApiFileAccess */ |
|
63 _LIT(KConsoleAlarmAlertServerImg,"ConsoleAlarmAlertServer"); |
|
64 _LIT (KCreateNewAgendaFile, "Creating New Agenda file %S"); |
|
65 _LIT (KTestIfAgendaFileExists, "Testing if %S exists"); |
|
66 _LIT (KTestIfAgendaFileDoesExists, "Found %S"); |
|
67 _LIT (KTestIfAgendaFileNotExists, "ERROR -- Not Found %S"); |
|
68 _LIT (KListingAllAgendaFiles, "Listing All Agenda Files"); |
|
69 _LIT (KDeletingAgendaFile, "Deleting %S"); |
|
70 _LIT (KFileAccessError, "ERROR -- Failed To Create %S"); |
|
71 _LIT (KErrorListingAllAgendaFiles, "ERROR -- No Agenda Files Found"); |
|
72 _LIT (KFailDeletingAgendaFile, "Failed to Delete %S"); |
|
73 _LIT (KDeletedAgendaFile, "%S Has Been Deleted"); |
|
74 #define MAX_TEXT_MESSAGE 256 |
|
75 #define LARGE_TEXT_MESSAGE_UID 350 |
|
76 |
|
77 /** CTestCalInterimApiEntryData */ |
|
78 _LIT(KAddAgendaEntries,"Adding Agenda Entries"); |
|
79 _LIT(KEntriesCompleted,"Complete Entries Added = %d"); |
|
80 _LIT(KCompleted,"Completed Adding All Entries, Error=%d"); |
|
81 _LIT(KPercentComplete,"Percentage Added =%d%%"); |
|
82 _LIT (KCompareError, "ERROR -- Comparision error:- %S %S"); |
|
83 _LIT (KCompareNumberError, "ERROR -- Comparision error:- %d %d"); |
|
84 _LIT(KOrganizerCommonName, "Mr Symbian"); |
|
85 _LIT (KOpenNewAgendaFile, "Opened New Agenda file %S"); |
|
86 _LIT (KEntryType, "Adding %S"); |
|
87 #define INTERVALYEAR 365 |
|
88 #define REPEATOVERYEARS 5 |
|
89 |
|
90 /** Entry Types */ |
|
91 _LIT(KToDo,"VTODO"); |
|
92 _LIT(KEvent,"VEVENT"); |
|
93 _LIT(KReminder,"VREMINDER"); |
|
94 _LIT(KAppt,"VAPPT"); |
|
95 _LIT(KAnniv,"VANNIV"); |
|
96 _LIT(KRule,"RRULE:"); |
|
97 _LIT(KYearly,"YEARLY"); |
|
98 _LIT(KMonthly,"MONTHLY"); |
|
99 _LIT(KWeekly,"WEEKLY"); |
|
100 _LIT(KDaily,"DAILY"); |
|
101 _LIT(KNone,""); |
|
102 _LIT(KDateTime,"%d/%d/%d %d:%d:%d.%d"); |
|
103 /** Invalid data */ |
|
104 _LIT(KInvalidRole,"InvalidRole"); |
|
105 _LIT(KInvalidDueDate,"InvalidDueDate@DEF058001"); |
|
106 |
|
107 /** CTestCalInterimApiIterator */ |
|
108 _LIT(KIterateEmptyFileError,"Interating through an Empty Calendar File:- %S"); |
|
109 _LIT(KIterateEmptyFileGetNext,"Getting Next Entry from %S"); |
|
110 _LIT(KIterateEmptyFileNoEntries,"No Entries Found"); |
|
111 _LIT(KIterateEmptyFileNoEntriesError,"ERROR -- Invalid Error Returned %d"); |
|
112 _LIT(KIterateEmptyFile,"Interating through an Empty Calendar File Complete"); |
|
113 _LIT(KIterateCalFileError,"ERROR -- Please Run Test Step TestCalInterimApiEntryData First"); |
|
114 _LIT(KIterateCalFile,"Interating through %S"); |
|
115 _LIT(KIterateCalFileUid,"Entry Found with UID:- %S"); |
|
116 _LIT(KIterateCalFileInvalidEntries,"ERROR -- Entries in %S are %d, Entries Iterated %d"); |
|
117 _LIT(KIterateCalFileEntriesFound,"%d Entries found in %S"); |
|
118 |
|
119 /** CTestCalInterimApiFilter */ |
|
120 //Number of entries in CITVCal.dat, Only Modify if |
|
121 #define APPTS 1 |
|
122 #define REMINDERS 2 |
|
123 #define EVENTS 21 |
|
124 #define ANIV 1 |
|
125 #define TODO 6 |
|
126 #define ALARM 4 |
|
127 |
|
128 #define MAX_FILTER_TYPES 64 |
|
129 #define BASE2 2 |
|
130 |
|
131 _LIT(KAlarm,"Alarmed Entries"); |
|
132 _LIT(KCompleteToDo,"Completed ToDo"); |
|
133 _LIT(KInCompleteToDo,"InCompleted ToDo"); |
|
134 |
|
135 _LIT(KFilterCalFile,"Opened %S For Filtering"); |
|
136 _LIT(KFoundTypes,"Found %d"); |
|
137 _LIT(KFoundTypesError,"ERROR -- Found %d of %d %S"); |