impathuri / imsdroid

Automatically exported from code.google.com/p/imsdroid
0 stars 0 forks source link

Lack An AUID #138

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.I want to put docs to presence xdms with xcap
2.When I put the doc about default fixed appeared information,I need an
  AUID named pidf-manipulation. To call the function setAUID ,there is not
  the AUID that I needed.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
IMSDroid 1.1.327  ,on Android 2.2

Please provide any additional information below.
  For my document,I should use the AUID( pidf-manipulation),but you see that doubango does not provide the AUID.What should I do if I want use the AUID 

Original issue reported on code.google.com by gxs...@gmail.com on 31 Dec 2010 at 6:09

GoogleCodeExporter commented 8 years ago

Original comment by boss...@yahoo.fr on 4 Jan 2011 at 6:00

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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

GoogleCodeExporter commented 8 years ago
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