Summary: I am working in Horizon Worlds and I would like to integrate Flipper with HzW app. Currently FlipperPlugin C++ code won't compile on Windows since it uses Linux-only headers like `netdb.h` and `sys/fcntl.h`, I posted here and looks like it is not currently supported: https://fb.workplace.com/groups/flippersupport/posts/1704837183330266 The problem seem to be in only in `FlipperConnectionEndpointVerifier.cpp`, and I'm updating it to make it compatible with Windows. Also apparently there's some issue with `#include` of few files and namespaces, leading to "struct redefinition" errors where `#pragma once` does not help https://fb.workplace.com/groups/474291069286180/posts/25313067014981908/ Solving it with manual #define Reviewed By: lblasa Differential Revision: D50337573 fbshipit-source-id: affdf1aee2b9dfe615227827fedf324a5f17d8b0
30 lines
612 B
C++
30 lines
612 B
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#pragma once
|
|
#ifndef _FLIPPERSCHEDULER_H_
|
|
#define _FLIPPERSCHEDULER_H_
|
|
|
|
#include <functional>
|
|
|
|
namespace facebook {
|
|
namespace flipper {
|
|
|
|
using Func = std::function<void()>;
|
|
|
|
struct Scheduler {
|
|
virtual ~Scheduler() {}
|
|
virtual void schedule(Func&& t) = 0;
|
|
|
|
virtual void scheduleAfter(Func&& t, unsigned int ms) = 0;
|
|
virtual bool isRunningInOwnThread() = 0;
|
|
};
|
|
|
|
} // namespace flipper
|
|
} // namespace facebook
|
|
#endif
|