33 nserror (*
cb)(
struct nsurl*,
const char *,
const char *,
const char *,
void *);
59 m401_ctx = calloc(
sizeof(*m401_ctx), 1);
60 if (m401_ctx == NULL) {
63 m401_ctx->
realm = strdup(realm);
64 if (m401_ctx->
realm == NULL) {
75 if (username == NULL) {
79 if (password == NULL) {
97 if (c_ring->num == login_num) {
115 free(m401_ctx->
realm);
131 if (m401_ctx == NULL) {
152 if (m401_ctx == NULL) {
171 if (m401_ctx == NULL) {
180 m401_ctx->
username = strdup(argv[3]);
194 if (m401_ctx == NULL) {
203 m401_ctx->
password = strdup(argv[3]);
212 if (strcmp(argv[1],
"USERNAME") == 0) {
214 }
else if (strcmp(argv[1],
"PASSWORD") == 0) {
216 }
else if (strcmp(argv[1],
"DESTROY") == 0) {
218 }
else if (strcmp(argv[1],
"GO") == 0) {
int moutf(enum monkey_output_type mout_type, const char *fmt,...)
Interface to utility string handling.
static void monkey_login_handle_username(int argc, char **argv)
struct monkey401 * r_next
void monkey_login_handle_command(int argc, char **argv)
#define RING_ITERATE_END(ring, iteratorptr)
#define RING_INSERT(ring, element)
Insert the given item into the specified ring.
static void monkey_login_handle_go(int argc, char **argv)
nserror
Enumeration of error codes.
struct monkey401 * r_prev
static void monkey_login_handle_password(int argc, char **argv)
#define RING_REMOVE(ring, element)
Remove the given element from the specified ring.
nserror gui_401login_open(struct nsurl *url, const char *realm, const char *username, const char *password, nserror(*cb)(struct nsurl *url, const char *realm, const char *username, const char *password, void *pw), void *cbpw)
static struct monkey401 * m401_ring
nserror(* cb)(struct nsurl *, const char *, const char *, const char *, void *)
nsurl * nsurl_ref(nsurl *url)
Increment the reference count to a NetSurf URL object.
#define RING_ITERATE_START(ringtype, ring, iteratorptr)
const char * nsurl_access(const nsurl *url)
Access a NetSurf URL object as a string.
static void monkey_login_handle_destroy(int argc, char **argv)
static void free_login_context(struct monkey401 *m401_ctx)
static struct monkey401 * monkey_find_login_by_num(uint32_t login_num)
NetSurf URL handling (interface).
struct nsurl nsurl
NetSurf URL object.
void nsurl_unref(nsurl *url)
Drop a reference to a NetSurf URL object.
#define RING_ITERATE_STOP(ring, iteratorptr)