Skip to content

Commit

Permalink
show new capabilities for friends
Browse files Browse the repository at this point in the history
  • Loading branch information
zoff99 committed Sep 14, 2024
1 parent c3ae7dd commit 44d2da6
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ public static class TOX_CAPABILITY_DECODE_RESULT
boolean toxav_h264 = false;
boolean msgv3 = false;
boolean ftv2 = false;
boolean toxav_h265 = false;
boolean ftv2a = false;
boolean next_implementation = false;
}

Expand All @@ -87,6 +89,8 @@ public static class TOX_CAPABILITY_DECODE_RESULT
public static long TOX_CAPABILITY_TOXAV_H264 = 1 << 2;
public static long TOX_CAPABILITY_MSGV3 = 1 << 3;
public static long TOX_CAPABILITY_FTV2 = 1 << 4;
public static long TOX_CAPABILITY_TOXAV_H265 = 1 << 5;
public static long TOX_CAPABILITY_FTV2A = 1 << 6;
public static long TOX_CAPABILITY_NEXT_IMPLEMENTATION = (1L << 63L);

public static TOX_CAPABILITY_DECODE_RESULT TOX_CAPABILITY_DECODE(long capabilites_encoded)
Expand Down Expand Up @@ -118,6 +122,16 @@ public static TOX_CAPABILITY_DECODE_RESULT TOX_CAPABILITY_DECODE(long capabilite
res.ftv2 = true;
}

if ((capabilites_encoded & TOX_CAPABILITY_TOXAV_H265) != 0)
{
res.toxav_h265 = true;
}

if ((capabilites_encoded & TOX_CAPABILITY_FTV2A) != 0)
{
res.ftv2a = true;
}

if ((capabilites_encoded & TOX_CAPABILITY_NEXT_IMPLEMENTATION) != 0)
{
res.next_implementation = true;
Expand Down Expand Up @@ -160,6 +174,16 @@ public static String TOX_CAPABILITY_DECODE_TO_STRING(TOX_CAPABILITY_DECODE_RESUL
res = res + " FTV2 ";
}

if (in.toxav_h265)
{
res = res + " TOXAV_H265 ";
}

if (in.ftv2a)
{
res = res + " FTV2a ";
}

if (in.next_implementation)
{
res = res + " NEXT_IMPLEMENTATION ";
Expand Down

0 comments on commit 44d2da6

Please sign in to comment.