Ejemplo n.º 1
0
        internal static SearchContactRequest CreateSearchContactEntity(string sessionKey, uint uin, string deviceID, string OSType, string peer)
        {
            BaseRequest @base = CreateBaseRequestEntity(deviceID, sessionKey, uin, OSType);

            SearchContactRequest.Builder builder = new SearchContactRequest.Builder();
            builder.SetBase(@base);
            builder.SetOpCode(0);
            SKBuiltinString_t.Builder builder2 = new SKBuiltinString_t.Builder();
            builder2.SetString(peer);
            builder.SetUserName(builder2);
            return(builder.Build());
        }
Ejemplo n.º 2
0
        internal static GetContactRequest CreateGetContactEntity(string sessionKey, uint uin, string deviceID, string OSType, string peer)
        {
            BaseRequest @base = CreateBaseRequestEntity(deviceID, sessionKey, uin, OSType);

            GetContactRequest.Builder builder = new GetContactRequest.Builder();
            builder.SetBase(@base);
            builder.SetUserCount(1);
            SKBuiltinString_t.Builder builder2 = new SKBuiltinString_t.Builder();
            builder2.SetString(peer);
            builder.AddUserNameList(builder2);
            builder.SetFromChatRoomNumb(1u);
            builder.AddFromChatRoom(new SKBuiltinString_t.Builder());
            return(builder.Build());
        }
Ejemplo n.º 3
0
        internal static GetContactRequest CreateGetContactEntity(string sessionKey, uint uin, string deviceID, string OSType, string peer)
        {
            BaseRequest br = CreateBaseRequestEntity(deviceID, sessionKey, uin, OSType);

            GetContactRequest.Builder gb = new GetContactRequest.Builder();
            gb.SetBase(br);
            gb.SetUserCount(1);
            SKBuiltinString_t.Builder sb = new SKBuiltinString_t.Builder();
            sb.SetString(peer);
            gb.AddUserNameList(sb);
            gb.SetFromChatRoomNumb(1);
            gb.AddFromChatRoom(new SKBuiltinString_t.Builder());

            return(gb.Build());
        }
Ejemplo n.º 4
0
        internal static UploadMContact UploadMContact(string sessionKey, uint uin, string deviceID, string OSType, string mobile, List <string> contacts, string userName)
        {
            BaseRequest @base = CreateBaseRequestEntity(deviceID, sessionKey, uin, OSType);

            UploadMContact.Builder builder = new UploadMContact.Builder();
            builder.SetBase(@base);
            builder.SetMobile(mobile);
            builder.SetUserName(userName);
            builder.SetOpcode(1);
            builder.SetMobileListSize(contacts.Count);
            foreach (string contact in contacts)
            {
                SKBuiltinString_t.Builder builder2 = new SKBuiltinString_t.Builder();
                builder2.SetString(contact);
                builder.AddMobiles(builder2);
            }
            builder.SetEmailListSize(0);
            return(builder.Build());
        }
Ejemplo n.º 5
0
        internal static UploadMContact UploadMContact(string sessionKey, uint uin, string deviceID, string OSType, string mobile, List <string> contacts, string userName)
        {
            BaseRequest br = CreateBaseRequestEntity(deviceID, sessionKey, uin, OSType);

            UploadMContact.Builder lrb = new UploadMContact.Builder();
            lrb.SetBase(br);
            lrb.SetMobile(mobile);
            lrb.SetUserName(userName);
            lrb.SetOpcode(1);
            lrb.SetMobileListSize(contacts.Count);

            foreach (string item in contacts)
            {
                SKBuiltinString_t.Builder one = new SKBuiltinString_t.Builder();
                one.SetString(item);
                lrb.AddMobiles(one);
            }
            lrb.SetEmailListSize(0);


            return(lrb.Build());
        }