]> git.sesse.net Git - vlc/blob - modules/gui/wxwidgets/dialogs/vlm/vlm_stream.cpp
a34ddbdf1ccb7ba22d3eac43838b67e72b94033d
[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 #if 0
25 #include "dialogs/vlm/vlm_stream.hpp"
26 #include "dialogs/vlm/vlm_wrapper.hpp"
27
28 /*****************************************************************************
29  * VLMStream class
30  *****************************************************************************/
31 VLMStream::VLMStream( intf_thread_t *_p_intf, vlm_media_t *_p_media,
32                       VLMWrapper * _p_vlm )
33 {
34     p_intf = _p_intf;
35     p_vlm = _p_vlm;
36     p_media = _p_media;
37 }
38
39 VLMStream::~VLMStream()
40 {
41 }
42
43 void VLMStream::Enable()
44 {
45     p_media->b_enabled = VLC_TRUE;
46 }
47
48 void VLMStream::Disable()
49 {
50     p_media->b_enabled = VLC_FALSE;
51 }
52
53 void VLMStream::Delete()
54 {
55     vlm_message_t *message;
56     string command = "del \"" + string( p_media->psz_name ) + "\"";
57     /* FIXME: Should be moved to vlm_Wrapper */
58     vlm_ExecuteCommand( p_vlm->GetVLM(), (char*)command.c_str(), & message );
59     vlm_MessageDelete( message );
60 }
61
62 /*****************************************************************************
63  * VLMBroadcastStream class
64  *****************************************************************************/
65 VLMBroadcastStream::VLMBroadcastStream( intf_thread_t *_p_intf,
66  vlm_media_t *_p_media, VLMWrapper *_p_vlm ): VLMStream( _p_intf, _p_media, _p_vlm )
67 {
68
69 }
70
71 VLMBroadcastStream::~VLMBroadcastStream()
72 {
73 }
74
75 void VLMBroadcastStream::Play()
76 {
77     vlm_message_t *message;
78     string command = "control \"" + string( p_media->psz_name ) + "\" play";
79     /* FIXME: Should be moved to vlm_Wrapper */
80     vlm_ExecuteCommand( p_vlm->GetVLM(), (char*)command.c_str(), & message );
81     vlm_MessageDelete( message );
82 }
83
84 void VLMBroadcastStream::Stop()
85 {
86     vlm_message_t *message;
87     string command = "control \"" + string( p_media->psz_name ) + "\" stop";
88     vlm_ExecuteCommand( p_vlm->GetVLM(), (char*)command.c_str(), & message );
89     vlm_MessageDelete( message );
90 }
91
92 void VLMBroadcastStream::Pause()
93 {
94     vlm_message_t *message;
95     string command = "control \"" + string( p_media->psz_name ) + "\" pause";
96     vlm_ExecuteCommand( p_vlm->GetVLM(), (char*)command.c_str(), & message );
97     vlm_MessageDelete( message );
98 }
99
100 /*****************************************************************************
101  * VLMVODStream class
102  *****************************************************************************/
103 VLMVODStream::VLMVODStream( intf_thread_t *_p_intf, vlm_media_t *_p_media,
104                 VLMWrapper *_p_vlm ): VLMStream( _p_intf, _p_media, _p_vlm )
105 {
106
107 }
108
109 VLMVODStream::~VLMVODStream()
110 {
111 }
112 #endif