IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 29, 2005, 4:35:06 PM (21 years ago)
Author:
jhoblitt
Message:

rename PS::IPP::IData -> Nebulous

Location:
trunk/Nebulous/nebclient
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous/nebclient/bootstrap.sh

    r3098 r4440  
    33# Copyright (C) 2005  Joshua Hoblitt
    44#
    5 # $Id: bootstrap.sh,v 1.7 2005-01-27 01:08:05 jhoblitt Exp $
     5# $Id: bootstrap.sh,v 1.8 2005-06-30 02:35:05 jhoblitt Exp $
    66
    7 wsdl2h -o src/idata.h -c idata.wsdl \
    8 && soapcpp2 -d src -c src/idata.h \
     7wsdl2h -o src/nebulous.h -c nebulous.wsdl \
     8&& soapcpp2 -d src -c src/nebulous.h \
    99&& rm -f src/*.xml
    1010
  • trunk/Nebulous/nebclient/configure.ac

    r3017 r4440  
    11dnl Copyright (C) 2005  Joshua Hoblitt
    22dnl
    3 dnl $Id: configure.ac,v 1.2 2005-01-16 10:37:59 jhoblitt Exp $
     3dnl $Id: configure.ac,v 1.3 2005-06-30 02:35:05 jhoblitt Exp $
    44
    55dnl Process this file with autoconf to produce a configure script.
    6 AC_INIT([idataclient], [0.0.1], [jhoblitt@cpan.org])
     6AC_INIT([nebulousclient], [0.0.1], [jhoblitt@cpan.org])
    77AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
    8 AC_REVISION([$Revision: 1.2 $])
     8AC_REVISION([$Revision: 1.3 $])
    99
    1010dnl generate config.h
  • trunk/Nebulous/nebclient/nebulous.wsdl

    r3061 r4440  
    11<?xml version="1.0"?>
    2 <definitions name="IDataServer"
    3     targetNamespace="urn:PS/IPP/IData/Server/SOAP"
    4     xmlns:tns="urn:PS/IPP/IData/Server/SOAP"
     2<definitions name="NebulousServer"
     3    targetNamespace="urn:Nebulous/Server/SOAP"
     4    xmlns:tns="urn:Nebulous/Server/SOAP"
    55    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    66    xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/"
    77    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    88    xmlns="http://schemas.xmlsoap.org/wsdl/"
    9     xmlns:ns="urn:PS/IPP/IData/Server/SOAP">
     9    xmlns:ns="urn:Nebulous/Server/SOAP">
    1010
    1111    <types>
    1212        <schema xmlns="http://www.w3.org/2001/XMLSchema"
    13             targetNamespace="urn:PS/IPP/IData/Server/SOAP"
     13            targetNamespace="urn:Nebulous/Server/SOAP"
    1414            xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    1515            xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
     
    8585
    8686
    87     <portType name="PS/IPP/IData/Server/SOAPPort">
     87    <portType name="Nebulous/Server/SOAPPort">
    8888        <operation name="create_object">
    8989            <input  message="tns:create_objectRequest" />
     
    138138
    139139
    140     <binding name="SOAP" type="tns:PS/IPP/IData/Server/SOAPPort">
     140    <binding name="SOAP" type="tns:Nebulous/Server/SOAPPort">
    141141        <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
    142142        <operation name="create_object">
    143             <soap:operation soapAction="urn:PS/IPP/IData/Server/SOAP#create_object" />
    144             <input>
    145                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
    146                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    147             </input>
    148             <output>
    149                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
     143            <soap:operation soapAction="urn:Nebulous/Server/SOAP#create_object" />
     144            <input>
     145                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
     146                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
     147            </input>
     148            <output>
     149                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
    150150                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    151151            </output>
    152152        </operation>
    153153        <operation name="replicate_object">
    154             <soap:operation soapAction="urn:PS/IPP/IData/Server/SOAP#replicate_object" />
    155             <input>
    156                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
    157                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    158             </input>
    159             <output>
    160                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
     154            <soap:operation soapAction="urn:Nebulous/Server/SOAP#replicate_object" />
     155            <input>
     156                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
     157                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
     158            </input>
     159            <output>
     160                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
    161161                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    162162            </output>
    163163        </operation>
    164164        <operation name="lock_object">
    165             <soap:operation soapAction="urn:PS/IPP/IData/Server/SOAP#lock_object" />
    166             <input>
    167                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
    168                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    169             </input>
    170             <output>
    171                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
     165            <soap:operation soapAction="urn:Nebulous/Server/SOAP#lock_object" />
     166            <input>
     167                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
     168                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
     169            </input>
     170            <output>
     171                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
    172172                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    173173            </output>
    174174        </operation>
    175175        <operation name="unlock_object">
    176             <soap:operation soapAction="urn:PS/IPP/IData/Server/SOAP#unlock_object" />
    177             <input>
    178                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
    179                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    180             </input>
    181             <output>
    182                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
     176            <soap:operation soapAction="urn:Nebulous/Server/SOAP#unlock_object" />
     177            <input>
     178                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
     179                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
     180            </input>
     181            <output>
     182                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
    183183                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    184184            </output>
    185185        </operation>
    186186        <operation name="find_instances">
    187             <soap:operation soapAction="urn:PS/IPP/IData/Server/SOAP#find_instances" />
    188             <input>
    189                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
    190                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    191             </input>
    192             <output>
    193                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
     187            <soap:operation soapAction="urn:Nebulous/Server/SOAP#find_instances" />
     188            <input>
     189                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
     190                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
     191            </input>
     192            <output>
     193                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
    194194                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    195195            </output>
    196196        </operation>
    197197        <operation name="delete_instance">
    198             <soap:operation soapAction="urn:PS/IPP/IData/Server/SOAP#delete_instance" />
    199             <input>
    200                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
    201                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    202             </input>
    203             <output>
    204                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
     198            <soap:operation soapAction="urn:Nebulous/Server/SOAP#delete_instance" />
     199            <input>
     200                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
     201                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
     202            </input>
     203            <output>
     204                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
    205205                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    206206            </output>
    207207        </operation>
    208208        <operation name="stat_object">
    209             <soap:operation soapAction="urn:PS/IPP/IData/Server/SOAP#stat_object" />
    210             <input>
    211                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
    212                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    213             </input>
    214             <output>
    215                 <soap:body use="encoded" namespace="urn:PS/IPP/IData/Server/SOAP"
     209            <soap:operation soapAction="urn:Nebulous/Server/SOAP#stat_object" />
     210            <input>
     211                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
     212                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
     213            </input>
     214            <output>
     215                <soap:body use="encoded" namespace="urn:Nebulous/Server/SOAP"
    216216                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
    217217            </output>
     
    220220
    221221
    222     <service name="PS/IPP/IData/Server/SOAP">
    223         <port name="PS/IPP/IData/Server/SOAPPort" binding="tns:SOAP">
    224             <soap:address location="http://localhost:80/idata" />
     222    <service name="Nebulous/Server/SOAP">
     223        <port name="Nebulous/Server/SOAPPort" binding="tns:SOAP">
     224            <soap:address location="http://localhost:80/nebulous" />
    225225        </port>
    226226    </service>
  • trunk/Nebulous/nebclient/src/Makefile.am

    r3052 r4440  
    11# Copyright (C) 2005  Joshua Hoblitt
    22#
    3 # $Id: Makefile.am,v 1.3 2005-01-19 00:31:35 jhoblitt Exp $
     3# $Id: Makefile.am,v 1.4 2005-06-30 02:35:06 jhoblitt Exp $
    44
    5 include_HEADERS=idataclient.h
    6 lib_LTLIBRARIES = libidataclient.la
    7 libidataclient_la_LDFLAGS = -release @PACKAGE_VERSION@
    8 libidataclient_la_SOURCES =\
    9     idataclient.h\
    10     idataclient.c\
     5include_HEADERS=nebclient.h
     6lib_LTLIBRARIES = libnebclient.la
     7libnebclient_la_LDFLAGS = -release @PACKAGE_VERSION@
     8libnebclient_la_SOURCES =\
     9    nebclient.h\
     10    nebclient.c\
    1111    xmalloc.h\
    1212    xmalloc.c\
     
    2121bin_PROGRAMS = test
    2222test_SOURCES = test.c
    23 test_LDADD = libidataclient.la
     23test_LDADD = libnebclient.la
  • trunk/Nebulous/nebclient/src/nebclient.c

    r4121 r4440  
    11/*
    2  * idataclient.c - idata client
     2 * nebclient.c - nebulous client
    33 *
    44 * Copyright (C) 2005  Joshua Hoblitt
    55 *
    6  * $Id: nebclient.c,v 1.3 2005-06-06 21:21:05 jhoblitt Exp $
     6 * $Id: nebclient.c,v 1.4 2005-06-30 02:35:06 jhoblitt Exp $
    77 */
    88
     
    1818#include "soapH.h"
    1919#include "SOAP.nsmap"
    20 #include "idataclient.h"
     20#include "nebclient.h"
    2121
    2222#define ERRBUF_SIZE 255
    2323
    24 static off_t idataCopyFile(char *source, char *dest);
    25 static off_t idataCopyFilehandle(int sourceFH, int destFH);
    26 
    27 void idataServerInit(idataServer *server)
     24static off_t nebCopyFile(char *source, char *dest);
     25static off_t nebCopyFilehandle(int sourceFH, int destFH);
     26
     27void nebServerInit(nebServer *server)
    2828{
    2929    soap_init(server);
    3030}
    3131
    32 char *idataServerErr(idataServer *server)
     32char *nebServerErr(nebServer *server)
    3333{
    3434    char            *fault;
     
    4545}
    4646
    47 void idataServerCleanup(idataServer *server)
     47void nebServerCleanup(nebServer *server)
    4848{
    4949    soap_end(server); // remove deserialized data and clean up
     
    5151}
    5252
    53 int idataCreate(idataServer *server, char *key, unsigned int class, char *volume, char *comment, char **URI)
     53int nebCreate(nebServer *server, char *key, unsigned int class, char *volume, char *comment, char **URI)
    5454{
    5555    struct ns1__create_USCOREobjectResponse response;
     
    6161        strcpy(*URI, response.result);
    6262
    63         if (!idataParseURI(*URI, &filename)) {
     63        if (!nebParseURI(*URI, &filename)) {
    6464            fprintf(stderr, "can not parse URI\n");
    6565
     
    8181}
    8282
    83 int idataReplicate(idataServer *server, char *key, char *volume, char **URI )
     83int nebReplicate(nebServer *server, char *key, char *volume, char **URI )
    8484{
    8585    struct ns1__replicate_USCOREobjectResponse response;
     
    9191        strcpy(*URI, response.result);
    9292
    93         if (!idataParseURI(*URI, &filename)) {
     93        if (!nebParseURI(*URI, &filename)) {
    9494            fprintf(stderr, "can not parse URI\n");
    9595
     
    9797        }
    9898
    99         sourceFH = idataOpen(server, key, IDATA_READ);
     99        sourceFH = nebOpen(server, key, NEB_READ);
    100100        if (sourceFH == -1) {
    101101            fprintf(stderr, "can not open key %s\n", key );
     
    111111        }
    112112
    113         idataCopyFilehandle(sourceFH, destFH);
     113        nebCopyFilehandle(sourceFH, destFH);
    114114
    115115        if (close(sourceFH) == -1) {
     
    130130}
    131131
    132 int idataCull( idataServer *server,char *key )
    133 {
    134 
    135     return 0;
    136 }
    137 
    138 int idataLock(idataServer *server, char *key, rw flag )
    139 {
    140 
    141     return 0;
    142 }
    143 
    144 int idataUnlock(idataServer *server, char *key, rw flag )
    145 {
    146 
    147     return 0;
    148 }
    149 
    150 int idataFindInstances(idataServer *server, char *key, char *volume, char ***locations)
     132int nebCull( nebServer *server,char *key )
     133{
     134
     135    return 0;
     136}
     137
     138int nebLock(nebServer *server, char *key, rw flag )
     139{
     140
     141    return 0;
     142}
     143
     144int nebUnlock(nebServer *server, char *key, rw flag )
     145{
     146
     147    return 0;
     148}
     149
     150int nebFindInstances(nebServer *server, char *key, char *volume, char ***locations)
    151151{
    152152    struct ns1__find_USCOREinstancesResponse response;
     
    179179}
    180180
    181 int idataFind(idataServer *server, char *key )
    182 {
    183 
    184     return 0;
    185 }
    186 
    187 int idataOpen(idataServer *server, char *key, rw flag )
    188 {
    189 
    190     return 0;
    191 }
    192 
    193 int idataDelete(idataServer *server, char *key )
    194 {
    195 
    196     return 0;
    197 }
    198 
    199 int idataCopy(idataServer *server, char *key, char *newKey )
    200 {
    201 
    202     return 0;
    203 }
    204 
    205 int idataMove(idataServer *server, char *key, char *newKey )
    206 {
    207 
    208     return 0;
    209 }
    210 
    211 int idataDelete_instance(idataServer *server, char *URI )
    212 {
    213 
    214     return 0;
    215 }
    216 
    217 int idataStat(idataServer *server, char *key )
    218 {
    219 
    220     return 0;
    221 }
    222 
    223 int idataErr(idataServer *server, char *errString )
    224 {
    225 
    226     return 0;
    227 }
    228 
    229 int idataParseURI(const char *URI, char **filename)
     181int nebFind(nebServer *server, char *key )
     182{
     183
     184    return 0;
     185}
     186
     187int nebOpen(nebServer *server, char *key, rw flag )
     188{
     189
     190    return 0;
     191}
     192
     193int nebDelete(nebServer *server, char *key )
     194{
     195
     196    return 0;
     197}
     198
     199int nebCopy(nebServer *server, char *key, char *newKey )
     200{
     201
     202    return 0;
     203}
     204
     205int nebMove(nebServer *server, char *key, char *newKey )
     206{
     207
     208    return 0;
     209}
     210
     211int nebDelete_instance(nebServer *server, char *URI )
     212{
     213
     214    return 0;
     215}
     216
     217int nebStat(nebServer *server, char *key )
     218{
     219
     220    return 0;
     221}
     222
     223int nebErr(nebServer *server, char *errString )
     224{
     225
     226    return 0;
     227}
     228
     229int nebParseURI(const char *URI, char **filename)
    230230{
    231231    regex_t         myregex;
     
    270270}
    271271
    272 void idataFree(void *ptr) {
     272void nebFree(void *ptr) {
    273273    xfree(ptr);
    274274}
    275275
    276 static off_t idataCopyFile(char *source, char *dest)
     276static off_t nebCopyFile(char *source, char *dest)
    277277{
    278278    int             sourceFH;
     
    294294    }
    295295
    296     bytesCopied = idataCopyFilehandle(sourceFH, destFH);
     296    bytesCopied = nebCopyFilehandle(sourceFH, destFH);
    297297    if (bytesCopied < 0) {
    298298        return -1;
     
    314314}
    315315
    316 static off_t idataCopyFilehandle(int sourceFH, int destFH)
     316static off_t nebCopyFilehandle(int sourceFH, int destFH)
    317317{
    318318    off_t           bytesTotal;
  • trunk/Nebulous/nebclient/src/nebclient.h

    r4121 r4440  
    11/*
    2  * idataclient -  idata client
     2 * nebclient.h -  nebulous client header
    33 *
    44 * Copyright (C) 2005  Joshua Hoblitt
    55 *
    6  * $Id: nebclient.h,v 1.5 2005-06-06 21:21:05 jhoblitt Exp $
     6 * $Id: nebclient.h,v 1.6 2005-06-30 02:35:06 jhoblitt Exp $
    77 */
    88
    9 #ifndef IDATACLIENT_H
    10 #define IDATACLIENT_H 1
     9#ifndef NEBCLIENT_H
     10#define NEBCLIENT_H 1
    1111
    1212#include "soapH.h"
    1313
    14 typedef enum { IDATA_READ, IDATA_WRITE } rw;
    15 typedef struct soap idataServer;
     14typedef enum { NEB_READ, NEB_WRITE } rw;
     15typedef struct soap nebServer;
    1616
    17 void idataServerInit(idataServer *server);
     17void nebServerInit(nebServer *server);
    1818
    19 char *idataServerErr(idataServer *server);
     19char *nebServerErr(nebServer *server);
    2020
    21 void idataServerCleanup(idataServer *server);
     21void nebServerCleanup(nebServer *server);
    2222
    23 int idataCreate(idataServer *server, char *key, unsigned int class, char *volume, char *comment, char **URI);
     23int nebCreate(nebServer *server, char *key, unsigned int class, char *volume, char *comment, char **URI);
    2424
    25 int idataReplicate(idataServer *server, char *key, char *volume, char **URI);
     25int nebReplicate(nebServer *server, char *key, char *volume, char **URI);
    2626
    27 int idataCull(idataServer *server, char *key);
     27int nebCull(nebServer *server, char *key);
    2828
    29 int idataLock(idataServer *server, char *key, rw flag);
     29int nebLock(nebServer *server, char *key, rw flag);
    3030
    31 int idataUnlock(idataServer *server, char *key, rw flag);
     31int nebUnlock(nebServer *server, char *key, rw flag);
    3232
    33 int idataFindInstances(idataServer *server, char *key, char *volume, char ***locations);
     33int nebFindInstances(nebServer *server, char *key, char *volume, char ***locations);
    3434
    35 int idataFind(idataServer *server, char *key);
     35int nebFind(nebServer *server, char *key);
    3636
    37 int idataOpen(idataServer *server, char *key, rw flag);
     37int nebOpen(nebServer *server, char *key, rw flag);
    3838
    39 int idataDelete(idataServer *server, char *key);
     39int nebDelete(nebServer *server, char *key);
    4040
    41 int idataCopy(idataServer *server, char *key, char *newKey);
     41int nebCopy(nebServer *server, char *key, char *newKey);
    4242
    43 int idataMove(idataServer *server, char *key, char *newKey);
     43int nebMove(nebServer *server, char *key, char *newKey);
    4444
    45 int idataDelete_instance(idataServer *server, char *URI);
     45int nebDelete_instance(nebServer *server, char *URI);
    4646
    47 int idataStat(idataServer *server, char *key);
     47int nebStat(nebServer *server, char *key);
    4848
    49 int idataErr(idataServer *server, char *errString);
     49int nebErr(nebServer *server, char *errString);
    5050
    51 int idataParseURI(const char *URI, char **filename);
     51int nebParseURI(const char *URI, char **filename);
    5252
    53 void idataFree(void *ptr);
     53void nebFree(void *ptr);
    5454
    55 #endif // IDATACLIENT_H
     55#endif // NEBLIENT_H
  • trunk/Nebulous/nebclient/src/test.c

    r4120 r4440  
    11#include <stdio.h>
    22#include <unistd.h>
    3 #include "idataclient.h"
     3#include "nebclient.h"
    44
    55int main (int argc, char **argv) {
    6     idataServer     server;
     6    nebServer     server;
    77    char            *URI;
    88    int             fh;
     
    1010    char            **foo;
    1111
    12     idataServerInit(&server);
     12    nebServerInit(&server);
    1313
    14     fh = idataCreate(&server, argv[1], 0, NULL, NULL, &URI);
     14    fh = nebCreate(&server, argv[1], 0, NULL, NULL, &URI);
    1515
    1616    if (fh > 0) {
    1717        printf( "uri is %s\n", URI );
    1818
    19         idataFree(URI);
     19        nebFree(URI);
    2020
    2121        if(close(fh) != 0){
     
    2525        printf( "local error\n" );
    2626    } else {
    27         printf( "server error: %s\n", idataServerErr(&server) );
     27        printf( "server error: %s\n", nebServerErr(&server) );
    2828    }
    2929
    30     n = idataFindInstances(&server, argv[1], NULL, &foo);
     30    n = nebFindInstances(&server, argv[1], NULL, &foo);
    3131    printf( "found %d instances\n", n );
    3232
    33     idataServerCleanup(&server);
     33    nebServerCleanup(&server);
    3434
    3535    exit(0);
Note: See TracChangeset for help on using the changeset viewer.