schedule.h File Reference

Event scheduling. More...

Go to the source code of this file.

Data Structures

struct  ccn_timeval
struct  ccn_gettime
struct  ccn_scheduled_event

Defines

#define CCN_SCHEDULE_CANCEL   0x10

Typedefs

typedef void(* ccn_gettime_action )(const struct ccn_gettime *, struct ccn_timeval *)
typedef int(* ccn_scheduled_action )(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags)

Functions

struct ccn_schedule * ccn_schedule_create (void *clienth, const struct ccn_gettime *ccnclock)
void ccn_schedule_destroy (struct ccn_schedule **schedp)
struct ccn_gettimeccn_schedule_get_gettime (struct ccn_schedule *)
struct ccn_scheduled_eventccn_schedule_event (struct ccn_schedule *sched, int micros, ccn_scheduled_action action, void *evdata, intptr_t evint)
int ccn_schedule_cancel (struct ccn_schedule *, struct ccn_scheduled_event *)
 Cancel a scheduled event.
int ccn_schedule_run (struct ccn_schedule *)

Detailed Description

Event scheduling.

Part of the CCNx C Library.

Copyright (C) 2008, 2009 Palo Alto Research Center, Inc.

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it 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 library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

Definition in file schedule.h.


Define Documentation

#define CCN_SCHEDULE_CANCEL   0x10

Typedef Documentation

typedef void(* ccn_gettime_action)(const struct ccn_gettime *, struct ccn_timeval *)

Definition at line 43 of file schedule.h.

typedef int(* ccn_scheduled_action)(struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags)

Definition at line 60 of file schedule.h.


Function Documentation

int ccn_schedule_cancel ( struct ccn_schedule *  sched,
struct ccn_scheduled_event ev 
)

Cancel a scheduled event.

Cancels the event (calling action with CCN_SCHEDULE_CANCEL set)

Returns:
0 if OK, or -1 if this is not possible.

Definition at line 254 of file ccn_schedule.c.

Referenced by ccnd_internal_client_stop(), and content_queue_destroy().

struct ccn_schedule* ccn_schedule_create ( void *  clienth,
const struct ccn_gettime ccnclock 
) [read]

Definition at line 88 of file ccn_schedule.c.

Referenced by ccnd_create(), and main().

void ccn_schedule_destroy ( struct ccn_schedule **  schedp  ) 

Definition at line 103 of file ccn_schedule.c.

Referenced by ccnd_destroy(), incoming_content(), and main().

struct ccn_scheduled_event* ccn_schedule_event ( struct ccn_schedule *  sched,
int  micros,
ccn_scheduled_action  action,
void *  evdata,
intptr_t  evint 
) [read]
struct ccn_gettime* ccn_schedule_get_gettime ( struct ccn_schedule *   )  [read]

Definition at line 129 of file ccn_schedule.c.

int ccn_schedule_run ( struct ccn_schedule *   ) 

Definition at line 301 of file ccn_schedule.c.

Referenced by ccnd_run(), and main().

Generated on Fri May 13 16:27:19 2011 for Content-Centric Networking in C by  doxygen 1.6.3