1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: mcnttype.hxx,v $
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 ************************************************************************/
32 #ifndef _MCNTTYPE_HXX_
33 #define _MCNTTYPE_HXX_
35 //------------------------------------------------------------------------
37 //------------------------------------------------------------------------
39 #include <cppuhelper/compbase1.hxx>
40 #include <rtl/ustring.hxx>
41 #include <sal/types.h>
42 #include <com/sun/star/lang/IllegalArgumentException.hpp>
43 #include <com/sun/star/datatransfer/XMimeContentType.hpp>
47 //------------------------------------------------------------------------
49 //------------------------------------------------------------------------
51 class CMimeContentType
: public
52 cppu::WeakImplHelper1
< com::sun::star::datatransfer::XMimeContentType
>
55 CMimeContentType( const rtl::OUString
& aCntType
);
57 //-------------------------------------------
59 //-------------------------------------------
61 virtual ::rtl::OUString SAL_CALL
getMediaType( ) throw(::com::sun::star::uno::RuntimeException
);
62 virtual ::rtl::OUString SAL_CALL
getMediaSubtype( ) throw(::com::sun::star::uno::RuntimeException
);
63 virtual ::rtl::OUString SAL_CALL
getFullMediaType( ) throw(::com::sun::star::uno::RuntimeException
);
65 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getParameters( )
66 throw(::com::sun::star::uno::RuntimeException
);
68 virtual sal_Bool SAL_CALL
hasParameter( const ::rtl::OUString
& aName
)
69 throw(::com::sun::star::uno::RuntimeException
);
71 virtual ::rtl::OUString SAL_CALL
getParameterValue( const ::rtl::OUString
& aName
)
72 throw(::com::sun::star::container::NoSuchElementException
, ::com::sun::star::uno::RuntimeException
);
75 void SAL_CALL
init( const rtl::OUString
& aCntType
) throw( com::sun::star::lang::IllegalArgumentException
);
76 void SAL_CALL
getSym( void );
77 void SAL_CALL
acceptSym( const rtl::OUString
& pSymTlb
);
78 void SAL_CALL
skipSpaces( void );
79 void SAL_CALL
type( void );
80 void SAL_CALL
subtype( void );
81 void SAL_CALL
trailer( void );
82 rtl::OUString SAL_CALL
pName( );
83 rtl::OUString SAL_CALL
pValue( );
84 rtl::OUString SAL_CALL
quotedPValue( );
85 rtl::OUString SAL_CALL
nonquotedPValue( );
86 void SAL_CALL
comment( void );
87 sal_Bool SAL_CALL
isInRange( const rtl::OUString
& aChr
, const rtl::OUString
& aRange
);
90 ::osl::Mutex m_aMutex
;
91 rtl::OUString m_MediaType
;
92 rtl::OUString m_MediaSubtype
;
93 rtl::OUString m_ContentType
;
94 std::map
< rtl::OUString
, rtl::OUString
> m_ParameterMap
;
96 rtl::OUString m_nxtSym
;