nixd
Loading...
Searching...
No Matches
Public Member Functions | List of all members
nixd::AttrSetProvider Class Reference

Main RPC class for attrset provider. More...

#include <AttrSetProvider.h>

Inheritance diagram for nixd::AttrSetProvider:
[legend]
Collaboration diagram for nixd::AttrSetProvider:
[legend]

Public Member Functions

 AttrSetProvider (std::unique_ptr< lspserver::InboundPort > In, std::unique_ptr< lspserver::OutboundPort > Out)
 
void onEvalExpr (const EvalExprParams &Name, lspserver::Callback< EvalExprResponse > Reply)
 Eval an expression, use it for furthur requests.
 
void onAttrPathInfo (const AttrPathInfoParams &AttrPath, lspserver::Callback< AttrPathInfoResponse > Reply)
 Query attrpath information.
 
void onAttrPathComplete (const AttrPathCompleteParams &Params, lspserver::Callback< AttrPathCompleteResponse > Reply)
 Complete attrpath entries.
 
void onOptionInfo (const AttrPathInfoParams &AttrPath, lspserver::Callback< OptionInfoResponse > Reply)
 Provide option information on given attrpath.
 
void onOptionComplete (const AttrPathCompleteParams &Params, lspserver::Callback< OptionCompleteResponse > Reply)
 Complete attrpath entries. However dive into submodules while selecting.
 
- Public Member Functions inherited from lspserver::LSPServer
 LSPServer (std::unique_ptr< InboundPort > In, std::unique_ptr< OutboundPort > Out)
 
void closeInbound ()
 Close the inbound port.
 
void run ()
 
void switchStreamStyle (JSONStreamStyle Style)
 
- Public Member Functions inherited from lspserver::MessageHandler
virtual ~MessageHandler ()=default
 

Additional Inherited Members

- Protected Attributes inherited from lspserver::LSPServer
HandlerRegistry Registry
 
template<class T >
llvm::unique_function< void(const T &) mkOutNotifiction )(llvm::StringRef Method, OutboundPort *O=nullptr)
 
template<class ParamTy , class ResponseTy >
llvm::unique_function< void(const ParamTy &, Callback< ResponseTy >) mkOutMethod )(llvm::StringRef Method, OutboundPort *O=nullptr)
 

Detailed Description

Main RPC class for attrset provider.

Definition at line 31 of file AttrSetProvider.h.

Constructor & Destructor Documentation

◆ AttrSetProvider()

AttrSetProvider::AttrSetProvider ( std::unique_ptr< lspserver::InboundPort > In,
std::unique_ptr< lspserver::OutboundPort > Out )

Definition at line 160 of file AttrSetProvider.cpp.

Member Function Documentation

◆ onAttrPathComplete()

void AttrSetProvider::onAttrPathComplete ( const AttrPathCompleteParams & Params,
lspserver::Callback< AttrPathCompleteResponse > Reply )

Complete attrpath entries.

Definition at line 216 of file AttrSetProvider.cpp.

References lspserver::error(), nixd::fromJSON(), and nixt::selectStrings().

◆ onAttrPathInfo()

void AttrSetProvider::onAttrPathInfo ( const AttrPathInfoParams & AttrPath,
lspserver::Callback< AttrPathInfoResponse > Reply )

Query attrpath information.

Definition at line 193 of file AttrSetProvider.cpp.

References lspserver::error(), nixd::fromJSON(), and nixt::selectStrings().

◆ onEvalExpr()

void AttrSetProvider::onEvalExpr ( const EvalExprParams & Name,
lspserver::Callback< EvalExprResponse > Reply )

Eval an expression, use it for furthur requests.

Definition at line 175 of file AttrSetProvider.cpp.

References lspserver::error(), and nixd::fromJSON().

◆ onOptionComplete()

void AttrSetProvider::onOptionComplete ( const AttrPathCompleteParams & Params,
lspserver::Callback< OptionCompleteResponse > Reply )

Complete attrpath entries. However dive into submodules while selecting.

FIXME: suppport list names. i.e. foo.*.submodule

Definition at line 286 of file AttrSetProvider.cpp.

References lspserver::error(), nixd::fromJSON(), nixt::isOption(), nixd::OptionField::Name, nixt::selectOptions(), and nixt::toSymbols().

◆ onOptionInfo()

void AttrSetProvider::onOptionInfo ( const AttrPathInfoParams & AttrPath,
lspserver::Callback< OptionInfoResponse > Reply )

Provide option information on given attrpath.

Definition at line 259 of file AttrSetProvider.cpp.

References lspserver::error(), nixd::fromJSON(), nixt::selectOptions(), and nixt::toSymbols().


The documentation for this class was generated from the following files: