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 .
21 #ifndef _MCNTTYPE_HXX_
22 #define _MCNTTYPE_HXX_
24 #include <cppuhelper/compbase1.hxx>
25 #include <rtl/ustring.hxx>
26 #include <sal/types.h>
27 #include <com/sun/star/lang/IllegalArgumentException.hpp>
28 #include <com/sun/star/datatransfer/XMimeContentType.hpp>
32 class CMimeContentType
: public
33 cppu::WeakImplHelper1
< com::sun::star::datatransfer::XMimeContentType
>
36 CMimeContentType( const OUString
& aCntType
);
38 //-------------------------------------------
40 //-------------------------------------------
42 virtual OUString SAL_CALL
getMediaType( ) throw(::com::sun::star::uno::RuntimeException
);
43 virtual OUString SAL_CALL
getMediaSubtype( ) throw(::com::sun::star::uno::RuntimeException
);
44 virtual OUString SAL_CALL
getFullMediaType( ) throw(::com::sun::star::uno::RuntimeException
);
46 virtual ::com::sun::star::uno::Sequence
< OUString
> SAL_CALL
getParameters( )
47 throw(::com::sun::star::uno::RuntimeException
);
49 virtual sal_Bool SAL_CALL
hasParameter( const OUString
& aName
)
50 throw(::com::sun::star::uno::RuntimeException
);
52 virtual OUString SAL_CALL
getParameterValue( const OUString
& aName
)
53 throw(::com::sun::star::container::NoSuchElementException
, ::com::sun::star::uno::RuntimeException
);
56 void SAL_CALL
init( const OUString
& aCntType
) throw( com::sun::star::lang::IllegalArgumentException
);
57 void SAL_CALL
getSym( void );
58 void SAL_CALL
acceptSym( const OUString
& pSymTlb
);
59 void SAL_CALL
skipSpaces( void );
60 void SAL_CALL
type( void );
61 void SAL_CALL
subtype( void );
62 void SAL_CALL
trailer( void );
63 OUString SAL_CALL
pName( );
64 OUString SAL_CALL
pValue( );
65 OUString SAL_CALL
quotedPValue( );
66 OUString SAL_CALL
nonquotedPValue( );
67 void SAL_CALL
comment( void );
68 sal_Bool SAL_CALL
isInRange( const OUString
& aChr
, const OUString
& aRange
);
71 ::osl::Mutex m_aMutex
;
73 OUString m_MediaSubtype
;
74 OUString m_ContentType
;
75 std::map
< OUString
, OUString
> m_ParameterMap
;
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */