1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#ifndef __com_sun_star_xml_crypto_xxmlsecuritycontext_idl_
21#define __com_sun_star_xml_crypto_xxmlsecuritycontext_idl_
22
23#include <com/sun/star/uno/XInterface.idl>
24#include <com/sun/star/security/SecurityInfrastructureException.idl>
25#include <com/sun/star/xml/crypto/XSecurityEnvironment.idl>
26
27module com { module sun { module star { module xml { module crypto {
28
29/**
30 * Interface of XML security context
31 *
32 * <p>This interface specifies a certain signature context. By signature
33 * context, the signer or verifier retrieves key specification.</p>
34 */
35interface XXMLSecurityContext : com::sun::star::uno::XInterface
36{
37    /**
38     * Add personal security environment , and return the index of the added environment.
39     */
40    long addSecurityEnvironment( [in] XSecurityEnvironment aSecurityEnvironment
41    ) raises( com::sun::star::security::SecurityInfrastructureException ) ;
42
43    /**
44     * Get the number of security environments
45     */
46    long getSecurityEnvironmentNumber( ) ;
47
48    /**
49     * Get personal security environment
50     */
51    com::sun::star::xml::crypto::XSecurityEnvironment getSecurityEnvironmentByIndex([in] long index ) ;
52
53    /**
54     * An handy method to get the first personal security environment.
55     * In XMLSec/NSS, the first personal security environment should be the "internal slot"
56     */
57    com::sun::star::xml::crypto::XSecurityEnvironment getSecurityEnvironment( ) ;
58
59    /**
60     * Get the ID of the internal security environment
61     */
62    long getDefaultSecurityEnvironmentIndex( ) ;
63
64    /**
65     * set the ID of the internal security environment
66     */
67    void setDefaultSecurityEnvironmentIndex([in] long index ) ;
68
69} ;
70
71} ; } ; } ; } ; } ;
72
73#endif
74
75/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
76