<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>utils.c Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.2.15 --> <center> <a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="modules.html">Modules</a> <a class="qindex" href="annotated.html">Data Structures</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="functions.html">Data Fields</a> <a class="qindex" href="pages.html">Related Pages</a> </center> <hr><h1>utils.c</h1><div class="fragment"><pre>00001 <font class="comment">/* -*- mode: C; c-file-style: "gnu" -*- */</font> 00002 <font class="comment">/* utils.c General utility functions</font> 00003 <font class="comment"> *</font> 00004 <font class="comment"> * Copyright (C) 2003 CodeFactory AB</font> 00005 <font class="comment"> * Copyright (C) 2003 Red Hat, Inc.</font> 00006 <font class="comment"> *</font> 00007 <font class="comment"> * Licensed under the Academic Free License version 1.2</font> 00008 <font class="comment"> * </font> 00009 <font class="comment"> * This program is free software; you can redistribute it and/or modify</font> 00010 <font class="comment"> * it under the terms of the GNU General Public License as published by</font> 00011 <font class="comment"> * the Free Software Foundation; either version 2 of the License, or</font> 00012 <font class="comment"> * (at your option) any later version.</font> 00013 <font class="comment"> *</font> 00014 <font class="comment"> * This program is distributed in the hope that it will be useful,</font> 00015 <font class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</font> 00016 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</font> 00017 <font class="comment"> * GNU General Public License for more details.</font> 00018 <font class="comment"> * </font> 00019 <font class="comment"> * You should have received a copy of the GNU General Public License</font> 00020 <font class="comment"> * along with this program; if not, write to the Free Software</font> 00021 <font class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</font> 00022 <font class="comment"> *</font> 00023 <font class="comment"> */</font> 00024 00025 <font class="preprocessor">#include <config.h></font> 00026 <font class="preprocessor">#include "utils.h"</font> 00027 <font class="preprocessor">#include <dbus/dbus-sysdeps.h></font> 00028 <font class="preprocessor">#include <dbus/dbus-mainloop.h></font> 00029 00030 <font class="keyword">const</font> <font class="keywordtype">char</font> bus_no_memory_message[] = <font class="stringliteral">"Memory allocation failure in message bus"</font>; 00031 00032 <font class="keywordtype">void</font> 00033 bus_connection_dispatch_all_messages (<a class="code" href="structDBusConnection.html">DBusConnection</a> *connection) 00034 { 00035 <font class="keywordflow">while</font> (bus_connection_dispatch_one_message (connection)) 00036 ; 00037 } 00038 00039 dbus_bool_t 00040 bus_connection_dispatch_one_message (<a class="code" href="structDBusConnection.html">DBusConnection</a> *connection) 00041 { 00042 DBusDispatchStatus status; 00043 00044 <font class="keywordflow">while</font> ((status = dbus_connection_dispatch (connection)) == DBUS_DISPATCH_NEED_MEMORY) 00045 _dbus_wait_for_memory (); 00046 00047 <font class="keywordflow">return</font> status == DBUS_DISPATCH_DATA_REMAINS; 00048 } </pre></div><hr><address align="right"><small>Generated on Mon Sep 29 21:31:02 2003 for D-BUS by <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.15 </small></address> </body> </html>