Lines Matching refs:path
154 const char* path;
155 if (message->FindString("path", &path) != B_OK)
160 _AddDevice(path);
164 _RemoveDevice(path);
184 DeviceWatcher::_ScanDevices(const char* path)
186 TRACE(("DeviceWatcher::_ScanDevices(\"%s\");\n", path));
188 BDirectory dir(path);
205 DeviceWatcher::_AddDevice(const char* path)
207 TRACE(("DeviceWatcher::_AddDevice(\"%s\");\n", path));
209 if (fDeviceEndpointsMap.ContainsKey(path)) {
215 BEntry entry(path);
217 // Invalid path!
221 BEntry symlink(path, true);
223 // Invalid path!
228 int fd = open(path, O_RDWR | O_EXCL);
234 fd = open(path, O_RDONLY | O_EXCL);
236 fd = open(path, O_WRONLY | O_EXCL);
241 TRACE(("Doing _AddDevice(\"%s\"); fd=%d\n", path, fd));
249 consumer = new MidiPortConsumer(fd, path);
256 producer = new MidiPortProducer(fd, path);
262 fDeviceEndpointsMap.Put(path, new DeviceEndpoints(fd, consumer, producer));
263 TRACE(("Done _AddDevice(\"%s\")\n", path));
268 DeviceWatcher::_RemoveDevice(const char* path)
270 TRACE(("DeviceWatcher::_RemoveDevice(\"%s\");\n", path));
272 DeviceEndpoints* deviceEndpoints = fDeviceEndpointsMap.Get(path);
274 TRACE(("_RemoveDevice(\"%s\") didn't find endpoint in map!!\n", path));
278 TRACE((" _RemoveDevice(\"%s\") unregistering\n", path));
284 TRACE((" _RemoveDevice(\"%s\") releasing\n", path));
290 TRACE((" _RemoveDevice(\"%s\") removing from map\n", path));
291 fDeviceEndpointsMap.Remove(path);
292 TRACE(("Done _RemoveDevice(\"%s\")\n", path));