00001 00002 // -*- c++ -*- 00003 /* Do not edit! -- generated file */ 00004 00005 /*************************************************************************** 00006 * Copyright (C) 2009,2010 by Rick L. Vinyard, Jr. * 00007 * rvinyard@cs.nmsu.edu * 00008 * * 00009 * This file is part of the dbus-cxx library. * 00010 * * 00011 * The dbus-cxx library is free software; you can redistribute it and/or * 00012 * modify it under the terms of the GNU General Public License * 00013 * version 3 as published by the Free Software Foundation. * 00014 * * 00015 * The dbus-cxx library is distributed in the hope that it will be * 00016 * useful, but WITHOUT ANY WARRANTY; without even the implied warranty * 00017 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00018 * General Public License for more details. * 00019 * * 00020 * You should have received a copy of the GNU General Public License * 00021 * along with this software. If not see <http://www.gnu.org/licenses/>. * 00022 ***************************************************************************/ 00023 #include <string> 00024 00025 #include <sigc++/sigc++.h> 00026 00027 #include <dbus-cxx/enums.h> 00028 #include <dbus-cxx/pointer.h> 00029 #include <dbus-cxx/forward_decls.h> 00030 #include <dbus-cxx/accumulators.h> 00031 #include <dbus-cxx/callmessage.h> 00032 #include <dbus-cxx/returnmessage.h> 00033 #include <dbus-cxx/pendingcall.h> 00034 00035 #ifndef DBUSCXX_METHODPROXYBASE_H 00036 #define DBUSCXX_METHODPROXYBASE_H 00037 00038 namespace DBus 00039 { 00046 class MethodProxyBase 00047 { 00048 protected: 00049 00050 MethodProxyBase( const std::string& name ); 00051 00052 MethodProxyBase(const MethodProxyBase& other); 00053 00054 public: 00055 00056 typedef DBusCxxPointer<MethodProxyBase> pointer; 00057 00058 static pointer create( const std::string& name ); 00059 00060 ~MethodProxyBase(); 00061 00062 InterfaceProxy* interface() const; 00063 00064 const std::string& name() const; 00065 00066 void set_name( const std::string& name ); 00067 00068 CallMessage::pointer create_call_message( ) const; 00069 00070 ReturnMessage::const_pointer call( CallMessage::const_pointer, int timeout_milliseconds=-1 ) const; 00071 00072 00073 00074 PendingCall::pointer call_async( CallMessage::const_pointer, int timeout_milliseconds=-1 ) const; 00075 00076 sigc::signal<void,const std::string&/*old name*/, const std::string&/*new name*/> signal_name_changed(); 00077 00078 protected: 00079 00080 // Declare InterfaceProxy as a friend so that it can set the interface 00081 friend class InterfaceProxy; 00082 00083 InterfaceProxy* m_interface; 00084 00085 std::string m_name; 00086 00088 pthread_mutex_t m_name_mutex; 00089 00090 sigc::signal<void,const std::string&, const std::string&> m_signal_name_changed; 00091 00092 }; 00093 00094 } 00095 00096 #endif