]> git.sesse.net Git - vlc/blob - modules/gui/qt4/dialogs_provider.cpp
Qt: fix remaining remeber-folder bug.
[vlc] / modules / gui / qt4 / dialogs_provider.cpp
1 /*****************************************************************************
2  * dialogs_provider.cpp : Dialog Provider
3  *****************************************************************************
4  * Copyright (C) 2006-2009 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *          Jean-Baptiste Kempf <jb@videolan.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 #ifdef HAVE_CONFIG_H
26 # include "config.h"
27 #endif
28
29 #include <vlc_intf_strings.h>
30
31 #include "qt4.hpp"
32 #include "dialogs_provider.hpp"
33 #include "input_manager.hpp" /* Load Subtitles */
34 #include "menus.hpp"
35 #include "recents.hpp"
36 #include "util/qt_dirs.hpp"
37
38 /* The dialogs */
39 #include "dialogs/playlist.hpp"
40 #include "dialogs/bookmarks.hpp"
41 #include "dialogs/preferences.hpp"
42 #include "dialogs/mediainfo.hpp"
43 #include "dialogs/messages.hpp"
44 #include "dialogs/extended.hpp"
45 #include "dialogs/vlm.hpp"
46 #include "dialogs/sout.hpp"
47 #include "dialogs/convert.hpp"
48 #include "dialogs/open.hpp"
49 #include "dialogs/openurl.hpp"
50 #include "dialogs/help.hpp"
51 #include "dialogs/gototime.hpp"
52 #include "dialogs/podcast_configuration.hpp"
53 #include "dialogs/toolbar.hpp"
54 #include "dialogs/plugins.hpp"
55 #include "dialogs/external.hpp"
56
57 #include <QEvent>
58 #include <QApplication>
59 #include <QSignalMapper>
60 #include <QFileDialog>
61
62
63 DialogsProvider* DialogsProvider::instance = NULL;
64
65 DialogsProvider::DialogsProvider( intf_thread_t *_p_intf ) :
66                                   QObject( NULL ), p_intf( _p_intf )
67 {
68     b_isDying = false;
69
70     /* Various signal mappers for the menus */
71     menusMapper = new QSignalMapper();
72     CONNECT( menusMapper, mapped(QObject *), this, menuAction( QObject *) );
73
74     menusUpdateMapper = new QSignalMapper();
75     CONNECT( menusUpdateMapper, mapped(QObject *),
76              this, menuUpdateAction( QObject *) );
77
78     SDMapper = new QSignalMapper();
79     CONNECT( SDMapper, mapped (QString), this, SDMenuAction( QString ) );
80
81     DialogHandler *dialogHandler = new DialogHandler (p_intf, this );
82 }
83
84 DialogsProvider::~DialogsProvider()
85 {
86     PlaylistDialog::killInstance();
87     MediaInfoDialog::killInstance();
88     MessagesDialog::killInstance();
89     ExtendedDialog::killInstance();
90     BookmarksDialog::killInstance();
91     HelpDialog::killInstance();
92 #ifdef UPDATE_CHECK
93     UpdateDialog::killInstance();
94 #endif
95
96     delete menusMapper;
97     delete menusUpdateMapper;
98     delete SDMapper;
99 }
100
101 void DialogsProvider::quit()
102 {
103     b_isDying = true;
104     libvlc_Quit( p_intf->p_libvlc );
105 }
106
107 void DialogsProvider::customEvent( QEvent *event )
108 {
109     if( event->type() == (int)DialogEvent_Type )
110     {
111         DialogEvent *de = static_cast<DialogEvent*>(event);
112         switch( de->i_dialog )
113         {
114         case INTF_DIALOG_FILE_SIMPLE:
115         case INTF_DIALOG_FILE:
116             openDialog(); break;
117         case INTF_DIALOG_FILE_GENERIC:
118             openFileGenericDialog( de->p_arg ); break;
119         case INTF_DIALOG_DISC:
120             openDiscDialog(); break;
121         case INTF_DIALOG_NET:
122             openNetDialog(); break;
123         case INTF_DIALOG_SAT:
124         case INTF_DIALOG_CAPTURE:
125             openCaptureDialog(); break;
126         case INTF_DIALOG_DIRECTORY:
127             PLAppendDir(); break;
128         case INTF_DIALOG_PLAYLIST:
129             playlistDialog(); break;
130         case INTF_DIALOG_MESSAGES:
131             messagesDialog(); break;
132         case INTF_DIALOG_FILEINFO:
133            mediaInfoDialog(); break;
134         case INTF_DIALOG_PREFS:
135            prefsDialog(); break;
136         case INTF_DIALOG_BOOKMARKS:
137            bookmarksDialog(); break;
138         case INTF_DIALOG_EXTENDED:
139            extendedDialog(); break;
140 #ifdef ENABLE_VLM
141         case INTF_DIALOG_VLM:
142            vlmDialog(); break;
143 #endif
144         case INTF_DIALOG_POPUPMENU:
145            QVLCMenu::PopupMenu( p_intf, (de->i_arg != 0) ); break;
146         case INTF_DIALOG_AUDIOPOPUPMENU:
147            QVLCMenu::AudioPopupMenu( p_intf ); break;
148         case INTF_DIALOG_VIDEOPOPUPMENU:
149            QVLCMenu::VideoPopupMenu( p_intf ); break;
150         case INTF_DIALOG_MISCPOPUPMENU:
151            QVLCMenu::MiscPopupMenu( p_intf ); break;
152         case INTF_DIALOG_WIZARD:
153         case INTF_DIALOG_STREAMWIZARD:
154             openAndStreamingDialogs(); break;
155 #ifdef UPDATE_CHECK
156         case INTF_DIALOG_UPDATEVLC:
157             updateDialog(); break;
158 #endif
159         case INTF_DIALOG_EXIT:
160             quit(); break;
161         default:
162            msg_Warn( p_intf, "unimplemented dialog" );
163         }
164     }
165 }
166
167 /****************************************************************************
168  * Individual simple dialogs
169  ****************************************************************************/
170 void DialogsProvider::playlistDialog()
171 {
172     PlaylistDialog::getInstance( p_intf )->toggleVisible();
173 }
174
175 void DialogsProvider::prefsDialog()
176 {
177     PrefsDialog *p = new PrefsDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
178     p->toggleVisible();
179 }
180
181 void DialogsProvider::extendedDialog()
182 {
183     ExtendedDialog::getInstance( p_intf )->showTab( 0 );
184 }
185
186 void DialogsProvider::synchroDialog()
187 {
188     ExtendedDialog::getInstance( p_intf )->showTab( 2 );
189 }
190
191 void DialogsProvider::messagesDialog()
192 {
193     MessagesDialog::getInstance( p_intf )->toggleVisible();
194 }
195
196 void DialogsProvider::gotoTimeDialog()
197 {
198     GotoTimeDialog::getInstance( p_intf )->toggleVisible();
199 }
200
201 #ifdef ENABLE_VLM
202 void DialogsProvider::vlmDialog()
203 {
204     VLMDialog::getInstance( p_intf )->toggleVisible();
205 }
206 #endif
207
208 void DialogsProvider::helpDialog()
209 {
210     HelpDialog::getInstance( p_intf )->toggleVisible();
211 }
212
213 #ifdef UPDATE_CHECK
214 void DialogsProvider::updateDialog()
215 {
216     UpdateDialog::getInstance( p_intf )->toggleVisible();
217 }
218 #endif
219
220 void DialogsProvider::aboutDialog()
221 {
222     AboutDialog::getInstance( p_intf )->toggleVisible();
223 }
224
225 void DialogsProvider::mediaInfoDialog()
226 {
227     MediaInfoDialog::getInstance( p_intf )->showTab( 0 );
228 }
229
230 void DialogsProvider::mediaCodecDialog()
231 {
232     MediaInfoDialog::getInstance( p_intf )->showTab( 2 );
233 }
234
235 void DialogsProvider::bookmarksDialog()
236 {
237     BookmarksDialog::getInstance( p_intf )->toggleVisible();
238 }
239
240 void DialogsProvider::podcastConfigureDialog()
241 {
242     PodcastConfigDialog::getInstance( p_intf )->toggleVisible();
243 }
244
245 void DialogsProvider::toolbarDialog()
246 {
247     ToolbarEditDialog *toolbarEditor = new ToolbarEditDialog( (QWidget *)p_intf->p_sys->p_mi, p_intf );
248     if( toolbarEditor->exec() == QDialog::Accepted )
249         emit toolBarConfUpdated();
250 }
251
252 void DialogsProvider::pluginDialog()
253 {
254     PluginDialog *diag = new PluginDialog( p_intf );
255     diag->show();
256 }
257
258 /* Generic open file */
259 void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
260 {
261     if( p_arg == NULL )
262     {
263         msg_Warn( p_intf, "openFileGenericDialog() called with NULL arg" );
264         return;
265     }
266
267     /* Replace the extensions to a Qt format */
268     int i = 0;
269     QString extensions = qfu( p_arg->psz_extensions );
270     while ( ( i = extensions.indexOf( "|", i ) ) != -1 )
271     {
272         if( ( extensions.count( "|" ) % 2 ) == 0 )
273             extensions.replace( i, 1, ");;" );
274         else
275             extensions.replace( i, 1, "(" );
276     }
277     extensions.replace( ";*", " *" );
278     extensions.append( ")" );
279
280     /* Save */
281     if( p_arg->b_save )
282     {
283         QString file = QFileDialog::getSaveFileName( NULL, p_arg->psz_title,
284                                         p_intf->p_sys->filepath, extensions );
285         if( !file.isEmpty() )
286         {
287             p_arg->i_results = 1;
288             p_arg->psz_results = (char **)malloc( p_arg->i_results * sizeof( char * ) );
289             p_arg->psz_results[0] = strdup( qtu( toNativeSepNoSlash( file ) ) );
290         }
291         else
292             p_arg->i_results = 0;
293     }
294     else /* non-save mode */
295     {
296         QStringList files = QFileDialog::getOpenFileNames( NULL,
297                 p_arg->psz_title, p_intf->p_sys->filepath,
298                 extensions );
299         p_arg->i_results = files.count();
300         p_arg->psz_results = (char **)malloc( p_arg->i_results * sizeof( char * ) );
301         i = 0;
302         foreach( const QString &file, files )
303             p_arg->psz_results[i++] = strdup( qtu( toNativeSepNoSlash( file ) ) );
304         p_intf->p_sys->filepath = qfu( p_arg->psz_results[i] );
305     }
306
307     /* Callback */
308     if( p_arg->pf_callback )
309         p_arg->pf_callback( p_arg );
310
311     /* Clean afterwards */
312     if( p_arg->psz_results )
313     {
314         for( i = 0; i < p_arg->i_results; i++ )
315             free( p_arg->psz_results[i] );
316         free( p_arg->psz_results );
317     }
318     free( p_arg->psz_title );
319     free( p_arg->psz_extensions );
320     free( p_arg );
321 }
322 /****************************************************************************
323  * All the open/add stuff
324  * Open Dialog first - Simple Open then
325  ****************************************************************************/
326
327 void DialogsProvider::openDialog( int i_tab )
328 {
329     OpenDialog::getInstance( p_intf->p_sys->p_mi , p_intf )->showTab( i_tab );
330 }
331 void DialogsProvider::openDialog()
332 {
333     openDialog( OPEN_FILE_TAB );
334 }
335 void DialogsProvider::openFileDialog()
336 {
337     openDialog( OPEN_FILE_TAB );
338 }
339 void DialogsProvider::openDiscDialog()
340 {
341     openDialog( OPEN_DISC_TAB );
342 }
343 void DialogsProvider::openNetDialog()
344 {
345     openDialog( OPEN_NETWORK_TAB );
346 }
347 void DialogsProvider::openCaptureDialog()
348 {
349     openDialog( OPEN_CAPTURE_TAB );
350 }
351
352 /* Same as the open one, but force the enqueue */
353 void DialogsProvider::PLAppendDialog( int tab )
354 {
355     OpenDialog::getInstance( p_intf->p_sys->p_mi, p_intf, false,
356                              OPEN_AND_ENQUEUE )->showTab( tab );
357 }
358
359 void DialogsProvider::MLAppendDialog( int tab )
360 {
361     OpenDialog::getInstance( p_intf->p_sys->p_mi, p_intf, false,
362                             OPEN_AND_ENQUEUE, false, false )
363                                     ->showTab( tab );
364 }
365
366 /**
367  * Simple open
368  ***/
369 QStringList DialogsProvider::showSimpleOpen( QString help,
370                                              int filters,
371                                              QString path )
372 {
373     QString fileTypes = "";
374     if( filters & EXT_FILTER_MEDIA ) {
375         ADD_FILTER_MEDIA( fileTypes );
376     }
377     if( filters & EXT_FILTER_VIDEO ) {
378         ADD_FILTER_VIDEO( fileTypes );
379     }
380     if( filters & EXT_FILTER_AUDIO ) {
381         ADD_FILTER_AUDIO( fileTypes );
382     }
383     if( filters & EXT_FILTER_PLAYLIST ) {
384         ADD_FILTER_PLAYLIST( fileTypes );
385     }
386     if( filters & EXT_FILTER_SUBTITLE ) {
387         ADD_FILTER_SUBTITLE( fileTypes );
388     }
389     ADD_FILTER_ALL( fileTypes );
390     fileTypes.replace( ";*", " *");
391
392     QStringList files = QFileDialog::getOpenFileNames( NULL,
393         help.isEmpty() ? qtr(I_OP_SEL_FILES ) : help,
394         path.isEmpty() ? p_intf->p_sys->filepath : path,
395         fileTypes );
396
397     if( !files.isEmpty() ) savedirpathFromFile( files.last() );
398
399     return files;
400 }
401
402 /**
403  * Open a file,
404  * pl helps you to choose from playlist or media library,
405  * go to start or enqueue
406  **/
407 void DialogsProvider::addFromSimple( bool pl, bool go)
408 {
409     QStringList files = DialogsProvider::showSimpleOpen();
410     int i = 0;
411     files.sort();
412     foreach( const QString &file, files )
413     {
414         playlist_Add( THEPL, qtu( toNativeSeparators( file ) ), NULL,
415                       go ? ( PLAYLIST_APPEND | ( i ? 0 : PLAYLIST_GO ) |
416                                                ( i ? PLAYLIST_PREPARSE : 0 ) )
417                          : ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ),
418                       PLAYLIST_END,
419                       pl ? true : false, false );
420         RecentsMRL::getInstance( p_intf )->addRecent(
421                 toNativeSeparators( file ) );
422         i++;
423     }
424 }
425
426 void DialogsProvider::simpleOpenDialog()
427 {
428     addFromSimple( true, true ); /* Playlist and Go */
429 }
430
431 void DialogsProvider::simplePLAppendDialog()
432 {
433     addFromSimple( true, false );
434 }
435
436 void DialogsProvider::simpleMLAppendDialog()
437 {
438     addFromSimple( false, false );
439 }
440
441 /* Url & Clipboard */
442 /**
443  * Open a MRL.
444  * If the clipboard contains URLs, the first is automatically 'preselected'.
445  **/
446 void DialogsProvider::openUrlDialog()
447 {
448     OpenUrlDialog *oud = OpenUrlDialog::getInstance( p_intf->p_sys->p_mi,
449                                                      p_intf );
450     if( oud->exec() == QDialog::Accepted )
451     {
452         QString url = oud->url();
453         if( !url.isEmpty() )
454         {
455             playlist_Add( THEPL, qtu( url ),
456                           NULL, !oud->shouldEnqueue() ?
457                                   ( PLAYLIST_APPEND | PLAYLIST_GO )
458                                 : ( PLAYLIST_APPEND | PLAYLIST_PREPARSE ),
459                           PLAYLIST_END, true, false );
460             RecentsMRL::getInstance( p_intf )->addRecent( url );
461         }
462     }
463 }
464
465 /* Directory */
466 /**
467  * Open a directory,
468  * pl helps you to choose from playlist or media library,
469  * go to start or enqueue
470  **/
471 static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
472 {
473     QString dir = QFileDialog::getExistingDirectory( NULL, qtr("Open Directory"), p_intf->p_sys->filepath );
474
475     if (!dir.isEmpty() )
476     {
477         QString mrl = dir.endsWith( "VIDEO_TS", Qt::CaseInsensitive ) ?
478             "dvd://" : "directory://" + toNativeSeparators( dir );
479         input_item_t *p_input = input_item_New( THEPL, qtu( mrl ), NULL );
480
481         /* FIXME: playlist_AddInput() can fail */
482         playlist_AddInput( THEPL, p_input,
483                        go ? ( PLAYLIST_APPEND | PLAYLIST_GO ) : PLAYLIST_APPEND,
484                        PLAYLIST_END, pl, pl_Unlocked );
485         RecentsMRL::getInstance( p_intf )->addRecent( mrl );
486         if( !go )
487             input_Read( THEPL, p_input, true );
488         vlc_gc_decref( p_input );
489     }
490 }
491
492 void DialogsProvider::PLOpenDir()
493 {
494     openDirectory( p_intf, true, true );
495 }
496
497 void DialogsProvider::PLAppendDir()
498 {
499     openDirectory( p_intf, true, false );
500 }
501
502 void DialogsProvider::MLAppendDir()
503 {
504     openDirectory( p_intf, false , false );
505 }
506
507 /****************
508  * Playlist     *
509  ****************/
510 void DialogsProvider::openAPlaylist()
511 {
512     QStringList files = showSimpleOpen( qtr( "Open playlist..." ),
513                                         EXT_FILTER_PLAYLIST );
514     foreach( const QString &file, files )
515     {
516         playlist_Import( THEPL, qtu( toNativeSeparators( file ) ) );
517     }
518 }
519
520 void DialogsProvider::saveAPlaylist()
521 {
522     QString file = QFileDialog::getSaveFileName( NULL,
523                                   qtr( "Save playlist as..." ),
524                                   p_intf->p_sys->filepath,
525                                   qtr( "XSPF playlist (*.xspf);; " ) +
526                                   qtr( "M3U playlist (*.m3u);; " ) +
527                                   qtr( "HTML playlist (*.html)" ) );
528
529     if( !file.isEmpty() )
530     {
531         static const char psz_xspf[] = "export-xspf",
532                           psz_m3u[] = "export-m3u",
533                           psz_html[] = "export-html";
534         const char *psz_module;
535
536         if( file.contains( ".xsp" ) )
537             psz_module = psz_xspf;
538         else if( file.contains( ".m3u" ) )
539             psz_module = psz_m3u;
540         else if( file.contains(".html" ) )
541             psz_module = psz_html;
542         else
543         {
544             msg_Warn( p_intf, "Impossible to recognise the file type. "
545                     "Defaulting to XSPF" );
546             psz_module = psz_xspf;
547             file.append( ".xpsf" );
548         }
549
550         playlist_Export( THEPL, qtu( toNativeSeparators( file ) ),
551                 THEPL->p_local_category, psz_module);
552     }
553 }
554
555 /****************************************************************************
556  * Sout emulation
557  ****************************************************************************/
558
559 void DialogsProvider::streamingDialog( QWidget *parent,
560                                        QString mrl,
561                                        bool b_transcode_only,
562                                        QStringList options )
563 {
564     char *psz_soutoption;
565
566     /* Stream */
567     if( !b_transcode_only )
568     {
569         SoutDialog *s = new SoutDialog( parent, p_intf, mrl );
570         if( s->exec() == QDialog::Accepted )
571         {
572             psz_soutoption = strdup( qtu( s->getMrl() ) );
573             delete s;
574         }
575         else
576         {
577             delete s; return;
578         }
579     } else {
580     /* Convert */
581         ConvertDialog *s = new ConvertDialog( parent, p_intf, mrl );
582         if( s->exec() == QDialog::Accepted )
583         {
584             psz_soutoption = strdup( qtu( s->getMrl() ) );
585             delete s;
586         }
587         else
588         {
589             delete s; return;
590         }
591     }
592
593     /* Get SoutMRL */
594     if( !EMPTY_STR( psz_soutoption ) )
595     {
596         options += QString( psz_soutoption ).split( " :");
597
598         /* Create Input */
599         input_item_t *p_input;
600         p_input = input_item_New( p_intf, qtu( mrl ), _("Streaming") );
601
602         /* Add normal Options */
603         for( int j = 0; j < options.size(); j++ )
604         {
605             QString qs = colon_unescape( options[j] );
606             if( !qs.isEmpty() )
607             {
608                 input_item_AddOption( p_input, qtu( qs ),
609                         VLC_INPUT_OPTION_TRUSTED );
610                 msg_Dbg( p_intf, "Adding option: %s", qtu( qs ) );
611             }
612         }
613
614         /* Switch between enqueuing and starting the item */
615         /* FIXME: playlist_AddInput() can fail */
616         playlist_AddInput( THEPL, p_input,
617                 PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true, pl_Unlocked );
618         vlc_gc_decref( p_input );
619
620         RecentsMRL::getInstance( p_intf )->addRecent( mrl );
621     }
622     free( psz_soutoption );
623 }
624
625 void DialogsProvider::openAndStreamingDialogs()
626 {
627     OpenDialog::getInstance( p_intf->p_sys->p_mi, p_intf, false, OPEN_AND_STREAM )
628                                 ->showTab( OPEN_FILE_TAB );
629 }
630
631 void DialogsProvider::openAndTranscodingDialogs()
632 {
633     OpenDialog::getInstance( p_intf->p_sys->p_mi , p_intf, false, OPEN_AND_SAVE )
634                                 ->showTab( OPEN_FILE_TAB );
635 }
636
637 void DialogsProvider::loadSubtitlesFile()
638 {
639     input_thread_t *p_input = THEMIM->getInput();
640     if( !p_input ) return;
641
642     input_item_t *p_item = input_GetItem( p_input );
643     if( !p_item ) return;
644
645     char *path = input_item_GetURI( p_item );
646     if( !path ) path = strdup( "" );
647
648     char *sep = strrchr( path, DIR_SEP_CHAR );
649     if( sep ) *sep = '\0';
650
651     QStringList qsl = showSimpleOpen( qtr( "Open subtitles..." ),
652                                       EXT_FILTER_SUBTITLE,
653                                       path );
654     free( path );
655     foreach( const QString &qsFile, qsl )
656     {
657         if( input_AddSubtitle( p_input, qtu( toNativeSeparators( qsFile ) ),
658                     true ) )
659             msg_Warn( p_intf, "unable to load subtitles from '%s'",
660                       qtu( qsFile ) );
661     }
662 }
663
664
665 /****************************************************************************
666  * Menus
667  ****************************************************************************/
668
669 void DialogsProvider::menuAction( QObject *data )
670 {
671     QVLCMenu::DoAction( data );
672 }
673
674 void DialogsProvider::menuUpdateAction( QObject *data )
675 {
676     MenuFunc *func = qobject_cast<MenuFunc *>(data);
677     assert( func );
678     func->doFunc( p_intf );
679 }
680
681 void DialogsProvider::SDMenuAction( QString data )
682 {
683     char *psz_sd = strdup( qtu( data ) );
684     if( !playlist_IsServicesDiscoveryLoaded( THEPL, psz_sd ) )
685         playlist_ServicesDiscoveryAdd( THEPL, psz_sd );
686     else
687         playlist_ServicesDiscoveryRemove( THEPL, psz_sd );
688     free( psz_sd );
689 }
690
691 /**
692  * Play the MRL contained in the Recently played menu.
693  **/
694 void DialogsProvider::playMRL( const QString &mrl )
695 {
696     playlist_Add( THEPL, qtu( mrl ) , NULL,
697            PLAYLIST_APPEND | PLAYLIST_GO , PLAYLIST_END, true, false );
698
699     RecentsMRL::getInstance( p_intf )->addRecent( mrl );
700 }