Move the 'mail' documentation out of the Haiku Book.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21218 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,668 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>MIMEMultipartContainer</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" LINK="#2222AA" BACKGROUND="../art/bodyBack.gif">
|
||||
<P><A NAME=BCursor></A> <!--TOP LINKS--></P>
|
||||
|
||||
<CENTER><TABLE BORDER=2 BGCOLOR="#FFDD88">
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BGCOLOR="#550033" CELLPADDING=5>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><A HREF="../index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>Mail
|
||||
Kit 2 Root</B></FONT></A></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><A HREF="index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>The
|
||||
Public API</B></FONT></A></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</CENTER>
|
||||
|
||||
<P><!--TOP LINKS--></P>
|
||||
|
||||
<H1><FONT SIZE="+4">MIMEMultipartContainer</FONT></H1>
|
||||
|
||||
<BLOCKQUOTE><FONT FACE="helvetica"><B>Derived
|
||||
from:</B></FONT> <A HREF="MailComponent.html">MailComponent</A><BR>
|
||||
<FONT FACE="helvetica"><B>Declared in:</B></FONT>
|
||||
include/public/MailContainer.h<BR>
|
||||
<FONT FACE="helvetica"><B>Library:</B></FONT> libmail.so<BR>
|
||||
|
||||
<P><BR>
|
||||
</P>
|
||||
|
||||
<P>MIMEMultipartContainer uses the RFC 2046 multipart specification to allow you to place
|
||||
multiple components in a single message. Mostly useful for attachments and things.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</P>
|
||||
|
||||
<H2><FONT SIZE="+3" COLOR="#430000">C</FONT><FONT COLOR="#430000">onstructor
|
||||
and
|
||||
</FONT><FONT SIZE="+3" COLOR="#430000">D</FONT><FONT COLOR="#430000">estructor</FONT></H2>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=MIMEMultipartContainer></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">MIMEMultipartContainer()
|
||||
</FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<FONT SIZE="+1"><B><TT>MIMEMultipartContainer(</TT></B></FONT>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>boundary</I></FONT> = <B>NULL</B>,
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>this_is_an_MIME_message_text</I></FONT> = <B>NULL</B>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Initializes the <B>MIMEMultipartContainer</B>. Sets the boundary between parts to <FONT FACE="HELVETICA" COLOR="#991122"><I>boundary</I></FONT>.
|
||||
Note that <FONT FACE="HELVETICA" COLOR="#991122"><I>boundary</I></FONT> can be an arbitrary text string but <B>must</B> contain only US-ASCII
|
||||
characters and be unique to this particular MIMEMultipartContainer. It does not have to be globally unique, however. <FONT FACE="HELVETICA" COLOR="#991122"><I>boundary</I></FONT> must be specified,
|
||||
either here or through <A HREF="#SetBoundary">SetBoundary()</A>. Also, sets the warning text about "This is an MIME message..." to <FONT FACE="HELVETICA" COLOR="#991122"><I>this_is_an_MIME_message_text</I></FONT>,
|
||||
which need not be specified at all.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME="~MIMEMultipartContainer"></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">~MIMEMultipartContainer()
|
||||
</FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual
|
||||
<FONT SIZE="+1"><B><TT>~MIMEMultipartContainer()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Destroys the <B>MIMEMultipartContainer</B>. Note that this deletes all components which may have been added to
|
||||
this object. The ownership of all components is assumed by <B>MIMEMultipartContainer</B> when they are added.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</P>
|
||||
|
||||
<H2><FONT SIZE="+3" COLOR="#430000">M</FONT><FONT COLOR="#430000">ember
|
||||
</FONT><FONT SIZE="+3" COLOR="#430000">F</FONT><FONT COLOR="#430000">unctions</FONT></H2>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=GetDecodedData></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">GetDecodedData () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>GetDecodedData(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns an error. MIMEMultipartComponents don't have data of their own..</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_BAD_TYPE</B> This operation is guranteed to fail.</BLOCKQUOTE></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=SetDecodedData></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">SetDecodedData () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>SetDecodedData(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns an error. MIMEMultipartComponents don't have data of their own..</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_BAD_TYPE</B> This operation is guranteed to fail.</BLOCKQUOTE></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=Instantiate></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">Instantiate () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>Instantiate(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>,
|
||||
size_t <FONT FACE="HELVETICA" COLOR="#991122"><I>length</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Does what you would expect. Creates a list of components from <FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>. Note that you <B>cannot</B> delete <FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>, as we cache
|
||||
it for later. This is because, as a memory and CPU saving measure, we do not actually instantiate these components until asked to. Thus instantiating an MIMEMultipartContainer is not a
|
||||
processor or memory-intensive operation.</BLOCKQUOTE>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.
|
||||
|
||||
<P>- <B>B_BAD_TYPE</B> if <FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT FACE="HELVETICA"></FONT> is not an MIME multipart component</P>
|
||||
</BLOCKQUOTE></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=Render></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">Render () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>Render(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Renders the component into RFC 822 format and places the result
|
||||
in <FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>,
|
||||
starting at <FONT FACE="HELVETICA" COLOR="#991122"><I>data
|
||||
</I></FONT>->Position().</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.
|
||||
|
||||
<P>- Something else in the event of failure.</P></BLOCKQUOTE></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=SetBoundary></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">SetBoundary() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetBoundary(</TT></B></FONT>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>boundary</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Sets the boundary between parts to <FONT FACE="HELVETICA" COLOR="#991122"><I>boundary</I></FONT>.
|
||||
Note that <FONT FACE="HELVETICA" COLOR="#991122"><I>boundary</I></FONT> can be an arbitrary text string but <B>must</B> contain only US-ASCII
|
||||
characters and be unique to this particular MIMEMultipartContainer. It does not have to be globally unique, however.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=SetThisIsAnMIMEMessageText></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">SetThisIsAnMIMEMessageText() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetThisIsAnMIMEMessageText(</TT></B></FONT>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>text</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Sets the warning text about "This is an MIME message..." to <FONT FACE="HELVETICA" COLOR="#991122"><I>text</I></FONT>,
|
||||
which need not be specified at all. We reccomend that it only be set in the top-most <B>MIMEMultipartContainer</B> of the message.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=AddComponent></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">AddComponent() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>
|
||||
void <FONT SIZE="+1"><B><TT>AddComponent(</TT></B></FONT>
|
||||
<A HREF="MailComponent.html">MailComponent</A> *<FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Adds <FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT> to this MIMEMultipartContainer. Note that the MIMEMultipartContainer
|
||||
assumes ownership of <FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT>. Thus, you <B>may not</B> delete <FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT>.
|
||||
If you continue to modify to it after calling <A HREF="#AddComponent">AddComponent()</A>, your changes will be reflected when you
|
||||
call <A HREF="#Render">Render()</A>.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=GetComponent></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">GetComponent() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>
|
||||
<A HREF="MailComponent.html">MailComponent</A> * <FONT SIZE="+1"><B><TT>GetComponent(</TT></B></FONT>
|
||||
int32 <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns the component at <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT>.
|
||||
Instantiate()s it if it has not yet been instantiated. Otherwise, returns already instantiated
|
||||
component. Use RTTI or <A HREF="MailComponent.html">MailComponent</A> hooks to do useful things with the returned
|
||||
component.</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<P></BLOCKQUOTE>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=CountComponents></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">CountComponents() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>
|
||||
int32 <FONT SIZE="+1"><B><TT>CountComponents()</TT></B></FONT> const</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns the total number of components in this MIMEMultipartContainer.</P>
|
||||
|
||||
<P> </P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=ManualGetComponent></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">ManualGetComponent() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>
|
||||
status_t <FONT SIZE="+1"><B><TT>ManualGetComponent(</TT></B></FONT>
|
||||
<A HREF="MailComponent.html">MailComponent</A> * <FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT>,
|
||||
int32 <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Attempts to Instantiate() <FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT> from the component at
|
||||
<FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT>. Note that this will fail either if <FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT>->Instantiate() fails
|
||||
or if the component at <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT> either does not exist or exists only as a <A HREF="MailComponent.html">MailComponent</A> and not as a raw buffer. In other words,
|
||||
this function will succeed if and only if the component at <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT> exists, was part of the message
|
||||
when this MIMEMultipartContainer was instantiated and has not been written over since then, and <FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT>->Instantiate() succeeds on this buffer.
|
||||
<FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT> must be a valid <A HREF="MailComponent.html">MailComponent</A>.</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.
|
||||
|
||||
<P>- <B>B_BAD_INDEX</B> if <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT> is out of range</P>
|
||||
<P>- <B>B_NAME_IN_USE</B> if the component at <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT> does not exist in raw buffer form</P>
|
||||
|
||||
<P>- Something else if <FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT>->Instantiate() fails.</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=RemoveComponent></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">RemoveComponent() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>
|
||||
status_t <FONT SIZE="+1"><B><TT>RemoveComponent(</TT></B></FONT>
|
||||
int32 <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Removes the component at <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT> from the container and
|
||||
frees all memory associated with it (i.e. we delete it).</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.<P>
|
||||
|
||||
- <B>B_BAD_INDEX</B> if <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT> is out of range</P>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
</TABLE></P>
|
||||
|
||||
<P><!--TOP LINKS-->
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</P>
|
||||
|
||||
<CENTER><TABLE BORDER=2 BGCOLOR="#FFDD88">
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BGCOLOR="#550033" CELLPADDING=5>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><A HREF="../index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>Mail
|
||||
Kit 2 Root</B></FONT></A></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><A HREF="index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>The
|
||||
Public API</B></FONT></A></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
|
||||
<P><!--TOP LINKS--> <!-- Footer for Release 5 HTML Be Book --><BR>
|
||||
</P>
|
||||
|
||||
<CENTER><FONT SIZE="+3" COLOR="#555555"><I>Mail Daemon 2 API
|
||||
Documentation</I></FONT>
|
||||
|
||||
<P><FONT SIZE="+1" COLOR="#555555"><I>©2001 Dr. Zoidberg
|
||||
Enterprises</I></FONT></P></CENTER>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,763 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>MailComponent</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" LINK="#2222AA" BACKGROUND="../art/bodyBack.gif">
|
||||
<P><A NAME=BCursor></A> <!--TOP LINKS--></P>
|
||||
|
||||
<CENTER><TABLE BORDER=2 BGCOLOR="#FFDD88">
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BGCOLOR="#550033" CELLPADDING=5>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><A HREF="../index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>Mail
|
||||
Kit 2 Root</B></FONT></A></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><A HREF="index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>The
|
||||
Public API</B></FONT></A></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</CENTER>
|
||||
|
||||
<P><!--TOP LINKS--></P>
|
||||
|
||||
<H1><FONT SIZE="+4">MailComponent</FONT></H1>
|
||||
|
||||
<BLOCKQUOTE><FONT FACE="helvetica"><B>Derived
|
||||
from:</B></FONT> none<BR>
|
||||
<FONT FACE="helvetica"><B>Declared in:</B></FONT>
|
||||
include/public/MailComponent.h<BR>
|
||||
<FONT FACE="helvetica"><B>Library:</B></FONT> libmail.so<BR>
|
||||
|
||||
<P><BR>
|
||||
</P>
|
||||
|
||||
<P>MailComponent is the base class for the vast majority of the
|
||||
public Mail Kit. It is, however, important to remember that
|
||||
MailComponent is not abstract, and is useful by itself. A
|
||||
MailComponent has the important quality of being able to read the
|
||||
headers of a message or component without instantiating whatever
|
||||
massive quantity of data might lie therein. This is useful
|
||||
primarily to determine the kind of data you are dealing with, so
|
||||
that the user can make a decision as to whether it should be
|
||||
shown.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</P>
|
||||
|
||||
<H2><FONT SIZE="+3" COLOR="#430000">C</FONT><FONT COLOR="#430000">onstructor
|
||||
and
|
||||
</FONT><FONT SIZE="+3" COLOR="#430000">D</FONT><FONT COLOR="#430000">estructor</FONT></H2>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=MailComponent></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">MailComponent()
|
||||
</FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><FONT SIZE="+1"><B><TT>MailComponent()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Initializes the MailComponent and does nothing else.</P>
|
||||
|
||||
<P> </P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME="~MailComponent"></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">~MailComponent()
|
||||
</FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual
|
||||
<FONT SIZE="+1"><B><TT>~MailComponent()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Destroys the MailComponent. Does nothing of interest.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</P>
|
||||
|
||||
<H2><FONT SIZE="+3" COLOR="#430000">H</FONT><FONT COLOR="#430000">ook
|
||||
</FONT><FONT SIZE="+3" COLOR="#430000">F</FONT><FONT COLOR="#430000">unctions</FONT></H2>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=GetDecodedData></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">GetDecodedData () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>GetDecodedData(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Retrieves the data contained in this component in canonical
|
||||
format and places this data in<FONT FACE="HELVETICA" COLOR="#991122"><I>
|
||||
data</I></FONT>. The various attachments subclasses implement this
|
||||
function to return decoded data, and PlainTextBodyComponent
|
||||
returns UTF8 text. MailComponent implements this function to do
|
||||
nothing and return <B>B_OK</B>.</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.
|
||||
|
||||
<P>- Something else in the event of failure.</P></BLOCKQUOTE></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=SetDecodedData></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">SetDecodedData () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>SetDecodedData(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Sets the content of this component to the canonical format data
|
||||
contained in <FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>.
|
||||
Thus, an attachment subclass would accept a file here and encode
|
||||
it into the specified encoding. MailComponent implements this
|
||||
function to do nothing and return <B>B_OK</B>.</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.
|
||||
|
||||
<P>- Something else in the event of failure.</P></BLOCKQUOTE></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=Instantiate></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">Instantiate () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>Instantiate(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>,
|
||||
size_t <FONT FACE="HELVETICA" COLOR="#991122"><I>length</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Initializes this component to the RFC 822 format data in
|
||||
<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>,
|
||||
starting at <FONT FACE="HELVETICA" COLOR="#991122"><I>data
|
||||
</I></FONT>->Position(), for up to <FONT FACE="HELVETICA" COLOR="#991122"><I>length
|
||||
</I></FONT>bytes. Note that if you implement this function, your
|
||||
subclass may have taken up some of your data. As such, cache the
|
||||
position of <FONT FACE="HELVETICA" COLOR="#991122"><I>data
|
||||
</I></FONT>before calling your parent's version of
|
||||
<FONT SIZE="+1"><B><TT>Instantiate()</TT></B></FONT>, and then
|
||||
subtract the difference between the new position and your cached
|
||||
value, like this:</P>
|
||||
|
||||
<BLOCKQUOTE><CODE>off_t cache = data->Position();<BR>
|
||||
MailComponent::Instantiate(data,length);<BR>
|
||||
length -= (data->Position() - cache);</CODE></BLOCKQUOTE>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.
|
||||
|
||||
<P>- <B>B_BAD_TYPE</B> if we cannot handle <FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT FACE="HELVETICA">.</FONT></P>
|
||||
|
||||
<P>- Something else in the event of another kind of
|
||||
failure.</P></BLOCKQUOTE></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=Render></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">Render () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>Render(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Renders the component into RFC 822 format and places the result
|
||||
in <FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>,
|
||||
starting at <FONT FACE="HELVETICA" COLOR="#991122"><I>data
|
||||
</I></FONT>->Position().</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.
|
||||
|
||||
<P>- Something else in the event of failure.</P></BLOCKQUOTE></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=MIMEType></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">MIMEType () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>MIMEType(</TT></B></FONT>BMimeType
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>mime</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Places the MIME type of the data into <FONT FACE="HELVETICA" COLOR="#991122"><I>mime</I></FONT>.</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.
|
||||
|
||||
<P>- Something else in the event of failure.</P></BLOCKQUOTE></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</P>
|
||||
|
||||
<H2><FONT SIZE="+3" COLOR="#430000">M</FONT><FONT COLOR="#430000">ember
|
||||
</FONT><FONT SIZE="+3" COLOR="#430000">F</FONT><FONT COLOR="#430000">unctions</FONT></H2>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=WhatIsThis></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">WhatIsThis() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>MailComponent*
|
||||
<FONT SIZE="+1"><B><TT>WhatIsThis()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Employs simple heuristics such as the MIME type to present you
|
||||
with an instance of a useful subclass of MailComponent. You can
|
||||
then use any of MailComponent's hook functions or RTTI calls to
|
||||
get more information. Bear in mind that the returned component is
|
||||
<I>not</I> set to any data. You must still <A HREF="#Instantiate">Instantiate()</A>
|
||||
it from whatever data this object was instantiated from.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=IsAttachment></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">IsAttachment() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>bool
|
||||
<FONT SIZE="+1"><B><TT>IsAttachment()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Employs simple heuristics such as the MIME type and the
|
||||
Content-Disposition: header to determine whether this component is
|
||||
an attachment. Returns <B>true</B> if it is an attachment,
|
||||
<B>false</B> if not.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=SetHeaderField></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">SetHeaderField() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetHeaderField(</TT></B></FONT>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>key</I></FONT>,<BR>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>value</I></FONT>,<BR>
|
||||
uint32 <FONT FACE="HELVETICA" COLOR="#991122"><I>charset</I></FONT> = <B>B_ISO1_CONVERSION</B>,<BR>
|
||||
mail_encoding <FONT FACE="HELVETICA" COLOR="#991122"><I>encoding</I></FONT> = <B>quoted_printable</B>,<BR>
|
||||
bool <FONT FACE="HELVETICA" COLOR="#991122"><I>replace_existing</I></FONT>= <B>true</B>
|
||||
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P></BLOCKQUOTE>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetHeaderField(</TT></B></FONT>
|
||||
|
||||
<BLOCKQUOTE>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>key</I></FONT>,<BR>
|
||||
BMessage *<FONT FACE="HELVETICA" COLOR="#991122"><I>structured_header</I></FONT>,<BR>
|
||||
bool <FONT FACE="HELVETICA" COLOR="#991122"><I>replace_existing</I></FONT>= <B>true</B>
|
||||
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P></BLOCKQUOTE>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Adds the specificed header of type <FONT FACE="HELVETICA" COLOR="#991122"><I>key
|
||||
</I></FONT>and with the UTF8 contents <FONT FACE="HELVETICA" COLOR="#991122"><I>value</I></FONT>
|
||||
to the component.
|
||||
<FONT SIZE="+1"><B><TT>SetHeaderField()</TT></B></FONT> converts
|
||||
any 8 bit data in <FONT FACE="HELVETICA" COLOR="#991122"><I>value</I></FONT>
|
||||
to <FONT FACE="HELVETICA" COLOR="#991122"><I>charset</I></FONT>
|
||||
(see the Support Kit on UTF8 for more information on this), and
|
||||
encodes it into 7 bit data using <FONT FACE="HELVETICA" COLOR="#991122"><I>encoding</I></FONT>.
|
||||
|
||||
If <FONT FACE="HELVETICA" COLOR="#991122"><I>replace_existing</I></FONT>
|
||||
is true, replaces any existing header of this type with this one,
|
||||
otherwise adds a second one.</P>
|
||||
<P>Thus, to set the header <CODE>To:</CODE> of some <B>MailComponent</B> <I>component</I> to [email protected], we would do this:</P>
|
||||
<BLOCKQUOTE><CODE>
|
||||
component->SetHeaderField("To","[email protected]");
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P>The version of the function that takes a BMessage sets a structured header. These are in the format
|
||||
<CODE>unlabeled; key=value; key=value</CODE>. The most common instance of this is the <CODE>Content-Type</CODE> header,
|
||||
where the MIME type is unlabeled, and various other information, such as character set, is specified in the
|
||||
key/value pairs. The format for <FONT FACE="HELVETICA" COLOR="#991122"><I>structured_header</I></FONT> is relatively
|
||||
simple: simply use <TT>BMessage::AddString(key,value)</TT> for each key/value pair. The only exception to this
|
||||
rule is the unlabeled data. For this, simply use the key <I>unlabeled</I>. Please note that the <I>charset</I> and <I>encoding</I> arguments
|
||||
defined for the text version of <TT>SetHeaderField</TT> is not provided here because structured headers cannot be encoded.</P>
|
||||
<P>Thus, a relatively standard <CODE>Content-Type</CODE> header would be specified as follows:
|
||||
<BLOCKQUOTE><CODE>
|
||||
BMessage structured;<BR>
|
||||
structured.AddString("unlabeled","text/plain");<BR>
|
||||
structured.AddString("charset","iso-8859-1");<BR>
|
||||
component->SetHeaderField("To",&structured);
|
||||
</CODE></BLOCKQUOTE>
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=HeaderField></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">HeaderField() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>const char *
|
||||
<FONT SIZE="+1"><B><TT>HeaderField(</TT></B></FONT>const
|
||||
char *<FONT FACE="HELVETICA" COLOR="#991122"><I>key</I></FONT>,
|
||||
int32 <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT>
|
||||
=
|
||||
<B>0</B><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>status_t
|
||||
<FONT SIZE="+1"><B><TT>HeaderField(</TT></B></FONT>
|
||||
<BLOCKQUOTE>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>key</I></FONT>,<BR>
|
||||
BMessage *<FONT FACE="HELVETICA" COLOR="#991122"><I>structured_header</I></FONT>,<BR>
|
||||
int32 <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT> = <B>0</B>
|
||||
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P></BLOCKQUOTE>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns the header <FONT FACE="HELVETICA" COLOR="#991122"><I>key</I></FONT>.
|
||||
If there is more than one header <FONT FACE="HELVETICA" COLOR="#991122"><I>key</I></FONT>,
|
||||
use <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT> to
|
||||
iterate through them. In the event that the specified header does
|
||||
not exist, <FONT SIZE="+1"><B><TT>HeaderField()
|
||||
</TT></B></FONT>returns <B>NULL</B>. Thus, to retrieve the contents of the <CODE>Subject:</CODE> field in
|
||||
UTF8 format, you would do this:</P>
|
||||
<BLOCKQUOTE><CODE>
|
||||
const char *subject = component->HeaderField("Subject");
|
||||
</CODE></BLOCKQUOTE>
|
||||
<P>The version of this function that takes a BMessage
|
||||
decodes whatever structured header may exist in <FONT FACE="HELVETICA" COLOR="#991122"><I>key</I></FONT>
|
||||
and places it in <FONT FACE="HELVETICA" COLOR="#991122"><I>structured_header</I></FONT> according to the
|
||||
format laid out in <A HREF="#SetHeaderField">SetHeaderField()</A>. Returns <B>B_NAME_NOT_FOUND</B>
|
||||
if the header <FONT FACE="HELVETICA" COLOR="#991122"><I>key</I></FONT> does not exist. If it does exist,
|
||||
but is not structured, no error is returned; the entire contents of the header are placed in <I>unlabeled</I>.
|
||||
</P>
|
||||
|
||||
<P> </P></BLOCKQUOTE>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=HeaderAt></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">HeaderAt() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>const char *
|
||||
<FONT SIZE="+1"><B><TT>HeaderAt(</TT></B></FONT>
|
||||
int32 <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns the key of the header at <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT>.
|
||||
Useful for iterating through all the headers. If <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT>
|
||||
is out of range, <TT>HeaderAt()</TT> returns <B>NULL</B>.</P>
|
||||
|
||||
<P> </P></BLOCKQUOTE>
|
||||
|
||||
<P></TABLE></P>
|
||||
|
||||
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=RemoveHeader></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">RemoveHeader() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>const char *
|
||||
<FONT SIZE="+1"><B><TT>RemoveHeader(</TT></B></FONT>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>key</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Removes all headers with the key <FONT FACE="HELVETICA" COLOR="#991122"><I>key</I></FONT>.</P>
|
||||
|
||||
<P> </P></BLOCKQUOTE>
|
||||
|
||||
<P><!--TOP LINKS-->
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</P>
|
||||
|
||||
<CENTER><TABLE BORDER=2 BGCOLOR="#FFDD88">
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BGCOLOR="#550033" CELLPADDING=5>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><A HREF="../index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>Mail
|
||||
Kit 2 Root</B></FONT></A></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><A HREF="index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>The
|
||||
Public API</B></FONT></A></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
|
||||
<P><!--TOP LINKS--> <!-- Footer for Release 5 HTML Be Book --><BR>
|
||||
</P>
|
||||
|
||||
<CENTER><FONT SIZE="+3" COLOR="#555555"><I>Mail Daemon 2 API
|
||||
Documentation</I></FONT>
|
||||
|
||||
<P><FONT SIZE="+1" COLOR="#555555"><I>©2001 Dr. Zoidberg
|
||||
Enterprises</I></FONT></P></CENTER>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,950 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>MailMessage</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" LINK="#2222AA" BACKGROUND="../art/bodyBack.gif">
|
||||
<P><A NAME=BCursor></A> <!--TOP LINKS--></P>
|
||||
|
||||
<CENTER><TABLE BORDER=2 BGCOLOR="#FFDD88">
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BGCOLOR="#550033" CELLPADDING=5>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><A HREF="../index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>Mail
|
||||
Kit 2 Root</B></FONT></A></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><A HREF="index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>The
|
||||
Public API</B></FONT></A></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</CENTER>
|
||||
|
||||
<P><!--TOP LINKS--></P>
|
||||
|
||||
<H1><FONT SIZE="+4">MailMessage</FONT></H1>
|
||||
|
||||
<BLOCKQUOTE><FONT FACE="helvetica"><B>Derived
|
||||
from:</B></FONT> <A HREF="MailComponent.html">MailComponent</A><BR>
|
||||
<FONT FACE="helvetica"><B>Declared in:</B></FONT>
|
||||
include/public/MailMessage.h<BR>
|
||||
<FONT FACE="helvetica"><B>Library:</B></FONT> libmail.so<BR>
|
||||
|
||||
<P><BR>
|
||||
</P>
|
||||
|
||||
<P>MailMessage is what you use if you are interested in actually
|
||||
sending messages. It allows you to add an arbitrary number of
|
||||
components (naturally making it multipart only if there is more
|
||||
than one), and provides many convenience functions for adding, modifying
|
||||
and accessing both headers and data. If you use this kit, you will get to
|
||||
know MailMessage very well.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</P>
|
||||
|
||||
<H2><FONT SIZE="+3" COLOR="#430000">C</FONT><FONT COLOR="#430000">onstructor
|
||||
and
|
||||
</FONT><FONT SIZE="+3" COLOR="#430000">D</FONT><FONT COLOR="#430000">estructor</FONT></H2>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=MailMessage></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">MailMessage() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><FONT SIZE="+1"><B><TT>MailMessage(</TT></B></FONT>
|
||||
BPositionIO *<FONT FACE="HELVETICA" COLOR="#991122"><I>mail_file</I></FONT> = <B>NULL</B>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Creates a new MailMessage. If <FONT FACE="HELVETICA" COLOR="#991122"><I>mail_file</I></FONT> is not <B>NULL</B>,
|
||||
the MailMessage will be instantiated to the RFC 822 format data contained
|
||||
in <FONT FACE="HELVETICA" COLOR="#991122"><I>mail_file</I></FONT>.</P>
|
||||
|
||||
<P> </P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME="~MailMessage"></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">~MailMessage() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual
|
||||
<FONT SIZE="+1"><B><TT>~MailMessage()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Destroys the message, frees internal buffers, and deletes all added
|
||||
components.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</P>
|
||||
|
||||
<H2><FONT SIZE="+3" COLOR="#430000">M</FONT><FONT COLOR="#430000">ember
|
||||
</FONT><FONT SIZE="+3" COLOR="#430000">F</FONT><FONT COLOR="#430000">unctions</FONT></H2>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=To></A>
|
||||
<A NAME=From></A>
|
||||
<A NAME=ReplyTo></A>
|
||||
<A NAME=CC></A>
|
||||
<A NAME=Subject></A>
|
||||
<A NAME=Priority></A>
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">To (), From (), ReplyTo (), CC (), Subject (), Priority ()</FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>const char *
|
||||
<FONT SIZE="+1"><B><TT>To()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>const char *
|
||||
<FONT SIZE="+1"><B><TT>From()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>const char *
|
||||
<FONT SIZE="+1"><B><TT>ReplyTo()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>const char *
|
||||
<FONT SIZE="+1"><B><TT>CC()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>const char *
|
||||
<FONT SIZE="+1"><B><TT>Subject()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>int
|
||||
<FONT SIZE="+1"><B><TT>Priority()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns the relevant header field from the message. These are simply a convenience. <CODE>Subject()</CODE>,
|
||||
for instance, is equivalent to, and implemented as, <CODE>HeaderField("Subject")</CODE>. There is
|
||||
no <CODE>BCC()</CODE> function because, for obvious reasons, it is impossible to retrieve BCCs from the message.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=SetTo></A>
|
||||
<A NAME=SetFrom></A>
|
||||
<A NAME=SetReplyTo></A>
|
||||
<A NAME=SetCC></A>
|
||||
<A NAME=SetSubject></A>
|
||||
<A NAME=SetPriority></A>
|
||||
<TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">SetTo (), SetFrom (), SetReplyTo (), SetCC (), SetBCC (), SetSubject (), SetPriority ()</FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetTo(</TT></B></FONT>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>to</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetFrom(</TT></B></FONT>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>to</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetReplyTo(</TT></B></FONT>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>to</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetCC(</TT></B></FONT>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>to</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetBCC(</TT></B></FONT>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>to</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetSubject(</TT></B></FONT>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>to</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetPriority(</TT></B></FONT>
|
||||
int <FONT FACE="HELVETICA" COLOR="#991122"><I>to</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns the relevant header field of the message. With the exception of
|
||||
<TT>SetBCC()</TT>, these are simply conveniences which can be easily emulated
|
||||
with <A HREF="MailComponent.html#SetHeaderField">SetHeaderField()</A>.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=SendViaAccount></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">SendViaAccount () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SendViaAccount(</TT></B></FONT>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>account_name</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SendViaAccount(</TT></B></FONT>
|
||||
int32 <FONT FACE="HELVETICA" COLOR="#991122"><I>chain_id</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Sets the message up so that it is sent via the account specified by either <FONT FACE="HELVETICA" COLOR="#991122"><I>account_name</I></FONT>
|
||||
or <FONT FACE="HELVETICA" COLOR="#991122"><I>chain_id</I></FONT>, which of course must exist as an outbound chain (see
|
||||
<A HREF="MailChain.html#ChainDirection">MailChain::ChainDirection()</A> for details). Automatically calls <A HREF="#SetFrom">SetFrom()</A> with
|
||||
the return address indicated in the specified chain using the format "Real Name" <e-mail>.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=AddComponent></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">AddComponent() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>
|
||||
void <FONT SIZE="+1"><B><TT>AddComponent(</TT></B></FONT>
|
||||
<A HREF="MailComponent.html">MailComponent</A> *<FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Adds <FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT> to this MailMessage. Note that the MailMessage
|
||||
assumes ownership of <FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT>. Thus, you <B>may not</B> delete <FONT FACE="HELVETICA" COLOR="#991122"><I>component</I></FONT>.
|
||||
If you continue to modify to it after calling <TT>AddComponent()</TT>, your changes will be reflected when you
|
||||
call <A HREF="#Render">Render()</A>. <TT>AddComponent()</TT> automatically makes the message multipart if there is
|
||||
more than one component.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=GetComponent></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">GetComponent() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>
|
||||
<A HREF="MailComponent.html">MailComponent</A> * <FONT SIZE="+1"><B><TT>GetComponent(</TT></B></FONT>
|
||||
int32 <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns the component at <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT>.
|
||||
Instantiate()s it if it has not yet been instantiated. Otherwise, returns already instantiated
|
||||
component. Use RTTI or <A HREF="MailComponent.html">MailComponent</A> hooks to do useful things with the returned
|
||||
component.</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<P></BLOCKQUOTE>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=CountComponents></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">CountComponents() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>
|
||||
int32 <FONT SIZE="+1"><B><TT>CountComponents()</TT></B></FONT> const</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns the total number of components in this MailMessage.</P>
|
||||
|
||||
<P> </P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=Attach></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">Attach () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>Attach(</TT></B></FONT>
|
||||
entry_ref *<FONT FACE="HELVETICA" COLOR="#991122"><I>ref</I></FONT>,
|
||||
bool <FONT FACE="HELVETICA" COLOR="#991122"><I>include_attributes</I></FONT> = <B>true</B>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Attaches <FONT FACE="HELVETICA" COLOR="#991122"><I>ref</I></FONT> to this message. If <FONT FACE="HELVETICA" COLOR="#991122"><I>include_attributes</I></FONT>
|
||||
is <B>true</B>, uses an <A HREF="AttributedMailAttachment.html">AttributedMailAttachment</A>
|
||||
instead of a <A HREF="SimpleMailAttachment.html">SimpleMailAttachment</A>. Be aware that is
|
||||
attached in the state it is in when the message is rendered, not when <TT>Attach()</TT> is
|
||||
called.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=IsComponentAttachment></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">IsComponentAttachment () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>bool
|
||||
<FONT SIZE="+1"><B><TT>IsComponentAttachment(</TT></B></FONT>
|
||||
int32 <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>If the component at <FONT FACE="HELVETICA" COLOR="#991122"><I>index</I></FONT> is an attachment of any
|
||||
kind, returns <B>true</B>, otherwise returns <B>false</B>.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=SetBodyTextTo></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">SetBodyTextTo () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetBodyTextTo(</TT></B></FONT>const
|
||||
char *<FONT FACE="HELVETICA" COLOR="#991122"><I>text</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Sets the body of this message to the UTF8 string
|
||||
contained in <FONT FACE="HELVETICA" COLOR="#991122"><I>text</I></FONT>.
|
||||
If no body has been specified through <A HREF="#SetBody">SetBody()</A>,
|
||||
<TT>SetBodyTextTo()</TT> creates one.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=BodyText></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">BodyText () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>const char *
|
||||
<FONT SIZE="+1"><B><TT>BodyText()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns the contents of <A HREF="#Body">Body()</A> as a UTF8
|
||||
string. Returns <B>NULL</B> if no body exists.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
<A NAME=SetBody></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">SetBody () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>status_t
|
||||
<FONT SIZE="+1"><B><TT>SetBody(</TT></B></FONT>
|
||||
<A HREF="PlainTextBodyComponent.html">PlainTextBodyComponent</A> *<FONT FACE="HELVETICA" COLOR="#991122"><I>body</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Sets the body of this message to <FONT FACE="HELVETICA" COLOR="#991122"><I>body</I></FONT>.
|
||||
If a body has already been specified, <TT>SetBody()</TT> returns <B>B_ERROR</B>, otherwise
|
||||
returns <B>B_OK</B>.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=Body></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">Body () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><A HREF="PlainTextBodyComponent.html">PlainTextBodyComponent</A> *
|
||||
<FONT SIZE="+1"><B><TT>Body()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns the body as a <A HREF="PlainTextBodyComponent.html">PlainTextBodyComponent</A> pointer.
|
||||
Returns <B>NULL</B> if no body exists. This object belongs to the MailMessage, do <I>not</I> delete it.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
<HR>
|
||||
|
||||
<A NAME=Instantiate></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">Instantiate () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>Instantiate(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>,
|
||||
size_t <FONT FACE="HELVETICA" COLOR="#991122"><I>length</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Initializes this message to the RFC 822 format data in
|
||||
<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>,
|
||||
starting at <FONT FACE="HELVETICA" COLOR="#991122"><I>data
|
||||
</I></FONT>->Position(), for up to <FONT FACE="HELVETICA" COLOR="#991122"><I>length
|
||||
</I></FONT>bytes.</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.
|
||||
|
||||
<P>- <B>B_BAD_TYPE</B> if <FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT FACE="HELVETICA">
|
||||
</FONT>does not seem to be an e-mail message.</P></BLOCKQUOTE></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=Render></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">Render () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>Render(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Renders the message into RFC 822 format and places the result
|
||||
in <FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>,
|
||||
starting at <FONT FACE="HELVETICA" COLOR="#991122"><I>data
|
||||
</I></FONT>->Position(). If <FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>
|
||||
is a BFile, writes appropriate attributes and sets its MIME type to text/x-email.</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.</BLOCKQUOTE>
|
||||
|
||||
<P></TABLE></P></BLOCKQUOTE>
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=RenderTo></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">RenderTo () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>status_t
|
||||
<FONT SIZE="+1"><B><TT>RenderTo(</TT></B></FONT>BDirectory
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>dir</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Creates a new file in <FONT FACE="HELVETICA" COLOR="#991122"><I>dir</I></FONT>, named according to
|
||||
the following format: "Subject" <To> <I>unique indentifier</I>. Calls
|
||||
<A HREF="#Render">Render()</A> on the resulting file and writes appropriate attributes.</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.</BLOCKQUOTE>
|
||||
|
||||
<P></TABLE></P></BLOCKQUOTE>
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=Send></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">Send () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>status_t
|
||||
<FONT SIZE="+1"><B><TT>Send(</TT></B></FONT>bool
|
||||
<FONT FACE="HELVETICA" COLOR="#991122"><I>send_now</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Calls <A HREF="#RenderTo">RenderTo()</A> with the directory specified by the <A HREF="MailChain.html">MailChain</A>
|
||||
passed to <A HREF="#SendViaAccount">SendViaAccount()</A>. If that is invalid, it uses the default outbound chain
|
||||
given by <A HREF="MailSettings.html#DefaultOutboundChainID">MailSettings::DefaultOutboundChainID()</A>. After
|
||||
rendering the message, if <FONT FACE="HELVETICA" COLOR="#991122"><I>send_now</I></FONT> is <B>true</B>,
|
||||
calls <A HREF="MailDaemon.html#SendQueuedMail">MailDaemon::SendQueuedMail()</A>.</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.<P>
|
||||
- <B>B_MAIL_NO_DAEMON</B> if the mail daemon is not running.<P>
|
||||
- something else if there is another error.</BLOCKQUOTE>
|
||||
|
||||
<P></TABLE></P></BLOCKQUOTE>
|
||||
<P><!--TOP LINKS-->
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</P>
|
||||
|
||||
<CENTER><TABLE BORDER=2 BGCOLOR="#FFDD88">
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BGCOLOR="#550033" CELLPADDING=5>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><A HREF="../index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>Mail
|
||||
Kit 2 Root</B></FONT></A></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><A HREF="index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>The
|
||||
Public API</B></FONT></A></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
|
||||
<P><!--TOP LINKS--> <!-- Footer for Release 5 HTML Be Book --><BR>
|
||||
</P>
|
||||
|
||||
<CENTER><FONT SIZE="+3" COLOR="#555555"><I>Mail Daemon 2 API
|
||||
Documentation</I></FONT>
|
||||
|
||||
<P><FONT SIZE="+1" COLOR="#555555"><I>©2001 Dr. Zoidberg
|
||||
Enterprises</I></FONT></P></CENTER>
|
||||
</BODY>
|
||||
</HTML>
|
||||
@@ -0,0 +1,614 @@
|
||||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE>PlainTextBodyComponent</TITLE>
|
||||
</HEAD>
|
||||
<BODY BGCOLOR="#FFFFFF" LINK="#2222AA" BACKGROUND="../art/bodyBack.gif">
|
||||
<P><A NAME=BCursor></A> <!--TOP LINKS--></P>
|
||||
|
||||
<CENTER><TABLE BORDER=2 BGCOLOR="#FFDD88">
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BGCOLOR="#550033" CELLPADDING=5>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><A HREF="../index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>Mail
|
||||
Kit 2 Root</B></FONT></A></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><A HREF="index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>The
|
||||
Public API</B></FONT></A></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</CENTER>
|
||||
|
||||
<P><!--TOP LINKS--></P>
|
||||
|
||||
<H1><FONT SIZE="+4">PlainTextBodyComponent</FONT></H1>
|
||||
|
||||
<BLOCKQUOTE><FONT FACE="helvetica"><B>Derived
|
||||
from:</B></FONT> <A HREF="MailComponent.html">MailComponent</A><BR>
|
||||
<FONT FACE="helvetica"><B>Declared in:</B></FONT>
|
||||
include/public/MailComponent.h<BR>
|
||||
<FONT FACE="helvetica"><B>Library:</B></FONT> libmail.so<BR>
|
||||
|
||||
<P><BR>
|
||||
</P>
|
||||
|
||||
<P>PlainTextBodyComponent stores plain text. It uses UTF8 text as
|
||||
its canonical format and reads and writes RFC 2047 style text. As
|
||||
such, it handles accents and other 8 bit characters with ease. If
|
||||
you want to send text, this is the way to go.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</P>
|
||||
|
||||
<H2><FONT SIZE="+3" COLOR="#430000">C</FONT><FONT COLOR="#430000">onstructor
|
||||
and
|
||||
</FONT><FONT SIZE="+3" COLOR="#430000">D</FONT><FONT COLOR="#430000">estructor</FONT></H2>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=PlainTextBodyComponent></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">PlainTextBodyComponent() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><FONT SIZE="+1"><B><TT>PlainTextBodyComponent(</TT></B></FONT>const
|
||||
char*<FONT FACE="HELVETICA" COLOR="#991122"><I>text</I></FONT>
|
||||
=
|
||||
<B>NULL</B><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Initializes the component and sets its content to <FONT FACE="HELVETICA" COLOR="#991122"><I>text</I></FONT>,
|
||||
which can be NULL. The argument is a UTF8 null-terminated string.
|
||||
Encoding defaults to quoted printable with the ISO-8859-1
|
||||
charset.</P>
|
||||
|
||||
<P> </P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME="~PlainTextBodyComponent"></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">~PlainTextBodyComponent() </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual
|
||||
<FONT SIZE="+1"><B><TT>~PlainTextBodyComponent()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Destroys the component and frees internal buffers. Does nothing
|
||||
of interest.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</P>
|
||||
|
||||
<H2><FONT SIZE="+3" COLOR="#430000">M</FONT><FONT COLOR="#430000">ember
|
||||
</FONT><FONT SIZE="+3" COLOR="#430000">F</FONT><FONT COLOR="#430000">unctions</FONT></H2>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=GetDecodedData></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">GetDecodedData () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>GetDecodedData(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Retrieves the data contained in this component as a UTF8 string
|
||||
and places the contents of this string in<FONT FACE="HELVETICA" COLOR="#991122"><I>
|
||||
data</I></FONT>.</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.
|
||||
|
||||
<P>- <B>B_ERROR<I> </I></B>if something goes wrong.</P></BLOCKQUOTE></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=Text></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">Text () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>const char *
|
||||
<FONT SIZE="+1"><B><TT>Text()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns the contents of this component as a UTF8
|
||||
string.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=BStringText></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">BStringText () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>BString *
|
||||
<FONT SIZE="+1"><B><TT>BStringText()</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Returns the internal UTF8 format BString used by this component.
|
||||
As such, you can do raw text operations on the content of the message. The use of
|
||||
this function is not reccomended.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=Quote></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">Quote () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>Quote(</TT></B></FONT>
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>message</I></FONT> = <B>NULL</B>,
|
||||
const char *<FONT FACE="HELVETICA" COLOR="#991122"><I>quote_style</I></FONT> = <B>"> "</B>
|
||||
<FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Quotes the contents of this component. Inserts <FONT FACE="HELVETICA" COLOR="#991122"><I>quote_style</I></FONT> at the start of every line,
|
||||
and prefaces the content with <FONT FACE="HELVETICA" COLOR="#991122"><I>message</I></FONT>, if it is not NULL. <FONT FACE="HELVETICA" COLOR="#991122"><I>message</I></FONT>
|
||||
should be something like "On September 30, 2001, John Smith said:", or something in that vein. Note that the new line after <FONT FACE="HELVETICA" COLOR="#991122"><I>message</I></FONT>
|
||||
is supplied for you, so you do not need to add it.</P>
|
||||
|
||||
</BLOCKQUOTE>
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=SetDecodedData></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">SetDecodedData () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>SetDecodedData(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Sets the contents of this component to the UTF8 format data
|
||||
contained in <FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>.</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.
|
||||
|
||||
<P>- <B>B_ERROR<I> </I></B>if something goes wrong.</P></BLOCKQUOTE></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=SetText></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">SetText () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetText(</TT></B></FONT>const
|
||||
char *<FONT FACE="HELVETICA" COLOR="#991122"><I>text</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Sets the contents of this component to the UTF8 string
|
||||
contained in <FONT FACE="HELVETICA" COLOR="#991122"><I>text</I></FONT>.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=AppendText></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">AppendText () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>AppendText(</TT></B></FONT>const
|
||||
char *<FONT FACE="HELVETICA" COLOR="#991122"><I>text</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Appends <FONT FACE="HELVETICA" COLOR="#991122"><I>text
|
||||
</I></FONT>to the current contents of this component. <FONT FACE="HELVETICA" COLOR="#991122"><I>text</I></FONT>
|
||||
should be a UTF8 string.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=AppendText></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">SetEncoding () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>void
|
||||
<FONT SIZE="+1"><B><TT>SetEncoding(</TT></B></FONT>mail_encoding
|
||||
<FONT FACE="HELVETICA" COLOR="#991122"><I>encoding</I></FONT>,
|
||||
int32 <FONT FACE="HELVETICA" COLOR="#991122"><I>charset</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Sets the encoding and charset used by <A HREF="#Render"><B>Render()</B></A>
|
||||
to <FONT FACE="HELVETICA" COLOR="#991122"><I>encoding</I></FONT>
|
||||
and <FONT FACE="HELVETICA" COLOR="#991122"><I>charset</I></FONT>,
|
||||
respectively. Use the conversion constants from <B>UTF8.h</B> for
|
||||
<FONT FACE="HELVETICA" COLOR="#991122"><I>charset</I></FONT>. We
|
||||
<I>strongly</I> reccomend that you always use the defaults for the
|
||||
reasons outlined in <A HREF="http://www.faqs.org/rfcs/rfc2047.html">RFC
|
||||
2047</A>.</P></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=Instantiate></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">Instantiate () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>Instantiate(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>,
|
||||
size_t <FONT FACE="HELVETICA" COLOR="#991122"><I>length</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Initializes this component to the RFC 822 format data in
|
||||
<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>,
|
||||
starting at <FONT FACE="HELVETICA" COLOR="#991122"><I>data
|
||||
</I></FONT>->Position(), for up to <FONT FACE="HELVETICA" COLOR="#991122"><I>length
|
||||
</I></FONT>bytes. Handles encoded data according to RFC 2047</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.
|
||||
|
||||
<P>- <B>B_BAD_TYPE</B> if <FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT FACE="HELVETICA">
|
||||
</FONT>does not seem to be plain text.</P></BLOCKQUOTE></BLOCKQUOTE>
|
||||
|
||||
<P>
|
||||
|
||||
<HR>
|
||||
|
||||
<A NAME=Render></A><TABLE>
|
||||
<TR>
|
||||
<TD>
|
||||
<P></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><FONT SIZE="+2">Render () </FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
|
||||
<P> </P>
|
||||
|
||||
<BLOCKQUOTE><TABLE BORDER=2 BGCOLOR="#550033" WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BORDER=1 BGCOLOR="#FFFFFF" CELLPADDING=8 WIDTH=1000>
|
||||
<TR>
|
||||
<TD>
|
||||
<P>virtual status_t
|
||||
<FONT SIZE="+1"><B><TT>Render(</TT></B></FONT>BPositionIO
|
||||
*<FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT><FONT SIZE="+1"><B><TT>)</TT></B></FONT></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
|
||||
<P>Renders the component into RFC 822 format and places the result
|
||||
in <FONT FACE="HELVETICA" COLOR="#991122"><I>data</I></FONT>,
|
||||
starting at <FONT FACE="HELVETICA" COLOR="#991122"><I>data
|
||||
</I></FONT>->Position(). Encodes and translates charsets
|
||||
according to the arguments passed to <A HREF="#SetEncoding"><B>SetEncoding()</B></A>.
|
||||
Encoding defaults to quoted printable and charset to
|
||||
ISO-8859-1.</P>
|
||||
|
||||
<P><B>Return Value:</B></P>
|
||||
|
||||
<BLOCKQUOTE>- <B>B_OK</B> if everything succeeds.</BLOCKQUOTE>
|
||||
|
||||
<P></TABLE></P></BLOCKQUOTE>
|
||||
|
||||
<P><!--TOP LINKS-->
|
||||
|
||||
<HR NOSHADE>
|
||||
|
||||
</P>
|
||||
|
||||
<CENTER><TABLE BORDER=2 BGCOLOR="#FFDD88">
|
||||
<TR>
|
||||
<TD>
|
||||
<P><TABLE BGCOLOR="#550033" CELLPADDING=5>
|
||||
<TR>
|
||||
<TD>
|
||||
<P><A HREF="../index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>Mail
|
||||
Kit 2 Root</B></FONT></A></P>
|
||||
</TD>
|
||||
<TD>
|
||||
<P><A HREF="index.html"><FONT FACE="HELVETICA" COLOR="#FFFFFF"><B>The
|
||||
Public API</B></FONT></A></P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</P>
|
||||
</TD>
|
||||
</TR>
|
||||
</TABLE>
|
||||
</CENTER>
|
||||
|
||||
<P><!--TOP LINKS--> <!-- Footer for Release 5 HTML Be Book --><BR>
|
||||
</P>
|
||||
|
||||
<CENTER><FONT SIZE="+3" COLOR="#555555"><I>Mail Daemon 2 API
|
||||
Documentation</I></FONT>
|
||||
|
||||
<P><FONT SIZE="+1" COLOR="#555555"><I>©2001 Dr. Zoidberg
|
||||
Enterprises</I></FONT></P></CENTER>
|
||||
</BODY>
|
||||
</HTML>
|
||||
Reference in New Issue
Block a user