예제 #1
0
파일: AFPServ.cs 프로젝트: windrobin/kumpro
            public MacRoot Login(MyDSI3 comm, ConDyn cd, String U, String P) {
                {
                    TransmitRes res = comm.Transmit(new DSIOpenSession());
                    if (res.pack.IsResponse && res.pack.ErrorCode == 0) {

                    }
                    else { throw new ApplicationException("DSIOpenSessionに失敗"); }
                }
                {
                    TransmitRes res = comm.Transmit(new DSICommand().WithRequestPayload(new FPLogin_Cleartext_Password()
                        .WithUserName(U)
                        .WithPasswd(P)
                        .WithAFPVersion("AFP2.2"))
                        );
                    if (res.pack.IsResponse && res.pack.ErrorCode == 0) {

                    }
                    else { throw new ApplicationException("FPLoginに失敗"); }
                }
                {
                    TransmitRes res1 = comm.Transmit(new DSICommand().WithRequestPayload(new FPGetSrvrParms()));
                    if (res1.pack.IsResponse && res1.pack.ErrorCode == 0) {

                    }
                    else { throw new ApplicationException("FPGetSrvrParmsに失敗"); }

                    GetSrvrParmsPack pack = new GetSrvrParmsPack(res1.br);

                    return new MacRoot(pack, comm, cd);
                }
            }
예제 #2
0
파일: AFPServ.cs 프로젝트: windrobin/kumpro
 public MacRoot(GetSrvrParmsPack pack, MyDSI3 comm, ConDyn cd) {
     this.pack = pack;
     this.comm = comm;
     this.cd = cd;
 }