Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Volume/device attachment and removal events #4

Open
wants to merge 1 commit into
base: v1.2-windows
Choose a base branch
from

Conversation

eisnerd
Copy link

@eisnerd eisnerd commented Dec 15, 2011

This adds platform-specific code to fire global "volume.added" and "volume.removed" events when removable devices containing filesystems are attached or ejected/removed. One event is fired per device, rather than per filesystem, and no specific information about the device(s) in question is provided.

I have added these same simple, you might say crude, system-related events to this branch for Windows and to the master branch with a similar implementation for Mac. Rather than providing a full device/volume information API, we have found simply being notified that some kind of change has occurred very useful in our application, with further platform-specific code that it may not be worth lumbering the SDK with being used in response to these events to identify and examine the devices of interest, such as USB flash drives.

Though this may not seem very polished or broadly useful, it would be useful to have this small additional feature incorporated in the official SDK, particularly on Windows where it is by far easiest to get this information from the message pumping code of the main application window than to achieve the same without it.

Thank you for considering this submission.

on Windows, as volume.removed and volume.added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant