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