merge the formfield patch from ooo-build
[ooovba.git] / offapi / com / sun / star / security / XDocumentDigitalSignatures.idl
blob439d66788bffb94b509dc79cc840e0d989471c20
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XDocumentDigitalSignatures.idl,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 //i20156 - new file for xmlsecurity module
33 /** -- idl definition -- **/
35 #ifndef __com_sun_star_security_XDocumentDigitalSignatures_idl_
36 #define __com_sun_star_security_XDocumentDigitalSignatures_idl_
38 #include <com/sun/star/uno/XInterface.idl>
39 #include <com/sun/star/io/XInputStream.idl>
40 #include <com/sun/star/io/XStream.idl>
41 #include <com/sun/star/embed/XStorage.idl>
42 #include <com/sun/star/security/DocumentSignatureInformation.idl>
43 #include <com/sun/star/security/XCertificate.idl>
45 module com { module sun { module star { module security {
47 /** interface for signing and verifying digital signatures in office documents
49 <p>
50 This interface can be used to digitaly sign different content in a office document.
51 It can also be used to verify digital signatures.
52 </p>
55 interface XDocumentDigitalSignatures : com::sun::star::uno::XInterface
57 /** signs the content of the document including text and pictures.
59 <p>Macros will not be signed.</p>
61 boolean signDocumentContent( [in] ::com::sun::star::embed::XStorage xStorage,
62 [in] ::com::sun::star::io::XStream xSignStream);
64 /** checks for digital signatures and their status.
66 <p>Only document content will be checked.</p>
68 sequence< com::sun::star::security::DocumentSignatureInformation > verifyDocumentContentSignatures(
69 [in] ::com::sun::star::embed::XStorage xStorage,
70 [in] ::com::sun::star::io::XInputStream xSignInStream );
72 /** shows the digital signatures of the document content
74 void showDocumentContentSignatures(
75 [in] ::com::sun::star::embed::XStorage xStorage,
76 [in] ::com::sun::star::io::XInputStream xSignInStream );
78 /** allows to get the default stream name for storing of the signature of
79 the document content.
81 string getDocumentContentSignatureDefaultStreamName();
83 /** signs the content of the Scripting including macros and basic dialogs
85 <p>The rest of document content will not be signed.</p>
87 boolean signScriptingContent( [in] ::com::sun::star::embed::XStorage xStorage,
88 [in] ::com::sun::star::io::XStream xSignStream);
90 /** checks for digital signatures and their status.
92 <p>Only Scripting content will be checked.</p>
94 sequence< com::sun::star::security::DocumentSignatureInformation > verifyScriptingContentSignatures(
95 [in] ::com::sun::star::embed::XStorage xStorage,
96 [in] ::com::sun::star::io::XInputStream xSignInStream );
98 /** shows the digital signatures of the scripting content
100 void showScriptingContentSignatures(
101 [in] ::com::sun::star::embed::XStorage xStorage,
102 [in] ::com::sun::star::io::XInputStream xSignInStream );
104 /** allows to get the default stream name for storing of the signature of
105 the scripting content.
107 string getScriptingContentSignatureDefaultStreamName();
109 /** signs the full Package, which means everything in the storage excecpt the content of META-INF
111 boolean signPackage( [in] ::com::sun::star::embed::XStorage Storage,
112 [in] ::com::sun::star::io::XStream xSignStream);
114 /** checks for digital signatures and their status.
116 <p>Only Package content will be checked.</p>
118 sequence< com::sun::star::security::DocumentSignatureInformation > verifyPackageSignatures(
119 [in] ::com::sun::star::embed::XStorage Storage,
120 [in] ::com::sun::star::io::XInputStream xSignInStream );
122 /** shows the digital signatures of the package
124 void showPackageSignatures(
125 [in] ::com::sun::star::embed::XStorage xStorage,
126 [in] ::com::sun::star::io::XInputStream xSignInStream );
128 /** allows to get the default stream name for storing of the signature of
129 the package.
131 string getPackageSignatureDefaultStreamName();
134 void showCertificate( [in] com::sun::star::security::XCertificate Certificate );
137 /** manages trusted sources (Authors and pathes )
140 void manageTrustedSources();
141 boolean isAuthorTrusted( [in] com::sun::star::security::XCertificate Author );
142 boolean isLocationTrusted( [in] string Location );
144 // These method should raise confirmation dialog, so it can not used from bad macros...
145 void addAuthorToTrustedSources( [in] com::sun::star::security::XCertificate Author );
146 void addLocationToTrustedSources( [in] string Location );
152 } ; } ; } ; } ;
154 #endif