home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / Networking / SambaManager / Service.h < prev    next >
Encoding:
Text File  |  1998-03-25  |  1.8 KB  |  65 lines

  1. /*
  2.     SambaManger. A graphical frontend to configure the NetInfo enhanced samba.
  3.     Copyright (C) 1998  Robert Frank
  4.  
  5.     This program is free software; you can redistribute it and/or modify
  6.     it under the terms of the GNU General Public License as published by
  7.     the Free Software Foundation; either version 2 of the License, or
  8.     (at your option) any later version.
  9.  
  10.     This program is distributed in the hope that it will be useful,
  11.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.     GNU General Public License for more details.
  14.  
  15.     You should have received a copy of the GNU General Public License
  16.     along with this program; if not, write to the Free Software
  17.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  18.         
  19.         Robert Frank, frank@ifi.unibas.ch
  20. */
  21.  
  22. #import <appkit/appkit.h>
  23. #import <netinfo/ni.h>
  24. #import "NIDirectory.h"
  25.  
  26. // Some useful short cuts:
  27. #define     ppname(i)        props.ni_proplist_val[i].nip_name
  28. #define        pplen(i)        props.ni_proplist_val[i].nip_val.ni_namelist_len
  29. #define        ppval(i,x)    props.ni_proplist_val[i].nip_val.ni_namelist_val[x]
  30.  
  31. #define getString(s) [Service stringFor:s]
  32.  
  33.  
  34. @interface Service:Object
  35. {        
  36.     id    controller;
  37.     id    window;
  38.  
  39.         NIDirectory        *ni_dirObj;
  40. }
  41. // Return the localized string
  42. + (const char *)stringFor:(const char *)strng;
  43.  
  44. // Allocate and create a new object.
  45. + new:sender at:(NXCoord *)offset;
  46.  
  47. // Ask for an existing entry and open, unless already opened.
  48. + open:sender at:(NXCoord *)offset;
  49.  
  50. - close:sender;
  51. - delete:sender;
  52. - revert:sender;
  53. - save:sender;
  54. - saveToDomain:sender;
  55. - show:sender;
  56. - (BOOL)minimumOK;
  57.  
  58. - (BOOL)isSame:(const char *)str inDomain:(const char *)dName;
  59. - (BOOL)isOld:sender;
  60.  
  61. - setupAndLoad;
  62. - init:sender dirObj:(NIDirectory *)dir delta:(NXCoord *)offset service:(const char *)sName;
  63.  
  64. @end
  65.