{"action":"created","comment":{"url":"https://api.github.com/repos/solettaproject/soletta/pulls/comments/58714878","id":58714878,"diff_hunk":"@@ -0,0 +1,683 @@\n+/*\n+ * This file is part of the Soletta Project\n+ *\n+ * Copyright (C) 2016 Intel Corporation. All rights reserved.\n+ *\n+ * Licensed under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *     http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ */\n+\n+#include <systemd/sd-bus.h>\n+\n+#include <sol-bus.h>\n+#include <sol-log.h>\n+#include <sol-network.h>\n+#include <sol-bluetooth.h>\n+#include <sol-util-internal.h>\n+\n+struct sol_bt_conn {\n+    int ref;\n+};\n+\n+struct device_info {\n+    char *path;\n+    uint64_t mask;\n+    struct sol_bt_device_info info;\n+};\n+\n+struct sol_bt_scan_pending {\n+    sd_bus_slot *slot;\n+    void (*callback)(void *user_data, const struct sol_bt_device_info *device);\n+    void *user_data;\n+};\n+\n+static struct context {\n+    sd_bus *system_bus;\n+    struct sol_bus_client *bluez;\n+    char *adapter_path;\n+    struct sol_ptr_vector devices;\n+    void (*enabled_callback)(void *user_data, bool powered);\n+    struct sol_bt_scan_pending pending_scan;\n+    void *enabled_user_data;\n+    bool adapter_powered;\n+} context;\n+\n+enum {\n+    ADAPTER_PROPERTY_POWERED = 0,\n+};\n+\n+static void\n+strv_free(char **strv)\n+{\n+    char **l;\n+    SOL_NULL_CHECK(strv);\n+\n+    for (l = strv; *l; l++)\n+        free(*l);\n+\n+    free(strv);\n+}\n+\n+static bool\n+adapter_property_powered_set(void *data, const char *path, sd_bus_message *m)\n+{\n+    struct context *ctx = data;\n+    bool powered;\n+    int r;\n+\n+    r = sd_bus_message_read_basic(m, SD_BUS_TYPE_BOOLEAN, &powered);\n+    SOL_INT_CHECK_GOTO(r, < 0, skip);\n+\n+    return ctx->adapter_powered != powered;\n+\n+skip:\n+    r = sd_bus_message_skip(m, \"b\");\n+    SOL_INT_CHECK(r, < 0, false);\n+\n+    return false;\n+}\n+\n+static const struct sol_bus_properties adapter_properties[] = {\n+    [ADAPTER_PROPERTY_POWERED] = {\n+        .member = \"Powered\",\n+        .set = adapter_property_powered_set,\n+    },\n+    { NULL, NULL }\n+};\n+\n+static void\n+adapter_property_changed(void *data, const char *path, uint64_t mask)\n+{\n+    struct context *ctx = data;\n+\n+    if (mask & (1 << ADAPTER_PROPERTY_POWERED)) {\n+        ctx->adapter_powered = !ctx->adapter_powered;\n+\n+        if (ctx->enabled_callback)\n+            ctx->enabled_callback(ctx->enabled_user_data, ctx->adapter_powered);\n+    }\n+}\n+\n+static sd_bus_message *\n+create_property_set(sd_bus *bus, const char *service, const char *path,\n+    const char *interface, const char *member)\n+{\n+    sd_bus_message *m;\n+    int r;\n+\n+    r = sd_bus_message_new_method_call(bus, &m, service, path,\n+        \"org.freedesktop.DBus.Properties\", \"Set\");\n+    SOL_INT_CHECK(r, < 0, NULL);\n+\n+    r = sd_bus_message_append(m, \"ss\", interface, member);\n+    SOL_INT_CHECK_GOTO(r, < 0, error_append);\n+\n+    return m;\n+\n+error_append:\n+    sd_bus_message_unref(m);\n+    return NULL;\n+}\n+\n+static int\n+adapter_set_powered(struct context *ctx, const char *path, bool powered)\n+{\n+    sd_bus *bus = sol_bus_client_get_bus(ctx->bluez);\n+    const char *service = sol_bus_client_get_service(ctx->bluez);\n+    sd_bus_message *m;\n+    int r;\n+\n+    m = create_property_set(bus, service, path,\n+        \"org.bluez.Adapter1\", \"Powered\");\n+    SOL_NULL_CHECK(m, -ENOMEM);\n+\n+    r = sd_bus_message_open_container(m, 'v', \"b\");\n+    SOL_INT_CHECK_GOTO(r, < 0, done);\n+\n+    r = sd_bus_message_append(m, \"b\", &powered);\n+    SOL_INT_CHECK_GOTO(r, < 0, done);\n+\n+    r = sd_bus_message_close_container(m);\n+    SOL_INT_CHECK_GOTO(r, < 0, done);\n+\n+    r = sd_bus_call_async(bus, NULL, m, sol_bus_log_callback, NULL, 0);\n+    SOL_INT_CHECK_GOTO(r, < 0, done);\n+\n+done:\n+    sd_bus_message_unref(m);\n+\n+    return r;\n+}\n+\n+static void\n+adapter_appeared(void *data, const char *path)\n+{\n+    struct context *ctx = data;\n+    int r;\n+\n+    if (ctx->adapter_path)\n+        return;\n+\n+    ctx->adapter_path = strdup(path);\n+    SOL_NULL_CHECK(ctx->adapter_path);\n+\n+    r = sol_bus_map_cached_properties(ctx->bluez, path,\n+        \"org.bluez.Adapter1\",\n+        adapter_properties,\n+        adapter_property_changed, ctx);\n+    SOL_INT_CHECK_GOTO(r, < 0, error_map);\n+\n+    if (ctx->enabled_callback) {\n+        r = adapter_set_powered(ctx, ctx->adapter_path, true);\n+        SOL_INT_CHECK(r, < 0);\n+    }\n+\n+    return;\n+\n+error_map:\n+    free(ctx->adapter_path);\n+    ctx->adapter_path = NULL;\n+}\n+\n+\n+static void\n+destroy_device(struct device_info *device)\n+{\n+    struct sol_bt_device_info *info;\n+\n+    info = &device->info;\n+    free(info->name);\n+    sol_vector_clear(&info->uuids);\n+\n+    free(device->path);\n+    free(device);\n+}\n+\n+static struct device_info *find_device_by_path(struct context *ctx, const char *path)\n+{\n+    struct device_info *d;\n+    uint16_t i;\n+\n+    SOL_NULL_CHECK(path, NULL);\n+\n+    SOL_PTR_VECTOR_FOREACH_IDX (&ctx->devices, d, i) {\n+        if (streq(d->path, path))\n+            return d;\n+    }\n+    return NULL;\n+}\n+\n+static void\n+adapter_removed(void *data, const char *path)\n+{\n+\n+}\n+\n+enum {\n+    DEVICE_PROPERTY_ADDRESS = 0,\n+    DEVICE_PROPERTY_NAME,\n+    DEVICE_PROPERTY_UUIDS,\n+    DEVICE_PROPERTY_RSSI,\n+};\n+\n+static bool\n+device_property_address_set(void *data, const char *path, sd_bus_message *m)\n+{\n+    struct context *ctx = data;\n+    struct device_info *d;\n+    struct sol_bt_device_info *info;\n+    const char *address;\n+    int r;\n+\n+    d = find_device_by_path(ctx, path);\n+    SOL_NULL_CHECK_GOTO(d, skip);\n+\n+    info = &d->info;\n+    if (info->addr.family)\n+        goto skip;\n+\n+    r = sd_bus_message_read_basic(m, 's', &address);\n+    SOL_INT_CHECK_GOTO(r, < 0, skip);\n+\n+    sol_network_link_addr_from_str(&info->addr, address);\n+\n+    return true;\n+\n+skip:\n+    r = sd_bus_message_skip(m, \"s\");\n+    SOL_INT_CHECK(r, < 0, false);\n+\n+    return false;\n+}\n+\n+static bool\n+device_property_name_set(void *data, const char *path, sd_bus_message *m)\n+{\n+    struct context *ctx = data;\n+    struct device_info *d;\n+    struct sol_bt_device_info *info;\n+    const char *name;\n+    int r;\n+\n+    d = find_device_by_path(ctx, path);\n+    SOL_NULL_CHECK_GOTO(d, skip);\n+\n+    info = &d->info;\n+\n+    if (info->name)\n+        goto skip;\n+\n+    r = sd_bus_message_read_basic(m, 's', &name);\n+    SOL_INT_CHECK_GOTO(r, < 0, skip);\n+\n+    /* When we receive the property again we will try to allocate again */\n+    info->name = strdup(name);\n+\n+    return true;\n+\n+skip:\n+    r = sd_bus_message_skip(m, \"s\");\n+    SOL_INT_CHECK(r, < 0, false);\n+\n+    return false;\n+}\n+\n+static bool\n+device_property_uuids_set(void *data, const char *path, sd_bus_message *m)\n+{\n+    struct context *ctx = data;\n+    struct device_info *d;\n+    struct sol_bt_device_info *info;\n+    struct sol_bt_uuid *u = NULL;\n+    char **uuids = NULL, **uuid;\n+    int r;\n+\n+    d = find_device_by_path(ctx, path);\n+    SOL_NULL_CHECK_GOTO(d, skip);\n+\n+    info = &d->info;\n+\n+    r = sd_bus_message_read_strv(m, &uuids);\n+    SOL_INT_CHECK_GOTO(r, < 0, skip);\n+\n+    sol_vector_clear(&info->uuids);\n+    for (uuid = uuids; uuid && *uuid; uuid++) {\n+        u = sol_vector_append(&info->uuids);\n+        SOL_NULL_CHECK_GOTO(u, done);\n+\n+        r = sol_bt_uuid_from_str(u, *uuid);\n+        SOL_INT_CHECK_GOTO(r, < 0, done);\n+    }\n+\n+done:\n+    if (!u || r)\n+        sol_vector_clear(&info->uuids);\n+\n+    if (uuids)\n+        strv_free(uuids);\n+\n+    return true;\n+\n+skip:\n+    r = sd_bus_message_skip(m, \"as\");\n+    SOL_INT_CHECK(r, < 0, false);\n+\n+    return false;\n+}\n+\n+static bool\n+device_property_rssi_set(void *data, const char *path, sd_bus_message *m)\n+{\n+    struct context *ctx = data;\n+    struct device_info *d;\n+    struct sol_bt_device_info *info;\n+    int16_t rssi;\n+    int r;\n+\n+    d = find_device_by_path(ctx, path);\n+    SOL_NULL_CHECK(d, false);\n+\n+    info = &d->info;\n+\n+    r = sd_bus_message_read_basic(m, 'n', &rssi);\n+    SOL_INT_CHECK(r, < 0, false);\n+\n+    info->rssi = rssi;\n+\n+    return true;\n+}\n+\n+static const struct sol_bus_properties device_properties[] = {\n+    [DEVICE_PROPERTY_ADDRESS] = {\n+        .member = \"Address\",\n+        .set = device_property_address_set,\n+    },\n+    [DEVICE_PROPERTY_NAME] = {\n+        .member = \"Name\",\n+        .set = device_property_name_set,\n+    },\n+    [DEVICE_PROPERTY_UUIDS] = {\n+        .member = \"UUIDs\",\n+        .set = device_property_uuids_set,\n+    },\n+    [DEVICE_PROPERTY_RSSI] = {\n+        .member = \"RSSI\",\n+        .set = device_property_rssi_set,\n+    },\n+    { NULL, NULL }\n+};\n+\n+static void\n+device_property_changed(void *data, const char *path, uint64_t mask)\n+{\n+    struct context *ctx = data;\n+    struct device_info *d;\n+    struct sol_bt_device_info *info;\n+    const uint64_t all_present = (1 << DEVICE_PROPERTY_ADDRESS) |\n+        (1 << DEVICE_PROPERTY_NAME) |\n+        (1 << DEVICE_PROPERTY_RSSI);\n+    struct sol_bt_scan_pending *scan = &ctx->pending_scan;\n+\n+    d = find_device_by_path(ctx, path);\n+    SOL_NULL_CHECK(d);\n+\n+    d->mask |= mask;\n+\n+    if (!scan->callback)\n+        return;\n+\n+    info = &d->info;\n+\n+    if ((d->mask & all_present) == all_present)\n+        scan->callback(scan->user_data, info);\n+}\n+\n+static void\n+device_appeared(void *data, const char *path)\n+{\n+    struct context *ctx = data;\n+    struct device_info *d;\n+    struct sol_bt_device_info *info;\n+    int r;\n+\n+    d = find_device_by_path(ctx, path);\n+    if (d)\n+        return;\n+\n+    d = calloc(1, sizeof(*d));\n+    SOL_NULL_CHECK(d);\n+\n+    info = &d->info;\n+\n+    sol_vector_init(&info->uuids, sizeof(struct sol_bt_uuid));\n+    d->path = strdup(path);\n+    SOL_NULL_CHECK_GOTO(d->path, error_dup);\n+\n+    r = sol_bus_map_cached_properties(ctx->bluez, path, \"org.bluez.Device1\",\n+        device_properties, device_property_changed, ctx);\n+    SOL_INT_CHECK_GOTO(r, < 0, error_map);\n+\n+    r = sol_ptr_vector_append(&ctx->devices, d);\n+    SOL_INT_CHECK_GOTO(r, < 0, error_append);\n+\n+    return;\n+\n+error_append:\n+    sol_bus_unmap_cached_properties(ctx->bluez, device_properties, ctx);\n+error_map:\n+    free(d->path);\n+error_dup:\n+    free(d);\n+}\n+\n+static void\n+device_removed(void *data, const char *path)\n+{\n+    struct context *ctx = data;\n+    struct device_info *d;\n+\n+    d = find_device_by_path(ctx, path);\n+    SOL_NULL_CHECK(d);\n+\n+    destroy_device(d);\n+    sol_ptr_vector_remove(&ctx->devices, d);\n+}\n+\n+static const struct sol_bus_interfaces interfaces[] = {\n+    { .name = \"org.bluez.Adapter1\",\n+      .appeared = adapter_appeared,\n+      .removed = adapter_removed },\n+    { .name = \"org.bluez.Device1\",\n+      .appeared = device_appeared,\n+      .removed = device_removed },\n+    { NULL }\n+};\n+\n+SOL_API struct sol_bt_conn\n+*sol_bt_conn_ref(struct sol_bt_conn *conn)\n+{\n+    SOL_NULL_CHECK(conn, NULL);\n+\n+    conn->ref++;\n+    return conn;\n+}\n+\n+static void\n+destroy_conn(struct sol_bt_conn *conn)\n+{\n+\n+}\n+\n+SOL_API void sol_bt_conn_unref(struct sol_bt_conn *conn)\n+{\n+    if (!conn)\n+        return;\n+\n+    conn->ref--;\n+    if (conn->ref > 0)\n+        return;\n+\n+    destroy_conn(conn);\n+}\n+\n+static void\n+bluez_service_connected(void *data, const char *unique)\n+{\n+    struct context *ctx = data;\n+\n+    SOL_DBG(\"BlueZ service connected, unique %s\", unique);\n+\n+    sol_ptr_vector_init(&ctx->devices);\n+\n+    sol_bus_watch_interfaces(ctx->bluez, interfaces, ctx);\n+}\n+\n+static void\n+bluez_service_disconnected(void *data)\n+{\n+    struct context *ctx = data;\n+    struct device_info *d;\n+    uint16_t idx;\n+\n+    SOL_PTR_VECTOR_FOREACH_IDX (&ctx->devices, d, idx) {\n+        destroy_device(d);\n+    }\n+    sol_ptr_vector_clear(&ctx->devices);\n+\n+    sol_bus_remove_interfaces_watch(ctx->bluez, interfaces, ctx);\n+\n+    if (ctx->enabled_callback) {\n+            ctx->enabled_callback(ctx->enabled_user_data, false);\n+    }\n+}\n+\n+static int\n+watch_bluez(void)\n+{\n+    int r;\n+\n+    if (context.bluez)\n+        goto watch;\n+\n+    context.system_bus = sol_bus_get(NULL);\n+    SOL_NULL_CHECK(context.system_bus, -EINVAL);\n+\n+    context.bluez = sol_bus_client_new(context.system_bus, \"org.bluez\");\n+    SOL_NULL_CHECK(context.bluez, -EINVAL);\n+\n+watch:\n+    r = sol_bus_client_set_connect_handler(context.bluez,\n+        bluez_service_connected, &context);\n+    SOL_INT_CHECK(r, < 0, -EINVAL);\n+\n+    r = sol_bus_client_set_disconnect_handler(context.bluez,\n+        bluez_service_disconnected,\n+        &context);\n+    SOL_INT_CHECK(r, < 0, -EINVAL);\n+\n+    return 0;\n+}\n+\n+SOL_API int\n+sol_bt_set_connection_callbacks(void *(connected)(void *user_data,\n+        struct sol_bt_conn *conn),\n+    void *(disconnected)(void *user_data,\n+        struct sol_bt_conn *conn),\n+    const void *user_data)","path":"src/lib/comms/sol-bluetooth-impl-linux.c","position":555,"original_position":555,"commit_id":"bb7d304960329c8ece922936391d4b253a77d7ab","original_commit_id":"bb7d304960329c8ece922936391d4b253a77d7ab","user":{"login":"vcgomes","id":1420,"avatar_url":"https://avatars.githubusercontent.com/u/1420?v=3","gravatar_id":"","url":"https://api.github.com/users/vcgomes","html_url":"https://github.com/vcgomes","followers_url":"https://api.github.com/users/vcgomes/followers","following_url":"https://api.github.com/users/vcgomes/following{/other_user}","gists_url":"https://api.github.com/users/vcgomes/gists{/gist_id}","starred_url":"https://api.github.com/users/vcgomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcgomes/subscriptions","organizations_url":"https://api.github.com/users/vcgomes/orgs","repos_url":"https://api.github.com/users/vcgomes/repos","events_url":"https://api.github.com/users/vcgomes/events{/privacy}","received_events_url":"https://api.github.com/users/vcgomes/received_events","type":"User","site_admin":false},"body":"This function will only be needed when implementing GATT.","created_at":"2016-04-06T14:30:22Z","updated_at":"2016-04-06T14:30:22Z","html_url":"https://github.com/solettaproject/soletta/pull/1825#discussion_r58714878","pull_request_url":"https://api.github.com/repos/solettaproject/soletta/pulls/1825","_links":{"self":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/comments/58714878"},"html":{"href":"https://github.com/solettaproject/soletta/pull/1825#discussion_r58714878"},"pull_request":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1825"}}},"pull_request":{"url":"https://api.github.com/repos/solettaproject/soletta/pulls/1825","id":65370261,"html_url":"https://github.com/solettaproject/soletta/pull/1825","diff_url":"https://github.com/solettaproject/soletta/pull/1825.diff","patch_url":"https://github.com/solettaproject/soletta/pull/1825.patch","issue_url":"https://api.github.com/repos/solettaproject/soletta/issues/1825","number":1825,"state":"open","locked":false,"title":"sol-bluetooth: Basic functionality","user":{"login":"vcgomes","id":1420,"avatar_url":"https://avatars.githubusercontent.com/u/1420?v=3","gravatar_id":"","url":"https://api.github.com/users/vcgomes","html_url":"https://github.com/vcgomes","followers_url":"https://api.github.com/users/vcgomes/followers","following_url":"https://api.github.com/users/vcgomes/following{/other_user}","gists_url":"https://api.github.com/users/vcgomes/gists{/gist_id}","starred_url":"https://api.github.com/users/vcgomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcgomes/subscriptions","organizations_url":"https://api.github.com/users/vcgomes/orgs","repos_url":"https://api.github.com/users/vcgomes/repos","events_url":"https://api.github.com/users/vcgomes/events{/privacy}","received_events_url":"https://api.github.com/users/vcgomes/received_events","type":"User","site_admin":false},"body":"This implements basic functionality for the Linux implementation of sol-bluetooth, this allows to power the adapter up (only the first adapter found) and scan for devices.\r\n\r\nAlso, there are a couple of sol-bus fixes, that were found while implementing this. I suggest reviewing this first. (Github messed with my ordering).","created_at":"2016-04-05T20:36:10Z","updated_at":"2016-04-06T14:30:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f510eec8f5c1766897a39a9c6761526e40edb4e9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/solettaproject/soletta/pulls/1825/commits","review_comments_url":"https://api.github.com/repos/solettaproject/soletta/pulls/1825/comments","review_comment_url":"https://api.github.com/repos/solettaproject/soletta/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solettaproject/soletta/issues/1825/comments","statuses_url":"https://api.github.com/repos/solettaproject/soletta/statuses/bb7d304960329c8ece922936391d4b253a77d7ab","head":{"label":"vcgomes:sol-gatt","ref":"sol-gatt","sha":"bb7d304960329c8ece922936391d4b253a77d7ab","user":{"login":"vcgomes","id":1420,"avatar_url":"https://avatars.githubusercontent.com/u/1420?v=3","gravatar_id":"","url":"https://api.github.com/users/vcgomes","html_url":"https://github.com/vcgomes","followers_url":"https://api.github.com/users/vcgomes/followers","following_url":"https://api.github.com/users/vcgomes/following{/other_user}","gists_url":"https://api.github.com/users/vcgomes/gists{/gist_id}","starred_url":"https://api.github.com/users/vcgomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcgomes/subscriptions","organizations_url":"https://api.github.com/users/vcgomes/orgs","repos_url":"https://api.github.com/users/vcgomes/repos","events_url":"https://api.github.com/users/vcgomes/events{/privacy}","received_events_url":"https://api.github.com/users/vcgomes/received_events","type":"User","site_admin":false},"repo":{"id":37998119,"name":"soletta","full_name":"vcgomes/soletta","owner":{"login":"vcgomes","id":1420,"avatar_url":"https://avatars.githubusercontent.com/u/1420?v=3","gravatar_id":"","url":"https://api.github.com/users/vcgomes","html_url":"https://github.com/vcgomes","followers_url":"https://api.github.com/users/vcgomes/followers","following_url":"https://api.github.com/users/vcgomes/following{/other_user}","gists_url":"https://api.github.com/users/vcgomes/gists{/gist_id}","starred_url":"https://api.github.com/users/vcgomes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcgomes/subscriptions","organizations_url":"https://api.github.com/users/vcgomes/orgs","repos_url":"https://api.github.com/users/vcgomes/repos","events_url":"https://api.github.com/users/vcgomes/events{/privacy}","received_events_url":"https://api.github.com/users/vcgomes/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vcgomes/soletta","description":"Soletta Project is a framework for making IoT devices.  With Soletta Project's libraries developers can easily write software for devices that control actuators/sensors and communicate using standard technologies. It enables adding smartness even on the smallest edge devices.  ","fork":true,"url":"https://api.github.com/repos/vcgomes/soletta","forks_url":"https://api.github.com/repos/vcgomes/soletta/forks","keys_url":"https://api.github.com/repos/vcgomes/soletta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vcgomes/soletta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vcgomes/soletta/teams","hooks_url":"https://api.github.com/repos/vcgomes/soletta/hooks","issue_events_url":"https://api.github.com/repos/vcgomes/soletta/issues/events{/number}","events_url":"https://api.github.com/repos/vcgomes/soletta/events","assignees_url":"https://api.github.com/repos/vcgomes/soletta/assignees{/user}","branches_url":"https://api.github.com/repos/vcgomes/soletta/branches{/branch}","tags_url":"https://api.github.com/repos/vcgomes/soletta/tags","blobs_url":"https://api.github.com/repos/vcgomes/soletta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vcgomes/soletta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vcgomes/soletta/git/refs{/sha}","trees_url":"https://api.github.com/repos/vcgomes/soletta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vcgomes/soletta/statuses/{sha}","languages_url":"https://api.github.com/repos/vcgomes/soletta/languages","stargazers_url":"https://api.github.com/repos/vcgomes/soletta/stargazers","contributors_url":"https://api.github.com/repos/vcgomes/soletta/contributors","subscribers_url":"https://api.github.com/repos/vcgomes/soletta/subscribers","subscription_url":"https://api.github.com/repos/vcgomes/soletta/subscription","commits_url":"https://api.github.com/repos/vcgomes/soletta/commits{/sha}","git_commits_url":"https://api.github.com/repos/vcgomes/soletta/git/commits{/sha}","comments_url":"https://api.github.com/repos/vcgomes/soletta/comments{/number}","issue_comment_url":"https://api.github.com/repos/vcgomes/soletta/issues/comments{/number}","contents_url":"https://api.github.com/repos/vcgomes/soletta/contents/{+path}","compare_url":"https://api.github.com/repos/vcgomes/soletta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vcgomes/soletta/merges","archive_url":"https://api.github.com/repos/vcgomes/soletta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vcgomes/soletta/downloads","issues_url":"https://api.github.com/repos/vcgomes/soletta/issues{/number}","pulls_url":"https://api.github.com/repos/vcgomes/soletta/pulls{/number}","milestones_url":"https://api.github.com/repos/vcgomes/soletta/milestones{/number}","notifications_url":"https://api.github.com/repos/vcgomes/soletta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vcgomes/soletta/labels{/name}","releases_url":"https://api.github.com/repos/vcgomes/soletta/releases{/id}","deployments_url":"https://api.github.com/repos/vcgomes/soletta/deployments","created_at":"2015-06-24T16:56:55Z","updated_at":"2015-06-24T16:56:57Z","pushed_at":"2016-04-05T20:34:47Z","git_url":"git://github.com/vcgomes/soletta.git","ssh_url":"git@github.com:vcgomes/soletta.git","clone_url":"https://github.com/vcgomes/soletta.git","svn_url":"https://github.com/vcgomes/soletta","homepage":"","size":18032,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"solettaproject:master","ref":"master","sha":"8fffc76b32dd07dbec07bf24b91cf1eb83083765","user":{"login":"solettaproject","id":12736897,"avatar_url":"https://avatars.githubusercontent.com/u/12736897?v=3","gravatar_id":"","url":"https://api.github.com/users/solettaproject","html_url":"https://github.com/solettaproject","followers_url":"https://api.github.com/users/solettaproject/followers","following_url":"https://api.github.com/users/solettaproject/following{/other_user}","gists_url":"https://api.github.com/users/solettaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/solettaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solettaproject/subscriptions","organizations_url":"https://api.github.com/users/solettaproject/orgs","repos_url":"https://api.github.com/users/solettaproject/repos","events_url":"https://api.github.com/users/solettaproject/events{/privacy}","received_events_url":"https://api.github.com/users/solettaproject/received_events","type":"Organization","site_admin":false},"repo":{"id":37087063,"name":"soletta","full_name":"solettaproject/soletta","owner":{"login":"solettaproject","id":12736897,"avatar_url":"https://avatars.githubusercontent.com/u/12736897?v=3","gravatar_id":"","url":"https://api.github.com/users/solettaproject","html_url":"https://github.com/solettaproject","followers_url":"https://api.github.com/users/solettaproject/followers","following_url":"https://api.github.com/users/solettaproject/following{/other_user}","gists_url":"https://api.github.com/users/solettaproject/gists{/gist_id}","starred_url":"https://api.github.com/users/solettaproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solettaproject/subscriptions","organizations_url":"https://api.github.com/users/solettaproject/orgs","repos_url":"https://api.github.com/users/solettaproject/repos","events_url":"https://api.github.com/users/solettaproject/events{/privacy}","received_events_url":"https://api.github.com/users/solettaproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/solettaproject/soletta","description":"Soletta Project is a framework for making IoT devices.  With Soletta Project's libraries developers can easily write software for devices that control actuators/sensors and communicate using standard technologies. It enables adding smartness even on the smallest edge devices.  ","fork":false,"url":"https://api.github.com/repos/solettaproject/soletta","forks_url":"https://api.github.com/repos/solettaproject/soletta/forks","keys_url":"https://api.github.com/repos/solettaproject/soletta/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solettaproject/soletta/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solettaproject/soletta/teams","hooks_url":"https://api.github.com/repos/solettaproject/soletta/hooks","issue_events_url":"https://api.github.com/repos/solettaproject/soletta/issues/events{/number}","events_url":"https://api.github.com/repos/solettaproject/soletta/events","assignees_url":"https://api.github.com/repos/solettaproject/soletta/assignees{/user}","branches_url":"https://api.github.com/repos/solettaproject/soletta/branches{/branch}","tags_url":"https://api.github.com/repos/solettaproject/soletta/tags","blobs_url":"https://api.github.com/repos/solettaproject/soletta/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solettaproject/soletta/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solettaproject/soletta/git/refs{/sha}","trees_url":"https://api.github.com/repos/solettaproject/soletta/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solettaproject/soletta/statuses/{sha}","languages_url":"https://api.github.com/repos/solettaproject/soletta/languages","stargazers_url":"https://api.github.com/repos/solettaproject/soletta/stargazers","contributors_url":"https://api.github.com/repos/solettaproject/soletta/contributors","subscribers_url":"https://api.github.com/repos/solettaproject/soletta/subscribers","subscription_url":"https://api.github.com/repos/solettaproject/soletta/subscription","commits_url":"https://api.github.com/repos/solettaproject/soletta/commits{/sha}","git_commits_url":"https://api.github.com/repos/solettaproject/soletta/git/commits{/sha}","comments_url":"https://api.github.com/repos/solettaproject/soletta/comments{/number}","issue_comment_url":"https://api.github.com/repos/solettaproject/soletta/issues/comments{/number}","contents_url":"https://api.github.com/repos/solettaproject/soletta/contents/{+path}","compare_url":"https://api.github.com/repos/solettaproject/soletta/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solettaproject/soletta/merges","archive_url":"https://api.github.com/repos/solettaproject/soletta/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solettaproject/soletta/downloads","issues_url":"https://api.github.com/repos/solettaproject/soletta/issues{/number}","pulls_url":"https://api.github.com/repos/solettaproject/soletta/pulls{/number}","milestones_url":"https://api.github.com/repos/solettaproject/soletta/milestones{/number}","notifications_url":"https://api.github.com/repos/solettaproject/soletta/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solettaproject/soletta/labels{/name}","releases_url":"https://api.github.com/repos/solettaproject/soletta/releases{/id}","deployments_url":"https://api.github.com/repos/solettaproject/soletta/deployments","created_at":"2015-06-08T19:13:18Z","updated_at":"2016-04-06T11:46:28Z","pushed_at":"2016-04-05T20:36:11Z","git_url":"git://github.com/solettaproject/soletta.git","ssh_url":"git@github.com:solettaproject/soletta.git","clone_url":"https://github.com/solettaproject/soletta.git","svn_url":"https://github.com/solettaproject/soletta","homepage":"http://solettaproject.org","size":24880,"stargazers_count":82,"watchers_count":82,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":65,"mirror_url":null,"open_issues_count":192,"forks":65,"open_issues":192,"watchers":82,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1825"},"html":{"href":"https://github.com/solettaproject/soletta/pull/1825"},"issue":{"href":"https://api.github.com/repos/solettaproject/soletta/issues/1825"},"comments":{"href":"https://api.github.com/repos/solettaproject/soletta/issues/1825/comments"},"review_comments":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1825/comments"},"review_comment":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solettaproject/soletta/pulls/1825/commits"},"statuses":{"href":"https://api.github.com/repos/solettaproject/soletta/statuses/bb7d304960329c8ece922936391d4b253a77d7ab"}}}}