diff --git a/src/apps/bin/Jamfile b/src/apps/bin/Jamfile index 77e9eb0abd..4fc0b9523b 100644 --- a/src/apps/bin/Jamfile +++ b/src/apps/bin/Jamfile @@ -108,6 +108,7 @@ SubInclude OBOS_TOP src apps bin rcs ; # Network command line tools SubInclude OBOS_TOP src apps bin arp ; SubInclude OBOS_TOP src apps bin ifconfig ; +SubInclude OBOS_TOP src apps bin ppp_up ; SubInclude OBOS_TOP src apps bin pppconfig ; SubInclude OBOS_TOP src apps bin ping ; SubInclude OBOS_TOP src apps bin route ; diff --git a/src/apps/bin/ppp_up/ConnectionView.cpp b/src/apps/bin/ppp_up/ConnectionView.cpp new file mode 100644 index 0000000000..065f5b6440 --- /dev/null +++ b/src/apps/bin/ppp_up/ConnectionView.cpp @@ -0,0 +1,203 @@ +/* ----------------------------------------------------------------------- + * Copyright (c) 2004 Waldemar Kornewald, Waldemar.Kornewald@web.de + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * ----------------------------------------------------------------------- */ + +#include "ConnectionView.h" +#include + +#include +#include +#include +#include +#include + +#include +#include + + +static const char *kLabelConnect = "Connect"; +static const char *kLabelCancel = "Cancel"; + +static const uint32 kMsgCancel = 'CANC'; +static const uint32 kMsgConnect = 'CONN'; + +static const uint32 kDefaultButtonWidth = 80; + + +ConnectionView::ConnectionView(BRect rect, ppp_interface_id id, thread_id thread, + DialUpView *dun) + : BView(rect, "ConnectionView", B_FOLLOW_NONE, 0), + fID(id), + fRequestThread(thread), + fDUNView(dun), + fConnecting(false) +{ + SetViewColor(ui_color(B_PANEL_BACKGROUND_COLOR)); + + BRect rect = Bounds(); + rect.InsetBy(5, 5); + fAuthenticationView = dun->AuthenticationView(); + fAuthenticationView->RemoveSelf(); + fAuthenticationView->MoveTo(5, 5); + AddChild(fAuthenticationView); + + rect.top = fAuthenticationView->Frame().bottom + 15; + rect.bottom = rect.top + 15; + fAttemptView = new BStringView(rect, "AttemptView", AttemptString().String()); + AddChild(fAttemptView); + + rect.top = rect.bottom + 5; + fStatusView = dun->StatusView(); + fStatusView->RemoveSelf(); + fStatusView->MoveTo(5, rect.top); + AddChild(fStatusView); + + rect.top = fStatusView->Frame().bottom + 10; + rect.bottom = rect.top + 25; + rect.right = rect.left + kDefaultButtonWidth; + fConnectButton = new BButton(rect, "ConnectButton", kLabelConnect, + new BMessage(kMsgConnect)); + Window()->SetDefaultButton(fConnectButton); + + rect.left = rect.right + 10; + rect.right = rect.left + kDefaultButtonWidth; + fCancelButton = new BButton(rect, "CancelButton", kLabelCancel, + new BMessage(kMsgCancel)); + + AddChild(fConnectButton); + AddChild(fCancelButton); +} + + +void +ConnectionView::AttachedToWindow() +{ + fConnectButton->SetTarget(this); + fCancelButton->SetTarget(this); + + if(fDUNView->NeedsRequest() == false) + Connect(); +} + + +void +ConnectionView::MessageReceived(BMessage *message) +{ + switch(message->what) { + case MSG_UPDATE: + Update(); + break; + + case MSG_UP_FAILED: + UpFailed(); + break; + + case kMsgConnect: + Connect(); + break; + + case kMsgCancel: + Cancel(); + break; + + default: + BView::MessageReceived(message); + } +} + + +void +ConnectionView::Update() +{ + fAttemptView->SetText(AttemptString().String()); +} + + +void +ConnectionView::UpFailed() +{ + Update(); + fConnectButton->SetEnabled(true); +} + + +void +ConnectionView::Connect() +{ + BMessage settings, profile; + fDUNView->SaveSettings(&settings, &profile, true); + driver_settings *temporaryProfile = MessageToDriverSettings(profile); + PPPInterface interface(fID); + interface.SetProfile(temporaryProfile); + free_driver_settings(temporaryProfile); + + fConnectButton->SetEnabled(false); + fConnecting = true; + + send_data(fRequestThread, B_OK, NULL, 0); +} + + +void +ConnectionView::Cancel() +{ + if(fConnecting) { + // only disconnect if we are not connected yet + PPPInterface interface(fID); + ppp_interface_info_t info; + interface.GetInterfaceInfo(&info); + + if(info.info.phase < PPP_ESTABLISHED_PHASE) { + interface.Down(); + be_app->PostMessage(B_QUIT_REQUESTED); + } + } else { + send_data(fRequestThread, B_ERROR, NULL, 0); + // tell requestor to cancel connection attempt + be_app->PostMessage(B_QUIT_REQUESTED); + } +} + + +// Clean up before our window quits (called by ConnectionWindow). +void +ConnectionView::CleanUp() +{ + // give the "stolen" views back to make sure they are not deleted too early + fAuthenticationView->RemoveSelf(); + fDUNView->AddChild(fAuthenticationView); + fStatusView->RemoveSelf(); + fDUNView->AddChild(fStatusView); +} + + +BString +ConnectionView::AttemptString() const +{ + PPPInterface interface(fID); + ppp_interface_info_t info; + interface.GetInterfaceInfo(&info); + BString attempt; + attempt << "Attempt " << info.info.dialRetry << " of " << + info.info.dialRetriesLimit; + + return attempt; +} diff --git a/src/apps/bin/ppp_up/ConnectionView.h b/src/apps/bin/ppp_up/ConnectionView.h new file mode 100644 index 0000000000..34237035ec --- /dev/null +++ b/src/apps/bin/ppp_up/ConnectionView.h @@ -0,0 +1,66 @@ +/* ----------------------------------------------------------------------- + * Copyright (c) 2004 Waldemar Kornewald, Waldemar.Kornewald@web.de + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * ----------------------------------------------------------------------- */ + +#ifndef CONNECTION_VIEW__H +#define CONNECTION_VIEW__H + +#include "DialUpView.h" + + +#define MSG_UPDATE 'UPDT' + // sent when status changed +#define MSG_UP_FAILED 'UPFL' + // sent when up failed + + +class ConnectionView : public BView { + friend class ConnectionWindow; + + public: + ConnectionView(BRect rect, ppp_interface_id id, thread_id thread, + DialUpView *view); + + virtual void AttachedToWindow(); + virtual void MessageReceived(BMessage *message); + + private: + void Update(); + void UpFailed(); + void Connect(); + void Cancel(); + void CleanUp(); + + BString AttemptString() const; + + private: + ppp_interface_id fID; + thread_id fRequestThread; + BView *fAuthenticationView, *fStatusView; + DialUpView *fDUNView; + BStringView *fAttemptView; + + BButton *fConnectButton, *fCancelButton; + bool fConnecting; +}; + + +#endif diff --git a/src/apps/bin/ppp_up/ConnectionWindow.cpp b/src/apps/bin/ppp_up/ConnectionWindow.cpp new file mode 100644 index 0000000000..b4832da00f --- /dev/null +++ b/src/apps/bin/ppp_up/ConnectionWindow.cpp @@ -0,0 +1,47 @@ +/* ----------------------------------------------------------------------- + * Copyright (c) 2004 Waldemar Kornewald, Waldemar.Kornewald@web.de + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * ----------------------------------------------------------------------- */ + +#include "ConnectionWindow.h" + + +ConnectionWindow::ConnectionWindow(BRect frame, ppp_interface_id id, + thread_id replyThread) + : BWindow(frame, "Connecting...", B_MODAL_WINDOW, + B_NOT_RESIZABLE | B_NOT_ZOOMABLE) +{ + BRect bounds = Bounds(); + bounds.OffsetBy(bounds.Width() + 5, 0); + DialUpView *dun = new DialUpView(bounds); + fConnectionView = new ConnectionView(Bounds(), id, replyThread, dun); + + AddChild(dun); + AddChild(fConnectionView); +} + + +bool +ConnectionWindow::QuitRequested() +{ + fConnectionView->CleanUp(); + + return true; +} diff --git a/src/apps/bin/ppp_up/ConnectionWindow.h b/src/apps/bin/ppp_up/ConnectionWindow.h new file mode 100644 index 0000000000..7f870d9aa4 --- /dev/null +++ b/src/apps/bin/ppp_up/ConnectionWindow.h @@ -0,0 +1,41 @@ +/* ----------------------------------------------------------------------- + * Copyright (c) 2004 Waldemar Kornewald, Waldemar.Kornewald@web.de + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * ----------------------------------------------------------------------- */ + +#ifndef CONNECTION_WINDOW__H +#define CONNECTION_WINDOW__H + +#include +#include "ConnectionView.h" + + +class ConnectionWindow : public BWindow { + public: + ConnectionWindow(BRect frame, ppp_interface_id id, thread_id replyThread); + + virtual bool QuitRequested(); + + private: + ConnectionView *fConnectionView; +}; + + +#endif diff --git a/src/apps/bin/ppp_up/Jamfile b/src/apps/bin/ppp_up/Jamfile new file mode 100644 index 0000000000..600c7eaa72 --- /dev/null +++ b/src/apps/bin/ppp_up/Jamfile @@ -0,0 +1,16 @@ +SubDir OBOS_TOP src apps bin ppp_up ; + +UsePrivateHeaders net ; +UseHeaders [ FDirName $(OBOS_TOP) src add-ons kernel network ppp shared libppp headers ] ; +UseHeaders [ FDirName $(OBOS_TOP) src add-ons kernel network ppp shared libkernelppp headers ] ; +UseHeaders [ FDirName $(OBOS_TOP) src tests kits net DialUpPreflet ] ; + +AddResources ppp_up : ppp_up.rdef ; + +BinCommand ppp_up : + ConnectionView.cpp + ConnectionWindow.cpp + PPPUpApplication.cpp +; + +LinkSharedOSLibs ppp_up : libdunview.a libppp.a be ; diff --git a/src/apps/bin/ppp_up/PPPDeskbarReplicant.cpp b/src/apps/bin/ppp_up/PPPDeskbarReplicant.cpp new file mode 100644 index 0000000000..ada769ae1d --- /dev/null +++ b/src/apps/bin/ppp_up/PPPDeskbarReplicant.cpp @@ -0,0 +1,34 @@ +/* ----------------------------------------------------------------------- + * Copyright (c) 2004 Waldemar Kornewald, Waldemar.Kornewald@web.de + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * ----------------------------------------------------------------------- */ + +#include "PPPDeskbarReplicant.h" +#include "ConnectionWindow.h" + + +PPPDeskbarReplicant::PPPDeskbarReplicant() + : BView(BRect(0, 0, 15, 15), "PPPDeskbarReplicant", B_FOLLOW_NONE, 0) +{ + BRect rect(0, 0, 300, 250); + fWindow = new ConnectionWindow(rect, id, sender); + fWindow->MoveTo(center_on_screen(rect, fWindow)); + fWindow->Show(); +} diff --git a/src/apps/bin/ppp_up/PPPDeskbarReplicant.h b/src/apps/bin/ppp_up/PPPDeskbarReplicant.h new file mode 100644 index 0000000000..da15bafba4 --- /dev/null +++ b/src/apps/bin/ppp_up/PPPDeskbarReplicant.h @@ -0,0 +1,35 @@ +/* ----------------------------------------------------------------------- + * Copyright (c) 2004 Waldemar Kornewald, Waldemar.Kornewald@web.de + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * ----------------------------------------------------------------------- */ + +#ifndef PPP_DESKBAR_REPLICANT__H +#define PPP_DESKBAR_REPLICANT__H + +#include + + +class PPPDeskbarReplicant : public BView { + public: + PPPDeskbarReplicant(); +}; + + +#endif diff --git a/src/apps/bin/ppp_up/PPPUpApplication.cpp b/src/apps/bin/ppp_up/PPPUpApplication.cpp new file mode 100644 index 0000000000..d15f5eb3e8 --- /dev/null +++ b/src/apps/bin/ppp_up/PPPUpApplication.cpp @@ -0,0 +1,106 @@ +/* ----------------------------------------------------------------------- + * Copyright (c) 2004 Waldemar Kornewald, Waldemar.Kornewald@web.de + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * ----------------------------------------------------------------------- */ + +#include +#include + +#include "DialUpView.h" +#include "ConnectionWindow.h" + + +static const char *kSignature = "application/x-vnd.haiku.ppp_up"; + +extern "C" _EXPORT BView *instantiate_deskbar_item(); + + +BView* +instantiate_deskbar_item() +{ + // TODO: implement me! + return NULL; +} + + +static +status_t +report_thread(void *data) +{ + // TODO: add replicant when we finished connecting + + return B_OK; +} + + +class PPPUpApplication : public BApplication { + public: + PPPUpApplication(const char *name, ppp_interface_id id, + thread_id replyThread); + + virtual void ReadyToRun(); + + private: + const char *fName; + ppp_interface_id fID; + thread_id fReplyThread; + ConnectionWindow *fWindow; +}; + + +int +main(const char *argv[], int argc) +{ + if(argc != 2) + return -1; + + const char *name = argv[1]; + + thread_id replyThread; + ppp_interface_id id; + receive_data(&replyThread, &id, sizeof(id)); + + new PPPUpApplication(name, id, replyThread); + + be_app->Run(); + + delete be_app; + + return 0; +} + + +PPPUpApplication::PPPUpApplication(const char *name, ppp_interface_id id, + thread_id replyThread) + : BApplication(kSignature), + fName(name), + fID(id), + fReplyThread(replyThread), + fWindow(NULL) +{ +} + + +void +PPPUpApplication::ReadyToRun() +{ + // TODO: create report message thread (which in turn sends the reply) + // TODO: create connection window +} diff --git a/src/apps/bin/ppp_up/README b/src/apps/bin/ppp_up/README new file mode 100644 index 0000000000..493525ab4d --- /dev/null +++ b/src/apps/bin/ppp_up/README @@ -0,0 +1,7 @@ +Usage: +ppp_up INTERFACENAME + +The app waits until it receives a thread message containing the interface id. The sender of this message will wait for a reply that indicates that ppp_up is ready to run. The replying thread will be registered as a report message receiver (no reply timeout). +If the interface is configured to ask the user before dialing or if the password is missing although a login is needed, ppp_up will open a request window and wait for the user to enter the login information. All changes will be saved. Actually, the login view that is presented to the user is the same as the one used in the dial-up settings (including its behaviour). + +If a connection could be established ppp_up will add a connection status replicant to the Deskbar. diff --git a/src/apps/bin/ppp_up/TODO b/src/apps/bin/ppp_up/TODO new file mode 100644 index 0000000000..522121e984 --- /dev/null +++ b/src/apps/bin/ppp_up/TODO @@ -0,0 +1,7 @@ +If has temporary profile: +Open connection window and request password. + +Add Deskbar replicant. + + +What if preflet changes profile while connecting? diff --git a/src/apps/bin/ppp_up/ppp_up.rdef b/src/apps/bin/ppp_up/ppp_up.rdef new file mode 100644 index 0000000000..ce61210d37 --- /dev/null +++ b/src/apps/bin/ppp_up/ppp_up.rdef @@ -0,0 +1,37 @@ +/* + pppinit.rdef +*/ + +resource app_signature "application/x-vnd.haiku.ppp_up"; + +/* BEOS:APP_FLAGS : + 00000000 = SINGLE LAUNCH + 00000001 = MULTIPLE LAUNCH + 00000002 = EXCLUSIVE LAUNCH + 00000004 = BACKGROUND APP + SINGLE LAUNCH + 00000005 = BACKGROUND APP + MULTIPLE LAUNCH + 00000006 = BACKGROUND APP + EXCLUSIVE LAUNCH + 00000008 = ARGV_ONLY + SINGLE LAUNCH + 00000009 = ARGV_ONLY + MULTIPLE LAUNCH + 0000000A = ARGV_ONLY + EXCLUSIVE LAUNCH + 0000000C = ARGV_ONLY + BACKGROUND APP + SINGLE LAUNCH + 0000000D = ARGV_ONLY + BACKGROUND APP + MULTIPLE LAUNCH + 0000000E = ARGV_ONLY + BACKGROUND APP + EXCLUSIVE LAUNCH +*/ + +resource app_flags 0x00000005; + +resource app_version { + major = 0, + middle = 1, + minor = 0, + + /* 0 = development 1 = alpha 2 = beta + 3 = gamma 4 = golden master 5 = final */ + variety = 0, + + internal = 0, + + short_info = "ppp_up", + long_info = "PPP interface GUI initialization app." +}; diff --git a/src/apps/bin/pppconfig/pppconfig.cpp b/src/apps/bin/pppconfig/pppconfig.cpp index 9a8965ba4e..dd9cd041ed 100644 --- a/src/apps/bin/pppconfig/pppconfig.cpp +++ b/src/apps/bin/pppconfig/pppconfig.cpp @@ -1,9 +1,24 @@ -//----------------------------------------------------------------------- -// This software is part of the OpenBeOS distribution and is covered -// by the OpenBeOS license. -// -// Copyright (c) 2003-2004 Waldemar Kornewald, Waldemar.Kornewald@web.de -//----------------------------------------------------------------------- +/* ----------------------------------------------------------------------- + * Copyright (c) 2003-2004 Waldemar Kornewald, Waldemar.Kornewald@web.de + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * ----------------------------------------------------------------------- */ #include #include