Initial revision. They don't work.

This commit is contained in:
waterson%netscape.com 1999-03-03 01:19:11 +00:00
Родитель 8fd5c2d239
Коммит 8277d976d7
11 изменённых файлов: 252 добавлений и 0 удалений

44
rdf/base/idl/Makefile.in Normal file
Просмотреть файл

@ -0,0 +1,44 @@
#!gmake
# 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.
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
IDLSRCS = \
nsIRDFCursor.idl \
nsIRDFArcsInCursor.idl \
nsIRDFArcsOutCursor.idl \
nsIRDFAssertionCursor.idl \
nsIRDFDataSource.idl \
nsIRDFLiteral.idl \
nsIRDFNode.idl \
nsIRDFObserver.idl \
nsIRDFResource.idl \
nsIRDFResourceCursor.idl \
$(NULL)
# for testing purposes
EXPORTS = $(IDLSRCS:.idl=.h)
# to build in the static methods
CPPSRCS = $(IDLSRCS:.idl=.cpp)
LIBRARY_NAME = rdfidl
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -0,0 +1,10 @@
#include "nsIRDFCursor.idl"
#include "nsIRDFResource.idl"
#include "nsIRDFNode.idl"
[uuid(1ED57102-9904-11d2-8EBA-00805F29F370)]
interface nsIRDFArcsInCursor : nsIRDFCursor {
readonly attribute nsIRDFNode Object;
readonly attribute nsIRDFResource Predicate;
};

Просмотреть файл

@ -0,0 +1,10 @@
#include "nsIRDFCursor.idl"
#include "nsIRDFResource.idl"
#include "nsIRDFNode.idl"
[uuid(1ED57101-9904-11d2-8EBA-00805F29F370)]
interface nsIRDFArcsOutCursor : nsIRDFCursor {
readonly attribute nsIRDFResource Subject;
readonly attribute nsIRDFResource Predicate;
};

Просмотреть файл

@ -0,0 +1,15 @@
#include "nsIRDFCursor.idl"
interface nsIRDFNode;
interface nsIRDFResource;
[
object, uuid(1ED57100-9904-11d2-8EBA-00805F29F370)
]
interface nsIRDFAssertionCursor : nsIRDFCursor {
readonly attribute nsIRDFResource Subject;
readonly attribute nsIRDFResource Predicate;
//readonly attribute nsIRDFNode Object;
readonly attribute boolean TruthValue;
};

Просмотреть файл

@ -0,0 +1,13 @@
#include "nsISupports.idl"
#include "nsIRDFNode.idl"
#include "nsIRDFDataSource.idl"
interface nsIRDFDataSource;
[uuid(1C2ABDB0-4CEF-11D2-BC16-00805F912FE7)]
interface nsIRDFCursor : nsISupports {
void Advance();
readonly attribute nsIRDFDataSource DataSource;
readonly attribute nsIRDFNode Value;
};

Просмотреть файл

@ -0,0 +1,63 @@
#include "nsISupports.idl"
#include "nsIRDFResource.idl"
#include "nsIRDFAssertionCursor.idl"
#include "nsIRDFArcsInCursor.idl"
#include "nsIRDFArcsOutCursor.idl"
#include "nsIRDFResourceCursor.idl"
#include "nsIRDFObserver.idl"
[uuid(0F78DA58-8321-11d2-8EAC-00805F29F370)]
interface nsIRDFDataSource : nsISupports {
void Init(in string uri);
readonly attribute string URI;
nsIRDFResource GetSource(in nsIRDFResource aProperty,
in nsIRDFNode aTarget,
in boolean aTruthValue);
nsIRDFAssertionCursor GetSources(in nsIRDFResource aProperty,
in nsIRDFNode aTarget,
in boolean aTruthValue);
nsIRDFNode GetTarget(in nsIRDFResource aSource,
in nsIRDFResource aProperty,
in boolean aTruthValue);
nsIRDFAssertionCursor GetTargets(in nsIRDFResource aSource,
in nsIRDFResource aProperty,
in boolean aTruthValue);
void Assert(in nsIRDFResource aSource,
in nsIRDFResource aProperty,
in nsIRDFNode aTarget,
in boolean aTruthValue);
void Unassert(in nsIRDFResource aSource,
in nsIRDFResource aProperty,
in nsIRDFNode aTarget);
boolean HasAssertion(in nsIRDFResource aSource,
in nsIRDFResource aProperty,
in nsIRDFNode aTarget,
in boolean aTruthValue);
void AddObserver(in nsIRDFObserver aObserver);
void RemoveObserver(in nsIRDFObserver aObserver);
nsIRDFArcsInCursor ArcLabelsIn(in nsIRDFNode aNode);
nsIRDFArcsOutCursor ArcLabelsOut(in nsIRDFResource aSource);
nsIRDFResourceCursor GetAllResources();
void Flush();
boolean IsCommandEnabled(in string aCommand,
in nsIRDFResource aCommandTarget);
void DoCommand(in string aCommand,
in nsIRDFResource aCommandTarget);
};

Просмотреть файл

@ -0,0 +1,7 @@
#include "nsIRDFNode.idl"
[uuid(E0C493D2-9542-11d2-8EB8-00805F29F370)]
interface nsIRDFLiteral : nsIRDFNode {
readonly attribute wstring Value;
boolean EqualsLiteral(in nsIRDFLiteral literal);
};

Просмотреть файл

@ -0,0 +1,56 @@
/* -*- 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.idl"
[
object, uuid(0F78DA50-8321-11d2-8EAC-00805F29F370)
]
/**
*
* Nodes are created using an instance of nsIRDFService, which
* should be obtained from the service manager:
*
* nsIRDFService* service;
* if (NS_SUCCEEDED(nsServiceManager::GetService(kCRDFServiceCID,
* kIRDFServiceIID,
* (nsISupports**) &service))) {
* nsIRDFNode* node;
* if (NS_SUCCEEDED(service->GetResource("http://foo.bar/", node))) {
* // do something useful here...
* NS_IF_RELEASE(node);
* }
* nsServiceManager::ReleaseService(kCRDFServiceCID, mgr);
* }
*
*/
interface nsIRDFNode : nsISupports {
/**
* Called by nsIRDFService after constructing a resource object to
* initialize it's URI.
*/
void Init(in string uri);
/**
* Determine if two nodes are identical
*/
boolean EqualsNode(in nsIRDFNode aNode);
};

Просмотреть файл

@ -0,0 +1,15 @@
#include "nsISupports.idl"
#include "nsIRDFNode.idl"
#include "nsIRDFResource.idl"
[uuid(3CC75360-484A-11D2-BC16-00805F912FE7)]
interface nsIRDFObserver : nsISupports {
void OnAssert(in nsIRDFResource aSubject,
in nsIRDFResource aPredicate,
in nsIRDFNode aObject);
void OnUnassert(in nsIRDFResource aSubject,
in nsIRDFResource aPredicate,
in nsIRDFNode aObject);
};

Просмотреть файл

@ -0,0 +1,11 @@
#include "nsIRDFNode.idl"
[uuid(E0C493D1-9542-11d2-8EB8-00805F29F370)]
interface nsIRDFResource : nsIRDFNode {
readonly attribute string Value;
boolean EqualsResource(in nsIRDFResource resource);
boolean EqualsString(in string uri);
};

Просмотреть файл

@ -0,0 +1,8 @@
#include "nsIRDFCursor.idl"
#include "nsIRDFResource.idl"
[uuid(C2850C10-B0CF-11d2-A684-00104BDE6048)]
interface nsIRDFResourceCursor : nsIRDFCursor {
attribute readonly nsIRDFResource Resource;
};