fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / avmedia / source / viewer / mediawindowbase_impl.hxx
blobcbdb536bab49f4867d1334ff2cb2d0a9c6f78ee2
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_MEDIAWINDOWBASE_IMPL_HXX
21 #define AVMEDIA_MEDIAWINDOWBASE_IMPL_HXX
23 #include <avmedia/mediawindow.hxx>
25 #include <com/sun/star/media/XPlayer.hpp>
26 #include <com/sun/star/media/XPlayerWindow.hpp>
29 namespace avmedia
31 namespace priv
33 // --------------
34 // - UpdateMode -
35 // --------------
37 enum UpdateMode
39 UPDATEMODE_SYNC_STATUSBAR = 0,
40 UPDATEMODE_SYNC_PLAYER = 1,
41 UPDATEMODE_SYNC_NONE = 2
44 // -----------------------
45 // - MediaWindowBaseImpl -
46 // -----------------------
48 class MediaWindowBaseImpl
50 public:
52 MediaWindowBaseImpl( MediaWindow* pMediaWindow );
53 virtual ~MediaWindowBaseImpl();
55 virtual void cleanUp();
56 virtual void onURLChanged();
58 static ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > createPlayer( const OUString& rURL );
60 void setURL( const OUString& rURL, OUString const& rTempURL );
62 const OUString& getURL() const;
64 bool isValid() const;
66 Size getPreferredSize() const;
68 bool setZoom( ::com::sun::star::media::ZoomLevel eLevel );
69 ::com::sun::star::media::ZoomLevel getZoom() const;
71 bool start();
72 void stop();
74 bool isPlaying() const;
76 double getDuration() const;
78 void setMediaTime( double fTime );
79 double getMediaTime() const;
81 double getRate() const;
83 void setPlaybackLoop( bool bSet );
84 bool isPlaybackLoop() const;
86 void setFixedAspectRatio( bool bSet );
87 bool isFixedAspectRatio() const;
89 void setMute( bool bSet );
90 bool isMute() const;
92 void setVolumeDB( sal_Int16 nVolumeDB );
93 sal_Int16 getVolumeDB() const;
95 void updateMediaItem( MediaItem& rItem ) const;
96 void executeMediaItem( const MediaItem& rItem );
98 protected:
100 void stopPlayingInternal( bool );
102 MediaWindow* getMediaWindow() const;
103 inline sal_Bool isMediaWindowJavaBased() const { return( mbIsMediaWindowJavaBased ); }
105 ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > getPlayer() const;
107 void setPlayerWindow( const ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow >& rxPlayerWindow );
108 ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow > getPlayerWindow() const;
110 private:
111 OUString maFileURL;
112 OUString mTempFileURL;
113 ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayer > mxPlayer;
114 ::com::sun::star::uno::Reference< ::com::sun::star::media::XPlayerWindow > mxPlayerWindow;
115 MediaWindow* mpMediaWindow;
116 sal_Bool mbIsMediaWindowJavaBased;
121 #endif
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */