Struct xpcom::interfaces::nsICommandLineRunner
[−]
[src]
#[repr(C)]pub struct nsICommandLineRunner { /* fields omitted */ }
interface nsICommandLineRunner : nsICommandLine
/**
* Extension of nsICommandLine that allows for initialization of new command lines
* and running the command line actions by processing the command line handlers.
*
* @status INTERNAL - This interface is not meant for use by embedders, and is
* not intended to be frozen. If you are an embedder and need
* functionality provided by this interface, talk to Benjamin
* Smedberg <benjamin@smedbergs.us>.
*/
Methods
impl nsICommandLineRunner
[src]
pub fn coerce<T: nsICommandLineRunnerCoerce>(&self) -> &T
[src]
Cast this nsICommandLineRunner
to one of its base interfaces.
impl nsICommandLineRunner
[src]
pub unsafe fn SetWindowContext(&self, aWindow: *const nsIDOMWindow) -> nsresult
[src]
/**
* Set the windowContext parameter.
*/
void setWindowContext (in nsIDOMWindow aWindow);
pub unsafe fn Run(&self) -> nsresult
[src]
/**
* Process the command-line handlers in the proper order, calling "handle()" on
* each.
*
* @throws NS_ERROR_ABORT if any handler throws NS_ERROR_ABORT. All other errors
* thrown by handlers will be silently ignored.
*/
void run ();
pub unsafe fn GetHelpText(&self, aHelpText: &mut nsACString) -> nsresult
[src]
/**
* Process and combine the help text provided by each command-line handler.
*/
readonly attribute AUTF8String helpText;
Methods from Deref<Target = nsICommandLine>
pub fn coerce<T: nsICommandLineCoerce>(&self) -> &T
[src]
Cast this nsICommandLine
to one of its base interfaces.
pub const STATE_INITIAL_LAUNCH: i64
pub const STATE_REMOTE_AUTO: i64
pub const STATE_REMOTE_EXPLICIT: i64
pub unsafe fn GetLength(&self, aLength: *mut int32_t) -> nsresult
[src]
/**
* Number of arguments in the command line. The application name is not
* part of the command line.
*/
readonly attribute long length;
pub unsafe fn GetArgument(
&self,
aIndex: int32_t,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
aIndex: int32_t,
_retval: &mut nsAString
) -> nsresult
/**
* Get an argument from the array of command-line arguments.
*
* On windows, flags of the form /flag are normalized to -flag. /flag:param
* are normalized to -flag param.
*
* On *nix and mac flags of the form --flag are normalized to -flag. --flag=param
* are normalized to the form -flag param.
*
* @param aIndex The argument to retrieve. This index is 0-based, and does
* not include the application name.
* @return The indexth argument.
* @throws NS_ERROR_INVALID_ARG if aIndex is out of bounds.
*/
AString getArgument (in long aIndex);
pub unsafe fn FindFlag(
&self,
aFlag: &nsAString,
aCaseSensitive: bool,
_retval: *mut int32_t
) -> nsresult
[src]
&self,
aFlag: &nsAString,
aCaseSensitive: bool,
_retval: *mut int32_t
) -> nsresult
/**
* Find a command-line flag.
*
* @param aFlag The flag name to locate. Do not include the initial
* hyphen.
* @param aCaseSensitive Whether to do case-sensitive comparisons.
* @return The position of the flag in the command line.
*/
long findFlag (in AString aFlag, in boolean aCaseSensitive);
pub unsafe fn RemoveArguments(&self, aStart: int32_t, aEnd: int32_t) -> nsresult
[src]
/**
* Remove arguments from the command line. This normally occurs after
* a handler has processed the arguments.
*
* @param aStart Index to begin removing.
* @param aEnd Index to end removing, inclusive.
*/
void removeArguments (in long aStart, in long aEnd);
pub unsafe fn HandleFlag(
&self,
aFlag: &nsAString,
aCaseSensitive: bool,
_retval: *mut bool
) -> nsresult
[src]
&self,
aFlag: &nsAString,
aCaseSensitive: bool,
_retval: *mut bool
) -> nsresult
/**
* A helper method which will find a flag and remove it in one step.
*
* @param aFlag The flag name to find and remove.
* @param aCaseSensitive Whether to do case-sensitive comparisons.
* @return Whether the flag was found.
*/
boolean handleFlag (in AString aFlag, in boolean aCaseSensitive);
pub unsafe fn HandleFlagWithParam(
&self,
aFlag: &nsAString,
aCaseSensitive: bool,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
aFlag: &nsAString,
aCaseSensitive: bool,
_retval: &mut nsAString
) -> nsresult
/**
* Find a flag with a parameter and remove both. This is a helper
* method that combines "findFlag" and "removeArguments" in one step.
*
* @return null (a void astring) if the flag is not found. The parameter value
* if found. Note that null and the empty string are not the same.
* @throws NS_ERROR_INVALID_ARG if the flag exists without a parameter
*
* @param aFlag The flag name to find and remove.
* @param aCaseSensitive Whether to do case-sensitive flag search.
*/
AString handleFlagWithParam (in AString aFlag, in boolean aCaseSensitive);
pub unsafe fn GetState(&self, aState: *mut uint32_t) -> nsresult
[src]
/**
* The type of command line being processed.
*
* STATE_INITIAL_LAUNCH is the first launch of the application instance.
* STATE_REMOTE_AUTO is a remote command line automatically redirected to
* this instance.
* STATE_REMOTE_EXPLICIT is a remote command line explicitly redirected to
* this instance using xremote/windde/appleevents.
*/
readonly attribute unsigned long state;
pub unsafe fn GetPreventDefault(&self, aPreventDefault: *mut bool) -> nsresult
[src]
/**
* There may be a command-line handler which performs a default action if
* there was no explicit action on the command line (open a default browser
* window, for example). This flag allows the default action to be prevented.
*/
attribute boolean preventDefault;
pub unsafe fn SetPreventDefault(&self, aPreventDefault: bool) -> nsresult
[src]
/**
* There may be a command-line handler which performs a default action if
* there was no explicit action on the command line (open a default browser
* window, for example). This flag allows the default action to be prevented.
*/
attribute boolean preventDefault;
pub unsafe fn GetWorkingDirectory(
&self,
aWorkingDirectory: *mut *const nsIFile
) -> nsresult
[src]
&self,
aWorkingDirectory: *mut *const nsIFile
) -> nsresult
/**
* The working directory for this command line. Use this property instead
* of the working directory for the current process, since a redirected
* command line may have had a different working directory.
*/
readonly attribute nsIFile workingDirectory;
pub unsafe fn GetWindowContext(
&self,
aWindowContext: *mut *const nsIDOMWindow
) -> nsresult
[src]
&self,
aWindowContext: *mut *const nsIDOMWindow
) -> nsresult
/**
* A window to be targeted by this command line. In most cases, this will
* be null (xremote will sometimes set this attribute).
*/
readonly attribute nsIDOMWindow windowContext;
pub unsafe fn ResolveFile(
&self,
aArgument: &nsAString,
_retval: *mut *const nsIFile
) -> nsresult
[src]
&self,
aArgument: &nsAString,
_retval: *mut *const nsIFile
) -> nsresult
/**
* Resolve a file-path argument into an nsIFile. This method gracefully
* handles relative or absolute file paths, according to the working
* directory of this command line.
*
* @param aArgument The command-line argument to resolve.
*/
nsIFile resolveFile (in AString aArgument);
pub unsafe fn ResolveURI(
&self,
aArgument: &nsAString,
_retval: *mut *const nsIURI
) -> nsresult
[src]
&self,
aArgument: &nsAString,
_retval: *mut *const nsIURI
) -> nsresult
/**
* Resolves a URI argument into a URI. This method has platform-specific
* logic for converting an absolute URI or a relative file-path into the
* appropriate URI object; it gracefully handles win32 C:\ paths which would
* confuse the ioservice if passed directly.
*
* @param aArgument The command-line argument to resolve.
*/
nsIURI resolveURI (in AString aArgument);
Trait Implementations
impl XpCom for nsICommandLineRunner
[src]
const IID: nsIID
IID: nsIID = nsID(3388119404, 45658, 19773, [130, 31, 76, 208, 196, 188, 138, 251])
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 nsICommandLineRunner
[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 nsICommandLineRunner
[src]
type Target = nsICommandLine
The resulting type after dereferencing.
fn deref(&self) -> &nsICommandLine
[src]
Dereferences the value.