update IDL interfaces and add some new ones

This commit is contained in:
alecf%netscape.com 1999-02-23 02:19:53 +00:00
parent 8c62ee8873
commit b4478fcc51
6 changed files with 132 additions and 19 deletions

View File

@ -23,10 +23,19 @@ include $(DEPTH)/config/autoconf.mk
IDLSRCS = \
nsISupports.idl \
nsISupportsArray.idl \
nsIShutdownListener.idl \
nsIServiceManager.idl \
nsIFactory.idl \
nsIBaseStream.idl \
nsIInputStream.idl \
$(NULL)
# for testing purposes
#EXPORTS = \
# nsIServiceManager.h \
# nsIShutdownListener.h \
# $(NULL)
include $(topsrcdir)/config/rules.mk

View File

@ -0,0 +1,26 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.idl"
[object, uuid(6ccb17a0-e95e-11d1-beae-00805f8a66dc)]
interface nsIBaseStream : nsISupports {
void Close();
};

View File

@ -0,0 +1,33 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsIBaseStream.idl"
[object, uuid[022396f0-93b5-11d1-895b-006008911b81)]
interface nsIInputStream : nsIBaseStream {
unsigned long GetLength();
/* this is really an out char buf, but I don't know how to express
* that in IDL */
unsigned long Read(in string aBuf,
in unsigned long aOffset,
in unsigned long aCount,
out unsigned long aReadCount);
};

View File

@ -19,26 +19,45 @@
#include "nsISupports.idl"
#include "nsIShutdownListener.idl"
%{C++
#define NS_ERROR_SERVICE_NOT_FOUND NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 22)
#define NS_ERROR_SERVICE_IN_USE NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 23)
#define NS_ISERVICEMANAGER_IID \
{ /* cf0df3b0-3401-11d2-8163-006008119d7a */ \
0xcf0df3b0, \
0x3401, \
0x11d2, \
{0x81, 0x63, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \
}
%}
interface nsIServiceManager : nsISupports {
nsISupports GetServiceByProgID(in string progid);
nsISupports ReleaseServiceByProgID(in string progid,
in nsISupports service);
nsISupports ShutdownServiceByProgID(in string progid);
nsISupports GetServiceWithListener(in nsCIDRef aClass,
in nsIIDRef aIID,
in nsIShutdownListener listener);
nsISupports GetService(in nsCIDRef aClass,
in nsIIDRef aIID);
/* ProgID related stuff */
nsISupports GetServiceByProgID(in string progid, in nsIIDRef aIID);
void ReleaseServiceByProgID(in string progid,
in nsISupports service);
void ShutdownServiceByProgID(in string progid);
void ReleaseServiceWithListener(in nsCIDRef aClass,
in nsISupports service,
in nsIShutdownListener listener);
/* ClassID stuff */
nsISupports GetService(in nsCIDRef aClass,
in nsIIDRef aIID);
nsISupports GetServiceWithListener(in nsCIDRef aClass,
in nsIIDRef aIID,
in nsIShutdownListener listener);
void ReleaseService(in nsCIDRef aClass,
in nsISupports service);
void ReleaseService(in nsCIDRef aClass,
in nsISupports service);
void ShutdownService(in nsCIDRef aClass);
void ShutdownService(in nsCIDRef aClass);
void ReleaseServiceWithListener(in nsCIDRef aClass,
in nsISupports service,
in nsIShutdownListener listener);
};

View File

@ -22,6 +22,6 @@
[object, uuid(cf0df3b0-3401-11d2-8163-006008119d7a)]
interface nsIShutdownListener : nsISupports {
void OnShutdown(inout nsCID aClass, in nsISupports service);
void OnShutdown(in nsCIDRef aClass, in nsISupports service);
};

View File

@ -0,0 +1,26 @@
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Netscape Public License
* Version 1.0 (the "NPL"); you may not use this file except in
* compliance with the NPL. You may obtain a copy of the NPL at
* http://www.mozilla.org/NPL/
*
* Software distributed under the NPL is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
* for the specific language governing rights and limitations under the
* NPL.
*
* The Initial Developer of this code under the NPL is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
* Reserved.
*/
#include "nsISupports.h"
[object, uid(791eafa0-b9e6-11d1-8031-006008159b5a)]
interface nsISupportsArray : nsISupports {
/* most of this is too complex to represent in IDL right now */
};