blob: 2a4730f8592e5928fab3db535583d1f76c2b566f [file] [log] [blame]
mukesh agrawal04147472015-08-18 13:25:28 -07001// Copyright 2015 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef SHILL_STORE_FACTORY_H_
6#define SHILL_STORE_FACTORY_H_
7
8#include <base/lazy_instance.h>
9
10namespace shill {
11
12class GLib;
13class StoreInterface;
14
15class StoreFactory {
16 public:
17 // This is a singleton. Use StoreFactory::GetInstance()->Foo().
18 static StoreFactory* GetInstance();
19
20 void set_glib(GLib* glib) { glib_ = glib; }
21 StoreInterface* CreateStore();
22
23 protected:
24 StoreFactory();
25
26 private:
27 friend struct base::DefaultLazyInstanceTraits<StoreFactory>;
28 GLib *glib_;
29
30 DISALLOW_COPY_AND_ASSIGN(StoreFactory);
31};
32
33} // namespace shill
34
35#endif // SHILL_STORE_FACTORY_H_