blob: 8f362a95f65ecba920cabc9b57468d062b53da2a [file] [log] [blame]
San Mehatdc266072009-05-06 11:16:52 -07001/*
2 * Copyright (C) 2008 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#ifndef _NETWORKMANAGER_H
17#define _NETWORKMANAGER_H
18
19#include "Controller.h"
20
21#include <sysutils/FrameworkManager.h>
22
23class NetworkManager {
24private:
25 FrameworkListener *mListener;
26 FrameworkManager *mFm;
27 ControllerCollection *mControllers;
28
29public:
30 NetworkManager();
31 virtual ~NetworkManager() {}
32
33 int run();
34
35private:
36 void addController(Controller *c);
37 int startControllers();
38 int stopControllers();
39
40public:
41 Controller *findController(const char *name);
42 ControllerCollection *getControllers() { return mControllers; }
43 FrameworkManager *getFrameworkManager() { return mFm; }
44
45public:
46// XXX: Extract these into an interface
47 int onInterfaceCreated(Controller *c, char *name);
48 int onInterfaceDestroyed(Controller *c, char *name);
49
50};
51#endif