compile insert repository_equates
/*
   Author    ???
   Date      ???
   Purpose   Equates for use with repository-based functions
   
   Copyright (c) 1992-2024 Revelation Software. All rights reserved.
   
   Comments
   ========
     
   
   Amended   Date       Reason
   =======   ====       ======
   Mr C      15 May 24  Added SYSAPPS_QBFCLOSEONCLEAR$
   Mr C      08 Mar 24  Added SYSAPPS_UISTYLESHEET$
   bzs       04 Jan 24  Added GRES_TYPE_COMPLEX$
   Mr C      13 Nov 23  Added GRES_TYPE_NONE$
                        Added SYSREPCLASSES_TYPEFAMILYID$
   Mr C      09 Sep 22  Added SYSAPPS ESERVER fields
   Mr C      27 Jul 22  Added SYSAPPS WEBVIEWCONFIG fields
   Mr C      14 Sep 21  Added SYSAPPS_FOCUSFGCOLOR$
   Mr C      25 Aug 20  Added SYSREPTYPES_CLASSHANDLERPROC$
                        Added SYSREPTYPES_ENTHANDLERPROC$
                        Added SYSREP_KEYFORMAT_ROW$
*/
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
#ifndef _REPOSITORY_EQUATES_
#define _REPOSITORY_EQUATES_
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

   declare function repository

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

   // Entity States
   equ REPSTATE_NEW$                 to 1
   
   // SCMNEW and SCMWRITE operations "hijack" the unused State parameter by 
   // adding a prefix to it to denote to the normal NEW/WRITE handlers that 
   // the operation is actually initiated from an SCM process (e.g. Git)
   
   // SCMNEW/WRITE prefix
   equ REPSTATE_SCMPREFIX$           to "SCM*"
   
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

   // Repository Messages  - this list is _way_ out of date!!

   equ MSG_ACCESS$                   to 'ACCESS'
   equ MSG_COMPILE$                  to 'COMPILE'
   equ MSG_DESTROY$                  to 'DESTROY'
   equ MSG_NEW$                      to 'NEW'
   // equ MSG_RENAME$                   to 'RENAME'  - never implemented?
   equ MSG_TDESTROY$                 to 'TDESTROY'
   equ MSG_UPDATE$                   to 'UPDATE'
   equ MSG_WRITE$                    to 'WRITE'
   equ MSG_EXECUTE$                  to 'EXECUTE'
   equ MSG_COPY$                     to 'COPY'
   equ MSG_GETAPPID$                 to 'GETAPPID'
   equ MSG_GETSUB$                   to 'GETSUB'
   equ MSG_GETSUPER$                 to 'GETSUPER'
   equ MSG_SETSUB$                   to 'SETSUB'
   equ MSG_SETSUPER$                 to 'SETSUPER'
   equ MSG_GETDOCUMENT$              to 'GETDOCUMENT'
   equ MSG_SETDOCUMENT$              to 'SETDOCUMENT'
   
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

   // Repository Types - again, a tad out of date methinks ...
   
   equ REPTYPE_NOTE$                 to 'APPNOTE'
   
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

   // Log Operations

   equ LOGOP_NEW$                    to "NEW"
   equ LOGOP_CHECKOUT$               to "CHECKOUT"
   equ LOGOP_CHECKIN$                to "CHECKIN"
   equ LOGOP_UPDATE$                 to "UPDATE"
   equ LOGOP_DESTROY$                to "DESTROY"
   equ LOGOP_WRITE$                  to "WRITE"
   equ LOGOP_RENAME$                 to "RENAME"
   equ LOGOP_COMPILE$                to "COMPILE"
   equ LOGOP_COPY$                   to "COPY"
   equ LOGOP_PURGE$                  to "PURGE"
   equ LOGOP_SCMPULL$                to "SCMPULL"
   equ LOGOP_SCMPUSH$                to "SCMPUSH"
   
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

   // ENTID EQUATES
   equ APPID$                        to 1
   equ TYPEID$                       to 2
   equ CLASSID$                      to 3
   equ ENTITYID$                     to 4
   equ TIMESTAMP$                    to 5

   equ METH_TYPEID$                  to 2
   equ METH_CLASSID$                 to 3
   equ METH_MESSAGE$                 to 4

   equ REPMETHOD$                    to "$REPOS."
   equ METHSEP$                      to '.'
   equ EVENTSEP$                     to '.'
   equ KEYSEP$                       to '*'
   equ ENTIDSEP$                     to '.'

   equ PUBLIC$                       to "$PUBLIC"
   equ PUBLIC_DESC$                  to "<All Users>"
   
   // SCM conversion formats
   equ SCMFMT_JSON$                  to 0  ; // dynarray <-> JSON
   equ SCMFMT_TEXT$                  to 1  ; // @fm      <-> CRLF
   equ SCMFMT_BINARY$                to 2  ; // no conversion
   
   // SCMINCLUDE for SYSREPOSTYPES
   equ SCMINCLUDE_TYPE_NEVER$        to 0; // == NULL
   equ SCMINCLUDE_TYPE_EXCLUDE$      to 1; // Exclude, but allow entity to override
   equ SCMINCLUDE_TYPE_INCLUDE$      to 2; // Include
   
   // SCMINCLUDE for SYSREPOSCLASSES
   equ SCMINCLUDE_CLASS_USETYPE$     to ""; // 
   equ SCMINCLUDE_CLASS_NEVER$       to 0;  // 
   equ SCMINCLUDE_CLASS_EXCLUDE$     to 1;  // Exclude, but allow entity to override
   equ SCMINCLUDE_CLASS_INCLUDE$     to 2;  // Include   
   
   // GETRDKEXTRACTSPEC method equates
   equ GRES_POS_EXTRACTTYPE$         to 1 ; // PROC,OS,OI,REPOS,DOC etc
   equ GRES_POS_STORAGETYPE$         to 2 ; // TRUE$ if OS storage, FALSE$ if LH
   equ GRES_POS_STORAGELOCATION$     to 3 ; // TableName or OS directory (can be MV'd)
   equ GRES_POS_STORAGEID$           to 4 ; // RecordID or OS filename   (can be MV'd)
   
   // GETRDKEXTRACTSPEC types
   equ GRES_TYPE_DOC$                to "DOC"
   equ GRES_TYPE_OI$                 to "OI"
   equ GRES_TYPE_OS$                 to "OS"
   equ GRES_TYPE_PROC$               to "PROC"
   equ GRES_TYPE_REPOS$              to "REPOS"
   equ GRES_TYPE_NONE$               to "NONE"
   equ GRES_TYPE_COMPLEX$            to "COMPLEX"
   
   // GETRDKEXTRACTSPEC storage types
   equ GRES_STORAGE_LH$              to 0
   equ GRES_STORAGE_OS$              to 1
   
   // SYSREPOSTYPES Key Formats
   equ SYSREP_KEYFORMAT_ACE$         to "ACE"  ; // App*Class*Ent  (default)
   equ SYSREP_KEYFORMAT_ACE_DBG$     to "@ACE" ; // @App*Class*Ent (e.g OIEVENTDBG)
   equ SYSREP_KEYFORMAT_AE$          to "AE"   ; // App*Ent
   equ SYSREP_KEYFORMAT_APR$         to "APR"  ; // <table> in Ent, <row> in subkey
   equ SYSREP_KEYFORMAT_COL$         to "COL"  ; // <table> "." <column> in Ent
   equ SYSREP_KEYFORMAT_E$           to "E"    ; // Ent
   equ SYSREP_KEYFORMAT_E_$          to "E_"   ; // Ent (first "_" to "*", e.g. SYSREPOSCLASSES record)
   equ SYSREP_KEYFORMAT_EA$          to "EA"   ; // Ent or Ent*App (e.g. STPROC)
   equ SYSREP_KEYFORMAT_EA_DBG$      to "@EA"  ; // @Ent or @Ent*App (e.g. STPROCEXE)
   equ SYSREP_KEYFORMAT_EA_OBJ$      to "$EA"  ; // $Ent or $Ent*App (e.g. STPROCDBG)
   equ SYSREP_KEYFORMAT_LHOS$        to "LHOS" ; // OS or Rec in subkey, e.g. DOC types
   equ SYSREP_KEYFORMAT_OS$          to "OS"   ; // OS FilePath in subkey
   equ SYSREP_KEYFORMAT_PEV$         to "PEV"  ; // Promoted Event/Exe
   equ SYSREP_KEYFORMAT_PEV_DBG$     to "@PEV" ; // Promoted Event/Exe Debug 
   equ SYSREP_KEYFORMAT_REC$         to "R"    ; // <table> " " <row>  in subkey
   equ SYSREP_KEYFORMAT_TBL$         to "TBL"  ; // No location or key
   
   // Preview handling for OS files in RTI_DSN_GENERIC
   equ OSGENPRVW_NONE$               to 0 ; // (Or null) - no preview
   equ OSGENPRVW_RECEDIT$            to 1 ; // Use the record editor control
   equ OSGENPRVW_WEBBROWSER$         to 2 ; // Use the web browser.
   
   // SYSBUILD values
   equ SYSBUILD_IGNORE$              to 0
   equ SYSBUILD_INCLUDE$             to 1
   equ SYSBUILD_INCLUDE_SRC$         to 2
   
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

   // following is the equates for SYSREPOSTYPEFAMILIES  
   equ SYSREPFAMILIES_NAME$          to 1
   equ SYSREPFAMILIES_ICON$          to 2
   equ SYSREPFAMILIES_IMAGESMALL$    to 3 ; // 24x24
   equ SYSREPFAMILIES_IMAGEMEDIUM$   to 4 ; // 32x32
   equ SYSREPFAMILIES_IMAGEMENU$     to 5 ; // 16x16
   equ SYSREPFAMILIES_DESIGNHELP$    to 6 ; // Repos key For an APPNOTE entity to display the "help" in RTI_IDE_NEW
   
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
   
   // following is the equates for SYSREPOSTYPES
   equ SYSREPTYPES_TITLE$            to 1
   equ SYSREPTYPES_DESCRIPTION$      to 2
   equ SYSREPTYPES_MESSAGES$         to 3 ; //  **DEPRECATED** Nothing in the toolset uses these?
   equ SYSREPTYPES_EXEC_METHOD$      to 3 ; // **DEPRECATED**
   equ SYSREPTYPES_CLASSHANDLERPROC$ to 3 ; // 'Utility' function to handle type/class REPOS_xxx calls
   equ SYSREPTYPES_LOCATION$         to 4 
   equ SYSREPTYPES_CLASSFLAG$        to 5
   equ SYSREPTYPES_FAMILY$           to 6 ; // **DEPRECATED**
   equ SYSREPTYPES_STORAGEID$        to 6 ; // SYSREPOSSTORAGE
   equ SYSREPTYPES_TYPEFAMILYID$     to 7 ; // SYSREPOSTYPEFAMILIES
   equ SYSREPTYPES_OIEDITOR$         to 8 
   equ SYSREPTYPES_FILTERMASK$       to 9 
   equ SYSREPTYPES_ICON$             to 10
   equ SYSREPTYPES_IMAGESMALL$       to 11 ; // 24x24
   equ SYSREPTYPES_IMAGEMEDIUM$      to 12 ; // 32x32
   equ SYSREPTYPES_IMAGEMENU$        to 13 ; // 16x16
   equ SYSREPTYPES_STORAGETYPEOS$    to 14 ; // TRUE$ if entity can be stored as an OS file
   equ SYSREPTYPES_STORAGETYPELH$    to 15 ; // TRUE$ if entity can be stored as an LH record
   equ SYSREPTYPES_SCMFORMAT$        to 16 ; // See SCMFMT_ equates above
   equ SYSREPTYPES_SCMINCLUDE$       to 17 ; // See SCMINCLUDE_TYPE_ equates above
   equ SYSREPTYPES_RDKEXTRACTTYPE$   to 18 ; // PROC,DOC,OS,OI,REPOS
   equ SYSREPTYPES_COMPILEFLAG$      to 19 ; // TRUE$ if entities of this type can be compiled
   equ SYSREPTYPES_RESERVED_F20$     to 20
   equ SYSREPTYPES_DESIGNTOOL$       to 21 ; // RTI_DSN_DBTABLE, RTI_DSN_OIWIN, RTI_DSN_MSG, etc
   equ SYSREPTYPES_DESIGNHELP$       to 22 ; // Repos key For an APPNOTE entity to display the "help" in RTI_IDE_NEW
   equ SYSREPTYPES_NEWTEXT$          to 23 ; // The user-friendly text to be displayed in the RTI_IDE_NEW Types panel
   equ SYSREPTYPES_NEWTOKEN$         to 24 ; // Token to pass to the DSN when creating a new entity
   equ SYSREPTYPES_DESIGNSUB$        to 25 ; // TRUE$ if entities of this type support the DESIGNSUB method
   equ SYSREPTYPES_KEYFORMAT$        to 26 ; // ACE (default), AE
   equ SYSREPTYPES_ALLOWNEW$         to 27 ; // TRUE$ to show in the IDE NEW dialog
   equ SYSREPTYPES_OSPREVIEWTYPE$    to 28 ; // How to handle previewing OS files in the the Generic DSN
   equ SYSREPTYPES_ENTHANDLERPROC$   to 29 ; // 'Utility' function to handle entity-based REPOS_xxx calls
   equ SYSREPTYPES_RESERVED_F30$     to 30
   
   // PREVIEWTYPE - ITYPEHANDLER, WEBBROWSER, RECORD
   
   equ SYSREPTYPES_USER1$            to 31
   equ SYSREPTYPES_USER2$            to 32
   equ SYSREPTYPES_USER3$            to 33
   equ SYSREPTYPES_USER4$            to 34
   equ SYSREPTYPES_USER5$            to 35
   
   equ SYSREPTYPES_SUBIDS$           to 40
   equ SYSREPTYPES_SUBTITLES$        to 41
   equ SYSREPTYPES_SUBICONS$         to 42
   equ SYSREPTYPES_SUBIMAGESMENU$    to 43
   equ SYSREPTYPES_SUBIMAGESSMALL$   to 44
   equ SYSREPTYPES_SUBIMAGESMEDIUM$  to 45
   equ SYSREPTYPES_SUBNEWTOKENS$     to 46
   equ SYSREPTYPES_SUBDESIGNHELP$    to 47
   
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

   // following is the equates for SYSREPOSCLASSES
   equ SYSREPCLASSES_TITLE$          to 1
   equ SYSREPCLASSES_DESCRIPTION$    to 2
   equ SYSREPCLASSES_INFO$           to 3 ; // Deprecated
   equ SYSREPCLASSES_LOCATION$       to 4
   equ SYSREPCLASSES_STORAGE$        to 5 ; // SYSREPOSSTORAGE
   equ SYSREPCLASSES_FAMILY$         to 6 ; // Deprecated
   equ SYSREPCLASSES_TYPEFAMILYID$   to 6 ; // SYSREPOSTYPEFAMILIES
   equ SYSREPCLASSES_RESERVED_F7$    to 7
   equ SYSREPCLASSES_OIEDITOR$       to 8
   equ SYSREPCLASSES_FILTERMASK$     to 9
   equ SYSREPCLASSES_ICON$           to 10
   equ SYSREPCLASSES_IMAGESMALL$     to 11 ; // 24x24
   equ SYSREPCLASSES_IMAGEMEDIUM$    to 12 ; // 32x32
   equ SYSREPCLASSES_IMAGEMENU$      to 13 ; // 16x16
   equ SYSREPCLASSES_STORAGETYPEOS$  to 14 ; // TRUE$ if entity can be stored as an OS file
   equ SYSREPCLASSES_STORAGETYPELH$  to 15 ; // TRUE$ if entity can be stored as an LH record
   equ SYSREPCLASSES_SCMFORMAT$      to 16 ; // See SCMFMT_ equates above
   equ SYSREPCLASSES_SCMINCLUDE$     to 17 ; // See SCMINCLUDE_CLASS_ equates above
   equ SYSREPCLASSES_RDKEXTRACTTYPE$ to 18 ; // PROC,DOC,OS,OI,REPOS
   equ SYSREPCLASSES_RESERVED_F19$   to 19
   equ SYSREPCLASSES_RESERVED_F20$   to 20
   equ SYSREPCLASSES_DESIGNTOOL$     to 21 ; // RTI_DSN_DBTABLE, RTI_DSN_OIWIN, RTI_DSN_MSG, etc
   equ SYSREPCLASSES_DESIGNHELP$     to 22 ; // Repos key For an APPNOTE entity to display the "help" in RTI_IDE_NEW
   equ SYSREPCLASSES_NEWTEXT$        to 23 ; // The user-friendly text to be displayed in the RTI_IDE_NEW Types panel
   equ SYSREPCLASSES_NEWTOKEN$       to 24 ; // Token to pass to the DSN when creating a new entity
   equ SYSREPCLASSES_DESIGNSUB$      to 25 ; // TRUE if entities of this class support the DESIGNSUB method (null to use the TYPE)
   equ SYSREPCLASSES_KEYFORMAT$      to 26 ; // ACE (default), AE, (null to use the TYPE)
   equ SYSREPCLASSES_ALLOWNEW$       to 27 ; // TRUE$ to show in the IDE NEW dialog (null to use the TYPE)
   equ SYSREPCLASSES_OSPREVIEWTYPE$  to 28 ; // How to handle previewing OS files in the the Generic DSN
   equ SYSREPCLASSES_RESERVED_F29$   to 29
   equ SYSREPCLASSES_RESERVED_F30$   to 30
   equ SYSREPCLASSES_USER1$          to 31
   equ SYSREPCLASSES_USER2$          to 32
   equ SYSREPCLASSES_USER3$          to 33
   equ SYSREPCLASSES_USER4$          to 34
   equ SYSREPCLASSES_USER5$          to 35
   
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////

   // following is the equates for SYSAPPS - don't forget to update the fields
   // in RevPS_Application.h if you change them here.
   equ SYSAPPS_APPID$                           to 0
   equ SYSAPPS_APPNAME$                         to 1
   equ SYSAPPS_DBID$                            to 2
   equ SYSAPPS_TEMPLATE_APP$                    to 3
   equ SYSAPPS_INHERIT_APP$                     to SYSAPPS_TEMPLATE_APP$ ; // Synonym
   equ SYSAPPS_CREATED$                         to 4
   equ SYSAPPS_COMPANY$                         to 5
   equ SYSAPPS_AUTHOR$                          to 6
   equ SYSAPPS_CREATE_PERMIT$                   to 7
   equ SYSAPPS_ABSTRACT$                        to 8
   equ SYSAPPS_DOCREF$                          to 9  ; // Not used for v10
   equ SYSAPPS_DOCTOOL$                         to 10
   equ SYSAPPS_ENTRY_TYPEID$                    to 11 ; // Not used 
   equ SYSAPPS_ENTRY_CLASSID$                   to 12 ; // Not used
   equ SYSAPPS_ENTRY_ENTITYID$                  to 13
   equ SYSAPPS_COLUMN_SUPPORT$                  to 14
   equ SYSAPPS_LOGON_BANNER$                    to 15 ; // Not used for v10
   equ SYSAPPS_UTF8_ENABLED$                    to 16
   equ SYSAPPS_UTF8_DELIMCOUNT$                 to 17
   equ SYSAPPS_LOGON_TEXT$                      to 18
   equ SYSAPPS_FORM_BKCOLOR_FROM$               to 19
   equ SYSAPPS_FORM_BKCOLOR_TO$                 to 20
   equ SYSAPPS_SHOWACCELERATORS$                to 21
   equ SYSAPPS_FOCUSBKCOLOR$                    to 22
   equ SYSAPPS_CELLFOCUSRECTCOLOR$              to 23
   equ SYSAPPS_CELLFOCUSRECTSTYLE$              to 24
   equ SYSAPPS_CELLFOCUSRECTWEIGHT$             to 25
   equ SYSAPPS_EXTENDEDPRECISIONMODE$           to 26
   equ SYSAPPS_EXTENDEDPRECISIONDECIMALPLACES$  to 27
   equ SYSAPPS_LOGON_TEMPLATE$                  to 28
   equ SYSAPPS_FOCUSFGCOLOR$                    to 29
   equ SYSAPPS_WBV_BROWSEREXEFOLDER$            to 30
   equ SYSAPPS_WBV_USERDATAFOLDER$              to 31
   equ SYSAPPS_WBV_PROFILENAME$                 to 32
   equ SYSAPPS_WBV_EXTRABROWSERARGS$            to 33
   equ SYSAPPS_WBV_TARGETVERSION$               to 34
   equ SYSAPPS_ESERVER_URL$                     to 35
   equ SYSAPPS_ESERVER_PORT$                    to 36
   equ SYSAPPS_ESERVER_UTF8_PORT$               to 37
   equ SYSAPPS_ESERVER_WEB_PORT$                to 38
   equ SYSAPPS_ESERVER_CHAT_PORT$               to 39
   equ SYSAPPS_ESERVER_VDIR$                    to 40
   equ SYSAPPS_UISTYLESHEET$                    to 41
   equ SYSAPPS_QBFCLOSEONCLEAR$                 to 42
   
   // Defaults
   equ SYSAPPS_DEF_EP_MODE$          to 0   ; // FALSE$
   equ SYSAPPS_DEF_EP_DECIMALPLACES$ to 32
   
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////   
#endif
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
/*
   Lest we forget ...
   
   Amended   Date       Reason
   =======   ====       ======
   Mr C      10 Oct 19  Added PUBLIC_DESC$
   Mr C      28 Sep 19  Added SYSAPPS_LOGON_TEMPLATE$
   MTR       04 Jun 19  Added Extended Math operators For Precision 
   Mr C      10 Apr 18  Added SYSAPPS SYSTEM FOCUSSTYLES fields
   Mr C      04 Feb 18  Added SYSAPPS SHOWACCELERATORS field.
   Mr C      09 Nov 17  Updated SYSAPPS structure.
   Mr C      13 Sep 17  Added SYSBUILD values
   Mr C      30 Aug 17  Added REPSTATE_SCMPREFIX$
   Mr C      24 Aug 17  Expanded KeyFormat definitions
   Mr C      10 Aug 17  Added RTI_DSN_GENERIC preview handling fields
   Mr C      07 Aug 17  Added SCMPULL/PUSH LOG tokens
   bzs       22 May 17  Added support for specification of "utility" function 
                        in type info to call to handle GET_REPOS_xxx functions
   Mr C      21 Feb 17  Added PURGE log op.
   Mr C      31 Mar 16  Added SYSREP_KEYFORMAT_E_$ 
   Mr C      22 Feb 16  Added RDKEXTRACTSPEC types
   Mr C      11 Feb 16  Added 16x16 image fields 
   Mr C      28 Jan 16  Added SYSREPCLASSES_DESIGNTOOL$
   Mr C      14 Mar 15  Added UTF8 fields to SYSAPPS equates
   Mr C      08 Mar 15  Added GETRDKEXTRACTSPEC equates
                        Added SYSREPOSTYPES fields for RTI_IDE integration
   Mr C      26 Feb 15  Updated for more RDK/SCM mods
   Mr C      01 Feb 14  Updated for v10 with new SYSREPOSTYPES and
                        SYSREPOSCLASSES columns.      
*/
