This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<typename Func, Func func> struct thunk; | |
template<typename Class, typename R, typename ...Args, R(Class::*func)(Args...)> | |
struct thunk<R(Class::*)(Args...), func> | |
{ | |
static R call(Tox *tox, Args ...args, void *userData) | |
{ | |
return ((*static_cast<Class *>(userData)).*func)(args...); | |
} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// "License": Public Domain | |
// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like. | |
#ifndef PORTABLE_ENDIAN_H__ | |
#define PORTABLE_ENDIAN_H__ | |
#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__) | |
# define __WINDOWS__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Copyright (c) 2014 by nurupo <nurupo.contributions@gmail.com> | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#------------------------------------------------- | |
# | |
# Project created by QtCreator 2014-04-01T02:11:23 | |
# | |
#------------------------------------------------- | |
QT += widgets network | |
TARGET = ToxDNSRecordResolver | |
TEMPLATE = app |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Founder has all permissions. | |
2. Everyone in the chatroom can verify that public key X is indeed founder's key, it's a property of the chatroom and no peer stores it i.e. the chatroom itself contains that information somewhere, presumably in its ID (we don't rely on chatroom peers storing that data because they can came up with whatever they want i.e. say that the key X is not founder's key; we want that verification to be 100% exact and to work with even 1 peer in the chatroom). | |
3. To give permissions to user A, founder gives user A data which tells what permission level does A have (if we are going to have permission levels in tox at all). The data is signed by founder's private key. | |
4. Now A can show anyone that signed by founder data from the step (3) as a proof of her having permissions (anyone can verify that it was indeed signed by founder by (2)), so A can exercise her rights over everyone in the chatroom. | |
5. If A gives permissions to B, 1) A sends her founder-signed data to B to show that she i |
NewerOlder