예제 #1
0
 public void Read (TProtocol iprot)
 {
   TField field;
   iprot.ReadStructBegin();
   while (true)
   {
     field = iprot.ReadFieldBegin();
     if (field.Type == TType.Stop) { 
       break;
     }
     switch (field.ID)
     {
       case 1:
         if (field.Type == TType.String) {
           AuthenticationToken = iprot.ReadString();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 2:
         if (field.Type == TType.I32) {
           AfterUSN = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 3:
         if (field.Type == TType.I32) {
           MaxEntries = iprot.ReadI32();
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       case 4:
         if (field.Type == TType.Struct) {
           Filter = new SyncChunkFilter();
           Filter.Read(iprot);
         } else { 
           TProtocolUtil.Skip(iprot, field.Type);
         }
         break;
       default: 
         TProtocolUtil.Skip(iprot, field.Type);
         break;
     }
     iprot.ReadFieldEnd();
   }
   iprot.ReadStructEnd();
 }
예제 #2
0
 public void send_getFilteredSyncChunk(string authenticationToken, int afterUSN, int maxEntries, SyncChunkFilter filter)
 #endif
 {
   oprot_.WriteMessageBegin(new TMessage("getFilteredSyncChunk", TMessageType.Call, seqid_));
   getFilteredSyncChunk_args args = new getFilteredSyncChunk_args();
   args.AuthenticationToken = authenticationToken;
   args.AfterUSN = afterUSN;
   args.MaxEntries = maxEntries;
   args.Filter = filter;
   args.Write(oprot_);
   oprot_.WriteMessageEnd();
   #if SILVERLIGHT || NETFX_CORE
   return oprot_.Transport.BeginFlush(callback, state);
   #else
   oprot_.Transport.Flush();
   #endif
 }
예제 #3
0
 public IAsyncResult send_getFilteredSyncChunk(AsyncCallback callback, object state, string authenticationToken, int afterUSN, int maxEntries, SyncChunkFilter filter)
예제 #4
0
      public SyncChunk getFilteredSyncChunk(string authenticationToken, int afterUSN, int maxEntries, SyncChunkFilter filter)
      {
        #if !SILVERLIGHT && !NETFX_CORE
        send_getFilteredSyncChunk(authenticationToken, afterUSN, maxEntries, filter);
        return recv_getFilteredSyncChunk();

        #else
        var asyncResult = Begin_getFilteredSyncChunk(null, null, authenticationToken, afterUSN, maxEntries, filter);
        return End_getFilteredSyncChunk(asyncResult);

        #endif
      }
예제 #5
0
 public IAsyncResult Begin_getFilteredSyncChunk(AsyncCallback callback, object state, string authenticationToken, int afterUSN, int maxEntries, SyncChunkFilter filter)
 {
   return send_getFilteredSyncChunk(callback, state, authenticationToken, afterUSN, maxEntries, filter);
 }
			///** Asks the NoteStore to provide the state of the account in order of last modification.
			// This request retrieves one block of the server's state so that a client can make several small requests against a large account rather than getting the entire state in one big message. This call gives more fine-grained control of the data that will be received by a client by omitting data elements that a client doesn't need. This may reduce network traffic and sync times.
			// @param  afterUSN The client can pass this value to ask only for objects that have been updated after a certain point. This allows the client to receive updates after its last checkpoint rather than doing a full synchronization on every pass. The default value of "0" indicates that the client wants to get objects from the start of the account.
			// @param  maxEntries The maximum number of modified objects that should be returned in the result SyncChunk. This can be used to limit the size of each individual message to be friendly for network transfer.
			// @param  filter The caller must set some of the flags in this structure to specify which data types should be returned during the synchronization. See the SyncChunkFilter structure for information on each flag.
			// */
			public SyncChunk GetFilteredSyncChunk(int afterUSN, int maxEntries, SyncChunkFilter filter)
			{
				return Client.getFilteredSyncChunk(AuthenticationToken(), afterUSN, maxEntries, filter);
			}