equal
deleted
inserted
replaced
16 #include <tz.h> |
16 #include <tz.h> |
17 #include <vtzrules.h> |
17 #include <vtzrules.h> |
18 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
18 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS |
19 #include <tzusernames.h> |
19 #include <tzusernames.h> |
20 #include <tzuserdefineddata.h> |
20 #include <tzuserdefineddata.h> |
|
21 #include "OstTraceDefinitions.h" |
|
22 #ifdef OST_TRACE_COMPILER_IN_USE |
|
23 #include "timezoneuserdataTraces.h" |
|
24 #endif |
|
25 |
21 #endif |
26 #endif |
22 |
27 |
23 |
28 |
24 const TInt KMaxYear = 9999; |
29 const TInt KMaxYear = 9999; |
25 const TInt KMaxStandardName = 255; |
30 const TInt KMaxStandardName = 255; |
53 aRegionName.Length() > KMaxStandardName || |
58 aRegionName.Length() > KMaxStandardName || |
54 aShortStandardName.Length() > KMaxShortName || |
59 aShortStandardName.Length() > KMaxShortName || |
55 aShortDaylightName.Length() > KMaxShortName |
60 aShortDaylightName.Length() > KMaxShortName |
56 ) |
61 ) |
57 { |
62 { |
|
63 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_ERROR, CTZUSERNAMES_CONSTRUCTL, "CTzUserNames::ConstructL:Invalid size of the argument" ); |
|
64 |
58 User::Leave(KErrArgument); |
65 User::Leave(KErrArgument); |
59 } |
66 } |
60 |
67 |
61 iStandardName = aStandardName.AllocL(); |
68 iStandardName = aStandardName.AllocL(); |
62 iShortStandardName = aShortStandardName.AllocL(); |
69 iShortStandardName = aShortStandardName.AllocL(); |
424 */ |
431 */ |
425 EXPORT_C CTzRules* CTzUserData::ReadRulesL(const CTzId& aTzId) const |
432 EXPORT_C CTzRules* CTzUserData::ReadRulesL(const CTzId& aTzId) const |
426 { |
433 { |
427 if (!aTzId.IsUserTzId()) |
434 if (!aTzId.IsUserTzId()) |
428 { |
435 { |
|
436 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_ERROR, CTZUSERDATA_READRULESL, "CTzUserData::ReadRulesL:Invalid Time zone id" ); |
|
437 |
429 User::Leave(KErrArgument); |
438 User::Leave(KErrArgument); |
430 } |
439 } |
431 |
440 |
432 return iTzServer.GetTimeZoneRulesL(aTzId, 0, KMaxYear, ETzUtcTimeReference); |
441 return iTzServer.GetTimeZoneRulesL(aTzId, 0, KMaxYear, ETzUtcTimeReference); |
433 } |
442 } |
449 */ |
458 */ |
450 EXPORT_C CTzUserNames* CTzUserData::ReadNamesL(const CTzId& aTzId) const |
459 EXPORT_C CTzUserNames* CTzUserData::ReadNamesL(const CTzId& aTzId) const |
451 { |
460 { |
452 if (!aTzId.IsUserTzId()) |
461 if (!aTzId.IsUserTzId()) |
453 { |
462 { |
|
463 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_ERROR, CTZUSERDATA_READNAMESL, "CTzUserData::ReadNamesL;Invalid time zone id" ); |
|
464 |
454 User::Leave(KErrArgument); |
465 User::Leave(KErrArgument); |
455 } |
466 } |
456 |
467 |
457 return iTzServer.GetUserTimeZoneNamesL(aTzId); |
468 return iTzServer.GetUserTimeZoneNamesL(aTzId); |
458 } |
469 } |
479 */ |
490 */ |
480 EXPORT_C void CTzUserData::UpdateL(const CTzId& aTzId, const CTzRules& aTzUserRules, const CTzUserNames& aTzUserNames) |
491 EXPORT_C void CTzUserData::UpdateL(const CTzId& aTzId, const CTzRules& aTzUserRules, const CTzUserNames& aTzUserNames) |
481 { |
492 { |
482 if (!aTzId.IsUserTzId()) |
493 if (!aTzId.IsUserTzId()) |
483 { |
494 { |
|
495 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_ERROR, CTZUSERDATA_UPDATEL, "CTzUserData::UpdateL, Invalid time zone id" ); |
|
496 |
484 User::Leave(KErrArgument); |
497 User::Leave(KErrArgument); |
485 } |
498 } |
486 |
499 |
487 iTzServer.UpdateUserTimeZoneL(aTzId, aTzUserRules, aTzUserNames); |
500 iTzServer.UpdateUserTimeZoneL(aTzId, aTzUserRules, aTzUserNames); |
488 } |
501 } |
515 */ |
528 */ |
516 EXPORT_C void CTzUserData::DeleteL(const CTzId& aTzId) |
529 EXPORT_C void CTzUserData::DeleteL(const CTzId& aTzId) |
517 { |
530 { |
518 if (!aTzId.IsUserTzId()) |
531 if (!aTzId.IsUserTzId()) |
519 { |
532 { |
|
533 OstTraceDef0(OST_TRACE_CATEGORY_DEBUG, TRACE_ERROR, CTZUSERDATA_DELETEL, "CTzUserData::DeleteL:Invalid time zone id" ); |
|
534 |
520 User::Leave(KErrArgument); |
535 User::Leave(KErrArgument); |
521 } |
536 } |
522 |
537 |
523 iTzServer.DeleteUserTimeZoneL(aTzId); |
538 iTzServer.DeleteUserTimeZoneL(aTzId); |
524 } |
539 } |