"
(C) 2010-2012 by Holger Hans Peter Freyther
All Rights Reserved
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see .
"
Object subclass: GSMAuthenticatorBase [
| connection onAccept onReject |
>#takeLocks: selector to take the required locks.'>
LegalMessages := {OsmoGSM.GSM48CMServiceReq.
OsmoGSM.GSM48RRPagingResponse.
OsmoGSM.GSM48LURequest.
"As part of Local-Call-Routing deal with CC Setup"
OsmoGSM.GSM48CCSetup.
}.
appropriateInitialMessage: aMsg [
"Check if the message is one of the allowed initial messages."
^ LegalMessages includes: aMsg class
]
connection: aCon [
connection := aCon.
]
connection [
^ connection
]
onAccept: aBlock [
"Called when the connection is accepted"
onAccept := aBlock
]
onReject: aBlock [
"Called when the connection is rejected"
onReject := aBlock
]
start: aMsg [
"Start authentication with the initial message."
^ self subclassResponsibility
]
onData: aMsg [
"Called with data from the GSM connection"
^ self subclassResponsibility
]
cancel [
"The GSM Connection has failed cancel everything."
^ self subclassResponsibility
]
nextPut: aMsg [
connection nextPutData: (BSSAPDTAP initWith: aMsg
linkIdentifier: 0).
]
]