1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24
25#ifndef __com_sun_star_datatransfer_XMimeContentType_idl__
26#define __com_sun_star_datatransfer_XMimeContentType_idl__
27
28#ifndef __com_sun_star_uno_XInterface_idl__
29#include <com/sun/star/uno/XInterface.idl>
30#endif
31
32#ifndef __com_sun_star_container_NoSuchElementException_idl__
33#include <com/sun/star/container/NoSuchElementException.idl>
34#endif
35
36module com { module sun { module star { module datatransfer {
37
38//-------------------------------------------------------------------------
39/** An implementation of this interface represents a MIME content-type that
40	is conform to <a href="ftp://ftp.isi.edu/in-notes/rfc2045.txt">Rfc2045</a> and
41	<a href="ftp://ftp.isi.edu/in-notes/rfc2046.txt">Rfc2046</a>.
42	Instances that implement this interface could be created using the
43	interface <type>XMimeContentTypeFactory</type>.
44*/
45
46published interface XMimeContentType : com::sun::star::uno::XInterface
47{
48	//-------------------------------------------------------------------------
49	/** To get the media type of the MIME content-type.
50
51		@returns
52		The media type of the MIME content-type.
53	*/
54	string getMediaType( );
55
56	//-------------------------------------------------------------------------
57	/** To get the media subtype of the MIME content-type.
58
59		@returns
60		The media subtype of the MIME content-type.
61	*/
62	string getMediaSubtype( );
63
64	//-------------------------------------------------------------------------
65	/** To get the full media/submedia type of the MIME content-type.
66
67		@returns
68		The full media/submedia type of the MIME content-type.
69	*/
70	string getFullMediaType( );
71
72	//-------------------------------------------------------------------------
73	/** To get a list of parameters that the MIME content-type contains.
74
75		@returns
76		A list of the names of all parameters of the MIME content-type.
77	*/
78	sequence< string > getParameters( );
79
80	//-------------------------------------------------------------------------
81	/** To query if a specific parameter is supported.
82
83		@param aName
84		The name of the parameter to query for.
85
86		@returns
87		A value of <TRUE/> if the MIME content-type has the specified parameter.
88		<p>A value of <FALSE/> if the MIME content-type has not the specified parameter.</p>
89	*/
90	boolean hasParameter( [in] string aName );
91
92	//-------------------------------------------------------------------------
93	/**	To get the value of a specified parameter.
94
95		@param aName
96		The name of the parameter for which the value is requested.
97
98		@returns
99		The value of the specified parameter.
100
101		@throws com::sun::star::container::NoSuchElementException
102		if the specified parameter doesn't exist.
103	*/
104	string getParameterValue( [in] string aName )
105		raises ( com::sun::star::container::NoSuchElementException );
106};
107
108}; }; }; };
109
110#endif
111
112