Struct xpcom::interfaces::nsIUpdate
[−]
[src]
#[repr(C)]pub struct nsIUpdate { /* fields omitted */ }
interface nsIUpdate : nsISupports
/**
* An interface that describes an object representing an available update to
* the current application - this update may have several available patches
* from which one must be selected to download and install, for example we
* might select a binary difference patch first and attempt to apply that,
* then if the application process fails fall back to downloading a complete
* file-replace patch. This object also contains information about the update
* that the front end and other application services can use to learn more
* about what is going on.
*/
Methods
impl nsIUpdate
[src]
pub fn coerce<T: nsIUpdateCoerce>(&self) -> &T
[src]
Cast this nsIUpdate
to one of its base interfaces.
impl nsIUpdate
[src]
pub unsafe fn GetType(&self, aType: &mut nsAString) -> nsresult
[src]
/**
* The type of update:
* "major" A major new version of the Application
* "minor" A minor update to the Application (e.g. security update)
*/
attribute AString type;
pub unsafe fn SetType(&self, aType: &nsAString) -> nsresult
[src]
/**
* The type of update:
* "major" A major new version of the Application
* "minor" A minor update to the Application (e.g. security update)
*/
attribute AString type;
pub unsafe fn GetName(&self, aName: &mut nsAString) -> nsresult
[src]
/**
* The name of the update, or "<Application Name> <Update Version>"
*/
attribute AString name;
pub unsafe fn SetName(&self, aName: &nsAString) -> nsresult
[src]
/**
* The name of the update, or "<Application Name> <Update Version>"
*/
attribute AString name;
pub unsafe fn GetDisplayVersion(
&self,
aDisplayVersion: &mut nsAString
) -> nsresult
[src]
&self,
aDisplayVersion: &mut nsAString
) -> nsresult
/**
* The string to display in the user interface for the version. If you want
* a real version number use appVersion.
*/
attribute AString displayVersion;
pub unsafe fn SetDisplayVersion(&self, aDisplayVersion: &nsAString) -> nsresult
[src]
/**
* The string to display in the user interface for the version. If you want
* a real version number use appVersion.
*/
attribute AString displayVersion;
pub unsafe fn GetAppVersion(&self, aAppVersion: &mut nsAString) -> nsresult
[src]
/**
* The Application version of this update.
*/
attribute AString appVersion;
pub unsafe fn SetAppVersion(&self, aAppVersion: &nsAString) -> nsresult
[src]
/**
* The Application version of this update.
*/
attribute AString appVersion;
pub unsafe fn GetPreviousAppVersion(
&self,
aPreviousAppVersion: &mut nsAString
) -> nsresult
[src]
&self,
aPreviousAppVersion: &mut nsAString
) -> nsresult
/**
* The Application version prior to the application being updated.
*/
attribute AString previousAppVersion;
pub unsafe fn SetPreviousAppVersion(
&self,
aPreviousAppVersion: &nsAString
) -> nsresult
[src]
&self,
aPreviousAppVersion: &nsAString
) -> nsresult
/**
* The Application version prior to the application being updated.
*/
attribute AString previousAppVersion;
pub unsafe fn GetBuildID(&self, aBuildID: &mut nsAString) -> nsresult
[src]
/**
* The Build ID of this update. Used to determine a particular build, down
* to the hour, minute and second of its creation. This allows the system
* to differentiate between several nightly builds with the same |version|
* for example.
*/
attribute AString buildID;
pub unsafe fn SetBuildID(&self, aBuildID: &nsAString) -> nsresult
[src]
/**
* The Build ID of this update. Used to determine a particular build, down
* to the hour, minute and second of its creation. This allows the system
* to differentiate between several nightly builds with the same |version|
* for example.
*/
attribute AString buildID;
pub unsafe fn GetDetailsURL(&self, aDetailsURL: &mut nsAString) -> nsresult
[src]
/**
* The URL to a page which offers details about the content of this
* update. Ideally, this page is not the release notes but some other page
* that summarizes the differences between this update and the previous,
* which also links to the release notes.
*/
attribute AString detailsURL;
pub unsafe fn SetDetailsURL(&self, aDetailsURL: &nsAString) -> nsresult
[src]
/**
* The URL to a page which offers details about the content of this
* update. Ideally, this page is not the release notes but some other page
* that summarizes the differences between this update and the previous,
* which also links to the release notes.
*/
attribute AString detailsURL;
pub unsafe fn GetServiceURL(&self, aServiceURL: &mut nsAString) -> nsresult
[src]
/**
* The URL to the Update Service that supplied this update.
*/
attribute AString serviceURL;
pub unsafe fn SetServiceURL(&self, aServiceURL: &nsAString) -> nsresult
[src]
/**
* The URL to the Update Service that supplied this update.
*/
attribute AString serviceURL;
pub unsafe fn GetChannel(&self, aChannel: &mut nsAString) -> nsresult
[src]
/**
* The channel used to retrieve this update from the Update Service.
*/
attribute AString channel;
pub unsafe fn SetChannel(&self, aChannel: &nsAString) -> nsresult
[src]
/**
* The channel used to retrieve this update from the Update Service.
*/
attribute AString channel;
pub unsafe fn GetUnsupported(&self, aUnsupported: *mut bool) -> nsresult
[src]
/**
* Whether the update is no longer supported on this system.
*/
attribute boolean unsupported;
pub unsafe fn SetUnsupported(&self, aUnsupported: bool) -> nsresult
[src]
/**
* Whether the update is no longer supported on this system.
*/
attribute boolean unsupported;
pub unsafe fn GetPromptWaitTime(
&self,
aPromptWaitTime: *mut int64_t
) -> nsresult
[src]
&self,
aPromptWaitTime: *mut int64_t
) -> nsresult
/**
* Allows overriding the default amount of time in seconds before prompting the
* user to apply an update. If not specified, the value of
* app.update.promptWaitTime will be used.
*/
attribute long long promptWaitTime;
pub unsafe fn SetPromptWaitTime(&self, aPromptWaitTime: int64_t) -> nsresult
[src]
/**
* Allows overriding the default amount of time in seconds before prompting the
* user to apply an update. If not specified, the value of
* app.update.promptWaitTime will be used.
*/
attribute long long promptWaitTime;
pub unsafe fn GetIsCompleteUpdate(
&self,
aIsCompleteUpdate: *mut bool
) -> nsresult
[src]
&self,
aIsCompleteUpdate: *mut bool
) -> nsresult
/**
* Whether or not the update being downloaded is a complete replacement of
* the user's existing installation or a patch representing the difference
* between the new version and the previous version.
*/
attribute boolean isCompleteUpdate;
pub unsafe fn SetIsCompleteUpdate(&self, aIsCompleteUpdate: bool) -> nsresult
[src]
/**
* Whether or not the update being downloaded is a complete replacement of
* the user's existing installation or a patch representing the difference
* between the new version and the previous version.
*/
attribute boolean isCompleteUpdate;
pub unsafe fn GetInstallDate(&self, aInstallDate: *mut int64_t) -> nsresult
[src]
/**
* When the update was installed.
*/
attribute long long installDate;
pub unsafe fn SetInstallDate(&self, aInstallDate: int64_t) -> nsresult
[src]
/**
* When the update was installed.
*/
attribute long long installDate;
pub unsafe fn GetStatusText(&self, aStatusText: &mut nsAString) -> nsresult
[src]
/**
* A message associated with this update, if any.
*/
attribute AString statusText;
pub unsafe fn SetStatusText(&self, aStatusText: &nsAString) -> nsresult
[src]
/**
* A message associated with this update, if any.
*/
attribute AString statusText;
pub unsafe fn GetSelectedPatch(
&self,
aSelectedPatch: *mut *const nsIUpdatePatch
) -> nsresult
[src]
&self,
aSelectedPatch: *mut *const nsIUpdatePatch
) -> nsresult
/**
* The currently selected patch for this update.
*/
readonly attribute nsIUpdatePatch selectedPatch;
pub unsafe fn GetState(&self, aState: &mut nsAString) -> nsresult
[src]
/**
* The state of the selected patch:
* "downloading" The update is being downloaded.
* "pending" The update is ready to be applied.
* "pending-service" The update is ready to be applied with the service.
* "pending-elevate" The update is ready to be applied but requires elevation.
* "applying" The update is being applied.
* "applied" The update is ready to be switched to.
* "applied-os" The update is OS update and to be installed.
* "applied-service" The update is ready to be switched to with the service.
* "succeeded" The update was successfully applied.
* "download-failed" The update failed to be downloaded.
* "failed" The update failed to be applied.
*/
attribute AString state;
pub unsafe fn SetState(&self, aState: &nsAString) -> nsresult
[src]
/**
* The state of the selected patch:
* "downloading" The update is being downloaded.
* "pending" The update is ready to be applied.
* "pending-service" The update is ready to be applied with the service.
* "pending-elevate" The update is ready to be applied but requires elevation.
* "applying" The update is being applied.
* "applied" The update is ready to be switched to.
* "applied-os" The update is OS update and to be installed.
* "applied-service" The update is ready to be switched to with the service.
* "succeeded" The update was successfully applied.
* "download-failed" The update failed to be downloaded.
* "failed" The update failed to be applied.
*/
attribute AString state;
pub unsafe fn GetErrorCode(&self, aErrorCode: *mut int32_t) -> nsresult
[src]
/**
* A numeric error code that conveys additional information about the state of
* a failed update. If the update is not in the "failed" state the value is
* zero. The possible values are located in common/errors.h and values between
* 80 and 99 are in nsUpdateService.js.
*/
attribute long errorCode;
pub unsafe fn SetErrorCode(&self, aErrorCode: int32_t) -> nsresult
[src]
/**
* A numeric error code that conveys additional information about the state of
* a failed update. If the update is not in the "failed" state the value is
* zero. The possible values are located in common/errors.h and values between
* 80 and 99 are in nsUpdateService.js.
*/
attribute long errorCode;
pub unsafe fn GetElevationFailure(
&self,
aElevationFailure: *mut bool
) -> nsresult
[src]
&self,
aElevationFailure: *mut bool
) -> nsresult
/**
* Whether an elevation failure has been encountered for this update.
*/
attribute boolean elevationFailure;
pub unsafe fn SetElevationFailure(&self, aElevationFailure: bool) -> nsresult
[src]
/**
* Whether an elevation failure has been encountered for this update.
*/
attribute boolean elevationFailure;
pub unsafe fn GetPatchCount(&self, aPatchCount: *mut uint32_t) -> nsresult
[src]
/**
* The number of patches supplied by this update.
*/
readonly attribute unsigned long patchCount;
pub unsafe fn GetPatchAt(
&self,
index: uint32_t,
_retval: *mut *const nsIUpdatePatch
) -> nsresult
[src]
&self,
index: uint32_t,
_retval: *mut *const nsIUpdatePatch
) -> nsresult
/**
* Retrieves a patch.
* @param index
* The index of the patch to retrieve.
* @returns The nsIUpdatePatch at the specified index.
*/
nsIUpdatePatch getPatchAt (in unsigned long index);
pub unsafe fn Serialize(
&self,
updates: *const nsIDOMDocument,
_retval: *mut *const nsIDOMElement
) -> nsresult
[src]
&self,
updates: *const nsIDOMDocument,
_retval: *mut *const nsIDOMElement
) -> nsresult
/**
* Serializes this update object into a DOM Element
* @param updates
* The document to serialize into
* @returns The DOM Element created by the serialization process
*/
nsIDOMElement serialize (in nsIDOMDocument updates);
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 nsIUpdate
[src]
const IID: nsIID
IID: nsIID = nsID(3767844933, 62719, 16893, [146, 218, 205, 46, 255, 210, 199, 201])
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 nsIUpdate
[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 nsIUpdate
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.