#ifndef SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_H_
#define SYNC_API_ATTACHMENTS_ATTACHMENT_SERVICE_PROXY_H_
#include "base/basictypes.h"
#include "base/callback.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/sequenced_task_runner.h"
#include "base/task_runner.h"
#include "sync/api/attachments/attachment.h"
#include "sync/api/attachments/attachment_service.h"
#include "sync/base/sync_export.h"
namespace syncer {
class SyncData;
class SYNC_EXPORT AttachmentServiceProxy : public AttachmentService {
public:
AttachmentServiceProxy();
AttachmentServiceProxy(
const scoped_refptr<base::SequencedTaskRunner>& wrapped_task_runner,
base::WeakPtr<syncer::AttachmentService> wrapped);
virtual ~AttachmentServiceProxy();
virtual void GetOrDownloadAttachments(const AttachmentIdList& attachment_ids,
const GetOrDownloadCallback& callback)
OVERRIDE;
virtual void DropAttachments(const AttachmentIdList& attachment_ids,
const DropCallback& callback) OVERRIDE;
virtual void OnSyncDataAdd(const SyncData& sync_data) OVERRIDE;
virtual void OnSyncDataDelete(const SyncData& sync_data) OVERRIDE;
virtual void OnSyncDataUpdate(const AttachmentIdList& old_attachment_ids,
const SyncData& updated_sync_data) OVERRIDE;
private:
scoped_refptr<base::SequencedTaskRunner> wrapped_task_runner_;
base::WeakPtr<AttachmentService> wrapped_;
};
}
#endif