[haiku-commits] haiku: hrev53349 - in src/add-ons/network_settings: openvpn vpn

  • From: Alex von Gluck IV <kallisti5@xxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 6 Aug 2019 19:08:37 -0400 (EDT)

hrev53349 adds 1 changeset to branch 'master'
old head: 87bdc2b02b110288c7107316da2619ce62b68772
new head: 68378c326ef507c6de668046bd16c093203f7e51
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=68378c326ef5+%5E87bdc2b02b11

----------------------------------------------------------------------------

68378c326ef5: network_settings/vpn: Make add-on more generic.

                          [ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53349
Commit:      68378c326ef507c6de668046bd16c093203f7e51
URL:         https://git.haiku-os.org/haiku/commit/?id=68378c326ef5
Author:      Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date:        Tue Aug  6 23:07:10 2019 UTC

----------------------------------------------------------------------------

4 files changed, 34 insertions(+), 34 deletions(-)
src/add-ons/network_settings/Jamfile             |  2 +-
.../network_settings/{openvpn => vpn}/Jamfile    | 12 ++---
.../OpenVPN.rdef => vpn/VPNInterface.rdef}       |  4 +-
.../VPNInterfaceAddOn.cpp}                       | 50 ++++++++++----------

----------------------------------------------------------------------------

diff --git a/src/add-ons/network_settings/Jamfile 
b/src/add-ons/network_settings/Jamfile
index 2d1fead695..dcc5e408e7 100644
--- a/src/add-ons/network_settings/Jamfile
+++ b/src/add-ons/network_settings/Jamfile
@@ -13,7 +13,7 @@ SubInclude HAIKU_TOP src add-ons network_settings sshd ;
 SubInclude HAIKU_TOP src add-ons network_settings telnetd ;
 
 # VPN add-ons
-SubInclude HAIKU_TOP src add-ons network_settings openvpn ;
+SubInclude HAIKU_TOP src add-ons network_settings vpn ;
 
 # Other add-ons
 SubInclude HAIKU_TOP src add-ons network_settings hostname ;
diff --git a/src/add-ons/network_settings/openvpn/Jamfile 
b/src/add-ons/network_settings/vpn/Jamfile
similarity index 54%
rename from src/add-ons/network_settings/openvpn/Jamfile
rename to src/add-ons/network_settings/vpn/Jamfile
index 6bc04c3d4f..1f7b2dcbd0 100644
--- a/src/add-ons/network_settings/openvpn/Jamfile
+++ b/src/add-ons/network_settings/vpn/Jamfile
@@ -1,18 +1,18 @@
-SubDir HAIKU_TOP src add-ons network_settings openvpn ;
+SubDir HAIKU_TOP src add-ons network_settings vpn ;
 
 UsePublicHeaders [ FDirName add-ons network_settings ] ;
 UsePrivateHeaders app libroot kernel net shared ;
 UseHeaders [ FDirName $(HAIKU_TOP) src preferences network ] : false ;
 
-AddResources OpenVPN : OpenVPN.rdef ;
+AddResources VPNInterface : VPNInterface.rdef ;
 
-Addon OpenVPNInterface :
-       OpenVPNInterfaceAddOn.cpp
+Addon VPNInterface :
+       VPNInterfaceAddOn.cpp
 
        : be bnetapi shared <nogrist>Network [ TargetLibsupc++ ]
                [ TargetLibstdc++ ] localestub
 ;
 
-DoCatalogs OpenVPNInterface : x-vnd.Haiku-OpenVPNInterface :
-       OpenVPNInterfaceAddOn.cpp
+DoCatalogs VPNInterface : x-vnd.Haiku-VPNInterface :
+       VPNInterfaceAddOn.cpp
 ;
diff --git a/src/add-ons/network_settings/openvpn/OpenVPN.rdef 
b/src/add-ons/network_settings/vpn/VPNInterface.rdef
similarity index 50%
rename from src/add-ons/network_settings/openvpn/OpenVPN.rdef
rename to src/add-ons/network_settings/vpn/VPNInterface.rdef
index f9943934a4..af7a00977d 100644
--- a/src/add-ons/network_settings/openvpn/OpenVPN.rdef
+++ b/src/add-ons/network_settings/vpn/VPNInterface.rdef
@@ -1,4 +1,4 @@
-resource app_signature "application/x-vnd.Haiku-OpenVPNInterface";
+resource app_signature "application/x-vnd.Haiku-VPNInterface";
 
 resource app_version {
        major  = 1,
@@ -7,6 +7,6 @@ resource app_version {
        variety = 0,
        internal = 0,
        short_info = "1.0.0",
-       long_info = "Haiku OpenVPN connection settings"
+       long_info = "Haiku VPNInterface connection settings"
 };
 
diff --git a/src/add-ons/network_settings/openvpn/OpenVPNInterfaceAddOn.cpp 
b/src/add-ons/network_settings/vpn/VPNInterfaceAddOn.cpp
similarity index 61%
rename from src/add-ons/network_settings/openvpn/OpenVPNInterfaceAddOn.cpp
rename to src/add-ons/network_settings/vpn/VPNInterfaceAddOn.cpp
index 2822696880..392e1675d9 100644
--- a/src/add-ons/network_settings/openvpn/OpenVPNInterfaceAddOn.cpp
+++ b/src/add-ons/network_settings/vpn/VPNInterfaceAddOn.cpp
@@ -32,34 +32,34 @@ using namespace BNetworkKit;
 
 
 #undef B_TRANSLATION_CONTEXT
-#define B_TRANSLATION_CONTEXT "OpenVPNInterfaceAddOn"
+#define B_TRANSLATION_CONTEXT "VPNInterfaceAddOn"
 
 
 static const uint32 kMsgToggleService = 'tgls';
 
 
-class OpenVPNInterfaceAddOn : public BNetworkSettingsAddOn {
+class VPNInterfaceAddOn : public BNetworkSettingsAddOn {
 public:
-                                                               
OpenVPNInterfaceAddOn(image_id image,
+                                                               
VPNInterfaceAddOn(image_id image,
                                                                        
BNetworkSettings& settings);
-       virtual                                         
~OpenVPNInterfaceAddOn();
+       virtual                                         ~VPNInterfaceAddOn();
 
        virtual BNetworkSettingsItem*
                                                                
CreateNextItem(uint32& cookie);
 };
 
 
-class OpenVPNInterfaceView : public InterfaceView {
+class VPNInterfaceView : public InterfaceView {
 public:
-                                                               
OpenVPNInterfaceView(BNetworkSettings& settings);
-       virtual                                         ~OpenVPNInterfaceView();
+                                                               
VPNInterfaceView(BNetworkSettings& settings);
+       virtual                                         ~VPNInterfaceView();
 };
 
 
-class OpenVPNInterfaceItem : public BNetworkSettingsItem {
+class VPNInterfaceItem : public BNetworkSettingsItem {
 public:
-                                                               
OpenVPNInterfaceItem(BNetworkSettings& settings);
-       virtual                                         ~OpenVPNInterfaceItem();
+                                                               
VPNInterfaceItem(BNetworkSettings& settings);
+       virtual                                         ~VPNInterfaceItem();
 
        virtual BNetworkSettingsType
                                                                Type() const;
@@ -80,14 +80,14 @@ private:
 // #pragma mark -
 
 
-OpenVPNInterfaceView::OpenVPNInterfaceView(BNetworkSettings& settings)
+VPNInterfaceView::VPNInterfaceView(BNetworkSettings& settings)
        :
        InterfaceView()
 {
 }
 
 
-OpenVPNInterfaceView::~OpenVPNInterfaceView()
+VPNInterfaceView::~VPNInterfaceView()
 {
 }
 
@@ -95,7 +95,7 @@ OpenVPNInterfaceView::~OpenVPNInterfaceView()
 // #pragma mark -
 
 
-OpenVPNInterfaceItem::OpenVPNInterfaceItem(BNetworkSettings& settings)
+VPNInterfaceItem::VPNInterfaceItem(BNetworkSettings& settings)
        :
        fSettings(settings),
        fItem(new InterfaceListItem("My Awesome VPN",
@@ -105,7 +105,7 @@ 
OpenVPNInterfaceItem::OpenVPNInterfaceItem(BNetworkSettings& settings)
 }
 
 
-OpenVPNInterfaceItem::~OpenVPNInterfaceItem()
+VPNInterfaceItem::~VPNInterfaceItem()
 {
        if (fView->Parent() == NULL)
                delete fView;
@@ -115,37 +115,37 @@ OpenVPNInterfaceItem::~OpenVPNInterfaceItem()
 
 
 BNetworkSettingsType
-OpenVPNInterfaceItem::Type() const
+VPNInterfaceItem::Type() const
 {
        return B_NETWORK_SETTINGS_TYPE_VPN;
 }
 
 
 BListItem*
-OpenVPNInterfaceItem::ListItem()
+VPNInterfaceItem::ListItem()
 {
        return fItem;
 }
 
 
 BView*
-OpenVPNInterfaceItem::View()
+VPNInterfaceItem::View()
 {
        if (fView == NULL)
-               fView = new OpenVPNInterfaceView(fSettings);
+               fView = new VPNInterfaceView(fSettings);
 
        return fView;
 }
 
 
 status_t
-OpenVPNInterfaceItem::Revert()
+VPNInterfaceItem::Revert()
 {
        return B_OK;
 }
 
 bool
-OpenVPNInterfaceItem::IsRevertable()
+VPNInterfaceItem::IsRevertable()
 {
        // TODO
        return false;
@@ -155,7 +155,7 @@ OpenVPNInterfaceItem::IsRevertable()
 // #pragma mark -
 
 
-OpenVPNInterfaceAddOn::OpenVPNInterfaceAddOn(image_id image,
+VPNInterfaceAddOn::VPNInterfaceAddOn(image_id image,
        BNetworkSettings& settings)
        :
        BNetworkSettingsAddOn(image, settings)
@@ -163,16 +163,16 @@ OpenVPNInterfaceAddOn::OpenVPNInterfaceAddOn(image_id 
image,
 }
 
 
-OpenVPNInterfaceAddOn::~OpenVPNInterfaceAddOn()
+VPNInterfaceAddOn::~VPNInterfaceAddOn()
 {
 }
 
 
 BNetworkSettingsItem*
-OpenVPNInterfaceAddOn::CreateNextItem(uint32& cookie)
+VPNInterfaceAddOn::CreateNextItem(uint32& cookie)
 {
        if (cookie++ == 0)
-               return new OpenVPNInterfaceItem(Settings());
+               return new VPNInterfaceItem(Settings());
 
        return NULL;
 }
@@ -185,5 +185,5 @@ extern "C"
 BNetworkSettingsAddOn*
 instantiate_network_settings_add_on(image_id image, BNetworkSettings& settings)
 {
-       return new OpenVPNInterfaceAddOn(image, settings);
+       return new VPNInterfaceAddOn(image, settings);
 }


Other related posts:

  • » [haiku-commits] haiku: hrev53349 - in src/add-ons/network_settings: openvpn vpn - Alex von Gluck IV