2011-01-22 01:18:58 +03:00
|
|
|
/*
|
2015-05-18 19:21:58 +03:00
|
|
|
* Copyright 2011-2015, Haiku, Inc.
|
2011-01-22 01:18:58 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2011-01-25 20:07:27 +03:00
|
|
|
#ifndef _PACKAGE__ADD_REPOSITORY_REQUEST_H_
|
|
|
|
#define _PACKAGE__ADD_REPOSITORY_REQUEST_H_
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
|
|
|
|
#include <String.h>
|
|
|
|
|
|
|
|
#include <package/Context.h>
|
|
|
|
#include <package/Request.h>
|
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
namespace BPackageKit {
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
namespace BPrivate {
|
2011-01-24 23:48:03 +03:00
|
|
|
class ActivateRepositoryConfigJob;
|
|
|
|
}
|
2011-01-25 20:07:27 +03:00
|
|
|
using BPrivate::ActivateRepositoryConfigJob;
|
2011-01-24 23:48:03 +03:00
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
class AddRepositoryRequest : public BRequest {
|
|
|
|
typedef BRequest inherited;
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
public:
|
2011-01-25 20:07:27 +03:00
|
|
|
AddRepositoryRequest(const BContext& context,
|
2011-01-24 23:48:03 +03:00
|
|
|
const BString& repositoryBaseURL,
|
2011-01-22 01:18:58 +03:00
|
|
|
bool asUserRepository);
|
|
|
|
virtual ~AddRepositoryRequest();
|
|
|
|
|
2011-01-24 23:48:03 +03:00
|
|
|
virtual status_t CreateInitialJobs();
|
|
|
|
|
|
|
|
const BString& RepositoryName() const;
|
|
|
|
|
|
|
|
protected:
|
2011-01-25 20:07:27 +03:00
|
|
|
// BJobStateListener
|
2015-05-18 19:21:58 +03:00
|
|
|
virtual void JobSucceeded(BSupportKit::BJob* job);
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
private:
|
2011-01-24 23:48:03 +03:00
|
|
|
BString fRepositoryBaseURL;
|
2011-01-22 01:18:58 +03:00
|
|
|
bool fAsUserRepository;
|
2011-01-24 23:48:03 +03:00
|
|
|
|
|
|
|
ActivateRepositoryConfigJob* fActivateJob;
|
|
|
|
|
|
|
|
BString fRepositoryName;
|
2011-01-22 01:18:58 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
} // namespace BPackageKit
|
2011-01-22 01:18:58 +03:00
|
|
|
|
|
|
|
|
2011-01-25 20:07:27 +03:00
|
|
|
#endif // _PACKAGE__ADD_REPOSITORY_REQUEST_H_
|