LibItsHttp_TypesAndValues.ttcn 1.58 KB
Newer Older
garciay's avatar
garciay committed
/**
 *    @author   ETSI / STF545
 *    @version  $URL$
 *              $ID:$
 *    @desc     This module provides the types and values used by ITS HTTP based protocols.
 *    @copyright   ETSI Copyright Notification
 *                 No part may be reproduced except as authorized by written permission.
 *                 The copyright and the foregoing restriction extend to reproduction in all media.
 *                 All rights reserved.
 *    @see      ETSI TS 103 478
 */
garciay's avatar
garciay committed
module LibItsHttp_TypesAndValues {
garciay's avatar
garciay committed
    
    const integer c_http_version_major := 1;
    const integer c_http_version_minor := 1;
    
    type record of charstring charstring_list;
    type record HeaderLine {
      charstring        header_name,
      charstring_list   header_value
    } with { 
        variant "FIELDORDER(msb)" 
    }
    
    type record of HeaderLine HeaderLines;
    
    type record Request {
      charstring method,
      charstring uri,
      integer version_major,
      integer version_minor,
      HeaderLines header,
      charstring body optional
    } with { 
        variant "FIELDORDER(msb)" 
    }
    
    type record Response {
      integer version_major,
      integer version_minor,
      integer statuscode,
      charstring statustext,
      HeaderLines header,
      charstring body optional
    } with { 
        variant "FIELDORDER(msb)" 
    }
    
    type union HttpMessage {
      Response response,
      Request request
    } with { 
        variant "FIELDORDER(msb)" 
    }
    
} with {
        variant ""
        encode "HttcpCodec"
garciay's avatar
garciay committed
} // End of module LibItsHttp_TypesAndValues