D-Bus 1.6.12
|
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 00002 /* 00003 * dbus-socket-set.c - used to bolt file descriptors onto a bus 00004 * 00005 * Copyright © 2011 Nokia Corporation 00006 * 00007 * Licensed under the Academic Free License version 2.1 00008 * 00009 * This program is free software; you can redistribute it and/or modify 00010 * it under the terms of the GNU General Public License as published by 00011 * the Free Software Foundation; either version 2 of the License, or 00012 * (at your option) any later version. 00013 * 00014 * This program is distributed in the hope that it will be useful, 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 * GNU General Public License for more details. 00018 * 00019 * You should have received a copy of the GNU General Public License 00020 * along with this program; if not, write to the Free Software 00021 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00022 * MA 02110-1301 USA 00023 * 00024 */ 00025 00026 #include <config.h> 00027 #include <dbus/dbus-socket-set.h> 00028 00029 DBusSocketSet * 00030 _dbus_socket_set_new (int size_hint) 00031 { 00032 DBusSocketSet *ret; 00033 00034 #ifdef DBUS_HAVE_LINUX_EPOLL 00035 ret = _dbus_socket_set_epoll_new (); 00036 00037 if (ret != NULL) 00038 return ret; 00039 #endif 00040 00041 ret = _dbus_socket_set_poll_new (size_hint); 00042 00043 if (ret != NULL) 00044 return ret; 00045 00046 return NULL; 00047 }