LibNg112_Templates.ttcn 5.9 KB
Newer Older
Garcia's avatar
Garcia committed
module LibNg112_Templates {
Garcia's avatar
Garcia committed
  
  // LibCommon
  import from LibCommon_DataStrings all;

  // LibSip
  import from LibSip_SIPTypesAndValues all;
  import from LibSip_Templates all;
  import from LibSip_Steps all;
  import from LibSip_PIXITS all;
  import from LibSip_XMLTypes all;
  import from LibSip_MessageBodyTypes all;
  import from LibSip_Common all;

  // LibIms
  import from LibIms_SIPTypesAndValues all;
  import from LibIms_Templates all;

  // LibXMLTypes
  import from XSD all;
  import from urn_ietf_params_xml_ns_pidf language "XSD" all
  with {
    extension "File:../xsd/pidf.xsd";
  }
  
  group ng112_invite {
    
    /**
     * @desc INVITE message exchanged at Mw
     * @param p_requestUri
     * @param p_callId
     * @param p_cSeq
     * @param p_from
     * @param p_to
     * @param p_via
     * @param p_contact
     * @param p_require
     * @param p_route
     * @param p_recordRoute
     * @param p_supported
     * @param p_pChargingVector
     * @param p_mb
     */
    template(value) INVITE_Request m_INVITE_Request_IMS_Ng112(
        template(value) SipUrl p_requestUri,
        template(value) CallId p_callId,
        template(value) CSeq p_cSeq,
        template(value) From p_from,
        template(value) To p_to,
        template(value) Via p_via,
        template(value) LibSip_SIPTypesAndValues.Contact p_contact,
        template(omit) Require p_require := omit,
        template(omit) Route p_route := omit,
        template(omit) RecordRoute p_recordRoute := omit,
        template(omit) Supported p_supported := omit,
        template(omit) PChargingVector p_pChargingVector := omit,
        template(value) MessageBody p_mb,
        template(omit) Geolocation p_geolocation := omit,
        template(omit) GeolocationRouting p_geolocationRouting := omit,
        template(omit) UserAgent p_userAgent := omit
    ) modifies m_INVITE_Request_IMS := {
        msgHeader := {
          geolocation := p_geolocation,
          geolocationRouting := p_geolocationRouting,
          userAgent := p_userAgent
        }
    } // End of template m_INVITE_Request_IMS_Ng112
    
Yann Garcia's avatar
Yann Garcia committed
    template(value) MESSAGE_Request m_MESSAGE_Request_IMS_Ng112(
                                                                template(value) SipUrl p_requestUri,
                                                                template(value) CallId p_callId,
                                                                template(value) CSeq p_cSeq,
                                                                template(value) From p_from,
                                                                template(value) To p_to,
                                                                template(value) Via p_via,
                                                                template(omit) Require p_require := omit,
                                                                template(omit) Route p_route := omit,
                                                                template(omit) Supported p_supported := omit,
                                                                template(value) MessageBody p_mb
                                                                ) modifies m_MESSAGE_Request_MBody_UE := {
        msgHeader := {
          contentLength := m_contentLength(f_MessageBodyLength(p_mb)),
          contentType := m_contentType(c_plainText),
          pAccessNetworkInfo := m_pAccessNetworkInfo_IEEE_11a,
          require := p_require,
          route := p_route,
          supported := p_supported
        },
        messageBody := p_mb
    } // End of template m_MESSAGE_Request_IMS_Ng112

    
  }
  
  group geolocation {
    
    template (omit) Geolocation m_geolocation(
                                              in template (value) SipUrl p_addrSpec,
                                              in template (omit) SemicolonParam_List p_geolocParam := omit
                                              ) := {
      fieldName := GEOLOCATION_E,
      addrSpec := p_addrSpec,
      geolocParam := p_geolocParam
    } // End of template m_geolocation
    
    template Geolocation mw_geolocation(
                                        template (present) SipUrl p_addrSpec := ?,
                                        template SemicolonParam_List p_geolocParam := *
                                        ) := {
      fieldName := GEOLOCATION_E,
      addrSpec := p_addrSpec,
      geolocParam := p_geolocParam
    } // End of template mw_geolocation
    
  }
  
  group ng112_presence {
    
    template (value) Presence m_presence(
                                         in template (value) XSD.AnyURI p_entity,
                                         in template (value) Presence.tuple_list p_tuple_list := { }
                                         ) := {
      entity := "pres:alice@atlanta.example.com",
      tuple_list := p_tuple_list,
      note_list := { },
      elem_list := { }
/*                    "<dm:device xmlns:dm=\"urn:ietf:params:xml:ns:pidf:data-model\" xmlns:gp=\"urn:ietf:params:xml:ns:pidf:geopriv10\" xmlns:gml=\"http://www.opengis.net/gml\" xmlns:gbp=\"urn:ietf:params:xml:ns:pidf:geopriv10:basicPolicy\" id=\"target123-1\">
      <gp:geopriv>
        <gp:location-info>
          <gml:location>
            <gml:Point srsName=\"urn:ogc:def:crs:EPSG::4326\">
              <gml:pos>32.86726 -97.16054</gml:pos>
            </gml:Point>
         </gml:location>
        </gp:location-info>
        <gp:usage-rules>
          <gbp:retransmission-allowed>false
          </gbp:retransmission-allowed>
          <gbp:retention-expiry>2010-11-14T20:00:00Z
          </gbp:retention-expiry>
        </gp:usage-rules>
        <gp:method>802.11</gp:method>
      </gp:geopriv>
      <dm:deviceID>mac:1234567890ab</dm:deviceID>
      <dm:timestamp>2010-11-04T20:57:29Z</dm:timestamp>
    </dm:device>"
                    }*/
                  
    } // End of template m_presence
    
  }
  
Garcia's avatar
Garcia committed
  
Garcia's avatar
Garcia committed
} // End of module LibNg112_Templates