- Timestamp:
- 04/07/11 12:44:21 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/RemoteControl.h
r10183 r10301 64 64 typedef std::map<const std::string, StateClient*> ClientList; 65 65 66 ServiceList fServiceList; /// An up-to-date list of all available commands 66 ServiceList fCommandList; /// An up-to-date list of all available commands 67 ServiceList fServiceList; /// An up-to-date list of all available services 67 68 ClientList fClientList; /// A list with all MESSAGE services to which we subscribed 68 69 … … 76 77 MessageImp(out), 77 78 DimErrorRedirecter(static_cast<MessageImp&>(*this)), 78 lout(in), fServiceList("CMD", out) 79 { 79 lout(in), fCommandList("CMD", out), fServiceList("", out) 80 { 81 fCommandList.SetHandler(this); 80 82 fServiceList.SetHandler(this); 81 83 } … … 119 121 { 120 122 if (fCurrentServer.empty()) 121 return T::Complete(f ServiceList.GetServerList(), text);123 return T::Complete(fCommandList.GetServerList(), text); 122 124 else 123 return T::Complete(f ServiceList.GetServiceList(fCurrentServer), text);124 } 125 return T::Complete(f ServiceList.GetServiceList(l), text);125 return T::Complete(fCommandList.GetServiceList(fCurrentServer), text); 126 } 127 return T::Complete(fCommandList.GetServiceList(l), text); 126 128 } 127 129 … … 129 131 { 130 132 RemoteControlImp::infoHandler(); 131 if (!fCurrentServer.empty() && !f ServiceList.HasServer(fCurrentServer))133 if (!fCurrentServer.empty() && !fCommandList.HasServer(fCurrentServer)) 132 134 { 133 135 fCurrentServer = ""; … … 142 144 lout(T::GetStreamIn()) 143 145 { 144 fServiceList.SetHandler(this);145 146 } 146 147 … … 151 152 lout << " " << kUnderline << "Specific commands:" << endl; 152 153 lout << kBold << " s,servers " << kReset << "List all servers which are connected." << endl; 154 lout << kBold << " svc,service " << kReset << "List all services in the network." << endl; 153 155 lout << endl; 154 156 return true; … … 158 160 { 159 161 lout << endl << kBold << "List of commands:" << endl; 160 f ServiceList.PrintServiceList(lout);162 fCommandList.PrintDescription(lout); 161 163 return true; 162 164 } … … 170 172 if (str=="servers" || str=="s") 171 173 { 172 fServiceList.PrintServerList(lout); 174 fCommandList.PrintServerList(lout); 175 return true; 176 } 177 178 if (str=="service" || str=="svc") 179 { 180 fServiceList.PrintDescription(lout); 173 181 return true; 174 182 }
Note:
See TracChangeset
for help on using the changeset viewer.