Added protocols for the Disk Device API.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2619 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2003-02-01 21:07:25 +00:00
parent 44e2062426
commit 3e103b0660
1 changed files with 148 additions and 1 deletions

View File

@ -46,10 +46,12 @@ fields:
General Requests General Requests
---------------- ----------------
getting the messengers for MIME and clipboard management respectively getting the messengers for MIME, clipboard and disk device management
respectively
target: registrar app looper (preferred handler) target: registrar app looper (preferred handler)
message: B_REG_GET_MIME_MESSENGER/B_REG_GET_CLIPBOARD_MESSENGER message: B_REG_GET_MIME_MESSENGER/B_REG_GET_CLIPBOARD_MESSENGER
/B_REG_GET_DISK_DEVICE_MESSENGER
reply: standard success reply: standard success
"messenger": B_MESSENGER_TYPE "messenger": B_MESSENGER_TYPE
on error: - B_NO_REPLY (fatal) on error: - B_NO_REPLY (fatal)
@ -866,3 +868,148 @@ reply fields:
----------------------------------------------------------------------- -----------------------------------------------------------------------
Disk Device Requests
--------------------
get next disk device
target: disk device manager
message: B_REG_NEXT_DISK_DEVICE
"cookie": B_INT32_TYPE
reply: standard success
"device": B_MESSAGE_TYPE
"cookie": B_INT32_TYPE
on error: - B_NO_REPLY (fatal)
- standard error
message fields:
- "cookie": An iteration cookie. Initially 0.
reply fields:
- "device": Archived BDiskDevice info.
- "cookie": Next value for the iteration cookie.
error reply fields:
- "error":
- B_BAD_VALUE: A request message field is missing or contains an
invalid value.
- B_ENTRY_NOT_FOUND: Iteration finished.
- ...
-----------------------------------------------------------------------
get disk device
target: disk device manager
message: B_REG_GET_DISK_DEVICE
"device_id": B_INT32_TYPE
| "session_id": B_INT32_TYPE
| "partition_id": B_INT32_TYPE
reply: standard success
"device": B_MESSAGE_TYPE
on error: - B_NO_REPLY (fatal)
- standard error
message fields:
- "device_id": ID of the device to be retrieved.
- "session_id": ID of session whose device shall be retrieved.
- "partition_id": ID of partition whose device shall be retrieved.
reply fields:
- "device": Archived BDiskDevice info.
error reply fields:
- "error":
- B_BAD_VALUE: A request message field is missing or contains an
invalid value.
- B_ENTRY_NOT_FOUND: A device/session/partition with that ID could not
be found.
- ...
-----------------------------------------------------------------------
update disk device
target: disk device manager
message: B_REG_UPDATE_DISK_DEVICE
"device_id": B_INT32_TYPE
| "session_id": B_INT32_TYPE
| "partition_id": B_INT32_TYPE
"change_counter": B_INT32_TYPE
"update_policy": B_INT32_TYPE
reply: standard success
"up_to_date": B_BOOLEAN_TYPE
[ "device": B_MESSAGE_TYPE ]
on error: - B_NO_REPLY (fatal)
- standard error
message fields:
- "device_id": ID of the device to be retrieved.
- "session_id": ID of session whose device shall be retrieved.
- "partition_id": ID of partition whose device shall be retrieved.
- "change_counter": Change counter of the object in question.
- "update_policy": (uint32)
B_REG_DEVICE_UPDATE_CHECK: Check only, if the object is up to date.
B_REG_DEVICE_UPDATE_CHANGED: Update only, if the object has changed.
B_REG_DEVICE_UPDATE_DEVICE_CHANGED: Update, if the device has changed, even
if the partition/session has not.
The latter two have the same semantics, if the object is a device.
reply fields:
- "up_to_date": true, if the object (and for
B_REG_DEVICE_UPDATE_DEVICE_CHANGED also the device) is already up to date,
false otherwise.
- "device": Archived BDiskDevice info.
error reply fields:
- "error":
- B_BAD_VALUE: A request message field is missing or contains an
invalid value.
- B_ENTRY_NOT_FOUND: A device/session/partition with that ID could not
be found.
- ...
-----------------------------------------------------------------------
start disk device watching
target: disk device manager
message: B_REG_DEVICE_START_WATCHING
"target": B_MESSENGER_TYPE
"events": B_INT32_TYPE
reply: standard success
on error: - B_NO_REPLY (fatal)
- standard error
message fields:
- "target": The target the event messages shall be sent to.
- "events": Specifies the events the caller is interested in (uint32).
error reply fields:
- "error":
- B_BAD_VALUE: A request message field is missing or contains an
invalid value.
- ...
-----------------------------------------------------------------------
stop disk device watching
target: disk device manager
message: B_REG_DEVICE_STOP_WATCHING
"target": B_MESSENGER_TYPE
reply: standard success
on error: - B_NO_REPLY (fatal)
- standard error
message fields:
- "target": The target that shall not longer receive any event messages.
error reply fields:
- "error":
- B_BAD_VALUE: A request message field is missing or contains an
invalid value.
- ...
-----------------------------------------------------------------------