001 /**
002 * Copyright (C) 2010, Skype Limited
003 *
004 * All intellectual property rights, including but not limited to copyrights,
005 * trademarks and patents, as well as know how and trade secrets contained in,
006 * relating to, or arising from the internet telephony software of
007 * Skype Limited (including its affiliates, "Skype"), including without
008 * limitation this source code, Skype API and related material of such
009 * software proprietary to Skype and/or its licensors ("IP Rights") are and
010 * shall remain the exclusive property of Skype and/or its licensors.
011 * The recipient hereby acknowledges and agrees that any unauthorized use of
012 * the IP Rights is a violation of intellectual property laws.
013 *
014 * Skype reserves all rights and may take legal action against infringers of
015 * IP Rights.
016 *
017 * The recipient agrees not to remove, obscure, make illegible or alter any
018 * notices or indications of the IP Rights and/or Skype's rights and
019 * ownership thereof.
020 */
021
022 package com.skype.ipc;
023
024 import java.util.Collection;
025 import java.util.Iterator;
026
027 //G propid modid oid*;
028 //g (moid (oid (N tag | kind tag value)*)*)*
029
030 public class MultiGetPropertyRequest extends Request
031 {
032 public MultiGetPropertyRequest(int moduleId, Collection<Integer> objectId, Collection<Integer> propId)
033 {
034 super();
035
036 Iterator<Integer> propidi = propId.iterator();
037 Iterator<Integer> oidi = objectId.iterator();
038 tokens.write('G');
039 while (true) {
040 encodeVaruint(propidi.next());
041 if (propidi.hasNext()) {
042 tokens.write(',');
043 }
044 else {
045 break;
046 }
047 }
048 tokens.write(']');
049 encodeVaruint(moduleId);
050 while (true) {
051 encodeVaruint(oidi.next());
052 if (oidi.hasNext()) {
053 tokens.write(',');
054 }
055 else {
056 break;
057 }
058 }
059 tokens.write(']');
060 tokens.write(']');
061 }
062
063 }