Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1132 lines
20 KiB

  1. /*++
  2. Module Name:
  3. hsmrecli.cpp
  4. Abstract:
  5. This class represents an HSM recall queue work item - a unit of work
  6. that is performed by the HSM engine for recalls
  7. Author:
  8. Ravisankar Pudipeddi [ravisp]
  9. Revision History:
  10. --*/
  11. #include "stdafx.h"
  12. #define WSB_TRACE_IS WSB_TRACE_BIT_HSMTSKMGR
  13. #include "wsb.h"
  14. #include "fsa.h"
  15. #include "task.h"
  16. #include "hsmrecli.h"
  17. static USHORT iCount = 0;
  18. HRESULT
  19. CHsmRecallItem::CompareTo(
  20. IN IUnknown* pUnknown,
  21. OUT SHORT* pResult
  22. )
  23. /*++
  24. Implements:
  25. IWsbCollectable::CompareTo().
  26. --*/
  27. {
  28. HRESULT hr = S_OK;
  29. CComPtr<IHsmRecallItem> pWorkItem;
  30. WsbTraceIn(OLESTR("CHsmRecallItem::CompareTo"), OLESTR(""));
  31. try {
  32. // Did they give us a valid item to compare to?
  33. WsbAssert(0 != pUnknown, E_POINTER);
  34. // We need the IHsmRecallItem interface to get the value of the object.
  35. WsbAffirmHr(pUnknown->QueryInterface(IID_IHsmRecallItem, (void**) &pWorkItem));
  36. // Compare the items
  37. hr = CompareToIHsmRecallItem(pWorkItem, pResult);
  38. } WsbCatch(hr);
  39. WsbTraceOut(OLESTR("CHsmRecallItem::CompareTo"), OLESTR("hr = <%ls>, result = <%ls>"), WsbHrAsString(hr), WsbPtrToShortAsString(pResult));
  40. return(hr);
  41. }
  42. HRESULT
  43. CHsmRecallItem::CompareToIHsmRecallItem(
  44. IN IHsmRecallItem* pWorkItem,
  45. OUT SHORT* pResult
  46. )
  47. /*++
  48. Implements:
  49. IHsmRecallItem::CompareToIHsmRecallItem().
  50. --*/
  51. {
  52. HRESULT hr = S_OK;
  53. GUID l_Id; // Type of work to do
  54. WsbTraceIn(OLESTR("CHsmRecallItem::CompareToIHsmRecallItem"), OLESTR(""));
  55. try {
  56. //
  57. // Did they give us a valid item to compare to?
  58. //
  59. WsbAssert(0 != pWorkItem, E_POINTER);
  60. //
  61. // Get the ID
  62. //
  63. WsbAffirmHr(pWorkItem->GetId(&l_Id));
  64. if (l_Id != m_MyId){
  65. hr = S_FALSE;
  66. }
  67. // If they asked for the relative value back, then return it to them.
  68. if (pResult != NULL) {
  69. if (S_OK == hr) {
  70. *pResult = 0;
  71. } else {
  72. *pResult = 1;
  73. }
  74. }
  75. } WsbCatch(hr);
  76. WsbTraceOut(OLESTR("CHsmRecallItem::CompareToIHsmRecallItem"), OLESTR("hr = <%ls>, result = <%ls>"), WsbHrAsString(hr), WsbPtrToShortAsString(pResult));
  77. return(hr);
  78. }
  79. HRESULT
  80. CHsmRecallItem::FinalConstruct(
  81. void
  82. )
  83. /*++
  84. Implements:
  85. CComObjectRoot::FinalConstruct().
  86. --*/
  87. {
  88. HRESULT hr = S_OK;
  89. WsbTraceIn(OLESTR("CHsmRecallItem::FinalConstruct"), OLESTR(""));
  90. try {
  91. WsbAffirmHr(CWsbObject::FinalConstruct());
  92. //
  93. // The comparison for database searches is based on the
  94. // ID of this object (m_MyId).
  95. //
  96. WsbAffirmHr(CoCreateGuid(&m_MyId));
  97. m_WorkType = HSM_WORK_ITEM_NONE;
  98. m_MediaId = GUID_NULL;
  99. m_MediaLastUpdate = WsbLLtoFT(0);
  100. m_MediaLastError = S_OK;
  101. m_MediaRecallOnly = FALSE;
  102. m_MediaFreeBytes = 0;
  103. m_JobState = HSM_JOB_STATE_IDLE;
  104. m_JobPhase = HSM_JOB_PHASE_MOVE_ACTION;
  105. m_StateCookie = 0;
  106. m_EventCookie = 0;
  107. } WsbCatch(hr);
  108. iCount++;
  109. WsbTraceOut(OLESTR("CHsmRecallItem::FinalConstruct"), OLESTR("hr = <%ls>, Count is <%d>"),
  110. WsbHrAsString(hr), iCount);
  111. return(hr);
  112. }
  113. void
  114. CHsmRecallItem::FinalRelease(
  115. void
  116. )
  117. /*++
  118. Implements:
  119. CComObjectRoot::FinalRelease().
  120. --*/
  121. {
  122. WsbTraceIn(OLESTR("CHsmRecallItem::FinalRelease"), OLESTR(""));
  123. // Let the parent class do his thing.
  124. CWsbObject::FinalRelease();
  125. iCount--;
  126. WsbTraceOut(OLESTR("CHsmRecallItem::FinalRelease"), OLESTR("Count is <%d>"), iCount);
  127. }
  128. HRESULT
  129. CHsmRecallItem::GetFsaPostIt (
  130. OUT IFsaPostIt **ppFsaPostIt
  131. )
  132. /*++
  133. Implements:
  134. IHsmRecallItem::GetFsaPostIt
  135. --*/
  136. {
  137. HRESULT hr = S_OK;
  138. WsbTraceIn(OLESTR("CHsmRecallItem::GetFsaPostIt"), OLESTR(""));
  139. try {
  140. // Did they give us a valid pointer?
  141. WsbAssert(0 != ppFsaPostIt, E_POINTER);
  142. *ppFsaPostIt = m_pFsaPostIt;
  143. if (0 != *ppFsaPostIt) {
  144. (*ppFsaPostIt)->AddRef();
  145. }
  146. } WsbCatch(hr);
  147. WsbTraceOut(OLESTR("CHsmRecallItem::GetFsaPostIt"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  148. return(hr);
  149. }
  150. HRESULT
  151. CHsmRecallItem::GetFsaResource (
  152. OUT IFsaResource **ppFsaResource
  153. )
  154. /*++
  155. Implements:
  156. IHsmRecallItem::GetFsaResource
  157. --*/
  158. {
  159. HRESULT hr = S_OK;
  160. WsbTraceIn(OLESTR("CHsmRecallItem::GetFsaResource"), OLESTR(""));
  161. try {
  162. // Did they give us a valid pointer?
  163. WsbAssert(0 != ppFsaResource, E_POINTER);
  164. *ppFsaResource = m_pFsaResource;
  165. if (0 != *ppFsaResource) {
  166. (*ppFsaResource)->AddRef();
  167. }
  168. } WsbCatch(hr);
  169. WsbTraceOut(OLESTR("CHsmRecallItem::GetFsaResource"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  170. return(hr);
  171. }
  172. HRESULT
  173. CHsmRecallItem::GetId(
  174. OUT GUID *pId
  175. )
  176. /*++
  177. Implements:
  178. IHsmRecallItem::GetId().
  179. --*/
  180. {
  181. HRESULT hr = S_OK;
  182. WsbTraceIn(OLESTR("CHsmRecallItem::GetId"), OLESTR(""));
  183. try {
  184. // Did they give us a valid pointer?
  185. WsbAssert(0 != pId, E_POINTER);
  186. *pId = m_MyId;
  187. } WsbCatch(hr);
  188. WsbTraceOut(OLESTR("CHsmRecallItem::GetId"), OLESTR("hr = <%ls>, Id = <%ls>"),
  189. WsbHrAsString(hr), WsbPtrToGuidAsString(pId));
  190. return(hr);
  191. }
  192. HRESULT
  193. CHsmRecallItem::GetMediaInfo (
  194. OUT GUID *pMediaId,
  195. OUT FILETIME *pMediaLastUpdate,
  196. OUT HRESULT *pMediaLastError,
  197. OUT BOOL *pMediaRecallOnly,
  198. OUT LONGLONG *pMediaFreeBytes,
  199. OUT short *pMediaRemoteDataSet
  200. )
  201. /*++
  202. Implements:
  203. IHsmRecallItem::GetMediaInfo
  204. --*/
  205. {
  206. HRESULT hr = S_OK;
  207. WsbTraceIn(OLESTR("CHsmRecallItem::GetMediaInfo"), OLESTR(""));
  208. try {
  209. // Did they give us valid pointers?
  210. WsbAssert(0 != pMediaId, E_POINTER);
  211. WsbAssert(0 != pMediaLastUpdate, E_POINTER);
  212. WsbAssert(0 != pMediaLastError, E_POINTER);
  213. WsbAssert(0 != pMediaRecallOnly, E_POINTER);
  214. WsbAssert(0 != pMediaFreeBytes, E_POINTER);
  215. WsbAssert(0 != pMediaRemoteDataSet, E_POINTER);
  216. *pMediaId = m_MediaId;
  217. *pMediaLastUpdate = m_MediaLastUpdate;
  218. *pMediaLastError = m_MediaLastError;
  219. *pMediaRecallOnly = m_MediaRecallOnly;
  220. *pMediaFreeBytes = m_MediaFreeBytes;
  221. *pMediaRemoteDataSet = m_MediaRemoteDataSet;
  222. } WsbCatch(hr);
  223. WsbTraceOut(OLESTR("CHsmRecallItem::GetMediaInfo"),
  224. OLESTR("hr = <%ls>, Id = <%ls>, LastUpdate = <%ls>, LastError = <%ls>, Recall Only = <%ls>, Free Bytes = <%ls>, RemoteDataSet = <%ls>"),
  225. WsbHrAsString(hr), WsbPtrToGuidAsString(pMediaId), WsbPtrToFiletimeAsString(FALSE, pMediaLastUpdate),
  226. WsbPtrToHrAsString(pMediaLastError), WsbPtrToBoolAsString(pMediaRecallOnly),
  227. WsbPtrToLonglongAsString(pMediaFreeBytes), WsbPtrToShortAsString(pMediaRemoteDataSet));
  228. return(hr);
  229. }
  230. HRESULT
  231. CHsmRecallItem::GetResult(
  232. OUT HRESULT *pHr
  233. )
  234. /*++
  235. Implements:
  236. IHsmRecallItem::GetResult().
  237. --*/
  238. {
  239. HRESULT hr = S_OK;
  240. WsbTraceIn(OLESTR("CHsmRecallItem::GetResult"), OLESTR(""));
  241. try {
  242. // Did they give us a valid pointer?
  243. WsbAssert(0 != pHr, E_POINTER);
  244. *pHr = m_WorkResult;
  245. } WsbCatch(hr);
  246. WsbTraceOut(OLESTR("CHsmRecallItem::GetResult"), OLESTR("hr = <%ls>, Result = <%ls>"),
  247. WsbHrAsString(hr), WsbPtrToHrAsString(pHr));
  248. return(hr);
  249. }
  250. HRESULT
  251. CHsmRecallItem::GetWorkType(
  252. OUT HSM_WORK_ITEM_TYPE *pWorkType
  253. )
  254. /*++
  255. Implements:
  256. IHsmRecallItem::GetWorkType().
  257. --*/
  258. {
  259. HRESULT hr = S_OK;
  260. WsbTraceIn(OLESTR("CHsmRecallItem::GetWorkType"), OLESTR(""));
  261. try {
  262. // Did they give us a valid pointer?
  263. WsbAssert(0 != pWorkType, E_POINTER);
  264. *pWorkType = m_WorkType;
  265. } WsbCatch(hr);
  266. WsbTraceOut(OLESTR("CHsmRecallItem::GetWorkType"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  267. return(hr);
  268. }
  269. HRESULT
  270. CHsmRecallItem::GetEventCookie(
  271. OUT DWORD *pEventCookie
  272. )
  273. /*++
  274. Implements:
  275. IHsmRecallItem::GetEventCookie().
  276. --*/
  277. {
  278. HRESULT hr = S_OK;
  279. WsbTraceIn(OLESTR("CHsmRecallItem::GetEventCookie"), OLESTR(""));
  280. try {
  281. // Did they give us a valid pointer?
  282. WsbAssert(0 != pEventCookie, E_POINTER);
  283. *pEventCookie = m_EventCookie;
  284. } WsbCatch(hr);
  285. WsbTraceOut(OLESTR("CHsmRecallItem::GetEventCookie"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  286. return(hr);
  287. }
  288. HRESULT
  289. CHsmRecallItem::GetStateCookie(
  290. OUT DWORD *pStateCookie
  291. )
  292. /*++
  293. Implements:
  294. IHsmRecallItem::GetStateCookie().
  295. --*/
  296. {
  297. HRESULT hr = S_OK;
  298. WsbTraceIn(OLESTR("CHsmRecallItem::GetStateCookie"), OLESTR(""));
  299. try {
  300. // Did they give us a valid pointer?
  301. WsbAssert(0 != pStateCookie, E_POINTER);
  302. *pStateCookie = m_StateCookie;
  303. } WsbCatch(hr);
  304. WsbTraceOut(OLESTR("CHsmRecallItem::GetStateCookie"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  305. return(hr);
  306. }
  307. HRESULT
  308. CHsmRecallItem::GetJobState(
  309. OUT HSM_JOB_STATE *pJobState
  310. )
  311. /*++
  312. Implements:
  313. IHsmRecallItem::GetJobState()
  314. --*/
  315. {
  316. HRESULT hr = S_OK;
  317. WsbTraceIn(OLESTR("CHsmRecallItem::GetJobState"), OLESTR(""));
  318. try {
  319. // Did they give us a valid pointer?
  320. WsbAssert(0 != pJobState, E_POINTER);
  321. *pJobState = m_JobState;
  322. } WsbCatch(hr);
  323. WsbTraceOut(OLESTR("CHsmRecallItem::GetJobState"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  324. return(hr);
  325. }
  326. HRESULT
  327. CHsmRecallItem::GetJobPhase(
  328. OUT HSM_JOB_PHASE *pJobPhase
  329. )
  330. /*++
  331. Implements:
  332. IHsmRecallItem::GetJobPhase
  333. --*/
  334. {
  335. HRESULT hr = S_OK;
  336. WsbTraceIn(OLESTR("CHsmRecallItem::GetJobPhase"), OLESTR(""));
  337. try {
  338. // Did they give us a valid pointer?
  339. WsbAssert(0 != pJobPhase, E_POINTER);
  340. *pJobPhase = m_JobPhase;
  341. } WsbCatch(hr);
  342. WsbTraceOut(OLESTR("CHsmRecallItem::GetJobPhase"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  343. return(hr);
  344. }
  345. HRESULT
  346. CHsmRecallItem::GetSeekOffset(
  347. OUT LONGLONG *pSeekOffset
  348. )
  349. /*++
  350. Implements:
  351. IHsmRecallItem::GetSeekOffset
  352. --*/
  353. {
  354. HRESULT hr = S_OK;
  355. WsbTraceIn(OLESTR("CHsmRecallItem::GetSeekOffset"), OLESTR(""));
  356. try {
  357. // Did they give us a valid pointer?
  358. WsbAssert(0 != pSeekOffset, E_POINTER);
  359. *pSeekOffset = m_SeekOffset;
  360. } WsbCatch(hr);
  361. WsbTraceOut(OLESTR("CHsmRecallItem::GetSeekOffset"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  362. return(hr);
  363. }
  364. HRESULT
  365. CHsmRecallItem::GetBagId(
  366. OUT GUID *pBagId
  367. )
  368. /*++
  369. Implements:
  370. IHsmRecallItem::GetBagId
  371. --*/
  372. {
  373. HRESULT hr = S_OK;
  374. WsbTraceIn(OLESTR("CHsmRecallItem::GetBagId"), OLESTR(""));
  375. try {
  376. // Did they give us a valid pointer?
  377. WsbAssert(0 != pBagId, E_POINTER);
  378. *pBagId = m_BagId;
  379. } WsbCatch(hr);
  380. WsbTraceOut(OLESTR("CHsmRecallItem::GetBagId"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  381. return(hr);
  382. }
  383. HRESULT
  384. CHsmRecallItem::GetDataSetStart(
  385. OUT LONGLONG *pDataSetStart
  386. )
  387. /*++
  388. Implements:
  389. IHsmRecallItem::GetDataSetStart
  390. --*/
  391. {
  392. HRESULT hr = S_OK;
  393. WsbTraceIn(OLESTR("CHsmRecallItem::GetDataSetStart"), OLESTR(""));
  394. try {
  395. // Did they give us a valid pointer?
  396. WsbAssert(0 != pDataSetStart,E_POINTER);
  397. *pDataSetStart = m_DataSetStart;
  398. } WsbCatch(hr);
  399. WsbTraceOut(OLESTR("CHsmRecallItem::GetDataSetStart"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  400. return(hr);
  401. }
  402. HRESULT
  403. CHsmRecallItem::SetFsaPostIt (
  404. IN IFsaPostIt *pFsaPostIt
  405. )
  406. /*++
  407. Implements:
  408. IHsmRecallItem::SetFsaPostIt
  409. --*/
  410. {
  411. HRESULT hr = S_OK;
  412. WsbTraceIn(OLESTR("CHsmRecallItem::SetFsaPostIt"), OLESTR(""));
  413. try {
  414. // Did they give us a valid pointer?
  415. WsbAssert(0 != pFsaPostIt, E_POINTER);
  416. m_pFsaPostIt = pFsaPostIt;
  417. } WsbCatch(hr);
  418. WsbTraceOut(OLESTR("CHsmRecallItem::SetFsaPostIt"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  419. return(hr);
  420. }
  421. HRESULT
  422. CHsmRecallItem::SetFsaResource (
  423. IN IFsaResource *pFsaResource
  424. )
  425. /*++
  426. Implements:
  427. IHsmRecallItem::SetFsaResource
  428. --*/
  429. {
  430. HRESULT hr = S_OK;
  431. WsbTraceIn(OLESTR("CHsmRecallItem::SetFsaResource"), OLESTR(""));
  432. try {
  433. // Did they give us a valid pointer?
  434. WsbAssert(0 != pFsaResource, E_POINTER);
  435. m_pFsaResource = pFsaResource;
  436. } WsbCatch(hr);
  437. WsbTraceOut(OLESTR("CHsmRecallItem::SetFsaResource"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  438. return(hr);
  439. }
  440. HRESULT
  441. CHsmRecallItem::SetMediaInfo (
  442. IN GUID mediaId,
  443. IN FILETIME mediaLastUpdate,
  444. IN HRESULT mediaLastError,
  445. IN BOOL mediaRecallOnly,
  446. IN LONGLONG mediaFreeBytes,
  447. IN short mediaRemoteDataSet
  448. )
  449. /*++
  450. Implements:
  451. IHsmRecallItem::SetMediaInfo
  452. --*/
  453. {
  454. HRESULT hr = S_OK;
  455. WsbTraceIn(OLESTR("CHsmRecallItem::SetMediaInfo"),
  456. OLESTR("Id = <%ls>, LastUpdate = <%ls>, LastError = <%ls>, Recall Only = <%ls>, Free Bytes = <%ls>, RemoteDataSet = <%d>"),
  457. WsbGuidAsString(mediaId), WsbFiletimeAsString(FALSE, mediaLastUpdate),
  458. WsbHrAsString(mediaLastError), WsbBoolAsString(mediaRecallOnly),
  459. WsbLonglongAsString(mediaFreeBytes), mediaRemoteDataSet);
  460. try {
  461. m_MediaId = mediaId;
  462. m_MediaLastUpdate = mediaLastUpdate;
  463. m_MediaLastError = mediaLastError;
  464. m_MediaRecallOnly = mediaRecallOnly;
  465. m_MediaFreeBytes = mediaFreeBytes;
  466. m_MediaRemoteDataSet = mediaRemoteDataSet;
  467. } WsbCatch(hr);
  468. WsbTraceOut(OLESTR("CHsmRecallItem::GetMediaInfo"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  469. return(hr);
  470. }
  471. HRESULT
  472. CHsmRecallItem::SetResult(
  473. IN HRESULT workResult
  474. )
  475. /*++
  476. Implements:
  477. IHsmRecallItem::GetResult().
  478. --*/
  479. {
  480. HRESULT hr = S_OK;
  481. WsbTraceIn(OLESTR("CHsmRecallItem::SetResult"), OLESTR("Result is <%ls>"), WsbHrAsString(workResult));
  482. try {
  483. m_WorkResult = workResult;
  484. } WsbCatch(hr);
  485. WsbTraceOut(OLESTR("CHsmRecallItem::GetResult"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  486. return(hr);
  487. }
  488. HRESULT
  489. CHsmRecallItem::SetWorkType(
  490. IN HSM_WORK_ITEM_TYPE workType
  491. )
  492. /*++
  493. Implements:
  494. IHsmRecallItem::SetWorkType().
  495. --*/
  496. {
  497. HRESULT hr = S_OK;
  498. WsbTraceIn(OLESTR("CHsmRecallItem::SetWorkType"), OLESTR(""));
  499. m_WorkType = workType;
  500. WsbTraceOut(OLESTR("CHsmRecallItem::SetWorkType"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  501. return(hr);
  502. }
  503. HRESULT
  504. CHsmRecallItem::SetEventCookie(
  505. IN DWORD eventCookie
  506. )
  507. /*++
  508. Implements:
  509. IHsmRecallItem::SetEventCookie().
  510. --*/
  511. {
  512. HRESULT hr = S_OK;
  513. WsbTraceIn(OLESTR("CHsmRecallItem::SetEventCookie"), OLESTR(""));
  514. m_EventCookie = eventCookie;
  515. WsbTraceOut(OLESTR("CHsmRecallItem::SetEventCookie"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  516. return(hr);
  517. }
  518. HRESULT
  519. CHsmRecallItem::SetStateCookie(
  520. IN DWORD stateCookie
  521. )
  522. /*++
  523. Implements:
  524. IHsmRecallItem::SetStateCookie().
  525. --*/
  526. {
  527. HRESULT hr = S_OK;
  528. WsbTraceIn(OLESTR("CHsmRecallItem::SetStateCookie"), OLESTR(""));
  529. m_StateCookie = stateCookie;
  530. WsbTraceOut(OLESTR("CHsmRecallItem::SetStateCookie"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  531. return(hr);
  532. }
  533. HRESULT
  534. CHsmRecallItem::SetJobState(
  535. IN HSM_JOB_STATE jobState
  536. )
  537. /*++
  538. Implements:
  539. IHsmRecallItem::SetJobState()
  540. --*/
  541. {
  542. HRESULT hr = S_OK;
  543. WsbTraceIn(OLESTR("CHsmRecallItem::SetJobState"), OLESTR(""));
  544. m_JobState = jobState;
  545. WsbTraceOut(OLESTR("CHsmRecallItem::SetJobState"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  546. return(hr);
  547. }
  548. HRESULT
  549. CHsmRecallItem::SetJobPhase(
  550. IN HSM_JOB_PHASE jobPhase
  551. )
  552. /*++
  553. Implements:
  554. IHsmRecallItem::SetJobPhase
  555. --*/
  556. {
  557. HRESULT hr = S_OK;
  558. WsbTraceIn(OLESTR("CHsmRecallItem::SetJobPhase"), OLESTR(""));
  559. m_JobPhase = jobPhase;
  560. WsbTraceOut(OLESTR("CHsmRecallItem::SetJobPhase"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  561. return(hr);
  562. }
  563. HRESULT
  564. CHsmRecallItem::SetSeekOffset(
  565. IN LONGLONG seekOffset
  566. )
  567. /*++
  568. Implements:
  569. IHsmRecallItem::SetSeekOffset
  570. --*/
  571. {
  572. HRESULT hr = S_OK;
  573. WsbTraceIn(OLESTR("CHsmRecallItem::SetSeekOffset"), OLESTR(""));
  574. m_SeekOffset = seekOffset;
  575. WsbTraceOut(OLESTR("CHsmRecallItem::SetSeekOffset"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  576. return(hr);
  577. }
  578. HRESULT
  579. CHsmRecallItem::SetBagId(
  580. IN GUID * pBagId
  581. )
  582. /*++
  583. Implements:
  584. IHsmRecallItem::SetBagId
  585. --*/
  586. {
  587. HRESULT hr = S_OK;
  588. WsbTraceIn(OLESTR("CHsmRecallItem::SetBagId"), OLESTR(""));
  589. m_BagId = *pBagId;
  590. WsbTraceOut(OLESTR("CHsmRecallItem::SetBagId"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  591. return(hr);
  592. }
  593. HRESULT
  594. CHsmRecallItem::SetDataSetStart(
  595. IN LONGLONG dataSetStart
  596. )
  597. /*++
  598. Implements:
  599. IHsmRecallItem::SetDataSetStart
  600. --*/
  601. {
  602. HRESULT hr = S_OK;
  603. WsbTraceIn(OLESTR("CHsmRecallItem::SetDataSetStart"), OLESTR(""));
  604. m_DataSetStart = dataSetStart;
  605. WsbTraceOut(OLESTR("CHsmRecallItem::SetDataSetStart"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  606. return(hr);
  607. }
  608. HRESULT CHsmRecallItem::GetClassID(
  609. OUT LPCLSID pclsid
  610. )
  611. /*++
  612. Routine Description:
  613. See IPerist::GetClassID()
  614. Arguments:
  615. See IPerist::GetClassID()
  616. Return Value:
  617. See IPerist::GetClassID()
  618. --*/
  619. {
  620. HRESULT hr = S_OK;
  621. WsbTraceIn(OLESTR("CHsmRecallItem::GetClassID"), OLESTR(""));
  622. try {
  623. WsbAssert(0 != pclsid, E_POINTER);
  624. *pclsid = CLSID_CHsmRecallItem;
  625. } WsbCatch(hr);
  626. WsbTraceOut(OLESTR("CHsmRecallItem::GetClassID"), OLESTR("hr = <%ls>, CLSID = <%ls>"), WsbHrAsString(hr), WsbGuidAsString(*pclsid));
  627. return(hr);
  628. }
  629. HRESULT CHsmRecallItem::GetSizeMax
  630. (
  631. OUT ULARGE_INTEGER* pcbSize
  632. )
  633. /*++
  634. Routine Description:
  635. See IPersistStream::GetSizeMax().
  636. Arguments:
  637. See IPersistStream::GetSizeMax().
  638. Return Value:
  639. See IPersistStream::GetSizeMax().
  640. --*/
  641. {
  642. HRESULT hr = S_OK;
  643. WsbTraceIn(OLESTR("CHsmRecallItem::GetSizeMax"), OLESTR(""));
  644. try {
  645. WsbAssert(0 != pcbSize, E_POINTER);
  646. pcbSize->QuadPart = 0;
  647. hr = E_NOTIMPL;
  648. } WsbCatch(hr);
  649. WsbTraceOut(OLESTR("CHsmRecallItem::GetSizeMax"),
  650. OLESTR("hr = <%ls>, Size = <%ls>"), WsbHrAsString(hr),
  651. WsbPtrToUliAsString(pcbSize));
  652. return(hr);
  653. }
  654. HRESULT CHsmRecallItem::Load
  655. (
  656. IN IStream* /*pStream*/
  657. )
  658. /*++
  659. Routine Description:
  660. See IPersistStream::Load().
  661. Arguments:
  662. See IPersistStream::Load().
  663. Return Value:
  664. See IPersistStream::Load().
  665. --*/
  666. {
  667. HRESULT hr = S_OK;
  668. WsbTraceIn(OLESTR("CHsmRecallItem::Load"), OLESTR(""));
  669. try {
  670. hr = E_NOTIMPL;
  671. } WsbCatch(hr);
  672. WsbTraceOut(OLESTR("CHsmRecallItem::Load"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  673. return(hr);
  674. }
  675. HRESULT CHsmRecallItem::Save
  676. (
  677. IN IStream* pStream,
  678. IN BOOL clearDirty
  679. )
  680. /*++
  681. Routine Description:
  682. See IPersistStream::Save().
  683. Arguments:
  684. See IPersistStream::Save().
  685. Return Value:
  686. See IPersistStream::Save().
  687. --*/
  688. {
  689. HRESULT hr = S_OK;
  690. WsbTraceIn(OLESTR("CHsmRecallItem::Save"), OLESTR("clearDirty = <%ls>"), WsbBoolAsString(clearDirty));
  691. try {
  692. WsbAssert(0 != pStream, E_POINTER);
  693. hr = E_NOTIMPL;
  694. // If we got it saved and we were asked to clear the dirty bit, then
  695. // do so now.
  696. if (clearDirty) {
  697. m_isDirty = FALSE;
  698. }
  699. } WsbCatch(hr);
  700. WsbTraceOut(OLESTR("CHsmRecallItem::Save"), OLESTR("hr = <%ls>"), WsbHrAsString(hr));
  701. return(hr);
  702. }
  703. HRESULT
  704. CHsmRecallItem::Test
  705. (
  706. OUT USHORT *pTestsPassed,
  707. OUT USHORT *pTestsFailed
  708. )
  709. /*++
  710. Routine Description:
  711. See IWsbTestable::Test().
  712. Arguments:
  713. See IWsbTestable::Test().
  714. Return Value:
  715. See IWsbTestable::Test().
  716. --*/
  717. {
  718. HRESULT hr = S_OK;
  719. WsbTraceIn(OLESTR("CHsmRecallItem::Test"), OLESTR(""));
  720. *pTestsPassed = *pTestsFailed = 0;
  721. try {
  722. hr = E_NOTIMPL;
  723. } WsbCatch(hr);
  724. WsbTraceOut(OLESTR("CHsmRecallItem::Test"), OLESTR("hr = <%ls>"),WsbHrAsString(hr));
  725. return( hr );
  726. }