]> git.sesse.net Git - vlc/blob - modules/gui/wxwidgets/dialogs/vlm/vlm_stream.cpp
Uniformize source files encoding
[vlc] / modules / gui / wxwidgets / dialogs / vlm / vlm_stream.cpp
1 /*****************************************************************************
2  * vlm_stream.cpp : Implementation of the VLMStream class hierarchy
3  *****************************************************************************
4  * Copyright (C) 2000-2005 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #include "dialogs/vlm/vlm_stream.hpp"
25 #include "dialogs/vlm/vlm_wrapper.hpp"
26
27 /*****************************************************************************
28  * VLMStream class
29  *****************************************************************************/
30 VLMStream::VLMStream( intf_thread_t *_p_intf, vlm_media_t *_p_media,
31                       VLMWrapper * _p_vlm )
32 {
33     p_intf = _p_intf;
34     p_vlm = _p_vlm;
35     p_media = _p_media;
36 }
37
38 VLMStream::~VLMStream()
39 {
40 }
41
42 void VLMStream::Enable()
43 {
44     p_media->b_enabled = VLC_TRUE;
45 }
46
47 void VLMStream::Disable()
48 {
49     p_media->b_enabled = VLC_FALSE;
50 }
51
52 void VLMStream::Delete()
53 {
54     vlm_message_t *message;
55     string command = "del " + string( p_media->psz_name );
56     /* FIXME: Should be moved to vlm_Wrapper */
57     vlm_ExecuteCommand( p_vlm->GetVLM(), (char*)command.c_str(), & message );
58     vlm_MessageDelete( message );
59 }
60
61 /*****************************************************************************
62  * VLMBroadcastStream class
63  *****************************************************************************/
64 VLMBroadcastStream::VLMBroadcastStream( intf_thread_t *_p_intf,
65  vlm_media_t *_p_media, VLMWrapper *_p_vlm ): VLMStream( _p_intf, _p_media, _p_vlm )
66 {
67
68 }
69
70 VLMBroadcastStream::~VLMBroadcastStream()
71 {
72 }
73
74 void VLMBroadcastStream::Play()
75 {
76     vlm_message_t *message;
77     string command = "control " + string( p_media->psz_name ) + " play";
78     /* FIXME: Should be moved to vlm_Wrapper */
79     vlm_ExecuteCommand( p_vlm->GetVLM(), (char*)command.c_str(), & message );
80     vlm_MessageDelete( message );
81 }
82
83 void VLMBroadcastStream::Stop()
84 {
85     vlm_message_t *message;
86     string command = "control " + string( p_media->psz_name ) + " stop";
87     vlm_ExecuteCommand( p_vlm->GetVLM(), (char*)command.c_str(), & message );
88     vlm_MessageDelete( message );
89 }
90
91 void VLMBroadcastStream::Pause()
92 {
93     vlm_message_t *message;
94     string command = "control " + string( p_media->psz_name ) + " pause";
95     vlm_ExecuteCommand( p_vlm->GetVLM(), (char*)command.c_str(), & message );
96     vlm_MessageDelete( message );
97 }
98
99 /*****************************************************************************
100  * VLMVODStream class
101  *****************************************************************************/
102 VLMVODStream::VLMVODStream( intf_thread_t *_p_intf, vlm_media_t *_p_media,
103                 VLMWrapper *_p_vlm ): VLMStream( _p_intf, _p_media, _p_vlm )
104 {
105
106 }
107
108 VLMVODStream::~VLMVODStream()
109 {
110 }