summaryrefslogtreecommitdiff
path: root/gio/src/socket.ccg
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2010-05-31 13:16:28 +0200
committerMurray Cumming <murrayc@murrayc.com>2010-05-31 13:16:28 +0200
commitde7e9208edb460830accf5835afcbbf9ac4d212b (patch)
treed74cd224716e60e11723a3ba2777f1a757c218fe /gio/src/socket.ccg
parentf510673363137d691f5063bc68d9fa7bb3ef9709 (diff)
downloadglibmm-de7e9208edb460830accf5835afcbbf9ac4d212b.tar.gz
Remove the reduced API options and code, as discussed on mailing list.
* configure.ac: Removed the --enable-api-exceptions, --enable-api-properties, --enable-api-vfuncs and --enable-api-default-signal-handlers options. * build/reduced.m4: Removed. * tools/m4/*.m4: * tools/pm/Output.pm: Remove any use of ifdefs and auto_ptr for reduced API. * *.[hg|ccg|h|cc]: Remove the idefed code.
Diffstat (limited to 'gio/src/socket.ccg')
-rw-r--r--gio/src/socket.ccg110
1 files changed, 0 insertions, 110 deletions
diff --git a/gio/src/socket.ccg b/gio/src/socket.ccg
index 516dbea8..9c3f1e42 100644
--- a/gio/src/socket.ccg
+++ b/gio/src/socket.ccg
@@ -24,199 +24,98 @@
namespace Gio
{
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
Socket::Socket(SocketFamily family, SocketType type, SocketProtocol protocol,
const Glib::RefPtr<Cancellable>& cancellable)
-#else
-Socket::Socket(SocketFamily family, SocketType type, SocketProtocol protocol,
- std::auto_ptr<Glib::Error>& error,
- const Glib::RefPtr<Cancellable>& cancellable)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
:
_CONSTRUCT("family", int(family), "type", int(type), "protocol", int(protocol))
{
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
init(cancellable);
-#else
- init(cancellable, error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
Socket::Socket(int fd, const Glib::RefPtr<Cancellable>& cancellable)
-#else
-Socket::Socket(int fd, std::auto_ptr<Glib::Error>& error,
- const Glib::RefPtr<Cancellable>& cancellable)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
:
_CONSTRUCT("fd", fd)
{
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
init(cancellable);
-#else
- init(cancellable, error);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
// static
Glib::RefPtr<Socket> Socket::create(SocketFamily family, SocketType type, SocketProtocol protocol,
const Glib::RefPtr<Cancellable>& cancellable)
-#else
-Glib::RefPtr<Socket> Socket::create(SocketFamily family, SocketType type, SocketProtocol protocol,
- std::auto_ptr<Glib::Error>& error,
- const Glib::RefPtr<Cancellable>& cancellable)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
return Glib::RefPtr<Socket>(new Socket(family, type, protocol, cancellable));
-#else
- return Glib::RefPtr<Socket>(new Socket(family, type, protocol, error, cancellable));
-#endif //GLIBMM_EXCEPTIONS_ENABLED
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
// static
Glib::RefPtr<Socket> Socket::create_from_fd(int fd, const Glib::RefPtr<Cancellable>& cancellable)
-#else
-Glib::RefPtr<Socket> Socket::create_from_fd(int fd, std::auto_ptr<Glib::Error>& error,
- const Glib::RefPtr<Cancellable>& cancellable)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
return Glib::RefPtr<Socket>(new Socket(fd, cancellable));
-#else
- return Glib::RefPtr<Socket>(new Socket(fd, error, cancellable));
-#endif //GLIBMM_EXCEPTIONS_ENABLED
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
void Socket::connect(const Glib::RefPtr<SocketAddress>& address)
-#else
-void Socket::connect(const Glib::RefPtr<SocketAddress>& address, std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
g_socket_connect(gobj(), const_cast<GSocketAddress*>(Glib::unwrap(address)), 0, &(gerror));
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
Glib::RefPtr<Socket> Socket::accept()
-#else
-Glib::RefPtr<Socket> Socket::accept(std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
Glib::RefPtr<Socket> retvalue = Glib::wrap(g_socket_accept(gobj(), 0, &(gerror)));
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
return retvalue;
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
gssize Socket::receive(char* buffer, gsize size)
-#else
-gssize Socket::receive(char* buffer, gsize size, std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
gssize retvalue = g_socket_receive(gobj(), buffer, size, 0, &(gerror));
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
return retvalue;
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
gssize Socket::send(const gchar* buffer, gsize size)
-#else
-gssize Socket::send(const gchar* buffer, gsize size, std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
gssize retvalue = g_socket_send(gobj(), buffer, size, 0, &(gerror));
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
return retvalue;
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
gssize Socket::send_to(const Glib::RefPtr<SocketAddress>& address, const char* buffer, gsize size)
-#else
-gssize Socket::send_to(const Glib::RefPtr<SocketAddress>& address, const char* buffer, gsize size, std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
gssize retvalue = g_socket_send_to(gobj(), const_cast<GSocketAddress*>(Glib::unwrap(address)), buffer, size, 0, &(gerror));
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
return retvalue;
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
void Socket::condition_wait(Glib::IOCondition condition)
-#else
-void Socket::condition_wait(Glib::IOCondition condition, std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
g_socket_condition_wait(gobj(), ((GIOCondition)(condition)), 0, &(gerror));
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
gssize Socket::receive_from(Glib::RefPtr<SocketAddress>& address, char* buffer, gsize size, const Glib::RefPtr<Cancellable>& cancellable)
-#else
-gssize Socket::receive_from(Glib::RefPtr<SocketAddress>& address, char* buffer, gsize size, const Glib::RefPtr<Cancellable>& cancellable, std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
GSocketAddress* caddr = 0;
gssize retvalue = g_socket_receive_from(gobj(), &caddr, buffer, size, const_cast<GCancellable*>(Glib::unwrap(cancellable)), &(gerror));
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
if (caddr)
address = Glib::wrap (caddr);
@@ -224,22 +123,13 @@ gssize Socket::receive_from(Glib::RefPtr<SocketAddress>& address, char* buffer,
return retvalue;
}
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
gssize Socket::receive_from(Glib::RefPtr<SocketAddress>& address, char* buffer, gsize size)
-#else
-gssize Socket::receive_from(Glib::RefPtr<SocketAddress>& address, char* buffer, gsize size, std::auto_ptr<Glib::Error>& error)
-#endif //GLIBMM_EXCEPTIONS_ENABLED
{
GError* gerror = 0;
GSocketAddress* caddr = 0;
gssize retvalue = g_socket_receive_from(gobj(), &caddr, buffer, size, 0, &(gerror));
-#ifdef GLIBMM_EXCEPTIONS_ENABLED
if(gerror)
::Glib::Error::throw_exception(gerror);
-#else
- if(gerror)
- error = ::Glib::Error::throw_exception(gerror);
-#endif //GLIBMM_EXCEPTIONS_ENABLED
if (caddr)
address = Glib::wrap (caddr);