summaryrefslogtreecommitdiff
path: root/src/dbusbind.c
Commit message (Collapse)AuthorAgeFilesLines
* * dbusbind.c (Fdbus_register_service): Raise an error in case ofMichael Albinus2011-01-101-20/+17
| | | | | unexpected return values. (Fdbus_register_method): Remove connection initialization.
* * dbusbind.c (QCdbus_request_name_allow_replacement): New symbol;Michael Albinus2011-01-101-12/+147
| | | | | | | | | | | | | | | | used by Fdbus_register_service. (QCdbus_request_name_replace_existing): Likewise. (QCdbus_request_name_do_not_queue): Likewise. (QCdbus_request_name_reply_primary_owner): Likewise. (QCdbus_request_name_reply_in_queue): Likewise. (QCdbus_request_name_reply_exists): Likewise. (QCdbus_request_name_reply_already_owner): Likewise. (Fdbus_register_service): New function. (Fdbus_register_method): Use Fdbus_register_service to do the name registration. (syms_of_dbusbind): Add symbols dbus-register-service, :allow-replacement, :replace-existing, :do-not-queue, :primary-owner, :existing, :in-queue and :already-owner.
* * dbusbind.c (Fdbus_register_method): Added optional parameterMichael Albinus2011-01-041-17/+31
| | | | dont_register_service. Updated docstring accordingly.
* Fix syntax error in previous commit.Michael Albinus2010-11-101-1/+1
|
* * dbusbind.c (QCdbus_type_unix_fd): New Lisp object.Michael Albinus2010-11-101-0/+38
| | | | | | | (XD_BASIC_DBUS_TYPE, xd_symbol_to_dbus_type, xd_signature) (xd_append_arg, xd_retrieve_arg): Support DBUS_TYPE_UNIX_FD. (Fdbus_call_method): Add DBUS_TYPE_UNIX_FD type mapping to doc string. (syms_of_dbusbind): Initialize QCdbus_type_unix_fd).
* Fix error in last merge from branch.Chong Yidong2010-11-011-12/+0
| | | | | Remove 2010-10-25 commit by Michael Albinus to dbusbind.c, which is not intended for trunk.
* Merge changes from emacs-23 branchChong Yidong2010-10-311-0/+12
|\
| * * dbusbind.c (Fdbus_call_method_asynchronously)Michael Albinus2010-10-251-0/+12
| | | | | | | | | | | | | | (Fdbus_register_signal, Fdbus_register_method): Check, whether `dbus-registered-objects-table' is initialized. Must not be synchronized with the trunk.
| * * dbusbind.c (xd_get_dispatch_status): Return a Lisp_Object.Michael Albinus2010-10-081-8/+19
| | | | | | | | (xd_pending_messages): Catch xd_get_dispatch_status calls.
* | Merge changes from emacs-23 branch.Juanma Barranquero2010-10-081-4/+6
|\ \ | |/
| * * dbusbind.c (syms_of_dbusbind): Move putenv call ...Michael Albinus2010-10-031-4/+6
| | | | | | | | (Fdbus_init_bus): ... here. (Bug#7113)
| * * dbusbind.c (syms_of_dbusbind): Use putenv instead of setenv, itMichael Albinus2010-09-281-1/+1
| | | | | | | | | | | | | | | | is more portable. * keyboard.c (gobble_input): Move call of xd_read_queued_messages ... (kbd_buffer_get_event): ... here. This is needed for cygwin, which has not defined SIGIO.
* | Do not include stdlib.h and string.h, config.h does it.Dan Nicolaescu2010-10-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/xfont.c: * src/w32term.c: * src/w32reg.c: * src/w32inevt.c: * src/w32heap.c: * src/w32console.c: * src/w16select.c: * src/unexsol.c: * src/term.c: * src/sound.c: * src/scroll.c (m): * src/gtkutil.c: * src/font.c: * src/filelock.c: * src/fileio.c: * src/dosfns.c: * src/dbusbind.c: * src/bidi.c: * src/callproc.c: * src/process.c: * src/msdos.c: * src/charset.c: Do not include stdlib.h and string.h, config.h does it. * configure.in: Include stdlib.h and string.h unconditionally.
* | Merge changes from emacs-23 branch.Juanma Barranquero2010-09-281-0/+4
|\ \ | |/
| * * dbusbind.c (syms_of_dbusbind): Set $DBUS_FATAL_WARNINGS to "0".Michael Albinus2010-09-271-1/+1
| | | | | | | | (Bug#7113)
| * * dbusbind.c (syms_of_dbusbind): Set $DBUS_FATAL_WARNINGS to "0".Michael Albinus2010-09-271-1/+3
| | | | | | | | (Bug#7113)
| * * dbusbind.c (syms_of_dbusbind): Unset $DBUS_FATAL_WARNINGS.Michael Albinus2010-09-271-0/+2
| | | | | | | | (Bug#7113)
* | * dbusbind.c (dbus_fd_cb, xd_get_dispatch_status)Michael Albinus2010-09-271-71/+25
| | | | | | | | | | | | | | | | | | | | | | (xd_pending_messages): Functions removed. (xd_read_queued_messages): Add parameters fd, *data, for_read in order to be compatible with add_read_fd. Determine bus from data, and call xd_read_message just for this bus. (xd_add_watch): Use xd_read_queued_messages as callback function. Add data. * lisp.h (xd_pending_messages, xd_read_queued_messages): Remove.
* | Add fd handling with callbacks to select, dbus needs it for async operation.Jan D2010-09-261-72/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/dbusbind.c: Include process.h. (dbus_fd_cb, xd_find_watch_fd, xd_toggle_watch) (xd_read_message_1): New functions. (xd_add_watch, xd_remove_watch): Call xd_find_watch_fd. Handle watch for both read and write. (Fdbus_init_bus): Also register xd_toggle_watch. (Fdbus_call_method_asynchronously, Fdbus_method_return_internal) (Fdbus_method_error_internal, Fdbus_send_signal): Remove call to dbus_connection_flush. (xd_read_message): Move most of the code to xd_read_message_1. Call xd_read_message_1 until status is COMPLETE. * src/keyboard.c (readable_events, gobble_input): Remove DBUS code. * src/process.c (gpm_wait_mask, max_gpm_desc): Remove. (write_mask): New variable. (max_input_desc): Renamed from max_keyboard_desc. (fd_callback_info): New variable. (add_read_fd, delete_read_fd, add_write_fd, delete_write_fd): New functions. (Fmake_network_process): FD_SET write_mask. (deactivate_process): FD_CLR write_mask. (wait_reading_process_output): Connecting renamed to Writeok. check_connect removed. check_write is new. Remove references to gpm. Use Writeok/check_write unconditionally (i.e. no #ifdef NON_BLOCKING_CONNECT) instead of Connecting. Loop over file descriptors and call callbacks in fd_callback_info if file descriptor is ready for I/O. (add_gpm_wait_descriptor): Just call add_keyboard_wait_descriptor. (delete_gpm_wait_descriptor): Just call delete_keyboard_wait_descriptor. (keyboard_bit_set): Use max_input_desc. (add_keyboard_wait_descriptor, delete_keyboard_wait_descriptor): Remove #ifdef subprocesses. Use max_input_desc. (init_process): Initialize write_mask and fd_callback_info. * src/process.h (add_read_fd, delete_read_fd, add_write_fd) (delete_write_fd): Declare.
* | * dbusbind.c: Accept UNIX domain sockets as bus address.Michael Albinus2010-08-231-82/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (Fdbus_close_bus): New function. (Vdbus_registered_buses): New variable. (xd_initialize): Implement string as bus address. (Fdbus_init_bus): Add bus to Vdbus_registered_buses). (Fdbus_get_unique_name, Fdbus_call_method) (Fdbus_call_method_asynchronously, Fdbus_method_return_internal) (Fdbus_method_error_internal, Fdbus_send_signal) (Fdbus_register_signal, Fdbus_register_method): Remove bus type check. This is done in xd_initialize_bus. Adapt doc string, if necessary. (xd_pending_messages, xd_read_queued_messages): Loop over buses in Vdbus_registered_buses. (Vdbus_registered_objects_table): Create hash.
* | * dbusbind.c (xd_initialize): Don't compare boolean with a constant.Andreas Schwab2010-07-121-7/+7
| |
* | * dbusbind.c (xd_initialize): Add new argument RAISE_ERROR, whichMichael Albinus2010-07-091-17/+29
| | | | | | | | | | | | | | | | | | allows to suppress errors when polling in Emacs' main loop. (Fdbus_init_bus, Fdbus_get_unique_name, Fdbus_call_method) (Fdbus_call_method_asynchronously, Fdbus_method_return_internal) (Fdbus_method_error_internal, Fdbus_send_signal) (xd_get_dispatch_status, xd_read_message, Fdbus_register_signal) (Fdbus_register_method): Use it. (Bug#6579)
* | Convert DEFUNs to standard C.Dan Nicolaescu2010-07-081-24/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c: Convert DEFUNs to standard C. * src/buffer.c: * src/bytecode.c: * src/callint.c: * src/callproc.c: * src/casefiddle.c: * src/casetab.c: * src/category.c: * src/character.c: * src/charset.c: * src/chartab.c: * src/cmds.c: * src/coding.c: * src/composite.c: * src/data.c: * src/dbusbind.c: * src/dired.c: * src/dispnew.c: * src/doc.c: * src/dosfns.c: * src/editfns.c: * src/emacs.c: * src/eval.c: * src/fileio.c: * src/filelock.c: * src/floatfns.c: * src/fns.c: * src/font.c: * src/fontset.c: * src/frame.c: * src/fringe.c: * src/image.c: * src/indent.c: * src/insdel.c: * src/keyboard.c: * src/keymap.c: * src/lread.c: * src/macros.c: * src/marker.c: * src/menu.c: * src/minibuf.c: * src/msdos.c: * src/nsfns.m: * src/nsmenu.m: * src/nsselect.m: * src/print.c: * src/process.c: * src/search.c: * src/sound.c: * src/syntax.c: * src/term.c: * src/terminal.c: * src/textprop.c: * src/undo.c: * src/w16select.c: * src/w32console.c: * src/w32fns.c: * src/w32font.c: * src/w32menu.c: * src/w32proc.c: * src/w32select.c: * src/window.c: * src/xdisp.c: * src/xfaces.c: * src/xfns.c: * src/xmenu.c: * src/xselect.c: * src/xsettings.c: * src/xsmfns.c: Likewise.
* | Convert (most) functions in src to standard C.Dan Nicolaescu2010-07-041-28/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * src/alloc.c: Convert function definitions to standard C. * src/atimer.c: * src/bidi.c: * src/bytecode.c: * src/callint.c: * src/callproc.c: * src/casefiddle.c: * src/casetab.c: * src/category.c: * src/ccl.c: * src/character.c: * src/charset.c: * src/chartab.c: * src/cmds.c: * src/coding.c: * src/composite.c: * src/data.c: * src/dbusbind.c: * src/dired.c: * src/dispnew.c: * src/doc.c: * src/doprnt.c: * src/ecrt0.c: * src/editfns.c: * src/fileio.c: * src/filelock.c: * src/filemode.c: * src/fns.c: * src/font.c: * src/fontset.c: * src/frame.c: * src/fringe.c: * src/ftfont.c: * src/ftxfont.c: * src/gtkutil.c: * src/indent.c: * src/insdel.c: * src/intervals.c: * src/keymap.c: * src/lread.c: * src/macros.c: * src/marker.c: * src/md5.c: * src/menu.c: * src/minibuf.c: * src/prefix-args.c: * src/print.c: * src/ralloc.c: * src/regex.c: * src/region-cache.c: * src/scroll.c: * src/search.c: * src/sound.c: * src/strftime.c: * src/syntax.c: * src/sysdep.c: * src/termcap.c: * src/terminal.c: * src/terminfo.c: * src/textprop.c: * src/tparam.c: * src/undo.c: * src/unexelf.c: * src/window.c: * src/xfaces.c: * src/xfns.c: * src/xfont.c: * src/xftfont.c: * src/xgselect.c: * src/xmenu.c: * src/xrdb.c: * src/xselect.c: * src/xsettings.c: * src/xsmfns.c: * src/xterm.c: Likewise.
* | Merge from emacs-23Andreas Schwab2010-06-101-1/+14
|\ \ | |/
| * * dbusbind.c (xd_append_arg): Don't "make-unibyte" the string.Stefan Monnier2010-06-091-1/+14
| | | | | | | | Check `object's type before accessing its guts.
* | Fix config.h includes.Dan Nicolaescu2010-06-011-1/+1
|/ | | | | | | | | | | | * src/xsettings.c: * src/xgselect.c: * src/nsterm.m: * src/nsselect.m: * src/nsimage.m: * src/nsfont.m: * src/nsfns.m: * src/dbusbind.c: Use #include <config.h> instead of "config.h" as all other files do.
* Add 2010 to copyright years.Glenn Morris2010-01-131-1/+1
|
* (xd_remove_watch): Avoid trying to convert a void* toStefan Monnier2010-01-041-2/+2
| | | | | Lisp_Object, preferring to convert a lisp_Object to a void* instead. (Fdbus_init_bus): Use XHASH to get a scalar value from a Lisp_Object.
* * dbusbind.c (xd_add_watch): Improve debug message.Michael Albinus2010-01-031-7/+16
| | | | | | | (xd_remove_watch): Improve debug message. If DATA is the session bus, unset D-Bus session environment. (Fdbus_init_bus): Pass the bus as argument to dbus_connection_set_watch_functions. (Bug#5283)
* * dbusbind.c (xd_retrieve_arg): Reorder declarations in order toMichael Albinus2009-12-151-2/+2
| | | | avoid compiler warnings. (Bug #5217).
* * dbusbind.c (Vdbus_registered_objects_table): Renamed fromMichael Albinus2009-11-131-43/+44
| | | | | | | Vdbus_registered_functions_table, because it contains also properties. Fix docstring. (Fdbus_call_method, Fdbus_call_method_asynchronously): Fix docstring.
* * xterm.c (syms_of_xterm):Dan Nicolaescu2009-11-061-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * xselect.c (syms_of_xselect): * xmenu.c (syms_of_xmenu): * xfns.c (syms_of_xfns): * xfaces.c (syms_of_xfaces): * xdisp.c (syms_of_xdisp): * window.c (syms_of_window): * w32fns.c (syms_of_w32fns): * undo.c (syms_of_undo): * textprop.c (syms_of_textprop): * terminal.c (syms_of_terminal): * syntax.c (syms_of_syntax): * sound.c (syms_of_sound): * search.c (syms_of_search): * print.c (syms_of_print): * minibuf.c (syms_of_minibuf): * macros.c (syms_of_macros): * keymap.c (syms_of_keymap, initial_define_key) (initial_define_lispy_key): * keyboard.c (syms_of_keyboard): * insdel.c (syms_of_insdel): * image.c (syms_of_image): * fringe.c (syms_of_fringe): * frame.c (syms_of_frame): * fontset.c (syms_of_fontset): * fns.c (syms_of_fns): * fns.c (syms_of_fns): * fileio.c (syms_of_fileio): * fileio.c (syms_of_fileio): * eval.c (syms_of_eval): * doc.c (syms_of_doc): * dispnew.c (syms_of_display): * dired.c (syms_of_dired): * dbusbind.c (syms_of_dbusbind): * data.c (syms_of_data): * composite.c (syms_of_composite): * coding.c (syms_of_coding): * cmds.c (syms_of_cmds): * charset.c (define_charset_internal, syms_of_character): * ccl.c (syms_of_ccl): * category.c (syms_of_category, init_category_once): * casetab.c (syms_of_casetab): * casefiddle.c (syms_of_casefiddle): * callint.c (syms_of_callint): * bytecode.c (syms_of_bytecode): * buffer.c (keys_of_buffer, syms_of_buffer): * alloc.c (syms_of_alloc): * process.c (syms_of_process, init_process): * lread.c (syms_of_lread, init_obarray): * font.c (build_style_table): * emacs.c (syms_of_emacs, main): Replace calls to intern with intern_c_string, calls to make_pure_string with make_pure_c_string. Use pure_cons instead of Fcons. * process.c (socket_options): Make it const. (set_socket_option, init_process): Use a const pointer. * lread.c (intern_c_string): New function. (defvar_kboard, defvar_lisp, defvar_lisp_nopro, defvar_bool) (defvar_int): Uset it. Make the name const char*. * font.c (struct table_entry): Remove unused member. Make NAMES constant. (weight_table, slant_table, width_table): Make constant. * emacs.c (struct standard_args): Make name and longname constant.
* (xd_retrieve_arg): Handle DBUS_TYPE_INTnn andAndreas Schwab2009-10-241-5/+22
| | | | DBUS_TYPE_UINTnn separately to get proper sign extension.
* * alloc.c: Do not define struct catchtag.Dan Nicolaescu2009-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * eval.c: Move struct catchtag definition ... * lisp.h: ... here. * image.c: Move png.h #include earlier to avoid warnings. * xterm.c: * xsmfns.c: * xselect.c: * xrdb.c: * xmenu.c: * xftfont.c: * xfont.c: * xfns.c: * xfaces.c: * xdisp.c: * window.c: * widget.c: * w32xfns.c: * w32uniscribe.c: * w32term.c: * w32select.c: * w32reg.c: * w32proc.c: * w32menu.c: * w32inevt.c: * w32heap.c: * w32font.c: * w32fns.c: * w32console.c: * w32.c: * w16select.c: * vm-limit.c: * unexsol.c: * unexec.c: * unexcw.c: * unexaix.c: * undo.c: * tparam.c: * textprop.c: * terminfo.c: * terminal.c: * termcap.c: * term.c: * syntax.c: * sound.c: * sheap.c: * search.c: * scroll.c: * region-cache.c: * regex.c: * ralloc.c: * process.c: * print.c: * msdos.c: * minibuf.c: * menu.c: * marker.c: * macros.c: * keymap.c: * keyboard.c: * intervals.c: * insdel.c: * indent.c: * gtkutil.c: * ftxfont.c: * ftfont.c: * fringe.c: * frame.c: * fontset.c: * font.c: * fns.c: * floatfns.c: * filelock.c: * fileio.c: * emacs.c: * editfns.c: * dosfns.c: * doprnt.c: * doc.c: * dispnew.c: * dired.c: * dbusbind.c: * data.c: * composite.c: * coding.c: * cmds.c: * cm.c: * chartab.c: * charset.c: * character.c: * ccl.c: * category.c: * casetab.c: * casefiddle.c: * callproc.c: * callint.c: * bytecode.c: * buffer.c: * atimer.c: Include setjmp.h. (Bug#4643) * xlwmenu.c: * lwlib.c: * lwlib-utils.c: * lwlib-Xm.c: * lwlib-Xlw.c: * lwlib-Xaw.c: Include setjmp.h.
* (dbus-method-return-internal, dbus-method-error-internal): Use long format ↵Adrian Robert2009-10-131-2/+2
| | | | in printf, and cast argument.
* * dbusbind.c (Fdbus_call_method)Michael Albinus2009-08-251-2/+2
| | | | | (Fdbus_call_method_asynchronously): Use English numeric format for timeout values in doc string.
* * dbusbind.c (XD_WITH_DBUS_WATCH_GET_UNIX_FD): Remove. It wasMichael Albinus2009-08-221-12/+2
| | | | | intended as hotfix only. (xd_add_watch, xd_remove_watch): Use HAVE_DBUS_WATCH_GET_UNIX_FD.
* * dbusbind.c (XD_WITH_DBUS_WATCH_GET_UNIX_FD): New macro.Michael Albinus2009-08-201-6/+33
| | | | | | (xd_add_watch, xd_remove_watch): Use it. Print debug messages. (xd_initialize, xd_pending_messages): Check, whether $DBUS_SESSION_BUS_ADDRESS is set.
* * dbusbind.c (xd_add_watch, xd_remove_watch, Fdbus_init_bus): NewMichael Albinus2009-08-181-6/+82
| | | | | functions. (xd_initialize): Revert change from 2009-08-16.
* * lisp.h (XFLOAT_DATA): Produce an rvalue by adding 0 to the value.Ken Raeburn2009-08-171-5/+7
| | | | | | | (XFLOAT_INIT): New macro for storing a float value. * alloc.c (make_float, make_pure_float): Use XFLOAT_INIT. * fns.c (sxhash): Copy out the value of a float in order to examine its bytes. * dbusbind.c (xd_append_arg): Likewise.
* * dbusbind.c (Fdbus_call_method_asynchronously): Allow nil HANDLER.Michael Albinus2009-08-161-12/+29
|
* * dbusbind.c (xd_initialize): Add connection file descriptor toMichael Albinus2009-08-161-0/+6
| | | | | input_wait_mask, in order to let select() detect, whether a new message has been arrived.
* * dbusbind.c (xd_get_dispatch_status, xd_pending_messages): New functions.Michael Albinus2009-08-151-0/+35
|
* * dbusbind.c (xd_initialize, Fdbus_call_method, xd_read_message)Michael Albinus2009-07-081-0/+12
| | | | | (Fdbus_register_signal, Fdbus_register_method): Cleanup memory of error flag.
* * dbusbind.c (XD_SYMBOL_TO_DBUS_TYPE): Convert macro into functionMichael Albinus2009-06-281-27/+35
| | | | | | | xd_symbol_to_dbus_type. With Solaris 2.11, it was said to compile for hours, when optimzation is enabled. (xd_signature, xd_append_arg, xd_retrieve_arg, xd_initialize) (xd_read_message): Make them static.
* * dbusbind.c (Fdbus_register_signal):Juanma Barranquero2009-01-181-1/+1
| | | | | * process.c (conv_sockaddr_to_lisp): * w32fns.c (Fw32_battery_status): Use empty_unibyte_string.
* Add 2009 to copyright years.Glenn Morris2009-01-081-1/+1
|
* * dbusbind.c (xd_in_read_queued_messages): New variable.Michael Albinus2008-10-241-53/+66
| | | | | | | | (XD_SIGNAL1, XD_SIGNAL2, XD_SIGNAL3): New macros. Throw Qdbus_error. (xd_read_queued_messages): Catch Qdbus_error from the macros. (all): Replace xsignal1, xsignal2, xsignal3 by the respective macro. (Bug#1186).
* * dbusbind.c (XD_OBJECT_TO_DBUS_TYPE): Handle simple type symbolsMichael Albinus2008-10-191-3/+6
| | | | in arrays.