odbinternal.h

Go to the documentation of this file.
00001 
00002 /*  $Id: odbinternal.h 355 2005-01-11 22:48:55Z andreradke $    */
00003 
00004 /******************************************************************************
00005 
00006     UserLand Frontier(tm) -- High performance Web content management,
00007     object database, system-level and Internet scripting environment,
00008     including source code editing and debugging.
00009 
00010     Copyright (C) 1992-2004 UserLand Software, Inc.
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 
00026 ******************************************************************************/
00027 
00028 typedef struct odb_ * odbref;
00029 
00030 typedef enum odbValueType  {
00031     
00032     unknownT = '\?\?\?\?',
00033     
00034     charT = 'char',
00035     
00036     shortT = 'shor',
00037     
00038     longT = 'long',
00039     
00040     binaryT = 'data',
00041     
00042     booleanT = 'bool',
00043     
00044     tokenT = 'tokn',
00045     
00046     dateT = 'date',
00047     
00048     addressT = 'addr',
00049     
00050     codeT = 'code',
00051     
00052     extendedT = 'exte',
00053     
00054     stringT = 'TEXT',
00055     
00056     externalT = 'xtrn',
00057     
00058     directionT = 'dir ',
00059     
00060     string4T = 'type',
00061     
00062     pointT = 'QDpt',
00063     
00064     rectT = 'qdrt',
00065     
00066     patternT = 'tptn',
00067     
00068     rgbT = 'cRGB',
00069     
00070     fixedT = 'fixd',
00071     
00072     singleT = 'sing',
00073     
00074     doubleT = 'doub',
00075     
00076     objspecT = 'obj ',
00077     
00078     filespecT = 'fss ',
00079     
00080     aliasT = 'alis',
00081     
00082     enumeratorT = 'enum',
00083     
00084     listT = 'list',
00085     
00086     recordT = 'reco',
00087     
00088     outlineT = 'optx',
00089     
00090     wptextT = 'wptx',
00091     
00092     tableT = 'tabl',
00093     
00094     scriptT = 'scpt',
00095     
00096     menubarT = 'mbar',
00097     
00098     pictureT = 'pict'
00099     
00100     } odbValueType;
00101 
00102 
00103 typedef union odbValueData {
00104     
00105     boolean flvalue;
00106     
00107     unsigned char chvalue;
00108     
00109     short intvalue;
00110     
00111     long longvalue;
00112     
00113     unsigned long datevalue;
00114     
00115 #ifdef MACVERSION
00116     tydirection dirvalue;
00117 #endif
00118 #ifdef WIN95VERSION
00119     byte dirvalue;
00120 #endif
00121     
00122     OSType ostypevalue;
00123     
00124     Handle stringvalue;
00125     
00126     Handle addressvalue;
00127     
00128     Handle binaryvalue;
00129     
00130     Handle externalvalue;
00131     
00132     Point pointvalue;
00133     
00134     Rect **rectvalue;
00135     
00136     Pattern **patternvalue;
00137     
00138     RGBColor **rgbvalue;
00139     
00140     Fixed fixedvalue;
00141     
00142     float singlevalue;
00143     
00144     double **doublevalue;
00145     
00146     Handle objspecvalue;
00147     
00148     FSSpec **filespecvalue;
00149     
00150     Handle aliasvalue; /*AliasHandle*/
00151     
00152     OSType enumvalue;
00153     
00154     Handle listvalue;
00155     
00156     Handle recordvalue;
00157     } odbValueData;
00158 
00159 
00160 /*note: must have 68k struct alignment compiler option set*/
00161 
00162 typedef struct odbValueRecord {
00163     
00164     odbValueType valuetype;
00165     
00166     odbValueData data;
00167     } odbValueRecord;
00168 
00169 extern pascal boolean odbUpdateOdbref (WindowPtr w, odbref odb);
00170 
00171 extern pascal boolean odbAccessWindow (WindowPtr w, odbref *odb);
00172 
00173 extern pascal boolean odbNewFile (hdlfilenum);
00174 
00175 extern pascal boolean odbOpenFile (hdlfilenum, odbref *odb, boolean flreadonly);
00176 
00177 extern pascal boolean odbSaveFile (odbref odb);
00178 
00179 extern pascal boolean odbCloseFile (odbref odb);
00180 
00181 extern pascal boolean odbDefined (odbref odb, bigstring bspath);
00182 
00183 extern pascal boolean odbDelete (odbref odb, bigstring bspath);
00184 
00185 extern pascal boolean odbGetType (odbref odb, bigstring bspath, OSType *type);
00186 
00187 extern pascal boolean odbGetValue (odbref odb, bigstring bspath, odbValueRecord *value);
00188 
00189 extern pascal boolean odbSetValue (odbref odb, bigstring bspath, odbValueRecord *value);
00190 
00191 extern pascal boolean odbNewTable (odbref odb, bigstring bspath);
00192 
00193 extern pascal boolean odbCountItems (odbref odb, bigstring bspath, long *count);
00194 
00195 extern pascal boolean odbGetNthItem (odbref odb, bigstring bspath, long n, bigstring bsname);
00196 
00197 extern pascal boolean odbGetModDate (odbref odb, bigstring bspath, unsigned long *date);
00198 
00199 extern pascal void odbInitValue (odbValueRecord *value);
00200 
00201 extern pascal void odbDisposeValue (odbref odb, odbValueRecord *value);
00202 
00203 extern pascal void odbGetError (bigstring bs);
00204 
00205 extern pascal boolean odbInstallEventHandler (void);
00206 

Generated on Wed May 31 18:19:56 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6