(ctx context.Context, method string, flags Flags, ch chan *Call, args ...any)
| 99 | } |
| 100 | |
| 101 | func (o *Object) createCall(ctx context.Context, method string, flags Flags, ch chan *Call, args ...any) *Call { |
| 102 | if ctx == nil { |
| 103 | panic("nil context") |
| 104 | } |
| 105 | iface := "" |
| 106 | i := strings.LastIndex(method, ".") |
| 107 | if i != -1 { |
| 108 | iface = method[:i] |
| 109 | } |
| 110 | method = method[i+1:] |
| 111 | msg := new(Message) |
| 112 | msg.Type = TypeMethodCall |
| 113 | msg.Flags = flags & (FlagNoAutoStart | FlagNoReplyExpected) |
| 114 | msg.Headers = make(map[HeaderField]Variant) |
| 115 | msg.Headers[FieldPath] = MakeVariant(o.path) |
| 116 | msg.Headers[FieldDestination] = MakeVariant(o.dest) |
| 117 | msg.Headers[FieldMember] = MakeVariant(method) |
| 118 | if iface != "" { |
| 119 | msg.Headers[FieldInterface] = MakeVariant(iface) |
| 120 | } |
| 121 | msg.Body = args |
| 122 | if len(args) > 0 { |
| 123 | msg.Headers[FieldSignature] = MakeVariant(SignatureOf(args...)) |
| 124 | } |
| 125 | return o.conn.SendWithContext(ctx, msg, ch) |
| 126 | } |
| 127 | |
| 128 | // GetProperty calls org.freedesktop.DBus.Properties.Get on the given |
| 129 | // object. The property name must be given in interface.member notation. |
no test coverage detected