1// VolumeEvent.h
2
3#ifndef NETFS_VOLUME_EVENT_H
4#define NETFS_VOLUME_EVENT_H
5
6#include <fsproto.h>
7
8#include <Referenceable.h>
9#include <util/DoublyLinkedList.h>
10
11
12// event types
13enum {
14	CONNECTION_BROKEN_EVENT,
15};
16
17// VolumeEvent
18class VolumeEvent : public BReferenceable,
19	public DoublyLinkedListLinkImpl<VolumeEvent> {
20public:
21								VolumeEvent(uint32 type, vnode_id target = -1);
22	virtual						~VolumeEvent();
23
24			uint32				GetType() const;
25
26			void				SetTarget(vnode_id target);
27			vnode_id			GetTarget() const;
28				// a node ID identifying the target volume (usually the ID
29				// of the root node)
30
31private:
32			uint32				fType;
33			vnode_id			fTarget;
34};
35
36// ConnectionBrokenEvent
37class ConnectionBrokenEvent : public VolumeEvent {
38public:
39								ConnectionBrokenEvent(vnode_id target = -1);
40	virtual						~ConnectionBrokenEvent();
41};
42
43#endif	// NETFS_VOLUME_EVENT_H
44