Struct xpcom::interfaces::nsINativeFileWatcherService
[−]
[src]
#[repr(C)]pub struct nsINativeFileWatcherService { /* fields omitted */ }
interface nsINativeFileWatcherService : nsISupports
/**
* A service providing native implementations of path changes notification.
*/
Methods
impl nsINativeFileWatcherService
[src]
pub fn coerce<T: nsINativeFileWatcherServiceCoerce>(&self) -> &T
[src]
Cast this nsINativeFileWatcherService
to one of its base interfaces.
impl nsINativeFileWatcherService
[src]
pub unsafe fn AddPath(
&self,
pathToWatch: &nsAString,
onChange: *const nsINativeFileWatcherCallback,
onError: *const nsINativeFileWatcherErrorCallback,
onSuccess: *const nsINativeFileWatcherSuccessCallback
) -> nsresult
[src]
&self,
pathToWatch: &nsAString,
onChange: *const nsINativeFileWatcherCallback,
onError: *const nsINativeFileWatcherErrorCallback,
onSuccess: *const nsINativeFileWatcherSuccessCallback
) -> nsresult
/**
* Watches the passed path for changes. If it's a directory, every file
* it contains is watched. Recursively watches subdirectories. If the
* resource is already being watched, does nothing. If the passed path
* is a file, the behaviour is not specified.
*
* @param pathToWatch The path to watch for changes.
* @param onChange
* The callback invoked whenever a change on a watched
* resource is detected.
* @param onError
* The optional callback invoked whenever an error occurs.
* @param onSuccess
* The optional callback invoked when the file watcher starts
* watching the resource for changes.
*/
void addPath (in AString pathToWatch, in nsINativeFileWatcherCallback onChange, [optional] in nsINativeFileWatcherErrorCallback onError, [optional] in nsINativeFileWatcherSuccessCallback onSuccess);
pub unsafe fn RemovePath(
&self,
pathToUnwatch: &nsAString,
onChange: *const nsINativeFileWatcherCallback,
onError: *const nsINativeFileWatcherErrorCallback,
onSuccess: *const nsINativeFileWatcherSuccessCallback
) -> nsresult
[src]
&self,
pathToUnwatch: &nsAString,
onChange: *const nsINativeFileWatcherCallback,
onError: *const nsINativeFileWatcherErrorCallback,
onSuccess: *const nsINativeFileWatcherSuccessCallback
) -> nsresult
/**
* Removes the provided path from the watched resources. If the path
* was not being watched or the callbacks were not registered, silently
* ignores the request.
* Please note that the file watcher only considers the onChange callbacks
* when deciding to close a watch on a resource. If there are no more onChange
* callbacks associated to the watch, it gets closed (even though it still has
* some error callbacks associated).
*
* @param pathToUnwatch The path to un-watch.
* @param onChange
* The registered callback invoked whenever a change on a watched
* resource is detected.
* @param onError
* The optionally registered callback invoked whenever an error
* occurs.
* @param onSuccess
* The optional callback invoked when the file watcher stops
* watching the resource for changes.
*/
void removePath (in AString pathToUnwatch, in nsINativeFileWatcherCallback onChange, [optional] in nsINativeFileWatcherErrorCallback onError, [optional] in nsINativeFileWatcherSuccessCallback onSuccess);
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsINativeFileWatcherService
[src]
const IID: nsIID
IID: nsIID = nsID(3013929176, 32200, 18395, [168, 180, 131, 115, 109, 122, 193, 170])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsINativeFileWatcherService
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsINativeFileWatcherService
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.