Changeset 74714 in vbox for trunk/include/VBox
- Timestamp:
- Oct 9, 2018 11:50:22 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/GuestHost/DragAndDrop.h
r74577 r74714 149 149 DnDURIObject(Type type, 150 150 const RTCString &strSrcPathAbs = "", 151 const RTCString &strDstPathAbs = "", 152 uint32_t fMode = 0, uint64_t cbSize = 0); 151 const RTCString &strDstPathAbs = ""); 153 152 virtual ~DnDURIObject(void); 154 153 … … 169 168 const RTCString &GetDestPathAbs(void) const { return m_strTgtPathAbs; } 170 169 171 /** 172 * Returns the file mode of the object. 173 * 174 * Note: Only applies if the object is of type DnDURIObject::Type_File. 175 * 176 * @return File mode. 177 */ 178 uint32_t GetMode(void) const { AssertReturn(m_Type == Type_File, 0); return u.File.fMode; } 179 180 /** 181 * Returns the bytes already processed (read / written). 182 * 183 * Note: Only applies if the object is of type DnDURIObject::Type_File. 184 * 185 * @return Bytes already processed (read / written). 186 */ 187 uint64_t GetProcessed(void) const { AssertReturn(m_Type == Type_File, 0); return u.File.cbProcessed; } 188 189 /** 190 * Returns the file's size (in bytes). 191 * 192 * Note: Only applies if the object is of type DnDURIObject::Type_File. 193 * 194 * @return The file's size (in bytes). 195 */ 196 uint64_t GetSize(void) const { AssertReturn(m_Type == Type_File, 0); return u.File.cbSize; } 170 RTFMODE GetMode(void) const; 171 172 uint64_t GetProcessed(void) const; 173 174 uint64_t GetSize(void) const; 197 175 198 176 /** … … 201 179 * @return The object's type. 202 180 */ 203 Type GetType(void) const { return m_Type; } 204 205 public: 206 207 /** 208 * Sets the bytes to process by the object. 181 Type GetType(void) const { return m_enmType; } 182 183 /** 184 * Returns the object's view. 209 185 * 210 * Note: Only applies if the object is of type DnDURIObject::Type_File. 211 * 212 * @return IPRT return code. 213 * @param cbSize Size (in bytes) to process. 214 */ 215 int SetSize(uint64_t cbSize) { AssertReturn(m_Type == Type_File, 0); u.File.cbSize = cbSize; return VINF_SUCCESS; } 186 * @return The object's view. 187 */ 188 View GetView(void) const { return m_enmView; } 189 190 public: 191 192 int SetSize(uint64_t cbSize); 216 193 217 194 public: … … 220 197 bool IsComplete(void) const; 221 198 bool IsOpen(void) const; 222 int Open(View enmView, uint64_t fOpen, uint32_t fMode = 0); 223 int OpenEx(const RTCString &strPath, Type enmType, View enmView, uint64_t fOpen = 0, uint32_t fMode = 0, DNDURIOBJECTFLAGS = DNDURIOBJECT_FLAGS_NONE); 199 int Open(View enmView, uint64_t fOpen, RTFMODE fMode = 0); 200 int OpenEx(const RTCString &strPath, View enmView, uint64_t fOpen = 0, RTFMODE fMode = 0, DNDURIOBJECTFLAGS = DNDURIOBJECT_FLAGS_NONE); 201 int QueryInfo(View enmView); 224 202 int Read(void *pvBuf, size_t cbBuf, uint32_t *pcbRead); 225 203 void Reset(void); … … 233 211 234 212 void closeInternal(void); 213 int queryInfoInternal(View enmView); 235 214 236 215 protected: 237 216 238 217 /** The object's type. */ 239 Type m_Type; 218 Type m_enmType; 219 /** The object's view. */ 220 View m_enmView; 240 221 /** Absolute path (base) for the source. */ 241 222 RTCString m_strSrcPathAbs; … … 253 234 { 254 235 /** File handle. */ 255 RTFILE hFile;256 /** Used file mode. */257 uint32_t fMode;258 /** Size (in bytes) to read/write. */259 uint64_t cbSize;236 RTFILE hFile; 237 /** File system object information of this file. */ 238 RTFSOBJINFO objInfo; 239 /** Bytes to proces for reading/writing. */ 240 uint64_t cbToProcess; 260 241 /** Bytes processed reading/writing. */ 261 uint64_t cbProcessed;242 uint64_t cbProcessed; 262 243 } File; 244 struct 245 { 246 /** Directory handle. */ 247 RTDIR hDir; 248 /** File system object information of this directory. */ 249 RTFSOBJINFO objInfo; 250 } Dir; 263 251 } u; 264 252 };
Note:
See TracChangeset
for help on using the changeset viewer.