duda
duda copied to clipboard
Local Store object (Trac #10)
We would need an API object called "Local Store" with a short name for the api "lstore", that should implement two methods:
- set(duda_request_t _dr, void (_exit_callback) (duda_request_t *dr)) :
first parameter to refer to the context, and the second a callback that must be called (if set) every time the request was closed for some unknown reason (connection drop, explicit return , etc).
also the stack should not allow to finish a request based on a specific *dr* where it local store is not NULL (we need to avoid leaks and make sure users are using the API properly).
- void *get(duda_request_t *dr)
return the data.
to implement a new object in the stack you need to add a new duda_objectname.c , like duda_lstore.c and create the API (plus documentation) as is done for others.
Migrated from http://bugs.duda.io/ticket/10
{
"status": "new",
"changetime": "2014-01-03T02:25:02",
"description": "We would need an API object called \"Local Store\" with a short name for the api \"lstore\", that should implement two methods:\n\n 1) set(duda_request_t *dr, void (*exit_callback) (duda_request_t *dr)) :\n\n first parameter to refer to the context, and the second a callback that must be called (if set) every time the request was closed for some unknown reason (connection drop, explicit return , etc).\n\n also the stack should not allow to finish a request based on a specific *dr* where it local store is not NULL (we need to avoid leaks and make sure users are using the API properly).\n\n 2) void *get(duda_request_t *dr)\n\n return the data.\n\nto implement a new object in the stack you need to add a new duda_objectname.c , like duda_lstore.c and create the API (plus documentation) as is done for others.\n",
"reporter": "edsiper",
"cc": "",
"resolution": "",
"_ts": "1388715902224183",
"component": "API",
"summary": "Local Store object",
"priority": "minor",
"keywords": "",
"version": "",
"time": "2014-01-03T02:25:02",
"milestone": "",
"owner": "",
"type": "enhancement"
}