Changeset 28 in cheroxy for trunk/include
- Timestamp:
- 11/16/12 13:07:05 (12 years ago)
- Location:
- trunk/include
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/CRXHttpRequest.h
r26 r28 12 12 std::string mMethod; 13 13 std::string mUrl; 14 std::string mFileExtension; 14 15 15 16 std::string mProtocol; … … 18 19 19 20 public: 20 CRXHttpRequest 21 ~CRXHttpRequest 21 CRXHttpRequest (void); 22 ~CRXHttpRequest (void); 22 23 23 24 private: 24 void Parse (void); 25 void Reset (void); 25 void Parse (void); 26 void ParseFileExtension (void); 27 void Reset (void); 26 28 27 29 public: 28 void SetHeader (const char * aHttpRequest);29 std::string GetHeader (void) const;30 void SetHeader (const char * aHttpRequest); 31 std::string GetHeader (void) const; 30 32 31 CRXHttpRequest & operator = (const char * aHttpRequest);33 CRXHttpRequest & operator = (const char * aHttpRequest); 32 34 33 35 public: 34 std::string GetURL (void) const; 35 std::string GetHost (void) const; 36 int GetPort (void) const; 36 std::string GetURL (void) const; 37 std::string GetHost (void) const; 38 int GetPort (void) const; 39 std::string GetFileExtension (void) const; 37 40 }; 38 41 -
trunk/include/CRXProxy.h
r24 r28 10 10 #include "CRXHttpRequest.h" 11 11 #include "CRXHttpResponse.h" 12 #include "CRXFilter.h" 12 13 13 14 #define ERROR_PROXY -10000 … … 17 18 #define ERROR_PROXY_FAILED_TO_SEND_RESPONSE ERROR_PROXY - 4 18 19 #define ERROR_PROXY_FAILED_TO_CONNECT_TO_SERVER ERROR_PROXY - 5 19 #define ERROR_PROXY_FAILED_TO_SET_RESPONSE ERROR_PROXY - 520 #define ERROR_PROXY_FAILED_TO_SET_RESPONSE ERROR_PROXY - 6 20 21 21 typedef enum {22 CRX_PROXY_STATUS_ERROR = -1,23 CRX_PROXY_STATUS_IDLE,24 CRX_PROXY_STATUS_BUSY25 } E_CRX_PROXY_STATUS;26 22 27 23 class CRXProxy : public CRXException 28 24 { 29 25 private: 26 bool mIsIntercepted; 27 30 28 CRXSocket mClient; 31 29 CRXSocket mServer; … … 34 32 CRXHttpResponse mHttpResponse; 35 33 36 E_CRX_PROXY_STATUS mProxyStatus;34 static CRXFilter mFilter; 37 35 38 36 public: … … 43 41 44 42 public: 43 /* common utilities */ 45 44 void ReleaseInstance (void); 46 45 … … 48 47 void Close (void); 49 48 50 int GetStatus (void); 49 public: 50 /* interface to filter */ 51 void SetRequestFilter (const E_CRX_FILTER_REQUEST aType, 52 const bool aIsMatched, 53 const std::string aValue); 54 void RemoveRequestFilter (const E_CRX_FILTER_REQUEST aType); 55 bool CheckRequestFilter (const E_CRX_FILTER_REQUEST aType); 51 56 52 57 public: 58 /* for communication */ 53 59 int Forward (void); 54 60
Note:
See TracChangeset
for help on using the changeset viewer.