protocol_HTTPClient.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #pragma once
  2. #ifndef protocol_HTTPClient_H_
  3. #define protocol_HTTPClient_H_
  4. #include "protocol_shoutcastClient.h"
  5. #include <vector>
  6. class streamData;
  7. class protocol_HTTPClient: public protocol_shoutcastClient
  8. {
  9. private:
  10. typedef void (protocol_HTTPClient::*state_t)();
  11. state_t m_state;
  12. state_t m_nextState;
  13. void state_AttachToStream() throw(std::exception);
  14. void state_Close() throw(std::exception);
  15. void state_SendText() throw(std::exception);
  16. void state_InitiateStream() throw(std::exception);
  17. void state_SendIntro() throw(std::exception);
  18. virtual void timeSlice() throw(std::exception);
  19. virtual uniString::utf8 name() const throw() { return "protocol_HTTPClient"; }
  20. public:
  21. protocol_HTTPClient (protocol_HTTPStyle &hs, const streamData::streamID_t streamID, const uniString::utf8 &hostName,
  22. const uniString::utf8 &addr, const uniString::utf8 &XFF) throw(std::exception);
  23. virtual ~protocol_HTTPClient() throw();
  24. virtual void setCallback (protocol_shoutcastClient::state_t callback = NULL, protocol_shoutcastClient::state_t next = NULL);
  25. void return_403(void);
  26. };
  27. #endif