Ticket 5: Support for SIP UPDATE (RFC 3311) and fix the offer/answer negotiation

git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@1469 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjsip/include/pjsip-ua/sip_inv.h b/pjsip/include/pjsip-ua/sip_inv.h
index f04f4ae..a367fe1 100644
--- a/pjsip/include/pjsip-ua/sip_inv.h
+++ b/pjsip/include/pjsip-ua/sip_inv.h
@@ -253,6 +253,8 @@
     pjmedia_sdp_neg	*neg;			    /**< Negotiator.	    */
     pjsip_transaction	*invite_tsx;		    /**< 1st invite tsx.    */
     pjsip_tx_data	*last_answer;		    /**< Last INVITE resp.  */
+    pjsip_tx_data	*last_ack;		    /**< Last ACK request   */
+    pj_int32_t		 last_ack_cseq;		    /**< CSeq of last ACK   */
     void		*mod_data[PJSIP_MAX_MODULE];/**< Modules data.	    */
 };
 
@@ -561,20 +563,15 @@
 
 
 /**
- * Create an UPDATE request. 
+ * Create an UPDATE request to initiate new SDP offer.
  *
  * @param inv		The invite session.
  * @param new_contact	If application wants to update its local contact
  *			and inform peer to perform target refresh with a new
  *			contact, it can specify the new contact in this 
  *			argument; otherwise this argument must be NULL.
- * @param new_offer	Application MAY initiate a new SDP offer/answer 
- *			session in the request when there is no pending answer
- *			to be sent or received. It can detect this condition
- *			by observing the state of the SDP negotiator of the 
- *			invite session. If new offer should be sent to remote,
- *			the offer must be specified in this argument; otherwise
- *			this argument must be NULL.
+ * @param offer		Offer to be sent to remote. This argument is
+ *			mandatory.
  * @param p_tdata	Pointer to receive the UPDATE request message to
  *			be created.
  *
@@ -584,7 +581,7 @@
  */
 PJ_DECL(pj_status_t) pjsip_inv_update (	pjsip_inv_session *inv,
 					const pj_str_t *new_contact,
-					const pjmedia_sdp_session *new_offer,
+					const pjmedia_sdp_session *offer,
 					pjsip_tx_data **p_tdata );