Back to index

lightning-sunbird  0.9+nobinonly
calIAlarmService.idl
Go to the documentation of this file.
00001 /* ***** BEGIN LICENSE BLOCK *****
00002  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00003  *
00004  * The contents of this file are subject to the Mozilla Public License Version
00005  * 1.1 (the "License"); you may not use this file except in compliance with
00006  * the License. You may obtain a copy of the License at
00007  * http://www.mozilla.org/MPL/
00008  *
00009  * Software distributed under the License is distributed on an "AS IS" basis,
00010  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00011  * for the specific language governing rights and limitations under the
00012  * License.
00013  *
00014  * The Original Code is Oracle Corporation code.
00015  *
00016  * The Initial Developer of the Original Code is Oracle Corporation
00017  * Portions created by the Initial Developer are Copyright (C) 2005
00018  * the Initial Developer. All Rights Reserved.
00019  *
00020  * Contributor(s):
00021  *   Stuart Parmenter <stuart.parmenter@oracle.com>
00022  *   Daniel Boelzle <daniel.boelzle@sun.com>
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either the GNU General Public License Version 2 or later (the "GPL"), or
00026  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #include "nsISupports.idl"
00039 
00040 interface calIItemBase;
00041 interface calICalendar;
00042 interface calIDuration;
00043 interface calITimezone;
00044 
00045 [scriptable,uuid(c9c97643-db45-4790-9441-05384ae5c272)]
00046 interface calIAlarmServiceObserver : nsISupports
00047 {
00048   /* Alarm has fired -- Bring up a dialog or play a sound */
00049   void onAlarm(in calIItemBase item);
00050 
00059   void onRemoveAlarmsByItem(in calIItemBase item);
00060 
00064   void onRemoveAlarmsByCalendar(in calICalendar calendar);
00065 };
00066 
00067 [scriptable,uuid(03669cf3-bf4f-4692-97a1-cca891964a1d)]
00068 interface calIAlarmService : nsISupports
00069 {
00074   attribute calITimezone timezone;
00075 
00085   void startup();
00086 
00087   /* add and remove observers that will be notified when an
00088      alarm has gone off.  It is up to the application to display
00089      the alarm.
00090   */
00091   void addObserver(in calIAlarmServiceObserver observer);
00092   void removeObserver(in calIAlarmServiceObserver observer);
00093 
00094   /* Call to reschedule an alarm to be notified at a later point.
00095      This _will_ modify the event's alarmTime.  It will not currently
00096      change the way the alarm time was initially computed.
00097 
00098      The alarm will instead fire at "now + duration"
00099 
00100      This will cause an event to be scheduled even if it was not
00101      previously scheduled.
00102   */
00103   void snoozeAlarm(in calIItemBase item, in calIDuration duration);
00104 
00108   void dismissAlarm(in calIItemBase item);
00109 };