summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorKai Sommerfeld <kso@openoffice.org>2001-09-07 08:16:19 +0000
committerKai Sommerfeld <kso@openoffice.org>2001-09-07 08:16:19 +0000
commita6f6d1d2cf166c916de71da7ea8f512ee120e065 (patch)
treea2bc3fff982d523fb7b472a9f055ca9b81bcfe39 /offapi
parent9bc6c9dd265a13a68f4f9353874ca7f7b828573f (diff)
#90677# - Added DuplicateCommandIdentifierException.
Diffstat (limited to 'offapi')
-rw-r--r--offapi/com/sun/star/ucb/DuplicateCommandIdentifierException.idl94
-rw-r--r--offapi/com/sun/star/ucb/XCommandProcessor.idl19
-rw-r--r--offapi/com/sun/star/ucb/makefile.mk5
3 files changed, 111 insertions, 7 deletions
diff --git a/offapi/com/sun/star/ucb/DuplicateCommandIdentifierException.idl b/offapi/com/sun/star/ucb/DuplicateCommandIdentifierException.idl
new file mode 100644
index 000000000000..6fc149c38de9
--- /dev/null
+++ b/offapi/com/sun/star/ucb/DuplicateCommandIdentifierException.idl
@@ -0,0 +1,94 @@
+/*************************************************************************
+ *
+ * $RCSfile: DuplicateCommandIdentifierException.idl,v $
+ *
+ * $Revision: 1.1 $
+ *
+ * last change: $Author: kso $ $Date: 2001-09-07 09:16:19 $
+ *
+ * The Contents of this file are made available subject to the terms of
+ * either of the following licenses
+ *
+ * - GNU Lesser General Public License Version 2.1
+ * - Sun Industry Standards Source License Version 1.1
+ *
+ * Sun Microsystems Inc., October, 2000
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2000 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ *
+ * Sun Industry Standards Source License Version 1.1
+ * =================================================
+ * The contents of this file are subject to the Sun Industry Standards
+ * Source License Version 1.1 (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.openoffice.org/license.html.
+ *
+ * Software provided under this License is provided on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
+ * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
+ * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
+ * See the License for the specific provisions governing your rights and
+ * obligations concerning the Software.
+ *
+ * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
+ *
+ * Copyright: 2000 by Sun Microsystems, Inc.
+ *
+ * All Rights Reserved.
+ *
+ * Contributor(s): _______________________________________
+ *
+ *
+ ************************************************************************/
+#ifndef __com_sun_star_ucb_DuplicateCommandIdentifierException_idl__
+#define __com_sun_star_ucb_DuplicateCommandIdentifierException_idl__
+
+#ifndef __com_sun_star_uno_Exception_idl__
+#include <com/sun/star/uno/Exception.idl>
+#endif
+
+
+//=============================================================================
+
+module com { module sun { module star { module ucb {
+
+//=============================================================================
+/** is thrown by <member>XCommandProcessor::execute</member> to indicate that
+ the same command identifier was used for two threads.
+
+ <p>Each thread must use it's own command identifier, which must be obtained
+ using <method>XcommandProcessor::createCommandIdentifier</method>. Command
+ identifier <code>0</code>, which indicates that the command shall never
+ be aborted by a client, can be used by any thread.
+
+ @version 1.0
+ @author Kai Sommerfeld
+ @see XCommandProcessor
+*/
+exception DuplicateCommandIdentifierException : com::sun::star::uno::Exception
+{
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif
diff --git a/offapi/com/sun/star/ucb/XCommandProcessor.idl b/offapi/com/sun/star/ucb/XCommandProcessor.idl
index be24f4b448cd..4664e44d9f49 100644
--- a/offapi/com/sun/star/ucb/XCommandProcessor.idl
+++ b/offapi/com/sun/star/ucb/XCommandProcessor.idl
@@ -2,9 +2,9 @@
*
* $RCSfile: XCommandProcessor.idl,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: sb $ $Date: 2001-08-20 15:32:40 $
+ * last change: $Author: kso $ $Date: 2001-09-07 09:16:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -112,13 +112,13 @@ interface XCommandProcessor : com::sun::star::uno::XInterface
<p>Also, after a call to <method>abort</method>, an identifier should
not be used any longer (and instead be released by a call to
- <method scope="com::sun::star::ucb::XCommandProcessor2">releaseCommandIdentifier</method>),
+ <member>XCommandProcessor2::releaseCommandIdentifier</member>),
because it may well abort <em>all</em> further calls to
<method>execute</method>.</p>
<p>To avoid ever-increasing resource consumption, the identifier
should be released via
- <method scope="com::sun::star::ucb::XCommandProcessor2">releaseCommandIdentifier</method>
+ <member>XCommandProcessor2::releaseCommandIdentifier</member>
when it is no longer used.</p>
@returns
@@ -138,7 +138,13 @@ interface XCommandProcessor : com::sun::star::uno::XInterface
@param CommandId
is a unique id for the command. This identifier was obtained by calling
<member>XCommandProcessor::createCommandIdentifier</member>. A value of
- zero can be used, if the command never shall be aborted.
+ zero can be used, if the command never shall be aborted. Different
+ threads MUST NOT share one command identifier (except <code>0</code>).
+ This can easily achieved, if every thread that wants to use an
+ <type>XCommandProcessor</type>, obtains exactly one identifier
+ using <member>XCommandProcessor::createCommandIdentifier</member>.
+ This identifier can be used for every call to
+ <member>XCommandProcessor::execute</member> done by that thread.
@param Environment
is the execution environment.
@@ -149,6 +155,9 @@ interface XCommandProcessor : com::sun::star::uno::XInterface
@throws CommandAbortedException
to indicate that the command was aborted.
+ @throws DuplicateCommandIdentifierException
+ to indicate that two threads tried to use the same command identifier
+
@throws Exception
if an error occured during the execution of the command.
*/
diff --git a/offapi/com/sun/star/ucb/makefile.mk b/offapi/com/sun/star/ucb/makefile.mk
index 60302b328453..e7737aeea019 100644
--- a/offapi/com/sun/star/ucb/makefile.mk
+++ b/offapi/com/sun/star/ucb/makefile.mk
@@ -2,9 +2,9 @@
#
# $RCSfile: makefile.mk,v $
#
-# $Revision: 1.30 $
+# $Revision: 1.31 $
#
-# last change: $Author: sb $ $Date: 2001-08-20 15:33:04 $
+# last change: $Author: kso $ $Date: 2001-09-07 09:16:19 $
#
# The Contents of this file are made available subject to the terms of
# either of the following licenses
@@ -115,6 +115,7 @@ IDLFILES=\
DefaultHierarchyDataSource.idl\
DocumentHeaderField.idl\
DocumentStoreMode.idl\
+ DuplicateCommandIdentifierException.idl\
DuplicateProviderException.idl\
DynamicResultSet.idl\
Error.idl\