Path: blob/master/thirdparty/linuxbsd_headers/dbus/dbus-pending-call.h
9898 views
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */1/* dbus-pending-call.h Object representing a call in progress.2*3* Copyright (C) 2002, 2003 Red Hat Inc.4*5* Licensed under the Academic Free License version 2.16*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA20*21*/22#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)23#error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."24#endif2526#ifndef DBUS_PENDING_CALL_H27#define DBUS_PENDING_CALL_H2829#include <dbus/dbus-macros.h>30#include <dbus/dbus-types.h>31#include <dbus/dbus-connection.h>3233DBUS_BEGIN_DECLS3435/**36* @addtogroup DBusPendingCall37* @{38*/3940#define DBUS_TIMEOUT_INFINITE ((int) 0x7fffffff)41#define DBUS_TIMEOUT_USE_DEFAULT (-1)4243DBUS_EXPORT44DBusPendingCall* dbus_pending_call_ref (DBusPendingCall *pending);45DBUS_EXPORT46void dbus_pending_call_unref (DBusPendingCall *pending);47DBUS_EXPORT48dbus_bool_t dbus_pending_call_set_notify (DBusPendingCall *pending,49DBusPendingCallNotifyFunction function,50void *user_data,51DBusFreeFunction free_user_data);52DBUS_EXPORT53void dbus_pending_call_cancel (DBusPendingCall *pending);54DBUS_EXPORT55dbus_bool_t dbus_pending_call_get_completed (DBusPendingCall *pending);56DBUS_EXPORT57DBusMessage* dbus_pending_call_steal_reply (DBusPendingCall *pending);58DBUS_EXPORT59void dbus_pending_call_block (DBusPendingCall *pending);6061DBUS_EXPORT62dbus_bool_t dbus_pending_call_allocate_data_slot (dbus_int32_t *slot_p);63DBUS_EXPORT64void dbus_pending_call_free_data_slot (dbus_int32_t *slot_p);65DBUS_EXPORT66dbus_bool_t dbus_pending_call_set_data (DBusPendingCall *pending,67dbus_int32_t slot,68void *data,69DBusFreeFunction free_data_func);70DBUS_EXPORT71void* dbus_pending_call_get_data (DBusPendingCall *pending,72dbus_int32_t slot);7374/**75* Clear a variable or struct member that contains a #DBusPendingCall.76* If it does not contain #NULL, the pending call that was previously77* there is unreferenced with dbus_pending_call_unref().78*79* This is very similar to dbus_clear_connection(): see that function80* for more details.81*82* @param pointer_to_pending_call A pointer to a variable or struct member.83* pointer_to_pending_call must not be #NULL, but *pointer_to_pending_call84* may be #NULL.85*/86static inline void87dbus_clear_pending_call (DBusPendingCall **pointer_to_pending_call)88{89_dbus_clear_pointer_impl (DBusPendingCall, pointer_to_pending_call,90dbus_pending_call_unref);91}9293/** @} */9495DBUS_END_DECLS9697#endif /* DBUS_PENDING_CALL_H */9899100