* Send (push) updates to the admin network as they have registered for these updates. * @param freq the frequency to be processed. */
| 1059 | * @param freq the frequency to be processed. |
| 1060 | */ |
| 1061 | void NetworkAdminUpdate(AdminUpdateFrequency freq) |
| 1062 | { |
| 1063 | for (ServerNetworkAdminSocketHandler *as : ServerNetworkAdminSocketHandler::IterateActive()) { |
| 1064 | for (int i = 0; i < ADMIN_UPDATE_END; i++) { |
| 1065 | if (as->update_frequency[i].Test(freq)) { |
| 1066 | /* Update the admin for the required details */ |
| 1067 | switch (i) { |
| 1068 | case ADMIN_UPDATE_DATE: |
| 1069 | as->SendDate(); |
| 1070 | break; |
| 1071 | |
| 1072 | case ADMIN_UPDATE_COMPANY_ECONOMY: |
| 1073 | as->SendCompanyEconomy(); |
| 1074 | break; |
| 1075 | |
| 1076 | case ADMIN_UPDATE_COMPANY_STATS: |
| 1077 | as->SendCompanyStats(); |
| 1078 | break; |
| 1079 | |
| 1080 | default: NOT_REACHED(); |
| 1081 | } |
| 1082 | } |
| 1083 | } |
| 1084 | } |
| 1085 | } |
no test coverage detected