diff options
author | Juha Heinanen <jh@tutpro.com> | 2014-11-18 08:38:07 +0200 |
---|---|---|
committer | Juha Heinanen <jh@tutpro.com> | 2014-11-18 08:38:07 +0200 |
commit | 16308b599e9dd662b7be0d2da018a9dd063c8d99 (patch) | |
tree | 73783878504112da5e01bd8452f5bbfbe1a24b9a /src | |
parent | da35d1b236ad2d0d4596c39980304c8a2b4f2c90 (diff) |
presence: made presence status UA specific
Diffstat (limited to 'src')
-rw-r--r-- | src/ua.c | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -33,6 +33,7 @@ struct ua { char *cuser; /**< SIP Contact username */ char *pub_gruu; /**< SIP Public GRUU */ int af; /**< Preferred Address Family */ + enum presence_status my_status; /**< Presence Status */ }; struct ua_eh { @@ -828,6 +829,35 @@ const char *ua_aor(const struct ua *ua) /** + * Get presence status of a User-Agent + * + * @param ua User-Agent object + * + * @return presence status + */ +enum presence_status ua_presence_status(const struct ua *ua) +{ + return ua ? ua->my_status : PRESENCE_UNKNOWN; +} + + +/** + * Set presence status of a User-Agent + * + * @param ua User-Agent object + * + * @param presence status + */ +void ua_presence_status_set(struct ua *ua, const enum presence_status status) +{ + if (!ua) + return; + + ua->my_status = status; +} + + +/** * Get the outbound SIP proxy of a User-Agent * * @param ua User-Agent object |