• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ MRP_UNUSED函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中MRP_UNUSED函数的典型用法代码示例。如果您正苦于以下问题:C++ MRP_UNUSED函数的具体用法?C++ MRP_UNUSED怎么用?C++ MRP_UNUSED使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了MRP_UNUSED函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: logger

static void logger(void *data, mrp_log_level_t level, const char *file,
                   int line, const char *func, const char *format, va_list ap)
{
    console_t  *c = (console_t *)data;
    va_list     cp;
    const char *prefix;

    MRP_UNUSED(file);
    MRP_UNUSED(line);
    MRP_UNUSED(func);

    switch (level) {
    case MRP_LOG_ERROR:   prefix = "[log] E: "; break;
    case MRP_LOG_WARNING: prefix = "[log] W: "; break;
    case MRP_LOG_INFO:    prefix = "[log] I: "; break;
    case MRP_LOG_DEBUG:   prefix = "[log] D: "; break;
    default:              prefix = "[log] ?: ";
    }

    va_copy(cp, ap);
    mrp_console_printf(c->mc, "%s", prefix);
    mrp_console_vprintf(c->mc, format, cp);
    mrp_console_printf(c->mc, "\n");
    va_end(cp);
}
开发者ID:B1gSmoke,项目名称:autotools,代码行数:25,代码来源:plugin-console.c


示例2: ignore_invalid_request

static void ignore_invalid_request(wrt_client_t *c, mrp_json_t *req, ...)
{
    MRP_UNUSED(c);
    MRP_UNUSED(req);

    mrp_log_error("Ignoring invalid WRT resource request");
}
开发者ID:B1gSmoke,项目名称:autotools,代码行数:7,代码来源:plugin-resource-wrt.c


示例3: server_status_cb

static void server_status_cb(mrp_dbus_t *dbus, const char *name, int up,
                             const char *owner, void *user_data)
{
    context_t *c = (context_t *)user_data;

    MRP_UNUSED(dbus);
    MRP_UNUSED(name);

    if (up) {
        mrp_log_info("%s came up (as %s)", name, owner);

        if (c->timer == NULL) {
            c->timer = mrp_add_timer(c->ml, 1000, send_cb, c);

            if (c->timer == NULL) {
                mrp_log_error("Failed to create D-BUS sending timer.");
                exit(1);
            }
        }
    }
    else {
        mrp_log_info("%s went down", name);

        if (c->timer != NULL) {
            mrp_del_timer(c->timer);
            c->timer = NULL;
        }
    }
}
开发者ID:sanyaade-mobiledev,项目名称:murphy,代码行数:29,代码来源:dbus-test.c


示例4: render_notify

static void render_notify(srs_t *srs, srs_voice_event_t *e, void *user_data,
                          void *notify_data)
{
    client_t *c = (client_t *)user_data;

    MRP_UNUSED(srs);
    MRP_UNUSED(notify_data);

    switch (e->type) {
    case SRS_VOICE_EVENT_STARTED:
        print(c, "Rendering of TTS #%u started...", e->id);
        break;

    case SRS_VOICE_EVENT_PROGRESS:
        print(c, "%f %% (%u msec) of TTS #%u rendered...",
              e->data.progress.pcnt, e->data.progress.msec, e->id);
        break;

    case SRS_VOICE_EVENT_COMPLETED:
        print(c, "Rendering of TTS #%u completed.", e->id);
        break;

    case SRS_VOICE_EVENT_TIMEOUT:
        print(c, "Rendering of TTS #%u timed out.", e->id);
        break;

    case SRS_VOICE_EVENT_ABORTED:
        print(c, "Rendering of TTS #%u terminated abnormally.", e->id);
        break;

    default:
        break;
    }
}
开发者ID:01org,项目名称:winthorpe,代码行数:34,代码来源:test-client.c


示例5: log_target

static void log_target(mrp_console_t *c, void *user_data,
                       int argc, char **argv)
{
    const char *target;
    const char *targets[32];
    int         i, n;

    MRP_UNUSED(c);
    MRP_UNUSED(user_data);

    if (argc == 2) {
        target = mrp_log_get_target();
        n      = mrp_log_get_targets(targets, MRP_ARRAY_SIZE(targets));

        printf("available log targets:\n");
        for (i = 0; i < n; i++)
            printf("    %s%s\n", targets[i],
                   !strcmp(targets[i], target) ? " (active)" : "");
    }
    else if (argc == 3) {
        target = argv[2];

        if (!mrp_log_set_target(target))
            printf("failed to change logging target to %s", target);
        else {
            printf("changed log target to %s\n", target);
            mrp_log_info("changed log target to %s", target);
        }
    }
    else {
        printf("%s/%s invoked with wrong number of arguments\n",
               argv[0], argv[1]);
    }
}
开发者ID:B1gSmoke,项目名称:autotools,代码行数:34,代码来源:console-log.c


示例6: notify_focus

static int notify_focus(srs_client_t *srs_client, srs_voice_focus_t focus)
{
    MRP_UNUSED(srs_client);
    MRP_UNUSED(focus);

    return TRUE;
}
开发者ID:01org,项目名称:winthorpe,代码行数:7,代码来源:clients.c


示例7: main

int main(int argc, char **argv)
{
    mrp_mainloop_t *ml;
    int mask;
    mrp_io_watch_t *watch;

    my_app_data app_data;

    MRP_UNUSED(argc);
    MRP_UNUSED(argv);

    if ((ml = mrp_mainloop_create()) == NULL)
        exit(1);

    app_data.rs = NULL;
    app_data.cx = mrp_res_create(ml, state_callback, &app_data);

    mask = MRP_IO_EVENT_IN | MRP_IO_EVENT_HUP | MRP_IO_EVENT_ERR;
    watch = mrp_add_io_watch(ml, fileno(stdin), (mrp_io_event_t) mask,
            handle_input, &app_data);

    if (!watch)
        exit(1);

    /* start looping */
    mrp_mainloop_run(ml);

    mrp_res_destroy(app_data.cx);
    mrp_mainloop_destroy(ml);

    app_data.cx = NULL;
    app_data.rs = NULL;

    return 0;
}
开发者ID:01org,项目名称:murphy,代码行数:35,代码来源:api_test.c


示例8: event_cb

void event_cb(uint32_t request_id, mrp_resource_set_t *resource_set, void *user_data)
{
    resource_set_lua_t *rset = (resource_set_lua_t *) user_data;
    mrp_resource_mask_t grant, advice;
    int                 top;

    MRP_UNUSED(request_id);
    MRP_UNUSED(resource_set);

    mrp_debug("> event_cb");

    top = lua_gettop(rset->L);

    grant = mrp_get_resource_set_grant(rset->resource_set);
    advice = mrp_get_resource_set_advice(rset->resource_set);

    /* update resource set */
    rset->acquired = !!grant;
    rset->available = !!advice;

    if (mrp_lua_object_deref_value(rset, rset->L, rset->callback, false)) {
        mrp_lua_push_object(rset->L, rset);

        if (lua_pcall(rset->L, 1, 0, 0) != 0)
            mrp_log_error("failed to invoke Lua resource set callback: %s",
                    lua_tostring(rset->L, -1));
    }

    lua_settop(rset->L, top);
}
开发者ID:01org,项目名称:murphy,代码行数:30,代码来源:lua-resource.c


示例9: config_loader

static int config_loader(srs_plugin_t *plugin, srs_cfg_t *settings)
{
    MRP_UNUSED(plugin);
    MRP_UNUSED(settings);

    return TRUE;
}
开发者ID:avalluri,项目名称:winthorpe,代码行数:7,代码来源:festival-loader.c


示例10: command_notify

static int command_notify(srs_client_t *c, int idx, int ntoken, char **tokens,
                          uint32_t *start, uint32_t *end, srs_audiobuf_t *audio)
{
    dbusif_t      *bus   = (dbusif_t *)c->user_data;
    const char    *dest  = c->id;
    const char    *path  = SRS_CLIENT_PATH;
    const char    *iface = SRS_CLIENT_INTERFACE;
    const char    *sig   = SRS_CLIENT_NOTIFY_COMMAND;

    char           buf[1024], *cmd, *p, *t;
    int            i, n, l;

    MRP_UNUSED(idx);
    MRP_UNUSED(start);
    MRP_UNUSED(end);
    MRP_UNUSED(audio);

    p = cmd = buf;
    l = sizeof(buf) - 1;
    t = "";

    for (i = 0; i < ntoken; i++) {
        n = snprintf(p, l, "%s%s", t, tokens[i]);

        if (n >= l)
            return FALSE;

        p += n;
        l -= n;
        t  = " ";
    }

    return mrp_dbus_signal(bus->dbus, dest, path, iface, sig,
                           MRP_DBUS_TYPE_STRING, cmd, MRP_DBUS_TYPE_INVALID);
}
开发者ID:01org,项目名称:winthorpe,代码行数:35,代码来源:dbus-client.c


示例11: wakeup_cb

static void wakeup_cb(mrp_wakeup_t *w, mrp_wakeup_event_t event,
                      void *user_data)
{
    static struct timeval  prev[2] = { {0, 0}, {0, 0} };
    const char            *evt;
    struct timeval         now;
    double                 diff;
    int                    id;

    MRP_UNUSED(w);
    MRP_UNUSED(user_data);

    timeval_now(&now);

    switch (event) {
    case MRP_WAKEUP_EVENT_TIMER: evt = "timer";           break;
    case MRP_WAKEUP_EVENT_IO:    evt = "I/O (or signal)"; break;
    case MRP_WAKEUP_EVENT_LIMIT: evt = "limit";           break;
    default:                     evt = "???";
    }

    id = user_data ? 1 : 0;

    if (MRP_LIKELY(prev[id].tv_usec != 0)) {
        diff = timeval_diff(&now, &prev[id]) / 1000.0;
        info("woken up #%d by %s, %.2f msecs since previous", id, evt, diff);
    }

    prev[id] = now;
}
开发者ID:01org,项目名称:murphy,代码行数:30,代码来源:mainloop-test.c


示例12: ignore_unknown_request

static void ignore_unknown_request(wrt_client_t *c, mrp_json_t *req,
                                   const char *type)
{
    MRP_UNUSED(c);
    MRP_UNUSED(req);

    mrp_log_error("Ignoring unknown WRT resource request '%s'", type);
}
开发者ID:B1gSmoke,项目名称:autotools,代码行数:8,代码来源:plugin-resource-wrt.c


示例13: resource_lua_changed

static void resource_lua_changed(void *data, lua_State *L, int member)
{
    MRP_UNUSED(data);
    MRP_UNUSED(L);
    MRP_UNUSED(member);

    mrp_debug("> resource_changed");
}
开发者ID:01org,项目名称:murphy,代码行数:8,代码来源:lua-resource.c


示例14: attribute_lua_changed

static void attribute_lua_changed(void *data, lua_State *L, int member)
{
    MRP_UNUSED(data);
    MRP_UNUSED(L);
    MRP_UNUSED(member);

    mrp_debug("> attribute_changed");
    return;
}
开发者ID:01org,项目名称:murphy,代码行数:9,代码来源:lua-resource.c


示例15: MRP_UNUSED

static const char *translate_glob(const char *pattern, char *glob, size_t size)
{
    MRP_UNUSED(glob);
    MRP_UNUSED(size);

    /* XXX FIXME: translate pattern to glob-like */

    return pattern;
}
开发者ID:e8johan,项目名称:murphy,代码行数:9,代码来源:file-utils.c


示例16: debug_show

static void debug_show(mrp_console_t *c, void *user_data,
                       int argc, char **argv)
{
    MRP_UNUSED(user_data);
    MRP_UNUSED(argc);
    MRP_UNUSED(argv);

    mrp_debug_dump_config(c->stdout);
}
开发者ID:B1gSmoke,项目名称:autotools,代码行数:9,代码来源:console-debug.c


示例17: read_status

static void read_status(long int i, paranoia_cb_mode_t mode)
{
#if 1
    MRP_UNUSED(i);
    MRP_UNUSED(mode);
#else
    mrp_debug("roffset: %ld, mode: 0x%x (%s)", i, mode,
              paranoia_cb_mode2str[mode]);
#endif
}
开发者ID:klihub,项目名称:ripncode,代码行数:10,代码来源:device-cdparanoia.c


示例18: resource_set_get_resources

static int resource_set_get_resources(void *data, lua_State *L, int member, mrp_lua_value_t *v)
{
    resource_set_lua_t *rset;
    void *iter = NULL;
    mrp_resource_t *resource;
    mrp_resource_mask_t grant, advice;

    MRP_UNUSED(member);
    MRP_UNUSED(v);

    mrp_debug("> resource_set_get_resources");

    rset = (resource_set_lua_t *) data;

    if (!rset)
        return luaL_error(L, "internal error");

    grant = mrp_get_resource_set_grant(rset->resource_set);
    advice = mrp_get_resource_set_advice(rset->resource_set);

    lua_newtable(L);

    /* push all resource objects to a table and return it */

    while ((resource = mrp_resource_set_iterate_resources(rset->resource_set, &iter))) {
        const char *name = mrp_resource_get_name(resource);
        mrp_resource_mask_t mask = mrp_resource_get_mask(resource);

        /* fetch and update the resource object */

        resource_lua_t *res =
                (resource_lua_t *) mrp_htbl_lookup(rset->resources,
                (void *) name);

        if (!res) {
            mrp_log_error("resources out of sync: %s not found", name);
            continue;
        }

        /* mrp_lua_object_ref_value(res, L, 0); */

        res->acquired = !!(mask & grant);
        res->available = !!(mask & advice);

        /* TODO: update attributes */

        /* push the resource to the table */
        lua_pushstring(L, res->resource_name);
        mrp_lua_push_object(L, res);
        lua_settable(L, -3);
    }

    return 1;
}
开发者ID:01org,项目名称:murphy,代码行数:54,代码来源:lua-resource.c


示例19: two_cb

void two_cb(mrp_console_t *c, void *user_data, int argc, char **argv)
{
    int i;

    MRP_UNUSED(c);
    MRP_UNUSED(user_data);

    for (i = 0; i < argc; i++) {
        printf("%s(): #%d: '%s'\n", __FUNCTION__, i, argv[i]);
    }
}
开发者ID:e8johan,项目名称:murphy,代码行数:11,代码来源:plugin-test.c


示例20: debug_set

static void debug_set(mrp_console_t *c, void *user_data,
                      int argc, char **argv)
{
    int i;

    MRP_UNUSED(c);
    MRP_UNUSED(user_data);

    for (i = 2; i < argc; i++)
        mrp_debug_set_config(argv[i]);
}
开发者ID:B1gSmoke,项目名称:autotools,代码行数:11,代码来源:console-debug.c



注:本文中的MRP_UNUSED函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ MR_IN函数代码示例发布时间:2022-05-30
下一篇:
C++ MRIsetVoxVal函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap