Search in sources :

Example 16 with NameValue

use of gov.nist.core.NameValue in project XobotOS by xamarin.

the class URLParser method uriParam.

private NameValue uriParam() throws ParseException {
    if (debug)
        dbg_enter("uriParam");
    try {
        String pvalue = "";
        String pname = paramNameOrValue();
        char next = lexer.lookAhead(0);
        boolean isFlagParam = true;
        if (next == '=') {
            lexer.consume(1);
            pvalue = paramNameOrValue();
            isFlagParam = false;
        }
        if (pname.length() == 0 && (pvalue == null || pvalue.length() == 0))
            return null;
        else
            return new NameValue(pname, pvalue, isFlagParam);
    } finally {
        if (debug)
            dbg_leave("uriParam");
    }
}
Also used : NameValue(gov.nist.core.NameValue)

Example 17 with NameValue

use of gov.nist.core.NameValue in project XobotOS by xamarin.

the class PAccessNetworkInfoParser method parse.

public SIPHeader parse() throws ParseException {
    if (debug)
        dbg_enter("AccessNetworkInfoParser.parse");
    try {
        headerName(TokenTypes.P_ACCESS_NETWORK_INFO);
        PAccessNetworkInfo accessNetworkInfo = new PAccessNetworkInfo();
        accessNetworkInfo.setHeaderName(SIPHeaderNamesIms.P_ACCESS_NETWORK_INFO);
        this.lexer.SPorHT();
        lexer.match(TokenTypes.ID);
        Token token = lexer.getNextToken();
        accessNetworkInfo.setAccessType(token.getTokenValue());
        this.lexer.SPorHT();
        while (lexer.lookAhead(0) == ';') {
            this.lexer.match(';');
            this.lexer.SPorHT();
            NameValue nv = super.nameValue('=');
            accessNetworkInfo.setParameter(nv);
            this.lexer.SPorHT();
        }
        this.lexer.SPorHT();
        this.lexer.match('\n');
        return accessNetworkInfo;
    } finally {
        if (debug)
            dbg_leave("AccessNetworkInfoParser.parse");
    }
}
Also used : NameValue(gov.nist.core.NameValue) PAccessNetworkInfo(gov.nist.javax.sip.header.ims.PAccessNetworkInfo) Token(gov.nist.core.Token)

Example 18 with NameValue

use of gov.nist.core.NameValue in project XobotOS by xamarin.

the class PChargingFunctionAddressesParser method parseParameter.

protected void parseParameter(PChargingFunctionAddresses chargingFunctionAddresses) throws ParseException {
    if (debug)
        dbg_enter("parseParameter");
    try {
        NameValue nv = this.nameValue('=');
        //chargingFunctionAddresses.setParameter(nv);
        chargingFunctionAddresses.setMultiParameter(nv);
    } finally {
        if (debug)
            dbg_leave("parseParameter");
    }
}
Also used : NameValue(gov.nist.core.NameValue)

Aggregations

NameValue (gov.nist.core.NameValue)18 Token (gov.nist.core.Token)3 Iterator (java.util.Iterator)3 ListIterator (java.util.ListIterator)3 ParseException (java.text.ParseException)2 LinkedList (java.util.LinkedList)2 Host (gov.nist.core.Host)1 HostNameParser (gov.nist.core.HostNameParser)1 HostPort (gov.nist.core.HostPort)1 NameValueList (gov.nist.core.NameValueList)1 SipUri (gov.nist.javax.sip.address.SipUri)1 PAccessNetworkInfo (gov.nist.javax.sip.header.ims.PAccessNetworkInfo)1