5 Copyright (C) 2001-2008 Neil Cafferkey
7 This file is free software; you can redistribute it and/or modify it
8 under the terms of the GNU Lesser General Public License as
9 published by the Free Software Foundation; either version 2.1 of the
10 License, or (at your option) any later version.
12 This file is distributed in the hope that it will be useful, but
13 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.
17 You should have received a copy of the GNU Lesser General Public
18 License along with this file; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston,
24 #ifndef HANDLER_PROTOS_H
25 #define HANDLER_PROTOS_H
31 /* Function prototypes */
33 BOOL
CmdStartup(struct Handler
*h
, STRPTR name
, struct DeviceNode
*dev_node
,
34 struct MsgPort
*proc_port
);
35 BOOL
CmdDie(struct Handler
*handler
);
36 BOOL
CmdIsFileSystem();
37 BOOL
CmdFind(struct Handler
*handler
, struct FileHandle
*handle
,
38 struct Lock
*lock
, const TEXT
*name
, ULONG mode
);
39 BOOL
CmdFHFromLock(struct Handler
*handler
, struct FileHandle
*handle
,
41 BOOL
CmdEnd(struct Handler
*handler
, struct Opening
*opening
);
42 UPINT
CmdRead(struct Handler
*handler
, struct Opening
*opening
, UBYTE
*buffer
, UPINT length
);
43 UPINT
CmdWrite(struct Handler
*handler
, struct Opening
*opening
,
44 UBYTE
*buffer
, UPINT length
);
45 UPINT
CmdSeek(struct Handler
*handler
, struct Opening
*opening
, PINT offset
, LONG mode
);
46 PINT
CmdSetFileSize(struct Handler
*handler
, struct Opening
*opening
,
47 PINT offset
, LONG mode
);
48 struct Lock
*CmdLocateObject(struct Handler
*handler
,
49 struct Lock
*lock
, const TEXT
*name
, ULONG mode
);
50 BOOL
CmdFreeLock(struct Handler
*handler
, struct Lock
*lock
);
51 struct Lock
*CmdCopyDir(struct Handler
*handler
, struct Lock
*lock
);
52 struct Lock
*CmdCopyDirFH(struct Handler
*handler
,
53 struct Opening
*opening
);
54 struct Lock
*CmdParent(struct Handler
*handler
, struct Lock
*lock
);
55 struct Lock
*CmdParentFH(struct Handler
*handler
,
56 struct Opening
*opening
);
57 BOOL
CmdSameLock(struct Handler
*handler
, struct Lock
*lock1
, struct Lock
*lock2
);
58 struct Lock
*CmdCreateDir(struct Handler
*handler
,
59 struct Lock
*lock
, const TEXT
*name
);
60 BOOL
CmdExamineObject(struct Handler
*handler
, struct Lock
*lock
,
61 struct FileInfoBlock
*info
);
62 BOOL
CmdExamineFH(struct Handler
*handler
, struct Opening
*opening
,
63 struct FileInfoBlock
*info
);
64 BOOL
CmdExamineNext(struct Handler
*handler
, struct FileInfoBlock
*info
);
65 BOOL
CmdExamineAll(struct Handler
*handler
, struct Lock
*lock
,
66 UBYTE
*buffer
, ULONG size
, ULONG type
, struct ExAllControl
*control
);
67 VOID
CmdExamineAllEnd(struct Handler
*handler
, struct Lock
*lock
,
68 UBYTE
*buffer
, ULONG size
, ULONG type
, struct ExAllControl
*control
);
69 BOOL
CmdInfo(struct Handler
*handler
, struct InfoData
*info_data
);
70 BOOL
CmdSetProtect(struct Handler
*handler
, struct Lock
*lock
,
71 const TEXT
*name
, ULONG flags
);
72 BOOL
CmdSetComment(struct Handler
*handler
, struct Lock
*lock
,
73 const TEXT
*name
, const TEXT
*comment
);
74 BOOL
CmdRenameObject(struct Handler
*handler
, struct Lock
*old_lock
,
75 STRPTR old_name
, struct Lock
*new_lock
, STRPTR new_name
);
76 BOOL
CmdRenameDisk(struct Handler
*handler
, STRPTR new_name
);
77 BOOL
CmdSetDate(struct Handler
*handler
, struct Lock
*lock
, STRPTR name
,
78 struct DateStamp
*date
);
79 BOOL
CmdDeleteObject(struct Handler
*handler
, struct Lock
*lock
,
81 struct DosList
*CmdCurrentVolume(struct Handler
*handler
);
82 BOOL
CmdChangeMode(struct Handler
*handler
, ULONG type
, APTR thing
, ULONG new_mode
);
83 BOOL
CmdMakeLink(struct Handler
*handler
, struct Lock
*lock
, STRPTR name
,
84 APTR reference
, LONG link_type
);
85 LONG
CmdReadLink(struct Handler
*handler
, struct Lock
*lock
,
86 const TEXT
*name
, TEXT
*buffer
, LONG buffer_size
);
87 BOOL
CmdWriteProtect(struct Handler
*handler
, BOOL on
, ULONG key
);
89 BOOL
CmdAddNotify(struct Handler
*handler
, struct NotifyRequest
*request
);
90 BOOL
CmdRemoveNotify(struct Handler
*handler
,
91 struct NotifyRequest
*request
);
93 VOID
DeleteHandler(struct Handler
*handler
);
94 struct Object
*CreateObject(struct Handler
*handler
, const TEXT
*name
,
95 BYTE type
, struct Object
*parent
);
96 BOOL
AttemptDeleteObject(struct Handler
*handler
, struct Object
*object
,
98 VOID
DeleteObject(struct Handler
*handler
, struct Object
*object
);
99 struct Object
*GetHardObject(struct Handler
*handler
, struct Lock
*lock
,
100 const TEXT
*name
, struct Object
**parent
);
101 struct Object
*GetObject(struct Handler
*handler
, struct Lock
*lock
,
102 const TEXT
*name
, struct Object
**parent
, LONG
*remainder_pos
);
103 PINT
ChangeFileSize(struct Handler
*handler
, struct Opening
*opening
,
104 PINT offset
, LONG mode
);
105 UPINT
ReadData(struct Opening
*opening
, UBYTE
*buffer
, UPINT length
);
106 UPINT
WriteData(struct Handler
*handler
, struct Opening
*opening
,
107 UBYTE
*buffer
, UPINT length
);
108 struct Lock
*LockObject(struct Handler
*handler
,
109 struct Object
*object
, LONG access
);
110 BOOL
ExamineObject(struct Handler
*handler
, struct Object
*object
,
111 struct FileInfoBlock
*info
);
112 VOID
AdjustExaminations(struct Handler
*handler
, struct Object
*object
);
113 BOOL
SetName(struct Handler
*handler
, struct Object
*object
,
115 UPINT
GetBlockLength(struct Object
*file
, struct Block
*block
);
116 struct Object
*GetRealObject(struct Object
*object
);
118 VOID
MatchNotifyRequests(struct Handler
*handler
);
119 VOID
UnmatchNotifyRequests(struct Handler
*handler
, struct Object
*object
);
120 VOID
NotifyAll(struct Handler
*handler
, struct Object
*object
,
122 VOID
ReceiveNotifyReply(struct Handler
*handler
,
123 struct NotifyMessage
*message
);
124 struct Notification
*FindNotification(struct Handler
*handler
,
125 struct NotifyRequest
*request
);
126 VOID
Notify(struct Handler
*handler
, struct Notification
*notification
);
128 UBYTE
*MkBStr(struct Handler
*h
, STRPTR str
);
130 PINT
SetString(struct Handler
*handler
, TEXT
**field
, const TEXT
*new_str
);
131 PINT
SwapStrings(TEXT
**field1
, TEXT
**field2
);
132 UPINT
StrLen(const TEXT
*s
);
133 UPINT
StrSize(const TEXT
*s
);
134 struct Node
*FindNameNoCase(struct Handler
*handler
, struct List
*start
, const TEXT
*name
);
135 struct DosList
*MyMakeDosEntry(struct Handler
*handler
, const TEXT
*name
, LONG type
);
136 VOID
MyFreeDosEntry(struct Handler
*handler
, struct DosList
*entry
);
137 BOOL
MyRenameDosEntry(struct Handler
*handler
, struct DosList
*entry
, const TEXT
*name
);