Table of Contents
This appendix lists the functions that will be deprecated in current and future versions of Traffic Server.
The following MIME field functions are deprecated in the current SDK version.
Copies a MIME field from one location to another.
void INKMimeFieldCopy (INKMBuffer
dest_bufp
, INKMLoc
dest_offset
, INKMBuffer
src_bufp
, INKMLoc
src_offset
)
Copies the contents of the MIME field located at
within the
marshal buffer src_offset
to the MIME field located at
src_bufp
within the
marshal buffer
dest_offset
.
dest_bufp
INKMimeFieldCopy
works correctly even if
and
src_bufp
point to
different marshal buffers.dest_bufp
Note | |
---|---|
You must first create the destination MIME field before you copy into it. |
Copies MIME field values from one location to another.
void INKMimeFieldCopyValues (INKMBuffer
dest_bufp
, INKMLoc
dest_offset
, INKMBuffer
src_bufp
, INKMLoc
src_offset
)
Copies the values contained within the MIME field located
at
within the
marshal buffer src_offset
to the MIME field located at
src_bufp
within the
marshal buffer
dest_offset
.
dest_bufp
INKMimeFieldCopyValues
works correctly even
if
and
src_bufp
point to
different marshal buffers.
dest_bufp
INKMIMEFieldCopyValues
does not copy the
field’s name.
Creates a new MIME field within a specified marshal buffer.
INKMLoc INKMimeFieldCreate (INKMBuffer
bufp
)
Creates a new MIME field with the marshal buffer
. Returns the offset
location of the new MIME field.bufp
Release the created INKMLoc
with a
call to INKHandleMLocRelease
.
Deletes a specified MIME field from a marshal buffer.
void INKMimeFieldDestroy (INKMBuffer
bufp
,INKMLoc
offset
)
Destroys the MIME field located at
within the
marshal buffer
offset
.bufp
Release the handle with a call to
INKHandleMLocRelease
.
Calculates the length of a string representation of a specified MIME field.
int INKMimeFieldLengthGet (INKMBuffer
bufp
,INKMLoc
offset
)
Calculates the length of the MIME field located at
within the
marshal buffer offset
if
it was returned as a string. This is the length of the MIME
field in its unparsed form.bufp
Gets the name and length of a specified MIME field.
const char* INKMimeFieldNameGet (INKMBuffer
bufp
,INKMLoc
offset
, int
*length
)
Returns the name of the field located at
within the
marshal buffer offset
.
bufp
INKMimeFieldNameGet
places the length of
the returned string in the
argument. If
length
is
length
NULL
then no attempt is made to de-reference
it.
Release the returned string with a call to
INKHandleStringRelease
.
Sets a specified MIME field’s name.
void INKMimeFieldNameSet (INKMBuffer
bufp
,INKMLoc
offset
, const char
*name
, int
length
)
Sets the name of the field located at
within the
marshal buffer offset
to
the string bufp
. If
name
is -1, then
length
INKMimeFieldNameSet
assumes that name is
null-terminated. Otherwise, the length of the string name is
taken to be
.
length
INKMimeFieldNameSet
copies the string to
within
, so it is
okay to modify or delete
bufp
after calling
name
INKMimeFieldNameSet
.
Returns the next MIME field after a specified MIME field in a MIME header.
INKMLoc INKMimeFieldNext (INKMBuffer
bufp
,INKMLoc offset)
Conceptually, there are a list of MIME fields in a MIME
header (see About HTTP Headers).
INKMimeFieldNext
returns the location of
the next field in the list after the field located at
within the
marshal buffer
offset
.bufp
Release the returned INKMLoc
with a
call to INKHandleMLocRelease
.
Appends a string to a specified value in a MIME field.
INKMLoc INKMimeFieldNext (INKMBuffer
bufp
,INKMLoc
offset
)
Conceptually, there are a list of MIME fields in a MIME
header (see About HTTP Headers).
INKMimeFieldNext
returns the location of
the next field in the list after the field located at
within the
marshal buffer
offset
.bufp
Release the returned INKMLoc
with a
call to INKHandleMLocRelease
.
Deletes a specified value from a MIME field.
void INKMimeFieldValueDelete (INKMBuffer
bufp
,INKMLoc
offset
, int
idx
)
Removes and deletes a value from the MIME field located at
within the
marshal buffer offset
. The
bufp
parameter specifies
which value should be deleted. If
idx
is not between 0 and
idx
INKMimeFieldValuesCount
(bufp,
offset
) - 1, then no operation will be
performed.
Gets a specified field value from a MIME header.
const char* INKMimeFieldValueGet (INKMBuffer
bufp
, INKMLoc
offset
, int
idx
, int
*length
)
Retrieves a string value from within the MIME field
located at
within
the marshal buffer offset
.
The bufp
parameter
specifies which field to retrieve. The fields are numbered from
0 to idx
INKMimeFieldValuesCount
(
) - 1. If
bufp, offset
does not lie within
that range, then idx
NULL
will be returned. The length
of the returned string is placed in the
argument. If
length
is
length
NULL,
then no attempt is made to dereference
it.
Release the returned string with a call to
INKHandleStringRelease
.
Gets date value from a MIME field.
time_t INKMimeFieldValueGetDate (INKMBuffer
bufp
, INKMLoc
offset
, int
idx
)
Retrieves a date value from within the MIME field located
at
within the
marshal buffer offset
. The
bufp
parameter specifies
which field to retrieve. The fields are numbered from 0 to
idx
INKMimeFieldValuesCount
(
) - 1. If
bufp, offset
does not lie within
that range, thrn idx
INKMimeFieldValueGetDate
returns (time_t
) 0. All values are stored as
strings within the MIME field.
INKMimeFieldValueGetDate
parses the string
value to return an integer date representation.
Gets an integer field value in a MIME field.
int INKMimeFieldValueGetInt (INKMBuffer
bufp
, INKMLoc
offset
, int
idx
)
Retrieves an integer value from within the MIME field
located at
within
the marshal buffer offset
.
The bufp
parameter
specifies which value within the field to retrieve. The fields
are numbered from 0 to
idx
INKMimeFieldValuesCount
(
) - 1. If
bufp, offset
does not lie within
that range, then idx
INKMimeFieldValueGetInt
returns
(int
) 0. All values are stored as strings within
the MIME field. INKMimeFieldValueGetInt
parses the string value to return an integer.
Gets unsigned integer field value in a MIME field.
unsigned int INKMimeFieldValueGetUint (INKMBuffer
bufp
, INKMLoc
offset
, int
idx
)
Retrieves an unsigned integer value from within the MIME
field located at
within the marshal buffer
offset
. The
bufp
parameter specifies
which field to retrieve. The fields are numbered from 0 to
idx
INKMimeFieldValuesCount
(
) - 1. If
bufp, offset
does not lie within
that range, then idx
INKMimeFieldValueGetUnit
returns (unsigned int
) 0. All values are stored as
strings within the MIME field.
INKMimeFieldValueGetUint
parses the string
value to return an unsigned integer.
Inserts a date value into a MIME field.
INKMLoc INKMimeFieldValueInsertDate (INKMBuffer
bufp
,INKMLoc
offset
, time_t
value
, int
idx
)
Inserts the date
into the MIME
field located at value
within the marshal buffer
offset
. The
bufp
parameter specifies
where the inserted idx
should be put with respect to the other values already in the
MIME field. If value
is 0,
then the idx
is
prepended to the list of values in the field. Increasing values
of value
places the
idx
further down the
list of values. If value
is -1, then the idx
is
appended to the list of values. Normal usage is to specify -1
for value
so that the
idx
is appended to the
list of values. All values are stored as strings within the MIME
field. value
INKMimeFieldValueInsertDate
simply
formats the date into a string and then calls
INKMimeFieldValueInsert
.
Release the returned INKMLoc
with a
call to INKHandleMLocRelease
.
Inserts an integer value into a MIME field.
INKMLoc INKMimeFieldValueInsertInt (INKMBuffer
bufp
,INKMLoc
offset
, int
value
, int
idx
)
Inserts the integer
into the MIME
field located at value
within the marshal buffer
offset
. The
bufp
parameter specifies
where the inserted idx
should be put with respect to the other values already in the
MIME field. If value
is 0,
then the idx
is
prepended to the list of values in the field. Increasing values
of value
places the
idx
further down the
list of values. If value
is -1, then the idx
is
appended to the list of values. Normal usage is to specify -1
for value
so that the
idx
is appended to the
list of values. All values are stored as strings within the MIME
field. value
INKMimeFieldValueInsertInt
simply
formats the integer into a string and then calls
INKMimeFieldValueInsert
.
Release the returned INKMLoc
with a
call to INKHandleMLocRelease
.
Inserts an unsigned integer value into a MIME field.
INKMLoc INKMimeFieldValueInsertUint (INKMBuffer
bufp
,INKMLoc
offset
, unsigned int
value
, int
idx
)
Inserts the unsigned integer
into the MIME
field located at value
within the marshal buffer
offset
. The
bufp
parameter specifies
where the inserted idx
should be put with respect to the other values already in the
MIME field. If value
is 0,
then the idx
will be
prepended to the list of values in the field. Increasing values
of value
will place the
idx
further down the
list of values. If value
is -1, then the idx
will be appended to the list of values. Normal usage is to
specify -1 for value
so
that the idx
will be
appended to the list of values. All values are stored as strings
within the MIME field.
value
INKMimeFieldValueInsertUint
simply formats
the unsigned integer into a string and then calls
INKMimeFieldValueInsert
.
Release the returned INKMLoc
with a
call to INKHandleMLocRelease
.
Clears all values in a MIME field.
void INKMimeFieldValuesClear (INKMBuffer
bufp
, INKMLoc
offset
)
Removes and destroys all of the values within the MIME
field located at
within the marshal buffer
offset
.bufp
Counts the values in a MIME field.
int INKMimeFieldValuesCount (INKMBuffer
bufp
, INKMLoc
offset
)
Returns a count of the number of values in the MIME field
located at
within
the marshal buffer
offset
.bufp
Sets a value in a MIME field.
void INKMimeFieldValueSet (INKMBuffer
bufp
, INKMLoc
offset
, int
idx
, const char
*value
, int
length
)
Sets a value in the MIME field located at
within the
marshal buffer offset
to
the string bufp
. If
value
is -1, then it is
assumed that length
is
null-terminated. Otherwise, the length of the string
value
is taken to be
value
. The string is
copied to within length
,
so it is okay to modify or delete
bufp
after calling
value
INKMimeFieldValueSet
. The
parameter specifies
which value in the field to change. If
idx
is not between 0 and
idx
INKMimeFieldValuesCount
(
) - 1, then
no operation will be performed.bufp, offset
Sets a date value in a MIME field.
void INKMimeFieldValueSetDate (INKMBuffer
bufp
,INKMLoc
offset
, int
idx
, time_t
value
)
Sets a value in the MIME field located at
within the
marshal buffer offset
to
the data bufp
value
. The
parameter specifies
which value in the field to change. If
idx
is not between 0 and
idx
INKMimeFieldValuesCount
(
) - 1 then
no operation will be performed. All values are stored as strings
within the MIME field.
bufp, offset
INKMimeFieldValueSetDate
simply formats the
date into a string and then calls
INKMimeFieldValueSet
.
Traffic Server 3.0
Sets an integer value in a MIME field.
void INKMimeFieldValueSetInt (INKMBuffer
bufp
,INKMLoc
offset
, int
idx
, int
value
)
Sets a value in the MIME field located at
within the
marshal buffer offset
to
the integer bufp
. The
value
parameter specifies
which value in the field to change. If
idx
is not between 0 and
idx
INKMimeFieldValuesCount
(
) - 1, then
no operation will be performed. All values are stored as strings
within the MIME field.
bufp, offset
INKMimeFieldValueSetInt
simply formats the
integer into a string and then calls
INKMimeFieldValueSet
.
Sets an unsigned integer value in a MIME field.
void INKMimeFieldValueSetUint (INKMBuffer
bufp
,INKMLoc
offset
, int
idx
, unsigned int
value
)
Sets a value in the MIME field located at
within the
marshal buffer offset
to
the unsigned integer
bufp
. The
value
parameter specifies
which value in the field to change. If
idx
is not between 0 and
idx
INKMimeFieldValuesCount
(
) - 1, then
no operation will be performed. All values are stored as strings
within the MIME field.
bufp, offset
INKMimeFieldValueSetUint
simply formats the
unsigned integer into a string and then calls
INKMimeFieldValueSet
.
Gets a specified field value from a MIME header.
const char* INKMimeHdrFieldValueGet (INKMBuffer
bufp
, INKMLoc
hdr_loc
, INKMLoc
field
, int
idx
, int
*value_len_ptr
)
Retrieves a string value from within the MIME field
located at
within
the marshal buffer field
.
The bufp
parameter
specifies which field to retrieve. The fields are numbered from
0 to idx
INKMimeHdrFieldValuesCount
(
) - 1.
If bufp, hdr, field
does not lie
within that range then idx
NULL
will be returned. The
length of the returned string is placed in the
argument.
If value_len_ptr
is
value_len_ptr
NULL
, then no attempt is made to dereference
it.
This API has been deprecated by
INKMimeHdrFieldValueStringGet
.
A pointer to the specified field value in the MIME header.
Release with a call to
INKHandleStringRelease
.
Gets date value from a MIME field.
time_t INKMimeHdrFieldValueGetDate (INKMBuffer
bufp
, INKMLoc
hdr
, INKMLoc
field
, int
idx
)
Retrieves a date value from within the MIME field located
at
within the
marshal buffer field
. The
bufp
parameter specifies
which field to retrieve. The fields are numbered from 0 to
idx
INKMimeHdrFieldValuesCount
(
) -1.
If bufp, hdr, field
does not lie
within that range,
then idx
INKMimeHdrFieldValueGetDate
returns
(time_t
) 0. All values are stored as strings within
the MIME field. INKMimeHdrFieldValueGetDate
parses the string value to return an integer date
representation.
This API has been deprecated by
INKMimeHdrFieldValueDateGet
.
The date value from the specified MIME header.
Gets an integer field value in a MIME field.
int INKMimeHdrFieldValueGetInt (INKMBuffer
bufp
, INKMLoc
hdr
, INKMLoc
field
, int
idx
, int
*value_len-ptr
)
Retrieves an integer value from within the MIME field
located at
within
the marshal buffer field
.
The bufp
parameter
specifies which value within the field to retrieve. The fields
are numbered from 0 to
idx
INKMimeHdrFieldValuesCount
(
) - 1.
If bufp, hdr, field
does not lie
within that range,
then idx
INKMimeHdrFieldValueGetInt
returns
(int
) 0. All values are stored as strings within
the MIME field. INKMimeHdrFieldValueGetInt
parses the string value to return an integer.
This API has been deprecated by
INKMimeHdrFieldValueIntGet
.
The interger value from the specified MIME field.
Gets unsigned integer field value in a MIME field.
unsigned int INKMimeHdrFieldValueGetUInt (INKMBuffer
bufp
, INKMLoc
hdr
, INKMLoc
field
, int
idx
)
Retrieves an unsigned integer value from within the MIME
field located at
within the marshal buffer
field
. The
bufp
parameter specifies
which field to retrieve. The fields are numbered from 0 to
idx
INKMimeHdrFieldValuesCount
(
) - 1.
If bufp, hdr, field
does not lie
within that range,
then idx
INKMimeHdrFieldValueGetUnit
returns
(unsigned int
) 0. All values are stored as strings
within the MIME field.
INKMimeHdrFieldValueGetUInt
parses the
string value to return an unsigned integer.
It is not possible to determine if
INKMimeHdrFieldValueGetUInt
is returning an
unsigned int value in error. If you need to check for errors in
MIME header field values, you can fetch the header as a string
and examine it. Here is some sample code that fetches MIME
headers from marshal buffers into strings using
INKMimeHdrFieldValueGet
instead. The
context of this example is that the plugin is processing an HTTP
transaction and has access to a transaction.
This API has been deprecated by
INKMimeHdrFieldValueUIntGet
.
The unsigned integer value from the specified MIME field.
static void handle_string (INKHttpTxn txnp, INKCont contp) { INKMBuffer bufp; INKMLoc hdr_loc; INKMLoc field; int len; char* output_string; const char* value; /* Fetch the transaction's client request header into a marshal buffer. */ if (!INKHttpTxnClientReqGet (txnp, &bufp, &hdr_loc)) { INKError ("couldn't retrieve client request header\n"); goto done; } field=INKMimeHdrFieldRetrieve(bufp, hdr_loc, INK_MIME_FIELD_CONTENT_LENGTH); if (!field) { INKError ("Content-Length field not found.\n"); INKHandleMLocRelease (bufp, INK_NULL_MLOC, hdr_loc); goto done; } /* Obtain the value of the content length (normally an * unsigned int) as a string. */ value=INKMimeHdrFieldValueGet (bufp, hdr_loc, field, 0, &len); if ((!value) || (len<=0))} INKHandleMLocRelease (bufp, hdr_loc, field); INKHandleMLocRelease (bufp, INK_NULL_MLOC, hdr_loc); goto done; } /* Allocate the string with an extra byte for the string terminator. */ output_string = (char*) INKmalloc(len + 1); /* Copy the value. */ strncpy (output_string, value, len); /* Terminate the string */ output_string[len] = '\0'; /* Now that you have the MIME fields as a string, you can do whatever you want to do with it, for example, print it, or make sure it's an unsigned integer: either by using the atol C function or by scanning each ASCII character. */ INKDebug("my-plugin", "%s", output_string); /* Release handles and allocated memory. */ INKHandleStringRelease (bufp, field, value);
Inserts a value into a specified location within a MIME field.
INKMLoc INKMimeHdrFieldValueInsert (INKMBuffer
bufp
, INKMLoc
hdr
, INKMLoc
field
, const char
*value
, int
length
, int
idx
)
Inserts the string
into the MIME
field located at value
within the marshal buffer
field
. If
bufp
is -1, then
length
INKMimeHdrFieldValueInsert
assumes that
is
null-terminated. Otherwise, the length of the string
value
is taken to be
value
.
INKMimeHdrFieldValueInsert copies the string to within
length
, so it is okay to
modify or delete bufp
after calling value
INKMimeHdrFieldValueSet
. The
parameter specifies
where the inserted idx
should be put with respect to the other values already in the
MIME field. If value
is 0,
then idx
INKMimeHdrFieldValueInsert
prepends
the
to the list of
values in the field. Increasing values of
value
place the
idx
further down the
list of values. If value
is -1, then idx
INKMimeHdrFieldValueInsert
appends
the
to the list of
values. Normal usage is to specify -1 for
value
so that the
idx
is appended to the
list of values.value
This API has been deprecated by
INKMimeHdrFieldValueStringInsert
.
Inserts a date value into a MIME field.
INKMLoc INKMimeHdrFieldValueInsertDate (INKMBuffer
bufp
, INKMLoc
hdr
, INKMLoc
field
, time_t
value
, int
idx
)
Inserts the data
into the MIME
field located at value
within the marshal buffer
field
. The
bufp
parameter specifies
where the inserted idx
should be put with respect to the other values already in the
MIME field. If value
is 0,
then the idx
is
prepended to the list of values in the field. Increasing values
of value
places the
idx
further down the
list of values. If value
is -1, then the idx
is
appended to the list of values. Normal usage is to specify -1
for value
so that the
idx
is appended to the
list of values. All values are stored as strings within the MIME
field. value
INKMimeHdrFieldValueInsertDate
simply formats the date into a string and then calls
INKMimeHdrFieldValueInsert
.
Note | |
---|---|
Do not use the return value
( |
This API has been deprecated by
INKMimeHdrFieldValueDateInsert
.
Inserts an integer value into a MIME field.
INKMLoc INKMimeHdrFieldValueInsertInt (INKMBuffer
bufp
, INKMLoc
hdr
, INKMLoc
field
, int
value
, int
idx
)
Inserts the integer
into the MIME
field located at value
within the marshal buffer
field
. The
bufp
parameter specifies
where the inserted idx
should be put with respect to the other values already in the
MIME field. If value
is 0,
then the idx
is
prepended to the list of values in the field. Increasing values
of value
places the
idx
further down the
list of values. If value
is -1, then the idx
is
appended to the list of values. Normal usage is to specify -1
for value
so that the
idx
is appended to the
list of values. All values are stored as strings within the MIME
field. value
INKMimeHdrFieldValueInsertInt
simply
formats the integer into a string and then calls
INKMimeHdrFieldValueInsert
.
This API has been deprecated by
INKMimeHdrFieldValueIntInsert
.
Inserts an unsigned integer value into a MIME field.
INKMLoc INKMimeHdrFieldValueInsertUInt (INKMBuffer
bufp
, INKMLoc
hdr
, INKMLoc
field
, unsigned int
value
, int
idx
)
Inserts the unsigned integer
into the MIME
field located at value
within the marshal buffer
field
. The
bufp
parameter specifies
where the inserted idx
should be put with respect to the other values already in the
MIME field. If value
is 0
then the idx
will be
prepended to the list of values in the field. Increasing values
of value
will place the
idx
further down the
list of values. If value
is -1, then the idx
will be appended to the list of values. Normal usage is to
specify -1 for value
so
that the idx
will be
appended to the list of values. All values are stored as strings
within the MIME field.
value
INKMimeHdrFieldValueInsertUInt
simply
formats the unsigned integer into a string and then calls
INKMimeHdrFieldValueInsert
.
This API has been deprecated by
INKMimeHdrFieldValueUIntInsert
.
Sets a value in a MIME field.
void INKMimeHdrFieldValueSet (INKMBuffer
bufp
, INKMLoc
hdr
, INKMLoc
field
, int
idx
, const char
*value
, int
length
)
Sets a value in the MIME field located at
within the marshal
buffer field
to the
string bufp
. If
value
is -1, then it is
assumed that length
is
null-terminated. Otherwise, the length of the string
value
is taken to be
value
. The string is
copied to within length
,
so it is okay to modify or delete
bufp
after calling
value
INKMimeHdrFieldValueSet
. The
parameter specifies
which value in the field to change. If
idx
is not between 0 and
idx
INKMimeHdrFieldValuesCount
(
) - 1,
then no operation will be performed.bufp, hdr, field
This API has been deprecated by
INKMimeHdrFieldValueStringSet
.
Sets a date value in a MIME field.
void INKMimeHdrFieldValueSetDate (INKMBuffer
bufp
, INKMLoc
hdr
, INKMLoc
field
, int
idx
, time_t
value
)
Sets a value in the MIME field located at
within the marshal
buffer field
to the date
bufp
. The
value
parameter specifies
which value in the field to change. If the
idx
is not between 0 and
idx
INKMimeHdrFieldValuesCount
(
) -1,
then no operation will be performed. All values are stored as
strings within the MIME field.
bufp, hdr, field
INKMimeHdrFieldValueSetDate
simply formats
the date into a string and then calls
INKMimeHdrFieldValueSet
.
Sets an integer value within a MIME field.
void INKMimeHdrFieldValueSetInt (INKMBuffer
bufp
, INKMLoc
hdr
, INKMLoc
field
, int
idx
, int
value
)
Sets a value in the MIME field located at
within the marshal
buffer field
to the
integer bufp
. The
value
parameter specifies
which value in the field to change. If
idx
is not between 0 and
idx
INKMimeHdrFieldValuesCount
(
) - 1,
then no operation will be performed. All values are stored as
strings within the MIME field.
bufp, hdr, field
INKMimeHdrFieldValueSetInt
simply formats
the integer into a string and then calls
INKMimeHdrFieldValueSet
.
This API has been deprecated by
INKMimeHdrFieldValueIntSet
.
Sets a value in a MIME field to a specified unsigned integer.
void INKMimeHdrFieldValueSetUInt (INKMBuffer
bufp
, INKMLoc
hdr
, INKMLoc
field
, int
idx
, unsigned int
value
)
Sets a value in the MIME field located at
within the marshal
buffer field
to the
unsigned integer bufp
.
The value
parameter
specifies which value in the field to change. If
idx
is not between 0 and
idx
INKMimeHdrFieldValuesCount
(
) - 1,
then no operation will be performed. All values are stored as
strings within the MIME field.
bufp, hdr, field
INKMimeHdrFieldValueSetUInt
simply formats
the unsigned integer into a string and then calls
INKMimeHdrFieldValueSet
.
This API has been deprecated by
INKMimeHdrFieldValueUIntSet
.
Destroys a MIME header field.
void INKMimeHdrFieldDelete (INKMBuffer
bufp
, INKMLoc
hdr_loc
, INKMLoc
field
)
Deletes the MIME field located at
within the MIME
header located at
field
in the marshal
buffer hdr_loc
.bufp
Make sure you release the INKMLoc
handle field with a call to
INKHandleMLocRelease
.
This API has been deprecated by
INKMimeHdrFieldDestroy
.
Appends a field in a MIME header.
void INKMimeHdrFieldInsert (INKMBuffer
bufp
, INKMLoc
hdr_loc
, INKMLoc
field
, int
idx
)
Appends the MIME field located at
within the marshal
buffer field
into the
MIME header located at
bufp
within the
marshal buffer hdr_loc
. The
bufp
idx
parameter specifies where the inserted field
should be put with respect to the other fields already in the
MIME header.
This API has been deprecated by
INKMimeHdrFieldAppend
Retrieves a MIME header field.
INKMLoc INKMimeHdrFieldRetrieve (INKMBuffer
bufp
, INKMLoc
hdr_loc
, const char*
*retrieved_str
)
Retrieves a MIME field from within the MIME header located
at
within the
marshal buffer hdr_loc
. The
bufp
parameter
specifies which field to retrieve. For each MIME field in the
MIME header, a pointer comparison is done between the field name
and retrieved_str
. This
is a much quicker retrieval function than
retrieved_str
INKMimeHdrFieldFind
, since it obviates the
need for a string comparision. However,
must be
one of the predefined field names listed above (of the form
retrieved_str
INK_MIME_FIELD_XXX
) in order for the call to succeed. If the
requested field cannot be found, then 0 is returned.
Release with a call to
INKHandleMLocRelease
.
This API has been deprecated by
INKMimeHdrFieldFind
.