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]

[src]

Cast this nsINativeFileWatcherService to one of its base interfaces.

impl nsINativeFileWatcherService
[src]

[src]

/**
   * 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);

[src]

/**
   * 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>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsINativeFileWatcherService
[src]

IID: nsIID = nsID(3013929176, 32200, 18395, [168, 180, 131, 115, 109, 122, 193, 170])

[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]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsINativeFileWatcherService
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.