1.1 --- a/epoc32/include/mw/asshdalarm.h Wed Mar 31 12:27:01 2010 +0100
1.2 +++ b/epoc32/include/mw/asshdalarm.h Wed Mar 31 12:33:34 2010 +0100
1.3 @@ -1,9 +1,9 @@
1.4 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 // All rights reserved.
1.6 // This component and the accompanying materials are made available
1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
1.8 +// under the terms of "Eclipse Public License v1.0"
1.9 // which accompanies this distribution, and is available
1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.12 //
1.13 // Initial Contributors:
1.14 // Nokia Corporation - initial contribution.
1.15 @@ -17,365 +17,439 @@
1.16 #define __ASSHDALARM_H__
1.17
1.18
1.19 -// System includes
1.20 +// System Includes
1.21 #include <e32base.h>
1.22 #include <s32strm.h>
1.23
1.24 -// User includes
1.25 +// User Includes
1.26 #include <asshddefs.h>
1.27
1.28 -///////////////////////////////////////////////////////////////////////////////////////
1.29 -// ----> TASShdAlarm (header)
1.30 -///////////////////////////////////////////////////////////////////////////////////////
1.31 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
1.32
1.33 -/** The Alarm publish and subscribe category
1.34 -@publishedPartner
1.35 -@released
1.36 -*/
1.37 +/**
1.38 + * The Alarm publish and subscribe category
1.39 + *
1.40 + * @publishedPartner
1.41 + * @released
1.42 + */
1.43 const TUid KAlarmServerPubSubCategory = { 0x101f5027 };
1.44
1.45 -/** Used for subcribing missed alarms or time zone changes
1.46 -@publishedPartner
1.47 -@released
1.48 -*/
1.49 +/**
1.50 + * Used for subcribing missed alarms or time zone changes
1.51 + * @publishedPartner
1.52 + * @released
1.53 + */
1.54 const TUint KMissingAlarmPubSubKey = 100;
1.55
1.56 -/** The publish and subscribe data for KMissingAlarmPubSubKey
1.57 -@publishedPartner
1.58 -@released
1.59 -*/
1.60 +/**
1.61 + * The publish and subscribe data for KMissingAlarmPubSubKey
1.62 + * @publishedPartner
1.63 + * @released
1.64 + */
1.65 struct TMissedAlarmPubSubData
1.66 {
1.67 - /** The value indicating the changes.
1.68 - 1 - Time zone has been changes but there are no missed alarms
1.69 - 2 - Some alarms have been missed after system time or time zone has changed.
1.70 - */
1.71 + /**
1.72 + * The value indicating the changes.
1.73 + * 1 - Time zone has been changes but there are no missed alarms
1.74 + * 2 - Some alarms have been missed after system time or time zone has changed.
1.75 + */
1.76 TUint8 iValue;
1.77
1.78 - /** The time that system time change took place, in universal (UTC) time */
1.79 + /**
1.80 + * The time that system time change took place, in universal (UTC) time
1.81 + */
1.82 TTime iTimeOfChangeUtc;
1.83 };
1.84
1.85 -/** Used for subscribing to data used when searching for instances in Calendar
1.86 -@publishedPartner
1.87 -@released
1.88 -*/
1.89 +#ifdef SYMBIAN_SKIPPED_CALENDAR_ALARMS
1.90 +/**
1.91 + * Used for subscribing to data used when searching for instances in Calendar
1.92 + * @publishedPartner
1.93 + * @released
1.94 + */
1.95 const TUint KSkippedAlarmInstancesPubSubKey = 101;
1.96
1.97 -/** The publish and subscribe data for KMissingAlarmInstancesPubSubKey
1.98 -@publishedPartner
1.99 -@released
1.100 -*/
1.101 +/**
1.102 + * The publish and subscribe data for KMissingAlarmInstancesPubSubKey
1.103 + * @publishedPartner
1.104 + * @released
1.105 + */
1.106 struct TASShdAlarmedInstanceParams
1.107 {
1.108 - /** The start of the time range in local time. */
1.109 + /**
1.110 + * The start of the time range in local time.
1.111 + */
1.112 TTime iLocalStartTime;
1.113
1.114 - /** The end of the time range in local time. */
1.115 + /**
1.116 + * The end of the time range in local time.
1.117 + */
1.118 TTime iLocalEndTime;
1.119
1.120 - /** The alarm time types to include. */
1.121 + /**
1.122 + * The alarm time types to include.
1.123 + */
1.124 TASShdAlarmTimeType iTimeType;
1.125 };
1.126
1.127 +#endif //SYMBIAN_SKIPPED_CALENDAR_ALARMS
1.128 +#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
1.129
1.130 +
1.131 +#ifdef SYMBIAN_SYSTEM_STATE_MANAGEMENT
1.132 +
1.133 +/**
1.134 + * Used for subcribing wake-up alarm set and unset notifications
1.135 + * Belonging to the KAlarmServerPubSubCategory alarm publish and subscribe category
1.136 + *
1.137 + * @publishedPartner
1.138 + * @released
1.139 + */
1.140 +const TUint KWakeupAlarmPubSubKey = 102;
1.141 +
1.142 +/**
1.143 + * Alarm server sets KWakeupAlarmPubSubKey value to EActiveWakeupAlarmSet when there is an active
1.144 + * wakeup alarm in the alarm queue otherwise sets it to EActiveNoWakeupAlarmsSet.
1.145 + * A wakeup alarm starts the device if it is powered off when the alarm expires. If
1.146 + * the device is in normal mode then it works as a clock alarm.
1.147 + * An active wakeup alarm is a wakeup alarm which has been set and has not started to alert yet.
1.148 + *
1.149 + * EActiveWakeupAlarmUninitialized is used to notify the listeners of 'KWakeupAlarmPubSubKey'
1.150 + * key that the Alarm Server has just started at the device boot time and it needs to internalize
1.151 + * Alarm Queue from backup before checking for the presence of active wake-up alarm.
1.152 + *
1.153 + * @publishedPartner
1.154 + * @released
1.155 + */
1.156 +enum TActiveWakeupAlarmStatus
1.157 + {
1.158 + EActiveWakeupAlarmUninitialized = 100,
1.159 + EActiveWakeupAlarmSet,
1.160 + EActiveNoWakeupAlarmsSet,
1.161 + };
1.162 +
1.163 +#endif
1.164 +
1.165 +/**
1.166 + * A client-side alarm object.
1.167 + *
1.168 + * It contains all of the information needed to create an alarm in the Alarm Server.
1.169 + *
1.170 + * @publishedAll
1.171 + * @released
1.172 + */
1.173 class TASShdAlarm
1.174 -/** A client-side alarm object.
1.175 -
1.176 -It contains all of the information needed to create an alarm in
1.177 -the Alarm Server.
1.178 -@publishedAll
1.179 -@released
1.180 -*/
1.181 {
1.182 -///////////////////////////////////////////////////////////////////////////////////////
1.183 -public: // CONSTRUCT
1.184 -///////////////////////////////////////////////////////////////////////////////////////
1.185 +public:
1.186
1.187 IMPORT_C TASShdAlarm();
1.188
1.189 -///////////////////////////////////////////////////////////////////////////////////////
1.190 -public: // INTERNALIZE / EXTERNALIZE
1.191 -///////////////////////////////////////////////////////////////////////////////////////
1.192 +public:
1.193
1.194 IMPORT_C void InternalizeL(RReadStream& aStream);
1.195 -
1.196 IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
1.197
1.198 -///////////////////////////////////////////////////////////////////////////////////////
1.199 -public: // READ-ONLY ACCESS
1.200 -///////////////////////////////////////////////////////////////////////////////////////
1.201 +public:
1.202 + // Read-Only Access
1.203 +
1.204 + /**
1.205 + * Returns the alarm status.
1.206 + *
1.207 + * @return Alarm status.
1.208 + */
1.209 + inline TAlarmStatus Status() const { return iStatus; }
1.210
1.211 - inline TAlarmStatus Status() const
1.212 - /** Returns the alarm status.
1.213 + /**
1.214 + * Returns the alarm state.
1.215 + *
1.216 + * @return Alarm state.
1.217 + */
1.218 + inline TAlarmState State() const { return iState; }
1.219 +
1.220 + IMPORT_C TBool HasAssociatedData() const;
1.221 + IMPORT_C TBool HasOwningSession() const;
1.222 + IMPORT_C TBool HasBecomeOrphaned() const;
1.223
1.224 - @return Alarm status. */
1.225 - { return iStatus; }
1.226 -
1.227 - inline TAlarmState State() const
1.228 - /** Returns the alarm state.
1.229 -
1.230 - @return Alarm state. */
1.231 - { return iState; }
1.232 -
1.233 - inline TBool HasAssociatedData() const;
1.234 -
1.235 - inline TBool HasOwningSession() const;
1.236 -
1.237 - inline TBool HasBecomeOrphaned() const;
1.238 -
1.239 -///////////////////////////////////////////////////////////////////////////////////////
1.240 -public: // READ-ONLY & MODIFIABLE
1.241 -///////////////////////////////////////////////////////////////////////////////////////
1.242 +public:
1.243
1.244 IMPORT_C void Reset();
1.245
1.246 - inline TAlarmId& Id()
1.247 - /** Returns a writable version of the alarm's unique identifier.
1.248 + /**
1.249 + * Returns a writable version of the alarm's unique identifier.
1.250 + *
1.251 + * @return Reference to the unique identifier.
1.252 + */
1.253 + inline TAlarmId& Id() { return iAlarmId; }
1.254 +
1.255 + /**
1.256 + * Return the alarm's unique identifier.
1.257 + *
1.258 + * @return The unique identifier.
1.259 + */
1.260 + inline TAlarmId Id() const { return iAlarmId; }
1.261 +
1.262 + /**
1.263 + * The Secure ID is only used in the secured platform
1.264 + */
1.265
1.266 - @return Reference to the unique identifier. */
1.267 - { return iAlarmId; }
1.268 + // adds a SID to the alarms private field
1.269 + inline void SetSid(const TSecureId& aSecureID) {iTASShdAlarmSID = aSecureID;}
1.270 +
1.271 + // returns the SID of the alarm's creator
1.272 + inline TSecureId GetSid() const {return iTASShdAlarmSID;}
1.273
1.274 - inline TAlarmId Id() const
1.275 - /** Return the alarm's unique identifier.
1.276 -
1.277 - @return The unique identifier. */
1.278 - { return iAlarmId; }
1.279 -
1.280 -//The Secure ID is only used in the secured platform
1.281 -
1.282 - // adds a SID to the alarms private field
1.283 - inline void SetSid(const TSecureId& aSecureID)
1.284 - {iTASShdAlarmSID = aSecureID;}
1.285 + /**
1.286 + * Returns a writable version of the next time the alarm is scheduled to expire.
1.287 + *
1.288 + * @return Next expiry time.
1.289 + */
1.290 + inline TTime& NextDueTime() { return iNextDueTime; }
1.291
1.292 - // returns the SID of the alarm's creator
1.293 - inline TSecureId GetSid() const
1.294 - {return iTASShdAlarmSID;}
1.295 + /**
1.296 + * Returns the next time that the alarm is scheduled to expire.
1.297 + *
1.298 + * @return Next expiry time.
1.299 + */
1.300 + inline const TTime& NextDueTime() const { return iNextDueTime; }
1.301
1.302 - inline TTime& NextDueTime()
1.303 - /** Returns a writable version of the next time the alarm is scheduled to expire.
1.304 -
1.305 - @return Next expiry time. */
1.306 - { return iNextDueTime; }
1.307 + /**
1.308 + * Returns a writable version of the alarm's original expiry time.
1.309 + *
1.310 + * @return Original expiry time.
1.311 + */
1.312 + inline TTime& OriginalExpiryTime() { return iOriginalExpiryTime; }
1.313
1.314 - inline const TTime& NextDueTime() const
1.315 - /** Returns the next time that the alarm is scheduled to expire.
1.316 -
1.317 - @return Next expiry time. */
1.318 - { return iNextDueTime; }
1.319 + /**
1.320 + * Returns the alarm's original expiry time.
1.321 + *
1.322 + * The original expiry time is the same as the next due time, unless the alarm
1.323 + * has been snoozed. In that case, the original expiry time is the time when
1.324 + * the alarm first expired, and the next due time is when it is to re-awaken
1.325 + * after the snooze.
1.326 + *
1.327 + * @return Original expiry time.
1.328 + */
1.329 + inline const TTime& OriginalExpiryTime() const { return iOriginalExpiryTime; }
1.330
1.331 - inline TTime& OriginalExpiryTime()
1.332 - /** Returns a writable version of the alarm's original expiry time.
1.333 -
1.334 - @return Original expiry time. */
1.335 - { return iOriginalExpiryTime; }
1.336 + /**
1.337 + * Returns a writable version of the alarm's category.
1.338 + *
1.339 + * Clients can use the category to tag each alarm with a specific code. This
1.340 + * allows clients to identify all related alarms, such as all alarms associated
1.341 + * with a particular application or application engine.
1.342 + *
1.343 + * @return Alarm category.
1.344 + */
1.345 + inline TAlarmCategory& Category() { return iCategory; }
1.346
1.347 - inline const TTime& OriginalExpiryTime() const
1.348 - /** Returns the alarm's original expiry time.
1.349 -
1.350 - The original expiry time is the same as the next due time, unless the alarm
1.351 - has been snoozed. In that case, the original expiry time is the time when
1.352 - the alarm first expired, and the next due time is when it is to re-awaken
1.353 - after the snooze.
1.354 -
1.355 - @return Original expiry time. */
1.356 - { return iOriginalExpiryTime; }
1.357 + /**
1.358 + * Return this alarm's category.
1.359 + *
1.360 + * @return Alarm category.
1.361 + */
1.362 + inline TAlarmCategory Category() const { return iCategory; }
1.363
1.364 - inline TAlarmCategory& Category()
1.365 - /** Returns a writable version of the alarm's category.
1.366 -
1.367 - Clients can use the category to tag each alarm with a specific code. This
1.368 - allows clients to identify all related alarms, such as all alarms associated
1.369 - with a particular application or application engine.
1.370 -
1.371 - @return Alarm category. */
1.372 - { return iCategory; }
1.373 + /**
1.374 + * Returns a writable version of the alarm's characteristics.
1.375 + *
1.376 + * @return Alarm characteristics bit flags.
1.377 + */
1.378 + inline TAlarmCharacteristicsFlags& Characteristics() { return iCharacteristics; }
1.379
1.380 - inline TAlarmCategory Category() const
1.381 - /** Return this alarm's category.
1.382 -
1.383 - @return Alarm category. */
1.384 - { return iCategory; }
1.385 + /**
1.386 + * Returns the alarm's characteristics
1.387 + *
1.388 + * @return Alarm characteristics bit flags.
1.389 + */
1.390 + inline TAlarmCharacteristicsFlags Characteristics() const { return iCharacteristics; }
1.391
1.392 - inline TAlarmCharacteristicsFlags& Characteristics()
1.393 - /** Returns a writable version of the alarm's characteristics.
1.394 -
1.395 - @return Alarm characteristics bit flags. */
1.396 - { return iCharacteristics; }
1.397 + /**
1.398 + * Returns a writable version of the alarm's repeat definition.
1.399 + *
1.400 + * The repeat definition controls the alarm's behaviour after it has expired.
1.401 + * For example, you can set the repeat definition so that the server automatically
1.402 + * queues the alarm to expire again in exactly 24 hours time.
1.403 + *
1.404 + * @return Alarm repeat definition.
1.405 + */
1.406 + inline TAlarmRepeatDefinition& RepeatDefinition() { return iRepeatDefinition; }
1.407
1.408 - inline TAlarmCharacteristicsFlags Characteristics() const
1.409 - /** Returns the alarm's characteristics
1.410 -
1.411 - @return Alarm characteristics bit flags. */
1.412 - { return iCharacteristics; }
1.413 + /**
1.414 + * Returns the repeat definition for the alarm.
1.415 + *
1.416 + * @return The alarm's repeat definition.
1.417 + */
1.418 + inline TAlarmRepeatDefinition RepeatDefinition() const { return iRepeatDefinition; }
1.419
1.420 - inline TAlarmRepeatDefinition& RepeatDefinition()
1.421 - /** Returns a writable version of the alarm's repeat definition.
1.422 -
1.423 - The repeat definition controls the alarm's behaviour after it has expired.
1.424 - For example, you can set the repeat definition so that the server automatically
1.425 - queues the alarm to expire again in exactly 24 hours time.
1.426 -
1.427 - @return Alarm repeat definition. */
1.428 - { return iRepeatDefinition; }
1.429 + /**
1.430 + * Returns a writable version of the alarm's message.
1.431 + *
1.432 + * The message is usually displayed in the application UI when the alarm expires.
1.433 + *
1.434 + * @return Reference to the alarm's associated message.
1.435 + */
1.436 + inline TAlarmMessage& Message() { return iMessage; }
1.437
1.438 - inline TAlarmRepeatDefinition RepeatDefinition() const
1.439 - /** Returns the repeat definition for the alarm.
1.440 -
1.441 - @return The alarm's repeat definition. */
1.442 - { return iRepeatDefinition; }
1.443 + /**
1.444 + * Returns the alarm's message.
1.445 + *
1.446 + * The message is usually displayed in the application UI when the alarm expires.
1.447 + *
1.448 + * @return Reference to the alarm's associated message.
1.449 + */
1.450 + inline const TAlarmMessage& Message() const { return iMessage; }
1.451
1.452 - inline TAlarmMessage& Message()
1.453 - /** Returns a writable version of the alarm's message.
1.454 -
1.455 - The message is usually displayed in the application UI
1.456 - when the alarm expires.
1.457 -
1.458 - @return Reference to the alarm's associated message. */
1.459 - { return iMessage; }
1.460 + /**
1.461 + * Return a writable version of the alarm sound's filename.
1.462 + *
1.463 + * @return Reference to the alarm's sound filename.
1.464 + */
1.465 + inline TAlarmSoundName& SoundName() { return iSoundName; }
1.466
1.467 - inline const TAlarmMessage& Message() const
1.468 - /** Returns the alarm's message.
1.469 -
1.470 - The message is usually displayed in the application UI when the alarm expires.
1.471 -
1.472 - @return Reference to the alarm's associated message. */
1.473 - { return iMessage; }
1.474 + /**
1.475 + * Returns the alarm's sound filename.
1.476 + *
1.477 + * @return Sound filename.
1.478 + */
1.479 + inline const TAlarmSoundName& SoundName() const { return iSoundName; }
1.480
1.481 - inline TAlarmSoundName& SoundName()
1.482 - /** Return a writable version of the alarm sound's filename.
1.483 -
1.484 - @return Reference to the alarm's sound filename. */
1.485 - { return iSoundName; }
1.486 + /**
1.487 + * Returns the alarm session type.
1.488 + *
1.489 + * @return Alarm session type.
1.490 + */
1.491 + inline TAlarmDayOrTimed DayOrTimed() const { return iDayOrTimed; }
1.492
1.493 - inline const TAlarmSoundName& SoundName() const
1.494 - /** Returns the alarm's sound filename.
1.495 -
1.496 - @return Sound filename. */
1.497 - { return iSoundName; }
1.498 -
1.499 - inline TAlarmDayOrTimed DayOrTimed() const
1.500 - /** Returns the alarm session type.
1.501 -
1.502 - @return Alarm session type. */
1.503 - { return iDayOrTimed; }
1.504 -
1.505 -
1.506 - inline TAlarmDayOrTimed& DayOrTimed()
1.507 - /** Returns a writable version of the alarm type, i.e. day, timed
1.508 -
1.509 - @return iDayOrTimed. */
1.510 - { return iDayOrTimed; }
1.511 -
1.512 + /**
1.513 + * Returns a writable version of the alarm type, i.e. day, timed
1.514 + *
1.515 + * @return iDayOrTimed.
1.516 + */
1.517 + inline TAlarmDayOrTimed& DayOrTimed() { return iDayOrTimed; }
1.518
1.519 IMPORT_C void SetUtcNextDueTime(TTime aUtcTime);
1.520 -
1.521 IMPORT_C void SetDeQueueIfDueTimeInPast();
1.522
1.523 +#ifdef SYMBIAN_SYSTEM_STATE_MANAGEMENT
1.524 + IMPORT_C void SetWakeup(TBool aEnabled);
1.525 + IMPORT_C TBool IsWakeup() const;
1.526 +#endif
1.527 +
1.528 +#ifdef SYMBIAN_ALARM_REPEAT_EXTENSIONS
1.529 IMPORT_C TInt SetAlarmDays(TUint8 aAlarmDays);
1.530 IMPORT_C TUint8 AlarmDays() const;
1.531 IMPORT_C void SetContinuous(TBool aContinuous);
1.532 IMPORT_C TBool Continuous();
1.533 +#endif
1.534
1.535 -///////////////////////////////////////////////////////////////////////////////////////
1.536 -public: // CLIENT DATA ACCESS
1.537 -///////////////////////////////////////////////////////////////////////////////////////
1.538 +public:
1.539 + // CLient Data Access
1.540
1.541 - inline TBitFlags16& ClientFlags()
1.542 - /** Returns a writable version of the alarm's client flags.
1.543 + /**
1.544 + * Returns a writable version of the alarm's client flags.
1.545 + *
1.546 + * The client flags may be used for any client-specific data - the alarm server does not use them.
1.547 + *
1.548 + * @return Reference to the alarm's bit flags.
1.549 + */
1.550 + inline TBitFlags16& ClientFlags() { return iClientFlags; }
1.551 +
1.552 + /**
1.553 + * Returns this alarm's client flags.
1.554 + *
1.555 + * @return Reference to the alarm's bit flags.
1.556 + */
1.557 + inline TBitFlags16 ClientFlags() const { return iClientFlags; }
1.558 +
1.559 + /**
1.560 + * Returns the client data from slot 1 for this alarm.
1.561 + *
1.562 + * @return The first client-specific integer.
1.563 + */
1.564 + inline TInt ClientData1() const { return iClientData1; }
1.565 +
1.566 + /**
1.567 + * Returns a writable version of the client data from slot 1 for this alarm.
1.568 + *
1.569 + * @return Reference to the first client-specific integer.
1.570 + */
1.571 + inline TInt& ClientData1() { return iClientData1; }
1.572 +
1.573 + /**
1.574 + * Returns the client data from slot 2 for this alarm.
1.575 + *
1.576 + * @return The second client-specific integer.
1.577 + */
1.578 + inline TInt ClientData2() const { return iClientData2; }
1.579 +
1.580 + /**
1.581 + * Returns the client data from slot 2 for this alarm.
1.582 + *
1.583 + * @return The second client-specific integer.
1.584 + */
1.585 + inline TInt& ClientData2() { return iClientData2; }
1.586 +
1.587
1.588 - The client flags may be used for any client-specific data -
1.589 - the alarm server does not use them.
1.590 -
1.591 - @return Reference to the alarm's bit flags. */
1.592 - { return iClientFlags; }
1.593 -
1.594 - inline TBitFlags16 ClientFlags() const
1.595 - /** Returns this alarm's client flags.
1.596 + /**
1.597 + * Tests whether the alarm is floating.
1.598 + *
1.599 + * Floating alarms expire at a given wall-clock time regardless of the
1.600 + * current locale and whether any daylight saving time rules are in force.
1.601 + *
1.602 + * @return True if the alarm is floating.
1.603 + */
1.604 + inline TBool IsFloating() const { return iCharacteristics.IsClear(EAlarmCharacteristicsIsFixed); }
1.605
1.606 - @return Reference to the alarm's bit flags. */
1.607 - { return iClientFlags; }
1.608 -
1.609 - inline TInt ClientData1() const
1.610 - /** Returns the client data from slot 1 for this alarm.
1.611 -
1.612 - @return The first client-specific integer. */
1.613 - { return iClientData1; }
1.614 -
1.615 - inline TInt& ClientData1()
1.616 - /** Returns a writable version of the client data from slot 1 for this alarm.
1.617 -
1.618 - @return Reference to the first client-specific integer. */
1.619 - { return iClientData1; }
1.620 -
1.621 - inline TInt ClientData2() const
1.622 - /** Returns the client data from slot 2 for this alarm.
1.623 -
1.624 - @return The second client-specific integer. */
1.625 - { return iClientData2; }
1.626 -
1.627 - inline TInt& ClientData2()
1.628 - /** Returns the client data from slot 2 for this alarm.
1.629 -
1.630 - @return The second client-specific integer. */
1.631 - { return iClientData2; }
1.632 -
1.633 - inline TBool IsFloating() const
1.634 - /** Tests whether the alarm is floating.
1.635 -
1.636 - Floating alarms expire at a given wall-clock time regardless of the current locale and
1.637 - whether any daylight saving time rules are in force.
1.638 -
1.639 - @return True if the alarm is floating.
1.640 - */
1.641 - { return iCharacteristics.IsClear(EAlarmCharacteristicsIsFixed); }
1.642 -
1.643 -
1.644 -
1.645 -
1.646 -
1.647 -///////////////////////////////////////////////////////////////////////////////////////
1.648 -protected: // INTERNAL FLAGS
1.649 -///////////////////////////////////////////////////////////////////////////////////////
1.650 -
1.651 +protected:
1.652 + // Internal Flags
1.653 +
1.654 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
1.655 /*
1.656 * @internalAll
1.657 */
1.658 enum TASShdAlarmFlags
1.659 {
1.660 -
1.661 - /*
1.662 - * @internalAll
1.663 + /**
1.664 + * @publishedAll
1.665 */
1.666 EASShdAlarmFlagsHasAssociatedData = 0,
1.667
1.668 - /*
1.669 - * @internalAll
1.670 + /**
1.671 + * @publishedAll
1.672 */
1.673 EASShdAlarmFlagsHasOwningSession = 1,
1.674
1.675 - /*
1.676 - * @internalAll
1.677 + /**
1.678 + * @publishedAll
1.679 */
1.680 EASShdAlarmFlagsHasBecomeOrphaned = 2,
1.681
1.682 - /*
1.683 - * @internalAll Set if alarm is disabled manually so that can not be enabled when
1.684 - * locale changes.
1.685 + /**
1.686 + * Set if alarm is disabled manually so that can not be enabled when locale changes.
1.687 + *
1.688 + * @publishedAll
1.689 */
1.690 EASShdAlarmFlagsPermanentDisabled = 4
1.691 -
1.692 };
1.693 +#endif
1.694
1.695 private:
1.696 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
1.697 +
1.698 +#ifdef SYMBIAN_SYSTEM_STATE_MANAGEMENT
1.699 /*
1.700 * @internalComponent
1.701 */
1.702 enum TASShdAlarmFlags2
1.703 {
1.704 - EASShdAlarmFlag2Wakeup = 0,
1.705 + EASShdAlarmFlag2Wakeup = 0,
1.706 };
1.707 -
1.708 +#endif
1.709 +
1.710 +#ifdef SYMBIAN_ALARM_REPEAT_EXTENSIONS
1.711 + /*
1.712 + * @internalComponent
1.713 + */
1.714 enum TASShdAlarmFlags2AlarmRepeatExtensions
1.715 {
1.716 EASShdAlarmFlag2AlarmDayMonday = 1,
1.717 @@ -387,18 +461,19 @@
1.718 EASShdAlarmFlag2AlarmDaySunday = 7,
1.719 EASShdAlarmFlag2Continuous = 8
1.720 };
1.721 +#endif
1.722 +
1.723 +#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
1.724
1.725
1.726 -///////////////////////////////////////////////////////////////////////////////////////
1.727 -protected: // MEMBER DATA
1.728 -///////////////////////////////////////////////////////////////////////////////////////
1.729 +protected:
1.730
1.731 - /*
1.732 + /**
1.733 * Various flags - used internally by the alarm object
1.734 */
1.735 TBitFlags8 iFlags;
1.736
1.737 - /*
1.738 + /**
1.739 * This represents the desired behaviour for a given alarm.
1.740 * The Alarm Server uses this information to control the
1.741 * behaviour of the alarm.
1.742 @@ -407,35 +482,35 @@
1.743 */
1.744 TAlarmCharacteristicsFlags iCharacteristics;
1.745
1.746 - /*
1.747 + /**
1.748 * The unique identifier assoicated with each alarm maintained
1.749 * by the alarm world server.
1.750 */
1.751 TAlarmId iAlarmId;
1.752
1.753 - /*
1.754 + /**
1.755 * The status of this alarm (e.g. enabled, disabled)
1.756 */
1.757 TAlarmStatus iStatus;
1.758
1.759 - /*
1.760 + /**
1.761 * The state of this alarm (e.g. queued, notifying, notified, snoozed etc)
1.762 */
1.763 TAlarmState iState;
1.764
1.765 - /*
1.766 + /**
1.767 * The type of this alarm (e.g. day, timed)
1.768 */
1.769 TAlarmDayOrTimed iDayOrTimed;
1.770
1.771 - /*
1.772 + /**
1.773 * Controls how the alarm repeats after it has expired. Note that
1.774 * session alarms are not allowed to repeat (they must be "once
1.775 * only").
1.776 */
1.777 TAlarmRepeatDefinition iRepeatDefinition;
1.778
1.779 - /*
1.780 + /**
1.781 * This UID is supplied by the client and is used to indicate
1.782 * the category that this alarm is part of. The Alarm Server
1.783 * is category-agnostic, that is, this information is for
1.784 @@ -443,7 +518,7 @@
1.785 */
1.786 TAlarmCategory iCategory;
1.787
1.788 - /*
1.789 + /**
1.790 * The date and time at which this alarm is next due. For alarms
1.791 * that haven't been snoozed, then this is the original due time.
1.792 *
1.793 @@ -452,95 +527,69 @@
1.794 */
1.795 TTime iNextDueTime;
1.796
1.797 - /*
1.798 + /**
1.799 * This attribute is only used in the instance whereby an alarm
1.800 * is snoozed. It represents the time at which the alarm first
1.801 * expired.
1.802 */
1.803 TTime iOriginalExpiryTime;
1.804
1.805 - /*
1.806 + /**
1.807 * The message associated with this alarm, typically used
1.808 * in an application UI to inform the user as to the reason
1.809 * for the alarm.
1.810 */
1.811 TAlarmMessage iMessage;
1.812
1.813 - /*
1.814 + /**
1.815 * A descriptor which holds the name of the sound file which
1.816 * should be played when the alarm expires.
1.817 */
1.818 TAlarmSoundName iSoundName;
1.819
1.820 -///////////////////////////////////////////////////////////////////////////////////////
1.821 -protected: // CLIENT SPECIFIC DATA
1.822 -///////////////////////////////////////////////////////////////////////////////////////
1.823 -
1.824 - /*
1.825 +protected:
1.826 +
1.827 + // Client Specific Data
1.828 +
1.829 + /**
1.830 * Flags for use by any particular client. These will
1.831 * only be relevant to a client who can interpret them.
1.832 */
1.833 TBitFlags16 iClientFlags;
1.834
1.835 - /*
1.836 + /**
1.837 * For arbitrary client data 1
1.838 */
1.839 TInt iClientData1;
1.840
1.841 - /*
1.842 + /**
1.843 * For arbitrary client data 2
1.844 */
1.845 TInt iClientData2;
1.846
1.847 -///////////////////////////////////////////////////////////////////////////////////////
1.848 -private: // BC PROOFING
1.849 -///////////////////////////////////////////////////////////////////////////////////////
1.850 +private:
1.851 + // Binary Compatibility Proofing
1.852 TSecureId iTASShdAlarmSID;
1.853 - /*
1.854 +
1.855 +#ifdef SYMBIAN_SYSTEM_STATE_MANAGEMENT
1.856 + /**
1.857 * Various flags - used internally by the alarm object
1.858 */
1.859 TBitFlags16 iFlags2;
1.860 TUint16 iTASShdAlarm_2;
1.861 +#else
1.862 +
1.863 +#ifdef SYMBIAN_ALARM_REPEAT_EXTENSIONS
1.864 + /**
1.865 + * Various flags - used internally by the alarm object
1.866 + */
1.867 + TBitFlags16 iFlags2;
1.868 + TUint16 iTASShdAlarm_2;
1.869 +#else
1.870 + TAny* iTASShdAlarm_2;
1.871 +#endif
1.872 +#endif
1.873 TAny* iTASShdAlarm_3;
1.874 };
1.875
1.876 -
1.877 -///////////////////////////////////////////////////////////////////////////////////////
1.878 -// ----> TASShdAlarm (inline)
1.879 -///////////////////////////////////////////////////////////////////////////////////////
1.880 -
1.881 -
1.882 -/** Tests whether the alarm has any associated data.
1.883 -
1.884 -@return True if the alarm has associated data. */
1.885 -inline TBool TASShdAlarm::HasAssociatedData() const
1.886 -
1.887 - {
1.888 - return iFlags.IsSet(EASShdAlarmFlagsHasAssociatedData);
1.889 - }
1.890 -
1.891 -
1.892 -/** Tests whether the alarm has an active owning session.
1.893 -
1.894 -@return True if the alarm has an active owning session. */
1.895 -inline TBool TASShdAlarm::HasOwningSession() const
1.896 -
1.897 - {
1.898 - return iFlags.IsSet(EASShdAlarmFlagsHasOwningSession);
1.899 - }
1.900 -
1.901 -inline TBool TASShdAlarm::HasBecomeOrphaned() const
1.902 -/** Tests whether the alarm is orphaned.
1.903 -
1.904 -An alarm is ophaned if it used to have an owning session, but no longer does.
1.905 -If an alarm is owned by a session, it is removed from the queue when the session
1.906 -disconnects. However, orphaned alarms stay in the queue.
1.907 -
1.908 -@return True if the alarm has becomed orphaned. */
1.909 - {
1.910 - return iFlags.IsSet(EASShdAlarmFlagsHasBecomeOrphaned);
1.911 - }
1.912 -
1.913 -
1.914 -
1.915 #endif // #ifndef __ASSHDALARM_H__