package rpc import ( "encoding/json" // "fmt" "github.com/ethereum/go-ethereum/jsre" "github.com/robertkrimen/otto" ) type Jeth struct { ethApi *EthereumApi toVal func(interface{}) otto.Value re *jsre.JSRE } func NewJeth(ethApi *EthereumApi, toVal func(interface{}) otto.Value, re *jsre.JSRE) *Jeth { return &Jeth{ethApi, toVal, re} } func (self *Jeth) err(code int, msg string, id interface{}) (response otto.Value) { rpcerr := &RpcErrorObject{code, msg} self.re.Set("ret_jsonrpc", jsonrpcver) self.re.Set("ret_id", id) self.re.Set("ret_error", rpcerr) response, _ = self.re.Run(` ret_response = { jsonrpc: ret_jsonrpc, id: ret_id, error: ret_error }; `) return } func (self *Jeth) Send(call otto.FunctionCall) (response otto.Value) { reqif, err := call.Argument(0).Export() if err != nil { return self.err(-32700, err.Error(), nil) } jsonreq, err := json.Marshal(reqif) var req RpcRequest err = json.Unmarshal(jsonreq, &req) var respif interface{} err = self.ethApi.GetRequestReply(&req, &respif) if err != nil { return self.err(-32603, err.Error(), req.Id) } self.re.Set("ret_jsonrpc", jsonrpcver) self.re.Set("ret_id", req.Id) res, _ := json.Marshal(respif) self.re.Set("ret_result", string(res)) response, err = self.re.Run(` ret_response = { jsonrpc: ret_jsonrpc, id: ret_id, result: JSON.parse(ret_result) }; `) return } .mk - KNOBS : remove KDE and QT (KDE4 and QT4 should be used instead) - MOVED : add the removed ports PR: ports/180745 Submitted by: rene Approved by: portmgr (bapt) Exp-run by: bapt - Convert USE_GETTEXT to USES (part 2) 2013-04-24T13:36:18+00:00 ak ak@FreeBSD.org 2013-04-24T13:36:18+00:00 94b5385f0c5c7493905baf4b7452c3b010e37462 Approved by: portmgr (bapt)
Approved by:	portmgr (bapt)
- Deprecate QT3, KDE3 and unmaintained ports depending on them. QT 3.3.8 2012-12-30T12:03:51+00:00 beat beat@FreeBSD.org 2012-12-30T12:03:51+00:00 352a027ff1d6a67bd3340c53a88d4e6e065442cf was released in 2007 and KDE 3.5.10 in 2008 and both are no longer maintained upstream nor in our tree. - Set EXPIRATION_DATE to 2013-07-01 Discussed with: bapt, tabthorpe
  was released in 2007 and KDE 3.5.10 in 2008 and both are no longer
  maintained upstream nor in our tree.
- Set EXPIRATION_DATE to 2013-07-01

Discussed with:	bapt, tabthorpe