ELinks 0.18.0
session Struct Reference

This is one of the building stones of ELinks architecture — this structure carries information about the specific ELinks session. More...

#include <session.h>

Collaboration diagram for session:

Public Member Functions

 LIST_HEAD_EL (struct session)
 

Data Fields

The vital session data
struct windowtab
 
struct optionoption
 
Browsing history
struct ses_history history
 
The current document
struct file_to_load list more_files
 
struct download loading
 
struct uriloading_uri
 
int reloadlevel
 
int redirect_cnt
 
struct document_viewdoc_view
 
struct document_view list scrn_frames
 
struct document_view list scrn_iframes
 
struct uridownload_uri
 The URI from which the next start_download() or resume_download() call should download, or NULL if no such call is pending.
 
struct urireferrer
 The URI which is the referrer to the current loaded document or NULL if there are no referrer.
 
The current action-in-progress selector
struct session_task task
 
The current browsing state
int search_direction
 
struct kbdprefix kbdprefix
 
int exit_query
 
timer_id_T display_timer
 
timer_id_T status_redraw_timer
 
enum insert_mode insert_mode
 The text input form insert mode.
 
enum navigate_mode navigate_mode
 
char * search_word
 
char * last_search_word
 
struct type_query list type_queries
 The possibly running type queries (what-to-do-with-that-file?)
 
struct session_status status
 The info for status displaying.
 

Related Symbols

(Note that these are not member symbols.)

struct downloadget_current_download (struct session *ses)
 
struct sessioninit_session (struct session *base_session, struct terminal *term, struct uri *uri, int in_background)
 

 
char * get_current_url (struct session *ses, char *str, size_t str_size)
 Gets the url being viewed by this session.
 
char * get_current_title (struct session *ses, char *str, size_t str_size)
 Gets the title of the page being viewed by this session.
 
char * get_current_link_url (struct session *ses, char *str, size_t str_size)
 Gets the url of the link currently selected.
 
char * get_current_link_name (struct session *ses, char *str, size_t str_size)
 get_current_link_name: returns the name of the current link (the text between <A> and </A>), str is a preallocated string, str_size includes the null char.
 
struct linkget_current_session_link (struct session *ses)
 
int eat_kbd_repeat_count (struct session *ses)
 
int set_kbd_repeat_count (struct session *ses, int new_count)
 
static int have_location (struct session *ses)
 Return if we have anything being loaded in this session already.
 
void set_session_referrer (struct session *ses, struct uri *referrer)
 Swaps the current session referrer with the new one passed as referrer.
 
int session_is_loading (struct session *ses)
 session_is_loading() is like !!get_current_download() but doesn't take session.req_sent into account.
 

Detailed Description

This is one of the building stones of ELinks architecture — this structure carries information about the specific ELinks session.

Each tab (thus, at least one per terminal, in the normal case) has its own session. Session describes mainly the current browsing and control state, from the currently viewed document through the browsing history of this session to the status bar information.

Member Function Documentation

◆ LIST_HEAD_EL()

session::LIST_HEAD_EL ( struct session )

Friends And Related Symbol Documentation

◆ eat_kbd_repeat_count()

int eat_kbd_repeat_count ( struct session * ses)
related

◆ get_current_download()

struct download * get_current_download ( struct session * ses)
related

◆ get_current_link_name()

char * get_current_link_name ( struct session * ses,
char * str,
size_t str_size )
related

get_current_link_name: returns the name of the current link (the text between <A> and </A>), str is a preallocated string, str_size includes the null char.

◆ get_current_link_url()

char * get_current_link_url ( struct session * ses,
char * str,
size_t str_size )
related

Gets the url of the link currently selected.

Writes it into str. A maximum of str_size bytes (including null) will be written.

◆ get_current_session_link()

struct link * get_current_session_link ( struct session * ses)
related

◆ get_current_title()

char * get_current_title ( struct session * ses,
char * str,
size_t str_size )
related

Gets the title of the page being viewed by this session.

Writes it into str. A maximum of str_size bytes (including null) will be written.

◆ get_current_url()

char * get_current_url ( struct session * ses,
char * str,
size_t str_size )
related

Gets the url being viewed by this session.

Writes it into str. A maximum of str_size bytes (including null) will be written.

◆ have_location()

static int have_location ( struct session * ses)
related

Return if we have anything being loaded in this session already.

◆ init_session()

struct session * init_session ( struct session * base_session,
struct terminal * term,
struct uri * uri,
int in_background )
related


◆ session_is_loading()

int session_is_loading ( struct session * ses)
related

session_is_loading() is like !!get_current_download() but doesn't take session.req_sent into account.

◆ set_kbd_repeat_count()

int set_kbd_repeat_count ( struct session * ses,
int new_count )
related

◆ set_session_referrer()

void set_session_referrer ( struct session * ses,
struct uri * referrer )
related

Swaps the current session referrer with the new one passed as referrer.

referrer may be NULL.

Field Documentation

◆ display_timer

timer_id_T session::display_timer

◆ doc_view

struct document_view* session::doc_view

◆ download_uri

struct uri* session::download_uri

The URI from which the next start_download() or resume_download() call should download, or NULL if no such call is pending.

When the user requests a download, one of those functions is given as a callback to query_file(), which asks the user where to save the downloaded file. The URI cannot be given to the callback as a parameter because query_file() supports only one void * parameter for the callback and that one is already used for the struct session *. Instead, the URI is saved here before the query_file() call.

◆ exit_query

int session::exit_query

◆ history

struct ses_history session::history

◆ insert_mode

enum insert_mode session::insert_mode

The text input form insert mode.

It is a tristate controlled by the boolean document.browse.forms.insert_mode option. When disabled we use modeless insertion and we always insert stuff into the text input field. When enabled it is possible to switch insertion on and off using ACT_EDIT_ENTER and *_CANCEL.

◆ kbdprefix

struct kbdprefix session::kbdprefix

◆ last_search_word

char* session::last_search_word

◆ loading

struct download session::loading

◆ loading_uri

struct uri* session::loading_uri

◆ more_files

struct file_to_load list session::more_files

◆ navigate_mode

enum navigate_mode session::navigate_mode

◆ option

struct option* session::option

◆ redirect_cnt

int session::redirect_cnt

◆ referrer

struct uri* session::referrer

The URI which is the referrer to the current loaded document or NULL if there are no referrer.

The referrer member's sole purpose is to have the information handy when loading URIs. It is not 'filtered' in anyway at this level only at the lower ones.

◆ reloadlevel

int session::reloadlevel

◆ scrn_frames

struct document_view list session::scrn_frames

◆ scrn_iframes

struct document_view list session::scrn_iframes

◆ search_direction

int session::search_direction

◆ search_word

char* session::search_word

◆ status

struct session_status session::status

The info for status displaying.

◆ status_redraw_timer

timer_id_T session::status_redraw_timer

◆ tab

struct window* session::tab

◆ task

struct session_task session::task

◆ type_queries

struct type_query list session::type_queries

The possibly running type queries (what-to-do-with-that-file?)


The documentation for this struct was generated from the following files: