Detects whether a cookie is present.
This function will most probably be invoked in a loop. A cookie name and value is passed and the implementation checks whether the cookie is already listed. If not, the new cookie name and value are appended. If present, the value of the cookie name is updated.
#include "am_web.h" AM_WEB_EXPORT int am_web_is_cookie_present(const char *cookie, const char *value, char **new_cookie);
This function takes the following parameters:
Pointer to a cookie.
Pointer to a value.
Pointer to a pointer to the location of the new cookie.
This function returns one of the following integers as defined in <am_web.h>:
#define AM_WEB_COOKIE_EXIST 2 #define AM_WEB_COOKIE_MODIFIED 1 #define AM_WEB_COOKIE_ABSENT 0 #define AM_WEB_COOKIE_ERROR -1