()
| 131 | private static Config cf = Config.getInstance(); |
| 132 | |
| 133 | public static void initCaps() { |
| 134 | ver = null; |
| 135 | features = null; |
| 136 | features = new Vector(); |
| 137 | features.addElement(NS_CAPS); |
| 138 | |
| 139 | //#ifdef PEP_ACTIVITY |
| 140 | if (cf.rcvactivity) { |
| 141 | features.addElement("http://jabber.org/protocol/activity"); |
| 142 | features.addElement("http://jabber.org/protocol/activity+notify"); |
| 143 | } |
| 144 | //#endif |
| 145 | //#ifdef FILE_TRANSFER |
| 146 | if (cf.fileTransfer) { |
| 147 | features.addElement("http://jabber.org/protocol/bytestreams"); |
| 148 | } |
| 149 | //#endif |
| 150 | if (cf.eventComposing) { |
| 151 | features.addElement(Message.NS_CHATSTATES); //xep-0085 |
| 152 | }//#ifdef ADHOC |
| 153 | if (cf.adhoc) { |
| 154 | features.addElement("http://jabber.org/protocol/commands"); //xep-0050 |
| 155 | }//#endif |
| 156 | features.addElement("http://jabber.org/protocol/disco#info"); |
| 157 | features.addElement("http://jabber.org/protocol/disco#items"); |
| 158 | //#ifdef PEP_LOCATION |
| 159 | if (cf.rcvloc) { |
| 160 | features.addElement("http://jabber.org/protocol/geoloc"); |
| 161 | features.addElement("http://jabber.org/protocol/geoloc+notify"); |
| 162 | } |
| 163 | //#endif |
| 164 | |
| 165 | //#ifdef FILE_TRANSFER |
| 166 | if (cf.fileTransfer) { |
| 167 | features.addElement("http://jabber.org/protocol/ibb"); |
| 168 | } |
| 169 | //#endif |
| 170 | //#ifdef PEP |
| 171 | if (cf.sndrcvmood) { |
| 172 | features.addElement("http://jabber.org/protocol/mood"); |
| 173 | features.addElement("http://jabber.org/protocol/mood+notify"); |
| 174 | } |
| 175 | //#endif |
| 176 | features.addElement("http://jabber.org/protocol/rosterx"); // XEP-0144 |
| 177 | //#ifdef FILE_TRANSFER |
| 178 | if (cf.fileTransfer) { |
| 179 | features.addElement("http://jabber.org/protocol/si"); |
| 180 | features.addElement("http://jabber.org/protocol/si/profile/file-transfer"); |
| 181 | } |
| 182 | //#endif |
| 183 | //#ifdef PEP |
| 184 | //#ifdef PEP_TUNE |
| 185 | if (cf.rcvtune) { |
| 186 | features.addElement("http://jabber.org/protocol/tune"); |
| 187 | features.addElement("http://jabber.org/protocol/tune+notify"); |
| 188 | } |
| 189 | //#endif |
| 190 | //#endif |
no test coverage detected