Main Page | Data Structures | File List | Data Fields | Globals

rpc-retutime.c File Reference

#include <unistd.h>
#include <glib/gstrfuncs.h>
#include <glib/gspawn.h>
#include <glib/gmem.h>
#include <time.h>
#include "rpc-retutime.h"
#include <stdio.h>

Include dependency graph for rpc-retutime.c:

Go to the source code of this file.

Defines

#define RETUTIME_TIME_FORMAT   "%Y-%m-%d/%H:%M:%S"
 This file is part of alarmd.
#define RETUTIME_DISABLE   "0000-00-00/00:00:00"
#define RETUTIME_CMD   "/usr/sbin/chroot /mnt/initfs /usr/bin/retutime "
#define USER_RETUTIME_CMD   "sudo " RETUTIME_CMD
#define RETUTIME_SET_ALARM   "-A "
#define RETUTIME_ACK_ALARM   "-S "
#define RETUTIME_QRY_ALARM   "-s "

Functions

static gint _retutime_do (const gchar *operation, const gchar *argument, gchar **output)
gboolean retutime_set_alarm_time (time_t alarm_time)
 retutime_set_alarm_time: : The alarm time to set to the retu chip.
gboolean retutime_disable_alarm (void)
 retutime_disable_alarm:
gboolean retutime_ack_alarm (void)
 retutime_ack_alarm:
gboolean retutime_query_alarm (void)
 retutime_query_alarm:


Define Documentation

#define RETUTIME_ACK_ALARM   "-S "
 

Definition at line 38 of file rpc-retutime.c.

Referenced by retutime_ack_alarm().

#define RETUTIME_CMD   "/usr/sbin/chroot /mnt/initfs /usr/bin/retutime "
 

Definition at line 34 of file rpc-retutime.c.

Referenced by _retutime_do().

#define RETUTIME_DISABLE   "0000-00-00/00:00:00"
 

Definition at line 33 of file rpc-retutime.c.

Referenced by retutime_disable_alarm().

#define RETUTIME_QRY_ALARM   "-s "
 

Definition at line 39 of file rpc-retutime.c.

Referenced by retutime_query_alarm().

#define RETUTIME_SET_ALARM   "-A "
 

Definition at line 37 of file rpc-retutime.c.

Referenced by retutime_disable_alarm(), and retutime_set_alarm_time().

#define RETUTIME_TIME_FORMAT   "%Y-%m-%d/%H:%M:%S"
 

This file is part of alarmd.

Contact Person: David Weinehall <david.weinehall@nokia.com>

Copyright (C) 2006 Nokia Corporation alarmd and libalarm are free software; you can redistribute them and/or modify them under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation.

alarmd and libalarm are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this software; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Definition at line 32 of file rpc-retutime.c.

Referenced by retutime_set_alarm_time().

#define USER_RETUTIME_CMD   "sudo " RETUTIME_CMD
 

Definition at line 35 of file rpc-retutime.c.

Referenced by _retutime_do().


Function Documentation

static gint _retutime_do const gchar *  operation,
const gchar *  argument,
gchar **  output
[static]
 

Definition at line 41 of file rpc-retutime.c.

References RETUTIME_CMD, and USER_RETUTIME_CMD.

Referenced by retutime_ack_alarm(), retutime_disable_alarm(), retutime_query_alarm(), and retutime_set_alarm_time().

gboolean retutime_ack_alarm void   ) 
 

retutime_ack_alarm:

Resets the "alarm launched" flag on the retu chip. Returns: TRUE on success, FALSE on failure.

Definition at line 91 of file rpc-retutime.c.

References _retutime_do(), and RETUTIME_ACK_ALARM.

Referenced by _retu_event_fire().

gboolean retutime_disable_alarm void   ) 
 

retutime_disable_alarm:

Disables the alarm on the retu rtc chip. Returns: TRUE on success, FALSE on failure.

Definition at line 80 of file rpc-retutime.c.

References _retutime_do(), RETUTIME_DISABLE, and RETUTIME_SET_ALARM.

Referenced by _retu_event_fire(), and retu_remove_event().

gboolean retutime_query_alarm void   ) 
 

retutime_query_alarm:

Queries the "alarm launched" flag from the retu chip. Returns: TRUE if alarm has launched, FALSE if not.

Definition at line 102 of file rpc-retutime.c.

References _retutime_do(), and RETUTIME_QRY_ALARM.

Referenced by _retu_event_fire().

gboolean retutime_set_alarm_time time_t  alarm_time  ) 
 

retutime_set_alarm_time: : The alarm time to set to the retu chip.

Sets the alarm time on the retu chip to the time indicated by . Returns: TRUE on success, FALSE on failure.

Definition at line 63 of file rpc-retutime.c.

References _retutime_do(), RETUTIME_SET_ALARM, and RETUTIME_TIME_FORMAT.

Referenced by _clock_set_alarm().


Generated on Thu Dec 21 18:23:31 2006 for Alarmd by  doxygen 1.4.2