-
Notifications
You must be signed in to change notification settings - Fork 109
Expand file tree
/
Copy pathPollfdListener.java
More file actions
56 lines (52 loc) · 1.75 KB
/
PollfdListener.java
File metadata and controls
56 lines (52 loc) · 1.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*
* Copyright 2013 Klaus Reimer <[email protected]>
* See LICENSE.md for licensing information.
*
* Based on libusb <http://libusb.info/>:
*
* Copyright 2001 Johannes Erdfelt <[email protected]>
* Copyright 2007-2009 Daniel Drake <[email protected]>
* Copyright 2010-2012 Peter Stuge <[email protected]>
* Copyright 2008-2013 Nathan Hjelm <[email protected]>
* Copyright 2009-2013 Pete Batard <[email protected]>
* Copyright 2009-2013 Ludovic Rousseau <[email protected]>
* Copyright 2010-2012 Michael Plante <[email protected]>
* Copyright 2011-2013 Hans de Goede <[email protected]>
* Copyright 2012-2013 Martin Pieuchot <[email protected]>
* Copyright 2012-2013 Toby Gray <[email protected]>
*/
package org.usb4java;
import java.io.FileDescriptor;
/**
* Listener interface for pollfd notifications.
*
* @author Klaus Reimer ([email protected])
*/
public interface PollfdListener
{
/**
* Callback function, invoked when a new file descriptor should be added to
* the set of file descriptors monitored for events.
*
* @param fd
* the new file descriptor.
* @param events
* events to monitor for.
* @param userData
* User data pointer.
*/
void pollfdAdded(FileDescriptor fd, int events, Object userData);
/**
* Callback function, invoked when a file descriptor should be removed from
* the set of file descriptors being monitored for events.
*
* After returning from this callback, do not use that file descriptor
* again.
*
* @param fd
* The file descriptor to stop monitoring.
* @param userData
* User data pointer.
*/
void pollfdRemoved(FileDescriptor fd, Object userData);
}