"Fossies" - the Fresh Open Source Software Archive

Member "jpilot-2_0_1/pi-task.h" (3 Apr 2021, 2797 Bytes) of package /linux/privat/jpilot-2_0_1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "pi-task.h" see the Fossies "Dox" file reference documentation.

    1 /*******************************************************************************
    2  * pi-task.h
    3  * A module of J-Pilot http://jpilot.org
    4  *
    5  * Copyright (C) 2004-2015 by Judd Montgomery
    6  *
    7  * This library is free software; you can redistribute it and/or
    8  * modify it under the terms of the GNU Lesser General Public
    9  * License as published by the Free Software Foundation; either
   10  * version 2.1 of the License, or (at your option) any later version.
   11  * 
   12  * This library is distributed in the hope that it will be useful,
   13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
   14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   15  * Lesser General Public License for more details.
   16  * 
   17  * You should have received a copy of the GNU Lesser General Public
   18  * License along with this library; if not, write to the Free Software
   19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
   20  ******************************************************************************/
   21 
   22 /*
   23  * This code was written to be included in pilot-link and belongs in the libpisock directory.
   24  */
   25 #ifndef _PILOT_TASKS_H_
   26 #define _PILOT_TASKS_H_
   27 
   28 #ifdef __cplusplus
   29 extern "C" {
   30 #endif
   31 
   32 #include <time.h>
   33 #include "pi-appinfo.h"
   34 #include "pi-buffer.h"
   35 
   36     typedef enum {
   37         task_v1,
   38         task_v2,
   39     } taskType;
   40 
   41     typedef enum {
   42         taskSortDueDatePriority,
   43         taskSortPriorityDueDate,
   44         taskSortCategoryPriority,
   45         taskSortCategoryDueDate
   46     } taskSortType;
   47 
   48     typedef struct Task {
   49         int indefinite;
   50         struct tm due;
   51         int flag_completion_date; /* New for tasks */
   52         struct tm completion_date; /* New for tasks */
   53         int flag_alarm; /* New for tasks */
   54         struct tm alarm_date; /* New for tasks */
   55         int advance; /* New for tasks */
   56         int flag_repeat; /* New for tasks */
   57         struct tm repeat_date; /* New for tasks */
   58         int repeat_type; /* New for tasks */
   59         struct tm repeat_end; /* New for tasks */
   60         int repeat_frequency; /* New for tasks */
   61         int repeatDays[7]; /* Sun-Sat, New for tasks */
   62         int fdow; /* First day of week, New for tasks */
   63         int priority;
   64         int complete;
   65         char *description;
   66         char *note;
   67     } Task_t;
   68 
   69     typedef struct TaskAppInfo {
   70         taskType type;
   71         struct CategoryAppInfo category;
   72         int dirty;
   73         int catColorsEdited;
   74         int catColor[16];
   75         int sortOrder;
   76     } TaskAppInfo_t;
   77 
   78     extern void free_Task PI_ARGS((Task_t *));
   79     extern int unpack_Task
   80         PI_ARGS((Task_t *, const pi_buffer_t *record, taskType type));
   81     extern int pack_Task
   82         PI_ARGS((const Task_t *, pi_buffer_t *record, taskType type));
   83     extern int unpack_TaskAppInfo
   84         PI_ARGS((TaskAppInfo_t *, const unsigned char *record, size_t len));
   85     extern int pack_TaskAppInfo
   86         PI_ARGS((const TaskAppInfo_t *, unsigned char *record, size_t len));
   87 
   88 #ifdef __cplusplus
   89   };
   90 #endif
   91 
   92 #endif              /* _PILOT_TASK_H_ */