Closed GoogleCodeExporter closed 8 years ago
Original comment by boss...@yahoo.fr
on 4 Jan 2011 at 6:00
Because of my project,I need the AUID urgently. Could you please tell the
approximate time of next release.Or I have found that the AUID have been
defined in the file Txcap_auid.h and Txcap_auid.c,so if I want to add an AUID
by myself,what should I do?
The way I think is that:
1.add an definition like this in the .h file:
/*== org.openmobilealliance.pres-rules ==*/
#define TXCAP_AUID_OMA_PRES_RULES_ID "org.openmobilealliance.pres-rules"
#define TXCAP_AUID_OMA_PRES_RULES_MIME_TYPE "application/auth-policy+xml"
#define TXCAP_AUID_OMA_PRES_RULES_NS "urn:ietf:params:xml:ns:common-policy"
#define TXCAP_AUID_OMA_PRES_RULES_DOC "pres-rules"
2. add something like this in the .c file:
/*== org.openmobilealliance.pres-rules ==*/{
tauid_oma_pres_rules,
TXCAP_AUID_OMA_PRES_RULES_ID,
TXCAP_AUID_OMA_PRES_RULES_MIME_TYPE,
TXCAP_AUID_OMA_PRES_RULES_NS,
TXCAP_AUID_OMA_PRES_RULES_DOC,
tsk_false
},
Are the two steps enough?Expecting your advice,thank you!
Original comment by gxs...@gmail.com
on 4 Jan 2011 at 9:20
The new release will be available at the end of the week. As a workaround you
can build the XCAP URLs yourself and pass them to the stack like this:
// To download the document
this.stack.getDocument("http://xcap.example.com:8080/services/pidf-manipulation/
users/sip:someone@example.com/index");
// To upload the document
byte[] body = "your payload here".getBytes();
ByteBuffer payload = ByteBuffer.allocateDirect(body.length);
payload.put(body);
this.stack.putDocument("http://xcap.example.com:8080/services/pidf-manipulation/
users/sip:someone@example.com/index",
payload, payload.capacity(),
"application/pidf+xml");
// For example, to change the note
body = "<note>your</note>".getBytes();
payload = ByteBuffer.allocateDirect(body.length);
payload.put(body);
this.stack.putElement("/pidf-manipulation/users/sip:someone@example.com/index/~~
/presence/tuple%5b@id='x8eg92n'%5d/note",
payload, payload.capacity());
// etc etc...
Original comment by boss...@yahoo.fr
on 4 Jan 2011 at 1:52
Fixed in 1.2.355.
We have also added new function which allows registering any AUID.
Signature:
XcapStack::registerAUID(String id, String mime_type, String ns, String
document_name, boolean is_global);
Usage (Example):
xcapStack.registerAUID("my-resource-lists",
"application/my-resource-lists+xml", "urn:ietf:params:xml:ns:resource-lists",
"my-index", false);
Original comment by boss...@yahoo.fr
on 11 Jan 2011 at 12:57
Original issue reported on code.google.com by
gxs...@gmail.com
on 31 Dec 2010 at 6:09