Main Page | File List | Globals

puri.h File Reference

#include <NewTypes.h>

Go to the source code of this file.

Functions

UInt16 UriHandlerLimit ()
Err UriHandlerNames (Char *uri, Char ***handler_names)
Err UriHandlingPanel ()
Err UriSend (Char *uri, UInt16 handler)
Err UriSendByName (Char *uri, Char *handler_name)
Err UriSendEncoded (Char *data)


Detailed Description

Copyright (C) 2003 Craig Rindy

This file is part of Puri.

Puri is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Puri is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Puri; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Source
/cvsroot/puri/lib/puri.h,v
Revision
1.2
Name
puri-lib-1_0_0b1
Date
2003/07/21 01:09:55

Function Documentation

UInt16 UriHandlerLimit  ) 
 

Get the global limit of the number of handlers per scheme.

Returns:
number of handlers allowed per scheme

Err UriHandlerNames Char *  uri,
Char ***  handler_names
 

Get the names of the handlers defined in Puri for a given scheme.

The necessary memory for handler_names will be allocated for the caller; it is the caller's responsibility to free the memory when it is no longer needed. All handler names will be given, even blank ones which will be null strings, not null pointers.

Parameters:
uri string containing the scheme or a URI with the scheme
handler_names pointer to an array of strings (handler names)
Returns:
zero if successful; otherwise, non-zero

Err UriHandlingPanel  ) 
 

Switch to the Puri panel which will have a Done button to return.

The sysAppLaunchCmdPanelCalledFromApp launch code is used; the calling application should expect to be launched with sysAppLaunchCmdReturnFromPanel when the user clicks the Done button.

Returns:
zero if successful; otherwise, non-zero

Err UriSend Char *  uri,
UInt16  handler
 

Send the given URI to the given handler defined in Puri.

Parameters:
uri the URI string
handler zero-based integer identifying which handler to launch
Returns:
zero if successful; otherwise, non-zero

Err UriSendByName Char *  uri,
Char *  handler_name
 

Send the given URI to the given handler defined in Puri.

Parameters:
uri the URI string
handler_name string containing the name of the handler to launch
Returns:
zero if successful; otherwise, non-zero

Err UriSendEncoded Char *  data  ) 
 

Send the given URI to the given handler defined in Puri.

The data argument is an array of bytes containing (optionally a zero-based integer identifying the handler to launch and) the URI string. If the caller passes just a URI string, then the default handler (i.e., handler 0) is launched and passed the URI string. If the first byte of data contains a character whose value is less than 32, then that value is used to identify the handler to be launched, and the remainder of the data argument (from the second byte on) is the URI string passed. Note that the system may have a handler limit which is less than 32, so be careful not to send an invalid handler in the first byte. UriSend or UriSendByName should be used instead under most circumstances.

Parameters:
data string of data (see details)
Returns:
zero if successful; otherwise, non-zero


Generated on Mon Jul 21 01:32:28 2003 for Puri Library by doxygen 1.3.2