/*********************************************************** * Calendar interpreter interface functions * ************************************************************ * Description: * * * * Created by: Avrami Tzur * * At: Tue Nov 17 13:12:40 1992 * ***********************************************************/ /* INCLUDES */ /* DECLARATIONS */ static void userInsertAppointment(int year, int month, int day, dayAppP day_rec); static void userDeleteAppointment(int year, int month, int day, dayAppP day_rec); static void userChangeAppointment(int year, int month, int day, dayAppP old_day_rec, dayAppP new_day_rec); static int apiInsertAppointment(int year, int month, int day, dayAppP day_rec); static int apiDeleteAppointment(int year, int month, int day, dayAppP day_rec); static int apiChangeAppointment(int year, int month, int day, dayAppP old_day_rec, dayAppP new_day_rec); static dayAppP apiGetDateAppointments(int year, int month, int day, int *counter); static dayAppP apiGetAppointment(int year, int month, int day, int start); /* ============================================================ | userInsertAppointment() | |----------------------------------------------------------| | Params : 1) | | 2) | | 3) | | Desc : | | | | Returns: | | Created by: Avrami Tzur | | At: Tue Nov 17 15:34:23 1992 | |==========================================================| */ static void userInsertAppointment(int year, int month, int day, dayAppP day_rec) { /* Kave - replace the following with your code. */ /* Insert to the database. */ apiInsertAppointment(year, month, day, day_rec); } /* ============================================================ | userDeleteAppointment() | |----------------------------------------------------------| | Params : 1) | | 2) | | 3) | | Desc : | | | | Returns: | | Created by: Avrami Tzur | | At: Tue Nov 17 15:38:21 1992 | |==========================================================| */ static void userDeleteAppointment(int year, int month, int day, dayAppP day_rec) { /* Kave - replace the following with your code. */ /* Delete. */ apiDeleteAppointment(year, month, day, day_rec); } /* ============================================================ | userChangeAppointment() | |----------------------------------------------------------| | Params : 1) | | 2) | | 3) | | Desc : | | | | Returns: | | Created by: Avrami Tzur | | At: Tue Nov 17 15:39:43 1992 | |==========================================================| */ static void userChangeAppointment(int year, int month, int day, dayAppP old_day_rec, dayAppP new_day_rec) { /* Kave - replace the following with your code. */ apiChangeAppointment(year, month, day, old_day_rec, new_day_rec); } /* ============================================================ | apiInsertAppointment() | |----------------------------------------------------------| | Params : 1) | | 2) | | 3) | | Desc : | | | | Returns: | | Created by: Avrami Tzur | | At: Tue Nov 17 15:42:39 1992 | |==========================================================| */ static int apiInsertAppointment(int year, int month, int day, dayAppP day_rec) { int ret; /* Insert to the database. */ if((ret = apiDbInsertAppointment(day_rec, year, month, day)) == CAL_OK) { /* Refresh the screen. */ refreshScreen(year, month, day); } return(ret); } /* ============================================================ | apiDeleteAppointment() | |----------------------------------------------------------| | Params : 1) | | 2) | | 3) | | Desc : | | | | Returns: | | Created by: Avrami Tzur | | At: Tue Nov 17 15:46:38 1992 | |==========================================================| */ static int apiDeleteAppointment(int year, int month, int day, dayAppP day_rec) { int ret; /* Insert to the database. */ if((ret = apiDbDeleteAppointment(year, month, day, day_rec->start)) == CAL_OK) { /* Refresh the screen. */ refreshScreen(year, month, day); } return(ret); } /* ============================================================ | apiChangeAppointment() | |----------------------------------------------------------| | Params : 1) | | 2) | | 3) | | Desc : | | | | Returns: | | Created by: Avrami Tzur | | At: Tue Nov 17 15:48:17 1992 | |==========================================================| */ static int apiChangeAppointment(int year, int month, int day, dayAppP old_day_rec, dayAppP new_day_rec) { int ret; /* Insert to the database. */ if((ret = apiDbUpdateAppointment(year, month, day, old_day_rec->start, new_day_rec)) == CAL_OK) { /* Refresh the screen. */ refreshScreen(year, month, day); } return(ret); } /* ============================================================ | apiGetDateAppointments() | |----------------------------------------------------------| | Params : 1) | | 2) | | 3) | | Desc : | | | | Returns: | | Created by: Avrami Tzur | | At: Tue Nov 17 15:49:49 1992 | |==========================================================| */ static dayAppP apiGetDateAppointments(int year, int month, int day, int *counter) { return(apiDbGetDateAppointments(year, month, day, counter)); } /* ============================================================ | apiGetAppointment() | |----------------------------------------------------------| | Params : 1) | | 2) | | 3) | | Desc : | | | | Returns: | | Created by: Avrami Tzur | | At: Tue Nov 17 15:51:35 1992 | |==========================================================| */ static dayAppP apiGetAppointment(int year, int month, int day, int start) { return(apiDbGetAppointment(year, month, day, start)); }