2011-01-22 01:18:58 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2011, Haiku, Inc.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#ifndef _HAIKU__PACKAGE__ADD_REPOSITORY_REQUEST_H_
|
|
|
|
#define _HAIKU__PACKAGE__ADD_REPOSITORY_REQUEST_H_
|
|
|
|
|
|
|
|
|
|
|
|
#include <String.h>
|
|
|
|
|
|
|
|
#include <package/Context.h>
|
|
|
|
#include <package/Request.h>
|
|
|
|
|
|
|
|
|
|
|
|
namespace Haiku {
|
|
|
|
|
|
|
|
namespace Package {
|
|
|
|
|
|
|
|
|
2011-01-24 23:48:03 +03:00
|
|
|
namespace Private {
|
|
|
|
class ActivateRepositoryConfigJob;
|
|
|
|
}
|
|
|
|
using Private::ActivateRepositoryConfigJob;
|
|
|
|
|
|
|
|
|
2011-01-22 01:18:58 +03:00
|
|
|
class AddRepositoryRequest : public Request {
|
|
|
|
typedef Request inherited;
|
|
|
|
|
|
|
|
public:
|
|
|
|
AddRepositoryRequest(const Context& 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:
|
|
|
|
// JobStateListener
|
|
|
|
virtual void JobSucceeded(Job* 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
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
} // namespace Package
|
|
|
|
|
|
|
|
} // namespace Haiku
|
|
|
|
|
|
|
|
|
|
|
|
#endif // _HAIKU__PACKAGE__ADD_REPOSITORY_REQUEST_H_
|