1 /*****************************************************************************
2 * vlm.cpp : VLM Management
3 ****************************************************************************
4 * Copyright © 2008 the VideoLAN team
7 * Authors: Jean-Baptiste Kempf <jb@videolan.org>
8 * Jean-François Massol <jf.massol -at- gmail.com>
9 * Clément Sténac <zorglub@videolan.org>
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License as published by
13 * the Free Software Foundation; either version 2 of the License, or
14 * ( at your option ) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 51 Franklin street, Fifth Floor, Boston MA 02110-1301, USA.
24 *****************************************************************************/
30 #include "dialogs/vlm.hpp"
33 #include "dialogs/open.hpp"
34 #include "dialogs/sout.hpp"
38 #include <QVBoxLayout>
39 #include <QStackedWidget>
42 #include <QGridLayout>
45 #include <QToolButton>
47 #include <QPushButton>
48 #include <QHBoxLayout>
49 #include <QDateTimeEdit>
52 #include <QHeaderView>
53 #include <QScrollArea>
54 #include <QFileDialog>
56 static const char *psz_type[] = { "Broadcast", "Schedule", "VOD" };
58 VLMDialog *VLMDialog::instance = NULL;
60 VLMDialog::VLMDialog( QWidget *parent, intf_thread_t *_p_intf ) : QVLCDialog( parent, _p_intf )
62 p_vlm = vlm_New( p_intf );
66 msg_Warn( p_intf, "Couldn't build VLM object ");
69 vlmWrapper = new VLMWrapper( p_vlm );
73 ui.saveButton->hide();
75 #define ADDMEDIATYPES( str, type ) ui.mediaType->addItem( qtr( str ), QVariant( type ) );
76 ADDMEDIATYPES( "Broadcast", QVLM_Broadcast );
77 ADDMEDIATYPES( "Schedule", QVLM_Schedule );
78 ADDMEDIATYPES( "Video On Demand ( VOD )", QVLM_VOD );
82 QGridLayout *schetimelayout = new QGridLayout( ui.schedBox );
83 QLabel *schetimelabel = new QLabel( qtr( "Hours/Minutes/Seconds:" ) );
84 schetimelayout->addWidget( schetimelabel, 0, 0 );
85 QLabel *schedatelabel = new QLabel( qtr( "Day Month Year:" ) );
86 schetimelayout->addWidget( schedatelabel, 1, 0 );
87 QLabel *scherepeatLabel = new QLabel( qtr( "Repeat:" ) );
88 schetimelayout->addWidget( scherepeatLabel, 2, 0 );
89 QLabel *scherepeatTimeLabel = new QLabel( qtr( "Repeat delay:" ) );
90 schetimelayout->addWidget( scherepeatTimeLabel, 3, 0 );
92 time = new QDateTimeEdit( QTime::currentTime() );
93 time->setAlignment( Qt::AlignRight );
94 time->setDisplayFormat( "hh:mm:ss" );
95 schetimelayout->addWidget( time, 0, 1, 1, 3 );
97 date = new QDateTimeEdit( QDate::currentDate() );
98 date->setAlignment( Qt::AlignRight );
99 date->setCalendarPopup( true );
101 date->setDisplayFormat( "dd MM yyyy" );
103 date->setDisplayFormat( "dd MMMM yyyy" );
105 schetimelayout->addWidget( date, 1, 1, 1, 3 );
107 scherepeatnumber = new QSpinBox;
108 scherepeatnumber->setAlignment( Qt::AlignRight );
109 schetimelayout->addWidget( scherepeatnumber, 2, 1, 1, 3 );
111 repeatDays = new QSpinBox;
112 repeatDays->setAlignment( Qt::AlignRight );
113 schetimelayout->addWidget( repeatDays, 3, 1, 1, 1 );
114 repeatDays->setSuffix( qtr(" days") );
116 repeatTime = new QDateTimeEdit;
117 repeatTime->setAlignment( Qt::AlignRight );
118 schetimelayout->addWidget( repeatTime, 3, 2, 1, 2 );
119 repeatTime->setDisplayFormat( "hh:mm:ss" );
122 ui.vlmItemScroll->setFrameStyle( QFrame::NoFrame );
123 ui.vlmItemScroll->setWidgetResizable( true );
124 vlmItemWidget = new QWidget;
125 vlmItemLayout = new QVBoxLayout( vlmItemWidget );
126 vlmItemWidget->setLayout( vlmItemLayout );
127 ui.vlmItemScroll->setWidget( vlmItemWidget );
129 QSpacerItem *spacer =
130 new QSpacerItem( 10, 10, QSizePolicy::Minimum, QSizePolicy::Expanding);
131 vlmItemLayout->addItem( spacer );
133 QPushButton *importButton = new QPushButton( qtr( "Import" ) );
134 ui.buttonBox->addButton( importButton, QDialogButtonBox::ActionRole );
136 QPushButton *exportButton = new QPushButton( qtr( "Export" ) );
137 ui.buttonBox->addButton( exportButton, QDialogButtonBox::ActionRole );
139 QPushButton *closeButton = new QPushButton( qtr( "Close" ) );
140 ui.buttonBox->addButton( closeButton, QDialogButtonBox::AcceptRole );
143 showScheduleWidget( QVLM_Broadcast );
145 /* Connect the comboBox to show the right Widgets */
146 CONNECT( ui.mediaType, currentIndexChanged( int ),
147 this, showScheduleWidget( int ) );
149 /* Connect the leftList to show the good VLMItem */
150 CONNECT( ui.vlmListItem, currentRowChanged( int ),
151 this, selectVLMItem( int ) );
153 BUTTONACT( closeButton, close() );
154 BUTTONACT( exportButton, exportVLMConf() );
155 BUTTONACT( importButton, importVLMConf() );
156 BUTTONACT( ui.addButton, addVLMItem() );
157 BUTTONACT( ui.clearButton, clearWidgets() );
158 BUTTONACT( ui.saveButton, saveModifications() );
159 BUTTONACT( ui.inputButton, selectInput() );
160 BUTTONACT( ui.outputButton, selectOutput() );
163 VLMDialog::~VLMDialog()
165 /* FIXME :you have to destroy vlm here to close
166 * but we shouldn't destroy vlm here in case somebody else wants it */
167 msg_Dbg( p_intf, "Destroying VLM Dialog" );
172 void VLMDialog::showScheduleWidget( int i )
174 ui.schedBox->setVisible( ( i == QVLM_Schedule ) );
175 ui.loopBCast->setVisible( ( i == QVLM_Broadcast ) );
176 ui.vodBox->setVisible( ( i == QVLM_VOD ) );
179 void VLMDialog::selectVLMItem( int i )
182 ui.vlmItemScroll->ensureWidgetVisible( vlmItems.at( i ) );
185 bool VLMDialog::isNameGenuine( QString name )
187 for( int i = 0; i < vlmItems.size(); i++ )
189 if( vlmItems.at( i )->name == name )
195 void VLMDialog::addVLMItem()
197 int vlmItemCount = vlmItems.size();
199 /* Take the name and Check it */
200 QString name = ui.nameLedit->text();
201 if( name.isEmpty() || !isNameGenuine( name ) )
203 msg_Dbg( p_intf, "VLM Name is empty or already exists, I can't do it" );
207 int type = ui.mediaType->itemData( ui.mediaType->currentIndex() ).toInt();
209 QString typeShortName;
210 QString inputText = ui.inputLedit->text();
211 QString outputText = ui.outputLedit->text();
212 bool b_checked = ui.enableCheck->isChecked();
213 bool b_looped = ui.loopBCast->isChecked();
214 QDateTime schetime = time->dateTime();
215 QDateTime schedate = date->dateTime();
216 int repeatnum = scherepeatnumber->value();
217 int repeatdays = repeatDays->value();
218 VLMAWidget * vlmAwidget;
223 typeShortName = "Bcast";
224 vlmAwidget = new VLMBroadcast( name, inputText, outputText,
225 b_checked, b_looped, this );
226 VLMWrapper::AddBroadcast( name, inputText, outputText, b_checked,
230 typeShortName = "VOD";
231 vlmAwidget = new VLMVod( name, inputText, outputText,
232 b_checked, ui.muxLedit->text(), this );
233 VLMWrapper::AddVod( name, inputText, outputText, b_checked );
236 typeShortName = "Sched";
237 vlmAwidget = new VLMSchedule( name, inputText, outputText,
238 schetime, schedate, repeatnum,
239 repeatdays, b_checked, this );
240 VLMWrapper::AddSchedule( name, inputText, outputText, schetime,
241 schedate, repeatnum, repeatdays, b_checked);
244 msg_Warn( p_intf, "Something bad happened" );
248 /* Add an Item of the Side List */
249 ui.vlmListItem->addItem( typeShortName + " : " + name );
250 ui.vlmListItem->setCurrentRow( vlmItemCount - 1 );
252 /* Add a new VLMAWidget on the main List */
254 vlmItemLayout->insertWidget( vlmItemCount, vlmAwidget );
255 vlmItems.append( vlmAwidget );
259 // FIXME : VOD are not exported to the file
260 bool VLMDialog::exportVLMConf()
262 QString saveVLMConfFileName = QFileDialog::getSaveFileName(
263 this, qtr( "Choose a filename to save the VLM configuration..." ),
264 qfu( p_intf->p_libvlc->psz_homedir ),
265 qtr( "VLM conf (*.vlm) ;; All (*.*)" ) );
267 if( !saveVLMConfFileName.isEmpty() )
269 vlm_message_t *message;
270 QString command = "save \"" + saveVLMConfFileName + "\"";
271 vlm_ExecuteCommand( p_vlm , qtu( command ) , &message );
272 vlm_MessageDelete( message );
279 bool VLMDialog::importVLMConf()
281 QString openVLMConfFileName = QFileDialog::getOpenFileName(
282 this, qtr( "Choose a VLM configuration file to open..." ),
283 qfu( p_intf->p_libvlc->psz_homedir ),
284 qtr( "VLM conf (*.vlm) ;; All (*.*)" ) );
286 if( !openVLMConfFileName.isEmpty() )
288 vlm_message_t *message;
289 QString command = "load \"" + openVLMConfFileName + "\"";
290 vlm_ExecuteCommand( p_vlm, qtu( command ) , &message );
291 vlm_MessageDelete( message );
297 void VLMDialog::clearWidgets()
299 ui.nameLedit->clear();
300 ui.inputLedit->clear();
301 ui.outputLedit->clear();
302 time->setTime( QTime::currentTime() );
303 date->setDate( QDate::currentDate() );
304 ui.enableCheck->setChecked( true );
305 ui.nameLedit->setReadOnly( false );
306 ui.loopBCast->setChecked( false );
307 ui.muxLedit->clear();
308 ui.saveButton->hide();
309 ui.addButton->show();
312 void VLMDialog::selectInput()
314 OpenDialog *o = OpenDialog::getInstance( this, p_intf, SELECT, true );
316 ui.inputLedit->setText( o->getMRL() );
319 void VLMDialog::selectOutput()
321 SoutDialog *s = SoutDialog::getInstance( this, p_intf, false );
322 if( s->exec() == QDialog::Accepted )
323 ui.outputLedit->setText( s->getMrl() );
326 /* Object Modification */
327 void VLMDialog::removeVLMItem( VLMAWidget *vlmObj )
329 int index = vlmItems.indexOf( vlmObj );
330 if( index < 0 ) return;
331 delete ui.vlmListItem->takeItem( index );
332 vlmItems.removeAt( index );
335 /* HERE BE DRAGONS VLM REQUEST */
338 void VLMDialog::startModifyVLMItem( VLMAWidget *vlmObj )
340 currentIndex = vlmItems.indexOf( vlmObj );
341 if( currentIndex < 0 ) return;
343 msg_Dbg( p_intf, "Type: %i", vlmObj->type );
344 ui.vlmListItem->setCurrentRow( currentIndex );
345 ui.nameLedit->setText( vlmObj->name );
346 ui.inputLedit->setText( vlmObj->input );
347 ui.outputLedit->setText( vlmObj->output );
348 ui.enableCheck->setChecked( vlmObj->b_enabled );
350 switch( vlmObj->type )
353 ui.loopBCast->setChecked( (qobject_cast<VLMBroadcast *>(vlmObj))->b_looped );
356 ui.muxLedit->setText( (qobject_cast<VLMVod *>(vlmObj))->mux );
359 time->setDateTime( ( qobject_cast<VLMSchedule *>(vlmObj))->schetime );
360 date->setDateTime( ( qobject_cast<VLMSchedule *>(vlmObj))->schedate );
364 ui.nameLedit->setReadOnly( true );
365 ui.addButton->hide();
366 ui.saveButton->show();
369 void VLMDialog::saveModifications()
371 VLMAWidget *vlmObj = vlmItems.at( currentIndex );
374 vlmObj->input = ui.inputLedit->text();
375 vlmObj->output = ui.outputLedit->text();
376 vlmObj->setChecked( ui.enableCheck->isChecked() );
377 vlmObj->b_enabled = ui.enableCheck->isChecked();
378 switch( vlmObj->type )
381 (qobject_cast<VLMBroadcast *>(vlmObj))->b_looped = ui.loopBCast->isChecked();
384 (qobject_cast<VLMVod *>(vlmObj))->mux = ui.muxLedit->text();
387 (qobject_cast<VLMSchedule *>(vlmObj))->schetime = time->dateTime();
388 (qobject_cast<VLMSchedule *>(vlmObj))->schedate = date->dateTime();
389 (qobject_cast<VLMSchedule *>(vlmObj))->rNumber = scherepeatnumber->value();
390 (qobject_cast<VLMSchedule *>(vlmObj))->rDays = repeatDays->value();
394 vlmObj->update(); /* It should call the correct function is VLMAWidget
395 is abstract, but I am far from sure... FIXME ? */
400 /*********************************
401 * VLMAWidget - Abstract class
402 ********************************/
404 VLMAWidget::VLMAWidget( QString _name,
410 : QGroupBox( _name, _parent )
416 b_enabled = _enabled;
419 setCheckable( true );
420 setChecked( b_enabled );
422 objLayout = new QGridLayout( this );
423 setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Maximum );
425 nameLabel = new QLabel;
426 objLayout->addWidget( nameLabel, 0, 0, 1, 4 );
428 /*QLabel *time = new QLabel( "--:--/--:--" );
429 objLayout->addWidget( time, 1, 3, 1, 2 );*/
431 QToolButton *modifyButton = new QToolButton;
432 modifyButton->setIcon( QIcon( QPixmap( ":/pixmaps/menus_settings_16px.png" ) ) );
433 objLayout->addWidget( modifyButton, 0, 5 );
435 QToolButton *deleteButton = new QToolButton;
436 deleteButton->setIcon( QIcon( QPixmap( ":/pixmaps/menus_quit_16px.png" ) ) );
437 objLayout->addWidget( deleteButton, 0, 6 );
439 BUTTONACT( modifyButton, modify() );
440 BUTTONACT( deleteButton, del() );
441 CONNECT( this, clicked( bool ), this, toggleEnabled( bool ) );
444 void VLMAWidget::modify()
446 parent->startModifyVLMItem( this );
449 void VLMAWidget::del()
451 parent->removeVLMItem( this );
454 //FIXME, remove me before release
455 void VLMAWidget::enterEvent( QEvent *event )
460 void VLMAWidget::toggleEnabled( bool b_enable )
462 VLMWrapper::EnableItem( name, b_enable );
468 VLMBroadcast::VLMBroadcast( QString _name, QString _input, QString _output,
469 bool _enabled, bool _looped, VLMDialog *_parent)
470 : VLMAWidget( _name, _input, _output,
471 _enabled, _parent, QVLM_Broadcast )
473 nameLabel->setText( "Broadcast: " + name );
474 type = QVLM_Broadcast;
477 playButton = new QToolButton;
478 playButton->setIcon( QIcon( QPixmap( ":/pixmaps/play_16px.png" ) ) );
479 objLayout->addWidget( playButton, 1, 0 );
482 QToolButton *stopButton = new QToolButton;
483 stopButton->setIcon( QIcon( QPixmap( ":/pixmaps/stop_16px.png" ) ) );
484 objLayout->addWidget( stopButton, 1, 1 );
486 loopButton = new QToolButton;
487 objLayout->addWidget( loopButton, 1, 2 );
489 BUTTONACT( playButton, togglePlayPause() );
490 BUTTONACT( stopButton, stop() );
491 BUTTONACT( loopButton, toggleLoop() );
496 void VLMBroadcast::update()
498 VLMWrapper::EditBroadcast( name, input, output, b_enabled, b_looped );
500 loopButton->setIcon( QIcon( QPixmap( ":/pixmaps/playlist_repeat_all.png" ) ) );
502 loopButton->setIcon( QIcon( QPixmap( ":/pixmaps/playlist_repeat_off.png" ) ) );
505 void VLMBroadcast::togglePlayPause()
507 if( b_playing = true )
509 VLMWrapper::ControlBroadcast( name, ControlBroadcastPause );
510 playButton->setIcon( QIcon( QPixmap( ":/pixmaps/pause_16px.png" ) ) );
514 VLMWrapper::ControlBroadcast( name, ControlBroadcastPlay );
515 playButton->setIcon( QIcon( QPixmap( ":/pixmaps/play_16px.png" ) ) );
517 b_playing = !b_playing;
520 void VLMBroadcast::toggleLoop()
522 b_enabled = !b_enabled;
526 void VLMBroadcast::stop()
528 VLMWrapper::ControlBroadcast( name, ControlBroadcastStop );
529 playButton->setIcon( QIcon( QPixmap( ":/pixmaps/play_16px.png" ) ) );
535 VLMSchedule::VLMSchedule( QString name, QString input, QString output,
536 QDateTime _schetime, QDateTime _schedate,
537 int _scherepeatnumber, int _repeatDays,
538 bool enabled, VLMDialog *parent )
539 : VLMAWidget( name, input, output, enabled, parent, QVLM_Schedule )
541 nameLabel->setText( "Schedule: " + name );
542 schetime = _schetime;
543 schedate = _schedate;
544 rNumber = _scherepeatnumber;
546 type = QVLM_Schedule;
550 void VLMSchedule::update()
552 VLMWrapper::EditSchedule( name, input, output, schetime, schedate,
553 rNumber, rDays, b_enabled);
559 VLMVod::VLMVod( QString name, QString input, QString output,
560 bool enabled, QString _mux, VLMDialog *parent)
561 : VLMAWidget( name, input, output, enabled, parent, QVLM_VOD )
563 nameLabel->setText( "VOD:" + name );
566 muxLabel = new QLabel;
567 objLayout->addWidget( muxLabel, 1, 0 );
572 void VLMVod::update()
574 muxLabel->setText( mux );
575 VLMWrapper::EditVod( name, input, output, b_enabled, mux );
582 vlm_t * VLMWrapper::p_vlm = NULL;
584 VLMWrapper::VLMWrapper( vlm_t *_p_vlm )
589 VLMWrapper::~VLMWrapper()
592 void VLMWrapper::AddBroadcast( const QString name, QString input,
594 bool b_enabled, bool b_loop )
596 vlm_message_t *message;
597 QString command = "new \"" + name + "\" broadcast";
598 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
599 vlm_MessageDelete( message );
600 EditBroadcast( name, input, output, b_enabled, b_loop );
603 void VLMWrapper::EditBroadcast( const QString name, const QString input,
604 const QString output,
605 bool b_enabled, bool b_loop )
607 vlm_message_t *message;
610 command = "setup \"" + name + "\" inputdel all";
611 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
612 vlm_MessageDelete( message );
613 command = "setup \"" + name + "\" input \"" + input + "\"";
614 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
615 vlm_MessageDelete( message );
616 if( !output.isEmpty() )
618 command = "setup \"" + name + "\" output \"" + output + "\"";
619 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
620 vlm_MessageDelete( message );
624 command = "setup \"" + name + "\" enabled";
625 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
626 vlm_MessageDelete( message );
630 command = "setup \"" + name + "\" loop";
631 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
632 vlm_MessageDelete( message );
636 void VLMWrapper::EnableItem( const QString name, bool b_enable )
638 vlm_message_t *message;
639 QString command = "setup \"" + name + ( b_enable ? " enable" : " disable" );
642 void VLMWrapper::ControlBroadcast( const QString name, int BroadcastStatus,
645 vlm_message_t *message;
647 QString command = "control \"" + name;
648 switch( BroadcastStatus )
650 case ControlBroadcastPlay:
653 case ControlBroadcastPause:
656 case ControlBroadcastStop:
659 case ControlBroadcastSeek:
660 command += " seek" + seek;
663 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
664 vlm_MessageDelete( message );
667 void VLMWrapper::AddVod( const QString name, const QString input,
668 const QString output,
669 bool b_enabled, const QString mux )
671 vlm_message_t *message;
672 QString command = "new \"" + name + "\" vod";
673 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
674 vlm_MessageDelete( message );
675 EditVod( name, input, output, b_enabled, mux );
678 void VLMWrapper::EditVod( const QString name, const QString input,
679 const QString output,
683 vlm_message_t *message;
684 QString command = "setup \"" + name + "\" input \"" + input + "\"";
685 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
686 vlm_MessageDelete( message );
687 if( !output.isEmpty() )
689 command = "setup \"" + name + "\" output \"" + output + "\"";
690 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
691 vlm_MessageDelete( message );
695 command = "setup \"" + name + "\" enabled";
696 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
697 vlm_MessageDelete( message );
701 command = "setup \"" + name + "\" mux \"" + mux + "\"";
702 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
703 vlm_MessageDelete( message );
707 void VLMWrapper::AddSchedule( const QString name, const QString input,
708 const QString output, QDateTime _schetime,
710 int _scherepeatnumber, int _repeatDays,
711 bool b_enabled, const QString mux )
713 vlm_message_t *message;
714 QString command = "new \"" + name + "\" schedule";
715 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
716 vlm_MessageDelete( message );
717 EditSchedule( name, input, output, _schetime, _schedate,
718 _scherepeatnumber, _repeatDays, b_enabled, mux );
721 void VLMWrapper::EditSchedule( const QString name, const QString input,
722 const QString output, QDateTime _schetime,
723 QDateTime _schedate, int _scherepeatnumber,
724 int _repeatDays, bool b_enabled,
727 vlm_message_t *message;
728 QString command = "setup \"" + name + "\" input \"" + input + "\"";
729 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
730 vlm_MessageDelete( message );
732 if( !output.isEmpty() )
734 command = "setup \"" + name + "\" output \"" + output + "\"";
735 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
736 vlm_MessageDelete( message );
741 command = "setup \"" + name + "\" enabled";
742 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
743 vlm_MessageDelete( message );
748 command = "setup \"" + name + "\" mux \"" + mux + "\"";
749 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
750 vlm_MessageDelete( message );
753 command = "setup \"" + name + "\" date \"" +
754 _schedate.toString( "yyyy/MM/dd" )+ "-" +
755 _schetime.toString( "hh:mm:ss" ) + "\"";
756 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
757 vlm_MessageDelete( message );
758 if( _scherepeatnumber > 0 )
760 command = "setup \"" + name + "\" repeat \"" + _scherepeatnumber + "\"";
761 vlm_ExecuteCommand( p_vlm, qtu( command ), &message );
762 vlm_MessageDelete( message );