nminfotest.c for NM-0.7



Dear All,

NM-0.7 is running on my device and I can use nm-tool to find AP list. But I want a little test program to let NM connecting to a specified AP. In NM-0.6.x, I can use nminfotest.c, is there any demo can do that in NM-0.7?
If no, how can I complete the following codes to make it work?

connection = ???
int is_system = 1;
const char* specific_object = "myessid";
nm_client = nm_client_new ();
devices = nm_client_get_devices (client);
char *con_path = g_strdup (nm_connection_get_path (connection));
nm_client_activate_connection (nm_client,
                                   is_system ? NM_DBUS_SERVICE_SYSTEM_SETTINGS : NM_DBUS_SERVICE_USER_SETTINGS,
                                   con_path,
                                   device,
                                   specific_object,
                                   activate_device_cb,
                                   user_data);

Thanks for your help!

Alex


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]