Code formating, fix SBBS no longer has SS_UNUSED, return acts as #

This commit is contained in:
Deon George
2022-04-10 21:09:59 +10:00
parent 89bc36bb53
commit 5883b5ca9b
3 changed files with 284 additions and 130 deletions

View File

@@ -34,7 +34,7 @@ var ANSI_CANCEL_MSG = '\1n\1h\1GPRESS 2 TO CANCEL';
// Our frame object
function ANSIFrame() {
this.version=1; // The version of this frame - in case we update functionality and we need to be
// backwards compatible
// backwards compatible
this.frame=null; // Frame Number [0-9]+
this.index=null; // Frame Index [a-z]
this.owner=0; // The Service Provider owning the frame.
@@ -42,13 +42,13 @@ function ANSIFrame() {
this.content=''; // The frame content, base64 encoded
// Frame's owned by the system where:
// isPublic is FALSE - the user must be logged in to view it
// isPublic is TRUE - can be viewed by non-logged in users
// isPublic is FALSE - the user must be logged in to view it
// isPublic is TRUE - can be viewed by non-logged in users
// Frame's owned by Service Providers where:
// isPublic is FALSE - can only be viewed if a user is
// a member of the Service Providers CUG
// isPublic is TRUE - can be viewed by users (if logged in)
// isPublic is FALSE - can only be viewed if a user is
// a member of the Service Providers CUG
// isPublic is TRUE - can be viewed by users (if logged in)
this.isPublic=false; // Is this frame accessible to non CUG users
// If FALSE user must be a member of the CUG to view the frame
@@ -275,7 +275,7 @@ function ANSIFrame() {
break;
default:
log(LOG_DEBUG,'? CSI: '.matches[2]);
log(LOG_DEBUG,'? CSI: '+matches[2]);
}
break;

View File

@@ -2,39 +2,91 @@
* ANSItex definitions
*/
var ACTION_EXIT =99; /* Exit the script */
var ACTION_RELOAD =1; /* Reload the current frame */
var ACTION_GOTO =2; /* Goto a specific frame */
var ACTION_BACKUP =3; /* Goto previous frame */
var ACTION_NEXT =4; /* Goto next frame */
var ACTION_TERMINATE =5; /* Terminate the session */
var ACTION_SUBMITRF =6; /* Submit form contents */
var ACTION_STAR =7; /* Star command entry */
var ACTION_EDIT =8; /* Edit a frame */
/* Unit of cost */
const FRAME_COSTUNIT ='c';
var MODE_BL =1; /* Typing * command on baseline */
var MODE_FIELD =2; /* Field Input */
var MODE_SUBMITRF =3; /* Asking if form should be submitted */
var MODE_RFNOTSENT =4; /* Response frame not sent */
var MODE_RFSENT =5; /* Response frame sent */
var MODE_RFERROR =6; /* Response frame error */
/** ACTIONS **/
var FRAME_COSTUNIT ='c'; /* Unit of cost */
/* Exit the script */
const ACTION_EXIT =99;
/* Reload the current frame */
const ACTION_RELOAD =1;
/* Goto a specific frame */
const ACTION_GOTO =2;
/* Goto previous frame */
const ACTION_BACKUP =3;
/* Goto next frame */
const ACTION_NEXT =4;
/* Terminate the session */
const ACTION_TERMINATE =5;
/* Submit form contents */
const ACTION_SUBMITRF =6;
/* Star command entry */
const ACTION_STAR =7;
/* Edit a frame */
const ACTION_EDIT =8;
var FRAME_TYPE_INFO ='i'; // Information Frame, requires no response after viewed
var FRAME_TYPE_TERMINATE ='t'; // Terminate Frame, contents displayed and then carrier dropped
var FRAME_TYPE_EXTERNAL ='x'; // Frame the calls an External Method
// Contents indicate the method to be called with arguments
var FRAME_TYPE_RESPONSE ='r'; // Response frame, input fields are embedded in the frame and after input the
// response will be submitted to the Service Provider, or to a method
var FRAME_TYPE_LOGIN ='l'; // Login frame, enables the user to authenticate to the system, or to a CUG
/** MODES **/
var NO_HISTORY_FRAMES =['980a','98b','981a','982a','983a','998a'];
var SYSTEM_OWNER =9;
var INKEY_TIMEOUT =10000;
var INACTIVE_NOLOGIN =30000;
var INACTIVE_LOGIN =5*60000;
/* Typing * command on baseline */
const MODE_BL =1;
/* Field Input */
const MODE_FIELD =2;
/* Asking if form should be submitted */
const MODE_SUBMITRF =3;
/* Response frame not sent */
const MODE_RFNOTSENT =4;
/* Response frame sent */
const MODE_RFSENT =5;
/* Response frame error */
const MODE_RFERROR =6;
var SYSTEM_ZONE =516;
/** FRAME TYPES **/
/* Information Frame, requires no response after viewed */
const FRAME_TYPE_INFO ='i';
/* Terminate Frame, contents displayed and then carrier dropped */
const FRAME_TYPE_TERMINATE ='t';
/**
* Frame the calls an External Method
* Contents indicate the method to be called with arguments
*/
const FRAME_TYPE_EXTERNAL ='x';
/**
* Response frame, input fields are embedded in the frame and after input the
* response will be submitted to the Service Provider, or to a method
*/
const FRAME_TYPE_RESPONSE ='r';
/* Login frame, enables the user to authenticate to the system, or to a CUG */
const FRAME_TYPE_LOGIN ='l';
/* Disable *# going backwards for the following frames */
var NO_HISTORY_FRAMES =['980a','98b','981a','982a','983a','998a'];
/* Frames prefixed with this are owned by the system */
const SYSTEM_OWNER =9;
/* Time to wait for a key press */
const INKEY_TIMEOUT =10000;
/* Idle time for un-authenticated users */
const INACTIVE_NOLOGIN =30000;
/* Idle time for authenticated users */
const INACTIVE_LOGIN =5*60000;
var SYSTEM_ZONE =516;
/* Home Frame */
const HOME_FRAME ={frame: 1,index: 'a'};
/* Login Frame */
const LOGIN_FRAME ={frame: 98,index: 'a'};
/* Registration Frame */
const REGISTER_FRAME ={frame: 981,index: 'a'};
/* SQRL Login */
const SQRL_FRAME ={frame: 982,index: 'a'};
/* Login Failed */
const LOGIN_FAILED_FRAME ={frame: 983,index: 'a'};
/* Home page after authentication */
const HOME_FRAME_AUTH ={frame: 98,index: 'b'};
/* Home page for initial connection */
const HOME_FRAME_CONNECT ={frame: 980,index: 'a'};
this;