Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

ACLOCAL_AMFLAGS = -I m4 --install

SUBDIRS = am libguile-dbus build-aux m4 modules tests
SUBDIRS = am libguile-dbus build-aux m4 modules tests doc

EXTRA_DIST = \
build-aux/config.rpath \
Expand Down
13 changes: 8 additions & 5 deletions doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
## Copyright (C) 2020 Artyom V. Poptsov <poptsov.artyom@gmail.com>
##
## This file is part of Guile-DBus.
##
##
## Guile-DBus is free software: you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation, either version 3 of the
Expand All @@ -19,10 +19,13 @@

AUTOMAKE_OPTIONS = gnu

# info_TEXINFOS = guile-dbus.texi
info_TEXINFOS = guile-dbus.texi

# guile_dbus_TEXINFOS = \
# guile-dbus.texi \
# fdl.texi
guile_dbus_TEXINFOS = \
guile-dbus.texi \
dbus-message.texi \
dbus-connection.texi \
pending-call.texi \
fdl.texi

## Makefile.am ends here
48 changes: 48 additions & 0 deletions doc/dbus-connection.texi
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
@node DBus Connection
@chapter DBus Connection

@deffn {Scheme Procedure} make-dbus-connection [#:type='session]
Make a DBus connection.

Type should be one of
@itemize
@item session
@item system
@item starter
@end itemize
@end deffn

@deffn {Scheme Procedure} dbus-connection-send connection message
Adds a message to the outgoing message queue.
Throws guile-dbus-error on OOM errors.
@end deffn

@deffn {Scheme Procedure} dbus-connection-send/with-reply connection message [timeout=-1]
@end deffn

@deffn {Scheme Procedure} dbus-connection-send/with-reply-and-block connection message timeout
Sends a message and blocks a certain time period while waiting for a reply.
Returns a reply message on successful call.
@end deffn

@deffn {Scheme Procedure} dbus-connection-flush connection
Blocks until the outgoing message queue is empty.
@end deffn

@deffn {Scheme Procedure} dbus-connection-open? connection
Gets whether the connection is currently open.
@end deffn

@deffn {Scheme Procedure} dbus-connection-authenticated? connection
Gets whether the connection was authenticated.
@end deffn

@deffn {Scheme Procedure} dbus-connection-server-id connection
Gets the ID of the server address we are authenticated to,
if this connection is on the client side.
Otherwise return #f.
@end deffn

@deffn {Scheme Procedure} dbus-connection-max-message-size connection
Gets the maximum message size.
@end deffn
76 changes: 76 additions & 0 deletions doc/dbus-message.texi
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
@node DBus Message
@chapter DBus Message

@deffn {Scheme Procedure} dbus-message? obj
Return @code{#t} if @var{obj} is a DBus message, @code{#f} otherwise.
@end deffn

@deffn {Scheme Procedure} make-dbus-message type
Make a new DBus message, where type is one of the symbols
@itemize
@item invalid
@item method-call
@item method-return
@item error
@item signal
@end itemize
Which correspond to their respective @code{DBUS_MESSAGE_TYPE_<type>}.
@c see dbus-protocol.h
@vindex invalid
@vindex method-call
@vindex method-return
@vindex error
@vindex signal
@vindex DBUS_MESSAGE_TYPE_INVALID
@vindex DBUS_MESSAGE_TYPE_METHOD_CALL
@vindex DBUS_MESSAGE_TYPE_METHOD_RETURN
@vindex DBUS_MESSAGE_TYPE_ERROR
@vindex DBUS_MESSAGE_TYPE_SIGNAL
@end deffn

@deffn {Scheme Procedure} make-dbus-message/method-call [#:destination=#f] [#:path=#f] [#:iface=#f] [#:method=#f]
Make a new message to invoke a method on a remote object.
@end deffn

@deffn {Scheme Procedure} make-dbus-message/method-return message
Constructs a message that is a reply to a method call.
@end deffn

@deffn {Scheme Procedure} make-dbus-message/signal [#:path=#f] [#:iface=#f] [#:name=#f]
Constructs a new message representing a signal emission.
@end deffn

@deffn {Scheme Procedure} make-dbus-message/error [#:message=#f] [#:error-name=#f] [#:error-message=#f]
Make a new message that is a reply to another message.
@end deffn

@deffn {Scheme Procedure} dbus-message-append-args message args
Append arguments ARGS to the MESSAGE.
@end deffn

@deffn {Scheme Procedure} dbus-message-get-args message [types]
""
@end deffn

@deffn {Scheme Procedure} dbus-message-set-interface message iface
Sets the interface this message is being sent to (for
@code{DBUS_MESSAGE_TYPE_METHOD_CALL}) or the interface a signal is being emitted
from (for @code{DBUS_MESSAGE_TYPE_SIGNAL}).
@end deffn

@deffn {Scheme Procedure} dbus-message-get-interface message
Gets the interface this message is being sent to or emitted from.
@end deffn

@deffn {Scheme Procedure} dbus-message-has-interface? message interface
Checks if the @var{message} has an @var{interface}.
@end deffn

@deffn {Scheme Procedure} dbus-message-get-sender message
Gets the unique name of the connection which originated
this @var{message}, or SCM_BOOL_F if unknown or inapplicable.
@end deffn

@deffn {Scheme Procedure} dbus-message-get-serial message
Returns the serial of a message or 0 if none has been specified.
@end deffn
64 changes: 64 additions & 0 deletions doc/guile-dbus.texi
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
\input texinfo
@settitle Guile DBus

@copying
This manual is part of Guile-DBus.

Copyright (C) 2020 Artyom V. Poptsov <poptsov.artyom@@gmail.com>

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A
copy of the license is included in the section entitled ``GNU Free
Documentation License.''
@end copying

@dircategory The Algorithmic Language Scheme
@direntry
* Guile DBus: (guile-dbus). DBus access in Guile
@end direntry

@titlepage
@sp 10
@title Guile DBus
@c @subtitle
@c @author

@page
@vskip 0pt plus 1filll
@vskip 0pt plus 1filll
@insertcopying
@end titlepage

@contents

@ifnottex
@node Top
@top Guile DBus

@insertcopying
@sp 1
@end ifnottex

@c @menu

@include dbus-connection.texi
@include dbus-message.texi
@include pending-call.texi

@node GNU Free Documentation License
@appendix GNU Free Documentation License
@include fdl.texi

@page
@node Index
@unnumbered Index
@printindex cp
@printindex fn
@printindex ky
@printindex pg
@printindex tp
@printindex vr

@bye
18 changes: 18 additions & 0 deletions doc/pending-call.texi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@node Pending Call
@chapter Pending Call

@deffn {Scheme Procedure} dbus-pending-call-block call
Block until the pending call is completed.
@end deffn

@deffn {Scheme Procedure} dbus-pending-call-cancel call
Cancels the pending call, such that any reply or error received will just be ignored.
@end deffn

@deffn {Scheme Procedure} dbus-pending-call-steal-reply call
""
@end deffn

@deffn {Scheme Procedure} dbus-pending-call-completed? call
Checks whether the pending call has received a reply yet, or not.
@end deffn