tfMimeSrcFunc

Jump to: navigation, search

Table of Contents >> Optional Protocols >> MIME


#include <trsocket.h>


ttMimeSrcFunc tfMimeSrcFunc (
ttUserCharPtr partIdPtr,
ttUser32BitPtr positionPtr,
ttUserCharPtr bufferPtr,
int bufferLen
);


Function Description

Function type for the user-provided call back to provide the source of a part. The user function should get a buffer <= bufferLen, copy into the buffer pointed by bufferPtr, and return the actual length copied.


Parameters

  • partIdPtr
    An identification string for the call back function to identify part sources. For example, the full path to a file.
  • positionPtr
    A position pointer to assist the call back function in remembering the current source location. The user can store and retrieve values here. The value stored at this position is initialized to be zero, and reset to zero when tfMimeReset() is called.
  • bufferPtr
    A pointer to the buffer to store the source of the part in.
  • bufferLen
    The length of the buffer pointed to by bufferPtr.


Returns

  • >0
    Length of the coded data.
  • 0
    All input data has been processed.
  • <0
    Invalid input parameter.


Table of Contents >> Optional Protocols >> MIME