LibSip_MessageBodyTypes.ttcn 2.18 KB
Newer Older
tepelmann's avatar
tepelmann committed
/******************************************************************************
 *  @author     STF 346, STF366, STF368, STF369, STF450, STF471
 *  @version    $Id: LibSip_MessageBodyTypes.ttcn 622 2014-07-10 14:50:54Z nikolajev $
 *  @desc       This module provides the types used for alternative SIP message
 *              body variants and combinations.
 *              This module is part of LibSipV3.           
tepelmann's avatar
tepelmann committed
 */
tepelmann's avatar
tepelmann committed
module LibSip_MessageBodyTypes {
    import from LibSip_SDPTypes all;
    import from LibSip_SimpleMsgSummaryTypes all;
    import from LibSip_XMLTypes all;

    /*
     * Simple body types that can be used instead of the more detailed XML and SDP
     * without codec support
     * */
    //type charstring XmlBody;
    //type charstring SDP_Message;
tepelmann's avatar
tepelmann committed
    group MIMETypes {
        type union MIME_Encapsulated_Parts {
            SDP_Message sdpMessageBody,
            XmlBody xmlBody, // if there is XML body
            MsdBody msdBody // RFC 8147: Minimum Set of Data octets
tepelmann's avatar
tepelmann committed
        }

        type record MIME_Encapsulated_Part {
            charstring content_type,
            charstring content_disposition optional,
            charstring content_id optional,
tepelmann's avatar
tepelmann committed
            MIME_Encapsulated_Parts mime_encapsulated_part
        }

        type record MIME_Message {
            charstring boundary, // len:
tepelmann's avatar
tepelmann committed
            MimeEncapsulatedList mimeEncapsulatedList
        }

        type record of MIME_Encapsulated_Part MimeEncapsulatedList;


    } // group MIMETypes

    type union MessageBody {
        SDP_Message sdpMessageBody, // if there is only SDP part
tepelmann's avatar
tepelmann committed
        // XMLMessage xmlMessage, // if there is XML message (with header and body)
        XmlBody xmlBody, // if there is XML body
        MIME_Message mimeMessageBody, // if there is SDP and encapsulated ISUP part
        charstring sipfrag, // if content-Type is message/sipfrag (cp. NOTIFY, cp TS124147 A.4.3.1.2)
        charstring textplain, // if content type is text/plain (for testing long messages)
        SimpleMsgSummary simpleMsgSummary, // RFC 3842
        octetstring smsMessage // encoded SMS message 3GPP 23.040, 24.011
tepelmann's avatar
tepelmann committed
    }