API Guide Home
(Online version only)

PalmVPPI.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  * Copyright (c) 2004 palmOne, Inc. or its subsidiaries.
00003  * All rights reserved.
00004  *****************************************************************************/
00005 /**
00006  * @ingroup Network
00007  */
00008 
00009 /**
00010  * @file    PalmVPPI.h
00011  * @version 1.0
00012  *
00013  * @brief This is the API for VPN panel plug-ins (VPPIs).
00014  *
00015  * The VPN panel allows the user to manage their VPN accounts. Each plug-in provides support for a
00016  * specific VPN protocol such as PPTP or IPSec. A VPPI provides access to
00017  * the user interface of a VPN client. An NPPI (Network panel plug-in)
00018  * provides the underlying implementation as well as an alternate user
00019  * interface.
00020  *
00021  */
00022 
00023 #ifndef _PALM_VPPI_H_
00024 #define _PALM_VPPI_H_
00025 
00026 /** Database type for VPN panel plug-ins. */
00027 #define sysFileTVPNPanelPlugin      'Vppi'
00028 
00029 /** Account name maximum length. */
00030 #define kMaxVPNAccountNameLength    31
00031 
00032 /** @brief VPN Account structure. */
00033 typedef struct
00034 {
00035     UInt32  vppiCreator;    /**< Creator ID of the VPPI that "owns" the account. */
00036     UInt32  accountID;      /**< Arbitrary 32-bit ID used by the VPI to identify the account. */
00037     Char    accountName[kMaxVPNAccountNameLength + 1]; /**< User-specified account name. */
00038 } VPNAccountType;
00039 
00040 
00041 /** Launch code used by the VPN Panel to get the account list. */
00042 #define sysVPPILaunchCmdGetAccounts     sysAppLaunchCmdCustomBase   // 0x8000
00043 
00044 /** @brief Structure used by the VPN Panel to query the account from a VPPI. */
00045 typedef struct
00046 {
00047     UInt32          numAccounts;    /**< Number of accounts. */
00048     VPNAccountType* accounts;       /**< Array of accounts. */
00049     Err             err;            /**< Error set by the VPPI before returning the account list. */
00050 } SysVPPILaunchCmdGetAccountsType;
00051 
00052 
00053 /** Launch code used by the VPN Panel to edit an account. */
00054 #define sysVPPILaunchCmdEditAccount     (sysAppLaunchCmdCustomBase + 1)   // 0x8001
00055 
00056 /** @brief Structure used by the VPN Panel to edit an account. */
00057 typedef struct
00058 {
00059     Boolean        useWizardUI;     /**< Whether to show Previous & Done buttons instead of OK & Cancel buttons. */
00060     VPNAccountType account;         /**< Account edited or created. */
00061     Err            err;             /**< Return error. */
00062     Boolean        useSavedAccount; /**< Whether the account information is temporary (for saved state) or permanent. */
00063     Boolean        dirtyBit;        /**< Whether any account settings have been changed. */
00064 } SysVPPILaunchCmdEditAccountType;
00065 
00066 
00067 /** Launch code used by the VPN Panel to delete an account. */
00068 #define sysVPPILaunchCmdDeleteAccount       (sysAppLaunchCmdCustomBase + 2)   // 0x8002
00069 
00070 /** @brief Structure used by the VPN Panel to delete an account. */
00071 typedef struct
00072 {
00073     VPNAccountType account; /**< Account to delete. */
00074     Err            err;     /**< Error code. */
00075 } SysVPPILaunchCmdDeleteAccountType;
00076 
00077 
00078 /** Launch code used by the VPN Panel to set the current account. */
00079 #define sysVPPILaunchCmdSetCurrentAccount   (sysAppLaunchCmdCustomBase + 3)   // 0x8003
00080 
00081 /** @brief Structure used by the VPN Panel to set the current account. */
00082 typedef struct
00083 {
00084     VPNAccountType account; /**< Account to set as current account. */
00085     Err            err;     /**< Error code. */
00086 } SysVPPILaunchCmdSetCurrentAccountType;
00087 
00088 
00089 /** Launch code used by the VPN Panel to request the VPPI to display a dialog. */
00090 #define sysVPPILaunchCmdPromptAndConfigure      (sysAppLaunchCmdCustomBase + 4)   // 0x8004
00091 
00092 /** @brief Structure used by the VPN Panel to request the VPPI to display a dialog. */
00093 typedef struct
00094 {
00095     UInt32   origCreator;   /**< Creator that launched the prompt dialog (in). */
00096     UInt32   origInstance;  /**< Instance that laucnhed the prompt dialog (in). */
00097     Err      errOut;        /**< Error code (out). */
00098 } SysVPPILaunchCmdPromptAndConfigureType;
00099 
00100 
00101 /** Launch code used by the VPN Panel to show the progess dialog. */
00102 #define sysVPPILaunchCmdProgressPaint   (sysAppLaunchCmdCustomBase + 5)   // 0x8005
00103 
00104 /** @brief Structure used by the VPN Panel to show the progess dialog. */
00105 typedef struct
00106 {
00107     UInt32        stage;        /**< Stage calue sent by the VPN Shim to the VPPI (in). */
00108     RectangleType clientRect;   /**< Rectangle in which the progress dialog box is displayed (in). */
00109     Err           errOut;       /**< Error code (out). */
00110 } SysVPPILaunchCmdProgressPaintType;
00111 
00112 
00113 /** Launch code used by the VPN Panel to show the error dialog. */
00114 #define sysVPPILaunchCmdErrorDialog     (sysAppLaunchCmdCustomBase + 6)   // 0x8006
00115 
00116 /** @brief Structure used by the VPN Panel to show the error dialog. */
00117 typedef struct
00118 {
00119     UInt32        error;        /**< Error value sent by the VPN Shim (in). */
00120     Err           errOut;       /**< Error code (out). */
00121 } SysVPPILaunchCmdErrorDialogType;
00122 
00123 
00124 /** Launch code used by the VPN Panel to clear the password cache. */
00125 #define sysVPPILaunchCmdClearPWCache    (sysAppLaunchCmdCustomBase + 7)   // 0x8007
00126 
00127 /** @brief Structure used by the VPN Panel to clear the password cache. */
00128 typedef struct
00129 {
00130     Err           errOut;       /**< Error code. */
00131 } SysVPPILaunchCmdClearPWCacheType;
00132 
00133 
00134 /** Launch code used by the VPN Panel to determine is the VPPI will prompt for password. */
00135 #define sysVPPILaunchCmdWillPWPrompt    (sysAppLaunchCmdCustomBase + 8)   // 0x8008
00136 
00137 /** @brief Structure used by the VPN Panel to determine is the VPPI will prompt for password. */
00138 typedef struct
00139 {
00140     UInt32        secsFromNow;  /**< Seconds from now at which the VPPI will prompt for password (in). */
00141     Err           errOut;       /**< Error code (out). */
00142 } SysVPPILaunchCmdWillPWPromptType;
00143 
00144 #endif  //_PALM_VPPI_H_

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