File: availability-cmp.c

package info (click to toggle)
telepathy-glib 0.24.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 34,628 kB
  • sloc: ansic: 124,643; xml: 34,410; sh: 11,299; python: 3,520; makefile: 1,727; cpp: 16
file content (18 lines) | stat: -rw-r--r-- 526 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "config.h"

#include <glib.h>
#include <telepathy-glib/connection.h>

int main (int argc, char **argv)
{
  g_assert (tp_connection_presence_type_cmp_availability (
    TP_CONNECTION_PRESENCE_TYPE_AWAY, TP_CONNECTION_PRESENCE_TYPE_UNSET) == 1);

  g_assert (tp_connection_presence_type_cmp_availability (
    TP_CONNECTION_PRESENCE_TYPE_BUSY, TP_CONNECTION_PRESENCE_TYPE_AVAILABLE) == -1);

  g_assert (tp_connection_presence_type_cmp_availability (
    TP_CONNECTION_PRESENCE_TYPE_UNKNOWN, 100) == 0);

  return 0;
}