1/**
2 * All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
3 * you may not use this file except in compliance with the License.
4 * You may obtain a copy of the License at
5 *
6 *     http://www.apache.org/licenses/LICENSE-2.0
7 *
8 * Unless required by applicable law or agreed to in writing, software
9 * distributed under the License is distributed on an "AS IS" BASIS,
10 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 * See the License for the specific language governing permissions and
12 * limitations under the License.
13 */
14
15package org.jivesoftware.smackx.provider;
16
17import org.jivesoftware.smack.packet.PacketExtension;
18import org.jivesoftware.smackx.packet.DelayInfo;
19import org.jivesoftware.smackx.packet.DelayInformation;
20import org.xmlpull.v1.XmlPullParser;
21
22/**
23 * This provider simply creates a {@link DelayInfo} decorator for the {@link DelayInformation} that
24 * is returned by the superclass.  This allows the new code using
25 * <a href="http://xmpp.org/extensions/xep-0203.html">Delay Information XEP-0203</a> to be
26 * backward compatible with <a href="http://xmpp.org/extensions/xep-0091.html">XEP-0091</a>.
27 *
28 * <p>This provider must be registered in the <b>smack.properties</b> file for the element
29 * <b>delay</b> with namespace <b>urn:xmpp:delay</b></p>
30 *
31 * @author Robin Collier
32 */
33public class DelayInfoProvider extends DelayInformationProvider
34{
35
36	@Override
37	public PacketExtension parseExtension(XmlPullParser parser) throws Exception
38	{
39		return new DelayInfo((DelayInformation)super.parseExtension(parser));
40	}
41
42}
43