1 /* 2 * Copyright 2011, Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 * Authors: 6 * Oliver Tappe <zooey@hirschkaefer.de> 7 */ 8 9 10 #include <package/ActivateRepositoryCacheJob.h> 11 12 #include <File.h> 13 14 #include <package/Context.h> 15 16 17 namespace BPackageKit { 18 19 namespace BPrivate { 20 21 22 ActivateRepositoryCacheJob::ActivateRepositoryCacheJob(const BContext& context, 23 const BString& title, const BEntry& fetchedRepoCacheEntry, 24 const BString& repositoryName, const BDirectory& targetDirectory) 25 : 26 inherited(context, title), 27 fFetchedRepoCacheEntry(fetchedRepoCacheEntry), 28 fRepositoryName(repositoryName), 29 fTargetDirectory(targetDirectory) 30 { 31 } 32 33 34 ActivateRepositoryCacheJob::~ActivateRepositoryCacheJob() 35 { 36 } 37 38 39 status_t 40 ActivateRepositoryCacheJob::Execute() 41 { 42 status_t result = fFetchedRepoCacheEntry.MoveTo(&fTargetDirectory, 43 fRepositoryName.String(), true); 44 if (result != B_OK) 45 return result; 46 47 // TODO: propagate some repository attributes to file attributes 48 49 return B_OK; 50 } 51 52 53 } // namespace BPrivate 54 55 } // namespace BPackageKit 56