home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Misc / RZToDoList / Source / ToDoItem.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-06-12  |  1.7 KB  |  65 lines

  1. /* 
  2.  * ToDoItem - implementation of ToDoItem, the basic unit of information 
  3.  *     for the ToDoList program.  The method -adjustPriority implements
  4.  *     the dynamic priority mechanism.
  5.  *
  6.  * You may freely copy, distribute and reuse the code in this example.
  7.  * This code is provided AS IS without warranty of any kind, expressed 
  8.  * or implied, as to its fitness for any particular use.
  9.  *
  10.  * Copyright 1995 Ralph Zazula (rzazula@next.com).  All Rights Reserved.
  11.  *
  12.  */
  13.  
  14. #import <objc/Object.h>
  15. #import "ToDoItems.h"
  16.  
  17. #define TODO_TYPE_NORMAL 0x0
  18. #define TODO_TYPE_APPOINTMENT 0x1
  19. #define TODO_TYPE_LOWPRIORITY 0x2
  20. #define TODO_TYPE_HIGHPRIORITY 0x3
  21.  
  22. @interface ToDoItem : Object <ToDoItems>
  23. {
  24.     char *subject;
  25.     long priority, startDate, dueDate, dateCompleted;
  26.     char *data;
  27.     int dataLen;
  28.     void *_reservedToDoItem1;
  29. }
  30.  
  31. - initSubject:(char *)subj startDate:(long)start dueDate:(long)due
  32.     completeDate:(long)completed type:(char)type isPrivate:(BOOL)privateFlag
  33.     isCompleted:(BOOL)completeFlag data:(char *)buf dataLen:(int)len;
  34. - initFromItem:(id <ToDoItems>)anItem;
  35.  
  36. - (char *)subject;
  37. - (long)priority;
  38. - (long)startDate;
  39. - (long)dueDate;
  40. - (long)dateCompleted;
  41. - (char)type;
  42. - (BOOL)isPrivate;
  43. - (BOOL)isCompleted;
  44. - (const char *)asciiStartDate;
  45. - (const char *)asciiCompletedDate;
  46. - (const char *)asciiDueDate;
  47. - getData:(char **)d length:(int *)len;
  48.  
  49. - setSubject:(const char *)s;
  50. - setPriority:(long)p;
  51. - setStartDate:(long)newDate;
  52. - setDueDate:(long)newDate;
  53. - setType:(char)newType;
  54. - setPrivate:(BOOL)flag;
  55. - setCompleted:(BOOL)flag;
  56. - setData:(const char *)d;
  57. - setDataFromText:aText;
  58. - setDataFromStream:(NXStream *)stream;
  59.  
  60. - writeToStream:(NXStream *)stream;
  61.  
  62. - adjustPriority;
  63.  
  64. @end
  65.