fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / include / avmedia / mediaitem.hxx
blobf142819993077d874082050e051fdda3ea4fa5d7
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 #ifndef AVMEDIA_MEDIAITEM_HXX
21 #define AVMEDIA_MEDIAITEM_HXX
23 #include <boost/scoped_ptr.hpp>
25 #include <tools/rtti.hxx>
26 #include <svl/poolitem.hxx>
27 #include <com/sun/star/media/ZoomLevel.hpp>
28 #include <com/sun/star/frame/XModel.hpp>
29 #include <avmedia/avmediadllapi.h>
31 #define AVMEDIA_SETMASK_NONE ((sal_uInt32)(0x00000000))
32 #define AVMEDIA_SETMASK_STATE ((sal_uInt32)(0x00000001))
33 #define AVMEDIA_SETMASK_DURATION ((sal_uInt32)(0x00000002))
34 #define AVMEDIA_SETMASK_TIME ((sal_uInt32)(0x00000004))
35 #define AVMEDIA_SETMASK_LOOP ((sal_uInt32)(0x00000008))
36 #define AVMEDIA_SETMASK_MUTE ((sal_uInt32)(0x00000010))
37 #define AVMEDIA_SETMASK_VOLUMEDB ((sal_uInt32)(0x00000020))
38 #define AVMEDIA_SETMASK_ZOOM ((sal_uInt32)(0x00000040))
39 #define AVMEDIA_SETMASK_URL ((sal_uInt32)(0x00000080))
40 #define AVMEDIA_SETMASK_ALL ((sal_uInt32)(0xffffffff))
42 class SvStream;
44 namespace avmedia
47 //---------------
48 // - MediaState -
49 // --------------
51 enum MediaState
53 MEDIASTATE_STOP = 0,
54 MEDIASTATE_PLAY = 1,
55 MEDIASTATE_PLAYFFW = 2,
56 MEDIASTATE_PAUSE = 3
59 // -------------
60 // - MediaItem -
61 // -------------
63 class AVMEDIA_DLLPUBLIC MediaItem : public SfxPoolItem
65 public:
66 TYPEINFO();
68 explicit MediaItem( sal_uInt16 const i_nWhich = 0,
69 sal_uInt32 const nMaskSet = AVMEDIA_SETMASK_NONE );
70 MediaItem( const MediaItem& rMediaItem );
71 virtual ~MediaItem();
73 virtual int operator==( const SfxPoolItem& ) const;
74 virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
75 virtual SfxItemPresentation GetPresentation( SfxItemPresentation ePres,
76 SfxMapUnit eCoreUnit,
77 SfxMapUnit ePresUnit,
78 OUString& rText,
79 const IntlWrapper *pIntl ) const;
80 virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
81 virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
83 void merge( const MediaItem& rMediaItem );
85 sal_uInt32 getMaskSet() const;
87 void setState( MediaState eState );
88 MediaState getState() const;
90 void setDuration( double fDuration );
91 double getDuration() const;
93 void setTime( double fTime );
94 double getTime() const;
96 void setLoop( bool bLoop );
97 bool isLoop() const;
99 void setMute( bool bMute );
100 bool isMute() const;
102 void setVolumeDB( sal_Int16 nDB );
103 sal_Int16 getVolumeDB() const;
105 void setZoom( ::com::sun::star::media::ZoomLevel eZoom );
106 ::com::sun::star::media::ZoomLevel getZoom() const;
108 void setURL( const OUString& rURL,
109 OUString const*const pTempURL);
110 const OUString& getURL() const;
112 const OUString& getTempURL() const;
114 private:
116 struct Impl;
117 ::boost::scoped_ptr<Impl> m_pImpl;
120 typedef ::avmedia::MediaItem avmedia_MediaItem;
122 bool AVMEDIA_DLLPUBLIC EmbedMedia(
123 ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>
124 const& xModel,
125 OUString const& rSourceURL,
126 OUString & o_rEmbeddedURL);
130 #endif
132 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */