зеркало из https://github.com/mozilla/gecko-dev.git
IDLize nsICmdLineService
This commit is contained in:
Родитель
629f39c6ec
Коммит
2d4eaaa2bb
|
@ -5,10 +5,9 @@
|
|||
nsAppleEvents.h
|
||||
nsAppShellCIDs.h
|
||||
nsBuildID.h
|
||||
nsICmdLineService.h
|
||||
nsIWebShellWindow.h
|
||||
nsFileLocations.h
|
||||
nsIXULWindowCallbacks.h
|
||||
nsIDOMXPConnectFactory.h
|
||||
nsINetSupportDialogService.h
|
||||
nsISessionHistory.h
|
||||
nsISessionHistory.h
|
||||
|
|
|
@ -6,4 +6,6 @@ nsIFileLocator.idl
|
|||
nsIWindowMediator.idl
|
||||
nsIAppShellService.idl
|
||||
nsICommonDialogs.idl
|
||||
nsIDialogParamBlock.idl
|
||||
nsIDialogParamBlock.idl
|
||||
nsICmdLineService.idl
|
||||
|
||||
|
|
|
@ -31,13 +31,13 @@ XPIDLSRCS = \
|
|||
nsIWindowMediator.idl \
|
||||
nsICommonDialogs.idl \
|
||||
nsIDialogParamBlock.idl \
|
||||
nsICmdLineService.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
nsIWebShellWindow.h \
|
||||
nsAppShellCIDs.h \
|
||||
nsBuildID.h \
|
||||
nsICmdLineService.h \
|
||||
nsIXULWindowCallbacks.h \
|
||||
nsFileLocations.h \
|
||||
nsIDOMXPConnectFactory.h \
|
||||
|
|
|
@ -28,13 +28,13 @@ XPIDLSRCS = \
|
|||
.\nsIWindowMediator.idl \
|
||||
.\nsICommonDialogs.idl \
|
||||
.\nsIDialogParamBlock.idl \
|
||||
.\nsICmdLineService.idl \
|
||||
$(NULL)
|
||||
|
||||
EXPORTS = \
|
||||
nsIWebShellWindow.h \
|
||||
nsAppShellCIDs.h \
|
||||
nsBuildID.h \
|
||||
nsICmdLineService.h \
|
||||
nsIXULWindowCallbacks.h \
|
||||
nsIDOMXPConnectFactory.h \
|
||||
nsFileLocations.h \
|
||||
|
|
|
@ -17,43 +17,31 @@
|
|||
* Netscape Communications Corporation. All Rights Reserved.
|
||||
*/
|
||||
|
||||
#ifndef nsICmdLineService_h__
|
||||
#define nsICmdLineService_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsString.h"
|
||||
|
||||
/* Forward declarations... */
|
||||
class nsIFactory;
|
||||
|
||||
|
||||
// e34783f4-ac08-11d2-8d19-00805fc2500c
|
||||
#define NS_ICOMMANDLINE_SERVICE_IID \
|
||||
{ 0xe34783f4, 0xac08, 0x11d2, \
|
||||
{0x8d, 0x19, 0x00, 0x80, 0x5f, 0xc2, 0x50,0xc} }
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIFactory.idl"
|
||||
|
||||
%{C++
|
||||
// e34783f5-ac08-11d2-8d19-00805fc2500c
|
||||
#define NS_COMMANDLINE_SERVICE_CID \
|
||||
{ 0xe34783f5, 0xac08, 0x11d2, \
|
||||
{0x8d, 0x19, 0x00, 0x80, 0x5f, 0xc2, 0x50,0xc} }
|
||||
%}
|
||||
|
||||
|
||||
class nsICmdLineService : public nsISupports
|
||||
[ptr] native charArray(char*);
|
||||
[scriptable, uuid(e34783f4-ac08-11d2-8d19-00805fc2500c)]
|
||||
interface nsICmdLineService : nsISupports
|
||||
{
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOMMANDLINE_SERVICE_IID)
|
||||
|
||||
NS_IMETHOD Initialize(PRInt32 aArgc, char ** aArgv) = 0;
|
||||
NS_IMETHOD GetCmdLineValue(char * aArg, char ** aValue) = 0;
|
||||
NS_IMETHOD GetURLToLoad(char ** aResult) = 0;
|
||||
NS_IMETHOD GetProgramName(char ** aResult) = 0;
|
||||
NS_IMETHOD GetArgc(PRInt32 * aResult) = 0;
|
||||
NS_IMETHOD GetArgv(char ** aResult[]) = 0;
|
||||
string Initialize(in long argc);
|
||||
string getCmdLineValue(in string argc);
|
||||
readonly attribute string URLToLoad;
|
||||
readonly attribute string programName;
|
||||
readonly attribute long argc;
|
||||
[noscript] readonly attribute charArray argv;
|
||||
|
||||
};
|
||||
|
||||
|
||||
%{C++
|
||||
extern "C" NS_APPSHELL nsresult
|
||||
NS_NewCmdLineServiceFactory(nsIFactory** aFactory);
|
||||
%}
|
||||
|
||||
#endif /* nsICmdLineService_h__ */
|
|
@ -28,12 +28,10 @@
|
|||
|
||||
/* Define Class IDs */
|
||||
static NS_DEFINE_IID(kCmdLineServiceCID, NS_COMMANDLINE_SERVICE_CID);
|
||||
static NS_DEFINE_IID(kICommandLineIID, NS_ICOMMANDLINE_SERVICE_IID);
|
||||
|
||||
/* Define Interface IDs */
|
||||
|
||||
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
|
||||
static NS_DEFINE_IID(kICommandLineServiceIID, NS_ICOMMANDLINE_SERVICE_IID);
|
||||
|
||||
|
||||
class nsCmdLineService : public nsICmdLineService
|
||||
|
@ -44,7 +42,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Initialize(PRInt32 aArgc, char** aArgv);
|
||||
NS_IMETHOD GetCmdLineValue(char* aArg, char **aValue);
|
||||
NS_IMETHOD GetCmdLineValue(const char* aArg, char **aValue);
|
||||
NS_IMETHOD GetURLToLoad(char ** aResult);
|
||||
NS_IMETHOD GetProgramName(char ** aResult);
|
||||
NS_IMETHOD GetArgc(PRInt32 * aResult);
|
||||
|
@ -72,7 +70,7 @@ nsCmdLineService::nsCmdLineService()
|
|||
/*
|
||||
* Implement the nsISupports methods...
|
||||
*/
|
||||
NS_IMPL_ISUPPORTS(nsCmdLineService, kICommandLineServiceIID);
|
||||
NS_IMPL_ISUPPORTS1(nsCmdLineService, nsICmdLineService);
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCmdLineService::Initialize(int aArgc, char ** aArgv)
|
||||
|
@ -200,7 +198,7 @@ nsCmdLineService::GetProgramName(char ** aResult)
|
|||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCmdLineService::GetCmdLineValue(char * aArg, char ** aResult)
|
||||
nsCmdLineService::GetCmdLineValue(const char * aArg, char ** aResult)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
|
|
|
@ -0,0 +1,47 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "License"); you may not use this file except in
|
||||
* compliance with the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS"
|
||||
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
|
||||
* the License for the specific language governing rights and limitations
|
||||
* under the License.
|
||||
*
|
||||
* The Original Code is Mozilla Communicator client code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is Netscape Communications
|
||||
* Corporation. Portions created by Netscape are Copyright (C) 1998
|
||||
* Netscape Communications Corporation. All Rights Reserved.
|
||||
*/
|
||||
|
||||
#include "nsISupports.idl"
|
||||
#include "nsIFactory.idl"
|
||||
|
||||
%{C++
|
||||
// e34783f5-ac08-11d2-8d19-00805fc2500c
|
||||
#define NS_COMMANDLINE_SERVICE_CID \
|
||||
{ 0xe34783f5, 0xac08, 0x11d2, \
|
||||
{0x8d, 0x19, 0x00, 0x80, 0x5f, 0xc2, 0x50,0xc} }
|
||||
%}
|
||||
|
||||
[ptr] native charArray(char*);
|
||||
[scriptable, uuid(e34783f4-ac08-11d2-8d19-00805fc2500c)]
|
||||
interface nsICmdLineService : nsISupports
|
||||
{
|
||||
string Initialize(in long argc);
|
||||
string getCmdLineValue(in string argc);
|
||||
readonly attribute string URLToLoad;
|
||||
readonly attribute string programName;
|
||||
readonly attribute long argc;
|
||||
[noscript] readonly attribute charArray argv;
|
||||
|
||||
};
|
||||
|
||||
%{C++
|
||||
extern "C" NS_APPSHELL nsresult
|
||||
NS_NewCmdLineServiceFactory(nsIFactory** aFactory);
|
||||
%}
|
||||
|
|
@ -28,12 +28,10 @@
|
|||
|
||||
/* Define Class IDs */
|
||||
static NS_DEFINE_IID(kCmdLineServiceCID, NS_COMMANDLINE_SERVICE_CID);
|
||||
static NS_DEFINE_IID(kICommandLineIID, NS_ICOMMANDLINE_SERVICE_IID);
|
||||
|
||||
/* Define Interface IDs */
|
||||
|
||||
static NS_DEFINE_IID(kIFactoryIID, NS_IFACTORY_IID);
|
||||
static NS_DEFINE_IID(kICommandLineServiceIID, NS_ICOMMANDLINE_SERVICE_IID);
|
||||
|
||||
|
||||
class nsCmdLineService : public nsICmdLineService
|
||||
|
@ -44,7 +42,7 @@ public:
|
|||
NS_DECL_ISUPPORTS
|
||||
|
||||
NS_IMETHOD Initialize(PRInt32 aArgc, char** aArgv);
|
||||
NS_IMETHOD GetCmdLineValue(char* aArg, char **aValue);
|
||||
NS_IMETHOD GetCmdLineValue(const char* aArg, char **aValue);
|
||||
NS_IMETHOD GetURLToLoad(char ** aResult);
|
||||
NS_IMETHOD GetProgramName(char ** aResult);
|
||||
NS_IMETHOD GetArgc(PRInt32 * aResult);
|
||||
|
@ -72,7 +70,7 @@ nsCmdLineService::nsCmdLineService()
|
|||
/*
|
||||
* Implement the nsISupports methods...
|
||||
*/
|
||||
NS_IMPL_ISUPPORTS(nsCmdLineService, kICommandLineServiceIID);
|
||||
NS_IMPL_ISUPPORTS1(nsCmdLineService, nsICmdLineService);
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCmdLineService::Initialize(int aArgc, char ** aArgv)
|
||||
|
@ -200,7 +198,7 @@ nsCmdLineService::GetProgramName(char ** aResult)
|
|||
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsCmdLineService::GetCmdLineValue(char * aArg, char ** aResult)
|
||||
nsCmdLineService::GetCmdLineValue(const char * aArg, char ** aResult)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче