Include VS solution
And refactor code: tab, code style. and end of lines. Update the libcpuid lib.
This commit is contained in:
parent
98c151b190
commit
86f0d9d944
106 changed files with 12665 additions and 6894 deletions
|
@ -40,30 +40,33 @@ class Url;
|
|||
class FailoverStrategy : public IStrategy, public IClientListener
|
||||
{
|
||||
public:
|
||||
FailoverStrategy(const std::vector<Url*> &urls, const char *agent, IStrategyListener *listener);
|
||||
FailoverStrategy(const std::vector<Url> & urls, const std::string & agent, IStrategyListener* listener);
|
||||
|
||||
public:
|
||||
inline bool isActive() const override { return m_active >= 0; }
|
||||
inline bool isActive() const override
|
||||
{
|
||||
return m_active >= 0;
|
||||
}
|
||||
|
||||
int64_t submit(const JobResult &result) override;
|
||||
void connect() override;
|
||||
void resume() override;
|
||||
void stop() override;
|
||||
void tick(uint64_t now) override;
|
||||
int64_t submit(const JobResult & result) override;
|
||||
void connect() override;
|
||||
void resume() override;
|
||||
void stop() override;
|
||||
void tick(uint64_t now) override;
|
||||
|
||||
protected:
|
||||
void onClose(Client *client, int failures) override;
|
||||
void onJobReceived(Client *client, const Job &job) override;
|
||||
void onLoginSuccess(Client *client) override;
|
||||
void onResultAccepted(Client *client, const SubmitResult &result, const char *error) override;
|
||||
void onClose(Client* client, int failures) override;
|
||||
void onJobReceived(Client* client, const Job & job) override;
|
||||
void onLoginSuccess(Client* client) override;
|
||||
void onResultAccepted(Client* client, const SubmitResult & result, const std::string & error) override;
|
||||
|
||||
private:
|
||||
void add(const Url *url, const char *agent);
|
||||
void add(const Url & url, const std::string & agent);
|
||||
|
||||
int m_active;
|
||||
int m_index;
|
||||
IStrategyListener *m_listener;
|
||||
std::vector<Client*> m_pools;
|
||||
int m_active;
|
||||
int m_index;
|
||||
IStrategyListener* m_listener;
|
||||
std::vector<Client*> m_pools;
|
||||
};
|
||||
|
||||
#endif /* __FAILOVERSTRATEGY_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue