Package Kit: Move a number of headers into the source directory.

These classe aren't used, and probably shouldn't be used, outside
Package Kit itself.

Also drop some files from libpackage_build that are not needed.
This commit is contained in:
Augustin Cavalier
2026-03-03 17:45:28 -05:00
parent 5f0f0b02b4
commit 61c7d7e4ee
27 changed files with 20 additions and 29 deletions
@@ -1 +0,0 @@
#include <../private/package/ActivateRepositoryCacheJob.h>
@@ -1 +0,0 @@
#include <../private/package/ActivateRepositoryConfigJob.h>
@@ -1 +0,0 @@
#include <../../../private/package/FetchFileJob.h>
@@ -1 +0,0 @@
#include <../private/package/HashableString.h>
@@ -1 +0,0 @@
#include <../private/package/RemoveRepositoryJob.h>
@@ -1 +0,0 @@
#include <../private/package/TempfileManager.h>
@@ -1 +0,0 @@
#include <../private/package/ValidateChecksumJob.h>
@@ -1,48 +0,0 @@
/*
* Copyright 2011, Oliver Tappe <[email protected]>
* Distributed under the terms of the MIT License.
*/
#ifndef _PACKAGE__PRIVATE__ACTIVATE_REPOSITORY_CACHE_JOB_H_
#define _PACKAGE__PRIVATE__ACTIVATE_REPOSITORY_CACHE_JOB_H_
#include <Directory.h>
#include <Entry.h>
#include <String.h>
#include <package/Job.h>
namespace BPackageKit {
namespace BPrivate {
class ActivateRepositoryCacheJob : public BJob {
typedef BJob inherited;
public:
ActivateRepositoryCacheJob(
const BContext& context,
const BString& title,
const BEntry& fetchedRepoCacheEntry,
const BString& repositoryName,
const BDirectory& targetDirectory);
virtual ~ActivateRepositoryCacheJob();
protected:
virtual status_t Execute();
private:
BEntry fFetchedRepoCacheEntry;
BString fRepositoryName;
BDirectory fTargetDirectory;
};
} // namespace BPrivate
} // namespace BPackageKit
#endif // _PACKAGE__PRIVATE__ACTIVATE_REPOSITORY_CACHE_JOB_H_
@@ -1,54 +0,0 @@
/*
* Copyright 2011, Oliver Tappe <[email protected]>
* Distributed under the terms of the MIT License.
*/
#ifndef _PACKAGE__PRIVATE__ACTIVATE_REPOSITORY_CONFIG_JOB_H_
#define _PACKAGE__PRIVATE__ACTIVATE_REPOSITORY_CONFIG_JOB_H_
#include <Directory.h>
#include <Entry.h>
#include <String.h>
#include <package/Job.h>
namespace BPackageKit {
namespace BPrivate {
class ActivateRepositoryConfigJob : public BJob {
typedef BJob inherited;
public:
ActivateRepositoryConfigJob(
const BContext& context,
const BString& title,
const BEntry& archivedRepoInfoEntry,
const BString& repositoryBaseURL,
const BDirectory& targetDirectory);
virtual ~ActivateRepositoryConfigJob();
const BString& RepositoryName() const;
protected:
virtual status_t Execute();
virtual void Cleanup(status_t jobResult);
private:
BEntry fArchivedRepoInfoEntry;
BString fRepositoryBaseURL;
BDirectory fTargetDirectory;
BEntry fTargetEntry;
BString fRepositoryName;
};
} // namespace BPrivate
} // namespace BPackageKit
#endif // _PACKAGE__PRIVATE__ACTIVATE_REPOSITORY_CONFIG_JOB_H_
-70
View File
@@ -1,70 +0,0 @@
/*
* Copyright 2011, Oliver Tappe <[email protected]>
* Distributed under the terms of the MIT License.
*/
#ifndef _PACKAGE__PRIVATE__HASHABLE_STRING_H_
#define _PACKAGE__PRIVATE__HASHABLE_STRING_H_
#include <String.h>
#include <HashString.h>
namespace BPackageKit {
namespace BPrivate {
class HashableString : public BString {
public:
inline HashableString();
inline HashableString(const BString& string);
inline uint32 GetHashCode() const;
inline bool operator!= (const HashableString& other) const;
private:
uint32 fHashCode;
};
inline
HashableString::HashableString()
:
fHashCode(0)
{
}
inline
HashableString::HashableString(const BString& string)
:
BString(string),
fHashCode(string_hash(String()))
{
}
inline uint32
HashableString::GetHashCode() const
{
return fHashCode;
}
inline bool
HashableString::operator!= (const HashableString& other) const
{
return Compare(other) != 0 || fHashCode != other.fHashCode;
}
} // namespace BPrivate
} // namespace BPackageKit
#endif // _PACKAGE__PRIVATE__HASHABLE_STRING_H_
@@ -1,42 +0,0 @@
/*
* Copyright 2011, Oliver Tappe <[email protected]>
* Distributed under the terms of the MIT License.
*/
#ifndef _PACKAGE__PRIVATE__REMOVE_REPOSITORY_JOB_H_
#define _PACKAGE__PRIVATE__REMOVE_REPOSITORY_JOB_H_
#include <String.h>
#include <package/Job.h>
namespace BPackageKit {
namespace BPrivate {
class RemoveRepositoryJob : public BJob {
typedef BJob inherited;
public:
RemoveRepositoryJob(
const BContext& context,
const BString& title,
const BString& repositoryName);
virtual ~RemoveRepositoryJob();
protected:
virtual status_t Execute();
private:
BString fRepositoryName;
};
} // namespace BPrivate
} // namespace BPackageKit
#endif // _PACKAGE__PRIVATE__REMOVE_REPOSITORY_JOB_H_
-43
View File
@@ -1,43 +0,0 @@
/*
* Copyright 2011, Oliver Tappe <[email protected]>
* Distributed under the terms of the MIT License.
*/
#ifndef _PACKAGE__PRIVATE__TEMPFILE_MANAGER_H_
#define _PACKAGE__PRIVATE__TEMPFILE_MANAGER_H_
#include <Directory.h>
#include <Entry.h>
#include <String.h>
#include <SupportDefs.h>
namespace BPackageKit {
namespace BPrivate {
class TempfileManager {
public:
TempfileManager();
~TempfileManager();
void SetBaseDirectory(const BDirectory& baseDir);
BEntry Create(const BString& baseName = kDefaultName);
private:
static const BString kDefaultName;
private:
BDirectory fBaseDirectory;
int32 fNextNumber;
};
} // namespace BPrivate
} // namespace BPackageKit
#endif // _PACKAGE__PRIVATE__TEMPFILE_MANAGER_H_
@@ -1,53 +0,0 @@
/*
* Copyright 2011, Oliver Tappe <[email protected]>
* Distributed under the terms of the MIT License.
*/
#ifndef _PACKAGE__PRIVATE__VALIDATE_CHECKSUM_JOB_H_
#define _PACKAGE__PRIVATE__VALIDATE_CHECKSUM_JOB_H_
#include <Directory.h>
#include <Entry.h>
#include <String.h>
#include <package/ChecksumAccessors.h>
#include <package/Job.h>
namespace BPackageKit {
namespace BPrivate {
class ValidateChecksumJob : public BJob {
typedef BJob inherited;
public:
ValidateChecksumJob(
const BContext& context,
const BString& title,
ChecksumAccessor* expectedChecksumAccessor,
ChecksumAccessor* realChecksumAccessor,
bool failIfChecksumsDontMatch = true);
virtual ~ValidateChecksumJob();
bool ChecksumsMatch() const;
protected:
virtual status_t Execute();
private:
ChecksumAccessor* fExpectedChecksumAccessor;
ChecksumAccessor* fRealChecksumAccessor;
bool fFailIfChecksumsDontMatch;
bool fChecksumsMatch;
};
} // namespace BPrivate
} // namespace BPackageKit
#endif // _PACKAGE__PRIVATE__VALIDATE_CHECKSUM_JOB_H_