NetSurf
Macros | Functions | Variables
filetype.cpp File Reference
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <Mime.h>
#include <NodeInfo.h>
#include <String.h>
#include "utils/log.h"
#include "utils/hashtable.h"
#include "utils/utils.h"
#include "beos/filetype.h"
#include "beos/gui.h"
Include dependency graph for filetype.cpp:

Go to the source code of this file.

Macros

#define __STDBOOL_H__   1
 

Functions

void beos_fetch_filetype_init (void)
 
void beos_fetch_filetype_fin (void)
 
const char * fetch_filetype (const char *unix_path)
 filetype – determine the MIME type of a local file More...
 

Variables

struct {
   const char *   type
 
   const char *   ext1
 
   const char *   ext2
 
default_types []
 

Macro Definition Documentation

◆ __STDBOOL_H__

#define __STDBOOL_H__   1

Definition at line 19 of file filetype.cpp.

Function Documentation

◆ beos_fetch_filetype_fin()

void beos_fetch_filetype_fin ( void  )

Definition at line 88 of file filetype.cpp.

Referenced by gui_quit().

Here is the caller graph for this function:

◆ beos_fetch_filetype_init()

void beos_fetch_filetype_init ( void  )

Definition at line 58 of file filetype.cpp.

References beos_warn_user(), default_types, ext1, and ext2.

Referenced by gui_init().

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

◆ fetch_filetype()

const char * fetch_filetype ( const char *  unix_path)

filetype – determine the MIME type of a local file

Determine the MIME type of a local file.

Definition at line 92 of file filetype.cpp.

References default_types, ext1, ext2, and type.

Variable Documentation

◆ 

struct { ... } default_types[]
Initial value:
= {
{ "text/plain", "txt", NULL },
{ "text/html", "htm", "html" },
{ "text/css", "css", NULL },
{ "image/gif", "gif", NULL },
{ "image/jpeg", "jpg", "jpeg" },
{ "image/png", "png", NULL },
{ "image/jng", "jng", NULL },
{ NULL, NULL, NULL }
}

Referenced by beos_fetch_filetype_init(), and fetch_filetype().

◆ ext1

const char* ext1

Definition at line 45 of file filetype.cpp.

Referenced by beos_fetch_filetype_init(), and fetch_filetype().

◆ ext2

const char* ext2

Definition at line 46 of file filetype.cpp.

Referenced by beos_fetch_filetype_init(), and fetch_filetype().

◆ type

const char* type

Definition at line 44 of file filetype.cpp.

Referenced by ami_bitmap_get_generic(), ami_content_type_to_file_type(), ami_file_save(), ami_file_save_req(), ami_file_set_type(), ami_gui_opts_array_to_list(), ami_gui_opts_free_list(), ami_gui_win_list_add(), ami_menu_alloc_item(), ami_menu_hotlist_add(), ami_mime_compare(), ami_mime_entry_locate(), ami_misc_req(), amiga_icon_superimpose_favicon(), amiga_plugin_hack_init(), box_create_frameset(), box_has_percentage_max_width(), box_input(), box_is_root(), box_object(), browser_window_set_drag_type(), calculate_mbp_width(), colour_option_from_pen(), content_factory_type_from_mime_type(), content_textsearch_create(), convert_xml_to_box(), cookie_manager_walk_cb(), css_hint_list(), dom_default_action_DOMNodeInserted_cb(), dom_default_action_DOMNodeInsertedIntoDocument_cb(), dom_default_action_DOMSubtreeModified_cb(), dukky_event_proto(), dukky_html_element_class_from_tag_type(), dukky_push_node_klass(), dump_dom_element(), dump_dom_element_attribute(), fb_browser_window_click(), fbtk_widget_new(), fetch_curl_debug(), fetch_filetype(), fetch_rsrc_process(), fire_dom_keyboard_event(), fire_generic_dom_event(), form_new_control(), framebuffer_pick_default_fename(), FreeSysObject(), global_history_export_enter_cb(), global_history_export_leave_cb(), global_history_get_selection(), gtk_fetch_filetype_init(), gui_default_socket_open(), gui_window_drag_start(), hlcache_migrate_ctx(), hlcache_type_is_acceptable(), HOOKF(), hotlist_export_enter_cb(), hotlist_export_leave_cb(), hotlist_get_selection(), hotlist_has_url_walk_cb(), hotlist_iterate_enter_cb(), hotlist_iterate_leave_cb(), hotlist_remove_url_walk_cb(), hotlist_update_url_walk_cb(), html_dom_event_fetcher(), html_process_new_script(), http_parse_content_type(), image__override_sprite_mode(), image_redraw(), js_fire_event(), knockout_plot_flush(), layout__check_element_type(), layout__get_element_tag(), layout_compute_offsets(), layout_find_dimensions(), layout_minmax_table(), layout_table(), libdom_iterate_child_elements(), main(), mimesniff__compute_image(), monkey_fetch_filetype(), monkey_fetch_filetype_init(), named_generic_sibling_node(), named_sibling_node(), node_count_siblings_check(), node_is_root(), nsbeos_gui_view_source(), nsoption_is_set(), ro_content_filetype_from_type(), ro_gui_buffer_open(), ro_gui_mouse_click_state(), ro_gui_set_icon_button_type(), ro_gui_url_bar_set_content_favicon(), ro_gui_url_bar_set_site_favicon(), ro_gui_url_complete_redraw(), ro_gui_wimp_event_get_event(), ro_print_ack(), save_complete_node_handler(), save_complete_save_html_object(), save_complete_save_stylesheet(), sibling_node(), sprite_bpp(), table_calculate_column_types(), textsearch_broadcast(), treeview_walk(), urldb_set_url_content_type(), and window_set_focus().