mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +00:00
Further parser improvements.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8139 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
cc89366d9f
commit
54721ac752
4 changed files with 309 additions and 423 deletions
|
@ -32,6 +32,37 @@
|
|||
</desc>
|
||||
</method>
|
||||
|
||||
<method type="BOOL">
|
||||
<sel>decodeData:</sel>
|
||||
<arg type="NSData*">sourceData</arg>
|
||||
<sel>fromRange:</sel>
|
||||
<arg type="NSRange">aRange</arg>
|
||||
<sel>intoData:</sel>
|
||||
<arg type="NSMutableData*">destinationData</arg>
|
||||
<sel>withContext:</sel>
|
||||
<arg type="GSMimeEncodingContext*">ctxt</arg>
|
||||
<desc>
|
||||
<p>
|
||||
Decodes the raw data from the specified range in the source
|
||||
data object and appends it to the destination data object.
|
||||
The context object provides information about the content
|
||||
encoding type in use, and the state of the decoding operation.
|
||||
</p>
|
||||
<p>
|
||||
This method may be called repeatedly to incrementally decode
|
||||
information as it arrives on some communications channel.
|
||||
It should be called with a nil source data item (or with
|
||||
the atEnd flag of the context set to YES) in order to flush
|
||||
any information held in the context to the output data
|
||||
object.
|
||||
</p>
|
||||
<p>
|
||||
You may override this method in order to implement
|
||||
additional coding schemes.
|
||||
</p>
|
||||
</desc>
|
||||
</method>
|
||||
|
||||
<method type="GSMimeDocument*">
|
||||
<sel>document</sel>
|
||||
<desc>
|
||||
|
|
|
@ -35,13 +35,14 @@
|
|||
<h2>Methods </h2>
|
||||
<ul>
|
||||
<li><a href ="GSMimeParser.html#method-0">+mimeParser</a>
|
||||
<li><a href ="GSMimeParser.html#method-1">-document</a>
|
||||
<li><a href ="GSMimeParser.html#method-2">-parse:</a>
|
||||
<li><a href ="GSMimeParser.html#method-3">-parseHeader:</a>
|
||||
<li><a href ="GSMimeParser.html#method-4">-parsingHeaders</a>
|
||||
<li><a href ="GSMimeParser.html#method-5">-scanHeader:named:inTo:</a>
|
||||
<li><a href ="GSMimeParser.html#method-6">-scanSpecial:</a>
|
||||
<li><a href ="GSMimeParser.html#method-7">-scanToken:</a>
|
||||
<li><a href ="GSMimeParser.html#method-1">-decodeData:fromRange:intoData:withContext:</a>
|
||||
<li><a href ="GSMimeParser.html#method-2">-document</a>
|
||||
<li><a href ="GSMimeParser.html#method-3">-parse:</a>
|
||||
<li><a href ="GSMimeParser.html#method-4">-parseHeader:</a>
|
||||
<li><a href ="GSMimeParser.html#method-5">-parsingHeaders</a>
|
||||
<li><a href ="GSMimeParser.html#method-6">-scanHeader:named:inTo:</a>
|
||||
<li><a href ="GSMimeParser.html#method-7">-scanSpecial:</a>
|
||||
<li><a href ="GSMimeParser.html#method-8">-scanToken:</a>
|
||||
</ul>
|
||||
<hr><h2>Class Methods </h2>
|
||||
<h3><a name ="method-0">mimeParser</a></h3>
|
||||
|
@ -51,13 +52,42 @@
|
|||
|
||||
<hr>
|
||||
<hr><h2>Instances Methods </h2>
|
||||
<h3><a name ="method-1">document</a></h3>
|
||||
<h3><a name ="method-1">decodeData:fromRange:intoData:withContext:</a></h3>
|
||||
- (BOOL) <b>decodeData:</b> (NSData*)sourceData <b>fromRange:</b> (NSRange)aRange <b>intoData:</b> (NSMutableData*)destinationData <b>withContext:</b> (GSMimeEncodingContext*)ctxt;<br>
|
||||
|
||||
<p>
|
||||
|
||||
Decodes the raw data from the specified range in the source
|
||||
data object and appends it to the destination data object.
|
||||
The context object provides information about the content
|
||||
encoding type in use, and the state of the decoding operation.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
This method may be called repeatedly to incrementally decode
|
||||
information as it arrives on some communications channel.
|
||||
It should be called with a nil source data item (or with
|
||||
the atEnd flag of the context set to YES) in order to flush
|
||||
any information held in the context to the output data
|
||||
object.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
|
||||
You may override this method in order to implement
|
||||
additional coding schemes.
|
||||
</p>
|
||||
|
||||
|
||||
<hr>
|
||||
<h3><a name ="method-2">document</a></h3>
|
||||
- (GSMimeDocument*) <b>document</b>;<br>
|
||||
|
||||
Returns the object into which raw mime data is being parsed.
|
||||
|
||||
<hr>
|
||||
<h3><a name ="method-2">parse:</a></h3>
|
||||
<h3><a name ="method-3">parse:</a></h3>
|
||||
- (BOOL) <b>parse:</b> (NSData*)rawData;<br>
|
||||
|
||||
This method is called repeatedly to pass raw mime data into
|
||||
|
@ -66,7 +96,7 @@
|
|||
all the available information.
|
||||
|
||||
<hr>
|
||||
<h3><a name ="method-3">parseHeader:</a></h3>
|
||||
<h3><a name ="method-4">parseHeader:</a></h3>
|
||||
- (BOOL) <b>parseHeader:</b> (NSString*)aRawHeader;<br>
|
||||
|
||||
<p>
|
||||
|
@ -93,7 +123,7 @@
|
|||
|
||||
|
||||
<hr>
|
||||
<h3><a name ="method-4">parsingHeaders</a></h3>
|
||||
<h3><a name ="method-5">parsingHeaders</a></h3>
|
||||
- (BOOL) <b>parsingHeaders</b>;<br>
|
||||
|
||||
Returns YES if the parser is expecting to read mime headers,
|
||||
|
@ -102,7 +132,7 @@
|
|||
trhe mime message (or has been passed all data).
|
||||
|
||||
<hr>
|
||||
<h3><a name ="method-5">scanHeader:named:inTo:</a></h3>
|
||||
<h3><a name ="method-6">scanHeader:named:inTo:</a></h3>
|
||||
- (BOOL) <b>scanHeader:</b> (NSScanner*)aScanner <b>named:</b> (NSString*)aName <b>inTo:</b> (NSMutableDictionary*)info;<br>
|
||||
|
||||
<p>
|
||||
|
@ -133,7 +163,7 @@
|
|||
|
||||
|
||||
<hr>
|
||||
<h3><a name ="method-6">scanSpecial:</a></h3>
|
||||
<h3><a name ="method-7">scanSpecial:</a></h3>
|
||||
- (NSString*) <b>scanSpecial:</b> (NSScanner*)aScanner;<br>
|
||||
|
||||
A convenience method to use a scanner (that is set up to scan a
|
||||
|
@ -143,7 +173,7 @@
|
|||
will contain a single space character.
|
||||
|
||||
<hr>
|
||||
<h3><a name ="method-7">scanToken:</a></h3>
|
||||
<h3><a name ="method-8">scanToken:</a></h3>
|
||||
- (NSString*) <b>scanToken:</b> (NSScanner*)aScanner;<br>
|
||||
|
||||
A convenience method to use a scanner (that is set up to scan a
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue