📄 hthome.h
字号:
/* W3C Sample Code Library libwww Home Page Management! Home Page Management!*//*** (c) COPYRIGHT MIT 1995.** Please first read the full copyright statement in the file COPYRIGH.*//*This module provides some "make life easier" functions in order toget the application going. The functionality of this module was originallyin HTAccess, but now it has been moved here asa part of the application interface where theapplication may use it if desired.This module is implemented by HTHome.c, and it isa part of the W3C Sample CodeLibrary.*/#ifndef HTHOME_H#define HTHOME_H#include "WWWLib.h"/*The home page is special in that this is is the first page to visitwhen a client application starts up. Note that a home page is a genericURL and hence can be any resouce - not only resources on the local file system.. Personal Home Page.*/#define LOGICAL_DEFAULT "WWW_HOME" /* Defined to be the home page */#ifndef PERSONAL_DEFAULT#define PERSONAL_DEFAULT "WWW/default.html" /* in home directory */#endif/* If the home page isn't found, use this file: */#ifndef LAST_RESORT#define LAST_RESORT "http://www.w3.org/"#endif/*. Home Page for Remote Access.Some Web applications can also be run remotely - for example as a telnetlogin shell. The Line Mode Browser is an example of such an application. Inthat case, the home page is often more generic than a personal home page.*//* If one telnets to an access point it will look in this file for home page */#ifndef REMOTE_POINTER#define REMOTE_POINTER "/etc/www-remote.url" /* can't be file */#endif/* and if that fails it will use this. */#ifndef REMOTE_ADDRESS#define REMOTE_ADDRESS "http://www.w3.org/" /* can't be file */#endif#ifndef LOCAL_DEFAULT_FILE#define LOCAL_DEFAULT_FILE "/usr/local/lib/WWW/default.html"#endif/*. Get an Anchor for the Home Page.Getting an anchor for the home page involves looking for the (environment)variables described in the section above. As this is something that almostall client applications must do then we provide some simple methods thatdo the work for you.*/extern HTParentAnchor * HTHomeAnchor (void);/*. Create a New Anchor for Temporary Local Files.When the user starts writing a new document, the client application shouldcreate a new anchor which can contain the document while it is created. Thiscan also be the location for backups and for security "auto-save" functionality.This functions creates a new anchor with a URL pointing to the temporarylocation defined by this user profile and returns that anchor.Andy Levine: I additionally found that calling HTTmpAnchor repeatedly withoutfreeing the newly allocated anchor will cause the anchor hash table tocontinue to grow.*/extern HTParentAnchor * HTTmpAnchor (HTUserProfile * up);/*. Get The Current Directory in URL form.Creates a local file URL that can be used as a relative name when callingexpanding other URLs relative to the current location in the local file systemtree where the application is running. The code for this routine originatesfrom the Line Mode Browser and was moved here by howcome@w3.orgin order for all clients to take advantage.*/#define HTFindRelatedName HTGetCurrentDirectoryURLextern char * HTGetCurrentDirectoryURL (void);/*. Handle HTML Form Input fields.Takes a string of the form "a=b" containing HTML form data,escapes it accordingly and puts it into the association list so that it readilycan be passed to any of the HTAccess function that handles HTML form data.The string should not be encoded in any way - this function encodes it accordingto the HTML form encoding rules.Examples are "foo=bar", "baz=foo and bar", "a= b ", " a = b ", "toto=", "four= two + two", "six three + three", and "a=b=c"*/extern BOOL HTParseFormInput (HTAssocList * list, const char * str);/*. Handle Library Trace Messages.Standard interface to libwww TRACE messages.Pass this function a string of characters. It will set up the appropriateTRACE flags. The following characters are used as follows: f Show BASIC UTILITIES Trace Messages l Show APPLICATION LEVEL Trace Messages c Show CACHE Trace Messages g Show SGML Trace Messages b Show BIND Trace Messages t Show THREAD Trace Messages s Show STREAM Trace Messages p Show PROTOCOL Trace Messages m Show MEMORY Trace Messages q Show SQL Trace Messages u Show URI Trace Messages h Show AUTH Trace Messages a Show ANCHOR Trace Messages i Show PICS Trace Messages o Show CORE Trace Messages x Show MUX Trace Messages * Show ALL Trace MessagesThe string must be null terminated, an example is "sop".*/extern int HTSetTraceMessageMask (const char * shortnames);/**/#endif /* HTHOME_H *//* @(#) $Id: HTHome.html,v 2.19 2000/07/04 15:19:45 kahan Exp $*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -