forked from juddmon/jpilot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
calendar.h
65 lines (50 loc) · 2.57 KB
/
calendar.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*******************************************************************************
* calendar.h
* A module of J-Pilot http://jpilot.org
*
* Copyright (C) 1999-2014 by Judd Montgomery
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; version 2 of the License.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
******************************************************************************/
#ifndef __CALENDAR_H__
#define __CALENDAR_H__
#include <stdio.h>
#include <pi-datebook.h>
#include <pi-calendar.h>
#include "utils.h"
/* Copy AppInfo data structures */
int copy_appointment_ai_to_calendar_ai(const struct AppointmentAppInfo *aai, struct CalendarAppInfo *cai);
/* Copy AppInfo data structures */
int copy_calendar_ai_to_appointment_ai(const struct CalendarAppInfo *cai, struct AppointmentAppInfo *aai);
int copy_appointment_to_calendarEvent(const struct Appointment *a, struct CalendarEvent *cale);
int copy_calendarEvent_to_appointment(const struct CalendarEvent *cale, struct Appointment *a);
int copy_appointments_to_calendarEvents(AppointmentList *al, CalendarEventList **cel);
int copy_calendarEvents_to_appointments(CalendarEventList *cel, AppointmentList **al);
void free_CalendarEventList(CalendarEventList **cel);
int get_calendar_app_info(struct CalendarAppInfo *cai);
int calendar_sort(CalendarEventList **cel,
int (*compare_func)(const void*, const void*));
int get_days_calendar_events(CalendarEventList **calendar_event_list, struct tm *now, int category, int *total_records);
/*
* If Null is passed in for date, then all appointments will be returned
* modified, deleted and private, 0 for no, 1 for yes, 2 for use prefs
*/
int get_days_calendar_events2(CalendarEventList **calendar_event_list, struct tm *now,
int modified, int deleted, int privates,
int category, int *total_records);
int pc_calendar_write(struct CalendarEvent *cale,
PCRecType rt,
unsigned char attrib,
unsigned int *unique_id);
#endif