core

package
v0.0.0-...-9d926e1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 21, 2015 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HOSTNAME = iota
	IPV4ADDRESS
	IPV6ADDRESS
)
View Source
const CORELEXER_ALPHA = CORELEXER_END + 3
View Source
const CORELEXER_AND = (int)('&')
View Source
const CORELEXER_AT = (int)('@')
View Source
const CORELEXER_BACKSLASH = (int)('\\')
View Source
const CORELEXER_BACK_QUOTE = (int)('`')
View Source
const CORELEXER_BAR = (int)('|')
View Source
const CORELEXER_COLON = (int)(':')
View Source
const CORELEXER_DIGIT = CORELEXER_END + 2
View Source
const CORELEXER_DOLLAR = (int)('$')
View Source
const CORELEXER_DOT = (int)('.')
View Source
const CORELEXER_DOUBLEQUOTE = (int)('"')
View Source
const CORELEXER_END = CORELEXER_START + 2048
View Source
const CORELEXER_EQUALS = (int)('=')
View Source
const CORELEXER_EXCLAMATION = (int)('!')
View Source
const CORELEXER_GREATER_THAN = (int)('>')
View Source
const CORELEXER_HAT = (int)('^')
View Source
const CORELEXER_HT = (int)('\t')
View Source
const CORELEXER_ID = CORELEXER_END - 1 // IMPORTANT -- This should be < END
View Source
const CORELEXER_LESS_THAN = (int)('<')
View Source
const CORELEXER_LPAREN = (int)('(')
View Source
const CORELEXER_L_CURLY = (int)('{')
View Source
const CORELEXER_L_SQUARE_BRACKET = (int)('[')
View Source
const CORELEXER_MINUS = (int)('-')
View Source
const CORELEXER_NULL = (int)(0) //('\0')	;
View Source
const CORELEXER_PERCENT = (int)('%')
View Source
const CORELEXER_PLUS = (int)('+')
View Source
const CORELEXER_POUND = (int)('#')
View Source
const CORELEXER_QUESTION = (int)('?')
View Source
const CORELEXER_QUOTE = (int)('\'')
View Source
const CORELEXER_RPAREN = (int)(')')
View Source
const CORELEXER_R_CURLY = (int)('}')
View Source
const CORELEXER_R_SQUARE_BRACKET = (int)(']')
View Source
const CORELEXER_SEMICOLON = (int)(';')
View Source
const CORELEXER_SLASH = (int)('/')
View Source
const CORELEXER_SP = (int)(' ')
View Source
const CORELEXER_STAR = (int)('*')
View Source
const CORELEXER_START = 2048

* A lexical analyzer that is used by all parsers in our implementation.

IMPORTANT - All keyword matches should be between START and END

View Source
const CORELEXER_TILDE = (int)('~')
View Source
const CORELEXER_UNDERSCORE = (int)('_')
View Source
const CORELEXER_WHITESPACE = CORELEXER_END + 1

Individial token classes.

View Source
const SIPCalendar_AM = 0
View Source
const SIPCalendar_AM_PM = 9
View Source
const SIPCalendar_APRIL = 3
View Source
const SIPCalendar_AUGUST = 7
View Source
const SIPCalendar_DATE = 5
View Source
const SIPCalendar_DAY_OF_MONTH = 5
View Source
const SIPCalendar_DAY_OF_WEEK = 7
View Source
const SIPCalendar_DAY_OF_WEEK_IN_MONTH = 8
View Source
const SIPCalendar_DAY_OF_YEAR = 6
View Source
const SIPCalendar_DECEMBER = 11
View Source
const SIPCalendar_DST_OFFSET = 16
View Source
const SIPCalendar_ERA = 0
View Source
const SIPCalendar_FEBRUARY = 1
View Source
const SIPCalendar_FIELD_COUNT = 17
View Source
const SIPCalendar_FRIDAY = 6
View Source
const SIPCalendar_HOUR = 10
View Source
const SIPCalendar_HOUR_OF_DAY = 11
View Source
const SIPCalendar_JANUARY = 0
View Source
const SIPCalendar_JULY = 6
View Source
const SIPCalendar_JUNE = 5
View Source
const SIPCalendar_MARCH = 2
View Source
const SIPCalendar_MAY = 4
View Source
const SIPCalendar_MILLISECOND = 14
View Source
const SIPCalendar_MINUTE = 12
View Source
const SIPCalendar_MONDAY = 2
View Source
const SIPCalendar_MONTH = 2
View Source
const SIPCalendar_NOVEMBER = 10
View Source
const SIPCalendar_OCTOBER = 9
View Source
const SIPCalendar_PM = 1
View Source
const SIPCalendar_SATURDAY = 7
View Source
const SIPCalendar_SECOND = 13
View Source
const SIPCalendar_SEPTEMBER = 8
View Source
const SIPCalendar_SUNDAY = 1
View Source
const SIPCalendar_THURSDAY = 5
View Source
const SIPCalendar_TUESDAY = 3
View Source
const SIPCalendar_UNDECIMBER = 12
View Source
const SIPCalendar_WEDNESDAY = 4
View Source
const SIPCalendar_WEEK_OF_MONTH = 4
View Source
const SIPCalendar_WEEK_OF_YEAR = 3
View Source
const SIPCalendar_YEAR = 1
View Source
const SIPCalendar_ZONE_OFFSET = 15
View Source
const SIPDateNames_APR = "Apr"
View Source
const SIPDateNames_AUG = "Aug"
View Source
const SIPDateNames_DEC = "Dec"
View Source
const SIPDateNames_FEB = "Feb"
View Source
const SIPDateNames_FRI = "Fri"
View Source
const SIPDateNames_GMT = "GMT"
View Source
const SIPDateNames_JAN = "Jan"
View Source
const SIPDateNames_JUL = "Jul"
View Source
const SIPDateNames_JUN = "Jun"
View Source
const SIPDateNames_MAR = "Mar"
View Source
const SIPDateNames_MAY = "May"
View Source
const SIPDateNames_MON = "Mon"
View Source
const SIPDateNames_NOV = "Nov"
View Source
const SIPDateNames_OCT = "Oct"
View Source
const SIPDateNames_SAT = "Sat"
View Source
const SIPDateNames_SEP = "Sep"
View Source
const SIPDateNames_SUN = "Sun"
View Source
const SIPDateNames_THU = "Thu"
View Source
const SIPDateNames_TUE = "Tue"
View Source
const SIPDateNames_WED = "Wed"
View Source
const SIPHeaderNames_ACCEPT = "Accept" //11
View Source
const SIPHeaderNames_ACCEPT_ENCODING = "Accept-Encoding" //10
View Source
const SIPHeaderNames_ACCEPT_LANGUAGE = "Accept-Language" //12
View Source
const SIPHeaderNames_ALERT_INFO = "Alert-Info" //9
View Source
const SIPHeaderNames_ALLOW = "Allow" //5
View Source
const SIPHeaderNames_ALLOW_EVENTS = "Allow-Events" //45
View Source
const SIPHeaderNames_AUTHENTICATION_INFO = "Authentication-Info" //43
View Source
const SIPHeaderNames_AUTHORIZATION = "Authorization" //19
View Source
const SIPHeaderNames_C = "C"
View Source
const SIPHeaderNames_CALL_ID = "Call-ID" //18
View Source
const SIPHeaderNames_CALL_INFO = "Call-Info" //7
View Source
const SIPHeaderNames_CONTACT = "Contact" //28
View Source
const SIPHeaderNames_CONTENT_DISPOSITION = "Content-Disposition" //35
View Source
const SIPHeaderNames_CONTENT_ENCODING = "Content-Encoding" //25
View Source
const SIPHeaderNames_CONTENT_LANGUAGE = "Content-Language" //6
View Source
const SIPHeaderNames_CONTENT_LENGTH = "Content-Length" //26
View Source
const SIPHeaderNames_CONTENT_TYPE = "Content-Type" //24
View Source
const SIPHeaderNames_CSEQ = "CSeq" //8
View Source
const SIPHeaderNames_DATE = "Date" //40
View Source
const SIPHeaderNames_E = "E"
View Source
const SIPHeaderNames_ERROR_INFO = "Error-Info" //2
View Source
const SIPHeaderNames_EVENT = "Event" //44
View Source
const SIPHeaderNames_EXPIRES = "Expires" //41
View Source
const SIPHeaderNames_F = "F"
View Source
const SIPHeaderNames_FROM = "From" //17
View Source
const SIPHeaderNames_I = "I"
View Source
const SIPHeaderNames_IN_REPLY_TO = "In-Reply-To" //4
View Source
const SIPHeaderNames_K = "K"
View Source
const SIPHeaderNames_L = "L"
View Source
const SIPHeaderNames_M = "M"
View Source
const SIPHeaderNames_MAX_FORWARDS = "Max-Forwards" //30
View Source
const SIPHeaderNames_MIME_VERSION = "MIME-Version" //3
View Source
const SIPHeaderNames_MIN_EXPIRES = "Min-Expires" //1
View Source
const SIPHeaderNames_ORGANIZATION = "Organization" //31
View Source
const SIPHeaderNames_PRIORITY = "Priority" //39
View Source
const SIPHeaderNames_PROXY_AUTHENTICATE = "Proxy-Authenticate" //20
View Source
const SIPHeaderNames_PROXY_AUTHORIZATION = "Proxy-Authorization" //32
View Source
const SIPHeaderNames_PROXY_REQUIRE = "Proxy-Require" //33
View Source
const SIPHeaderNames_R = "R"
View Source
const SIPHeaderNames_RACK = "RAck" //45
View Source
const SIPHeaderNames_REASON = "Reason" //47
View Source
const SIPHeaderNames_RECORD_ROUTE = "Record-Route" //13
View Source
const SIPHeaderNames_REFER_TO = "Refer-To" //46
View Source
const SIPHeaderNames_REPLY_TO = "Reply-To" //44
View Source
const SIPHeaderNames_REQUIRE = "Require" //34
View Source
const SIPHeaderNames_RETRY_AFTER = "Retry-After" //23
View Source
const SIPHeaderNames_ROUTE = "Route" //27
View Source
const SIPHeaderNames_RSEQ = "RSeq" //46
View Source
const SIPHeaderNames_S = "S"
View Source
const SIPHeaderNames_SERVER = "Server" //21
View Source
const SIPHeaderNames_SUBJECT = "Subject" //36
View Source
const SIPHeaderNames_SUBSCRIPTION_STATE = "Subscription-State" //48
View Source
const SIPHeaderNames_SUPPORTED = "Supported" //42
View Source
const SIPHeaderNames_T = "T"
View Source
const SIPHeaderNames_TIMESTAMP = "Timestamp" //14
View Source
const SIPHeaderNames_TO = "To" //15
View Source
const SIPHeaderNames_UNSUPPORTED = "Unsupported" //22
View Source
const SIPHeaderNames_USER_AGENT = "User-Agent" //37
View Source
const SIPHeaderNames_V = "V"
View Source
const SIPHeaderNames_VIA = "Via" //16
View Source
const SIPHeaderNames_WARNING = "Warning" //38
View Source
const SIPHeaderNames_WWW_AUTHENTICATE = "WWW-Authenticate" //29
View Source
const SIPMethodNames_ACK = "ACK"
View Source
const SIPMethodNames_BYE = "BYE"
View Source
const SIPMethodNames_INVITE = "INVITE"
View Source
const SIPMethodNames_MESSAGE = "MESSAGE"
View Source
const SIPMethodNames_NOTIFY = "NOTIFY"
View Source
const SIPMethodNames_OPTIONS = "OPTIONS"
View Source
const SIPMethodNames_REGISTER = "REGISTER"
View Source
const SIPMethodNames_SUBSCRIBE = "SUBSCRIBE"
View Source
const SIPParameters_ACTION = "action"
View Source
const SIPParameters_ALERT = "alert"
View Source
const SIPParameters_ALGORITHM = "algorithm"
View Source
const SIPParameters_BRANCH = "branch"
View Source
const SIPParameters_CARD = "card"
View Source
const SIPParameters_CAUSE = "cause"
View Source
const SIPParameters_CNONCE = "cnonce"
View Source
const SIPParameters_COOKIE = "cookie"
View Source
const SIPParameters_DIGEST = "Digest"
View Source
const SIPParameters_DOMAIN = "domain"
View Source
const SIPParameters_DURATION = "duration"
View Source
const SIPParameters_EMERGENCY = "emergency"
View Source
const SIPParameters_EXPIRES = "expires"
View Source
const SIPParameters_HANDLING = "handling"
View Source
const SIPParameters_HIDDEN = "hidden"
View Source
const SIPParameters_ICON = "icon"
View Source
const SIPParameters_ID = "id"
View Source
const SIPParameters_INFO = "info"
View Source
const SIPParameters_MADDR = "maddr"
View Source
const SIPParameters_NC = "nc"
View Source
const SIPParameters_NEXT_NONCE = "nextnonce"

Issue reported by larryb

View Source
const SIPParameters_NONCE = "nonce"
View Source
const SIPParameters_NONCE_COUNT = "nc"

Issue reported by larryb

View Source
const SIPParameters_NON_URGENT = "non-urgent"
View Source
const SIPParameters_NORMAL = "normal"
View Source
const SIPParameters_OPAQUE = "opaque"
View Source
const SIPParameters_OPTIONAL = "optional"
View Source
const SIPParameters_PASSWORD = "password"
View Source
const SIPParameters_PROXY = "proxy"
View Source
const SIPParameters_PUBKEY = "pubkey"
View Source
const SIPParameters_PURPOSE = "purpose"
View Source
const SIPParameters_Q = "q"
View Source
const SIPParameters_QOP = "qop"
View Source
const SIPParameters_REALM = "realm"
View Source
const SIPParameters_RECEIVED = "received"
View Source
const SIPParameters_REDIRECT = "redirect"
View Source
const SIPParameters_RENDER = "render"
View Source
const SIPParameters_REQUIRED = "required"
View Source
const SIPParameters_RESPONSE = "response"
View Source
const SIPParameters_RESPONSE_AUTH = "rspauth"
View Source
const SIPParameters_SESSION = "session"
View Source
const SIPParameters_SIGNATURE = "signature"
View Source
const SIPParameters_SIGNED_BY = "signed-by"
View Source
const SIPParameters_STALE = "stale"
View Source
const SIPParameters_TAG = "tag"
View Source
const SIPParameters_TEXT = "text"
View Source
const SIPParameters_TRANSPORT = "transport"
View Source
const SIPParameters_TTL = "ttl"
View Source
const SIPParameters_URGENT = "urgent"
View Source
const SIPParameters_URI = "uri"
View Source
const SIPParameters_USERNAME = "username"
View Source
const SIPParameters_VERSION = "version"
View Source
const SIPSeparatorNames_AND = "&"
View Source
const SIPSeparatorNames_AT = "@"
View Source
const SIPSeparatorNames_COLON = ":"
View Source
const SIPSeparatorNames_COMMA = ","
View Source
const SIPSeparatorNames_DOT = "."
View Source
const SIPSeparatorNames_DOUBLE_QUOTE = "\""
View Source
const SIPSeparatorNames_EQUALS = "="
View Source
const SIPSeparatorNames_GREATER_THAN = ">"
View Source
const SIPSeparatorNames_HT = "\t"
View Source
const SIPSeparatorNames_LESS_THAN = "<"
View Source
const SIPSeparatorNames_LPAREN = "("
View Source
const SIPSeparatorNames_NEWLINE = "\r\n"
View Source
const SIPSeparatorNames_PERCENT = "%"
View Source
const SIPSeparatorNames_POUND = "#"
View Source
const SIPSeparatorNames_QUESTION = "?"
View Source
const SIPSeparatorNames_QUOTE = "'" //\'
View Source
const SIPSeparatorNames_RETURN = "\n"
View Source
const SIPSeparatorNames_RPAREN = ")"
View Source
const SIPSeparatorNames_SEMICOLON = ";"
View Source
const SIPSeparatorNames_SLASH = "/"
View Source
const SIPSeparatorNames_SP = " "
View Source
const SIPSeparatorNames_STAR = "*"
View Source
const SIPTransportNames_ISUB = "isub"
View Source
const SIPTransportNames_LR = "lr"
View Source
const SIPTransportNames_MADDR = "maddr"
View Source
const SIPTransportNames_METHOD = "method"
View Source
const SIPTransportNames_PHONE = "phone"
View Source
const SIPTransportNames_PHONE_CONTEXT_TAG = "context-tag"
View Source
const SIPTransportNames_POSTDIAL = "postdial"
View Source
const SIPTransportNames_PROVIDER_TAG = "provider-tag"
View Source
const SIPTransportNames_SIP = "sip"
View Source
const SIPTransportNames_SIPS = "sips"
View Source
const SIPTransportNames_TCP = "tcp"
View Source
const SIPTransportNames_TEL = "tel"
View Source
const SIPTransportNames_TRANSPORT = "transport"
View Source
const SIPTransportNames_TTL = "ttl"
View Source
const SIPTransportNames_UDP = "udp"
View Source
const SIPTransportNames_USER = "user"
View Source
const TRACE_DEBUG = 32

* Debug trace level (all tracing enabled).

View Source
const TRACE_EXCEPTION = 17

* Trace exception processing

View Source
const TRACE_MESSAGES = 16

* Trace message processing

View Source
const TRACE_NONE = 0

* * Log System Errors. Also used for debugging log.

* Dont trace

Variables

View Source
var Debug = Debugger{true, false}
View Source
var LogWrite = LogWriter{nil, TRACE_NONE, "debug.log", false, 0}

Functions

This section is empty.

Types

type CoreLexer

type CoreLexer struct {
	StringTokenizer
	// contains filtered or unexported fields
}

func NewCoreLexer

func NewCoreLexer(lexerName string, buffer string) *CoreLexer

func (*CoreLexer) AddKeyword

func (this *CoreLexer) AddKeyword(name string, value int)

func (*CoreLexer) AddLexer

func (this *CoreLexer) AddLexer(lexerName string) LexerMap

func (*CoreLexer) ByteStringNoComma

func (this *CoreLexer) ByteStringNoComma() string

func (*CoreLexer) ByteStringNoSemicolon

func (this *CoreLexer) ByteStringNoSemicolon() string

func (*CoreLexer) CharAsString

func (this *CoreLexer) CharAsString(ch byte) string

func (*CoreLexer) Comment

func (this *CoreLexer) Comment() (s string, err error)

Assume the cursor is at a "("

func (*CoreLexer) CurrentLexer

func (this *CoreLexer) CurrentLexer() LexerMap

func (*CoreLexer) GetBuffer

func (this *CoreLexer) GetBuffer() string

* Get the buffer.

func (*CoreLexer) GetLexerName

func (this *CoreLexer) GetLexerName() string

func (*CoreLexer) GetNextId

func (this *CoreLexer) GetNextId() string

* Get the next id.

func (*CoreLexer) GetNextToken

func (this *CoreLexer) GetNextToken() *Token

call this after you call match

func (*CoreLexer) GetPtr

func (this *CoreLexer) GetPtr() int

* Get the read pointer.

func (*CoreLexer) GetRest

func (this *CoreLexer) GetRest() string

* Get the rest of the String

  • @return String

func (*CoreLexer) GetString

func (this *CoreLexer) GetString(c byte) (s string, err error)

* Get the sub-String until the character is encountered.

  • Acknowledgement - Sylvian Corre submitted a bug fix for this
  • method.
  • @param char c the character to match
  • @return matching string.

func (*CoreLexer) LookupToken

func (this *CoreLexer) LookupToken(value int) string

func (*CoreLexer) MarkInputPosition

func (this *CoreLexer) MarkInputPosition() int

* Mark the position for backtracking.

func (*CoreLexer) Match

func (this *CoreLexer) Match(tok int) (t *Token, ParseException error)

* Match the given token or throw an exception if no such token

  • can be matched.

func (*CoreLexer) NCharAsString

func (this *CoreLexer) NCharAsString(nchars int) string

* Lookahead in the inputBuffer for n chars and return as a string.

  • Do not consume the input.

func (*CoreLexer) Number

func (this *CoreLexer) Number() (n int, ParseException error)

* Get and consume the next number.

func (*CoreLexer) PeekNextId

func (this *CoreLexer) PeekNextId() string

* Peek the next id but dont move the buffer pointer forward.

func (*CoreLexer) PeekNextToken

func (this *CoreLexer) PeekNextToken() (*Token, error)

* Look ahead for one token.

func (*CoreLexer) PeekNextTokenK

func (this *CoreLexer) PeekNextTokenK(ntokens int) ([]*Token, error)

func (*CoreLexer) QuotedString

func (this *CoreLexer) QuotedString() (s string, err error)

Assume the cursor is at a quote.

func (*CoreLexer) RewindInputPosition

func (this *CoreLexer) RewindInputPosition(position int)

* Rewind the input ptr to the marked position.

func (*CoreLexer) SPorHT

func (this *CoreLexer) SPorHT()

func (*CoreLexer) SelectLexer

func (this *CoreLexer) SelectLexer(lexerName string)

func (*CoreLexer) SetLexerName

func (this *CoreLexer) SetLexerName(lexerName string)

func (*CoreLexer) StartsId

func (this *CoreLexer) StartsId() bool

func (*CoreLexer) Super

func (this *CoreLexer) Super(lexerName, buffer string)

func (*CoreLexer) Ttoken

func (this *CoreLexer) Ttoken() string

func (*CoreLexer) TtokenAllowSpace

func (this *CoreLexer) TtokenAllowSpace() string

type CoreParser

type CoreParser struct {
	// contains filtered or unexported fields
}

* Generic parser class. * All parsers inherit this class.

func NewCoreParser

func NewCoreParser(buffer string) *CoreParser

func (*CoreParser) Dbg_enter

func (this *CoreParser) Dbg_enter(rule string)

func (*CoreParser) Dbg_leave

func (this *CoreParser) Dbg_leave(rule string)

func (*CoreParser) GetLexer

func (this *CoreParser) GetLexer() Lexer

func (*CoreParser) NameValue

func (this *CoreParser) NameValue(separator byte) (nv *NameValue, ParseException error)

func (*CoreParser) PeekLine

func (this *CoreParser) PeekLine(rule string)

func (*CoreParser) SetLexer

func (this *CoreParser) SetLexer(lexer Lexer)

func (*CoreParser) Super

func (this *CoreParser) Super(buffer string)

type Debugger

type Debugger struct {
	Debug       bool
	ParserDebug bool
}

type Host

type Host struct {
	// contains filtered or unexported fields
}

func NewHost

func NewHost(hname string) *Host

* Constructor given host name or IP address.

func (*Host) Clone

func (this *Host) Clone() interface{}

func (*Host) GetAddress

func (this *Host) GetAddress() string

* get the Address field

  • @return String

func (*Host) GetHostName

func (this *Host) GetHostName() string

* get the HostName field

  • @return String

func (*Host) GetInetAddress

func (this *Host) GetInetAddress() net.IP

* Get the inet address from this host.

  • Caches the inet address returned from dns lookup to avoid
  • lookup delays. * *@throws UnkownHostexception when the host name cannot be resolved.

func (*Host) GetIpAddress

func (this *Host) GetIpAddress() string

*

  • Convenience function to get the raw IP destination address
  • of a SIP message as a String.
  • @return String

func (*Host) IsHostName

func (this *Host) IsHostName() bool

* Return true if the address is a DNS host name

  • (and not an IPV4 address) *@return true if the hostname is a DNS name

func (*Host) IsIPAddress

func (this *Host) IsIPAddress() bool

* Return true if the address is a DNS host name

  • (and not an IPV4 address) *@return true if the hostname is host address.

func (*Host) SetAddress

func (this *Host) SetAddress(address string)

*

  • Set the address member
  • @param address address String to set

func (*Host) SetHostAddress

func (this *Host) SetHostAddress(address string)
  • Set the IP Address. *@param address is the address string to set.

func (*Host) SetHostName

func (this *Host) SetHostName(hname string)

*

  • Set the hostname member.
  • @param h String to set

func (*Host) String

func (this *Host) String() string

*

  • Return the host name in encoded form.
  • @return String

type HostNameParser

type HostNameParser struct {
	CoreParser
}

* SIPParser for host names.

func NewHostNameParser

func NewHostNameParser(hname string) *HostNameParser

func NewHostNameParserFromLexer

func NewHostNameParserFromLexer(lexer Lexer) *HostNameParser

* The lexer is initialized with the buffer.

func (*HostNameParser) DomainLabel

func (this *HostNameParser) DomainLabel() (s string, ParseException error)

func (*HostNameParser) GetHost

func (this *HostNameParser) GetHost() (h *Host, err error)

func (*HostNameParser) GetHostPort

func (this *HostNameParser) GetHostPort() (hp *HostPort, ParseException error)

func (*HostNameParser) Ipv6Reference

func (this *HostNameParser) Ipv6Reference() (s string, ParseException error)

type HostPort

type HostPort struct {
	// contains filtered or unexported fields
}

func NewHostPort

func NewHostPort() *HostPort

* Default constructor

func (*HostPort) Clone

func (this *HostPort) Clone() interface{}

func (*HostPort) GetHost

func (this *HostPort) GetHost() *Host

* get the Host field

  • @return host field

func (*HostPort) GetInetAddress

func (this *HostPort) GetInetAddress() net.IP
  • Return the internet address corresponding to the host. *@throws java.net.UnkownHostException if host name cannot be resolved. *@return the inet address for the host.

func (*HostPort) GetPort

func (this *HostPort) GetPort() int

* get the port field

  • @return int

func (*HostPort) HasPort

func (this *HostPort) HasPort() bool

*

  • Returns boolean value indicating if Header has port
  • @return boolean value indicating if Header has port

func (*HostPort) RemovePort

func (this *HostPort) RemovePort()

* remove port.

func (*HostPort) SetHost

func (this *HostPort) SetHost(h *Host)

*

  • Set the host member
  • @param h Host to set

func (*HostPort) SetPort

func (this *HostPort) SetPort(p int)

*

  • Set the port member
  • @param p int to set

func (*HostPort) String

func (this *HostPort) String() string

*

  • Encode this hostport into its string representation.
  • Note that this could be different from the string that has
  • been parsed if something has been edited.
  • @return String

type Lexer

type Lexer interface {
	//StringTokenizer
	Consume()
	ConsumeK(k int)
	HasMoreChars() bool
	IsAlpha(ch byte) bool
	IsDigit(ch byte) bool
	IsHexDigit(ch byte) bool
	LookAhead() (byte, error)
	LookAheadK(k int) (byte, error)
	PeekLine() string
	GetLine() string
	GetNextTokenByDelim(delim byte) (string, error)

	//Lexer
	SetLexerName(lexerName string)
	GetLexerName() string
	AddKeyword(name string, value int)
	AddLexer(lexerName string) LexerMap
	ByteStringNoComma() string
	ByteStringNoSemicolon() string
	CharAsString(ch byte) string
	NCharAsString(nchars int) string
	Comment() (s string, ParseException error)
	CurrentLexer() LexerMap
	GetBuffer() string
	GetNextId() string
	GetNextToken() *Token
	GetPtr() int
	GetRest() string
	GetString(c byte) (s string, ParseException error)
	LookupToken(value int) string
	MarkInputPosition() int
	Match(tok int) (t *Token, ParseException error)
	Number() (n int, ParseException error)
	PeekNextId() string
	PeekNextToken() (*Token, error)
	PeekNextTokenK(ntokens int) ([]*Token, error)
	QuotedString() (s string, ParseException error)
	RewindInputPosition(position int)
	SPorHT()
	SelectLexer(lexerName string)
	StartsId() bool
	Ttoken() string
	TtokenAllowSpace() string
}

type LexerMap

type LexerMap map[string]int

type LogWriter

type LogWriter struct {
	// contains filtered or unexported fields
}

* Name of the log file in which the trace is written out

  • (default is /tmp/sipserverlog.txt)

func (*LogWriter) GetTraceLevel

func (this *LogWriter) GetTraceLevel() int

* Get the trace level for the stack.

func (*LogWriter) LogMessage

func (this *LogWriter) LogMessage(message string)

* Log a message into the log file.

  • @param message message to log into the log file.

func (*LogWriter) LogMessageToFile

func (this *LogWriter) LogMessageToFile(message, logFileName string)

func (*LogWriter) SetLogFileName

func (this *LogWriter) SetLogFileName(name string)

* Set the log file name *@param name is the name of the log file to set.

func (*LogWriter) SetTraceLevel

func (this *LogWriter) SetTraceLevel(level int)

* Set the trace level for the stack.

type NameValue

type NameValue struct {
	// contains filtered or unexported fields
}

func NewNameValue

func NewNameValue(n string, v interface{}) *NameValue

func (*NameValue) Clone

func (this *NameValue) Clone() interface{}

func (*NameValue) GetName

func (this *NameValue) GetName() string

func (*NameValue) GetValue

func (this *NameValue) GetValue() interface{}

func (*NameValue) IsValueQuoted

func (this *NameValue) IsValueQuoted() bool

* Return true if the value is quoted in doublequotes.

func (*NameValue) SetName

func (this *NameValue) SetName(n string)

* * Set the name member

func (*NameValue) SetQuotedValue

func (this *NameValue) SetQuotedValue()

* A flag that indicates that doublequotes should be put around the * value when encoded *(for example name=value when value is doublequoted).

func (*NameValue) SetSeparator

func (this *NameValue) SetSeparator(sep string)

* * Set the separator for the encoding method below.

func (*NameValue) SetValue

func (this *NameValue) SetValue(v interface{})

* * Set the value member

func (*NameValue) String

func (this *NameValue) String() string

*

  • Get the encoded representation of this namevalue object.
  • Added doublequote for encoding doublequoted values
  • (bug reported by Kirby Kiem). *@since 1.0 *@return an encoded name value (eg. name=value) string.

type NameValueList

type NameValueList struct {
	list.List
	// contains filtered or unexported fields
}

func NewNameValueList

func NewNameValueList(listName string) *NameValueList

func (*NameValueList) AddNameAndValue

func (this *NameValueList) AddNameAndValue(name string, value interface{})

* * Add a name value record to this list.

func (*NameValueList) AddNameValue

func (this *NameValueList) AddNameValue(nv *NameValue)

func (*NameValueList) Clone

func (this *NameValueList) Clone() interface{}

func (*NameValueList) Concatenate

func (this *NameValueList) Concatenate(nvl *NameValueList, topFlag bool)

func (*NameValueList) Delete

func (this *NameValueList) Delete(name string) bool

* * Remove the element corresponding to this name. * @since 1.0

func (*NameValueList) GetIndentation

func (this *NameValueList) GetIndentation() string

func (*NameValueList) GetNameValue

func (this *NameValueList) GetNameValue(name string) *NameValue

* * Get the NameValue record given a name. * @since 1.0

func (*NameValueList) GetNames

func (this *NameValueList) GetNames() *list.List

*

*Get a list of parameter names.
*@return a list iterator that has the names of the parameters.

func (*NameValueList) GetParameter

func (this *NameValueList) GetParameter(name string) string
  • Get the parameter as a String. *@return the parameter as a string.

func (*NameValueList) GetValue

func (this *NameValueList) GetValue(name string) interface{}

* * Do a lookup on a given name and return value associated with it.

func (*NameValueList) HasNameValue

func (this *NameValueList) HasNameValue(name string) bool

* * Returns a boolean telling if this NameValueList * has a record with this name * @since 1.0

func (*NameValueList) SetNameAndValue

func (this *NameValueList) SetNameAndValue(name string, value interface{})

* * Set a namevalue object in this list.

func (*NameValueList) SetNameValue

func (this *NameValueList) SetNameValue(nv *NameValue)

* * Set a namevalue object in this list.

func (*NameValueList) SetSeparator

func (this *NameValueList) SetSeparator(sep string)

*

  • Set the separator (for encoding the list)
  • @since v1.0
  • @param sep is the new seperator (default is semicolon)

func (*NameValueList) Sprint

func (this *NameValueList) Sprint(s string)

func (*NameValueList) String

func (this *NameValueList) String() string

*

  • Encode the list in semicolon separated form.
  • @return an encoded string containing the objects in this list.
  • @since v1.0

type StringTokenizer

type StringTokenizer struct {
	// contains filtered or unexported fields
}

* Base string token splitter.

func NewStringTokenizer

func NewStringTokenizer(buffer string) *StringTokenizer

func (*StringTokenizer) Consume

func (this *StringTokenizer) Consume()

func (*StringTokenizer) ConsumeK

func (this *StringTokenizer) ConsumeK(k int)

func (*StringTokenizer) GetLine

func (this *StringTokenizer) GetLine() string

func (*StringTokenizer) GetLines

func (this *StringTokenizer) GetLines() map[int]string

* Get a Vector of the buffer tokenized by lines

func (*StringTokenizer) GetNextChar

func (this *StringTokenizer) GetNextChar() (byte, error)

func (*StringTokenizer) GetNextTokenByDelim

func (this *StringTokenizer) GetNextTokenByDelim(delim byte) (string, error)

* Get the next token from the buffer.

func (*StringTokenizer) GetSDPFieldName

func (this *StringTokenizer) GetSDPFieldName(line string) string

* get the SDP field name of the line

  • @return String

func (*StringTokenizer) HasMoreChars

func (this *StringTokenizer) HasMoreChars() bool

func (*StringTokenizer) IsAlpha

func (this *StringTokenizer) IsAlpha(ch byte) bool

func (*StringTokenizer) IsDigit

func (this *StringTokenizer) IsDigit(ch byte) bool

func (*StringTokenizer) IsHexDigit

func (this *StringTokenizer) IsHexDigit(ch byte) bool

func (*StringTokenizer) LookAhead

func (this *StringTokenizer) LookAhead() (byte, error)

func (*StringTokenizer) LookAheadK

func (this *StringTokenizer) LookAheadK(k int) (byte, error)

func (*StringTokenizer) NextToken

func (this *StringTokenizer) NextToken() string

func (*StringTokenizer) PeekLine

func (this *StringTokenizer) PeekLine() string

type Token

type Token struct {
	// contains filtered or unexported fields
}

func NewToken

func NewToken(tvalue string, ttype int) *Token

func (*Token) Clone

func (this *Token) Clone() interface{}

func (*Token) GetTokenType

func (this *Token) GetTokenType() int

func (*Token) GetTokenValue

func (this *Token) GetTokenValue() string

func (*Token) SetTokenType

func (this *Token) SetTokenType(ttype int)

func (*Token) SetTokenValue

func (this *Token) SetTokenValue(tvalue string)

func (*Token) String

func (this *Token) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL