/* boolean initListBuild(in nsIMutableArray removedItems); */ NS_IMETHODIMP JumpListBuilder::InitListBuild(nsIMutableArray *removedItems, bool *_retval) { NS_ENSURE_ARG_POINTER(removedItems); *_retval = false; if (!mJumpListMgr) return NS_ERROR_NOT_AVAILABLE; if(sBuildingList) AbortListBuild(); IObjectArray *objArray; // The returned objArray of removed items are for manually removed items. // This does not return items which are removed because they were previously // part of the jump list but are no longer part of the jump list. if (SUCCEEDED(mJumpListMgr->BeginList(&mMaxItems, IID_PPV_ARGS(&objArray)))) { if (objArray) { TransferIObjectArrayToIMutableArray(objArray, removedItems); objArray->Release(); } RemoveIconCacheForItems(removedItems); sBuildingList = true; *_retval = true; return NS_OK; } return NS_OK; }
/* boolean initListBuild(in nsIMutableArray removedItems); */ NS_IMETHODIMP JumpListBuilder::InitListBuild(nsIMutableArray *removedItems, bool *_retval) { NS_ENSURE_ARG_POINTER(removedItems); *_retval = false; if (!mJumpListMgr) return NS_ERROR_NOT_AVAILABLE; if(sBuildingList) AbortListBuild(); IObjectArray *objArray; if (SUCCEEDED(mJumpListMgr->BeginList(&mMaxItems, IID_PPV_ARGS(&objArray)))) { if (objArray) { TransferIObjectArrayToIMutableArray(objArray, removedItems); objArray->Release(); } RemoveIconCacheForItems(removedItems); sBuildingList = true; *_retval = true; return NS_OK; } return NS_OK; }
/* boolean deleteActiveList(); */ NS_IMETHODIMP JumpListBuilder::DeleteActiveList(bool *_retval) { *_retval = false; if (!mJumpListMgr) return NS_ERROR_NOT_AVAILABLE; if(sBuildingList) AbortListBuild(); nsAutoString uid; if (!WinTaskbar::GetAppUserModelID(uid)) return NS_OK; if (SUCCEEDED(mJumpListMgr->DeleteList(uid.get()))) *_retval = true; return NS_OK; }