Index: pjproject/trunk/pjmedia/include/pjmedia/endpoint.h
===================================================================
--- pjproject/trunk/pjmedia/include/pjmedia/mediamgr.h	(revision 121)
+++ pjproject/trunk/pjmedia/include/pjmedia/endpoint.h	(revision 159)
@@ -26,13 +26,13 @@
  */
 /**
- * @defgroup PJMED_MGR Media Manager
+ * @defgroup PJMED_ENDPT Media Endpoint
  * @ingroup PJMEDIA
  * @{
  *
- * The media manager acts as placeholder for endpoint capabilities. Each 
- * media manager will have a codec manager to manage list of codecs installed
+ * The media endpoint acts as placeholder for endpoint capabilities. Each 
+ * media endpoint will have a codec manager to manage list of codecs installed
  * in the endpoint and a sound device factory.
  *
- * A reference to media manager instance is required when application wants
+ * A reference to media endpoint instance is required when application wants
  * to create a media session (#pj_media_session_create or 
  * #pj_media_session_create_from_sdp).
@@ -46,44 +46,75 @@
 
 
-/** Opague declaration of media manager. */
-typedef struct pj_med_mgr_t pj_med_mgr_t;
 
 /**
- * Create an instance of media manager.
+ * Create an instance of media endpoint.
  *
- * @param pf		Pool factory.
- * @param conn_addr	Connection address to be used by this media manager.
+ * @param pf		Pool factory, which will be used by the media endpoint
+ *			throughout its lifetime.
+ * @param p_endpt	Pointer to receive the endpoint instance.
  *
- * @return A new instance of media manager, or NULL if failed.
+ * @return		PJ_SUCCESS on success.
  */
-PJ_DECL(pj_med_mgr_t*) pj_med_mgr_create (pj_pool_factory *pf);
+PJ_DECL(pj_status_t) pjmedia_endpt_create( pj_pool_factory *pf,
+					   pjmedia_endpt **p_endpt);
 
 /**
- * Destroy media manager instance.
+ * Destroy media endpoint instance.
  *
- * @param mgr		Media manager instance.
+ * @param endpt		Media endpoint instance.
  *
- * @return zero on success.
+ * @return		PJ_SUCCESS on success.
  */
-PJ_DECL(pj_status_t) pj_med_mgr_destroy (pj_med_mgr_t *mgr);
+PJ_DECL(pj_status_t) pjmedia_endpt_destroy(pjmedia_endpt *endpt);
+
 
 /**
- * Get pool factory of the media manager as specified when the media
- * manager was created.
+ * Request the media endpoint to create pool.
  *
- * @param mgr		The media manager instance.
+ * @param endpt		The media endpoint instance.
+ * @param name		Name to be assigned to the pool.
+ * @param initial	Initial pool size, in bytes.
+ * @param increment	Increment size, in bytes.
  *
- * @return Pool factory instance of the media manager.
+ * @return		Memory pool.
  */
-PJ_DECL(pj_pool_factory*) pj_med_mgr_get_pool_factory (pj_med_mgr_t *mgr);
+PJ_DECL(pj_pool_t*) pjmedia_endpt_create_pool( pjmedia_endpt *endpt,
+					       const char *name,
+					       pj_size_t initial,
+					       pj_size_t increment);
 
 /**
- * Get the codec manager instance.
+ * Get the codec manager instance of the media endpoint.
  *
- * @param mgr		The media manager instance.
+ * @param endpt		The media endpoint instance.
  *
- * @return The instance of codec manager.
+ * @return		The instance of codec manager belonging to
+ *			this media endpoint.
  */
-PJ_DECL(pj_codec_mgr*) pj_med_mgr_get_codec_mgr (pj_med_mgr_t *mgr);
+PJ_DECL(pjmedia_codec_mgr*) pjmedia_endpt_get_codec_mgr(pjmedia_endpt *mgr);
+
+
+/**
+ * Create a SDP session description that describes the endpoint
+ * capability.
+ *
+ * @param endpt		The media endpoint.
+ * @param pool		Pool to use to create the SDP descriptor.
+ * @param stream_cnt	Number of elements in the sock_info array. This
+ *			also denotes the maximum number of streams (i.e.
+ *			the "m=" lines) that will be created in the SDP.
+ * @param sock_info	Array of socket transport information. One 
+ *			transport is needed for each media stream, and
+ *			each transport consists of an RTP and RTCP socket
+ *			pair.
+ * @param p_sdp		Pointer to receive SDP session descriptor.
+ *
+ * @return		PJ_SUCCESS on success.
+ */
+PJ_DECL(pj_status_t) pjmedia_endpt_create_sdp( pjmedia_endpt *endpt,
+					       pj_pool_t *pool,
+					       unsigned stream_cnt,
+					       const pjmedia_sock_info sock_info[],
+					       pjmedia_sdp_session **p_sdp );
 
 
