eX_subscribe.h(3)

πŸ“¦ version 5.3.0, in epel 9

πŸ’– eX_subscribe.h β€” the SUBSCRIBE era πŸ’–

okay so bestie, this is the <eX_subscribe.h> page from libeXosip2 (manual section 3, we love a library page), and it's literally the whole API for controlling SUBSCRIBE requests. yes, that SUBSCRIBE. the presence-y one. she's iconic, she's giving "are you there? are you still there? hello??" energy, and this header is her whole personality. πŸ¦‹


✨ NAME ✨

eX_subscribe.h β€” the eXosip subscribe request API, periodt. πŸ’…


🌸 SYNOPSIS 🌸

include these two, exactly like this, no notes:

#include <osipparser2/osip_parser.h>
#include <time.h>

πŸŽ€ Enumerations πŸŽ€

three enums, all of them little mood rings for subscription state:

enum eXosip_ss { EXOSIP_SUBCRSTATE_UNKNOWN, EXOSIP_SUBCRSTATE_PENDING,
    EXOSIP_SUBCRSTATE_ACTIVE, EXOSIP_SUBCRSTATE_TERMINATED }
enum eXosip_ss_reason { DEACTIVATED, PROBATION, REJECTED, TIMEOUT,
    GIVEUP, NORESOURCE }
enum eXosip_ss_status { EXOSIP_NOTIFY_UNKNOWN, EXOSIP_NOTIFY_PENDING,
    EXOSIP_NOTIFY_ONLINE, EXOSIP_NOTIFY_BUSY, EXOSIP_NOTIFY_BERIGHTBACK,
    EXOSIP_NOTIFY_AWAY, EXOSIP_NOTIFY_ONTHEPHONE,
    EXOSIP_NOTIFY_OUTTOLUNCH, EXOSIP_NOTIFY_CLOSED }

EXOSIP_NOTIFY_OUTTOLUNCH is highkey the main character of that last one, ngl. πŸ₯—


🫢 Functions 🫢

the whole roster, signatures copied character-for-character because we do not play with typos in this house:

int eXosip_subscription_build_initial_subscribe (struct eXosip_t
    *excontext, osip_message_t **subscribe, const char *to, const char
    *from, const char *route, const char *event, int expires)
int eXosip_subscription_build_initial_refer (struct eXosip_t *excontext,
    osip_message_t **refer, const char *to, const char *from, const char
    *route, const char *refer_to)
int eXosip_subscription_send_initial_request (struct eXosip_t
    *excontext, osip_message_t *subscribe)
int eXosip_subscription_build_refresh_request (struct eXosip_t
    *excontext, int did, osip_message_t **sub)
int eXosip_subscription_send_refresh_request (struct eXosip_t
    *excontext, int did, osip_message_t *sub)
int eXosip_subscription_remove (struct eXosip_t *excontext, int did)
int eXosip_insubscription_build_answer (struct eXosip_t *excontext, int
    tid, int status, osip_message_t **answer)
int eXosip_insubscription_send_answer (struct eXosip_t *excontext, int
    tid, int status, osip_message_t *answer)
int eXosip_insubscription_build_request (struct eXosip_t *excontext, int
    did, const char *method, osip_message_t **request)
int eXosip_insubscription_build_notify (struct eXosip_t *excontext, int
    did, int subscription_status, int subscription_reason,
    osip_message_t **request)
int eXosip_insubscription_send_request (struct eXosip_t *excontext, int
    did, osip_message_t *request)
int eXosip_insubscription_remove (struct eXosip_t *excontext, int did)

notice how there's two whole families? the eXosip_subscription_* girlies (you're the one subscribing, sending SUBSCRIBE) and the eXosip_insubscription_* girlies (you're the one being subscribed to, sending NOTIFY back). both ate. πŸ’œ


πŸ’« Detailed Description πŸ’«

eXosip subscribe request API

so this file provides the API you need to control SUBSCRIBE requests β€” literally the whole point of it. you can use it to:

  • build SUBSCRIBE requests. ✨
  • send SUBSCRIBE requests. πŸ”₯
  • build SUBSCRIBE answers. πŸŽ€
  • send SUBSCRIBE answers. πŸ‘‘

build then send, build then send. that's the loop, bestie, that's the vibe check. 🌈


πŸ‘‘ Author πŸ‘‘

generated automatically by Doxygen for libeXosip2 straight from the source code. not me being hand-written by a human, no cap β€” the robot did it. πŸ€–πŸ’…


aaaand that's the page! πŸ“ cute little sign-off for you: this was Version 5.3.0, dated Thu May 18 2023, and it lives at eX_subscribe.h(3) in the libeXosip2 docs. go build some SUBSCRIBEs, bestie, you're gonna slay. πŸ’–βœ¨πŸ§š

πŸ“¦ where this page comes from