NetSurf
Data Structures | Functions | Variables
401login.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "utils/ring.h"
#include "utils/nsurl.h"
#include "monkey/output.h"
#include "monkey/401login.h"
Include dependency graph for 401login.c:

Go to the source code of this file.

Data Structures

struct  monkey401
 

Functions

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 monkey401monkey_find_login_by_num (uint32_t login_num)
 
static void free_login_context (struct monkey401 *m401_ctx)
 
static void monkey_login_handle_go (int argc, char **argv)
 
static void monkey_login_handle_destroy (int argc, char **argv)
 
static void monkey_login_handle_username (int argc, char **argv)
 
static void monkey_login_handle_password (int argc, char **argv)
 
void monkey_login_handle_command (int argc, char **argv)
 

Variables

static struct monkey401m401_ring = NULL
 
static uint32_t m401_ctr = 0
 

Function Documentation

◆ free_login_context()

static void free_login_context ( struct monkey401 m401_ctx)
static

Definition at line 106 of file 401login.c.

References MOUT_LOGIN, moutf(), nsurl_unref(), monkey401::num, monkey401::password, monkey401::realm, RING_REMOVE, monkey401::url, and monkey401::username.

Referenced by monkey_login_handle_destroy(), and monkey_login_handle_go().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ gui_401login_open()

nserror gui_401login_open ( struct nsurl url,
const char *  realm,
const char *  username,
const char *  password,
nserror(*)(struct nsurl *url, const char *realm, const char *username, const char *password, void *pw)  cb,
void *  cbpw 
)

Definition at line 46 of file 401login.c.

References monkey401::cb, monkey401::cbpw, m401_ctr, MOUT_LOGIN, moutf(), NSERROR_NOMEM, NSERROR_OK, nsurl_access(), nsurl_ref(), monkey401::num, monkey401::realm, RING_INSERT, and monkey401::url.

Here is the call graph for this function:

◆ monkey_find_login_by_num()

static struct monkey401* monkey_find_login_by_num ( uint32_t  login_num)
static

Definition at line 92 of file 401login.c.

References RING_ITERATE_END, RING_ITERATE_START, and RING_ITERATE_STOP.

Referenced by monkey_login_handle_destroy(), monkey_login_handle_go(), monkey_login_handle_password(), and monkey_login_handle_username().

Here is the caller graph for this function:

◆ monkey_login_handle_command()

void monkey_login_handle_command ( int  argc,
char **  argv 
)

Definition at line 207 of file 401login.c.

References monkey_login_handle_destroy(), monkey_login_handle_go(), monkey_login_handle_password(), monkey_login_handle_username(), MOUT_ERROR, and moutf().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ monkey_login_handle_destroy()

static void monkey_login_handle_destroy ( int  argc,
char **  argv 
)
static

Definition at line 142 of file 401login.c.

References free_login_context(), monkey_find_login_by_num(), MOUT_ERROR, and moutf().

Referenced by monkey_login_handle_command().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ monkey_login_handle_go()

static void monkey_login_handle_go ( int  argc,
char **  argv 
)
static

Definition at line 121 of file 401login.c.

References monkey401::cb, monkey401::cbpw, free_login_context(), monkey_find_login_by_num(), MOUT_ERROR, moutf(), monkey401::password, monkey401::realm, monkey401::url, and monkey401::username.

Referenced by monkey_login_handle_command().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ monkey_login_handle_password()

static void monkey_login_handle_password ( int  argc,
char **  argv 
)
static

Definition at line 184 of file 401login.c.

References monkey_find_login_by_num(), MOUT_ERROR, moutf(), and monkey401::password.

Referenced by monkey_login_handle_command().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ monkey_login_handle_username()

static void monkey_login_handle_username ( int  argc,
char **  argv 
)
static

Definition at line 161 of file 401login.c.

References monkey_find_login_by_num(), MOUT_ERROR, moutf(), and monkey401::username.

Referenced by monkey_login_handle_command().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ m401_ctr

uint32_t m401_ctr = 0
static

Definition at line 42 of file 401login.c.

Referenced by gui_401login_open().

◆ m401_ring

struct monkey401* m401_ring = NULL
static

Definition at line 41 of file 401login.c.