1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_script_XLibraryContainerPassword_idl__
20 #define __com_sun_star_script_XLibraryContainerPassword_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
24 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
26 #include
<com
/sun
/star
/container
/NoSuchElementException.idl
>
30 module com
{ module sun
{ module star
{ module script
{
34 Extension of XLibraryContainer to provide password functionality.
35 This interface should be implemented together with XLibraryContainer2
38 published
interface XLibraryContainerPassword
: com
::sun
::star
::uno
::XInterface
41 Returns true if the accessed library item is protected
44 If a library with the this name doesn't exist a
45 com::sun::star::container::NoSuchElementException is thrown.
47 boolean isLibraryPasswordProtected
( [in] string Name
)
48 raises
( com
::sun
::star
::container
::NoSuchElementException
);
51 Returns true if the accessed library item is protected by a
52 password (see isLibraryPasswordProtected) and the password
53 was already verified with verifyLibraryPassword or if an
54 initial password was set with changeLibraryPassword.
56 If a library with the this name doesn't exist a
57 com::sun::star::container::NoSuchElementException is thrown.
59 If the library exists but isn't password protected a
60 com::sun::star::lang::IllegalArgumentException is thrown.
62 boolean isLibraryPasswordVerified
( [in] string Name
)
63 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
64 com
::sun
::star
::container
::NoSuchElementException
);
67 Verifies the library's password. If the correct password
68 was passed, the method returns true and further calls to
69 isLibraryPasswordVerified will also return true.
71 If a library with the this name doesn't exist a
72 com::sun::star::container::NoSuchElementException is thrown.
74 If the library exists but isn't password protected a
75 com::sun::star::lang::IllegalArgumentException is thrown.
77 If the library password is already verified a
78 com::sun::star::lang::IllegalArgumentException is thrown.
80 boolean verifyLibraryPassword
( [in] string Name
, [in] string Password
)
81 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
82 com
::sun
::star
::container
::NoSuchElementException
);
85 Changes the library's password.
87 If the library wasn't password protected before:
88 The OldPassword parameter has to be an empty string.
89 Afterwards calls to isLibraryPasswordProtected and
90 isLibraryPasswordVerified for this library will
93 If the library already was password protected:
94 The OldPassword parameter has to be set to the
95 previous defined password. If then the NewPassword
96 parameter is an empty string the library password
97 protection will be disabled afterwards (afterwards
98 calls to isLibraryPasswordProtected for this library
99 will return false). If the NewPassword parameter is
100 not an empty string it will accepted as the new
101 password for the library.
103 If a library with the this name doesn't exist but isn't
104 com::sun::star::container::NoSuchElementException is thrown.
106 If the library exists and is password protected and a
107 wrong OldPassword is passed to the method a
108 com::sun::star::lang::IllegalArgumentException is thrown.
110 If the library exists and isn't password protected and
111 the OldPassword isn't an empty string or the library is
113 com::sun::star::lang::IllegalArgumentException is thrown.
115 void changeLibraryPassword
( [in] string Name
,
116 [in] string OldPassword
, [in] string NewPassword
)
117 raises
( com
::sun
::star
::lang
::IllegalArgumentException
,
118 com
::sun
::star
::container
::NoSuchElementException
);
128 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */