API Guide Home (Online version only) |

# FileBrowserLibCommon.h

Go to the documentation of this file.

    00001 /*******************************************************************************
    00002  * Copyright (c) 2004-2005 palmOne, Inc. or its subsidiaries.
    00003  * All rights reserved.
    00004  ******************************************************************************/
    00005 /**
    00006  * @defgroup    FileBrowser File Browser Library
    00007  * @brief       This library is used to provide support for Files application
    00008  *              integration.
    00009  *
    00010  * Applications which want to utilize the File Browser UI or register itself with
    00011  * the Files application on Tungsten devices should use this library to do so.
    00012  * Registration with the Files app has to be done in addition to registration with
    00013  * the Exchange Library.
    00014  *
    00015  * Registering with the Files application is also done using Exchange Library but
    00016  * with palmOne defined registration IDs (exgRegEditCreatorID, etc). This will enable
    00017  * the application to be launched automatically when a certain file type or extension
    00018  * is selected on the Files app. Developers can also use the APIs available in this
    00019  * library to present File Browser UI in their own application to the user (open and
    00020  * save dialogs).
    00021  *
    00022  * @{
    00023  * @}
    00024  */
    00025 /**
    00026  * @ingroup FileBrowser
    00027  */
    00028
    00029 /**
    00030  * @file    FileBrowserLibCommon.h
    00031  * @version 1.0
    00032  * @brief   Public 68K common header file for File Browser library API.
    00033  *
    00034  * This file contains the File Browser Library common definitions and error codes.
    00035  * <hr>
    00036  */
    00037
    00038
    00039 #ifndef __FILE_BROWSER_LIB_COMMON_H__
    00040 #define __FILE_BROWSER_LIB_COMMON_H__
    00041
    00042 #include <ExgLib.h>
    00043
    00044 /**
    00045  * Use SysLibFind to find this library. There is no need to load it.
    00046  * This must match the database name since this is an Exchange
    00047  * Library In Application (ELIA).
    00048  */
    00049 #define kFileBrowserLibName        "FileBrowser-PFil"
    00050
    00051 #define kFileBrowserLibFlagOneVolume        0x00000001UL  /**< Flags for Open and Save As dialogs*/
    00052
    00053 /** @name Flags for Open dialog */
    00054 /*@{*/
    00055 #define kFileBrowserLibFlagNoFiles          0x00000002UL  /**< no files; only folders */
    00056 #define kFileBrowserLibFlagNoFolders        0x00000004UL  /**< no folders; only files */
    00057 /*@}*/
    00058
    00059 /** @name Flags for Save As dialog */
    00060 /*@{*/
    00061 #define kFileBrowserLibFlagPromptOverwrite  0x00000008UL  /**< warn before replacing */
    00062 #define kFileBrowserLibFlagRequireExtension 0x00000010UL  /**< only given extensions */
    00063 #define kFileBrowserLibFlagNoNewFolder      0x00000020UL  /**< no New Folder button */
    00064 /*@}*/
    00065
    00066 /** @name Flags for Open & Save As dialog */
    00067 /*@{*/
    00068 #define kFileBrowserLibFlagNoDirChange      0x00000040UL  /**< stay within tree */
    00069 #define kFileBrowserLibFlagNoSubDir         0x00000080UL  /**< stay within folder */
    00070 /*@}*/
    00071
    00072 // Buffer sizes
    00073 #define kFileBrowserLibMaxPathLength        2047  // room for most paths
    00074 #define kFileBrowserLibPathBufferSize       (kFileBrowserLibMaxPathLength + 1)
    00075
    00076 // Exchange Manager registry enums
    00077 //<><> Remove when PalmSource adds these to their SDK
    00078 #define exgRegEditCreatorID                 0xff7b  // creator ID registry
    00079 #define exgRegEditExtensionID               0xff7d  // filename extension registry
    00080 #define exgRegEditTypeID                    0xff7e  // MIME type registry
    00081
    00082 // ExgControl opcodes
    00083 #define kFileBrowserLibCtlGetVersion        exgLibCtlSpecificOp  // API version
    00084
    00085 // File Browser library API versions
    00086 #define kFileBrowserLibAPIVersion0          0  // original version on Tungsten T5
    00087 #define kFileBrowserLibAPIVersion1          1  // version with multiselect
    00088
    00089 /** @name Error Codes */
    00090 /*@{*/
    00091 #define kFileBrowserLibErrorClass       (oemErrorClass + 0x0400)
    00092 #define kFileBrowserLibErrStillOpen     (kFileBrowserLibErrorClass | 0x01)
    00093 #define kFileBrowserLibErrPathTooLong   (kFileBrowserLibErrorClass | 0x02)
    00094 #define kFileBrowserLibErrMemError      (kFileBrowserLibErrorClass | 0x03)
    00095 #define kFileBrowserLibErrCantFind      (kFileBrowserLibErrorClass | 0x04)
    00096 #define kFileBrowserLibErrInternal      (kFileBrowserLibErrorClass | 0x05)
    00097 #define kFileBrowserLibErrCantOpen      (kFileBrowserLibErrorClass | 0x06)
    00098 #define kFileBrowserLibErrCantParse     (kFileBrowserLibErrorClass | 0x07)
    00099 /*@}*/
    00100
    00101 /** @name Function Traps */
    00102 /*@{*/
    00103 #define kFileBrowserLibTrapShowOpenDialog           (exgLibTrapLast)
    00104 #define kFileBrowserLibTrapShowSaveAsDialog         (exgLibTrapLast + 1)
    00105 #define kFileBrowserLibTrapParseFileURL             (exgLibTrapLast + 2)
    00106 #define kFileBrowserLibTrapShowMultiselectDialog    (exgLibTrapLast + 3)
    00107 /*@}*/
    00108
    00109 #endif // __FILE_BROWSER_LIB_COMMON_H__

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