home *** CD-ROM | disk | FTP | other *** search
/ back2roots/padua / padua.7z / padua / ftp.vapor.com / voyager / voyager-sdk.lzx / vpluginapi.doc < prev    next >
Encoding:
Text File  |  2000-04-15  |  25.1 KB  |  856 lines

  1. TABLE OF CONTENTS
  2.  
  3. VPLUG/--background--
  4. VPLUG/VPLUG_Cleanup
  5. VPLUG/VPLUG_FinalSetup
  6. VPLUG/VPLUG_FreeURLData
  7. VPLUG/VPLUG_GetClass
  8. VPLUG/VPLUG_GetInfo
  9. VPLUG/VPLUG_GetURLData
  10. VPLUG/VPLUG_GetURLDataSize
  11. VPLUG/VPLUG_GetURLMIMEType
  12. VPLUG/VPLUG_Hook_Prefs
  13. VPLUG/VPLUG_ProcessURLMethod
  14. VPLUG/VPLUG_Query
  15. VPLUG/VPLUG_Setup
  16. PLFUNC/vplug_net_abort
  17. PLFUNC/vplug_net_close
  18. PLFUNC/vplug_net_colorspec2rgb
  19. PLFUNC/vplug_net_domethoda
  20. PLFUNC/vplug_net_errorstring
  21. PLFUNC/vplug_net_getdoclen
  22. PLFUNC/vplug_net_getdocmem
  23. PLFUNC/vplug_net_getdocptr
  24. PLFUNC/vplug_net_lockdocmem
  25. PLFUNC/vplug_net_mergeurl
  26. PLFUNC/vplug_net_mimetype
  27. PLFUNC/vplug_net_openurl
  28. PLFUNC/vplug_net_redirecturl
  29. PLFUNC/vplug_net_settofile
  30. PLFUNC/vplug_net_settomem
  31. PLFUNC/vplug_net_seturl
  32. PLFUNC/vplug_net_state
  33. PLFUNC/vplug_net_unlockdocmem
  34. PLFUNC/vplug_net_url
  35. VPLUG/--background--
  36.  
  37.     PURPOSE
  38.         A V│ plugin is a shared library. When V starts it scans the plugins
  39.         directory and OpenLibrary()s every #?.VPlug it finds.
  40.  
  41.         Do not put a 500KB plugin there or you would waste memory for nothing.
  42.         You can use another library or a module you load from your plugin when
  43.         needed.
  44.  
  45.     OVERVIEW
  46.         Whenever V encounters an <EMBED> tag in a HTML page or when an URL
  47.         matches a particular filename extension (from API 3), V will
  48.         NewObject()s the plugin.
  49.  
  50.         Check the MUI documentation to find out more about MUI custom classes
  51.         and how they work.
  52.  
  53.         There are 2 kind of calls described in this doc. The VPLUG calls are
  54.         within your plugin so it means that those are library function calls
  55.         in your plugins and that the meaning of INPUT and RESULT is reversed.
  56.         V gives you INPUT and *you* give back RESULT.
  57.  
  58.         The PLFUNC calls are made from your plugin into a function table
  59.         handled by V. You can call those functions once you get a pointer to
  60.         this table.
  61.  
  62. VPLUG/VPLUG_Cleanup                                      VPLUG/VPLUG_Cleanup
  63.  
  64.     NAME
  65.         VPLUG_Cleanup -- called before the plugin is unloaded (V2)
  66.  
  67.     SYNOPSIS
  68.         VPLUG_Cleanup()
  69.  
  70.         void VPLUG_Cleanup(void);
  71.  
  72.     FUNCTION
  73.         V calls upon this function when your plugin is about to be unloaded.
  74.  
  75.     SEE ALSO
  76.         VPLUG_Setup(), VPLUG_FinalSetup()
  77.  
  78. VPLUG/VPLUG_FinalSetup                                VPLUG/VPLUG_FinalSetup
  79.  
  80.     NAME
  81.         VPLUG_FinalSetup -- called when all the plugins are loaded (V2)
  82.  
  83.     SYNOPSIS
  84.         VPLUG_Setup()
  85.  
  86.         void VPLUG_Setup(void);
  87.  
  88.     FUNCTION
  89.         This function is called upon when all the plugins are loaded and got
  90.         their VPLUG_Setup() call.
  91.  
  92.     SEE ALSO
  93.         VPLUG_Setup(), VPLUG_Cleanup()
  94.  
  95. VPLUG/VPLUG_FreeURLData                              VPLUG/VPLUG_FreeURLData
  96.  
  97.     NAME
  98.         VPLUG_FreeURLData -- free the data allocated by VPLUG_GetURLData
  99.  
  100.     SYNOPSIS
  101.         VPLUG_FreeURLData(handle)
  102.                           A0
  103.  
  104.         void VPLUG_FreeURLData(APTR);
  105.  
  106.     FUNCTION
  107.         After using VPLUG_GetURLData(), V calls upon this function. You can
  108.         release the memory you allocated for the data there.
  109.  
  110.     INPUT
  111.         handle - your own handle given to VPLUG_ProcessURLMethod()
  112.  
  113.     SEE ALSO
  114.         VPLUG_GetURLData()
  115.  
  116. VPLUG/VPLUG_GetClass                                    VPLUG/VPLUG_GetClass
  117.  
  118.     NAME
  119.         VPLUG_GetClass -- get a pointer to the plugin's class (V2)
  120.  
  121.     SYNOPSIS
  122.         class = VPLUG_GetClass(mimetype)
  123.         D0                     A0
  124.  
  125.         APTR VPLUG_GetClass(STRPTR);
  126.  
  127.     FUNCTION
  128.         If you specified the VPLUG_Query_RegisterMIMEType or
  129.         VPLUG_Query_RegisterMIMEExtension in VPLUG_Query(), you should return
  130.         your class (subclass of Area.mui !) there so that V will be able to
  131.         NewObject() the plugin.
  132.  
  133.     INPUT
  134.         mimetype - string containing the mimetype
  135.  
  136.     RESULT
  137.         class - your object's class or NULL if there's a failure
  138.  
  139.     SEE ALSO
  140.         VPLUG_Query()
  141.  
  142. VPLUG/VPLUG_GetInfo                                      VPLUG/VPLUG_GetInfo
  143.  
  144.     NAME
  145.         VPLUG_GetInfo -- get some infos before NewObject()ing the plugin (V3)
  146.  
  147.     SYNOPSIS
  148.         retval = VPLUG_GetInfo(vpi, nethandle)
  149.         D0                     A0   A1
  150.  
  151.         BOOL VPLUG_GetInfo(struct VPlugInfo *, APTR);
  152.  
  153.     FUNCTION
  154.         Before displaying a plugin which has been found by the
  155.         VPLUG_Query_RegisterMIMEExtension tag passed in VPLUG_Query(), V will
  156.         call upon VPLUG_GetInfo() to allow the plugin to adapt itself to the
  157.         size that will be used for rendering. The plugin can also modify the
  158.         size if needed and V will adjust its display area accordingly. See the
  159.         header file for a description of the VPlugInfo structure.
  160.  
  161.     INPUT
  162.         vpi - VPlugInfo structure. You can change its fields if you need to.
  163.               They are properly setup by V.
  164.  
  165.         nethandle - pointer to a net handle
  166.  
  167.     RESULT
  168.         retval - TRUE or FALSE if you don't want V to NewObject() your plugin
  169.  
  170.     SEE ALSO
  171.         VPLUG_Query()
  172.  
  173. VPLUG/VPLUG_GetURLData                                VPLUG/VPLUG_GetURLData
  174.  
  175.     NAME
  176.         VPLUG_GetURLData -- return data handled by an URL method
  177.  
  178.     SYNOPSIS
  179.         data = VPLUG_GetURLData(handle)
  180.         D0                      A0
  181.  
  182.         APTR VPLUG_GetURLData(APTR);
  183.  
  184.     FUNCTION
  185.         After setting up an URL method, you need to return some data to V so
  186.         that it can handle it.
  187.  
  188.     INPUT
  189.         handle - private handle given to VPLUG_ProcessURLMethod()
  190.  
  191.     RESULT
  192.         data - the data built by the plugin that V will display or NULL if
  193.                there was a failure
  194.  
  195.     SEE ALSO
  196.         VPLUG_GetURLDataSize(), VPLUG_GetURLMIMEType(), VPLUG_FreeURLData()
  197.  
  198. VPLUG/VPLUG_GetURLDataSize                        VPLUG/VPLUG_GetURLDataSize
  199.  
  200.     NAME
  201.         VPLUG_GetURLDataSize -- set the size of the data generated by the
  202.         plugin and returned with VPLUG_GetURLData if your data is not simple
  203.         text (V3)
  204.  
  205.     SYNOPSIS
  206.         size = VPLUG_GetURLDataSize(handle)
  207.         D0                          A0
  208.  
  209.         int VPLUG_GetURLDataSize(APTR);
  210.  
  211.     FUNCTION
  212.         If your plugin doesn't return simple text, you have to specify the
  213.         size of the data returned by VPLUG_GetURLData(). Otherwise, V will
  214.         assume text and do a strlen() on it. You need to specify the
  215.         VPLUG_Query_HasURLMethodGetSize tag in VPLUG_Query().
  216.  
  217.     INPUT
  218.         handle - private handle gived to VPLUG_ProcessURLMethod()
  219.  
  220.     RESULT
  221.         size - the size of your data or -1 if there was a failure
  222.  
  223.     SEE ALSO
  224.         VPLUG_GetURLData(), VPLUG_Query()
  225.  
  226. VPLUG/VPLUG_GetURLMIMEType                        VPLUG/VPLUG_GetURLMIMEType
  227.  
  228.     NAME
  229.         VPLUG_GetURLMIMEType(handle) -- return a mime type used by an URL
  230.         handler
  231.  
  232.     SYNOPSIS
  233.         mimetype = VPLUG_GetURLMIMEType(handle)
  234.         A0                              A0
  235.  
  236.         STRPTR VPLUG_GetURLMIMEType(APTR);
  237.  
  238.     FUNCTION
  239.         V calls upon this function to find out the mimetype of the data
  240.         returned by the plugin. Return a string describing the mimetype or
  241.         NULL if you don't care. V uses a default of "text/html".
  242.  
  243.     INPUT
  244.         handle - your own handle
  245.  
  246.     SEE ALSO
  247.         VPLUG_GetURLData()
  248.  
  249. VPLUG/VPLUG_Hook_Prefs                                VPLUG/VPLUG_Hook_Prefs
  250.  
  251.     NAME
  252.         VPLUG_Hook_Prefs -- preference callback hook (V2)
  253.  
  254.     SYNOPSIS
  255.         VPLUG_Hook_Prefs(methodid, prefs)
  256.                          D0        A0
  257.  
  258.         void VPLUG_Hook_Prefs(ULONG, struct vplug_prefs);
  259.  
  260.     FUNCTION
  261.         If you set that VPLUG_Query_HasPrefs tag to TRUE in VPLUG_Query(), V
  262.         will call upon this function when it needs to handle preference
  263.         related stuffs.
  264.  
  265.     INPUT
  266.         methodid - an ID containing one of the following method:
  267.  
  268.             VPLUGPREFS_Setup
  269.                 This method is sent once directly after VPLUG_Setup() (or
  270.                 VPLUG_FinalSetup() if you have it). This is a good place
  271.                 initialize your prefs stuffs like putting default prefs. It's
  272.                 also the place where you can optionally setup some parts of
  273.                 the vplug_prefs structure althought they're only required
  274.                 between VPLUGPREFS_Create and VPLUGPREFS_Dispose.
  275.  
  276.             VPLUGPREFS_Cleanup
  277.                 Called once before VPLUG_Cleanup().
  278.  
  279.             VPLUGPREFS_Create
  280.                 Create your prefs object here and put it into prefs->object.
  281.                 You don't need to check for success. V will do that for you
  282.                 and send a VPLUGPREFS_Dispose if anything went wrong.
  283.                 Don't forget to make sure your prefs object is resizeable in
  284.                 all directions or you'll annoy your user.
  285.  
  286.             VPLUGPREFS_Dispose
  287.                 There you can dispose your prefs object. Although you're not
  288.                 forced to do it and can still use VPLUGPREFS_Cleanup for that,
  289.                 doing it there will save memory as the object will be
  290.                 disposed when it is not visible.
  291.  
  292.             VPLUGPREFS_Use
  293.                 This method is sent when the user wants the changes to take
  294.                 effect.
  295.  
  296.             VPLUGPREFS_Load
  297.                 There you can load preferences stored from the disk. This
  298.                 method is sent after VPLUGPREFS_Setup and your prefs object is
  299.                 not yet valid.
  300.  
  301.             VPLUGPREFS_Save
  302.                 This method is sent when the user wants to save the settings
  303.                 permanently. Remember to not use your prefs object for that
  304.                 as it might not be valid. Suggested place to store your prefs
  305.                 is in 'PROGDIR:Plugins/Data' with the name of your plugin and
  306.                 the extension '.data' appended to it.
  307.  
  308.         prefs - vplug_prefs structure you can fill in. If you don't set it, V
  309.                 will use defaults.
  310.  
  311.  
  312.     SEE ALSO
  313.         VPLUG_Setup(), VPLUG_Cleanup()
  314.  
  315. VPLUG/VPLUG_ProcessURLMethod                    VPLUG/VPLUG_ProcessURLMethod
  316.  
  317.     NAME
  318.         VPLUG_ProcessURLMethod -- handle an URL method
  319.  
  320.     SYNOPSIS
  321.         handle = VPLUG_ProcessURLMethod(url)
  322.         D0                              A0
  323.  
  324.         APTR VPLUG_ProcessURLMethod(STRPTR);
  325.  
  326.     FUNCTION
  327.         This function is used to handle a certain URL method. You need to
  328.         specify the VPLUG_Query_RegisterURLMethod tag in VPLUG_Query() and V
  329.         will call upon this function. Return an own handle or NULL if there
  330.         was an error. The handle will be used by other functions so keep it !
  331.  
  332.     INPUT
  333.         url - pointer to the complete URL
  334.  
  335.     RESULT
  336.         handle - your own private handle or NULL for failure
  337.  
  338.     SEE ALSO
  339.         VPLUG_Query(), VPLUG_GetURLData(), VPLUG_GetURLDataSize(),
  340.         VPLUG_FreeURLData()
  341.  
  342. VPLUG/VPLUG_Query                                          VPLUG/VPLUG_Query
  343.  
  344.     NAME
  345.         VPLUG_Query -- get information about the plugin's requirements
  346.  
  347.     SYNOPSIS
  348.         tagArray = VPLUG_Query()
  349.         D0
  350.  
  351.         struct TagItem *VPLUG_Query(void);
  352.  
  353.     FUNCTION
  354.         This is where you tell Voyager your requirements and abilities.
  355.         It is the first function you get.
  356.  
  357.     RESULT
  358.         tagArray - an array containing the following tags:
  359.  
  360.             VPLUG_Query_Version (ULONG)
  361.                 The version of your plugin.
  362.  
  363.             VPLUG_Query_Revision (ULONG)
  364.                 The revision of your plugin.
  365.  
  366.             VPLUG_Query_Copyright (STRPTR)
  367.                 A string containing some copyright informations.
  368.  
  369.             VPLUG_Query_Infostring (STRPTR)
  370.                 A generic information string describing your plugin.
  371.  
  372.             VPLUG_Query_APIVersion (ULONG)
  373.                 Specify which version of the API the plugin implements.
  374.                 Currently, version 1 is implemented in Voyager 2.95, V2 is
  375.                 implemented in Voyager 3.0 and V3 is implemented in Voyager
  376.                 3.1. If this tag is not specified it defaults to API 1.
  377.  
  378.             VPLUG_Query_HasPrefs (LONG)
  379.                 Set this tag to TRUE if your plugin implements the
  380.                 VPLUG_Hook_Prefs() function.
  381.  
  382.             VPLUG_Query_PluginID (STRPTR)
  383.                 Plugin identification that will be in the JavaScript
  384.                 navigator.plugins array.
  385.  
  386.             VPLUG_Query_RegisterURLMethod (STRPTR)
  387.                 If a plugin wants to handle a certain URL method (for example
  388.                 "mailto:"), it must specifiy this tag. V will then call upon
  389.                 VPLUG_ProcessURLMethod() for the plugin to return a data
  390.                 stream. V will call upon VPLUG_FreeURLData() later on to free
  391.                 any data allocated in the data stream.
  392.  
  393.             VPLUG_Query_HasURLMethodGetSize (BOOL)
  394.                 Set to TRUE if the plugin implements VPLUG_GetURLDataSize().
  395.                 If not set or if VPLUG_GetURLDataSize returns -1, V will
  396.                 assume the data to be text and do a strlen() on it.
  397.  
  398.             VPLUG_Query_RegisterMIMEType (STRPTR)
  399.                 If the plugin wants to handle a certain MIME type within the
  400.                 HTML <EMBED> tag, it can register a MIME type here. When
  401.                 layouting, V will call VPLUG_GetClass() and expect the plugin
  402.                 to return a pointer to a MUI custom class (subclassed from
  403.                 Area.mui). V will NewObject() an instance of that class and
  404.                 embed that object into the page. Then, the plugin can do
  405.                 anything that a MUI object can do -- getting input, rendering
  406.                 and so on. Together with the OM_NEW, V will pass additional
  407.                 tags to inform the object of the environment, source URL and
  408.                 other stuff. The plugin class can make use of this as it
  409.                 likes.
  410.  
  411.             VPLUG_Query_RegisterMIMEType (STRPTR)
  412.                 This tag works exactly like VPLUG_Query_RegisterMIMEType
  413.                 described above except it allows to handle MIME types by
  414.                 filename extensions each separated by one space, for example
  415.                 "lzx lha zip".
  416.  
  417. VPLUG/VPLUG_Setup                                          VPLUG/VPLUG_Setup
  418.  
  419.     NAME
  420.         VPLUG_Setup -- setup the plugin (V2)
  421.  
  422.     SYNOPSIS
  423.         retval = VPLUG_Setup(table)
  424.         D0                   A0
  425.  
  426.         BOOL VPLUG_Setup(struct vplug_functable);
  427.  
  428.     FUNCTION
  429.         V calls upon this function and gives you a pointer to a callback table
  430.         from where you can call functions.
  431.  
  432.     INPUT
  433.         table = function table from where you can call functions
  434.  
  435.     RESULT
  436.         retval - TRUE or FALSE if you want to abort
  437.  
  438.     SEE ALSO
  439.         VPLUG_Cleanup(), PLFUNC functions
  440.  
  441. PLFUNC/vplug_net_abort                                PLFUNC/vplug_net_abort
  442.  
  443.     NAME
  444.         vplug_net_abort -- abort the loading of data
  445.  
  446.     SYNOPSIS
  447.         vplug_net_abort(nethandle)
  448.                         A0
  449.  
  450.         void vplug_net_abort(APTR);
  451.  
  452.     FUNCTION
  453.         This call aborts the loading of data by a nethandle.
  454.  
  455.     INPUT
  456.         nethandle - a network handle
  457.  
  458.     SEE ALSO
  459.         vplug_net_openurl()
  460.  
  461. PLFUNC/vplug_net_close                                PLFUNC/vplug_net_close
  462.  
  463.     NAME
  464.         vplug_net_close -- close a network handle
  465.  
  466.     SYNOPSIS
  467.         vplug_net_close(nethandle)
  468.                         A0
  469.  
  470.         void vplug_net_close(APTR);
  471.  
  472.     FUNCTION
  473.         This call closes a network handle.
  474.  
  475.     INPUT
  476.         nethandle - a network handle
  477.  
  478.     SEE ALSO
  479.         vplug_net_open()
  480.  
  481. PLFUNC/vplug_net_colorspec2rgb                PLFUNC/vplug_net_colorspec2rgb
  482.  
  483.     NAME
  484.         vplug_net_colorspec2rgb -- converts a color spec to 8-bit RGB values
  485.  
  486.     SYNOPSIS
  487.         vplug_net_colorspec2rgb(colorspec, red, green, blue)
  488.                                 A0         D0   D1     D2
  489.  
  490.         void vplug_net_colorspec2rgb(STRPTR, ULONG, ULONG, ULONG);
  491.  
  492.     FUNCTION
  493.         This call converts a color spec (eg. "#FFFFFF") to 8-bit RGB values.
  494.  
  495.     INPUT
  496.         colorspec - a string with the color spec
  497.         red       - the value for the red component
  498.         green     - the value for the green component
  499.         blue      - the value for the blue component
  500.  
  501.     SEE ALSO
  502.  
  503. PLFUNC/vplug_net_domethoda                        PLFUNC/vplug_net_domethoda
  504.  
  505.     NAME
  506.         vplug_net_domethoda -- executes a MUI method synchronously
  507.  
  508.     SYNOPSIS
  509.         ret = vplug_net_domethoda(obj, msg)
  510.         D0                        A0   A1
  511.  
  512.         int vplug_net_domethoda(APTR, APTR);
  513.  
  514.     FUNCTION
  515.         This call executes a MUI method synchronously. It can safely be called
  516.         from other tasks and will (ab)use yourself->pr_MsgPort.
  517.  
  518.     INPUT
  519.         obj - your MUI object
  520.         msg - your message array
  521.  
  522.     RESULT
  523.         ret - return value
  524.  
  525. PLFUNC/vplug_net_errorstring                    PLFUNC/vplug_net_errorstring
  526.  
  527.     NAME
  528.         vplug_net_errorstring -- return the error when an URL fails
  529.  
  530.     SYNOPSIS
  531.         error = vplug_net_errorstring(nethandle)
  532.         D0                            A0
  533.  
  534.         STRPTR vplug_net_errorstring(APTR);
  535.  
  536.     FUNCTION
  537.         This call returns the error string in case the loading of an URL
  538.         failed.
  539.  
  540.     INPUT
  541.         nethandle - a network handle
  542.  
  543.     RESULT
  544.         error - a string with the error
  545.  
  546.     SEE ALSO
  547.         vplug_net_state()
  548.  
  549. PLFUNC/vplug_net_getdoclen                        PLFUNC/vplug_net_getdoclen
  550.  
  551.     NAME
  552.         vplug_net_getdoclen -- return the length of a document
  553.  
  554.     SYNOPSIS
  555.         size = vplug_net_getdoclen(nethandle)
  556.         DO                         A0
  557.  
  558.         int vplug_net_getdoclen(APTR);
  559.  
  560.     FUNCTION
  561.         This call returns the advertised length of a document.
  562.  
  563.     INPUT
  564.         nethandle - a network handle
  565.  
  566.     RESULT
  567.         size - the length of the document. It'll be -1 if the length is
  568.                unknown (no Content-Length: given by the server for example)
  569.  
  570.     SEE ALSO
  571.         vplug_net_getdocmem(), vplug_net_getdocptr()
  572.  
  573. PLFUNC/vplug_net_getdocmem                        PLFUNC/vplug_net_getdocmem
  574.  
  575.     NAME
  576.         vplug_net_getdocmem -- get a pointer to a data buffer in memory
  577.  
  578.     SYNOPSIS
  579.         buffer = vplug_net_getdocmem(nethandle)
  580.         D0                        A0
  581.  
  582.         APTR vplug_net_getdocmem(APTR);
  583.  
  584.     FUNCTION
  585.         This call returns a pointer to a data buffer in memory. You MUST call
  586.         vplug_net_lockdocmem() before calling it and vplug_net_unlockdocmem()
  587.         after. Remember that the buffer can move anytime when being accessed
  588.         outside those calls.
  589.  
  590.     INPUT
  591.         nethandle - a network handle
  592.  
  593.     RESULT
  594.         buffer - an in-memory data buffer
  595.  
  596.     SEE ALSO
  597.         vplug_net_lockdocmem(), vplug_net_unlockdocmem(),
  598.         vplug_net_getdocptr(), vplug_net_getdoclen()
  599.  
  600. PLFUNC/vplug_net_getdocptr                        PLFUNC/vplug_net_getdocptr
  601.  
  602.     NAME
  603.         vplug_net_getdocptr -- get the size of the data read by a nethandle
  604.  
  605.     SYNOPSIS
  606.         size = vplug_net_getdocptr(nethandle)
  607.         D0                         A0
  608.  
  609.         int vplug_net_getdocptr(APTR);
  610.  
  611.     FUNCTION
  612.         This call returns the size of the data which has been currently read
  613.         by a nethandle.
  614.  
  615.     INPUT
  616.         nethandle - a network handle
  617.  
  618.     RESULT
  619.         size - the data read in bytes
  620.  
  621.     SEE ALSO
  622.         vplug_net_getdocmem(), vplug_net_getdoclen()
  623.  
  624. PLFUNC/vplug_net_lockdocmem                      PLFUNC/vplug_net_lockdocmem
  625.  
  626.     NAME
  627.         vplug_net_lockdocmem -- lock the docmem memory semaphore
  628.  
  629.     SYNOPSIS
  630.         vplug_net_lockdocmem()
  631.  
  632.         void vplug_net_lockdocmem(void);
  633.  
  634.     FUNCTION
  635.         This call locks the docmem memory. You must call it before accessing
  636.         docmem.
  637.  
  638.     SEE ALSO
  639.         vplug_net_getdocptr(), vplug_net_getdoclen()
  640.  
  641. PLFUNC/vplug_net_mergeurl                          PLFUNC/vplug_net_mergeurl
  642.  
  643.     NAME
  644.         vplug_net_mergeurl -- merges a partial URL to a complete URL
  645.  
  646.     SYNOPSIS
  647.         vplug_net_mergeurl(url, partial, dest)
  648.                            A0   A1       A2
  649.  
  650.         void vplug_net_mergeurl(STRPTR, STRPTR, STRPTR);
  651.  
  652.     FUNCTION
  653.         This call merges a partial URL like a path to a complete URL.
  654.  
  655.     INPUT
  656.         url     - a string with the URL
  657.         partial - a string with a partial URL
  658.         dest    - a string which will receive the result
  659.  
  660.     SEE ALSO
  661.  
  662. PLFUNC/vplug_net_mimetype                          PLFUNC/vplug_net_mimetype
  663.  
  664.     NAME
  665.         vplug_net_mimetype -- return the mime type of a nethandle
  666.  
  667.     SYNOPSIS
  668.         mimetype = vplug_net_mimetype(nethandle)
  669.         D0                            A0
  670.  
  671.         STRPTR vplug_net_mimetype(APTR);
  672.  
  673.     FUNCTION
  674.         This call returns the mime type of a nethandle, if available.
  675.  
  676.     INPUT
  677.         nethandle - a network handle
  678.  
  679.     RESULT
  680.         mimetype - a string with the mimetype or NULL if it is not available
  681.  
  682. PLFUNC/vplug_net_openurl                            PLFUNC/vplug_net_openurl
  683.  
  684.     NAME
  685.         vplug_net_openurl -- open an URL data stream
  686.  
  687.     SYNOPSIS
  688.         dataStream = vplug_net_openurl(url, referer, informobj, reload)
  689.                                        A0   A1       A2         D0
  690.  
  691.         APTR vplug_net_openurl(STRPTR, STRPTR, APTR, int);
  692.  
  693.     FUNCTION
  694.         This call tries to open an URL data stream.
  695.  
  696.     INPUT
  697.         url       - a string containing the URL
  698.         referer   - a string with the referer or NULL
  699.         informobj - the object that will receive notification methods
  700.                     (VPLUG_NetStream_GotInfo/Data/Done), usually the plugin
  701.                     object
  702.         reload    - set to TRUE if you want to force a reload of the URL
  703.  
  704. PLFUNC/vplug_net_redirecturl                    PLFUNC/vplug_net_redirecturl
  705.  
  706.     NAME
  707.         vplug_net_redirecturl -- return the redirected URL
  708.  
  709.     SYNOPSIS
  710.         url = vplug_net_redirecturl(nethandle)
  711.         D0                          A0
  712.  
  713.         void vplug_net_redirecturl(APTR);
  714.  
  715.     FUNCTION
  716.         This call returns the redirected URL if there's one.
  717.  
  718.     INPUT
  719.         nethandle - a network handle
  720.  
  721.     RESULT
  722.         url - a string with the redirected URL or NULL if there's none
  723.  
  724.     SEE ALSO
  725.         vplug_net_url()
  726.  
  727. PLFUNC/vplug_net_settofile                        PLFUNC/vplug_net_settofile
  728.  
  729.     NAME
  730.         vplug_net_settofile -- tell the stream to load itself to disk
  731.  
  732.     SYNOPSIS
  733.         vplug_net_settofile(nethandle, filename, resume)
  734.                             A0         A1        D0
  735.  
  736.         void vplug_net_settofile(APTR, STRPTR, int);
  737.  
  738.     FUNCTION
  739.         This call sets the destination of a netstream to a file on disk. You
  740.         have to do that if you want to receive notification methods
  741.         (VPLUG_NetStream_GotInfo/Data/Done).
  742.  
  743.     INPUT
  744.         nethandle - a network handle
  745.         filename  - a string with the path/filename
  746.         resume    - the offset in bytes from where you want to resume or 0
  747.  
  748.     SEE ALSO
  749.         vplug_net_settomem()
  750.  
  751. PLFUNC/vplug_net_settomem                          PLFUNC/vplug_net_settomem
  752.  
  753.     NAME
  754.         vplug_net_settomem -- tell the stream to load itself to memory
  755.  
  756.     SYNOPSIS
  757.         vplug_net_settomem(nethandle)
  758.                            A0
  759.  
  760.         void vplug_net_settomem(APTR);
  761.  
  762.     FUNCTION
  763.         This call sets the destination of a netstream to memory. You have to
  764.         do that if you want to receive notification methods
  765.         (VPLUG_NetStream_GotInfo/Data/Done).
  766.  
  767.     INPUT
  768.         nethandle - a network handle
  769.  
  770.     SEE ALSO
  771.         vplug_net_settofile()
  772.  
  773. PLFUNC/vplug_net_seturl                              PLFUNC/vplug_net_seturl
  774.  
  775.     NAME
  776.         vplug_net_seturl -- set an URL
  777.  
  778.     SYNOPSIS
  779.         vplug_net_seturl(url, target, reload)
  780.                          A0   A1      D0
  781.  
  782.         void vplug_net_seturl(STRPTR, STRPTR, int);
  783.  
  784.     FUNCTION
  785.         This call loads a new URL into V. Note that this call is asynchronous
  786.         and WILL return to the caller even if the embedded object which called
  787.         it should go away due to the URL change.
  788.  
  789.     INPUT
  790.         url    - a string with the URL
  791.         target - a name for a frame target or NULL
  792.         reload - set to TRUE if you want to force a reload of the URL
  793.  
  794. PLFUNC/vplug_net_state                                PLFUNC/vplug_net_state
  795.  
  796.     NAME
  797.         vplug_net_state -- return the state of a network handle
  798.  
  799.     SYNOPSIS
  800.         state = vplug_net_state(nethandle)
  801.         D0                      A0
  802.  
  803.         int vplug_net_state(APTR);
  804.  
  805.     FUNCTION
  806.         This call returns the state of a network handle.
  807.  
  808.     INPUT
  809.         nethandle - a network handle
  810.  
  811.     RESULT
  812.         state - VNS_FAILED     : failed
  813.                 VNS_INPROGRESS : in progress
  814.                 VNS_DONE       : done
  815.  
  816. PLFUNC/vplug_net_unlockdocmem                  PLFUNC/vplug_net_unlockdocmem
  817.  
  818.     NAME
  819.         vplug_net_unlockdocmem -- unlock the docmem memory semaphore
  820.  
  821.     SYNOPSIS
  822.         vplug_net_unlockdocmem()
  823.  
  824.         void vplug_net_unlockdocmem(void);
  825.  
  826.     FUNCTION
  827.         This call unlocks the docmem memory. You must call it once you're done
  828.         with the docmem.
  829.  
  830.     SEE ALSO
  831.         vplug_net_lockdocmem()
  832.  
  833. PLFUNC/vplug_net_url                                    PLFUNC/vplug_net_url
  834.  
  835.     NAME
  836.         vplug_net_url -- return the URL of a nethandle
  837.  
  838.     SYNOPSIS
  839.         url = vplug_net_url(nethandle)
  840.         D0                  A0
  841.  
  842.         void vplug_net_url(APTR);
  843.  
  844.     FUNCTION
  845.         This call returns the URL of a nethandle.
  846.  
  847.     INPUT
  848.         nethandle - a network handle
  849.  
  850.     RESULT
  851.         url - a string with the URL of the nethandle
  852.  
  853.     SEE ALSO
  854.         vplug_net_redirecturl()
  855.  
  856.