Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

sol-connman: Add sol-connman basic API #1905

Closed
wants to merge 13 commits into from

Conversation

wzhen12
Copy link
Contributor

@wzhen12 wzhen12 commented Apr 19, 2016

so-connman is for implementing connection manager features.
The APIs should be implemented in Zephyr, connman and so on.

The patches are for implementing sol-connman basic APIs to connman.
the connman D-Bus APIs are wrapped in the so-connman APIs.
The user can use the so-connman APIs to control connman.

Signed-off-by: Wu Zheng [email protected]

@wzhen12
Copy link
Contributor Author

wzhen12 commented Apr 19, 2016

According to the comments of #1848,
the related issues have been fixed.
It is the version 2 of sol-connman.

  1. The two new monitors have been added to monitor error and the system state.
  2. Remove sol_connman_service_get_call_result.
  3. The functions of get services vector and network link have been modified.
  4. The vector of service has been changed to ptr vector.
  5. streq and the other soletta functions have been used to replace strcmp and so on.
  6. No use malloc for network address.
  7. Add new monitor to test cases.
  8. Export the network gateway and netmask.
  9. Others.

Please review it again. Thanks.

* the service has been removed in the system.
*/
enum sol_connman_service_state {
SOL_CONNMAN_SERVICE_STATE_UNKNOWN = 0,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the documentation about each state using the format:

enum sol_connman_service_state {
     /**
      * @brief the service is idle (what does this mean?)
      *
      * a service is idle when situation X, Y and Z occur.
      */

Provide details on the meaning, like REMOVE should mention that the service handle (pointer) will become invalid.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay.

@barbieri
Copy link

we're almost there! just very minor issues.

Also, remember to rename sol-connman.h to sol-netctl.h and all namespace to sol_netctl_.

so-connman is for implementing connection manager features.
The APIs should be implemented in Zephyr, connman and so on.
To connman, the connman D-Bus APIs are wrapped in the so-connman
APIs. The user can use the so-connman APIs to control connman.

To invoke the D-Bus method of connman, the async call is used,
the callback function is set to get the results of async call.

The basic so-connman APIs are in the patch.
It provides the APis of getting the name, ip address... of services.
The service connect/disconnect APIs and set/get offline
are implemented too.

The further sol-connman APIs are being planned.

Signed-off-by: Wu Zheng <[email protected]>
Get the service properties APIs are implemented.
It based on connman and wraps the D-Bus APIs of connman services.
Get the name, state, type, ip address ... of services are done.

Signed-off-by: Wu Zheng <[email protected]>
sol-connman init/shutdown are implemented.
It based on connman and wraps the D-Bus APIs of connman.
init/shutdown are not true to init/shutdown sol-connman.
init_lazy/shutdown_lazy are true to init/shutdown sol-connman.

Signed-off-by: Wu Zheng <[email protected]>
sol-connman set offline are implemented.
It based on connman and wraps the D-Bus APIs of connman.
It sets the connman to offline mode.
It will close the all connection interfaces(including ethernet ...).

Signed-off-by: Wu Zheng <[email protected]>
Get connection manager state is implemented.
It based on connman and wraps the D-Bus APIs of connman.
Get connection manager state are from connman.
It includes online, ready, offline, idle.

Signed-off-by: Wu Zheng <[email protected]>
@wzhen12 wzhen12 closed this Apr 26, 2016
Get services properties is implemented.
It based on connman and wraps the D-Bus APIs of connman.
It only is invoked internal and in the process of init lazy.
Get services properties APIs can't invoke the D-Bus APIs of connman directly.

Signed-off-by: Wu Zheng <[email protected]>
add/del monitor are implemented.
It based on connman and wraps the D-Bus APIs of connman.
Monitor the connman services and connection manager state changed.

Signed-off-by: Wu Zheng <[email protected]>
callback are implemented.
It based on connman and wraps the D-Bus APIs of connman.
When add Monitor, callback function is registered.
when any services properties and connection manager state are changed,
the callback function can be invoked to notify the info.

Signed-off-by: Wu Zheng <[email protected]>
Network devices connect/disconnect are implemented.
It based on connman and wraps the D-Bus APIs of connman.

Signed-off-by: Wu Zheng <[email protected]>
Get services list are implemented.
It based on connman and wraps the D-Bus APIs of connman.
The user can use the API to get services list.

Signed-off-by: Wu Zheng <[email protected]>
Add sol-connman to compile files, so that sol-connman can be compiled.

Signed-off-by: Wu Zheng <[email protected]>
The test cases will test sol-connman APIs

Signed-off-by: Wu Zheng <[email protected]>
The init and shutdown process of sol-connman need add to the
init and shutdown process of sol-comms.

Signed-off-by: Wu Zheng <[email protected]>
@wzhen12
Copy link
Contributor Author

wzhen12 commented Apr 26, 2016

The patches have been closed.
The new version sol-connman patches have been submitted.
The link is #1935

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants