Changeset 49842 in vbox for trunk/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.h
- Timestamp:
- Dec 9, 2013 1:49:46 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/NetworkServices/NetLib/VBoxNetBaseService.h
r49832 r49842 30 30 31 31 32 class VBoxNetLockee 33 { 34 public: 35 virtual int syncEnter() = 0; 36 virtual int syncLeave() = 0; 37 }; 38 39 40 class VBoxNetALock 41 { 42 public: 43 VBoxNetALock(VBoxNetLockee *a_lck):m_lck(a_lck) 44 { 45 if (m_lck) 46 m_lck->syncEnter(); 47 } 48 49 ~VBoxNetALock() 50 { 51 if (m_lck) 52 m_lck->syncLeave(); 53 } 54 55 private: 56 VBoxNetLockee *m_lck; 57 }; 58 32 59 # ifndef BASE_SERVICES_ONLY 33 class VBoxNetBaseService: public VBoxNetHlpUDPService 60 class VBoxNetBaseService: public VBoxNetHlpUDPService, public VBoxNetLockee 34 61 { 35 62 public: … … 48 75 void const *pvData, size_t cbData) const; 49 76 virtual void usage(void) = 0; 50 virtual int run(void) = 0;51 77 virtual int parseOpt(int rc, const RTGETOPTUNION& getOptVal) = 0; 52 78 virtual int processFrame(void *, size_t) = 0; … … 56 82 57 83 virtual int init(void); 84 virtual int run(void); 58 85 virtual bool isMainNeeded() const; 59 86 … … 96 123 virtual void debugPrintV(int32_t iMinLevel, bool fMsg, const char *pszFmt, va_list va) const; 97 124 125 private: 98 126 void doReceiveLoop(); 99 127 100 protected: 128 /** starts receiving thread and enter event polling loop. */ 129 int startReceiveThreadAndEnterEventLoop(); 130 131 protected: 101 132 /* VirtualBox instance */ 102 133 ComPtr<IVirtualBox> virtualbox; 103 134 104 private:135 private: 105 136 struct Data; 106 137 Data *m; 107 138 108 private:139 private: 109 140 PRTGETOPTDEF getOptionsPtr(); 110 141 };
Note:
See TracChangeset
for help on using the changeset viewer.