2 * Copyright 2011-2015, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Oliver Tappe <zooey@hirschkaefer.de>
10 #include <package/DropRepositoryRequest.h>
12 #include <Directory.h>
16 #include <package/RemoveRepositoryJob.h>
19 namespace BPackageKit
{
22 using namespace BPrivate
;
25 DropRepositoryRequest::DropRepositoryRequest(const BContext
& context
,
26 const BString
& repositoryName
)
29 fRepositoryName(repositoryName
)
34 DropRepositoryRequest::~DropRepositoryRequest()
40 DropRepositoryRequest::CreateInitialJobs()
42 status_t result
= InitCheck();
46 RemoveRepositoryJob
* removeRepoJob
47 = new (std::nothrow
) RemoveRepositoryJob(fContext
,
48 BString("Removing repository ") << fRepositoryName
,
50 if (removeRepoJob
== NULL
)
52 if ((result
= QueueJob(removeRepoJob
)) != B_OK
) {
61 } // namespace BPackageKit