############################################ # # Dialing constants section...to be moved elsewhere # # Modified by AltEPG Project # ************************************************************ # AltEPG Project Source Code Version Control # $FileID: git::root/tvlib/tcl/tv/StatusStrings.itcl $ # $Revision: altepg1.0c root 2011-09-17 23:39:32 +0100 Finalising altepg1.0c $ # Description: See above # ************************************************************ # ############################################ # unfortunately, accessing global variables in TCL is unbelievably # painful. So, this is a function that maps string literals into a # variable itself # usage: for variable ABC: [ ABC] is equal to $ABC # use this for dereferencing so-called "constants" below... proc {q} { puts "CONST called with q=$q" upvar #0 $q vari return $vari } # defines to go into some include file namespace eval TLCCodes { variable Calling "CL|" variable JustPrintIt "EX|" variable Importing "IM|" variable Indexing "IX|" variable Status "ST|" variable Hangup "HU|" variable Download "DL|" } # # Status definitions for In progress, failed, succeeded # namespace eval StatusStrings { variable InProgress "In Progress" variable Failed "Failed" variable Succeeded "Succeeded" variable SucceededEnum 1 # For goofy reasons, these should remain exactly as they are: # "Awaiting reboot" and "Pending restart"...sigh variable AwaitingReboot "Awaiting reboot" variable PendingRestart "Pending restart" } # # These are mysterious TMK event "subtypes", whatever that means # namespace eval DialupTMKSubtypes { variable Succeeded 7 variable Failed 8 variable Change 9 } namespace eval StatusStringEnums { variable Blank 0 variable Succeeded 1 variable PendingRestart 2 variable InitializationFailure 3 variable SettingUp 4 variable InProgress 5 variable UnknownError 6 # and it goes on... # 7 "Failure during Housekeeping" # 8 "Failure during Preparation" # 9 "Failed. Line unavailable" # 10 "Failed. No dial tone" # 11 "Failed. Couldn't dial" # 12 "Failed. Wrong number" # 13 "Failed. Service is not answering" # 14 "Failed. Service unavailable" # 15 "Failed. Service denied" # 16 "Failed. Call interrupted" # 17 "Failed while expanding data" # 18 "Failed while preparing data" # 19 "Failed while loading series" # 20 "Failed while indexing shows" # 21 "Failed to set clock" # 22 "Failed getting account status" # 23 "Failure downloading messages" # 24 "Failed. Phone is busy"" # 25 "Failed while indexing days" # 26 "Failed getting account status" # "phase" strings # 27 "In Progress" # 28 "Housekeeping" # 29 "Preparing to call" # 30 "Dialing..." # 31 "Answering..." # 32 "Answered" # 33 "Connecting..." # 34 "Getting account status" # 35 "Setting clock..." # 36 "Downloading messages" # 37 "Processing..." # 38 "Downloading..." # 39 "Hanging up" # 40 "Expanding data" # 41 "Preparing data" # 42 "Loading data" # 43 "Indexing series" # 44 "Indexing shows" # 45 "Indexing days" # 46 "Failed. Modem is not responding" # 47 "Configuring modem" # 48 "Failed. No dial-in number chosen." # 49 "Finishing up..." # 50 } namespace eval ModemStatusStrings { variable OffHook 9 variable Connected 1 variable NoDialtone 10 variable NoConnect 14 variable NoAnswer 13 variable Busy 24 variable Unknown 6 variable Unknwon 6 # essentially, timeout is the same as no answer in the dial portion. variable TimeOut 13 variable NoCarrier 12 variable ModemFreeze 46 } # # # Phase Table...build up from Kyrie's document # format: set PhaseName { 2LetterCode NameString FailureString [SuccessString]} # # namespace eval PhaseNames { variable mCurrentPhaseRecord "" variable mOverrideStatusString "" variable TClientResultFile "/var/tmp/tcresult" variable Initialize [list $TLCCodes::JustPrintIt 27 3] variable Cleanup [list $TLCCodes::JustPrintIt 28 7] variable CheckScheduling [list $TLCCodes::JustPrintIt 29 50] variable ChangeNetwork [list $TLCCodes::JustPrintIt 29 11] variable PrepareCall [list $TLCCodes::JustPrintIt 29 8] variable SelectPhone [list $TLCCodes::JustPrintIt 29 48] variable CheckHook [list $TLCCodes::Calling 30 9] variable CheckTone [list $TLCCodes::Calling 30 10] variable Dial [list $TLCCodes::Calling 30 24] variable Answering [list $TLCCodes::Calling 31 13] variable Answered [list $TLCCodes::Calling 32 12] variable StartPPP [list $TLCCodes::Status 33 13] variable StartAuth [list $TLCCodes::Status 33 14] variable AccountStatus [list $TLCCodes::Status 34 26] variable BackHaul [list $TLCCodes::Status 34 26] variable SetClock [list $TLCCodes::Status 35 21] variable RetrieveMessages [list $TLCCodes::Download 36 23] variable Autenticated [list $TLCCodes::Download 37 15] variable Download [list $TLCCodes::Download 38 16] variable Hangup [list $TLCCodes::Hangup 39 0 49] variable Decompress [list $TLCCodes::Importing 40 17 49] variable PrepareData [list $TLCCodes::Importing 41 18 49] variable LoadToDB [list $TLCCodes::Importing 42 19 49] variable IndexSeries [list $TLCCodes::Indexing 43 20 49] variable IndexShows [list $TLCCodes::Indexing 44 20 49] variable IndexDays [list $TLCCodes::Indexing 45 25 49] variable Complete [list $TLCCodes::JustPrintIt 2 0 1] }