#ifndef CLIB_GETPAYED_PRJ_PROTOS_H
#define CLIB_GETPAYED_PRJ_PROTOS_H

/*
**  $VER: getpayed_prj_protos.h 1.0 (15.6.97)
**
**  C prototypes. For use with 32 bit integers only.
**
**  (C) 1997 TigerSoft
**      All Rights Reserved
*/

#ifndef EXEC_TYPES_H
#include <exec/types.h>
#endif
#ifndef UTILITY_TAGITEM_H
#include <utility/tagitem.h>
#endif
#ifndef GETPAYED_PRJ_H
#include <include/getpayed_prj.h>
#endif

LONG gpAddDay( APTR project, LONG month, struct NewDay *newday, struct TagItem *tags );
LONG gpAddDayTags( APTR project, LONG month, struct NewDay *newday, Tag tags, ... );
BOOL gpCheckDate( LONG year, WORD month, WORD day );
LONG gpCheckNewDay( LONG year, LONG month,  struct NewDay *newday );
void gpClearMonth( APTR project, LONG month);
void gpClearMonths( APTR project );
LONG gpDays( APTR project, LONG month );
void gpDisposeDay( APTR project, struct NewDay *newday, struct TagItem *tags );
void gpDisposeDayTags( APTR project, struct NewDay *newday, Tag tags, ... );
struct NewDay *gpGetDay( APTR project, LONG month, LONG entry, struct TagItem *tags );
struct NewDay *gpGetDayTags( APTR project, LONG month, LONG entry, Tag tags, ... );
BOOL gpHHMMToTime( STRPTR hhmm, FLOAT *time );
ULONG gpLockProject( APTR project, ULONG locknum);
void gpRemoveDay( APTR project, LONG month, LONG entry, struct TagItem *tags );
void gpRemoveDayTags( APTR project, LONG month, LONG entry, Tag tags, ... );
BOOL gpTimeToHHMM( FLOAT time, STRPTR buffer );
void gpUnlockProject( APTR project, ULONG locknum );
LONG gpProjectYear( APTR project, LONG year );
BOOL gpGetPrjInfo( APTR project, struct TagItem *tags );
BOOL gpGetPrjInfoTags( APTR project, Tag tags, ... );
BOOL gpSetPrjInfo( APTR project, struct TagItem *tags );
BOOL gpSetPrjInfoTags( APTR project, Tag tags, ... );
/* Added from 17. Juli (but still in version 1.0) */
LONG gpAddRepEntry( APTR project, LONG position, struct RepNode *entry, struct TagItem *tags );
LONG gpAddRepEntryTags( APTR project, LONG position, struct RepNode *entry, Tag tags, ... );
void gpClearReport( APTR project );
void gpDisposeRepEntry( APTR project, struct RepNode *entry, struct TagItem *tags );
void gpDisposeRepEntryTags( APTR project, struct RepNode *entry, Tag tags, ... );
struct RepNode *gpGetRepEntry( APTR project, LONG position, struct TagItem *tags );
struct RepNode *gpGetRepEntryTags( APTR project, LONG position, Tag tags, ... );
void gpRemoveRepEntry( APTR project, LONG position, struct TagItem *tags );
void gpRemoveRepEntryTags( APTR project, LONG position, Tag tags, ... );
LONG gpRepEntries( APTR project );
LONG gpRepTotal( APTR project );

BOOL gpLongHHMMToTime( STRPTR hhmm, FLOAT *time );

ULONG gpDateBaseday( ULONG year );
ULONG gpDateYearday( ULONG year, UWORD month, UWORD day );
ULONG gpDateWeekday( ULONG yearBase, ULONG yearDay );
ULONG gpDateWeek( ULONG baseDay, ULONG yearDay );
ULONG gpDateMonth( ULONG year, ULONG baseDay, ULONG week, ULONG *monthDay);

#endif /* CLIB_GETPAYED_PRJ_PROTOS_H */
