]> git.sesse.net Git - vlc/blobdiff - modules/gui/qt4/components/open_panels.cpp
lower case the module_* functions
[vlc] / modules / gui / qt4 / components / open_panels.cpp
index a9f27f461db40ffb1caf0fd2021559f00e326f1f..40509730157ba56db55894dbdade5e42ce48a769 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * open.cpp : Panels for the open dialogs
  ****************************************************************************
- * Copyright (C) 2006-2007 the VideoLAN team
+ * Copyright (C) 2006-2008 the VideoLAN team
  * Copyright (C) 2007 Société des arts technologiques
  * Copyright (C) 2007 Savoir-faire Linux
  *
@@ -45,6 +45,8 @@
 #include <QScrollArea>
 #include <QUrl>
 
+#define I_DEVICE_TOOLTIP N_("Select the device or the VIDEO_TS directory")
+
 /**************************************************************************
  * Open Files and subtitles                                               *
  **************************************************************************/
@@ -74,14 +76,17 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
 
     dialogBox->setFileMode( QFileDialog::ExistingFiles );
     dialogBox->setAcceptMode( QFileDialog::AcceptOpen );
-    dialogBox->setViewMode( config_GetInt( p_intf, "qt-open-detail" ) ?
-            QFileDialog::Detail : QFileDialog::List );
+#if HAS_QT43
+    dialogBox->restoreState(
+            getSettings()->value( "file-dialog-state" ).toByteArray() );
+#endif
 
     /* We don't want to see a grip in the middle of the window, do we? */
     dialogBox->setSizeGripEnabled( false );
 
     /* Add a tooltip */
-    dialogBox->setToolTip( qtr( "Select one or multiple files, or a folder" ) );
+    dialogBox->setToolTip( qtr( "Select one or multiple files" ) );
+    dialogBox->setMinimumHeight( 250 );
 
     // But hide the two OK/Cancel buttons. Enable them for debug.
     QDialogButtonBox *fileDialogAcceptBox =
@@ -138,6 +143,9 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
 
 FileOpenPanel::~FileOpenPanel()
 {
+#if HAS_QT43
+    getSettings()->setValue( "file-dialog-state", dialogBox->saveState() );
+#endif
 }
 
 /* Show a fileBrowser to select a subtitle */
@@ -161,7 +169,7 @@ void FileOpenPanel::updateMRL()
     }
 
     if( ui.subCheckBox->isChecked() ) {
-        mrl.append( " :sub-file=" + ui.subInput->text() );
+        mrl.append( " :sub-file=\"" + ui.subInput->text() + "\"" );
         int align = ui.alignSubComboBox->itemData(
                     ui.alignSubComboBox->currentIndex() ).toInt();
         mrl.append( " :subsdec-align=" + QString().setNum( align ) );
@@ -183,7 +191,12 @@ void FileOpenPanel::accept()
 
 void FileOpenBox::accept()
 {
-    OpenDialog::getInstance( NULL, NULL )->play();
+    OpenDialog::getInstance( NULL, NULL, true )->selectSlots();
+}
+
+void FileOpenBox::reject()
+{
+    OpenDialog::getInstance( NULL, NULL, true )->cancel();
 }
 
 /* Function called by Open Dialog when clicked on cancel */
@@ -219,6 +232,9 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     b_firstvcd = true;
     b_firstcdda = true;
 
+    ui.browseDiscButton->setToolTip( qtr( I_DEVICE_TOOLTIP ));
+    ui.deviceCombo->setToolTip( I_DEVICE_TOOLTIP );
+
 #if WIN32 /* Disc drives probing for Windows */
     char szDrives[512];
     szDrives[0] = '\0';
@@ -248,7 +264,8 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     BUTTONACT( ui.audioCDRadioButton, updateButtons() );
     BUTTONACT( ui.dvdsimple, updateButtons() );
     BUTTONACT( ui.browseDiscButton, browseDevice() );
-    BUTTONACT( ui.ejectButton, eject() );
+    BUTTON_SET_ACT_I( ui.ejectButton, "", eject, qtr( "Eject the disc" ),
+            eject() );
 
     CONNECT( ui.deviceCombo, editTextChanged( QString ), this, updateMRL());
     CONNECT( ui.titleSpin, valueChanged( int ), this, updateMRL());
@@ -262,9 +279,9 @@ DiscOpenPanel::DiscOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
 
 DiscOpenPanel::~DiscOpenPanel()
 {
-    delete psz_dvddiscpath;
-    delete psz_vcddiscpath;
-    delete psz_cddadiscpath;
+    free( psz_dvddiscpath );
+    free( psz_vcddiscpath );
+    free( psz_cddadiscpath );
 }
 
 void DiscOpenPanel::clear()
@@ -299,6 +316,7 @@ void DiscOpenPanel::updateButtons()
         ui.chapterLabel->show();
         ui.chapterSpin->show();
         ui.diskOptionBox_2->show();
+        ui.dvdsimple->setEnabled( true );
     }
     else if ( ui.vcdRadioButton->isChecked() )
     {
@@ -311,6 +329,7 @@ void DiscOpenPanel::updateButtons()
         ui.chapterLabel->hide();
         ui.chapterSpin->hide();
         ui.diskOptionBox_2->show();
+        ui.dvdsimple->setEnabled( false );
     }
     else /* CDDA */
     {
@@ -323,6 +342,7 @@ void DiscOpenPanel::updateButtons()
         ui.chapterLabel->hide();
         ui.chapterSpin->hide();
         ui.diskOptionBox_2->hide();
+        ui.dvdsimple->setEnabled( false );
     }
 
     updateMRL();
@@ -337,9 +357,9 @@ void DiscOpenPanel::updateMRL()
     /* DVD */
     if( ui.dvdRadioButton->isChecked() ) {
         if( !ui.dvdsimple->isChecked() )
-            mrl = "dvd://";
+            mrl = "\"dvd://";
         else
-            mrl = "dvdsimple://";
+            mrl = "\"dvdsimple://";
         mrl += ui.deviceCombo->currentText();
         emit methodChanged( "dvdnav-caching" );
 
@@ -352,7 +372,7 @@ void DiscOpenPanel::updateMRL()
 
     /* VCD */
     } else if ( ui.vcdRadioButton->isChecked() ) {
-        mrl = "vcd://" + ui.deviceCombo->currentText();
+        mrl = "\"vcd://" + ui.deviceCombo->currentText();
         emit methodChanged( "vcd-caching" );
 
         if( ui.titleSpin->value() > 0 ) {
@@ -361,12 +381,14 @@ void DiscOpenPanel::updateMRL()
 
     /* CDDA */
     } else {
-        mrl = "cdda://" + ui.deviceCombo->currentText();
+        mrl = "\"cdda://" + ui.deviceCombo->currentText();
         if( ui.titleSpin->value() > 0 ) {
             QString("@%1").arg( ui.titleSpin->value() );
         }
     }
 
+    mrl += "\"";
+
     if ( ui.dvdRadioButton->isChecked() || ui.vcdRadioButton->isChecked() )
     {
         if ( ui.audioSpin->value() >= 0 ) {
@@ -383,11 +405,11 @@ void DiscOpenPanel::updateMRL()
 
 void DiscOpenPanel::browseDevice()
 {
-    QString dir = QFileDialog::getExistingDirectory( 0,
-            qtr("Open a device or a VIDEO_TS directory") );
-    if (!dir.isEmpty()) {
-        ui.deviceCombo->setEditText( dir );
-    }
+    QString dir = QFileDialog::getExistingDirectory( this,
+            qtr( I_DEVICE_TOOLTIP ) );
+    if (!dir.isEmpty())
+        ui.deviceCombo->setEditText( toNativeSepNoSlash( dir ) );
+
     updateMRL();
 }
 
@@ -408,20 +430,23 @@ NetOpenPanel::NetOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     ui.setupUi( this );
 
     /* CONNECTs */
-    CONNECT( ui.protocolCombo, currentIndexChanged( int ),
+    CONNECT( ui.protocolCombo, activated( int ),
              this, updateProtocol( int ) );
     CONNECT( ui.portSpin, valueChanged( int ), this, updateMRL() );
     CONNECT( ui.addressText, textChanged( QString ), this, updateMRL());
     CONNECT( ui.timeShift, clicked(), this, updateMRL());
-    CONNECT( ui.ipv6, clicked(), this, updateMRL());
 
+    ui.protocolCombo->addItem( "" );
     ui.protocolCombo->addItem("HTTP", QVariant("http"));
     ui.protocolCombo->addItem("HTTPS", QVariant("https"));
-    ui.protocolCombo->addItem("FTP", QVariant("ftp"));
     ui.protocolCombo->addItem("MMS", QVariant("mms"));
+    ui.protocolCombo->addItem("FTP", QVariant("ftp"));
     ui.protocolCombo->addItem("RTSP", QVariant("rtsp"));
-    ui.protocolCombo->addItem("UDP/RTP (unicast)", QVariant("udp"));
-    ui.protocolCombo->addItem("UDP/RTP (multicast)", QVariant("udp"));
+    ui.protocolCombo->addItem("RTP", QVariant("rtp"));
+    ui.protocolCombo->addItem("UDP", QVariant("udp"));
+    ui.protocolCombo->addItem("RTMP", QVariant("rtmp"));
+
+    updateProtocol( ui.protocolCombo->currentIndex() );
 }
 
 NetOpenPanel::~NetOpenPanel()
@@ -431,19 +456,23 @@ void NetOpenPanel::clear()
 {}
 
 /* update the widgets according the type of protocol */
-void NetOpenPanel::updateProtocol( int idx ) {
+void NetOpenPanel::updateProtocol( int idx_proto ) {
     QString addr = ui.addressText->text();
-    QString proto = ui.protocolCombo->itemData( idx ).toString();
+    QString proto = ui.protocolCombo->itemData( idx_proto ).toString();
+
+    ui.timeShift->setEnabled( idx_proto == UDP_PROTO );
+    ui.portSpin->setEnabled( idx_proto == UDP_PROTO ||
+                             idx_proto == RTP_PROTO );
 
-    ui.timeShift->setEnabled( idx >= 5 );
-    ui.ipv6->setEnabled( idx == 5 );
-    ui.addressText->setEnabled( idx != 5 );
-    ui.portSpin->setEnabled( idx >= 5 );
+    if( idx_proto == NO_PROTO ) return;
 
     /* If we already have a protocol in the address, replace it */
-    if( addr.contains( "://")) {
-        msg_Err( p_intf, "replace");
-        addr.replace( QRegExp("^.*://"), proto + "://");
+    if( addr.contains( "://"))
+    {
+        if( idx_proto != UDP_PROTO && idx_proto != RTP_PROTO )
+            addr.replace( QRegExp("^.*://@*"), proto + "://");
+        else
+             addr.replace( QRegExp("^.*://"), proto + "://@");
         ui.addressText->setText( addr );
     }
     updateMRL();
@@ -452,53 +481,70 @@ void NetOpenPanel::updateProtocol( int idx ) {
 void NetOpenPanel::updateMRL() {
     QString mrl = "";
     QString addr = ui.addressText->text();
-    int proto = ui.protocolCombo->currentIndex();
+    addr = QUrl::toPercentEncoding( addr, ":/?#@!$&'()*+,;=" );
+    int idx_proto = ui.protocolCombo->currentIndex();
 
-    if( addr.contains( "://") && proto != 5 ) {
-        mrl = addr;
-    } else {
-        switch( proto ) {
-        case 0:
+    if( addr.contains( "://"))
+    {
+        /* Match the correct item in the comboBox */
+        ui.protocolCombo->setCurrentIndex(
+                ui.protocolCombo->findData( addr.section( ':', 0, 0 ) ) );
+
+        if( idx_proto != UDP_PROTO || idx_proto != RTP_PROTO )
+            mrl = addr;
+    }
+    else
+    {
+        switch( idx_proto ) {
+        case HTTP_PROTO:
             mrl = "http://" + addr;
             emit methodChanged("http-caching");
             break;
-        case 1:
+        case HTTPS_PROTO:
             mrl = "https://" + addr;
             emit methodChanged("http-caching");
             break;
-        case 3:
+        case MMS_PROTO:
             mrl = "mms://" + addr;
             emit methodChanged("mms-caching");
             break;
-        case 2:
+        case FTP_PROTO:
             mrl = "ftp://" + addr;
             emit methodChanged("ftp-caching");
             break;
-        case 4: /* RTSP */
+        case RTSP_PROTO:
             mrl = "rtsp://" + addr;
             emit methodChanged("rtsp-caching");
             break;
-        case 5:
+        case UDP_PROTO:
             mrl = "udp://@";
-            if( ui.ipv6->isEnabled() && ui.ipv6->isChecked() ) {
-                mrl += "[::]";
+            /* Add [] to IPv6 */
+            if ( addr.contains(':') && !addr.contains('[') )
+            {
+                mrl += "[" + addr + "]";
             }
+            else mrl += addr;
             mrl += QString(":%1").arg( ui.portSpin->value() );
             emit methodChanged("udp-caching");
             break;
-        case 6: /* UDP multicast */
-            mrl = "udp://@";
-            /* Add [] to IPv6 */
-            if ( addr.contains(':') && !addr.contains('[') ) {
-                mrl += "[" + addr + "]";
-            } else mrl += addr;
+        case RTP_PROTO:
+            mrl = "rtp://@";
+            if ( addr.contains(':') && !addr.contains('[') )
+                mrl += "[" + addr + "]"; /* Add [] to IPv6 */
+            else
+                mrl += addr;
             mrl += QString(":%1").arg( ui.portSpin->value() );
-            emit methodChanged("udp-caching");
+            emit methodChanged("rtp-caching");
+            break;
+        case RTMP_PROTO:
+            mrl = "rtmp://" + addr;
+            emit methodChanged("rtmp-caching");
+            break;
         }
     }
 
     // Encode the boring stuffs
-    mrl = QUrl( mrl ).toEncoded();
+
     if( ui.timeShift->isEnabled() && ui.timeShift->isChecked() ) {
         mrl += " :access-filter=timeshift";
     }
@@ -511,6 +557,16 @@ void NetOpenPanel::updateMRL() {
 CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
                                 OpenPanel( _parent, _p_intf )
 {
+    isInitialized = false;
+}
+
+void CaptureOpenPanel::initialize()
+{
+    if( isInitialized ) return;
+
+    msg_Dbg( p_intf, "Initialization of Capture device panel" );
+    isInitialized = true;
+
     ui.setupUi( this );
 
     BUTTONACT( ui.advancedButton, advancedDialog() );
@@ -540,7 +596,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     /*********************
      * DirectShow Stuffs *
      *********************/
-    if( module_Exists( p_intf, "dshow" ) ){
+    if( module_exists( p_intf, "dshow" ) ){
     addModuleAndLayouts( DSHOW_DEVICE, dshow, "DirectShow" );
 
     /* dshow Main */
@@ -574,7 +630,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     /**************
      * BDA Stuffs *
      **************/
-    if( module_Exists( p_intf, "bda" ) ){
+    if( module_exists( p_intf, "bda" ) ){
     addModuleAndLayouts( BDA_DEVICE, bda, "DVB DirectShow" );
 
     /* bda Main */
@@ -639,7 +695,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     /*******
      * V4L2*
      *******/
-    if( module_Exists( p_intf, "v4l2" ) ){
+    if( module_exists( p_intf, "v4l2" ) ){
     addModuleAndLayouts( V4L2_DEVICE, v4l2, "Video for Linux 2" );
 
     /* V4l Main panel */
@@ -674,7 +730,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     /*******
      * V4L *
      *******/
-    if( module_Exists( p_intf, "v4l" ) ){
+    if( module_exists( p_intf, "v4l" ) ){
     addModuleAndLayouts( V4L_DEVICE, v4l, "Video for Linux" );
 
     /* V4l Main panel */
@@ -719,12 +775,12 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     /*******
      * JACK *
      *******/
-    if( module_Exists( p_intf, "jack" ) ){
+    if( module_exists( p_intf, "jack" ) ){
     addModuleAndLayouts( JACK_DEVICE, jack, "JACK Audio Connection Kit" );
 
     /* Jack Main panel */
     /* Channels */
-    QLabel *jackChannelsLabel = new QLabel( qtr( "Channels :" ) );
+    QLabel *jackChannelsLabel = new QLabel( qtr( "Channels:" ) );
     jackDevLayout->addWidget( jackChannelsLabel, 1, 0 );
 
     jackChannels = new QSpinBox;
@@ -737,7 +793,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     /* Jack Props panel */
 
     /* Selected ports */
-    QLabel *jackPortsLabel = new QLabel( qtr( "Selected ports :" ) );
+    QLabel *jackPortsLabel = new QLabel( qtr( "Selected ports:" ) );
     jackPropLayout->addWidget( jackPortsLabel, 0 , 0 );
 
     jackPortsSelected = new QLineEdit( qtr( ".*") );
@@ -745,7 +801,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     jackPropLayout->addWidget( jackPortsSelected, 0, 1 );
 
     /* Caching */
-    QLabel *jackCachingLabel = new QLabel( qtr( "Input caching :" ) );
+    QLabel *jackCachingLabel = new QLabel( qtr( "Input caching:" ) );
     jackPropLayout->addWidget( jackCachingLabel, 1 , 0 );
     jackCaching = new QSpinBox;
     setSpinBoxFreq( jackCaching );
@@ -773,7 +829,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     /************
      * PVR      *
      ************/
-    if( module_Exists( p_intf, "pvr" ) ){
+    if( module_exists( p_intf, "pvr" ) ){
     addModuleAndLayouts( PVR_DEVICE, pvr, "PVR" );
 
     /* PVR Main panel */
@@ -829,7 +885,7 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     /**************
      * DVB Stuffs *
      **************/
-    if( module_Exists( p_intf, "dvb" ) ){
+    if( module_exists( p_intf, "dvb" ) ){
     addModuleAndLayouts( DVB_DEVICE, dvb, "DVB" );
 
     /* DVB Main */
@@ -897,11 +953,20 @@ CaptureOpenPanel::CaptureOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
     screenLabel->setWordWrap( true );
     screenDevLayout->addWidget( screenLabel, 0, 0 );
 
+    QLabel *screenFPSLabel = new QLabel(
+            qtr( "Desired frame rate for the capture." ) );
+    screenPropLayout->addWidget( screenFPSLabel, 0, 0 );
+
+    screenFPS = new QSpinBox;
+    screenFPS->setValue( 1 );
+    screenFPS->setAlignment( Qt::AlignRight );
+    screenPropLayout->addWidget( screenFPS, 0, 1 );
+
     /* General connects */
-    connect( ui.deviceCombo, SIGNAL( activated( int ) ),
-                     stackedDevLayout, SLOT( setCurrentIndex( int ) ) );
-    connect( ui.deviceCombo, SIGNAL( activated( int ) ),
-                     stackedPropLayout, SLOT( setCurrentIndex( int ) ) );
+    CONNECT( ui.deviceCombo, activated( int ) ,
+             stackedDevLayout, setCurrentIndex( int ) );
+    CONNECT( ui.deviceCombo, activated( int ),
+             stackedPropLayout, setCurrentIndex( int ) );
     CONNECT( ui.deviceCombo, activated( int ), this, updateMRL() );
     CONNECT( ui.deviceCombo, activated( int ), this, updateButtons() );
 
@@ -992,6 +1057,7 @@ void CaptureOpenPanel::updateMRL()
 #endif
     case SCREEN_DEVICE:
         mrl = "screen://";
+        mrl += " :screen-fps=" + QString("%1").arg( screenFPS->value() );
         updateButtons();
         break;
     }
@@ -1014,7 +1080,6 @@ void CaptureOpenPanel::updateButtons()
     /* Get the current Device Number */
     int i_devicetype = ui.deviceCombo->itemData(
                                 ui.deviceCombo->currentIndex() ).toInt();
-    msg_Dbg( p_intf, "Capture Type: %i", i_devicetype );
     switch( i_devicetype )
     {
 #ifdef WIN32
@@ -1041,7 +1106,7 @@ void CaptureOpenPanel::updateButtons()
         break;
 #endif
     case SCREEN_DEVICE:
-        ui.optionsBox->hide();
+        //ui.optionsBox->hide();
         ui.advancedButton->hide();
         break;
     }
@@ -1057,7 +1122,7 @@ void CaptureOpenPanel::advancedDialog()
 
     /* Get the corresponding module */
     module_t *p_module =
-        module_Find( VLC_OBJECT(p_intf), psz_devModule[i_devicetype] );
+        module_find( VLC_OBJECT(p_intf), psz_devModule[i_devicetype] );
     if( NULL == p_module ) return;
 
     /* Init */
@@ -1066,23 +1131,21 @@ void CaptureOpenPanel::advancedDialog()
     /* Get the confsize  */
     unsigned int i_confsize;
     module_config_t *p_config;
-    p_config = module_GetConfig( p_module, &i_confsize );
+    p_config = module_config_get( p_module, &i_confsize );
 
     /* New Adv Prop dialog */
     adv = new QDialog( this );
-    adv->setWindowTitle( qtr( "Advanced options..." ) );
+    adv->setWindowTitle( qtr( "Advanced Options" ) );
 
     /* A main Layout with a Frame */
     QVBoxLayout *mainLayout = new QVBoxLayout( adv );
-    QFrame *advFrame = new QFrame;
     QScrollArea *scroll = new QScrollArea;
     mainLayout->addWidget( scroll );
 
+    QFrame *advFrame = new QFrame;
     /* GridLayout inside the Frame */
     QGridLayout *gLayout = new QGridLayout( advFrame );
-    gLayout->setSizeConstraint( QLayout::SetFixedSize );
 
-    scroll->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff );
     scroll->setWidgetResizable( true );
     scroll->setWidget( advFrame );
 
@@ -1097,7 +1160,7 @@ void CaptureOpenPanel::advancedDialog()
 
     /* Button stuffs */
     QDialogButtonBox *advButtonBox = new QDialogButtonBox( adv );
-    QPushButton *closeButton = new QPushButton( qtr( "Ok" ) );
+    QPushButton *closeButton = new QPushButton( qtr( "OK" ) );
     QPushButton *cancelButton = new QPushButton( qtr( "Cancel" ) );
 
     CONNECT( closeButton, clicked(), adv, accept() );
@@ -1106,7 +1169,7 @@ void CaptureOpenPanel::advancedDialog()
     advButtonBox->addButton( closeButton, QDialogButtonBox::AcceptRole );
     advButtonBox->addButton( cancelButton, QDialogButtonBox::RejectRole );
 
-    gLayout->addWidget( advButtonBox, i_confsize + 1, 0, 1, -1  );
+    mainLayout->addWidget( advButtonBox );
 
     /* Creation of the MRL */
     if( adv->exec() )
@@ -1150,5 +1213,7 @@ void CaptureOpenPanel::advancedDialog()
         msg_Dbg( p_intf, "%s", qtu( advMRL ) );
     }
     delete adv;
+    module_config_free( p_config );
+    module_release (p_module);
 }