summaryrefslogtreecommitdiff
path: root/pjsip/include/pjsip-simple
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2006-02-21 23:47:00 +0000
committerBenny Prijono <bennylp@teluu.com>2006-02-21 23:47:00 +0000
commitfcba4d392ea03e8ac4cfde87d8efd7999ff4a38c (patch)
tree285e65a630c72b80dd533ec88d4d8ef9b1aa7029 /pjsip/include/pjsip-simple
parent5c7386b0e38e69ae6b275b1048d59e7ec4eaf6bf (diff)
Implemented major feature: call hold and transfer
git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@212 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include/pjsip-simple')
-rw-r--r--pjsip/include/pjsip-simple/errno.h22
-rw-r--r--pjsip/include/pjsip-simple/evsub.h22
-rw-r--r--pjsip/include/pjsip-simple/presence.h5
3 files changed, 39 insertions, 10 deletions
diff --git a/pjsip/include/pjsip-simple/errno.h b/pjsip/include/pjsip-simple/errno.h
index a09def7b..966aed93 100644
--- a/pjsip/include/pjsip-simple/errno.h
+++ b/pjsip/include/pjsip-simple/errno.h
@@ -23,47 +23,53 @@
#include <pjsip/sip_errno.h>
/**
+ * Start of error code relative to PJ_ERRNO_START_USER.
+ */
+#define PJSIP_SIMPLE_ERRNO_START (PJ_ERRNO_START_USER + PJ_ERRNO_SPACE_SIZE*2)
+
+
+/**
* @hideinitializer
* No event package with the specified name.
*/
-#define PJSIP_SIMPLE_ENOPKG -1
+#define PJSIP_SIMPLE_ENOPKG (PJSIP_SIMPLE_ERRNO_START+1) /*270001*/
/**
* @hideinitializer
* Event package already exists.
*/
-#define PJSIP_SIMPLE_EPKGEXISTS -1
+#define PJSIP_SIMPLE_EPKGEXISTS (PJSIP_SIMPLE_ERRNO_START+2) /*270002*/
/**
* @hideinitializer
* Expecting SUBSCRIBE request
*/
-#define PJSIP_SIMPLE_ENOTSUBSCRIBE -1
+#define PJSIP_SIMPLE_ENOTSUBSCRIBE (PJSIP_SIMPLE_ERRNO_START+20) /*270020*/
/**
* @hideinitializer
* No presence associated with subscription
*/
-#define PJSIP_SIMPLE_ENOPRESENCE -1
+#define PJSIP_SIMPLE_ENOPRESENCE (PJSIP_SIMPLE_ERRNO_START+21) /*270021*/
/**
* @hideinitializer
* No presence info in server subscription
*/
-#define PJSIP_SIMPLE_ENOPRESENCEINFO -1
+#define PJSIP_SIMPLE_ENOPRESENCEINFO (PJSIP_SIMPLE_ERRNO_START+22) /*270022*/
/**
* @hideinitializer
* Bad Content-Type
*/
-#define PJSIP_SIMPLE_EBADCONTENT -1
+#define PJSIP_SIMPLE_EBADCONTENT (PJSIP_SIMPLE_ERRNO_START+23) /*270023*/
/**
* @hideinitializer
* Bad PIDF Message
*/
-#define PJSIP_SIMPLE_EBADPIDF -1
+#define PJSIP_SIMPLE_EBADPIDF (PJSIP_SIMPLE_ERRNO_START+24) /*270024*/
/**
* @hideinitializer
* Bad XPIDF Message
*/
-#define PJSIP_SIMPLE_EBADXPIDF -1
+#define PJSIP_SIMPLE_EBADXPIDF (PJSIP_SIMPLE_ERRNO_START+25) /*270025*/
diff --git a/pjsip/include/pjsip-simple/evsub.h b/pjsip/include/pjsip-simple/evsub.h
index ee6315ee..1977ee44 100644
--- a/pjsip/include/pjsip-simple/evsub.h
+++ b/pjsip/include/pjsip-simple/evsub.h
@@ -76,6 +76,19 @@ enum pjsip_evsub_state
typedef enum pjsip_evsub_state pjsip_evsub_state;
+/**
+ * Some options for the event subscription.
+ */
+enum
+{
+ /**
+ * If this flag is set, then outgoing request to create subscription
+ * will not have id in the Event header (e.g. in REFER request). But if
+ * there is an id in the incoming NOTIFY, that id will be used.
+ */
+ PJSIP_EVSUB_NO_EVENT_ID = 1,
+};
+
/**
* This structure describes callback that is registered by application or
@@ -244,6 +257,7 @@ PJ_DECL(pj_status_t) pjsip_evsub_register_pkg( pjsip_module *pkg_mod,
* @param dlg The underlying dialog to use.
* @param user_cb Callback to receive event subscription notifications.
* @param event Event name.
+ * @param option Bitmask of options.
* @param p_evsub Pointer to receive event subscription instance.
*
* @return PJ_SUCCESS on success.
@@ -251,6 +265,7 @@ PJ_DECL(pj_status_t) pjsip_evsub_register_pkg( pjsip_module *pkg_mod,
PJ_DECL(pj_status_t) pjsip_evsub_create_uac( pjsip_dialog *dlg,
const pjsip_evsub_user *user_cb,
const pj_str_t *event,
+ unsigned option,
pjsip_evsub **p_evsub);
/**
@@ -260,6 +275,7 @@ PJ_DECL(pj_status_t) pjsip_evsub_create_uac( pjsip_dialog *dlg,
* @param user_cb Callback to receive event subscription notifications.
* @param rdata The incoming request that creates the event
* subscription, such as SUBSCRIBE or REFER.
+ * @param option Bitmask of options.
* @param p_evsub Pointer to receive event subscription instance.
*
* @return PJ_SUCCESS on success.
@@ -267,6 +283,7 @@ PJ_DECL(pj_status_t) pjsip_evsub_create_uac( pjsip_dialog *dlg,
PJ_DECL(pj_status_t) pjsip_evsub_create_uas( pjsip_dialog *dlg,
const pjsip_evsub_user *user_cb,
pjsip_rx_data *rdata,
+ unsigned option,
pjsip_evsub **p_evsub);
@@ -366,7 +383,10 @@ PJ_DECL(pj_status_t) pjsip_evsub_current_notify( pjsip_evsub *sub,
/**
- * Send request message.
+ * Send request message that was previously created with initiate(), notify(),
+ * or current_notify(). Application may also send request created with other
+ * functions, e.g. authentication. But the request MUST be either request
+ * that creates/refresh subscription or NOTIFY request.
*
* @param sub The event subscription object.
* @param tdata Request message to be send.
diff --git a/pjsip/include/pjsip-simple/presence.h b/pjsip/include/pjsip-simple/presence.h
index e02498a7..8559d91d 100644
--- a/pjsip/include/pjsip-simple/presence.h
+++ b/pjsip/include/pjsip-simple/presence.h
@@ -202,7 +202,10 @@ PJ_DECL(pj_status_t) pjsip_pres_current_notify( pjsip_evsub *sub,
/**
- * Send request.
+ * Send request message that was previously created with initiate(), notify(),
+ * or current_notify(). Application may also send request created with other
+ * functions, e.g. authentication. But the request MUST be either request
+ * that creates/refresh subscription or NOTIFY request.
*
* @param sub The subscription object.
* @param tdata Request message to be sent.