Flutter Linux Embedder
fl_method_call_private.h File Reference

Go to the source code of this file.

Functions

: a method name.

fl_method_call_new:

@args: arguments provided to a method. @channel: channel call received on. @response_handle: handle to respond with.

Creates a method call.

Returns: a new #FlMethodCall.

FlMethodCall * fl_method_call_new (const gchar *name, FlValue *args, FlMethodChannel *channel, FlBinaryMessengerResponseHandle *response_handle)
 

Function Documentation

◆ fl_method_call_new()

FlMethodCall* fl_method_call_new ( const gchar *  name,
FlValue args,
FlMethodChannel *  channel,
FlBinaryMessengerResponseHandle *  response_handle 
)

Definition at line 44 of file fl_method_call.cc.

48  {
49  g_return_val_if_fail(name != nullptr, nullptr);
50  g_return_val_if_fail(args != nullptr, nullptr);
51  g_return_val_if_fail(FL_IS_METHOD_CHANNEL(channel), nullptr);
52  g_return_val_if_fail(FL_IS_BINARY_MESSENGER_RESPONSE_HANDLE(response_handle),
53  nullptr);
54 
55  FlMethodCall* self =
56  FL_METHOD_CALL(g_object_new(fl_method_call_get_type(), nullptr));
57 
58  self->name = g_strdup(name);
59  self->args = fl_value_ref(args);
60  self->channel = FL_METHOD_CHANNEL(g_object_ref(channel));
61  self->response_handle =
62  FL_BINARY_MESSENGER_RESPONSE_HANDLE(g_object_ref(response_handle));
63 
64  return self;
65 }

References args, and fl_value_ref().

Referenced by message_cb().

fl_value_ref
G_MODULE_EXPORT FlValue * fl_value_ref(FlValue *self)
Definition: fl_value.cc:394
args
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
Definition: fl_event_channel.h:89