API Guide Home (Online version only) |

# FileBrowserLib68K.h File Reference

## Detailed Description

This file contains the FileBrowser Library APIs.

Version:
  1.0

Definition in file FileBrowserLib68K.h.

Go to the source code of this file.

## Defines

- #define FILE_BROWSER_LIB_TRAP(trapNum) SYS_TRAP(trapNum)

## Functions

- Err FileBrowserLibOpen (UInt16 refNum) FILE_BROWSER_LIB_TRAP(sysLibTrapOpen)
- Err FileBrowserLibClose (UInt16 refNum) FILE_BROWSER_LIB_TRAP(sysLibTrapClose)
- Err FileBrowserLibSleep (UInt16 refNum) FILE_BROWSER_LIB_TRAP(sysLibTrapSleep)
- Err FileBrowserLibWake (UInt16 refNum) FILE_BROWSER_LIB_TRAP(sysLibTrapWake)
- Boolean FileBrowserLibHandleEvent (UInt16 refNum, EventType *eventP) FILE_BROWSER_LIB_TRAP(exgLibTrapHandleEvent)
- Err FileBrowserLibConnect (UInt16 refNum, ExgSocketType *socketP) FILE_BROWSER_LIB_TRAP(exgLibTrapConnect)
- Err FileBrowserLibAccept (UInt16 refNum, ExgSocketType *socketP) FILE_BROWSER_LIB_TRAP(exgLibTrapAccept)
- Err FileBrowserLibDisconnect (UInt16 refNum, ExgSocketType *socketP, Err err) FILE_BROWSER_LIB_TRAP(exgLibTrapDisconnect)
- Err FileBrowserLibPut (UInt16 refNum, ExgSocketType *socketP) FILE_BROWSER_LIB_TRAP(exgLibTrapPut)
- Err FileBrowserLibGet (UInt16 refNum, ExgSocketType *socketP) FILE_BROWSER_LIB_TRAP(exgLibTrapGet)
- UInt32 FileBrowserLibSend (UInt16 refNum, ExgSocketType *socketP, const void *bufP, UInt32 bufLen, Err *errP) FILE_BROWSER_LIB_TRAP(exgLibTrapSend)
- UInt32 FileBrowserLibReceive (UInt16 refNum, ExgSocketType *socketP, void *bufP, UInt32 bufSize, Err *errP) FILE_BROWSER_LIB_TRAP(exgLibTrapReceive)
- Err FileBrowserLibControl (UInt16 refNum, UInt16 op, void *valueP, UInt16 *valueLenP) FILE_BROWSER_LIB_TRAP(exgLibTrapControl)
- Err FileBrowserLibRequest (UInt16 refNum, ExgSocketType *socketP) FILE_BROWSER_LIB_TRAP(exgLibTrapRequest)
- Boolean FileBrowserLibShowOpenDialog (UInt16 refNum, UInt16 *volRefNumP, Char *path, UInt16 numExtensions, const Char **extensions, const Char *fileType, const Char *title, UInt32 flags) FILE_BROWSER_LIB_TRAP(kFileBrowserLibTrapShowOpenDialog)
- Boolean FileBrowserLibShowSaveAsDialog (UInt16 refNum, UInt16 *volRefNumP, Char *path, UInt16 numExtensions, const Char **extensions, const Char *defaultExtension, const Char *fileType, const Char *title, UInt32 flags) FILE_BROWSER_LIB_TRAP(kFileBrowserLibTrapShowSaveAsDialog)
- Err FileBrowserLibParseFileURL (UInt16 refNum, const Char *urlP, UInt16 *volRefNumP, Char **filePathP) FILE_BROWSER_LIB_TRAP(kFileBrowserLibTrapParseFileURL)
- Boolean FileBrowserLibShowMultiselectDialog (UInt16 refNum, UInt16 *volRefNumP, Char *path, UInt16 *numFilesP, UInt16 maxFiles, Char **filenames, UInt16 numExtensions, const Char **extensions, const Char *fileType, const Char *title, UInt32 flags) FILE_BROWSER_LIB_TRAP(kFileBrowserLibTrapShowMultiselectDialog)

## Define Documentation

#define FILE_BROWSER_LIB_TRAP | ( | trapNum |  | ) | SYS_TRAP(trapNum)

Definition at line 31 of file FileBrowserLib68K.h.

## Function Documentation

Err FileBrowserLibAccept | ( | UInt16 | refNum,
|  | ExgSocketType * | socketP |
| ) |  |  |

Entry point to accept an incoming connection

Parameters:

  | refNum,: | IN: library reference number
  | socketP,: | IN: the exchange socket

Return values:

  | Err | Error code.

Err FileBrowserLibClose | ( | UInt16 | refNum | ) |

Standard File Browser library close function

Parameters:

  | refNum,: | IN: library reference number

Return values:

  | Err | Error code

Err FileBrowserLibConnect | ( | UInt16 | refNum,
|  | ExgSocketType * | socketP |
| ) |  |  |

Entry point to establish an exchange connection

Parameters:

  | refNum,: | IN: library reference number
  | socketP,: | IN: the exchange socket

Return values:

  | Err | Error code.

Err FileBrowserLibControl | ( | UInt16 | refNum,
|  | UInt16 | op,
|  | void * | valueP,
|  | UInt16 * | valueLenP |
| ) |  |  |

Entry point to execute various commands.

Parameters:

  | refNum,: | IN: the library reference number
  | op,: | IN: command to execute
  | valueP,: | IN,OUT: buffer with incoming or outgoing data
  | valueLenP,: | IN,OUT: size of buffer and size of result (not used for some operations)

Return values:

  | Err | Error code.

Err FileBrowserLibDisconnect | ( | UInt16 | refNum,
|  | ExgSocketType * | socketP,
|  | Err | err |
| ) |  |  |

Entry point to disconnect an outgoing or incoming connection and clean up afterwards.

Parameters:

  | refNum,: | IN: library reference number
  | socketP,: | IN: the exchange socket
  | err,: | IN: OS error code to report to user

Return values:

  | Err | Error code.

Err FileBrowserLibGet | ( | UInt16 | refNum,
|  | ExgSocketType * | socketP |
| ) |  |  |

Entry point to start a Get operation

Parameters:

  | refNum,: | IN: library reference number
  | socketP,: | IN: the exchange socket

Return values:

  | Err | Error code.

Boolean FileBrowserLibHandleEvent | ( | UInt16 | refNum,
|  | EventType * | eventP |
| ) |  |  |

Entry point to handle an event

Parameters:

  | refNum,: | IN: library reference number
  | eventP,: | IN: the event to handle

Return values:

  | Boolean | True if the event was handled and should not be passed to a higher level handler.

Err FileBrowserLibOpen | ( | UInt16 | refNum | ) |

Standard File Browser library open function

Parameters:

  | refNum,: | IN: library reference number

Return values:

  | Err | Error code

Err FileBrowserLibParseFileURL | ( | UInt16 | refNum,
|  | const Char * | urlP,
|  | UInt16 * | volRefNumP,
|  | Char ** | filePathP |
| ) |  |  |

Entry point to parse a URL (file:) received in a sysAppLaunchCmdExgReceiveData launch resulting from the open dialog. Pass NULL for unwanted results. Caller must free the others.

Parameters:

  | refNum,: | IN: library reference number
  | urlP,: | IN: URL to be parsed
  | volRefNumP,: | OUT: pass back the file's volume's volRefNum
  | filePathP,: | OUT: pass back the file's path

Return values:

  | Err | Error code

Err FileBrowserLibPut | ( | UInt16 | refNum,
|  | ExgSocketType * | socketP |
| ) |  |  |

Entry point to start a Put operation. Creates a connection if one doesn't already exist.

Parameters:

  | refNum,: | IN: library reference number
  | socketP,: | IN: the exchange socket

Return values:

  | Err | Error code.

UInt32 FileBrowserLibReceive | ( | UInt16 | refNum,
|  | ExgSocketType * | socketP,
|  | void * | bufP,
|  | UInt32 | bufSize,
|  | Err * | errP |
| ) |  |  |

Entry point to receive data for an object

Parameters:

  | refNum,: | IN: the library reference number
  | socketP,: | IN: the exchange socket
  | bufP,: | OUT: buffer to store received data
  | bufSize,: | IN: size of buffer
  | errP,: | OUT: passed back error code

Return values:

  | UInt32 | number of bytes received.

Err FileBrowserLibRequest | ( | UInt16 | refNum,
|  | ExgSocketType * | socketP |
| ) |  |  |

Entry point to do a Request operation (Unimplemented)

Parameters:

  | refNum,: | IN: the library reference number
  | socketP,: | IN: the exchange socket

Return values:

  | Err | Error code.

UInt32 FileBrowserLibSend | ( | UInt16 | refNum,
|  | ExgSocketType * | socketP,
|  | const void * | bufP,
|  | UInt32 | bufLen,
|  | Err * | errP |
| ) |  |  |

Entry point to send data for an object

Parameters:

  | refNum,: | IN: library reference number
  | socketP,: | IN: the exchange socket
  | bufP,: | IN: the buffer containing data to send
  | bufLen,: | IN: bytes to send
  | errP,: | OUT: passed back error code

Return values:

  | UInt32 | number of bytes sent.

Boolean FileBrowserLibShowMultiselectDialog | ( | UInt16 | refNum,
|  | UInt16 * | volRefNumP,
|  | Char * | path,
|  | UInt16 * | numFilesP,
|  | UInt16 | maxFiles,
|  | Char ** | filenames,
|  | UInt16 | numExtensions,
|  | const Char ** | extensions,
|  | const Char * | fileType,
|  | const Char * | title,
|  | UInt32 | flags |
| ) |  |  |

Entry point to pop up a dialog in which multiple files can be selected

Parameters:

  | refNum,: | IN: library reference number
  | volRefNumP,: | IN: the default volume and the result
  | path,: | IN: the default path
  | numFilesP | OUT: number of files selected
  | maxFiles | IN: maximum number of files allowed to select
  | filenames | OUT: names of files selected
  | numExtensions,: | IN: number of extensions to display
  | extensions,: | IN: compatible extensions to display
  | fileType,: | IN: optional MIME type or extension to get default directory on each volume
  | title,: | IN: open dialog title
  | flags,: | IN: any combo of kOpenFlag* flags

Return values:

  | Boolean | True if one or more files are selected

Boolean FileBrowserLibShowOpenDialog | ( | UInt16 | refNum,
|  | UInt16 * | volRefNumP,
|  | Char * | path,
|  | UInt16 | numExtensions,
|  | const Char ** | extensions,
|  | const Char * | fileType,
|  | const Char * | title,
|  | UInt32 | flags |
| ) |  |  |

Pop up an Open dialog

Parameters:

  | refNum,: | IN: library reference number
  | volRefNumP,: | IN: the default volume and the result
  | path,: | IN: the default path and the result (must be at least kFileBrowserLibPathBufferSize bytes).
  | numExtensions,: | IN: number of extensions to display
  | extensions,: | IN: compatible extensions to display
  | fileType,: | IN: optional MIME type or extension to get default directory on each volume
  | title,: | IN: open dialog title
  | flags,: | IN: any combo of kOpenFlag* flags

Return values:

  | Boolean | True if a file is selected

Boolean FileBrowserLibShowSaveAsDialog | ( | UInt16 | refNum,
|  | UInt16 * | volRefNumP,
|  | Char * | path,
|  | UInt16 | numExtensions,
|  | const Char ** | extensions,
|  | const Char * | defaultExtension,
|  | const Char * | fileType,
|  | const Char * | title,
|  | UInt32 | flags |
| ) |  |  |

Pop up a Save dialog

Parameters:

  | refNum,: | IN: library reference number
  | volRefNumP,: | IN: the default volume and the result
  | path,: | IN: the default path and the result (must be at least kFileBrowserLibPathBufferSize bytes)
  | numExtensions,: | IN: number of extensions to display
  | extensions,: | IN: valid extensions to display
  | defaultExtension | IN: default extension to display initially
  | fileType,: | IN: optional MIME type or extension to get default directory on each volume
  | title,: | IN: open dialog title
  | flags,: | IN: any combo of kSaveAsFlag* flags

Return values:

  | Boolean | True if a file is saved

Err FileBrowserLibSleep | ( | UInt16 | refNum | ) |

Standard File Browser library sleep function

Parameters:

  | refNum,: | IN: library reference number

Return values:

  | Err | Error code

Err FileBrowserLibWake | ( | UInt16 | refNum | ) |

Standard File Browser library wake function

Parameters:

  | refNum,: | IN: library reference number

Return values:

  | Err | Error code

Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:57 2008 for Palm API Guide