X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-context.h;h=bec1d35c053da64841c80eccfda7521a99bf15a3;hb=043c27c3a8fd323d59e41288b6fd24f0e9bfa9a3;hp=f1af36221ee1e23e823e372e6f6f78af559a491a;hpb=febbd43b65c6b0d480b076ead8a078979b8b3603;p=src%2Fapp-framework-binder.git diff --git a/src/afb-context.h b/src/afb-context.h index f1af3622..bec1d35c 100644 --- a/src/afb-context.h +++ b/src/afb-context.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2016, 2017 "IoT.bzh" + * Copyright (C) 2016-2019 "IoT.bzh" * Author: José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -22,7 +22,7 @@ struct afb_session; struct afb_context { struct afb_session *session; - void *api_key; + const void *api_key; struct afb_context *super; union { unsigned flags; @@ -48,7 +48,7 @@ extern const char *afb_context_uuid(struct afb_context *context); extern void *afb_context_get(struct afb_context *context); extern int afb_context_set(struct afb_context *context, void *value, void (*free_value)(void*)); -extern void *afb_context_data(struct afb_context *context, void *(*make_value)(void), void (*free_value)(void*)); +extern void *afb_context_make(struct afb_context *context, int replace, void *(*make_value)(void *closure), void (*free_value)(void *item), void *closure); extern void afb_context_close(struct afb_context *context); extern void afb_context_refresh(struct afb_context *context);