blob: 80c032d67d1bbc96b4cb7e7d26a3e60deee091c2 [file] [log] [blame]
[email protected]b5d1f3f322012-01-20 09:51:421// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]85164712010-06-23 01:13:562// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4//
5// Various utilities for dealing with invalidation data types.
6
[email protected]b7fe4b52012-04-19 14:21:097#ifndef SYNC_NOTIFIER_INVALIDATION_UTIL_H_
8#define SYNC_NOTIFIER_INVALIDATION_UTIL_H_
[email protected]32b76ef2010-07-26 23:08:249#pragma once
[email protected]85164712010-06-23 01:13:5610
11#include <string>
12
[email protected]b0e1c132012-03-14 06:10:1313#include "google/cacheinvalidation/deps/callback.h"
[email protected]c1c32c82012-03-15 09:35:4214#include "sync/syncable/model_type.h"
[email protected]d49f46332011-07-15 21:31:0715
16namespace invalidation {
17
18class Invalidation;
19class ObjectId;
20
21} // namespace invalidation
[email protected]85164712010-06-23 01:13:5622
23namespace sync_notifier {
24
25void RunAndDeleteClosure(invalidation::Closure* task);
26
[email protected]6a1d0f52010-06-30 05:11:5327bool RealModelTypeToObjectId(syncable::ModelType model_type,
28 invalidation::ObjectId* object_id);
29
30bool ObjectIdToRealModelType(const invalidation::ObjectId& object_id,
31 syncable::ModelType* model_type);
32
[email protected]85164712010-06-23 01:13:5633std::string ObjectIdToString(const invalidation::ObjectId& object_id);
34
[email protected]85164712010-06-23 01:13:5635std::string InvalidationToString(
36 const invalidation::Invalidation& invalidation);
37
[email protected]85164712010-06-23 01:13:5638} // namespace sync_notifier
39
[email protected]b7fe4b52012-04-19 14:21:0940#endif // SYNC_NOTIFIER_INVALIDATION_UTIL_H_