Changeset 4355:b4e76962ac7d in roaraudio for include/libroar/enumdev.h
- Timestamp:
- 09/14/10 04:10:24 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
include/libroar/enumdev.h
r4351 r4355 39 39 #include "libroar.h" 40 40 41 #define ROAR_ENUM_FLAG_NONE 0x0000 42 #define ROAR_ENUM_FLAG_DESC 0x0001 43 #define ROAR_ENUM_FLAG_LOCATION 0x0002 44 #define ROAR_ENUM_FLAG_NONBLOCK 0x0004 45 #define ROAR_ENUM_FLAG_HARDNONBLOCK 0x0008 41 #define ROAR_ENUM_FLAG_NONE 0x0000 /* no flags set */ 42 #define ROAR_ENUM_FLAG_DESC 0x0001 /* ask for server description */ 43 #define ROAR_ENUM_FLAG_LOCATION 0x0002 /* ask for server location 1 */ 44 #define ROAR_ENUM_FLAG_NONBLOCK 0x0004 /* do not block 1 */ 45 #define ROAR_ENUM_FLAG_HARDNONBLOCK 0x0008 /* do even less block than NONBLOCK */ 46 /* 47 * 1 = This is a request. The result may include or not include the data anyway. 48 * This is only so the lib does not need to spend extra work if data is not needed. 49 */ 46 50 47 51 struct roar_server { … … 56 60 }; 57 61 62 /* Get a list of possible devices 63 * 64 * This function returns a list of possible device names. 65 * The list is for suggestions in GUIs and simular. 66 * A implementation SHOULD (VERY, VERY RECOMMENDED) have a freeform 67 * input so the user can enter any server address. 68 * 69 * The list returned is a array of struct roar_server elements. 70 * The final element has the member server set to NULL. 71 * This element represents the default server (libroar will try to find 72 * a server on it's own). 73 * 74 */ 58 75 struct roar_server * roar_enum_servers(int flags, int dir, int socktype); 76 77 /* Free the server list 78 */ 59 79 int roar_enum_servers_free(struct roar_server * servs); 80 81 /* Return the number of elements in the server list 82 * 83 * This function is a optimized way to find out how may entry are in the server list. 84 * However you should not call this too often and avoid needing to know the total at all. 85 * Write software in a way that it tests for the server == NULL condition. 86 */ 60 87 ssize_t roar_enum_servers_num(struct roar_server * servs); 61 88
Note: See TracChangeset
for help on using the changeset viewer.