Commit 6cc74c74 authored by Benjamin REIS's avatar Benjamin REIS

Add away activity to all presence status

parent a196643a
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="urn:ietf:params:xml:ns:pidf:data-model"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="common-schema.xsd"/>
<xs:element name="deviceID" type="deviceID_t">
<xs:annotation>
<xs:documentation>Device ID, a URN</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="device">
<xs:annotation>
<xs:documentation>Contains information about the
device</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:any namespace="##other" processContents="lax"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="deviceID"/>
<xs:element name="note" type="Note_t" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="timestamp" type="Timestamp_t" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:complexType>
</xs:element>
<xs:element name="person">
<xs:annotation>
<xs:documentation>Contains information about the human
user</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:any namespace="##other" processContents="lax"
minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Characteristic and status
information</xs:documentation>
</xs:annotation>
</xs:any>
<xs:element name="note" type="Note_t" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="timestamp" type="Timestamp_t" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>
This diff is collapsed.
......@@ -190,8 +190,11 @@ if(ENABLE_PRESENCE)
list(APPEND FLEXISIP_SOURCES xml/rlmi+xml.xsd)
ADD_XSD_WRAPPERS(resource-lists "Presence XSD - resource-lists.xsd")
list(APPEND FLEXISIP_SOURCES xml/resource-lists.xsd)
list(APPEND FLEXISIP_DEPENDENCIES xml pidf+xml rlmi+xml resource-lists)
ADD_XSD_WRAPPERS(rpid "RPID XSD - rpid.xsd")
list(APPEND FLEXISIP_SOURCES xml/rpid.xsd)
ADD_XSD_WRAPPERS(data-model "Data model XSD - data-model.xsd")
list(APPEND FLEXISIP_SOURCES xml/data-model.xsd)
list(APPEND FLEXISIP_DEPENDENCIES xml pidf+xml rlmi+xml resource-lists rpid data-model)
endif()
if(ENABLE_PUSHNOTIFICATION)
......
......@@ -22,12 +22,16 @@
#include <functional>
#include "etag-manager.hh"
#include "pidf+xml.hxx"
#include "rpid.hxx"
#include "data-model.hxx"
#include <memory>
#include "presentity-manager.hh"
#include "log/logmanager.hh"
#define ETAG_SIZE 8
using namespace pidf;
using namespace rpid;
using namespace data_model;
namespace flexisip {
......@@ -294,7 +298,11 @@ string PresentityPresenceInformation::getPidf() throw(FlexisipException) {
stringstream out;
try {
char *entity = belle_sip_uri_to_string(getEntity());
pidf::Presence presence((string(entity)));
Person person = Person(entity);
Activities act = Activities();
act.getAway().push_back(rpid::Empty());
person.getActivities().push_back(act);
pidf::Presence presence(person, (string(entity)));
belle_sip_free(entity);
list<string> tupleList;
......
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:ietf:params:xml:ns:pidf:data-model"
<xs:schema targetNamespace="urn:ietf:params:xml:ns:pidf:data-model"
xmlns="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:rpid="urn:ietf:params:xml:ns:pidf:rpid"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<!-- This import brings in the XML language attribute xml:lang-->
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<xs:import namespace="urn:ietf:params:xml:ns:pidf:rpid"
schemaLocation="rpid.xsd"/>
<xs:include schemaLocation="common-schema.xsd"/>
<xs:element name="deviceID" type="deviceID_t">
<xs:annotation>
......@@ -35,18 +42,14 @@
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:any namespace="##other" processContents="lax"
minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Characteristic and status
information</xs:documentation>
</xs:annotation>
</xs:any>
<xs:element name="note" type="Note_t" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element ref="rpid:activities" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="timestamp" type="Timestamp_t" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/>
<xs:anyAttribute namespace="##any" processContents="lax"/>
</xs:complexType>
</xs:element>
</xs:schema>
......@@ -19,8 +19,8 @@
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://www.w3.org/2001/xml.xsd"/>
<!--xs:import namespace="urn:ietf:params:xml:ns:pidf:data-model"
schemaLocation="http://www.iana.org/assignments/xml-registry/schema/pidf/data-model.xsd"/-->
<xs:import namespace="urn:ietf:params:xml:ns:pidf:data-model"
schemaLocation="data-model.xsd"/>
<xs:element name="presence" type="tns:presence"/>
......@@ -30,8 +30,8 @@
maxOccurs="unbounded"/>
<xs:element name="note" type="tns:note" minOccurs="0"
maxOccurs="unbounded"/>
<!--xs:element ref="dm:person" minOccurs="0"
maxOccurs="unbounded"/-->
<xs:element ref="dm:person" minOccurs="1"
maxOccurs="1"/>
<xs:any namespace="##other" processContents="lax" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
......
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace="urn:ietf:params:xml:ns:pidf:rpid"
xmlns="urn:ietf:params:xml:ns:pidf:rpid"
xmlns:dm="urn:ietf:params:xml:ns:pidf:data-model"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment