Re #1161: Support for adding custom presence subscription headers.



git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3412 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/include/pjsip-simple/evsub.h b/pjsip/include/pjsip-simple/evsub.h
index 1c350c9..d6e1dec 100644
--- a/pjsip/include/pjsip-simple/evsub.h
+++ b/pjsip/include/pjsip-simple/evsub.h
@@ -380,6 +380,19 @@
 
 
 /**
+ * Add a list of headers to the subscription instance. The list of headers
+ * will be added to outgoing presence subscription requests.
+ *
+ * @param sub		Subscription instance.
+ * @param hdr_list	List of headers to be added.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_evsub_add_header( pjsip_evsub *sub,
+					     const pjsip_hdr *hdr_list );
+
+
+/**
  * Accept the incoming subscription request by sending 2xx response to
  * incoming SUBSCRIBE request.
  *
diff --git a/pjsip/include/pjsip-simple/presence.h b/pjsip/include/pjsip-simple/presence.h
index eaf8ba8..d80736d 100644
--- a/pjsip/include/pjsip-simple/presence.h
+++ b/pjsip/include/pjsip-simple/presence.h
@@ -181,6 +181,18 @@
 					  pjsip_tx_data **p_tdata);
 
 
+/**
+ * Add a list of headers to the subscription instance. The list of headers
+ * will be added to outgoing presence subscription requests.
+ *
+ * @param sub		Subscription instance.
+ * @param hdr_list	List of headers to be added.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjsip_pres_add_header( pjsip_evsub *sub,
+					    const pjsip_hdr *hdr_list );
+
 
 /**
  * Accept the incoming subscription request by sending 2xx response to
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index 0a6cbdd..d824306 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -2138,6 +2138,12 @@
      */
     pjsip_hdr	    reg_hdr_list;
 
+    /** 
+     * The optional custom SIP headers to be put in the presence
+     * subscription request.
+     */
+    pjsip_hdr	    sub_hdr_list;
+
     /**
      * Subscribe to message waiting indication events (RFC 3842).
      *