Skip to content

Instantly share code, notes, and snippets.

@slashthinking
slashthinking / qq NetworkConst
Last active December 11, 2015 06:08
网络协议
摘自微信代码
public static String APN_3GNET;
public static String APN_3GWAP;
public static String APN_777;
public static String APN_CMNET;
public static String APN_CMWAP;
public static String APN_CTNET;
public static String APN_CTWAP;
public static final String APN_NET = "Net";
@slashthinking
slashthinking / gist:4556577
Created January 17, 2013 15:08
tt同步的数据内容。。。 真tmd的全
package com.tencent.tccsync;
public enum ITccSyncDbAdapter$DbAdapterType
{
private int value;
static
{
CONTACT = new DbAdapterType("CONTACT", 1, 1);
EVENT = new DbAdapterType("EVENT", 2, 2);
@slashthinking
slashthinking / gist:4556574
Created January 17, 2013 15:08
同步的异常,以及同步采用的压缩方式。
public class SyncmlEngine
{
public static final int TCC_ERR_NONE = 0;
public static final int TCC_ERR_SYNC_ALERT_FAIL = -32217;
public static final int TCC_ERR_SYNC_DEVICE_FULL = -32220;
public static final int TCC_ERR_SYNC_INVALID_CREDENTIALS = -32215;
public static final int TCC_ERR_SYNC_LARGE_OBJECT_ERROR = -32219;
public static final int TCC_ERR_SYNC_LARGE_OBJECT_SIZE_MISMATCH = -32218;
public static final int TCC_ERR_SYNC_LOGIC = -32221;
public static final int TCC_ERR_SYNC_TARGET_MISMATCH = -32214;
@slashthinking
slashthinking / gist:4556559
Created January 17, 2013 15:06
weixin 同步的代码。可以看到有很多种同步策略。
public enum SyncmlEngine$SyncType
{
private int value;
static
{
SYNC_SLOW_SYNC = new SyncType("SYNC_SLOW_SYNC", 2, 201);
SYNC_ONE_WAY_FROM_CLIENT = new SyncType("SYNC_ONE_WAY_FROM_CLIENT", 3, 202);
SYNC_REFRESH_FROM_CLIENT = new SyncType("SYNC_REFRESH_FROM_CLIENT", 4, 203);