1package dbus
2
3import (
4	"errors"
5)
6
7// Call represents a pending or completed method call.
8type Call struct {
9	Destination string
10	Path        ObjectPath
11	Method      string
12	Args        []interface{}
13
14	// Strobes when the call is complete.
15	Done chan *Call
16
17	// After completion, the error status. If this is non-nil, it may be an
18	// error message from the peer (with Error as its type) or some other error.
19	Err error
20
21	// Holds the response once the call is done.
22	Body []interface{}
23}
24
25var errSignature = errors.New("dbus: mismatched signature")
26
27// Store stores the body of the reply into the provided pointers. It returns
28// an error if the signatures of the body and retvalues don't match, or if
29// the error status is not nil.
30func (c *Call) Store(retvalues ...interface{}) error {
31	if c.Err != nil {
32		return c.Err
33	}
34
35	return Store(c.Body, retvalues...)
36}
37