[vlc-devel] commit: Remove exceptions. ( Rémi Duraffort )

git version control git at videolan.org
Thu Feb 11 19:04:02 CET 2010


vlc/libvlcpp | branch: master | Rémi Duraffort <ivoire at videolan.org> | Thu Feb 11 18:56:05 2010 +0100| [1e81b68876884ddc968d42ba7aabdff4f9ba885e] | committer: Rémi Duraffort 

Remove exceptions.

> http://git.videolan.org/gitweb.cgi/vlc/libvlcpp.git/?a=commit;h=1e81b68876884ddc968d42ba7aabdff4f9ba885e
---

 src/Makefile.am   |    4 +---
 src/exception.cpp |   38 --------------------------------------
 src/exception.hpp |   50 --------------------------------------------------
 src/media.cpp     |    3 +--
 src/media.hpp     |    2 +-
 src/video.cpp     |    1 -
 6 files changed, 3 insertions(+), 95 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 6b5ef6c..c690911 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,8 +3,6 @@ lib_LTLIBRARIES = libvlcpp.la
 libvlcpp_la_SOURCES =   \
     audio.cpp           \
     audio.hpp           \
-    exception.cpp       \
-    exception.hpp       \
     libvlc.cpp          \
     libvlc.hpp          \
     media.cpp           \
@@ -17,7 +15,7 @@ libvlcpp_la_SOURCES =   \
 libvlcpp_la_CXXFLAGS = @libvlc_CFLAGS@
 libvlcpp_la_LDFLAGS = @libvlc_LIBS@ -version-info 1:0:0
 library_includedir=$(includedir)/libvlcpp
-library_include_HEADERS = exception.hpp libvlc.hpp media.hpp media_player.hpp video.hpp audio.hpp
+library_include_HEADERS = libvlc.hpp media.hpp media_player.hpp video.hpp audio.hpp
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libvlcpp.pc
diff --git a/src/exception.cpp b/src/exception.cpp
deleted file mode 100644
index bfb254f..0000000
--- a/src/exception.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/*****************************************************************************
- * exception.cpp: Handle exceptions
- *****************************************************************************
- * Copyright (C) 2010 the VideoLAN team
- * $Id$
- *
- * Authors: Rémi Duraffort <ivoire at videolan.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#include "exception.hpp"
-
-using namespace libvlc;
-
-Exception::Exception()
-{
-    libvlc_exception_init( &ex );
-}
-
-Exception::~Exception()
-{
-    if( libvlc_exception_raised( &ex ) )
-        throw libvlc_errmsg();
-    libvlc_exception_clear( &ex );
-}
diff --git a/src/exception.hpp b/src/exception.hpp
deleted file mode 100644
index 41c6543..0000000
--- a/src/exception.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-/*****************************************************************************
- * exception.hpp: handle exceptions
- *****************************************************************************
- * Copyright (C) 2010 the VideoLAN team
- * $Id$
- *
- * Authors: Rémi Duraffort <ivoire at videolan.org>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef LIBVLCPP_EXCEPTION_HPP
-#define LIBVLCPP_EXCEPTION_HPP
-
-#include <vlc/libvlc.h>
-
-#include "libvlc.hpp"
-
-namespace libvlc
-{
-
-class Exception
-{
-public:
-    /** Create the exception */
-    Exception();
-
-    /** Destroy te exception */
-    ~Exception();
-
-    /** The exception */
-    libvlc_exception_t ex;
-};
-
-};
-
-#endif // LIBVLCPP_EXCEPTION_HPP
-
diff --git a/src/media.cpp b/src/media.cpp
index 9e16652..c5544cb 100644
--- a/src/media.cpp
+++ b/src/media.cpp
@@ -22,7 +22,6 @@
  *****************************************************************************/
 
 #include "media.hpp"
-#include "exception.hpp"
 
 using namespace libvlc;
 
@@ -48,7 +47,7 @@ void Media::addOption( const char *ppsz_options )
     libvlc_media_add_option( m_media, ppsz_options );
 }
 
-void Media::addOption( const char *ppsz_options, libvlc_media_option_t flag )
+void Media::addOption( const char *ppsz_options, unsigned flag )
 {
     libvlc_media_add_option_flag( m_media, ppsz_options, flag );
 }
diff --git a/src/media.hpp b/src/media.hpp
index 4402eef..aeb8618 100644
--- a/src/media.hpp
+++ b/src/media.hpp
@@ -66,7 +66,7 @@ public:
      * @param ppsz_options: the options as a string
      * @param flag: the flag for the options
      */
-    void addOption( const char *ppsz_options, libvlc_media_option_t flag );
+    void addOption( const char *ppsz_options, unsigned flag );
 
 
     /**
diff --git a/src/video.cpp b/src/video.cpp
index 83fed52..32fa8b8 100644
--- a/src/video.cpp
+++ b/src/video.cpp
@@ -23,7 +23,6 @@
 
 #include <cstdlib>
 #include "video.hpp"
-#include "exception.hpp"
 
 
 using namespace libvlc;




More information about the vlc-devel mailing list