added frameworks entities
This commit is contained in:
133
FRAMEWORKS/STPROCINS/ACTION_SETUP.txt
Normal file
133
FRAMEWORKS/STPROCINS/ACTION_SETUP.txt
Normal file
@ -0,0 +1,133 @@
|
||||
Compile insert Action_Setup
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Action_Setup
|
||||
|
||||
Description : Declarations and equates used by the table action commuters.
|
||||
|
||||
Notes : Action_Setup also populates several variables that will often be useful within action handler code.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
08/13/10 dmb Original programmer.
|
||||
09/18/19 dmb Add TableVolumes@ and new Unused global commons in the /Tables/ common block. Remove
|
||||
dependency upon the Locate statement in @Tables to find the volume of the current table.
|
||||
- [SRPFW-282]
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
Common /Tables/ TableNames@, TableAccounts@, TableHandles@, SysObjHandle@, ActionListHandle@, PromotedListHandle@, NoActionListHandle@, NoPromotedListHandle@, TableVolumes@, Unused10@, Unused11@, Unused12@, Unused13@
|
||||
|
||||
Declare function RetStack
|
||||
|
||||
|
||||
// SRP List declarations.
|
||||
Declare function SRP_List_Create, SRP_List_CreateFromFastArray, SRP_List_Count, SRP_List_GetAt, SRP_List_GetVariable, SRP_List_Locate
|
||||
Declare subroutine SRP_List_Add, SRP_List_InsertAt, SRP_List_Release, SRP_List_RemoveAt, SRP_List_SetAt
|
||||
|
||||
|
||||
// Initialize handles if necessary.
|
||||
// The handle to SYSOBJ is formatted for use with MFS/BFS calls.
|
||||
If Len(SysObjHandle@) else Open 'SYSOBJ' to SysObjHandle@ then SysObjHandle@ = SysObjHandle@<0, 2>
|
||||
If Len(ActionListHandle@) else ActionListHandle@ = SRP_List_Create()
|
||||
If Len(PromotedListHandle@) else PromotedListHandle@ = SRP_List_Create()
|
||||
If Len(NoActionListHandle@) else NoActionListHandle@ = SRP_List_Create()
|
||||
If Len(NoPromotedListHandle@) else NoPromotedListHandle@ = SRP_List_Create()
|
||||
|
||||
|
||||
// Return values to indicate how the action flow should continue.
|
||||
Equ ACTION_STOP$ to 0 ; // Action flow should stop
|
||||
Equ ACTION_CONTINUE$ to 1 ; // Action flow should continue until a later process changes this value
|
||||
Equ ACTION_CONTINUE_NO_PROMOTED$ to 2 ; // Action flow should by-pass the promoted (generic) logic but allow the system action to execute
|
||||
Equ ACTION_CONTINUE_NO_SYSTEM$ to 3 ; // Action flow should execute the promoted (generic) logic but stop the system action from executing
|
||||
Equ ACTION_SYSTEM_ONLY$ to 4 ; // Action flow should execute the system action only
|
||||
|
||||
|
||||
// Make sure any action parameters which have not been assigned are nulled.
|
||||
If Assigned(Code) else Code = ''
|
||||
If Assigned(Action) else Action = ''
|
||||
If Assigned(CalcColName) else CalcColName = ''
|
||||
If Assigned(FSList) else FSList = ''
|
||||
If Assigned(Handle) else Handle = ''
|
||||
If Assigned(Name) then KeyID = Name
|
||||
If Assigned(KeyID) else KeyID = ''
|
||||
If Assigned(FMC) else FMC = ''
|
||||
If Assigned(Record) else Record = ''
|
||||
If Assigned(Param1) else Param1 = ''
|
||||
If Assigned(Param2) else Param2 = ''
|
||||
If Assigned(Param3) else Param3 = ''
|
||||
If Assigned(Param4) else Param4 = ''
|
||||
If Assigned(Param5) else Param5 = ''
|
||||
If Assigned(Param6) else Param6 = ''
|
||||
If Assigned(Param7) else Param7 = ''
|
||||
If Assigned(Param8) else Param8 = ''
|
||||
If Assigned(Param9) else Param9 = ''
|
||||
If Assigned(Param10) else Param10 = ''
|
||||
If Assigned(OrigRecord) else OrigRecord = ''
|
||||
|
||||
|
||||
// Get the program stack
|
||||
RetStack = RetStack()
|
||||
|
||||
|
||||
// 11 is the code value for the OPEN.FILE primitive. No need to call the following logic since it would be premature.
|
||||
If Code NE 11 then
|
||||
// Get the name of the database table if it has already been opened with the OPEN.FILE action.
|
||||
If Len(Handle) then
|
||||
// Being called from within the MFS. Most methods will pass in the valid database table handle. This should already
|
||||
// be stored in the TableHandles@ global common. The associated regular database table name will be found in the
|
||||
// TableNames@ global common.
|
||||
Locate Handle in TableHandles@ using @FM Setting fPos then
|
||||
TableName = TableNames@<fPos>
|
||||
DictName = 'DICT.' : TableName
|
||||
AccountName = TableAccounts@<fPos>
|
||||
Volume = TableVolumes@<fPos>
|
||||
TableHandle = FSList : @VM : Handle
|
||||
end else
|
||||
// If the handle was unable to be located in the TableHandles@ global common, this could be a situation where
|
||||
// the handle was modified on-the-fly by the calling procedure (such as the MFS stack being manipulated for
|
||||
// some reason). In this case, loop though each hnadle in TableHandles@ and see if it is contained within the
|
||||
// handle being passed into the MFS. This isn't as precise, but a match will almost certainly be the correct
|
||||
// handle.
|
||||
FoundHandle = 0
|
||||
NumberHandles = DCount(TableHandles@, @FM)
|
||||
For fPos = 1 to NumberHandles
|
||||
CompareHandle = TableHandles@<fPos>
|
||||
If Index(Handle, CompareHandle, 1) then
|
||||
FoundHandle = 1
|
||||
TableName = TableNames@<fPos>
|
||||
end
|
||||
Until FoundHandle
|
||||
Next CompareHandle
|
||||
If FoundHandle then
|
||||
DictName = 'DICT.' : TableName
|
||||
AccountName = TableAccounts@<fPos>
|
||||
Locate TableName in @Tables(0) using @FM setting fPos then
|
||||
VolumeName = @Tables(1)<fPos>
|
||||
BFSType = VolumeName[1, '*']
|
||||
Volume = VolumeName[Col2() + 1, 99]
|
||||
end else
|
||||
Volume = ''
|
||||
end
|
||||
TableHandle = FSList : @VM : Handle
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
If Assigned(TableName) else
|
||||
// Either the Handle argument wasn't assigned or no match could be found in the TableHandles@ global common.
|
||||
// Most likely this is because an ACTION commuter is being called directly from a program other than an MFS.
|
||||
// Therefore the name of the database table will be extracted from the name of the ACTIONS program (which is
|
||||
// assumed to follow the format <TableName>_ACTIONS.
|
||||
CurProc = RetStack[1, 'F' : @FM]
|
||||
TableName = CurProc
|
||||
Swap '_ACTIONS' with '' in TableName
|
||||
|
||||
DictName = 'DICT.' : TableName
|
||||
AccountName = ''
|
||||
Volume = ''
|
||||
Open TableName to TableHandle else TableHandle = ''
|
||||
end
|
||||
end
|
48
FRAMEWORKS/STPROCINS/API_SETUP.txt
Normal file
48
FRAMEWORKS/STPROCINS/API_SETUP.txt
Normal file
@ -0,0 +1,48 @@
|
||||
Compile insert API_Setup
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : API_Setup
|
||||
|
||||
Description : Sets up the current web API.
|
||||
|
||||
Notes : See the comments added below.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
11/17/18 dmb Original programmer. - [SRPFW-257]
|
||||
02/03/19 dmb Update URLSegments logic to exclude the query params that are now returned by the
|
||||
FullEndpointURL service. - [SRPFW-257]
|
||||
02/11/19 dmb Add FullEndpointNoQuery variable. This is the same as the FullEndpointURL but strips off the
|
||||
query params. This will be used by logic that needs the full endpoint and also needs to
|
||||
append additional segments. - [SRPFW-257]
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
Common /Debugging/ DebugFlag@
|
||||
|
||||
// Utility services.
|
||||
Declare function Error_Services, HTTP_Services, HTTP_Resource_Services, RetStack
|
||||
Declare subroutine Error_Services, HTTP_Services, HTTP_Resource_Services
|
||||
|
||||
// The API URL is fixed for any application but should be customized for the application itself. This is not always
|
||||
// passed into the request correctly, especially if a proxy service or rewrite rules are being used.
|
||||
APIURL = HTTP_Services('GetAPIRootURL', True$)
|
||||
|
||||
// The Full End Point URL indicates the URL submitted by the client.
|
||||
FullEndpointURL = HTTP_Services('GetFullEndpointURL')
|
||||
FullEndpointURLNoQuery = FullEndpointURL[1, 'F?']
|
||||
URLSegments = FullEndpointURLNoQuery
|
||||
If URLSegments[-1, 1] EQ '/' then URLSegments[-1, 1] = ''
|
||||
Convert '/' to @FM in URLSegments
|
||||
NumSegments = DCount(URLSegments, @FM)
|
||||
ParentURL = Field(FullEndpointURL, '/', 1, NumSegments - 1)
|
||||
EndpointSegment = URLSegments<NumSegments>
|
||||
ParentSegment = URLSegments<NumSegments - 1>
|
||||
|
||||
// The HTTP method (or verb) submitted by the client.
|
||||
HTTPMethod = HTTP_Services('GetHTTPRequestMethod')
|
||||
|
||||
// Get the name of the current service handler in case it needs to be used for error management.
|
||||
CurrentAPI = RetStack()<1>
|
252
FRAMEWORKS/STPROCINS/APP_INSERTS.txt
Normal file
252
FRAMEWORKS/STPROCINS/APP_INSERTS.txt
Normal file
@ -0,0 +1,252 @@
|
||||
Compile insert App_Inserts
|
||||
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : App_Inserts
|
||||
|
||||
Description : Common declarations and equates used by the application.
|
||||
|
||||
Notes : App_Inserts is designed to be the most commonly used insert within SRP FrameWorks routines.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/23/98 dmb Original programmer.
|
||||
10/04/13 dmb Added insert for SystemFont$, SystemTypeface$, and SystemPoint$ to make it easier for
|
||||
commuters to apply the FrameWorks default font. - [SRPFW-17]
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
Declare function Msg, PopUp, Set_Property, Get_Property, Utility, Send_Message, Dialog_Box, Start_Window
|
||||
Declare function Start_MDIChild, Set_Printer, Get_Printer, SRP_Show_Window, MCP, GetTickCount
|
||||
Declare function Form_Services, Error_Services, Memory_Services, MCP
|
||||
Declare subroutine Set_Property, Utility, Send_Event, Send_Message, End_Dialog, Send_Info, Msg, SendMessage
|
||||
Declare subroutine Forward_Event, Lock_Record, Post_Event, SRP_Show_Window, SRP_Set_Prop_Array
|
||||
Declare subroutine Form_Services, Error_Services, SRP_Stopwatch, Memory_Services, MCP
|
||||
|
||||
Equ SystemTable$ to 'APP_INFO'
|
||||
|
||||
* Logical equates
|
||||
|
||||
$insert LOGICAL
|
||||
|
||||
Equ Success$ to 1
|
||||
Equ Failure$ to 0
|
||||
Equ Passed$ to 1
|
||||
Equ Failed$ to 0
|
||||
Equ Qualified$ to 1
|
||||
Equ Not_qualified$ to 0
|
||||
Equ Confirmed$ to 1
|
||||
Equ Not_confirmed$ to 0
|
||||
Equ OK$ to 1
|
||||
|
||||
* General equates
|
||||
|
||||
Equ Tab$ to Char(9)
|
||||
Equ Esc$ to \1B\
|
||||
Equ CRLF$ to \0D0A\
|
||||
Equ Lock$ to 1
|
||||
Equ Unlock$ to 2
|
||||
Equ ReadOnly$ to 0
|
||||
Equ FullWrite$ to 1
|
||||
Equ NoAccess$ to -1
|
||||
|
||||
* Font equates
|
||||
|
||||
Equ Tahoma_8_Reg$ to 'Tahoma' : @SVM : -11 : @SVM : 400 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 34 : @SVM : 0 : @SVM : 3 : @SVM : 2 : @SVM : 1 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 0
|
||||
Equ Tahoma_8_Reg_UL$ to 'Tahoma' : @SVM : -11 : @SVM : 400 : @SVM : 0 : @SVM : 1 : @SVM : 0 : @SVM : 0 : @SVM : 34 : @SVM : 0 : @SVM : 3 : @SVM : 2 : @SVM : 1 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 0
|
||||
Equ Tahoma_8_Bold$ to 'Tahoma' : @SVM : -11 : @SVM : 700 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 34 : @SVM : 0 : @SVM : 3 : @SVM : 2 : @SVM : 1 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 0
|
||||
|
||||
Equ Tahoma_12_Reg$ to 'Tahoma' : @SVM : 12 : @SVM : 400 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 34 : @SVM : 0 : @SVM : 3 : @SVM : 2 : @SVM : 1 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 0
|
||||
Equ Tahoma_12_Reg_UL$ to 'Tahoma' : @SVM : 12 : @SVM : 400 : @SVM : 0 : @SVM : 1 : @SVM : 0 : @SVM : 0 : @SVM : 34 : @SVM : 0 : @SVM : 3 : @SVM : 2 : @SVM : 1 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 0
|
||||
Equ Tahoma_12_Bold$ to 'Tahoma' : @SVM : 12 : @SVM : 700 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 34 : @SVM : 0 : @SVM : 3 : @SVM : 2 : @SVM : 1 : @SVM : 0 : @SVM : 0 : @SVM : 0 : @SVM : 0
|
||||
|
||||
* Promoted Event equates
|
||||
|
||||
Equ Create$ to 1
|
||||
Equ Activated$ to 2
|
||||
Equ Read_Pre_System$ to 3
|
||||
Equ Clear_Post_System$ to 4
|
||||
Equ Close_Post_System$ to 5
|
||||
Equ Size$ to 6
|
||||
Equ Delete_Post_System$ to 7
|
||||
Equ Winmsg$ to 8
|
||||
Equ Write_Pre_System$ to 9
|
||||
Equ Gotfocus$ to 10
|
||||
Equ Lostfocus$ to 11
|
||||
Equ Inactivated$ to 12
|
||||
Equ Read_Post_System$ to 13
|
||||
Equ Clear_Pre_System$ to 14
|
||||
Equ Poschanged$ to 15
|
||||
Equ Close_Pre_System$ to 16
|
||||
Equ Write_Post_System$ to 17
|
||||
Equ Delete_Pre_System$ to 18
|
||||
Equ InsertRow$ to 19
|
||||
Equ DeleteRow$ to 20
|
||||
Equ ColSize$ to 21
|
||||
Equ RightClickUp$ to 22
|
||||
Equ MouseOver$ to 23
|
||||
Equ MouseOff$ to 24
|
||||
Equ OLE$ to 25
|
||||
Equ Click$ to 26
|
||||
Equ Timer$ to 27
|
||||
Equ ContextMenu$ to 28
|
||||
|
||||
// General Windows API equates
|
||||
Equ WM_USER to 1024
|
||||
Equ WM_CLOSE to 16
|
||||
Equ WM_COMMAND to 273
|
||||
Equ WM_LBUTTONDOWN to 513 ; // 0x0201
|
||||
Equ WM_LBUTTONUP to 514 ; // 0x0202
|
||||
Equ WM_LBUTTONDBLCLK to 515 ; // 0x0203
|
||||
Equ WM_RBUTTONDOWN to 516 ; // 0x0204
|
||||
Equ WM_RBUTTONUP to 517 ; // 0x0205
|
||||
Equ WM_PARENTNOTIFY to 528 ; // 0x0210
|
||||
Equ WM_SYSCOLORCHANGE to 21 ; // 0x0015
|
||||
Equ WM_SETCURSOR to 32 ; // 0x0020
|
||||
Equ WM_SIZE to 5 ; // 0x0005
|
||||
Equ WM_MOVE to 3 ; // 0x0003
|
||||
Equ WM_GETMINMAXINFO to 36 ; // 0x0024
|
||||
Equ WM_WINDOWPOSCHANGING to 70
|
||||
|
||||
// ShowWindow API equates
|
||||
Equ SW_FORCEMINIMIZE to 11
|
||||
Equ SW_HIDE to 0
|
||||
Equ SW_MAXIMIZE to 3
|
||||
Equ SW_MINIMIZE to 6
|
||||
Equ SW_RESTORE to 9
|
||||
Equ SW_SHOW to 5
|
||||
Equ SW_SHOWDEFAULT to 10
|
||||
Equ SW_SHOWMAXIMIZED to 3
|
||||
Equ SW_SHOWMINIMIZED to 2
|
||||
Equ SW_SHOWMINNOACTIVE to 7
|
||||
Equ SW_SHOWNA to 8
|
||||
Equ SW_SHOWNOACTIVATE to 4
|
||||
Equ SW_SHOWNORMAL to 1
|
||||
|
||||
|
||||
Equ WS_CAPTION$ to 0x00C00000
|
||||
Equ WS_SYSMENU$ to 0x00080000
|
||||
Equ WS_THICKFRAME$ to 0x00040000
|
||||
Equ WS_EX_TOOLWINDOW$ to 0x00000080
|
||||
Equ WS_EX_CLIENTEDGE$ to 0x200
|
||||
Equ WS_CLIPCHILDREN$ to 0x02000000
|
||||
|
||||
Equ SM_CYCAPTION$ to 4
|
||||
Equ F4_VK_CODE to 115 ; // 115 is the virtual key code for F4.
|
||||
Equ TAB_VK_CODE to 9
|
||||
|
||||
* Edittable/Datatable equates
|
||||
|
||||
Equ DTN_ABORTEDIT to 17
|
||||
Equ DTM_EDITCURCELL to WM_USER + 95 ; * Change to Edit mode now
|
||||
Equ DTM_SETEDITKEY to 1118 ; * Set key to change to Edit Mode
|
||||
Equ DTM_SETCOLFORMAT to WM_USER + 18
|
||||
|
||||
Equ DT_BEGINEDIT to 1 ;* begin edit mode
|
||||
Equ DT_ENDEDIT to 2 ;* end the edit
|
||||
Equ DT_ABORTEDIT to 3 ;* Esc will undo changes
|
||||
Equ DTS_EDIT to 4
|
||||
Equ DTCS_PROTECT to 8
|
||||
|
||||
* Help equates
|
||||
|
||||
Equ HELP_CONTEXT to 1
|
||||
Equ HELP_QUIT to 2
|
||||
Equ HELP_INDEX to 3
|
||||
Equ HELP_CONTENTS to 3
|
||||
Equ HELP_HELPONHELP to 4
|
||||
Equ HELP_SETINDEX to 5
|
||||
Equ HELP_SETCONTENTS to 5
|
||||
Equ HELP_CONTEXTPOPUP to 8
|
||||
Equ HELP_FORCEFILE to 9
|
||||
Equ HELP_KEY to 257
|
||||
Equ HELP_COMMAND to 258
|
||||
Equ HELP_PARTIALKEY to 261
|
||||
Equ HELP_MULTIKEY to 513
|
||||
Equ HELP_SETWINPOS to 515
|
||||
|
||||
* Color equates
|
||||
|
||||
Equ Msg_Light_Grey$ to 212:@VM:208:@VM:200
|
||||
Equ Msg_Dark_Grey$ to 127:@VM:127:@VM:127
|
||||
Equ Msg_Light_Blue$ to 0:@VM:255:@VM:255
|
||||
Equ Msg_Dark_Blue$ to 0:@VM:0:@VM:255
|
||||
Equ Msg_Red$ to 255:@VM:0:@VM:0
|
||||
Equ Msg_Green$ to 0:@VM:255:@VM:0
|
||||
Equ Msg_Purple$ to 255:@VM:0:@VM:255
|
||||
Equ Msg_Yellow$ to 255:@VM:255:@VM:0
|
||||
Equ Msg_Black$ to 0:@VM:0:@VM:0
|
||||
Equ Msg_White$ to 255:@VM:255:@VM:255
|
||||
|
||||
* RGB colors
|
||||
EQU USEPARENT$ TO 0 ;* \000000\
|
||||
EQU BLACK$ TO 1 ;* \FFFFFF\
|
||||
EQU RED$ TO 255 ;* \0000FF\
|
||||
EQU ORANGE$ TO 33023 ;* \0080FF\
|
||||
EQU GREEN$ TO 65280 ;* \00FF00\
|
||||
EQU YELLOW$ TO 65535 ;* \00FFFF\
|
||||
EQU GREY$ TO 12632256 ;* \C0C0C0\
|
||||
EQU BLUE$ TO 16711680 ;* \FF0000\
|
||||
EQU PURPLE$ TO 16711808 ;* \FF0080\
|
||||
EQU MAGENTA$ TO 16711935 ;* \FF00FF\
|
||||
EQU CYAN$ TO 16776960 ;* \FFFF00\
|
||||
EQU WHITE$ TO 16777215 ;* \FFFFFF\
|
||||
|
||||
// The following color equates are used directly
|
||||
// Example: Set_Property(CtrlEntID, "BACKCOLOR", COLOR_BTNFACE$)
|
||||
EQU COLOR_SCROLLBAR$ TO 2147483648 ;* \80000000\
|
||||
EQU COLOR_BACKGROUND$ TO 2164260864 ;* \81000000\
|
||||
EQU COLOR_ACTIVECAPTION$ TO 2181038080 ;* \82000000\
|
||||
EQU COLOR_INACTIVECAPTION$ TO 2197815296 ;* \83000000\
|
||||
EQU COLOR_MENU$ TO 2214592512 ;* \84000000\
|
||||
EQU COLOR_WINDOW$ TO 2231369728 ;* \85000000\
|
||||
EQU COLOR_WINDOWFRAME$ TO 2248146944 ;* \86000000\
|
||||
EQU COLOR_MENUTEXT$ TO 2264924160 ;* \87000000\
|
||||
EQU COLOR_WINDOWTEXT$ TO 2281701376 ;* \88000000\
|
||||
EQU COLOR_CAPTIONTEXT$ TO 2298478592 ;* \89000000\
|
||||
EQU COLOR_ACTIVEBORDER$ TO 2315255808 ;* \8A000000\
|
||||
EQU COLOR_INACTIVEBORDER$ TO 2332033024 ;* \8B000000\
|
||||
EQU COLOR_APPWORKSPACE$ TO 2348810240 ;* \8C000000\
|
||||
EQU COLOR_HIGHLIGHT$ TO 2365587456 ;* \8D000000\
|
||||
EQU COLOR_HIGHLIGHTTEXT$ TO 2382364672 ;* \8E000000\
|
||||
EQU COLOR_BTNFACE$ TO 2399141888 ;* \8F000000\
|
||||
EQU COLOR_BTNSHADOW$ TO 2415919104 ;* \90000000\
|
||||
EQU COLOR_GRAYTEXT$ TO 2432696320 ;* \91000000\
|
||||
EQU COLOR_BTNTEXT$ TO 2449473536 ;* \92000000\
|
||||
EQU COLOR_INACTIVECAPTIONTEXT$ TO 2466250752 ;* \93000000\
|
||||
EQU COLOR_BTNHIGHLIGHT$ TO 2483027968 ;* \94000000\
|
||||
|
||||
// The following color equates are used with the GetSysColor WinAPI command
|
||||
// Example: Set_Property(CtrlEntID, "BACKCOLOR", GetSysColor(API_COLOR_BTNFACE$))
|
||||
Equ API_COLOR_SCROLLBAR$ To 0
|
||||
Equ API_COLOR_BACKGROUND$ To 1
|
||||
Equ API_COLOR_ACTIVECAPTION$ To 2
|
||||
Equ API_COLOR_INACTIVECAPTION$ To 3
|
||||
Equ API_COLOR_MENU$ To 4
|
||||
Equ API_COLOR_WINDOW$ To 5
|
||||
Equ API_COLOR_WINDOWFRAME$ To 6
|
||||
Equ API_COLOR_MENUTEXT$ To 7
|
||||
Equ API_COLOR_WINDOWTEXT$ To 8
|
||||
Equ API_COLOR_CAPTIONTEXT$ To 9
|
||||
Equ API_COLOR_ACTIVEBORDER$ To 10
|
||||
Equ API_COLOR_INACTIVEBORDER$ To 11
|
||||
Equ API_COLOR_APPWORKSPACE$ To 12
|
||||
Equ API_COLOR_HIGHLIGHT$ To 13
|
||||
Equ API_COLOR_HIGHLIGHTTEXT$ To 14
|
||||
Equ API_COLOR_BTNFACE$ To 15
|
||||
Equ API_COLOR_BTNSHADOW$ To 16
|
||||
Equ API_COLOR_GRAYTEXT$ To 17
|
||||
Equ API_COLOR_BTNTEXT$ To 18
|
||||
Equ API_COLOR_INACTIVECAPTIONTEXT$ To 19
|
||||
Equ API_COLOR_BTNHIGHLIGHT$ To 20
|
||||
|
||||
// Preference Manager
|
||||
Equ ImagePath$ to Memory_Services('GetValue', 'PM_CURRENT_IMAGE_PATH') : '\'
|
||||
PMSystemFont = Memory_Services('GetValue', 'PM_SYSTEM_FONT')
|
||||
Convert ',' to @SVM in PMSystemFont
|
||||
Equ SystemFont$ to PMSystemFont
|
||||
Equ SystemTypeface$ to SystemFont$[1, @SVM]
|
||||
Equ SystemPoint$ to SystemFont$[Col2() + 1, @SVM]
|
||||
|
36
FRAMEWORKS/STPROCINS/CONTACTS_EQUATES.txt
Normal file
36
FRAMEWORKS/STPROCINS/CONTACTS_EQUATES.txt
Normal file
@ -0,0 +1,36 @@
|
||||
Compile insert CONTACTS_EQUATES
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : CONTACTS_EQUATES
|
||||
|
||||
Description : Equates used by any service that works with the CONTACTS database table.
|
||||
|
||||
Notes :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
07/06/17 dmb Original programmer. - [SRPFW-187]
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
Equ CONTACTS_CONTACT_ID$ To 0
|
||||
Equ CONTACTS_MODIFIED_BY$ To 1
|
||||
Equ CONTACTS_MODIFIED_DATE$ To 2
|
||||
Equ CONTACTS_MODIFIED_TIME$ To 3
|
||||
Equ CONTACTS_FIRST_NAME$ To 4
|
||||
Equ CONTACTS_LAST_NAME$ To 5
|
||||
Equ CONTACTS_ADDRESS$ To 6
|
||||
Equ CONTACTS_CITY$ To 7
|
||||
Equ CONTACTS_STATE$ To 8
|
||||
Equ CONTACTS_ZIP$ To 9
|
||||
Equ CONTACTS_COUNTY$ To 10
|
||||
Equ CONTACTS_PHONE_TYPE$ To 11
|
||||
Equ CONTACTS_PHONE_NUMBER$ To 12
|
||||
Equ CONTACTS_EMAIL$ To 13
|
||||
Equ CONTACTS_COMPANY$ To 14
|
||||
Equ CONTACTS_URL$ To 15
|
||||
Equ CONTACTS_BIRTHDATE$ To 16
|
||||
Equ CONTACTS_PICTURE$ To 17
|
||||
Equ CONTACTS_NOTES$ To 18
|
99
FRAMEWORKS/STPROCINS/EVENT_SETUP.txt
Normal file
99
FRAMEWORKS/STPROCINS/EVENT_SETUP.txt
Normal file
@ -0,0 +1,99 @@
|
||||
Compile insert Event_Setup
|
||||
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Event_Setup
|
||||
|
||||
Description : Declarations and equates used by the form event commuters.
|
||||
|
||||
Notes : Event_Setup also populates several variables that will often be useful within event handler code.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
08/13/10 dmb Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
Declare function Get_Property, Set_Property, Get_Current_Event, Get_Window_ID, Get_Record
|
||||
|
||||
// Return values to indicate how the event flow should continue.
|
||||
Equ EVENT_STOP$ to 0 ; // Event flow should stop
|
||||
Equ EVENT_CONTINUE$ to 1 ; // Event flow should continue until a later process changes this value
|
||||
Equ EVENT_CONTINUE_NO_PROMOTED$ to 2 ; // Event flow should by-pass the promoted (generic) logic but allow the system event handler to execute
|
||||
Equ EVENT_CONTINUE_NO_SYSTEM$ to 3 ; // Event flow should execute the promoted (generic) logic but stop the system event handler from executing
|
||||
Equ EVENT_SYSTEM_ONLY$ to 4 ; // Event flow should execute the system event handler only (normal option for third-party windows running in FrameWorks)
|
||||
|
||||
// Make sure any event parameters which have not been assigned are nulled.
|
||||
If Assigned(CtrlEntId) else CtrlEntId = ''
|
||||
If Assigned(Event) else Event = ''
|
||||
If Assigned(Param1) else Param1 = ''
|
||||
If Assigned(Param2) else Param2 = ''
|
||||
If Assigned(Param3) else Param3 = ''
|
||||
If Assigned(Param4) else Param4 = ''
|
||||
If Assigned(Param5) else Param5 = ''
|
||||
If Assigned(Param6) else Param6 = ''
|
||||
If Assigned(Param7) else Param7 = ''
|
||||
If Assigned(Param8) else Param8 = ''
|
||||
If Assigned(Param9) else Param9 = ''
|
||||
If Assigned(Param10) else Param10 = ''
|
||||
If Assigned(Param11) else Param11 = ''
|
||||
If Assigned(Param12) else Param12 = ''
|
||||
If Assigned(Param13) else Param13 = ''
|
||||
If Assigned(Param14) else Param14 = ''
|
||||
If Assigned(Param15) else Param15 = ''
|
||||
|
||||
// Get the design time name of the window in case this is a multi-instance window.
|
||||
Window = @Window[1, 'F*']
|
||||
|
||||
MDIFrame = Get_Property(@Window, 'MDIFRAME')
|
||||
Parent = Get_Property(@Window, 'PARENT')
|
||||
If MDIFrame EQ '' then MDIFrame = Parent ; // Dialog boxes won't set the MDIFRAME property so use the PARENT property.
|
||||
|
||||
// Always get the CtrlClassID since we are not passing it through the event parameters.
|
||||
CtrlClassId = Get_Property(CtrlEntId, 'TYPE')
|
||||
|
||||
// Get the name of the control on the window based on the CtrlClassId.
|
||||
Begin Case
|
||||
Case CtrlClassId EQ 'WINDOW'
|
||||
Control = Window
|
||||
Case CtrlClassId EQ 'RADIOBUTTON'
|
||||
Control = Field(CtrlEntId, '.', 2, 2)
|
||||
Case CtrlClassId EQ 'MENU'
|
||||
Control = CtrlEntId[-1, 'B.']
|
||||
Case 1
|
||||
Control = Field(CtrlEntId, '.', 2, 1)
|
||||
End Case
|
||||
|
||||
// If this is an OLE control, get the ProgID.
|
||||
ProgID = ''
|
||||
If CtrlClassId EQ 'OLECONTROL' then ProgID = Get_Property(CtrlEntId, 'ORIG_TEXT')
|
||||
|
||||
// Get the Event Type so generic event functionality can be executed properly.
|
||||
EventType = Get_Current_Event()
|
||||
|
||||
// Combine the event type and control into an event action.
|
||||
If EventType EQ 'OLE' then
|
||||
// Because the Promoted_Events function transfers parameters, this will only appear correctly in a commuter module.
|
||||
EventAction = Event : '.' : Control
|
||||
end else
|
||||
EventAction = EventType : '.' : Control
|
||||
end
|
||||
|
||||
// Get the current window's key ID. Strip off the @SVM if this window is ignoring self-locks.
|
||||
KeyID = Get_Property(@Window, 'ID')[1, 'F' : @SVM]
|
||||
|
||||
// If KeyID is null then check to see if the key controls are populated. If so, then this is probably a locked record.
|
||||
// ID properties are null with locked records.
|
||||
If KeyID EQ '' then
|
||||
KeyID = Get_Window_ID(@Window)
|
||||
end
|
||||
|
||||
// Get the current window's record.
|
||||
Record = Get_Property(@Window, 'ATRECORD')
|
||||
|
||||
// If the window uses QuickEvents to call the commuter module, check for @EVENT in the event parameter. This is here for
|
||||
// backwards compatability. OpenInsight 7.1 and higher automatically swaps @EVENT with the actual event. Prior versions
|
||||
// of OpenInsight will just pass the literal through. Therefore, this will swap out @EVENT with the actual event.
|
||||
If Event EQ '@EVENT' then Swap '@EVENT' with EventType in Event
|
131
FRAMEWORKS/STPROCINS/HTTP_FRAMEWORK_SETUP_EQUATES.txt
Normal file
131
FRAMEWORKS/STPROCINS/HTTP_FRAMEWORK_SETUP_EQUATES.txt
Normal file
@ -0,0 +1,131 @@
|
||||
Compile insert HTTP_Framework_Setup_Equates
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : HTTP_Framework_Setup_Equates
|
||||
|
||||
Description :
|
||||
|
||||
Notes : The SRP HTTP Framework stores configuration settings in the SYSENV\SRP_HTTP_FRAMEWORK_SETUP[*AppID]
|
||||
record. These equates define the meaning of each value and can be used in routines that read/write
|
||||
data to this configuration record.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
11/07/16 dmb Original programmer.
|
||||
01/01/17 dmb [SRPFW-116] Added HTTP_FRAMEWORK_SETUP_FLUSH_CACHE$.
|
||||
02/03/17 dmb [SRPFW-132] Added HTTP_FRAMEWORK_SETUP_NON_AUTHENTICATED_URLS$.
|
||||
02/27/17 dmb [SRPFW-125] Added HTTP_FRAMEWORK_SETUP_ABORTED_SERVICE$.
|
||||
03/04/17 dmb [SRPFW-154] Added HTTP_FRAMEWORK_SETUP_ENABLE_LOGGING$.
|
||||
03/07/17 dmb [SRPFW-155] Added HTTP_FRAMEWORK_SETUP_DEBUGGER_SETTING$ and
|
||||
HTTP_FRAMEWORK_SETUP_DEBUGGER_INTERCEPT$.
|
||||
07/07/17 dmb [SRPFW-154] Added HTTP_FRAMEWORK_SETUP_LOG_ERRORS_ONLY$.
|
||||
10/22/18 dmb [SRPFW-253] Added HTTP_FRAMEWORK_SETUP_WHITELISTED_IPS$.
|
||||
11/01/18 dmb [SRPFW-255] Added HTTP_FRAMEWORK_SETUP_ENABLE_HTTP_BASIC_AUTHENTICATION$.
|
||||
11/01/18 dmb [SRPFW-255] Added HTTP_FRAMEWORK_SETUP_NEW_PASSWORD_TIME_TO_LIVE$.
|
||||
11/01/18 dmb [SRPFW-255] Added HTTP_FRAMEWORK_SETUP_OLD_PASSWORD_TIME_TO_LIVE$.
|
||||
11/01/18 dmb [SRPFW-256] Added HTTP_FRAMEWORK_SETUP_INVALID_PASSWORD_LIMIT$.
|
||||
11/01/18 dmb [SRPFW-256] Added HTTP_FRAMEWORK_SETUP_CONTAINMENT_ACTION$.
|
||||
11/05/18 dmb [SRPFW-257] Added ResourcesKeyID$ equate.
|
||||
11/18/18 dmb [SRPFW-257] Added HTTP_FRAMEWORK_SETUP_API_CALL_PROCEDURE$.
|
||||
11/18/18 dmb [SRPFW-257] Added Equ APISignatureKeyID$.
|
||||
11/18/18 dmb [SRPFW-257] Added Equ APICommentBlockKeyID$.
|
||||
11/18/18 dmb [SRPFW-257] Added Equ APIBodyBlockKeyID$.
|
||||
09/23/19 dmb [SRPFW-278] Added Equ ArchiveScriptKeyID$.
|
||||
06/15/20 dmb [SRPFW-313] Added HTTP_FRAMEWORK_SETUP_NON_AUTHENTICATED_PATHS$ as a synonym for
|
||||
HTTP_FRAMEWORK_SETUP_NON_AUTHENTICATED_URLS$ (which is being deprecated).
|
||||
06/15/20 dmb [SRPFW-313] Added HTTP_FRAMEWORK_SETUP_NON_AUTHENTICATED_QUERY_PARAMS$.
|
||||
06/30/20 dmb [SRPFW-313] Added HTTP_FRAMEWORK_SETUP_BANNED_IPS$.
|
||||
06/30/20 dmb [SRPFW-313] Added HTTP_FRAMEWORK_SETUP_WHITELISTED_IPS_TYPE$
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
Equ EVENT_CONTINUE$ to 1
|
||||
Equ EVENT_STOP$ to 0
|
||||
Equ ApplicationPath$ to Drive()
|
||||
|
||||
Equ SetupTable$ to 'SYSENV'
|
||||
Equ SetupRowKeyID$ to 'SRP_HTTP_FRAMEWORK_SETUP'
|
||||
Equ ResourcesKeyID$ to 'SRP_HTTP_FRAMEWORK_RESOURCES'
|
||||
Equ APISignatureKeyID$ to 'SRP_HTTP_FRAMEWORK_TEMPLATE_API_SIGNATURE'
|
||||
Equ APICommentBlockKeyID$ to 'SRP_HTTP_FRAMEWORK_TEMPLATE_API_COMMENT_BLOCK'
|
||||
Equ APIBodyBlockKeyID$ to 'SRP_HTTP_FRAMEWORK_TEMPLATE_API_BODY'
|
||||
Equ ArchiveScriptKeyID$ to 'SRP_HTTP_FRAMEWORK_HTTP_LOGS_ARCHIVE_SCRIPT'
|
||||
|
||||
// Identifies the primary URL of the website, e.g., www.mywebsite.com.
|
||||
Equ HTTP_FRAMEWORK_SETUP_HOME_URL$ to 1
|
||||
// Identifies the path that is appended to the Home URL wherein the entry point of the API begins, e.g., /api
|
||||
//
|
||||
// The HTTP_Service_Setup uses the above information to create proper RESTful responses wherein paths to other
|
||||
// web service APIs need to be included within the response. Thus, in the above examples, the two are joined
|
||||
// when creating fully resolved API URLs, e.g., www.mywebsite.com/api/<service>
|
||||
Equ HTTP_FRAMEWORK_SETUP_API_URL$ to 2
|
||||
// Used in HTTP_MCP to identify the local OS path where request and response content can be saved for off-line
|
||||
// analysis. If the path does not exist, then no attempt to store this information will be made.
|
||||
Equ HTTP_FRAMEWORK_SETUP_CAPTURE_PATH$ to 3
|
||||
// Boolean setting that determines if authentication is enabled. Used by HTTP_Authentication_Services.
|
||||
// Note: Only an explicit value of 0 (False) will disable authentication. Any other value, including an empty
|
||||
// value, will enable authentication.
|
||||
Equ HTTP_FRAMEWORK_SETUP_ENABLE_AUTHENTICATION$ to 4
|
||||
// Used with HTTP authentication to associate resource links to the same protective space.
|
||||
Equ HTTP_FRAMEWORK_SETUP_REALM_VALUE$ to 5
|
||||
// Name of the entry point web service. This is used by HTTP_MCP to call the first web service. This should not
|
||||
// include the standard HTTP prefix or SERVICES suffix. The default value is entry_point.
|
||||
Equ HTTP_FRAMEWORK_SETUP_ENTRY_POINT_SERVICE$ to 6
|
||||
// Boolean setting that determines if code should be flushed when the web service is finished. This allows changes
|
||||
// in web service procedures to always be available without having to restart the OEngineServer.
|
||||
Equ HTTP_FRAMEWORK_SETUP_FLUSH_CACHE$ to 7
|
||||
// @VM list of Paths that should not be authenticated. This includes Paths that support OAuth redirects since these
|
||||
// requests will unlikely be authenticated (although they should be secret and secure with the OAuth authenticating
|
||||
// server).
|
||||
Equ HTTP_FRAMEWORK_SETUP_NON_AUTHENTICATED_URLS$ to 8
|
||||
Equ HTTP_FRAMEWORK_SETUP_NON_AUTHENTICATED_PATHS$ to 8
|
||||
// Service handler for HTTP Requests that get aborted either due to Runtime Errors or Status Errors. If the Debugger
|
||||
// Intercept has been enabled, this handler will only receive Status Error aborts.
|
||||
Equ HTTP_FRAMEWORK_SETUP_ABORTED_SERVICE$ to 9
|
||||
// Boolean setting that determines if logging is enabled. This is used by the CreateLogFile service.
|
||||
// Note: Only an explicit value of 0 (False) will disable logging. Any other value, including an empty
|
||||
// value, will enable logging.
|
||||
Equ HTTP_FRAMEWORK_SETUP_ENABLE_LOGGING$ to 10
|
||||
// Debugger Setting value that will be passed into the RTI_Debugger_Setting subroutine. 0=Disabled, 1=Enabled, and
|
||||
// 2=Intercept. If value is 2, the value of HTTP_FRAMEWORK_SETUP_DEBUGGER_INTERCEPT$ will be used to determine the
|
||||
// name of the intercept stored procedure.
|
||||
Equ HTTP_FRAMEWORK_SETUP_DEBUGGER_SETTING$ to 11
|
||||
// Service handler for HTTP Requests that abort due to a Runtime Error and the Debugger Intercept has been enabled.
|
||||
// See HTTP_FRAMEWORK_SETUP_DEBUGGER_SETTING$.
|
||||
Equ HTTP_FRAMEWORK_SETUP_DEBUGGER_INTERCEPT$ to 12
|
||||
// Boolean setting that determines if only error responses (i.e., status codes of 4xx or 5xx) should be logged. This is
|
||||
// used by the CreateLogFile service. Note: Only an explicit value of 0 (False) will disable logging. Any other value,
|
||||
// including an empty value, will enable logging.
|
||||
Equ HTTP_FRAMEWORK_SETUP_LOG_ERRORS_ONLY$ to 13
|
||||
// @VM list of IPs that should be permitted. If this list is empty, then all IPs are permitted. Note, a valid IP does
|
||||
// not automatically mean the request is authenticated. That is a separate check.
|
||||
Equ HTTP_FRAMEWORK_SETUP_WHITELISTED_IPS$ to 14
|
||||
// Boolean setting that determines if HTTP Basic Authentication is enabled. Used by HTTP_Authentication_Services. This
|
||||
// is ignored if the Enable Authentication flag is set to False.
|
||||
Equ HTTP_FRAMEWORK_SETUP_ENABLE_HTTP_BASIC_AUTHENTICATION$ to 15
|
||||
// If HTTP Basic Authentication is enabled, this is how long (in hours) new passwords that are created can be valid
|
||||
// before needing to be reset. If left empty, passwords do not expire.
|
||||
Equ HTTP_FRAMEWORK_SETUP_NEW_PASSWORD_TIME_TO_LIVE$ to 16
|
||||
// If HTTP Basic Authentication is enabled, this is how long (in hours) old passwords can remain valid. This should be a
|
||||
// short period of time allowing for the new password to propogate. If left empty, old passwords will only be valid for
|
||||
// 1 hour.
|
||||
Equ HTTP_FRAMEWORK_SETUP_OLD_PASSWORD_TIME_TO_LIVE$ to 17
|
||||
// If HTTP Basic Authentication is enabled, this is how many attempts to access the system with an invalid password will
|
||||
// be allowed before containment action is taken.
|
||||
Equ HTTP_FRAMEWORK_SETUP_INVALID_PASSWORD_LIMIT$ to 18
|
||||
// If HTTP Basic Authentication is enabled, this determines the containment action to take when the number of invalid
|
||||
// password attempts has been exceeded.
|
||||
Equ HTTP_FRAMEWORK_SETUP_CONTAINMENT_ACTION$ to 19
|
||||
// The type of method used to call the API.
|
||||
Equ HTTP_FRAMEWORK_SETUP_API_CALL_PROCEDURE$ to 20
|
||||
// @VM/@TM delimited list of query params that should be used to further define which URL paths should be
|
||||
// non-authenticated.
|
||||
Equ HTTP_FRAMEWORK_SETUP_NON_AUTHENTICATED_QUERY_PARAMS$ to 21
|
||||
// @VM list of IPs that should be banned.
|
||||
Equ HTTP_FRAMEWORK_SETUP_BANNED_IPS$ to 22
|
||||
// Flag to determine if Whitelisted IPs should represent only those IPs that will be permitted (default) or if
|
||||
// Whitelisted IPs should always be permitted (i.e., do not require other forms of authentication). Empty value or 1
|
||||
// means restriced IP access, 2 means IPs are always permitted.
|
||||
Equ HTTP_FRAMEWORK_SETUP_WHITELISTED_IPS_TYPE$ to 23
|
28
FRAMEWORKS/STPROCINS/HTTP_INSERTS.txt
Normal file
28
FRAMEWORKS/STPROCINS/HTTP_INSERTS.txt
Normal file
@ -0,0 +1,28 @@
|
||||
Compile insert HTTP_Inserts
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : HTTP_Inserts
|
||||
|
||||
Description : Declares and equates used by HTTP services.
|
||||
|
||||
Notes :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
02/06/15 dmb Original programmer. - [SRPFW-77]
|
||||
02/16/15 dmb Add HTTP_Services in the declaration list. - [SRPFW-83]
|
||||
02/27/16 dmb Add SRP_Hash in the declaration list. - [SRPFW-112]
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
// Utility services.
|
||||
Declare function Namecap, HexConv, Run_OECGI_Request
|
||||
Declare function SRP_Extract_XML, SRP_Encode, SRP_Decode, SRP_Hash
|
||||
Declare function HTTP_JSON_Services, HTTP_Services, SRP_JSON
|
||||
Declare subroutine HTTP_JSON_Services, HTTP_Services, SRP_JSON
|
||||
|
||||
// Application services.
|
||||
Declare function HTTP_Authentication_Services
|
||||
Declare subroutine HTTP_Authentication_Services, HTTP_Entry_Point_Services
|
54
FRAMEWORKS/STPROCINS/HTTP_SERVICE_SETUP.txt
Normal file
54
FRAMEWORKS/STPROCINS/HTTP_SERVICE_SETUP.txt
Normal file
@ -0,0 +1,54 @@
|
||||
Compile insert HTTP_Service_Setup
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : HTTP_Service_Setup
|
||||
|
||||
Description : Sets up the current HTTP service by parsing the current URL as needed.
|
||||
|
||||
Notes : See the comments added below.
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
02/25/15 dmb Original programmer. - [SRPFW-84]
|
||||
02/22/16 dmb Swap hardcoded URL equates with Xlates from SYSENV\SRP_HTTP_FRAMEWORK_SETUP configuration
|
||||
record. - [SRPFW-103]
|
||||
02/23/16 dmb Add a work-around fix for IIS web server requests. - [SRPFW-102]
|
||||
02/25/16 dmb Replace Xlates into SYSENV\SRP_HTTP_FRAMEWORK_SETUP with GetHomeURL and GetAPIRootURL
|
||||
services. - [SRPFW-108]
|
||||
03/09/16 dmb Refactor code to be more streamlined. Remove several lines of code and optimize for changes
|
||||
to the RunHTTPService service. - [SRPFW-112]
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
Common /Debugging/ DebugFlag@
|
||||
|
||||
// Utility services.
|
||||
Declare function Error_Services, HTTP_Services, HTTP_Resource_Services, RetStack
|
||||
Declare subroutine Error_Services, HTTP_Services, HTTP_Resource_Services
|
||||
|
||||
// The API URL is fixed for any application but should be customized for the application itself. This is not always
|
||||
// passed into the request correctly, especially if a proxy service or rewrite rules are being used.
|
||||
APIURL = HTTP_Services('GetAPIRootURL', True$)
|
||||
|
||||
// The Full End Point URL indicates the URL submitted by the client.
|
||||
FullEndPointURL = HTTP_Services('GetFullEndPointURL')
|
||||
|
||||
// The HTTP method (or verb) submitted by the client.
|
||||
HTTPMethod = HTTP_Services('GetHTTPRequestMethod')
|
||||
|
||||
// The Self URL represents the Full End Point URL up to the current segment. This often used in hypermedia responses
|
||||
// so clients know how to trace back.
|
||||
LenRemainingURL = Len(RemainingURL)
|
||||
LenFullEndPointURL = Len(FullEndPointURL)
|
||||
SelfURL = FullEndPointURL[1, (LenFullEndPointURL - LenRemainingURL)]
|
||||
If SelfURL[-1, 1] = '/' then SelfURL[-1, 1] = ''
|
||||
HTTP_Services('SetSelfURL', SelfURL)
|
||||
|
||||
// The Next Segment is the segment in the URL path that will come immediately after the current segment. This could
|
||||
// represent another service or it could represent an Item ID for the current service/resource.
|
||||
NextSegment = RemainingURL[1, '/']
|
||||
|
||||
// Get the name of the current service handler in case it needs to be used for error management.
|
||||
CurrentServiceHandler = RetStack()<1>
|
77
FRAMEWORKS/STPROCINS/INET_EQUATES.txt
Normal file
77
FRAMEWORKS/STPROCINS/INET_EQUATES.txt
Normal file
@ -0,0 +1,77 @@
|
||||
compile insert Inet_Equates
|
||||
|
||||
|
||||
* CGI enviromental variables (see source\oinsight\c\oicgi\request.h)
|
||||
equ QUERY_STRING$ to 1
|
||||
equ PATH_INFO$ to 2
|
||||
equ CONTENT_TYPE$ to 3
|
||||
equ CONTENT_LENGTH$ to 4
|
||||
equ GATEWAY_INTERFACE$ to 5
|
||||
equ HTTPS$ to 6
|
||||
equ HTTP_ACCEPT$ to 7
|
||||
equ HTTP_COOKIE$ to 8
|
||||
equ HTTP_FROM$ to 9
|
||||
equ HTTP_REFERER$ to 10
|
||||
equ HTTP_USER_AGENT$ to 11
|
||||
equ PATH_TRANSLATED$ to 12
|
||||
equ REMOTE_ADDR$ to 13
|
||||
equ REMOTE_HOST$ to 14
|
||||
equ REMOTE_IDENT$ to 15
|
||||
equ REMOTE_USER$ to 16
|
||||
equ REQUEST_METHOD$ to 17
|
||||
equ SCRIPT_NAME$ to 18
|
||||
equ SERVER_NAME$ to 19
|
||||
equ SERVER_PORT$ to 20
|
||||
equ SERVER_PROTOCOL$ to 21
|
||||
equ SERVER_SOFTWARE$ to 22
|
||||
equ SERVER_URL$ to 23
|
||||
equ NOURLDECODE$ to 24 ; * // Mr C, Added 7th November 2003
|
||||
equ RESPONSE_IS_BINARY$ to 25 ; * // Mr C, Added 15th March 2006
|
||||
Equ REGISTRY_SETTINGS$ To 26 ;* bzs 031706
|
||||
|
||||
* BZS 031813 Added for OECGI4+
|
||||
Equ OECGI_VERSION$ To 27
|
||||
Equ GET_STRING$ To 28
|
||||
Equ POST_STRING$ To 29
|
||||
Equ ADDITIONAL_VALUES_STRING$ TO 30
|
||||
|
||||
* BZS 042419 Added for encryption
|
||||
Equ ENCODING_STRING$ To 31
|
||||
|
||||
* Gateway Services Monitor window name
|
||||
equ GS_MONITOR$ to 'INET_GATEWAY'
|
||||
|
||||
* OMNIEVENT calls
|
||||
equ INCOMING$ to 'INCOMING' ;* Param1 = request
|
||||
equ OUTCOMING$ to 'OUTCOMING' ;* Param1 = response
|
||||
equ INPROGRESS$ to 'INPROGRESS' ;* Param1 = time left before timeout (in secs)
|
||||
|
||||
|
||||
* persistent configuration information
|
||||
equ CFG_TABLE$ to "SYSENV"
|
||||
equ CFG_KEY$ to "CFG_INET"
|
||||
|
||||
* fields in CFG_INET
|
||||
equ CFG_CALLBACK$ to 1
|
||||
equ CFG_ERRTEXT$ to 2
|
||||
Equ CFG_DEFAULTS$ To 3 ;* bzs 061209
|
||||
Equ CFG_QUERYPARAM_FLAG$ To 4 ;* BZS 060311
|
||||
Equ CFG_INET_WHITELIST$ To 5 ;* bzs 061711
|
||||
Equ CFG_TYPE_COMPRESSION$ To 6 ;* bzs 042419
|
||||
Equ CFG_TYPE_COMPRESSION_DEFAULT$ To "deflate":@VM:"gzip" ;* bzs 042419 what we support, in the preferred order
|
||||
Equ CFG_MIN_COMPRESSION$ To 7 ;* bzs 042419
|
||||
Equ CFG_MIN_COMPRESSION_DEFAULT$ To 1000 ;* bzs 042419
|
||||
|
||||
* values in CFG_INET<CFG_CALLBACK$>
|
||||
equ CFG_FN_SECURITY$ to 1 ;* a la INET_SECURITY
|
||||
equ CFG_FN_FINALIZE$ to 2 ;* a la INET_FINALIZE
|
||||
equ CFG_FN_ABORTED$ to 3 ;* errtext=() - called when an inet procedure has crashed and the gateway recovers
|
||||
equ CFG_FN_WHITELIST$ to 4 ;* a la INET_WHITELIST
|
||||
Equ CFG_FN_HANDLER$ To 5 ;* bzs 031517 RESTful processing routine, if applicable
|
||||
|
||||
* values in CFG_INET<CFG_ERRTEXT$> (multiple lines @tm-delim'd)
|
||||
equ CFG_ERR_NORESULT$ to 1
|
||||
|
||||
* bzs 061209 values in CFG_INET<CFG_DEFAULTS$>
|
||||
Equ CFG_DEF_CGI$ To 1 ; * a la ".CGI"
|
||||
Equ CFG_DEF_PAGE$ To 2 ; * a la "/login"
|
15
FRAMEWORKS/STPROCINS/INVOICES_EQUATES.txt
Normal file
15
FRAMEWORKS/STPROCINS/INVOICES_EQUATES.txt
Normal file
@ -0,0 +1,15 @@
|
||||
compile insert INVOICES_EQUATES
|
||||
/*----------------------------------------
|
||||
Author : Table Create Insert Routine
|
||||
Written : 13/02/2020
|
||||
Description : Insert for Table INVOICES
|
||||
----------------------------------------*/
|
||||
|
||||
|
||||
Equ INVOICES.INVOICE_NO$ To 0
|
||||
Equ INVOICES.CLIENT_NO$ To 1
|
||||
Equ INVOICES.INVOICE_DATE$ To 2
|
||||
Equ INVOICES.SHIPPING_DESTINATION$ To 3
|
||||
Equ INVOICES.CONTACTS$ To 4
|
||||
Equ INVOICES.PHONE_NUMBERS$ To 5
|
||||
Equ INVOICES.TERMS$ To 6
|
43
FRAMEWORKS/STPROCINS/MENU_EQUATES.txt
Normal file
43
FRAMEWORKS/STPROCINS/MENU_EQUATES.txt
Normal file
@ -0,0 +1,43 @@
|
||||
Compile Insert Menu_Equates
|
||||
|
||||
* // These should have been in PS_EQUATES
|
||||
|
||||
Equ MENUPOS_TYPE$ To 1
|
||||
Equ MENUPOS_END$ To 2
|
||||
Equ MENUPOS_ITEMNAME$ To 3
|
||||
Equ MENUPOS_TEXT$ To 4
|
||||
Equ MENUPOS_GREY$ To 5
|
||||
Equ MENUPOS_CHECK$ To 6
|
||||
Equ MENUPOS_HIDDEN$ To 7
|
||||
Equ MENUPOS_ACCEL$ To 8
|
||||
Equ MENUPOS_HELP_TEXT$ To 9
|
||||
Equ MENUPOS_HANDLER$ To 10
|
||||
Equ MENUPOS_STYLE$ To 11
|
||||
|
||||
* // These are used by CREATE_CONTEXT_MENU, and denote the structure of a menu item as passed in the
|
||||
* // second parameter
|
||||
|
||||
* Menu equates
|
||||
|
||||
Equ MenuItem_Name$ to 1
|
||||
Equ MenuItem_Pos$ to 2
|
||||
Equ MenuItem_Text$ to 3
|
||||
Equ MenuItem_State$ to 4
|
||||
|
||||
Equ MF_ByCommand$ to 0x000
|
||||
Equ MF_ByPosition$ to 0x0400
|
||||
Equ MF_Separator$ to 2048
|
||||
|
||||
Equ MenuItemTypePos$ To 1
|
||||
Equ MenuItemTextPos$ To 2
|
||||
Equ MenuItemNamePos$ To 3
|
||||
Equ MenuItemGrayPos$ To 4
|
||||
Equ MenuItemCheckPos$ To 5
|
||||
Equ MenuItemStylePos$ To 6
|
||||
Equ MenuItemEndFlagPos$ To 7
|
||||
|
||||
Equ ContextMenuSuffix$ To ".CONTEXT_MENU"
|
||||
Equ ContextMenuClass$ To "FLOATING"
|
||||
Equ ContextMenuType$ To "MENU"
|
||||
|
||||
Equ ContextMenuHeaderType$ To ".POPUP"
|
3
FRAMEWORKS/STPROCINS/SECURITY_EQUATES.txt
Normal file
3
FRAMEWORKS/STPROCINS/SECURITY_EQUATES.txt
Normal file
@ -0,0 +1,3 @@
|
||||
compile insert SECURITY_EQUATES
|
||||
|
||||
Common /Application Security/ Username%, Login%, AccessLevel%, SecurityUnused4%, SecurityUnused5%, SecurityUnused6%, SecurityUnused7%, SecurityUnused8%
|
43
FRAMEWORKS/STPROCINS/SERVICE_SETUP.txt
Normal file
43
FRAMEWORKS/STPROCINS/SERVICE_SETUP.txt
Normal file
@ -0,0 +1,43 @@
|
||||
Compile insert Service_Setup
|
||||
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : Service_Setup
|
||||
|
||||
Description : Equates used by the Service modules.
|
||||
|
||||
Notes :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
08/13/10 dmb Original programmer.
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
Declare function RetStack, Error_Services
|
||||
Declare subroutine Error_Services
|
||||
|
||||
|
||||
// Make sure any request parameters which have not been assigned are nulled.
|
||||
If Assigned(Service) else Service = ''
|
||||
If Assigned(Error) else Error = ''
|
||||
If Assigned(Param1) else Param1 = ''
|
||||
If Assigned(Param2) else Param2 = ''
|
||||
If Assigned(Param3) else Param3 = ''
|
||||
If Assigned(Param4) else Param4 = ''
|
||||
If Assigned(Param5) else Param5 = ''
|
||||
If Assigned(Param6) else Param6 = ''
|
||||
If Assigned(Param7) else Param7 = ''
|
||||
If Assigned(Param8) else Param8 = ''
|
||||
If Assigned(Param9) else Param9 = ''
|
||||
If Assigned(Param10) else Param10 = ''
|
||||
If Assigned(Response) else Response = ''
|
||||
|
||||
// Create the service Key ID in case Memory_Services is used.
|
||||
ServiceModule = RetStack()<1>
|
||||
ServiceKeyID = ServiceModule : '*' : Service
|
||||
|
||||
// Clear any error conditions.
|
||||
Error_Services('Clear')
|
42
FRAMEWORKS/STPROCINS/SRPMAIL_INSERTS.txt
Normal file
42
FRAMEWORKS/STPROCINS/SRPMAIL_INSERTS.txt
Normal file
@ -0,0 +1,42 @@
|
||||
Compile insert SRPMAIL_INSERTS
|
||||
|
||||
Declare function SRPSendMail, SRP_Send_Mail
|
||||
|
||||
*----------------------------------------------------
|
||||
* Configuration
|
||||
|
||||
* field
|
||||
Equ SendUsing$ to 1
|
||||
Equ SMTPServerPickupDir$ to 2
|
||||
Equ SMTPServerPort$ to 3
|
||||
Equ SMTPServer$ to 4
|
||||
Equ SMTPAuthenticate$ to 5
|
||||
Equ SMTPSendUsername$ to 6
|
||||
Equ SMTPSendPassword$ to 7
|
||||
|
||||
* SendUsing values
|
||||
Equ SendUsing_Pickup$ to 1
|
||||
Equ SendUsing_Port$ to 2
|
||||
|
||||
* SMTPServerPort values
|
||||
Equ SMTPServerPortDefault$ to 25
|
||||
|
||||
*----------------------------------------------------
|
||||
* Message
|
||||
|
||||
* fields
|
||||
Equ SRPMail_Subject$ to 1
|
||||
Equ SRPMail_From$ to 2
|
||||
Equ SRPMail_To$ to 3
|
||||
Equ SRPMail_Cc$ to 4
|
||||
Equ SRPMail_Bcc$ to 5
|
||||
Equ SRPMail_ReplyTo$ to 6
|
||||
Equ SRPMail_BodyType$ to 7
|
||||
Equ SRPMail_Body$ to 8
|
||||
Equ SRPMail_Attachments$ to 9
|
||||
Equ SRPMail_Importance$ to 10
|
||||
|
||||
* Importance Levels
|
||||
Equ SRPMail_Importance_Low$ to 0
|
||||
Equ SRPMail_Importance_Normal$ to 1
|
||||
Equ SRPMail_Importance_High$ to 2
|
36
FRAMEWORKS/STPROCINS/WEB_ACCOUNTS_EQUATES.txt
Normal file
36
FRAMEWORKS/STPROCINS/WEB_ACCOUNTS_EQUATES.txt
Normal file
@ -0,0 +1,36 @@
|
||||
compile insert WEB_ACCOUNTS_EQUATES
|
||||
/***********************************************************************************************************************
|
||||
|
||||
This program is proprietary and is not to be used by or disclosed to others, nor is it to be copied without written
|
||||
permission from SRP Computer Solutions, Inc.
|
||||
|
||||
Name : WEB_ACCOUNTS_EQUATES
|
||||
|
||||
Description : Equates used by any service that works with the WEB_ACCOUNTS database table.
|
||||
|
||||
Notes :
|
||||
|
||||
History : (Date, Initials, Notes)
|
||||
10/30/18 dmb Original programmer. - [SRPFW-254]
|
||||
11/01/18 dmb Add WEB_ACCOUNTS.ACCOUNT_ENABLED$. - [SRPFW-256]
|
||||
11/01/18 dmb Add WEB_ACCOUNTS.INVALID_PASSWORD_ATTEMPTS$. - [SRPFW-256]
|
||||
|
||||
***********************************************************************************************************************/
|
||||
|
||||
Equ WEB_ACCOUNTS.ID$ To 0
|
||||
Equ WEB_ACCOUNTS.MODIFIED_BY$ To 1
|
||||
Equ WEB_ACCOUNTS.MODIFIED_DATE$ To 2
|
||||
Equ WEB_ACCOUNTS.MODIFIED_TIME$ To 3
|
||||
Equ WEB_ACCOUNTS.NAME$ To 4
|
||||
Equ WEB_ACCOUNTS.CURRENT_PASSWORD$ To 5
|
||||
Equ WEB_ACCOUNTS.CURRENT_PASSWORD_CREATE_DATE$ To 6
|
||||
Equ WEB_ACCOUNTS.CURRENT_PASSWORD_CREATE_TIME$ To 7
|
||||
Equ WEB_ACCOUNTS.CURRENT_PASSWORD_EXPIRE_DATE$ To 8
|
||||
Equ WEB_ACCOUNTS.CURRENT_PASSWORD_EXPIRE_TIME$ To 9
|
||||
Equ WEB_ACCOUNTS.OLD_PASSWORD$ To 10
|
||||
Equ WEB_ACCOUNTS.OLD_PASSWORD_CREATE_DATE$ To 11
|
||||
Equ WEB_ACCOUNTS.OLD_PASSWORD_CREATE_TIME$ To 12
|
||||
Equ WEB_ACCOUNTS.OLD_PASSWORD_EXPIRE_DATE$ To 13
|
||||
Equ WEB_ACCOUNTS.OLD_PASSWORD_EXPIRE_TIME$ To 14
|
||||
Equ WEB_ACCOUNTS.ACCOUNT_ENABLED$ To 15
|
||||
Equ WEB_ACCOUNTS.INVALID_PASSWORD_ATTEMPTS$ To 16
|
Reference in New Issue
Block a user