1#include <stdio.h> 2#include <stdlib.h> 3#include <string.h> 4 5#include <sys/dirent.h> 6#include <sys/stat.h> 7 8#include <String.h> 9#include <ListView.h> 10#include <ListItem.h> 11#include <ScrollView.h> 12#include <Box.h> 13#include <Button.h> 14#include <Bitmap.h> 15#include <Alert.h> 16 17#include <NetworkSetupAddOn.h> 18 19#include "DialUpView.h" 20 21class AddOn : public NetworkSetupAddOn 22{ 23public: 24 AddOn(image_id addon_image); 25 ~AddOn(); 26 27 const char * Name(); 28 BView * CreateView(BRect *bounds); 29}; 30 31 32NetworkSetupAddOn * get_nth_addon(image_id image, int index) 33{ 34 if (index == 0) 35 return new AddOn(image); 36 return NULL; 37} 38 39// #pragma mark - 40 41AddOn::AddOn(image_id image) 42 : NetworkSetupAddOn(image) 43{ 44} 45 46 47AddOn::~AddOn() 48{ 49} 50 51 52const char * AddOn::Name() 53{ 54 return "DialUp"; 55} 56 57 58BView * AddOn::CreateView(BRect *bounds) 59{ 60 BRect r = *bounds; 61 62 if (r.Width() < 200 || r.Height() < 400) 63 r.Set(0, 0, 200, 400); 64 65 BView *view = new DialUpView(r); 66 *bounds = view->Bounds(); 67 68 return view; 69} 70 71