task.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 // Generated by gtkmmproc -- DO NOT MODIFY!
00003 #ifndef _GSTREAMERMM_TASK_H
00004 #define _GSTREAMERMM_TASK_H
00005 
00006 
00007 #include <glibmm.h>
00008 
00009 // -*- Mode: C++; indent-tabs-mode: nil; c-basic-offset: 2 -*-
00010 
00011 /* gstreamermm - a C++ wrapper for gstreamer
00012  *
00013  * Copyright 2008 The gstreamermm Development Team
00014  *
00015  * This library is free software; you can redistribute it and/or
00016  * modify it under the terms of the GNU Library General Public
00017  * License as published by the Free Software Foundation; either
00018  * version 2 of the License, or (at your option) any later version.
00019  *
00020  * This library is distributed in the hope that it will be useful,
00021  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00022  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00023  * Library General Public License for more details.
00024  *
00025  * You should have received a copy of the GNU Library General Public
00026  * License along with this library; if not, write to the Free
00027  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00028  */
00029 
00030 #include <gst/gsttask.h>
00031 #include <gstreamermm/object.h>
00032 
00033 
00034 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00035 typedef struct _GstTask GstTask;
00036 typedef struct _GstTaskClass GstTaskClass;
00037 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00038 
00039 
00040 namespace Gst
00041 { class Task_Class; } // namespace Gst
00042 namespace Gst
00043 {
00044 
00050 enum TaskState
00051 {
00052   TASK_STARTED,
00053   TASK_STOPPED,
00054   TASK_PAUSED
00055 };
00056 
00057 } // namespace Gst
00058 
00059 
00060 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00061 namespace Glib
00062 {
00063 
00064 template <>
00065 class Value<Gst::TaskState> : public Glib::Value_Enum<Gst::TaskState>
00066 {
00067 public:
00068   static GType value_type() G_GNUC_CONST;
00069 };
00070 
00071 } // namespace Glib
00072 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00073 
00074 
00075 namespace Gst
00076 {
00077 
00078 
00110 class Task : public Object
00111 {
00112   
00113 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00114 
00115 public:
00116   typedef Task CppObjectType;
00117   typedef Task_Class CppClassType;
00118   typedef GstTask BaseObjectType;
00119   typedef GstTaskClass BaseClassType;
00120 
00121 private:  friend class Task_Class;
00122   static CppClassType task_class_;
00123 
00124 private:
00125   // noncopyable
00126   Task(const Task&);
00127   Task& operator=(const Task&);
00128 
00129 protected:
00130   explicit Task(const Glib::ConstructParams& construct_params);
00131   explicit Task(GstTask* castitem);
00132 
00133 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00134 
00135 public:
00136   virtual ~Task();
00137 
00138 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00139   static GType get_type()      G_GNUC_CONST;
00140   static GType get_base_type() G_GNUC_CONST;
00141 #endif
00142 
00144   GstTask*       gobj()       { return reinterpret_cast<GstTask*>(gobject_); }
00145 
00147   const GstTask* gobj() const { return reinterpret_cast<GstTask*>(gobject_); }
00148 
00150   GstTask* gobj_copy();
00151 
00152 private:
00153 
00154   
00155 public:
00159   typedef sigc::slot<void> SlotTask;
00160 
00170   static Glib::RefPtr<Task> create(const SlotTask& slot);
00171 
00172   
00178   static void cleanup_all();
00179   
00185   TaskState get_state();
00186   
00199   bool join();
00200   
00209   bool pause();
00210   
00220   void set_lock(Glib::StaticRecMutex& mutex);
00221   
00228   bool start();
00229   
00237   bool stop();
00238 
00239 protected:
00240   SlotTask* slot;
00241 
00242 
00243 public:
00244 
00245 public:
00246   //C++ methods used to invoke GTK+ virtual functions:
00247 #ifdef GLIBMM_VFUNCS_ENABLED
00248 #endif //GLIBMM_VFUNCS_ENABLED
00249 
00250 protected:
00251   //GTK+ Virtual Functions (override these to change behaviour):
00252 #ifdef GLIBMM_VFUNCS_ENABLED
00253 #endif //GLIBMM_VFUNCS_ENABLED
00254 
00255   //Default Signal Handlers::
00256 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00257 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
00258 
00259 
00260 };
00261 
00262 } // namespace Gst
00263 
00264 
00265 namespace Glib
00266 {
00275   Glib::RefPtr<Gst::Task> wrap(GstTask* object, bool take_copy = false);
00276 }
00277 
00278 
00279 #endif /* _GSTREAMERMM_TASK_H */
00280 

Generated on Sun Jul 27 17:07:20 2008 for gstreamermm by  doxygen 1.5.4