Annotation of libwww/Library/src/HTUser.html, revision 2.4
2.1 frystyk 1: <HTML>
2: <HEAD>
2.2 frystyk 3: <!-- Changed by: Henrik Frystyk Nielsen, 1-Jul-1996 -->
2.3 frystyk 4: <TITLE>W3C Sample Code Library libwww User Profile Class</TITLE>
2.1 frystyk 5: </HEAD>
6: <BODY>
7: <H1>
8: The User Profile Class
9: </H1>
10: <PRE>
11: /*
12: ** (c) COPYRIGHT MIT 1995.
13: ** Please first read the full copyright statement in the file COPYRIGH.
14: */
15: </PRE>
16: <P>
17: The User profile class manages what we know about a <I>user on this
18: host</I>. This can for example be the FQDN of the host, the user's email
19: address, the time zone, the news server etc. Note that this information does
20: not correspond to the actual information for the host but instead represents
21: "the information that the user wants to show the world". The user may use
22: an arbitrary email address to be used in a <A HREF="HTTPGen.html">HTTP
23: request</A>, for example. The application may assign a context to each use
24: which gives the application to extend the use of this class.
25: <P>
26: This module is implemented by <A HREF="HTUser.c">HTUser.c</A>, and it is
2.4 ! frystyk 27: a part of the <A HREF="http://www.w3.org/Library/">W3C Sample Code
2.1 frystyk 28: Library</A>.
29: <PRE>
30: #ifndef HTUSER_H
31: #define HTUSER_H
32:
33: typedef struct _HTUserProfile HTUserProfile;
34: </PRE>
35: <H2>
36: Creation and Deletion Methods
37: </H2>
38: <P>
39: The application may create any number of user profile objects. By default
40: the Library creates a generic user which is the default value used to initialize
2.2 frystyk 41: a <A HREF="HTReq.html">Request object</A>. This can be replaced by other
42: user profiles at any point in time.
2.1 frystyk 43: <H3>
2.2 frystyk 44: Create a User Profile
2.1 frystyk 45: </H3>
46: <PRE>extern HTUserProfile * HTUserProfile_new (const char * name, void * context);
47: </PRE>
48: <H3>
2.2 frystyk 49: Localize a User Profile
50: </H3>
51: <P>
52: Localize a user profile by filling in all the information that we can figure
53: out automatically, for example the email address, news server etc.
54: <PRE>extern BOOL HTUserProfile_localize (HTUserProfile * up);
55: </PRE>
56: <H3>
2.1 frystyk 57: Delete a User Profile
58: </H3>
59: <PRE>extern BOOL HTUserProfile_delete (HTUserProfile * up);
60: </PRE>
61: <H2>
62: User Profile Class Methods
63: </H2>
64: <H3>
65: Fully Qualified Domain Name (FQDN)
66: </H3>
67: <P>
68: The FQDN is a fully qualified domain name in that it contains both a local
69: host name and the domain name. It turns out that this is in fact very difficult
70: to obtain a FQDN on a variety of platforms.
71: <PRE>
72: extern char * HTUserProfile_fqdn (HTUserProfile * up);
73: extern BOOL HTUserProfile_setFqdn (HTUserProfile * up, const char * fqdn);
74: </PRE>
75: <H3>
76: User Email Address
77: </H3>
78: <P>
79: This is the email address that the user wants to send out for example as
80: a "password" when using anonymous <A HREF="HTFTP.html">FTP access</A> and
81: as a "From" field in a <A HREF="HTTPGen.html">HTTP request</A>.
82: <PRE>
83: extern char * HTUserProfile_email (HTUserProfile * up);
84: extern BOOL HTUserProfile_setEmail (HTUserProfile * up, const char * email);
85: </PRE>
86: <H3>
87: News Server
88: </H3>
89: <P>
90: Control the news server that this user wishes to use
91: <PRE>
92: extern char * HTUserProfile_news (HTUserProfile * host);
93: extern BOOL HTUserProfile_setNews (HTUserProfile * host, const char * news);
94: </PRE>
95: <H3>
96: Location of Temporary Files
97: </H3>
98: <P>
99: Control the location for temporary files for this profile. The format
100: <B>must</B> be in URL format which is different from local file syntax as
101: URL syntaz <I>always</I> uses '/' as delimiters and also encoding of special
102: characters. See the
2.4 ! frystyk 103: <A HREF="http://www.w3.org/Addressing/">documentation on URLs</A>
2.1 frystyk 104: for more information about URL syntax.
105: <PRE>
106: extern char * HTUserProfile_tmp (HTUserProfile * host);
107: extern BOOL HTUserProfile_setTmp (HTUserProfile * host, const char * tmp);
108: </PRE>
109: <H3>
110: Local Time Zone (in seconds)
111: </H3>
112: <P>
113: Another widely used piece information that is very hard toobtain is the local
114: time zone. As we often must convert to and from GMT (Universal Time) we must
115: have the correct time zone. If we for some reason guesses wrong then the
116: user must change it manually.
117: <PRE>
118: extern time_t HTUserProfile_timezone (HTUserProfile * up);
119: extern BOOL HTUserProfile_setTimezone (HTUserProfile * up, time_t timezone);
120: </PRE>
121: <H3>
122: User Profile Context
123: </H3>
124: <P>
125: The applicatoin may have additional information that it wishes to assign
126: to a user profile. It can do this using the user context which is handled
127: as follows:
128: <PRE>
129: extern void * HTUserProfile_context (HTUserProfile * up);
130: extern BOOL HTUserProfile_setContext (HTUserProfile * up, void * context);
131: </PRE>
132: <PRE>
133: #endif /* HTUser_H */
134: </PRE>
135: <P>
136: <HR>
137: <ADDRESS>
2.4 ! frystyk 138: @(#) $Id: HTUser.html,v 2.3 1997/02/16 18:43:12 frystyk Exp $
2.1 frystyk 139: </ADDRESS>
140: </BODY></HTML>
Webmaster