Interface nsIUpdateSyncManagerType

Upon creation, which should happen early during startup, the sync manager creates/opens and locks a file. All other running instances of the same installation of the app also open the same lock, so we can use it to determine whether any other instance is running. If so, we'll temporarily hold off on performing update tasks until there are no other instances or until a timeout expires, whichever comes first. That way we can avoid updating behind the back of copies that are still running, so we don't force all running instances to restart (see bug 1366808, where an error was added informing the user of the need to restart any running instances that have been updated).

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Returns whether another instance of this application is running.

    Returns

    true if another instance has the lock open, false if not

    Returns bool

  • Should only be used for testing.

    Closes and reopens the lock file, possibly under a different name if a parameter is given (or the path hash has changed, which should only happen if a test is forcing it).

    Parameters

    • anAppFile: nsIFile

    Returns void

Generated using TypeDoc