/* PocketMoney - Financial Posting Standard (PM-FPS) © Catamount Software 1995-2001 Desc: a standard by which applications that deal with finances can exchange information. History: a similar PM-FPS standard exists for the Newton Platform. Several programs made use of this standard to make life better for the user. It can reduce duplicate data entry. It allows programs to expand the capabilities of current finance apps. A similar need exists on the Palm Computing Platform. PocketMoney and CheckPlease are the first programs to take advantage of PM-FPS. I do have sample code available for programmers wishing to implement support for PocketMoney. !!!: Please let me know if you create anything this PM-FPS. !!! Hardy Macia Catamount Software PO Box 8276 Essex VT 05451, USA pocketmoney-palm@catamount.com http://www.catamount.com/ 6/22/99 - Initial Version 10/13/99 - revision 2 - added getaccounts, getcategories 09/12/01 - revision 3 - added getpayees, changed recordVersion types from char to UInt8 - same size. 10/08/01 - created PocketMoney $ Savvy logo for apps that support PocketMoney to use */ //#define kPM_FPS_Version 0x01 //#define kPM_FPS_Version 0x02 // added PM_FPS_GetAccounts(), PM_FPS_GetCategories() #define kPM_FPS_Version 0x03 // added PM_FPS_GetPayees() #define sysAppLaunchCmdFPSPostTransaction 61669 // PM-FPS post of transaction #define sysAppLaunchCmdFPSGetAccounts 61670 // PM-FPS get accounts #define sysAppLaunchCmdFPSGetCategories 61671 // PM-FPS get categories #define sysAppLaunchCmdFPSGetPayees 61672 // PM-FPS get payees #define pm_fpsStopEvent 0x6160 // event - close PM-FPS eventloop //61680 // for autolock //Launch codes 32768Ð65535 are available for private use by applications. // Define Transaction Types #define withdrawal 0 #define deposit 1 #define transfer 2 #define allTransactions 3 #define repeatingTransactions 4 //typedef UInt8 UInt8; typedef UInt8 TransactionType; /********************************************************************** * Param Block passsed with the sysAppLaunchCmdFPSPostTransaction Command **********************************************************************/ typedef struct { UInt8 recordVersion; // version of PM-FPS used. Current version is kPM_FPS_Version. Boolean confirm; // True means open the finance slip every time to confirm - otherwise PocketMoney will only open if account, payee or amount is missing. // if set to true PocketMoney will set to false if PocketMoney saves the transaction UInt32 date; // date in seconds TransactionType transactionType; // withdrawal, deposit, transfer are valid values. double amount; // the amount of the transaction. Negative for withdrawals. Positive for deposits. double xrate; // the exchange rate, default is 1.0. Zero or negative numbers are invalid values. Boolean cleared; // True means the record should be marked cleared char * account; // account, a null-terminated string. char * category; // category, a null-terminated string (optional). char * payee; // payee, a null-terminated string (optional). // if transactionType is transfer then payee is the account being transferred to/from char * chkNum; // check number-id, a null-terminated string (optional). char * description; // description-memo, a null-terminated string (optional). } PM_FPS_RecordType, * PM_FPS_RecordPtr; /********************************************************************** * Param Block passsed with the sysAppLaunchCmdFPSGetAccounts Command **********************************************************************/ //typedef char **vArray; typedef struct { UInt8 recordVersion; // version of PM-FPS used. Current version is kPM_FPS_Version. UInt32 numRecs; // number of accounts/categories/payees/... returned char **array; // array of accounts/categories/payees/... char *category; // string for the category used to return a list of payees which are based on this category } Array_FPS_RecordType, * Array_FPS_RecordPtr; #pragma mark PM-FPS - Function Defs Err PM_FPS_Post(PM_FPS_RecordPtr msgParams); Err PM_FPS_GetAccounts(Array_FPS_RecordPtr msgParams); // get an array of PocketMoney account names Err PM_FPS_GetCategories(Array_FPS_RecordPtr msgParams); // get an array of PocketMoney category names Err PM_FPS_GetPayees(Array_FPS_RecordPtr msgParams); // get an array of PocketMoney payee names