1/* 2 * Copyright 2004-2011 Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 * 5 */ 6 7#ifndef NETWORKSETUPPROFILE_H 8#define NETWORKSETUPPROFILE_H 9 10#include <StorageKit.h> 11 12class NetworkSetupProfile { 13public: 14 NetworkSetupProfile(); 15 NetworkSetupProfile(const char* path); 16 NetworkSetupProfile(const entry_ref* ref); 17 NetworkSetupProfile(BEntry *entry); 18 19virtual ~NetworkSetupProfile(); 20 21 status_t SetTo(const char* path); 22 status_t SetTo(const entry_ref *ref); 23 status_t SetTo(BEntry *entry); 24 25 bool Exists(); 26 27 const char* Name(); 28 status_t SetName(const char *name); 29 30 31 bool IsDefault(); 32 bool IsCurrent(); 33 34 status_t MakeCurrent(); 35 status_t Delete(); 36 37static NetworkSetupProfile* Default(); 38static NetworkSetupProfile* Current(); 39 40private: 41 BEntry* fRoot; 42 BPath* fPath; 43 bool fIsDefault; 44 bool fIsCurrent; 45 const char* fName; 46 47static BDirectory* fProfilesRoot; 48}; 49#endif // ifdef NETWORKSETUPPROFILE_H 50