internal static extern uint FriendByPublicKey(ToxHandle tox, byte[] publicKey, ref ToxErrorFriendByPublicKey error);
/// <summary> /// Retrieves the friendNumber associated with the specified public key. /// </summary> /// <param name="publicKey">The public key to look for.</param> /// <param name="error"></param> /// <returns>The friend number on success.</returns> public int GetFriendByPublicKey(ToxKey publicKey, out ToxErrorFriendByPublicKey error) { ThrowIfDisposed(); if (publicKey == null) throw new ArgumentNullException("publicKey"); error = ToxErrorFriendByPublicKey.Ok; return (int)ToxFunctions.FriendByPublicKey(_tox, publicKey.GetBytes(), ref error); }
public static extern UInt32 ByPublicKey(ToxHandle tox, Byte[] publicKey, ref ToxErrorFriendByPublicKey error);