Symbian3/PDK/Source/GUID-74153585-D483-5761-85B6-2CF2D2615C00.dita
author Dominic Pinkman <Dominic.Pinkman@Nokia.com>
Thu, 11 Mar 2010 18:02:22 +0000
changeset 3 46218c8b8afa
parent 1 25a17d01db0c
child 5 f345bda72bc4
permissions -rw-r--r--
week 10 bug fix submission (SF PDK version): Bug 1892, Bug 1897, Bug 1319. Also 3 or 4 documents were found to contain code blocks with SFL, which has been fixed. Partial fix for broken links, links to Forum Nokia, and the 'Symbian platform' terminology issues.

<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License 
"Eclipse Public License v1.0" which accompanies this distribution, 
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
    Nokia Corporation - initial contribution.
Contributors: 
-->
<!DOCTYPE concept
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-74153585-D483-5761-85B6-2CF2D2615C00" xml:lang="en"><title>AlarmServerExample:
Alarm Manager Console Application</title><prolog><metadata><keywords/></metadata></prolog><conbody>
<section><title>Download</title> <p>Click on the following link to download
the example: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/zips/guid-1d52da1f-d680-4a75-ba71-9e7493f9f874.zip" scope="external">AlarmServerExample.zip</xref></p><p>Click: <xref href="guid-6013a680-57f9-415b-8851-c4fa63356636/guid-1d52da1f-d680-4a75-ba71-9e7493f9f874.html" scope="peer">browse</xref> to view the example code. </p> </section>
<section><title>Description</title> <ul>
<li id="GUID-5F705048-92C8-5A73-A62F-9E79243A58B5"><p>The repeat definition
is set to <codeph>EAlarmRepeatDefintionRepeatOnce</codeph> using <xref href="GUID-8FAC10FB-BCD1-3373-9440-EF2EED70A861.dita#GUID-8FAC10FB-BCD1-3373-9440-EF2EED70A861/GUID-7F112F29-253A-346B-BB2E-F26DC414CDC9"><apiname>TASShdAlarm::RepeatDefinition()</apiname></xref>.
This enables the alarm to occur only once. </p> </li>
<li id="GUID-6302EE96-A7A7-518D-A0B0-699F35D81728"><p>The due time (expiry
time) for the floating alarm is set in local time using <xref href="GUID-8FAC10FB-BCD1-3373-9440-EF2EED70A861.dita#GUID-8FAC10FB-BCD1-3373-9440-EF2EED70A861/GUID-C8040F2A-0556-3A11-893D-84A165527451"><apiname>TASShdAlarm::NextDueTime()</apiname></xref>. </p> </li>
<li id="GUID-1179B44A-089D-5E1E-8C08-BD9E9C594E61"><p>The due time (expiry
time) for the fixed alarm is set in universal time using <xref href="GUID-8FAC10FB-BCD1-3373-9440-EF2EED70A861.dita#GUID-8FAC10FB-BCD1-3373-9440-EF2EED70A861/GUID-DE374373-265C-33DA-9E5A-1C2CA505CDA4"><apiname>TASShdAlarm::SetUtcNextDueTime()</apiname></xref>. </p> </li>
<li id="GUID-BAA57FC1-EADE-5050-A841-7250B3985FEE"><p>The floating alarm is
set to display a message on expiry using <xref href="GUID-8FAC10FB-BCD1-3373-9440-EF2EED70A861.dita#GUID-8FAC10FB-BCD1-3373-9440-EF2EED70A861/GUID-65E13A1A-A9BF-3190-A5D8-8234DBF3E9F4"><apiname>TASShdAlarm::Message()</apiname></xref>. </p> </li>
<li id="GUID-ACD39ECB-1DB6-5CEC-8607-D197A41239ED"><p>The fixed alarm is set
to play a sound on expiry using <xref href="GUID-8FAC10FB-BCD1-3373-9440-EF2EED70A861.dita#GUID-8FAC10FB-BCD1-3373-9440-EF2EED70A861/GUID-B4EC9919-0510-3486-BE2E-5964EF9C87AA"><apiname>TASShdAlarm::SoundName()</apiname></xref>,
along with displaying a message. </p> </li>
</ul> <p>The alarm is added to the server queue using <xref href="GUID-3598EAEE-0EF4-35A2-89E5-F3B2555B1AB4.dita#GUID-3598EAEE-0EF4-35A2-89E5-F3B2555B1AB4/GUID-45B0A300-B65E-3503-92AF-441DB44CD5CD"><apiname>RASCliSession::AlarmAdd()</apiname></xref> and
change event notification is requested from the server using <xref href="GUID-3598EAEE-0EF4-35A2-89E5-F3B2555B1AB4.dita#GUID-3598EAEE-0EF4-35A2-89E5-F3B2555B1AB4/GUID-83D2B497-3EFF-386D-A2C8-BC57EDE0809E"><apiname>RASCliSession::NotifyChange()</apiname></xref>. </p> <p>The
application also demonstrates how to query the server for an alarm using its
ID. The category and details of an alarm can be retrieved using <xref href="GUID-3598EAEE-0EF4-35A2-89E5-F3B2555B1AB4.dita#GUID-3598EAEE-0EF4-35A2-89E5-F3B2555B1AB4/GUID-BF0FCE06-9962-3643-A001-1CCBAC08E708"><apiname>RASCliSession::GetAlarmCategory()</apiname></xref> and <xref href="GUID-3598EAEE-0EF4-35A2-89E5-F3B2555B1AB4.dita#GUID-3598EAEE-0EF4-35A2-89E5-F3B2555B1AB4/GUID-58DBA759-B1B4-3D67-B81F-3A5F968D4147"><apiname>RASCliSession::GetAlarmDetails()</apiname></xref> respectively. Finally, the alarm is deleted from the server using <xref href="GUID-3598EAEE-0EF4-35A2-89E5-F3B2555B1AB4.dita#GUID-3598EAEE-0EF4-35A2-89E5-F3B2555B1AB4/GUID-A98D428A-609C-3A1A-9009-53D88FD5484A"><apiname>RASCliSession::AlarmDelete()</apiname></xref>. </p> </section>
<section><title>Usage</title> <p>This is a console application, which builds
an executable called <codeph>AlaramServerExample.exe</codeph> in the standard
location (<filepath>\epoc32\release\winscw\</filepath> <i>&lt;build_variant&gt;</i> for
CodeWarrior). After launching the executable, depending on the emulator you
are using, you may need to navigate from the app launcher/shell screen to
view the console. </p> </section>
<section><title>Class Summary</title><p> <xref href="GUID-3598EAEE-0EF4-35A2-89E5-F3B2555B1AB4.dita"><apiname>RASCliSession</apiname></xref> </p><p><xref href="GUID-8FAC10FB-BCD1-3373-9440-EF2EED70A861.dita"><apiname>TASShdAlarm</apiname></xref> </p></section>
</conbody><related-links>
<link href="GUID-8DF8AB3C-0408-56AD-86B1-8F963B483EAF.dita"><linktext>Alarm Server
Overview</linktext></link>
</related-links></concept>