DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Untracked file

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
/*
 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /home/jenkins/src/releases/comm-beta/chat/components/public/imICommandsService.idl
 */

#ifndef __gen_imICommandsService_h__
#define __gen_imICommandsService_h__


#ifndef __gen_nsISupports_h__
#include "nsISupports.h"
#endif

#include "js/GCAnnotations.h"

/* For IDL files that don't want to include root IDL files. */
#ifndef NS_NO_VTABLE
#define NS_NO_VTABLE
#endif
class prplIConversation; /* forward declaration */


/* starting interface:    imICommand */
#define IMICOMMAND_IID_STR "b12b0d89-0e5b-499c-9567-37f2deacc182"

#define IMICOMMAND_IID \
  {0xb12b0d89, 0x0e5b, 0x499c, \
    { 0x95, 0x67, 0x37, 0xf2, 0xde, 0xac, 0xc1, 0x82 }}

class NS_NO_VTABLE imICommand : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(IMICOMMAND_IID)

  /* readonly attribute AUTF8String name; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetName(nsACString& aName) = 0;

  /* readonly attribute AUTF8String helpString; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetHelpString(nsACString& aHelpString) = 0;

  enum {
    CMD_CONTEXT_IM = 1,
    CMD_CONTEXT_CHAT = 2,
    CMD_CONTEXT_ALL = 3
  };

  /* readonly attribute long usageContext; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetUsageContext(int32_t *aUsageContext) = 0;

  enum {
    CMD_PRIORITY_LOW = -1000,
    CMD_PRIORITY_DEFAULT = 0,
    CMD_PRIORITY_PRPL = 1000,
    CMD_PRIORITY_HIGH = 4000
  };

  /* readonly attribute long priority; */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD GetPriority(int32_t *aPriority) = 0;

  /* boolean run (in AUTF8String aMessage, [optional] in prplIConversation aConversation, [optional] out prplIConversation aReturnedConv); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD Run(const nsACString& aMessage, prplIConversation *aConversation, prplIConversation **aReturnedConv, bool *_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(imICommand, IMICOMMAND_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_IMICOMMAND \
  NS_IMETHOD GetName(nsACString& aName) override; \
  NS_IMETHOD GetHelpString(nsACString& aHelpString) override; \
  NS_IMETHOD GetUsageContext(int32_t *aUsageContext) override; \
  NS_IMETHOD GetPriority(int32_t *aPriority) override; \
  NS_IMETHOD Run(const nsACString& aMessage, prplIConversation *aConversation, prplIConversation **aReturnedConv, bool *_retval) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_IMICOMMAND \
  nsresult GetName(nsACString& aName); \
  nsresult GetHelpString(nsACString& aHelpString); \
  nsresult GetUsageContext(int32_t *aUsageContext); \
  nsresult GetPriority(int32_t *aPriority); \
  nsresult Run(const nsACString& aMessage, prplIConversation *aConversation, prplIConversation **aReturnedConv, bool *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_IMICOMMAND(_to) \
  NS_IMETHOD GetName(nsACString& aName) override { return _to GetName(aName); } \
  NS_IMETHOD GetHelpString(nsACString& aHelpString) override { return _to GetHelpString(aHelpString); } \
  NS_IMETHOD GetUsageContext(int32_t *aUsageContext) override { return _to GetUsageContext(aUsageContext); } \
  NS_IMETHOD GetPriority(int32_t *aPriority) override { return _to GetPriority(aPriority); } \
  NS_IMETHOD Run(const nsACString& aMessage, prplIConversation *aConversation, prplIConversation **aReturnedConv, bool *_retval) override { return _to Run(aMessage, aConversation, aReturnedConv, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_IMICOMMAND(_to) \
  NS_IMETHOD GetName(nsACString& aName) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetName(aName); } \
  NS_IMETHOD GetHelpString(nsACString& aHelpString) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHelpString(aHelpString); } \
  NS_IMETHOD GetUsageContext(int32_t *aUsageContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUsageContext(aUsageContext); } \
  NS_IMETHOD GetPriority(int32_t *aPriority) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPriority(aPriority); } \
  NS_IMETHOD Run(const nsACString& aMessage, prplIConversation *aConversation, prplIConversation **aReturnedConv, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->Run(aMessage, aConversation, aReturnedConv, _retval); } 


/* starting interface:    imICommandsService */
#define IMICOMMANDSSERVICE_IID_STR "9a1accfd-9bd8-4548-aef7-e8107fc7839f"

#define IMICOMMANDSSERVICE_IID \
  {0x9a1accfd, 0x9bd8, 0x4548, \
    { 0xae, 0xf7, 0xe8, 0x10, 0x7f, 0xc7, 0x83, 0x9f }}

class NS_NO_VTABLE imICommandsService : public nsISupports {
 public:

  NS_DECLARE_STATIC_IID_ACCESSOR(IMICOMMANDSSERVICE_IID)

  /* void initCommands (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD InitCommands(void) = 0;

  /* void unInitCommands (); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UnInitCommands(void) = 0;

  /* void registerCommand (in imICommand aCommand, [optional] in AUTF8String aPrplId); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD RegisterCommand(imICommand *aCommand, const nsACString& aPrplId) = 0;

  /* void unregisterCommand (in AUTF8String aCommandName, [optional] in AUTF8String aPrplId); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD UnregisterCommand(const nsACString& aCommandName, const nsACString& aPrplId) = 0;

  /* void listCommandsForConversation ([optional] in prplIConversation aConversation, [optional] out unsigned long commandCount, [array, size_is (commandCount), retval] out imICommand commands); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ListCommandsForConversation(prplIConversation *aConversation, uint32_t *commandCount, imICommand ***commands) = 0;

  /* void listCommandsForProtocol (in AUTF8String aPrplId, [optional] out unsigned long commandCount, [array, size_is (commandCount), retval] out imICommand commands); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ListCommandsForProtocol(const nsACString& aPrplId, uint32_t *commandCount, imICommand ***commands) = 0;

  /* boolean executeCommand (in AUTF8String aMessage, [optional] in prplIConversation aConversation, [optional] out prplIConversation aReturnedConv); */
  JS_HAZ_CAN_RUN_SCRIPT NS_IMETHOD ExecuteCommand(const nsACString& aMessage, prplIConversation *aConversation, prplIConversation **aReturnedConv, bool *_retval) = 0;

};

  NS_DEFINE_STATIC_IID_ACCESSOR(imICommandsService, IMICOMMANDSSERVICE_IID)

/* Use this macro when declaring classes that implement this interface. */
#define NS_DECL_IMICOMMANDSSERVICE \
  NS_IMETHOD InitCommands(void) override; \
  NS_IMETHOD UnInitCommands(void) override; \
  NS_IMETHOD RegisterCommand(imICommand *aCommand, const nsACString& aPrplId) override; \
  NS_IMETHOD UnregisterCommand(const nsACString& aCommandName, const nsACString& aPrplId) override; \
  NS_IMETHOD ListCommandsForConversation(prplIConversation *aConversation, uint32_t *commandCount, imICommand ***commands) override; \
  NS_IMETHOD ListCommandsForProtocol(const nsACString& aPrplId, uint32_t *commandCount, imICommand ***commands) override; \
  NS_IMETHOD ExecuteCommand(const nsACString& aMessage, prplIConversation *aConversation, prplIConversation **aReturnedConv, bool *_retval) override; 

/* Use this macro when declaring the members of this interface when the
   class doesn't implement the interface. This is useful for forwarding. */
#define NS_DECL_NON_VIRTUAL_IMICOMMANDSSERVICE \
  nsresult InitCommands(void); \
  nsresult UnInitCommands(void); \
  nsresult RegisterCommand(imICommand *aCommand, const nsACString& aPrplId); \
  nsresult UnregisterCommand(const nsACString& aCommandName, const nsACString& aPrplId); \
  nsresult ListCommandsForConversation(prplIConversation *aConversation, uint32_t *commandCount, imICommand ***commands); \
  nsresult ListCommandsForProtocol(const nsACString& aPrplId, uint32_t *commandCount, imICommand ***commands); \
  nsresult ExecuteCommand(const nsACString& aMessage, prplIConversation *aConversation, prplIConversation **aReturnedConv, bool *_retval); 

/* Use this macro to declare functions that forward the behavior of this interface to another object. */
#define NS_FORWARD_IMICOMMANDSSERVICE(_to) \
  NS_IMETHOD InitCommands(void) override { return _to InitCommands(); } \
  NS_IMETHOD UnInitCommands(void) override { return _to UnInitCommands(); } \
  NS_IMETHOD RegisterCommand(imICommand *aCommand, const nsACString& aPrplId) override { return _to RegisterCommand(aCommand, aPrplId); } \
  NS_IMETHOD UnregisterCommand(const nsACString& aCommandName, const nsACString& aPrplId) override { return _to UnregisterCommand(aCommandName, aPrplId); } \
  NS_IMETHOD ListCommandsForConversation(prplIConversation *aConversation, uint32_t *commandCount, imICommand ***commands) override { return _to ListCommandsForConversation(aConversation, commandCount, commands); } \
  NS_IMETHOD ListCommandsForProtocol(const nsACString& aPrplId, uint32_t *commandCount, imICommand ***commands) override { return _to ListCommandsForProtocol(aPrplId, commandCount, commands); } \
  NS_IMETHOD ExecuteCommand(const nsACString& aMessage, prplIConversation *aConversation, prplIConversation **aReturnedConv, bool *_retval) override { return _to ExecuteCommand(aMessage, aConversation, aReturnedConv, _retval); } 

/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
#define NS_FORWARD_SAFE_IMICOMMANDSSERVICE(_to) \
  NS_IMETHOD InitCommands(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitCommands(); } \
  NS_IMETHOD UnInitCommands(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnInitCommands(); } \
  NS_IMETHOD RegisterCommand(imICommand *aCommand, const nsACString& aPrplId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterCommand(aCommand, aPrplId); } \
  NS_IMETHOD UnregisterCommand(const nsACString& aCommandName, const nsACString& aPrplId) override { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterCommand(aCommandName, aPrplId); } \
  NS_IMETHOD ListCommandsForConversation(prplIConversation *aConversation, uint32_t *commandCount, imICommand ***commands) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ListCommandsForConversation(aConversation, commandCount, commands); } \
  NS_IMETHOD ListCommandsForProtocol(const nsACString& aPrplId, uint32_t *commandCount, imICommand ***commands) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ListCommandsForProtocol(aPrplId, commandCount, commands); } \
  NS_IMETHOD ExecuteCommand(const nsACString& aMessage, prplIConversation *aConversation, prplIConversation **aReturnedConv, bool *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ExecuteCommand(aMessage, aConversation, aReturnedConv, _retval); } 

#define IM_COMMANDS_SERVICE_CONTRACTID \
  "@mozilla.org/chat/commands-service;1"

#endif /* __gen_imICommandsService_h__ */