2013-12-20 14:25:49 -05:00
|
|
|
#ifndef log_h
|
|
|
|
#define log_h
|
|
|
|
|
|
|
|
#include <android/log.h>
|
2014-05-16 19:05:49 -04:00
|
|
|
#include <jni.h>
|
2013-12-20 14:25:49 -05:00
|
|
|
|
2014-09-23 22:17:27 -04:00
|
|
|
#define LOG_TAG "tmessages"
|
2014-06-15 04:03:43 -04:00
|
|
|
#ifndef LOG_DISABLED
|
2013-12-20 14:25:49 -05:00
|
|
|
#define LOGI(...) __android_log_print(ANDROID_LOG_INFO, LOG_TAG, __VA_ARGS__)
|
|
|
|
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, LOG_TAG, __VA_ARGS__)
|
|
|
|
#define LOGE(...) __android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__)
|
|
|
|
#define LOGV(...) __android_log_print(ANDROID_LOG_VERBOSE, LOG_TAG, __VA_ARGS__)
|
2014-06-15 04:03:43 -04:00
|
|
|
#else
|
|
|
|
#define LOGI(...)
|
|
|
|
#define LOGD(...)
|
|
|
|
#define LOGE(...)
|
|
|
|
#define LOGV(...)
|
|
|
|
#endif
|
2013-12-20 14:25:49 -05:00
|
|
|
|
2014-03-27 10:25:53 -04:00
|
|
|
#ifndef max
|
|
|
|
#define max(x, y) ((x) > (y)) ? (x) : (y)
|
|
|
|
#endif
|
|
|
|
#ifndef min
|
|
|
|
#define min(x, y) ((x) < (y)) ? (x) : (y)
|
|
|
|
#endif
|
|
|
|
|
2014-05-16 19:05:49 -04:00
|
|
|
void throwException(JNIEnv *env, char *format, ...);
|
|
|
|
|
2013-12-20 14:25:49 -05:00
|
|
|
#endif
|