分享

BlueZ源代码阅读:Bluetoothd启动分析

 arm_embed 2012-09-19

BlueZ源代码阅读:Bluetoothd启动分析

435人阅读 评论(0) 收藏 举报
 
  1. Initialize structure main_opts, set its pagable and connectable, also set its default name;
  2. Parse the command line options;
  3. Check if single instance, otherwise exit;
  4. Create and bind HCI socket server;
  5. Load main.conf options;
  6. Call g_io_add_watch to add io channels;
  7. Get D-Bus system path;
  8. Register to the D-Bus system bus;
  9. Start SDP server;
    1. initialize SDP server;
      Register the public browse group root;
      Register SDP server’s service record;
      Creating L2CAP socket server l2cap_sock;
      Create local unix socket unix_sock;
    2. Register device id;
    3. Add watch io_accept_event to l2cap_sock;
    4. Add watch io_accept_event to unix_sock;
  10. set_service_classes_callback(update_service_classes);
  11. Load plugins;
  12. Add watch io_stack_event to the handle of main_opts.sock;
  13. Initialze already connected services;
  14. Enter message loops{…};
  15. Unregister D-bus;
  16. Clean up plugins;
  17. Stop SDP server;
  18. Release other resources;

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章