repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
ZJNixiang/HookZz | src/interceptor_routing.c | #include "interceptor_routing.h"
#include "thread_support/thread_stack.h"
void interceptor_routing_begin(RegState *rs, hook_entry_t *entry, void *next_hop_addr_PTR, void *ret_addr_PTR) {
// DEBUG_LOG("target %p call begin-invocation", entry->target_ptr);
thread_stack_manager_t *thread_stack_manager = thread_s... |
ZJNixiang/HookZz | srcxx/Platforms/backend-posix/PosixThreadManager.h | //
// Created by jmpews on 2018/6/14.
//
#ifndef HOOKZZ_POSIXTHREADMANAGER_H
#define HOOKZZ_POSIXTHREADMANAGER_H
#endif //HOOKZZ_POSIXTHREADMANAGER_H
|
ZJNixiang/HookZz | src/instruction_relocation.h | <gh_stars>1-10
#include "interceptor.h"
#include "macros.h"
PLATFORM_API void instruction_relocation_inspect(void *dest, int *limit_length_PTR);
PLATFORM_API void instruction_relocation_build(void *dest, void *src, int length); |
ZJNixiang/HookZz | src/platforms/arch-arm64/interceptor-routing-trampoline-arm64.h | /**
* Copyright 2017 jmpews
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law... |
ZJNixiang/HookZz | src/platforms/backend-x86/custom-bridge-handler.c | <filename>src/platforms/backend-x86/custom-bridge-handler.c
//
// Created by z on 2018/4/7.
//
#include "custom-bridge-handler.h"
#include "closure-bridge-x86.h"
#include <CommonKit/log/log_kit.h>
#include <debuglog.h>
#include <hookzz.h>
void context_begin_invocation(RegState *rs, hook_entry_t *entry, void *next_hop... |
ZJNixiang/HookZz | src/interceptor_routing_trampoline.c | <filename>src/interceptor_routing_trampoline.c
#include "interceptor_routing_trampoline.h"
void interceptor_trampoline_cclass(build_all)(hook_entry_t *entry) {
if (entry->type == HOOK_TYPE_FUNCTION_via_PRE_POST) {
interceptor_trampoline_cclass(prepare)(entry);
interceptor_trampoline_cclass(build_fo... |
ZJNixiang/HookZz | src/platforms/backend-darwin/dynamic-closure-bridge-darwin.c | #include "closure_bridge.h"
DynamicClosureBridge *DynamicClosureBridgeCClass(SharedInstance)() { return NULL; }
DynamicClosureBridgeInfo *DynamicClosureBridgeCClass(AllocateDynamicClosureBridge)(DynamicClosureBridge *self,
void *user_da... |
ZJNixiang/HookZz | srcxx/Platforms/arch-arm64/ARM64Helper.h | //
// Created by jmpews on 2018/6/15.
//
#ifndef HOOKZZ_ARM64HELPER_H
#define HOOKZZ_ARM64HELPER_H
#endif //HOOKZZ_ARM64HELPER_H
|
ZJNixiang/HookZz | src/macros.h | #ifndef macros_h
#define macros_h
#include <stdint.h>
#define INT5_MASK 0x0000001f
#define INT8_MASK 0x000000ff
#define INT10_MASK 0x000003ff
#define INT11_MASK 0x000007ff
#define INT12_MASK 0x00000fff
#define INT14_MASK 0x00003fff
#define INT16_MASK 0x0000ffff
#define INT18_MASK 0x0003ffff
#define INT19_MASK 0x0007f... |
ZJNixiang/HookZz | src/platforms/backend-x86/custom-bridge-handler.h | //
// Created by z on 2018/4/7.
//
#ifndef CUSTOM_BRIDGE_HANDLER_H
#define CUSTOM_BRIDGE_HANDLER_H
#include "closure-bridge-x86.h"
#include "hookzz.h"
#include "interceptor.h"
#include "zkit.h"
void context_end_invocation_bridge_handler(RegState *rs, ClosureBridgeInfo *cb_info);
void context_begin_invocation_bridge_... |
ZJNixiang/HookZz | srcxx/Interceptor.h | //
// Created by z on 2018/6/14.
//
#ifndef HOOKZZ_INTERCEPTOR_H
#define HOOKZZ_INTERCEPTOR_H
#include "MemoryManager.h"
#include "ThreadManager.h"
#include "hookzz.h"
#include <iostream>
#include <vector>
typedef struct _FunctionBackup {
void *address;
int size;
char data[32];
} FunctionBackup;
class ... |
ZJNixiang/HookZz | src/std_kit/std_macros.h | <reponame>ZJNixiang/HookZz
#ifndef thread_local
#if __STDC_VERSION__ >= 201112 && !defined __STDC_NO_THREADS__
#define thread_local _Thread_local
#elif defined _WIN32 && (defined _MSC_VER || defined __ICL || defined __DMC__ || defined __BORLANDC__)
#define thread_local __declspec(thread)
/* note that ICC (linux) and Cl... |
ZJNixiang/HookZz | src/platforms/arch-arm64/interceptor-routing-trampoline-arm64.c | <reponame>ZJNixiang/HookZz
#include "interceptor-routing-trampoline-arm64.h"
#include "closure_bridge.h"
#include "interceptor.h"
#include "interceptor_routing.h"
#include "interceptor_routing_trampoline.h"
#include "logging.h"
#include "macros.h"
#include "memory_manager.h"
#include <assert.h>
#include <stdlib.h>
#in... |
ZJNixiang/HookZz | src/platforms/arch-arm64/relocator-arm64.h | <gh_stars>1-10
#ifndef platforms_arch_arm64_relocator_h
#define platforms_arch_arm64_relocator_h
#include "instruction.h"
#include "reader-arm64.h"
#include "register-arm64.h"
#include "writer-arm64.h"
#include "std_kit/std_buffer_array.h"
#include "std_kit/std_kit.h"
#include "std_kit/std_list.h"
typedef struct _io... |
ZJNixiang/HookZz | src/platforms/backend-x86/interceptor-x86.c | #include "interceptor-x86.h"
#include "backend-x86-helper.h"
#include "closure-bridge-x86.h"
#include "custom-bridge-handler.h"
#include <debuglog.h>
#include <stdlib.h>
#include <string.h>
#define ZZ_X86_TINY_REDIRECT_SIZE 4
#define ZZ_X86_FULL_REDIRECT_SIZE 16
InterceptorBackend *InteceptorBackendNew(ExecuteMemor... |
ZJNixiang/HookZz | src/std_kit/std_kit.h | #ifndef std_kit_std_kit_h
#define std_kit_std_kit_h
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* malloc with 0 and NULL check */
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
void *safe_malloc(size_t size);
#ifdef __cplusplus
}
#endif //__cplusplus
/* malloc macro */
#defin... |
ZJNixiang/HookZz | src/interceptor_routing_trampoline.h | #ifndef interceptor_routing_trampoline_h
#define interceptor_routing_trampoline_h
#include "core.h"
#include "hookzz.h"
#include "interceptor.h"
#define interceptor_trampoline_cclass(member) cclass(interceptor_trampoline, member)
void interceptor_trampoline_cclass(free)(hook_entry_t *entry);
void interceptor_trampo... |
ZJNixiang/HookZz | srcxx/Platforms/backend-darwin/memory-helper-darwin.c | #include "memory-helper-darwin.h"
#include <unistd.h>
int darwin_memory_helper_cclass(get_page_size)() { return getpagesize(); }
void darwin_memory_helper_cclass(get_memory_info)(void *address, vm_prot_t *prot, vm_inherit_t *inherit) {
vm_address_t region = (vm_address_t)address;
vm_size_t region_size = 0;... |
ZJNixiang/HookZz | src/core.h | #ifndef core_h
#define core_h
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "logging.h"
#include "std_kit/std_kit.h"
#include "std_kit/std_macros.h"
/* define a macro to make abbreviation */
#define cclass(class, member) class##_##member
#define cxxclass(class, member) class... |
ZJNixiang/HookZz | src/platforms/backend-arm/custom-bridge-handler.c | <reponame>ZJNixiang/HookZz
//
// Created by z on 2018/4/7.
//
#include "custom-bridge-handler.h"
#include "closure-bridge-arm.h"
#include <CommonKit/log/log_kit.h>
#include <debuglog.h>
#include <hookzz.h>
void context_begin_invocation(RegState *rs, hook_entry_t *entry, void *next_hop_addr_PTR, void *ret_addr_PTR) {
... |
ZJNixiang/HookZz | src/thread_support/thread_stack.c | <filename>src/thread_support/thread_stack.c
#include "thread_stack.h"
#include "core.h"
#include "thread_local_storage.h"
thread_stack_manager_t *thread_stack_cclass(shared_instance)() {
thread_stack_manager_t *g_thread_stack_manager = (thread_stack_manager_t *)get_thread_variable_value();
if (g_thread_stack_... |
ZJNixiang/HookZz | src/closure_bridge.c | <gh_stars>1-10
#include "closure_bridge.h"
#include "memory_manager.h"
ClosureBridge *gClosureBridge = NULL;
ClosureBridge *ClosureBridgeCClass(SharedInstance)() {
if (gClosureBridge == NULL) {
gClosureBridge = SAFE_MALLOC_TYPE(ClosureBridge);
gClosureBridge->bridge_infos = ... |
ZJNixiang/HookZz | src/platforms/backend-arm/interceptor-arm.c | #include "interceptor-arm.h"
#include "backend-arm-helper.h"
#include "custom-bridge-handler.h"
#include <debuglog.h>
#include <stdlib.h>
#define ZZ_THUMB_TINY_REDIRECT_SIZE 4
#define ZZ_THUMB_FULL_REDIRECT_SIZE 8
#define ARM_TINY_REDIRECT_SIZE 4
#define ARM_FULL_REDIRECT_SIZE 8
InterceptorBackend *InteceptorBackendN... |
ZJNixiang/HookZz | src/closure_bridge.h | <reponame>ZJNixiang/HookZz<filename>src/closure_bridge.h
#ifndef closure_bridge_h
#define closure_bridge_h
#include "core.h"
#include "hookzz.h"
#include "std_kit/std_list.h"
#include <stdint.h>
#define PRIVATE
// closure bridge
typedef struct _ClosureBridgeInfo {
void *user_code;
void *user_data;
void ... |
ZJNixiang/HookZz | src/thread_support/thread_local_storage.h | #ifndef thread_local_storage_h
#define thread_local_storage_h
#include "core.h"
#include "hookzz.h"
void *get_thread_variable_value();
void set_thread_variable_value(void *value);
#endif |
ZJNixiang/HookZz | src/hookzz.c | <gh_stars>1-10
#include "hookzz.h"
#include "core.h"
#include "hookzz_internal.h"
#include "interceptor.h"
#include "interceptor_routing_trampoline.h"
#include "std_kit/std_kit.h"
bool g_near_jump_flag = false;
void zz_enable_near_jump() { g_near_jump_flag = true; }
bool zz_is_near_jump() { return g_near_jump_flag; ... |
ZJNixiang/HookZz | src/thread_support/thread_local_storage.c | #include "thread_local_storage.h"
#ifdef thread_local
thread_local void *_thread_variable;
void *get_thread_variable_value() { return _thread_variable; }
void set_thread_variable_value(void *value) { _thread_variable = value; }
#endif
|
ZJNixiang/HookZz | include/hookzz.h | #ifndef hookzz_h
#define hookzz_h
// clang-format off
#ifdef __cplusplus
extern "C" {
#endif //__cplusplus
#include <stdbool.h>
#include <stdint.h>
typedef uintptr_t zz_addr_t;
typedef void * zz_ptr_t;
#ifndef REGISTER_STATE_STRUCT
#define REGISTER_STATE_STRUCT
#if defined(__arm64__) || defined(__aarch64__)
#define... |
ZJNixiang/HookZz | src/std_kit/std_buffer_array.h | <gh_stars>1-10
#ifndef std_buffer_array_h
#define std_buffer_array_h
#include <stdlib.h>
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct _buffer_array_t {
void *data;
int size;
int capacity;
} buffer_array_t;
buffer_array_t *buffer_array_create(int default_capacity);
void buff... |
ZJNixiang/HookZz | src/platforms/backend-darwin/memory-helper-darwin.h | #ifndef platforms_backend_darwin_memory_helper_darwin_h
#define platforms_backend_darwin_memory_helper_darwin_h
#include "core.h"
#include "hookzz.h"
#include "memory_manager.h"
#include "std_kit/std_kit.h"
#include "mach_vm.h"
#include <mach-o/dyld.h>
#include <mach/mach.h>
#include <mach/vm_map.h>
#include <sys/mma... |
ZJNixiang/HookZz | src/std_kit/std_buffer_array.c | #include "std_buffer_array.h"
buffer_array_t *buffer_array_create(int default_capacity) {
if (default_capacity == 0) {
default_capacity = 64;
}
unsigned char *data = (unsigned char *)malloc(default_capacity);
buffer_array_t *buffer_array = (buffer_array_t *)malloc(sizeof(buffer_array_t));
... |
ZJNixiang/HookZz | src/hookzz_internal.h | <filename>src/hookzz_internal.h<gh_stars>1-10
#ifndef hookzz_internal_h
#define hookzz_internal_h
#include "core.h"
#include "hookzz.h"
bool zz_is_near_jump();
#endif |
GDXRepo/AHLaunchCtl | AHLaunchCtl/AHLaunchJob.h | // AHLaunchJob.h
// Copyright (c) 2014 <NAME> ( https://github.com/eahrold/AHLaunchCtl )
//
// 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 limitat... |
GDXRepo/AHLaunchCtl | AHLaunchCtl/AHLaunchCtl.h | // AHLaunchCtl.h
//
// Copyright (c) 2014 <NAME> ( https://github.com/eahrold/AHLaunchCtl )
//
// 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 limi... |
GDXRepo/AHLaunchCtl | AHLaunchCtl/AHServiceManagement.h | <gh_stars>10-100
// AHServiceManagement.h
// AHLaunchCtl
//
// Copyright (c) 2014 <NAME> ( https://github.com/eahrold/AHLaunchCtl )
//
// 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 wi... |
GDXRepo/AHLaunchCtl | AHLaunchCtl/AHServiceManagement_Private.h | <gh_stars>10-100
//
// AHServiceManagement_Private.h
// AHLaunchCtl
//
// Created by Eldon on 2/21/15.
// Copyright (c) 2015 <NAME>. All rights reserved.
//
#ifndef AHLaunchCtl_AHServiceManagement_Private_h
#define AHLaunchCtl_AHServiceManagement_Private_h
/**
* Directory path for launchd.plist files based on t... |
GDXRepo/AHLaunchCtl | AHLaunchCtl/AHLaunchJobSchedule.h | <filename>AHLaunchCtl/AHLaunchJobSchedule.h
//
// NSDateComponents+AHLaunchCtlSchedule.h
// AHLaunchCtl
//
// Created by Eldon on 4/26/14.
// Copyright (c) 2014 <NAME>. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
* Used as a wildcard in schedule
*/
extern NSInteger AHUndefinedScheduleComponent... |
GDXRepo/AHLaunchCtl | AHLaunchCtl/AHAuthorizer.h | // AHAuthorizer.h
// Copyright (c) 2014 <NAME> ( https://github.com/eahrold/AHLaunchCtl )
//
// 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 limita... |
BioBox/calcurse | src/io.c | /*
* Calcurse - text-based organizer
*
* Copyright (c) 2004-2020 calcurse Development Team <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of sourc... |
BioBox/calcurse | src/llist.c | /*
* Calcurse - text-based organizer
*
* Copyright (c) 2004-2020 calcurse Development Team <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* - Redistributions of sourc... |
BioBox/calcurse | src/ui-calendar.c | <filename>src/ui-calendar.c
/*
* Calcurse - text-based organizer
*
* Copyright (c) 2004-2020 calcurse Development Team <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* ... |
BioBox/calcurse | src/queue.c | <reponame>BioBox/calcurse
/*
* Calcurse - text-based organizer
*
* Copyright (c) 2004-2020 calcurse Development Team <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* ... |
BioBox/calcurse | src/ui-todo.c | <filename>src/ui-todo.c<gh_stars>100-1000
/*
* Calcurse - text-based organizer
*
* Copyright (c) 2004-2020 calcurse Development Team <<EMAIL>>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are ... |
HanixNicolas/app-mesh | src/daemon/Label.h | #pragma once
#include <map>
#include <memory>
#include <mutex>
#include <string>
#include <cpprest/json.h>
//////////////////////////////////////////////////////////////////////////
/// Label
//////////////////////////////////////////////////////////////////////////
class Label
{
public:
Label();
virtual ~Label();... |
HanixNicolas/app-mesh | src/prom_exporter/detail/core_export.h | <reponame>HanixNicolas/app-mesh
#ifndef PROMETHEUS_CPP_CORE_EXPORT
#define PROMETHEUS_CPP_CORE_EXPORT
#endif |
HanixNicolas/app-mesh | src/daemon/security/ldapplugin/LdapImpl.h | <reponame>HanixNicolas/app-mesh<gh_stars>10-100
#pragma once
#include <cpprest/json.h>
#include <mutex>
#include <string>
#include "../Security.h"
#define NOT_APPLICABLE_THROW \
override \
{ ... |
HanixNicolas/app-mesh | src/daemon/application/AppTimer.h | #pragma once
#include <chrono>
#include <memory>
#include <string>
#include <tuple>
#include "../../common/croncpp.h"
class DailyLimitation;
//////////////////////////////////////////////////////////////////////////
/// Calculate Application next start time
///////////////////////////////////////////////////////////... |
HanixNicolas/app-mesh | src/daemon/DailyLimitation.h | <reponame>HanixNicolas/app-mesh
#pragma once
#include <chrono>
#include <memory>
#include <string>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <cpprest/json.h>
//////////////////////////////////////////////////////////////////////////
/// Define the valid time range in one day
/////////////////////... |
HanixNicolas/app-mesh | src/daemon/process/LinuxCgroup.h | #pragma once
#include <string>
/// </summary>
/// Linux Cgroup operate interface
/// </summary>
class LinuxCgroup
{
public:
explicit LinuxCgroup(long long memLimitBytes, long long memSwapBytes, long long cpuShares);
virtual ~LinuxCgroup();
void setCgroup(const std::string &appName, int pid, int index);
long long ... |
HanixNicolas/app-mesh | src/daemon/PersistManager.h | <reponame>HanixNicolas/app-mesh
#pragma once
#include <map>
#include <memory>
#include <string>
#include "cpprest/json.h"
/// <summary>
/// App Process Recover object
/// </summary>
struct AppSnap
{
explicit AppSnap(pid_t pid, int64_t starttime);
bool operator==(const AppSnap &snapshort) const;
pid_t m_pid;
int6... |
HanixNicolas/app-mesh | src/daemon/security/ldapplugin/ldapcpp/cldap_server.h | <filename>src/daemon/security/ldapplugin/ldapcpp/cldap_server.h
/***************************************************************************
* Copyright (C) 2012 by <NAME> *
* <EMAIL> *
* ... |
HanixNicolas/app-mesh | src/daemon/process/MonitoredProcess.h | <gh_stars>10-100
#pragma once
#include <memory>
#include <mutex>
#include <string>
#include <thread>
#include "AppProcess.h"
class ACE_Process_Options;
/// <summary>
/// Monitor process and reply http request when finished
/// <summary>
class MonitoredProcess : public AppProcess
{
public:
explicit MonitoredProcess(... |
HanixNicolas/app-mesh | src/daemon/process/AppProcess.h | <filename>src/daemon/process/AppProcess.h<gh_stars>10-100
#pragma once
#include <map>
#include <string>
#include <tuple>
#include <ace/Process.h>
#include "../../common/Utility.h"
#include "../TimerHandler.h"
class LinuxCgroup;
class ResourceLimitation;
/// <summary>
/// Process Object, inherit from ACE_Process
///... |
HanixNicolas/app-mesh | src/daemon/ResourceCollection.h | <filename>src/daemon/ResourceCollection.h
#pragma once
#include <chrono>
#include <list>
#include <memory>
#include <mutex>
#include <string>
#include <unistd.h>
#include <cpprest/json.h>
struct HostNetInterface
{
std::string name;
bool ipv4;
std::string address;
};
///////////////////////////////////////////////... |
HanixNicolas/app-mesh | src/daemon/HealthCheckTask.h | #pragma once
#include <memory>
//////////////////////////////////////////////////////////////////////////
/// Do health check for applications
//////////////////////////////////////////////////////////////////////////
class HealthCheckTask
{
public:
HealthCheckTask();
virtual ~HealthCheckTask();
static std::shared_... |
HanixNicolas/app-mesh | src/daemon/rest/RestTcpServer.h | <gh_stars>10-100
#pragma once
#include <memory>
#include <mutex>
#include <thread>
#include <ace/Message_Block.h>
#include <ace/SOCK_Acceptor.h>
#include <ace/SOCK_Stream.h>
#include <ace/Task.h>
#include "HttpRequest.h"
#include "RestHandler.h"
/// <summary>
/// REST Server, inherit from RestHandler and Prometheus... |
HanixNicolas/app-mesh | src/daemon/process/DockerApiProcess.h | #pragma once
#include <string>
#include <cpprest/http_msg.h>
#include <cpprest/json.h>
#include "DockerProcess.h"
/// <summary>
/// Docker API Object
/// </summary>
class DockerApiProcess : public DockerProcess
{
public:
/// <summary>
/// Constructor
/// </summary>
/// <param name="dockerImage"></param>
/// <p... |
HanixNicolas/app-mesh | src/daemon/consul/Scheduler.h | #pragma once
#include <map>
#include <memory>
struct ConsulTopology;
struct ConsulTask;
/// <summary>
/// Leader schedule logic
/// </summary>
class Scheduler
{
public:
static std::map<std::string, std::shared_ptr<ConsulTopology>> scheduleTask(const std::map<std::string, std::shared_ptr<ConsulTask>> &taskMap, const... |
HanixNicolas/app-mesh | src/common/PerfLog.h | <filename>src/common/PerfLog.h
#pragma once
#include <chrono>
#include <string>
/// <summary>
/// Print performance log
/// </summary>
class PerfLog
{
public:
explicit PerfLog(const std::string &logger);
virtual ~PerfLog();
private:
const std::chrono::system_clock::time_point m_start;
const std::string m_logger;... |
HanixNicolas/app-mesh | src/daemon/application/AppBehavior.h | <reponame>HanixNicolas/app-mesh<gh_stars>10-100
#include <map>
#include <string>
#include <cpprest/json.h>
/// <summary>
/// Application error handling
/// </summary>
class AppBehavior
{
public:
/// <summary>
/// Application error handling behavior
/// </summary>
enum Action
{
STANDBY = 0,... |
HanixNicolas/app-mesh | src/daemon/security/Security.h | #pragma once
#include <memory>
#include <mutex>
#include <set>
#include <string>
#include <cpprest/json.h>
#include "User.h"
//////////////////////////////////////////////////////////////////////////
/// Security base implementation based on local JSON file
//////////////////////////////////////////////////////////... |
HanixNicolas/app-mesh | src/daemon/rest/PrometheusRest.h | <gh_stars>10-100
#pragma once
#include <atomic>
#include <memory>
#include <cpprest/http_listener.h> // HTTP server
#include "../../prom_exporter/family.h"
#include "HttpRequest.h"
#include "RestBase.h"
namespace prometheus
{
class Counter;
class Gauge;
class Registry;
}; // namespace prometheus
///////////////... |
HanixNicolas/app-mesh | src/common/DateTime.h | <gh_stars>10-100
#pragma once
#include <chrono>
#include <string>
#include <boost/date_time/local_time/local_time.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#define ISO8601FORMAT_IN "%Y-%m-%d %H:%M:%S%F%ZP"
#define ISO8601FORMAT_OUT "%Y-%m-%dT%H:%M:%S%F%Q"
#define RFC3339FORMAT "%Y-%m-%dT%H:%M:%S%FZ"
... |
HanixNicolas/app-mesh | src/daemon/rest/RestHandler.h | #pragma once
#include <functional>
#include <cpprest/http_listener.h> // HTTP server
#include "PrometheusRest.h"
class Application;
/// <summary>
/// REST service handle class, all REST request entrypoint
/// </summary>
class RestHandler : public PrometheusRest
{
public:
explicit RestHandler(bool forward2TcpServer... |
HanixNicolas/app-mesh | src/daemon/security/ldapplugin/ldapcpp/cldap_mod.h | <filename>src/daemon/security/ldapplugin/ldapcpp/cldap_mod.h
/***************************************************************************
* Copyright (C) 2012 by <NAME> *
* <EMAIL> *
* ... |
HanixNicolas/app-mesh | src/daemon/process/DockerProcess.h | #pragma once
#include <chrono>
#include <map>
#include <string>
#include "AppProcess.h"
/// <summary>
/// Docker command line process object
/// </summary>
class DockerProcess : public AppProcess
{
public:
/// <summary>
/// constructor
/// </summary>
/// <param name="dockerImage"></param>
/// <param name="conta... |
HanixNicolas/app-mesh | src/daemon/security/ldapplugin/ldapcpp/cldap_entry.h | <reponame>HanixNicolas/app-mesh
/***************************************************************************
* Copyright (C) 2012 by <NAME> *
* <EMAIL> *
* *
* ... |
HanixNicolas/app-mesh | src/daemon/rest/RestChildObject.h | #pragma once
#include <map>
#include <memory>
#include <mutex>
#include <string>
#include <ace/Message_Block.h>
#include <ace/SOCK_Connector.h>
#include <ace/SOCK_Stream.h>
#include "HttpRequest.h"
#include "RestHandler.h"
/// <summary>
/// REST Server Object, forward http REST request to TCP Server side
/// </summ... |
HanixNicolas/app-mesh | src/daemon/TimerHandler.h | #pragma once
#include <functional>
#include <map>
#include <memory>
#include <mutex>
#include <string>
#include <ace/Event_Handler.h>
#include <ace/Reactor.h>
//////////////////////////////////////////////////////////////////////////
/// Timer Event base class
/// The class which use timer event should implement fro... |
HanixNicolas/app-mesh | src/daemon/security/ldapplugin/ldapcpp/cldap_types.h | /***************************************************************************
* Copyright (C) 2012 by <NAME> *
* <EMAIL> *
* *
* This program is free software; ... |
HanixNicolas/app-mesh | src/prom_exporter/check_names.h | #pragma once
#include <string>
#include "detail/core_export.h"
namespace prometheus {
PROMETHEUS_CPP_CORE_EXPORT bool CheckMetricName(const std::string& name);
PROMETHEUS_CPP_CORE_EXPORT bool CheckLabelName(const std::string& name);
} // namespace prometheus
|
HanixNicolas/app-mesh | src/daemon/consul/ConsulEntity.h | <reponame>HanixNicolas/app-mesh
#pragma once
#include <chrono>
#include <map>
#include <memory>
#include <set>
#include <string>
#include <tuple>
#include <cpprest/json.h>
class Application;
class Label;
struct ConsulTask;
/// <summary>
/// Consul Node definition
/// </summary>
struct ConsulNode
{
ConsulNode();
s... |
HanixNicolas/app-mesh | src/daemon/security/ldapplugin/LdapGroup.h | <reponame>HanixNicolas/app-mesh<filename>src/daemon/security/ldapplugin/LdapGroup.h
#pragma once
#include <map>
#include <memory>
#include <mutex>
#include <set>
#include <string>
#include <cpprest/json.h>
class Role;
class Roles;
//////////////////////////////////////////////////////////////////////////
/// LDAP Gr... |
HanixNicolas/app-mesh | src/daemon/rest/HttpRequest.h | #pragma once
#include <functional>
#include <map>
#include <memory>
#include <ace/CDR_Stream.h>
#include <cpprest/http_client.h>
using namespace web;
using namespace http;
#define CONTENT_TYPE_APPLICATION_JSON "application/json"
/// <summary>
/// HttpRequest is wrapper of <web::http::http_request>,
/// - used f... |
HanixNicolas/app-mesh | src/daemon/security/User.h | #pragma once
#include <map>
#include <mutex>
#include <set>
#include <string>
#include <cpprest/json.h>
#include "Role.h"
//////////////////////////////////////////////////////////////////////////
/// User
//////////////////////////////////////////////////////////////////////////
class User
{
public:
explicit User... |
henryly94/pocketbook | src/entity.h | <filename>src/entity.h
#ifndef ENTITY_H_
#define ENTITY_H_
#include <string>
#include <vector>
#include "absl/container/flat_hash_map.h"
#include "absl/container/flat_hash_set.h"
#include "absl/time/time.h"
namespace yypocketbook {
struct Transaction {
enum Type {
CREDIT,
DEBIT,
};
Type type;
double... |
henryly94/pocketbook | src/util.h | #ifndef UTIL_H_
#define UTIL_H_
#include "absl/container/flat_hash_map.h"
#include "book.h"
#include "messages.pb.h"
namespace yypocketbook {
class Util {
public:
static protobuf::Book MakeProtobufBook(const Book &book);
static protobuf::Entity MakeProtobufEntity(const Entity &entity);
static protobuf::Trans... |
henryly94/pocketbook | src/book.h | <reponame>henryly94/pocketbook
#ifndef BOOK_H_
#define BOOK_H_
#include <utility>
#include <vector>
#include "absl/container/flat_hash_map.h"
#include "absl/strings/string_view.h"
#include "absl/time/time.h"
#include "entity.h"
namespace yypocketbook {
using EntityFeature = std::pair<Entity::Type, std::string>;
usi... |
Colbeyyy/eden | src/gui.h | #pragma once
#include <ch_stl/string.h>
#include <ch_stl/math.h>
struct Vertical_Layout {
f32 row_height;
f32 top_x;
f32 left_y;
f32 width;
f32 at_x;
f32 at_y;
Vertical_Layout(f32 _top_x, f32 _left_y, f32 _row_height) : top_x(_top_x), left_y(_left_y), row_height(_row_height), at_x(_top_x), at_y(_left_y) {}
... |
Colbeyyy/eden | src/editor.h | #pragma once
#include <ch_stl/window.h>
extern ch::Window the_window;
extern struct Font the_font; |
Colbeyyy/eden | src/buffer.h | #pragma once
#include <ch_stl/filesystem.h>
#include <ch_stl/gap_buffer.h>
#include <ch_stl/hash.h>
#include "draw.h"
#include "parsing.h"
using Buffer_ID = usize;
const usize invalid_buffer_id = 0;
CH_FORCEINLINE u64 hash(Buffer_ID id) {
return ch::fnv1_hash(&id, sizeof(Buffer_ID));
}
/**
* Gets the column size ... |
Colbeyyy/eden | src/parsing.h | #pragma once
#include <ch_stl/types.h>
struct Buffer;
// C++ lexing/parsing tools.
namespace parsing {
// This is the actual DFA state machine. It's not perfect,
// but I (phillip) can get it to run at 13mloc/s on a 3.6 GHz machine
// with 1600 MHz DDR3 RAM and, as of writing, YEET's UTF-8 gap buffer.
// It does as l... |
Colbeyyy/eden | src/parsing_cpp_keywords.h |
#if 1
#define CPP_KEYWORDS_2(X) \
X(do) \
X(if) \
X(or) \
#define CPP_KEYWORDS_3(X) \
X(and) \
X(asm) \
X(for) \
X(int) \
X(new) \
X(not) \
X(try) \
X(xor) \
#define CPP_KEYWORDS_4(X) \
X(auto) \
X(bool) \
X(case) \
X(char) \
X(else) \
X(enum) \
X(goto) \
X(long) \
X(this) \
X(true) \
X(void) \
#define CPP_KEYWORDS... |
Colbeyyy/eden | src/buffer_view.h | <reponame>Colbeyyy/eden
#pragma once
#include "buffer.h"
const f32 min_width_ratio = 0.2f;
struct Buffer_View {
Buffer_ID the_buffer = 0;
f32 width_ratio = 0.5f;
usize cursor = 0;
usize selection = 0;
u64 desired_column = 0;
u64 current_column = 0;
u64 current_line = 0;
f32 current_scroll_y = 0.f;
f32 ta... |
Colbeyyy/eden | src/config.h | <gh_stars>10-100
#pragma once
#include <ch_stl/math.h>
#define CONFIG_VAR(macro) \
macro(u16, font_size, 24) \
macro(ch::Color, background_color, 0x052329FF) \
macro(ch::Color, foreground_color, 0xD6B58DFF) \
macro(ch::Color, cursor_color, 0x81E38EFF) \
macro(ch::Color, selection_color, 0x000EFFFF) \
macro(ch::Color,... |
Colbeyyy/eden | src/input.h | <gh_stars>10-100
#pragma once
#include <ch_stl/input.h>
#include <ch_stl/math.h>
#include <ch_stl/array.h>
#include <ch_stl/hash.h>
extern ch::Vector2 last_mouse_position;
extern ch::Vector2 current_mouse_position;
extern f32 current_mouse_scroll_y;
enum Key_Bind_Modifier {
KBM_None = 0,
KBM_Shift = 1,
KBM_Ctrl ... |
Colbeyyy/eden | src/actions.h | <filename>src/actions.h
#pragma once
/** adds a newline to the current buffer. */
void newline();
/** removes the char at the cursor in the current buffer. */
void backspace();
void move_cursor_right(bool move_selection);
void move_cursor_left(bool move_selection);
void move_cursor_up(bool move_selection);
void m... |
Colbeyyy/eden | src/draw.h | #pragma once
#include <ch_stl/opengl.h>
#include <ch_stl/math.h>
#include <stb/stb_truetype.h>
struct Font_Glyph {
f32 width, height;
f32 bearing_x, bearing_y;
f32 advance;
u32 x0, y0, x1, y1;
};
struct Font_Atlas {
u32 w;
u32 h;
Font_Glyph* glyphs;
};
struct Font {
stbtt_fontinfo info;
u16 size;
f64 ... |
CFAthens/lyricsify-mac | Pods/Target Support Files/Pods-LyricsifyUITests/Pods-LyricsifyUITests-umbrella.h | #ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
FOUNDATION_EXPORT double Pods_LyricsifyUITestsVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_LyricsifyUITestsVersionString[];
|
CFAthens/lyricsify-mac | Pods/Target Support Files/Pods-Lyricsify/Pods-Lyricsify-umbrella.h | #ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
FOUNDATION_EXPORT double Pods_LyricsifyVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_LyricsifyVersionString[];
|
CFAthens/lyricsify-mac | Pods/Target Support Files/Pods-LyricsifyTests/Pods-LyricsifyTests-umbrella.h | <filename>Pods/Target Support Files/Pods-LyricsifyTests/Pods-LyricsifyTests-umbrella.h
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif
FOUNDATION_EXPORT double Pods_LyricsifyTestsVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_LyricsifyTestsVersionString[];
|
zfields/mcp23s17-wiring | tests/MOCK_wiring.h | <filename>tests/MOCK_wiring.h<gh_stars>0
/* Created and copyrighted by <NAME>. Offered as open source under the MIT License (MIT). */
#if defined(TESTING)
#ifndef MOCK_WIRING
#define MOCK_WIRING
#include <cstdint>
#include <functional>
enum BitOrder : uint8_t {
LSBFIRST = 0,
MSBFIRST,
};
enum ClockDivider : uint8... |
zfields/mcp23s17-wiring | src/mcp23s17.h | /* Created and copyrighted by <NAME>. Offered as open source under the MIT License (MIT). */
#ifndef MCP23S17_H
#define MCP23S17_H
#include <cstdint>
class mcp23s17 {
public:
// Definition(s)
typedef void(*isr_t)(void);
/// \brief Control Registers
/// \note IOCONA is equivalent to IOCONB
/// ... |
Dynamo13D/ubicoin | src/chainparamsseeds.h | #ifndef UBICOIN_CHAINPARAMSSEEDS_H
#define UBICOIN_CHAINPARAMSSEEDS_H
/**
* List of fixed seed nodes for the ubicoin network
* AUTOGENERATED by contrib/seeds/generate-seeds.py
*
* Each line contains a 16-byte IPv6 address and a port.
* IPv4 as well as onion addresses are wrapped inside an IPv6 address accordingly.... |
AstroProfundis/monitoring-tools | collectd/collectd_tsl2561.c | <reponame>AstroProfundis/monitoring-tools<gh_stars>1-10
/*
* A simple collectd exec plugin that reads data from TSL2561
* and similiar sensors.
*
* To use it, first `cd` into 'tsl2561/src' and `make`, then compile
* this plugin with:
* gcc -Wall tsl2561/src/tsl2561.o collectd_tsl2561.c -o collectd_tsl2561
*
*... |
AstroProfundis/monitoring-tools | collectd/collectd_max44009.c | // Distributed with a free-will license.
// Use it any way you want, profit or free, provided it fits in the licenses of its associated works.
// MAX44009
// This code is designed to work with the MAX44009_I2CS I2C Mini Module available from ControlEverything.com.
// https://www.controleverything.com/products
#i... |
AstroProfundis/monitoring-tools | collectd/collectd_dht.c | <filename>collectd/collectd_dht.c
/*
* A simple collectd exec plugin that reads data from DHT11/DHT22
* and similiar sensors.
* Modified base on example code from:
* https://www.piprojects.xyz/temperature-humidity-sensor-orange-pi/
*
* Remember to add following configs to your types.db:
* dht_humi ... |
AstroProfundis/monitoring-tools | collectd/collectd_bmp180.c | /*
* A simple collectd exec plugin that reads data from BMP180
* and similiar sensors.
*
* To use it, first `cd` into 'bmp180/src' and `make`, then compile
* this plugin with:
* gcc -Wall bmp180/src/bmp180.o collectd_bmp180.c -o collectd_bmp180 -lm
*
* Remember to add following configs to your types.db:
* bm... |
bravegnu/mzero | src/debug.h | <filename>src/debug.h<gh_stars>10-100
#ifndef DEBUG_H
#define DEBUG_H
#include <cstdint>
#include <string>
#include "sysbus.h"
class Debug {
private:
uint32_t *m_regs;
bool *m_c;
bool *m_v;
bool *m_n;
bool *m_z;
SystemBus *m_sysbus;
uint32_t *parse_reg(std::string reg_name);
public:
static const ch... |
bravegnu/mzero | src/decoder.h | <filename>src/decoder.h
#ifndef DECODER_H
#define DECODER_H
#include <cstdint>
enum Cond {
COND_EQ,
COND_NE,
COND_CS,
COND_CC,
COND_MI,
COND_PL,
COND_VS,
COND_VC,
COND_HI,
COND_LS,
COND_GE,
COND_LT,
COND_GT,
COND_LE,
COND_AL,
COND_UNDEF,
};
enum Op {
/* Data Processing */
LSLI, LS... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.