Back to index

lightning-sunbird  0.9+nobinonly
Classes | Defines
nsICmdLineHandler.idl File Reference
import "nsISupports.idl";
#include "nsCOMPtr.h"
#include "nsIComponentManager.h"
#include "nsICategoryManager.h"
#include "nsIFile.h"
#include "nsIServiceManager.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

interface  nsICmdLineHandler

Defines

#define COMMAND_LINE_ARGUMENT_HANDLERS   "command-line-argument-handlers"
#define PREF_STARTUP_PREFIX   "general.startup."
#define CMDLINEHANDLER_REGISTERPROC_DECLS
#define CMDLINEHANDLER_GETDEFAULTARGS_IMPL(macro_class, macro_default_args)
#define CMDLINEHANDLER_GETCHROMEURL_IMPL(macro_class, macro_chrome_url)
#define CMDLINEHANDLER_OTHERS_IMPL(macro_class, macro_cmd_line_arg, macro_pref_name, macro_help_text, macro_handles_args, macro_open_window_with_args)
#define CMDLINEHANDLER_REGISTERPROC_IMPL(macro_class, macro_pretty_name, macro_contractid)
#define CMDLINEHANDLER1_IMPL(macro_class, macro_cmd_line_arg, macro_pref_name, macro_help_text, macro_handles_args, macro_default_args, macro_open_window_with_args)
#define CMDLINEHANDLER2_IMPL(macro_class, macro_cmd_line_arg, macro_pref_name, macro_chrome_url, macro_help_text, macro_contractid, macro_pretty_name, macro_handles_args, macro_open_window_with_args)
#define CMDLINEHANDLER_IMPL(macro_class, macro_cmd_line_arg, macro_pref_name, macro_chrome_url, macro_help_text, macro_contractid, macro_pretty_name, macro_handles_args, macro_default_args, macro_open_window_with_args)
#define CMDLINEHANDLER3_IMPL(macro_class, macro_cmd_line_arg, macro_pref_name, macro_help_text, macro_contractid, macro_pretty_name, macro_handles_args, macro_default_args, macro_open_window_with_args)

Define Documentation

#define CMDLINEHANDLER1_IMPL (   macro_class,
  macro_cmd_line_arg,
  macro_pref_name,
  macro_help_text,
  macro_handles_args,
  macro_default_args,
  macro_open_window_with_args 
)
Value:
CMDLINEHANDLER_OTHERS_IMPL(macro_class, macro_cmd_line_arg,macro_pref_name,\
                           macro_help_text, macro_handles_args, \
                           macro_open_window_with_args)

Definition at line 129 of file nsICmdLineHandler.idl.

#define CMDLINEHANDLER2_IMPL (   macro_class,
  macro_cmd_line_arg,
  macro_pref_name,
  macro_chrome_url,
  macro_help_text,
  macro_contractid,
  macro_pretty_name,
  macro_handles_args,
  macro_open_window_with_args 
)
Value:
CMDLINEHANDLER_OTHERS_IMPL(macro_class,macro_cmd_line_arg,macro_pref_name,\
                           macro_help_text, macro_handles_args, \
                           macro_open_window_with_args) \
CMDLINEHANDLER_REGISTERPROC_IMPL(macro_class, macro_pretty_name, \
                                 macro_contractid) \
CMDLINEHANDLER_GETCHROMEURL_IMPL(macro_class,macro_chrome_url)

Definition at line 141 of file nsICmdLineHandler.idl.

#define CMDLINEHANDLER3_IMPL (   macro_class,
  macro_cmd_line_arg,
  macro_pref_name,
  macro_help_text,
  macro_contractid,
  macro_pretty_name,
  macro_handles_args,
  macro_default_args,
  macro_open_window_with_args 
)
Value:
CMDLINEHANDLER_GETDEFAULTARGS_IMPL(macro_class,macro_default_args)\
CMDLINEHANDLER_OTHERS_IMPL(macro_class,macro_cmd_line_arg,macro_pref_name,\
                           macro_help_text, macro_handles_args, \
                           macro_open_window_with_args) \
CMDLINEHANDLER_REGISTERPROC_IMPL(macro_class, macro_pretty_name, \
                                    macro_contractid)

Definition at line 175 of file nsICmdLineHandler.idl.

#define CMDLINEHANDLER_GETCHROMEURL_IMPL (   macro_class,
  macro_chrome_url 
)
Value:
NS_IMETHODIMP macro_class::GetChromeUrlForTask(char **aChromeUrlForTask) \
{ \
    if (!aChromeUrlForTask) return NS_ERROR_FAILURE; \
    *aChromeUrlForTask = PL_strdup(macro_chrome_url); \
    return NS_OK; \
}

Definition at line 67 of file nsICmdLineHandler.idl.

#define CMDLINEHANDLER_GETDEFAULTARGS_IMPL (   macro_class,
  macro_default_args 
)
Value:
NS_IMETHODIMP macro_class::GetDefaultArgs(PRUnichar **aDefaultArgs) \
{ \
    if (!aDefaultArgs) return NS_ERROR_FAILURE; \
    *aDefaultArgs = ToNewUnicode(nsDependentCString(macro_default_args)); \
    return NS_OK; \
}

Definition at line 59 of file nsICmdLineHandler.idl.

#define CMDLINEHANDLER_IMPL (   macro_class,
  macro_cmd_line_arg,
  macro_pref_name,
  macro_chrome_url,
  macro_help_text,
  macro_contractid,
  macro_pretty_name,
  macro_handles_args,
  macro_default_args,
  macro_open_window_with_args 
)
Value:
CMDLINEHANDLER_GETDEFAULTARGS_IMPL(macro_class,macro_default_args) \
CMDLINEHANDLER2_IMPL(macro_class,macro_cmd_line_arg,macro_pref_name, \
                     macro_chrome_url,macro_help_text, macro_contractid, \
                     macro_pretty_name, macro_handles_args, \
                     macro_open_window_with_args)

Definition at line 158 of file nsICmdLineHandler.idl.

#define CMDLINEHANDLER_OTHERS_IMPL (   macro_class,
  macro_cmd_line_arg,
  macro_pref_name,
  macro_help_text,
  macro_handles_args,
  macro_open_window_with_args 
)
Value:
NS_IMETHODIMP macro_class::GetCommandLineArgument(char **aCommandLineArgument) \
{ \
    if (!aCommandLineArgument) return NS_ERROR_FAILURE; \
    *aCommandLineArgument = PL_strdup(macro_cmd_line_arg); \
    return NS_OK; \
} \
NS_IMETHODIMP macro_class::GetPrefNameForStartup(char **aPrefNameForStartup) \
{ \
    if (!aPrefNameForStartup) return NS_ERROR_FAILURE; \
    *aPrefNameForStartup = PL_strdup(macro_pref_name); \
    return NS_OK; \
} \
NS_IMETHODIMP macro_class::GetHelpText(char **aHelpText) \
{ \
    if (!aHelpText) return NS_ERROR_FAILURE; \
    *aHelpText = PL_strdup(macro_help_text); \
    return NS_OK; \
} \
NS_IMETHODIMP macro_class::GetHandlesArgs(PRBool *aHandlesArgs) \
{ \
    if (!aHandlesArgs) return NS_ERROR_FAILURE; \
    *aHandlesArgs = macro_handles_args; \
    return NS_OK; \
} \
NS_IMETHODIMP macro_class::GetOpenWindowWithArgs(PRBool *aOpenWindowWithArgs) \
{ \
    if (!aOpenWindowWithArgs) return NS_ERROR_FAILURE; \
    *aOpenWindowWithArgs = macro_open_window_with_args; \
    return NS_OK; \
}

Definition at line 75 of file nsICmdLineHandler.idl.

Value:

Definition at line 55 of file nsICmdLineHandler.idl.

#define CMDLINEHANDLER_REGISTERPROC_IMPL (   macro_class,
  macro_pretty_name,
  macro_contractid 
)
Value:
NS_METHOD macro_class::RegisterProc(nsIComponentManager *aCompMgr, nsIFile *aPath, const char *registryLocation, const char *componentType, const nsModuleComponentInfo *info) \
{ \
    nsresult rv; \
    nsCOMPtr<nsICategoryManager> catman = do_GetService("@mozilla.org/categorymanager;1", &rv); \
    if (NS_FAILED(rv)) return rv; \
    nsXPIDLCString prevEntry; \
    rv = catman->AddCategoryEntry(COMMAND_LINE_ARGUMENT_HANDLERS, macro_pretty_name, macro_contractid, PR_TRUE, PR_TRUE, getter_Copies(prevEntry)); \
       return NS_OK; \
} \
NS_METHOD macro_class::UnregisterProc(nsIComponentManager *aCompMgr, nsIFile *aPath, const char *registryLocation, const nsModuleComponentInfo *info) \
{ \
    nsresult rv; \
    nsCOMPtr<nsICategoryManager> catman = do_GetService("@mozilla.org/categorymanager;1", &rv); \
    if (NS_FAILED(rv)) return rv; \
    rv = catman->DeleteCategoryEntry(COMMAND_LINE_ARGUMENT_HANDLERS, macro_contractid, PR_TRUE); \
    return NS_OK; \
}

Definition at line 107 of file nsICmdLineHandler.idl.

Definition at line 44 of file nsICmdLineHandler.idl.

#define PREF_STARTUP_PREFIX   "general.startup."

Definition at line 45 of file nsICmdLineHandler.idl.