The most reflective place
Writing Bqyahoo, my biggest feeling is "standing on the shoulders of the giant." First, the file upload download function is provided by Yahoo China; secondly, using Microsoft's products when writing a program: development tools and class libraries. So what did I do? In the help file of BQyahoo, I put forward some "new vocabulary" created, I think the things represented behind these things really belong to myself (I am not very embarrassed to design these).
Although I explained these "new vocabulary" in helping files, I want to explain it from the perspective of programming in this article. Not only talk to their meaning, but also talk about their coming dragon.
Land code: My mailbox, please use
The login code is actually very simple. The following two formulas can fully represent its role:
Encryption (user name password) = login code
Decryption (login code) = user name password
No one is willing to publish your mailbox's username and password on the Internet, which will make him completely lose control of this mailbox. However, some people may be willing to share part of their mailbox, perhaps it can be called some of the right to use. At this time, add a encrypted decryption system to implement this function. This is not a new topic, file permissions, and system permissions are used to use encrypted. However, this system can be said to be the foundation of BQyahoo, which also determines why BQYahoo can be used to share files. From the perspective of trust, you will translate the trust of other netizens to the trust of Bqyahoo, although Bqyahoo knows your username and password, but it only does what you want to do.
For respect for users who are using Bqyahoo (unfortunately, there are not many people), I don't publish the source code of the encrypted decryption part. However, we can actually look at this problem quite simple. You can also design a encrypted decision algorithm. As long as you don't say, who will know it (more accurately, who will try to crack your encryption solution)? For example, the username is reversed, then let it cross the password.
Here I want to emphasize that in this context environment in Bqyahoo, it seems to be able to use symmetrical encryption, and there is no match with asymmetric encryption. Encryption and decryption can only be completely symmetrical, the opposite process, there is no way to add variables in the middle. About this, if you have a good suggestion, you can contact me.
Download code: Folders in the mailbox
I remember there is an advertisement on the network that: owns the folder to refer to the network hard disk. The role of download code is to give you the file classification of Yahoo Mail, which plays a role similar to the folder. If there is no download code, you will face two difficulties, or do not share this Yahoo Mail; or share all accessories in this mailbox. It should be said that the download code provides a flexibility.
The download code can be set up by the user of the shared file, such as the download code of Jay Chou's album "Seven Miles" download code. Let's talk about how this download code will work, how to represent the song "Seven Miles". Now, there is a top song in the album. The first song of the first song is "my site", the second song is "Qi Qi" (I like Jay Chou's readers will not be unfamiliar).
I sent the first song as an attachment to the Yahoo Mail, and the subject is Qlx.Part0; sending the second song as an attachment to the Yahoo Mail, its mail theme is QLX.Part1. Then the last song of the last song should be QLX.Part9. Is this very regular? The download code QLX is equivalent to a prefix, and finally defines the attachment in the message belongs to that "folder". In fact, this design is inspired by WinRAR decomposes large files. If I now let me redesign BQyahoo, I will definitely merge the download code and login code together, simultaneously encrypt and decrypt, so that there is an increase in security, but also reduces the burden of downloading the user, don't have to learn two concepts. You can download a series of files with a ciphertext. It is a pity that these are the horse behind. In this article, you will often see these regrets.
Description file: Savior of the file name
In the previous article, I mentioned that if indirectly get an accessory download URL in the email, that is, the download URL of the annex according to the URL of the message will result in the file name of the attachment. In the early versions of BQyahoo, I used a very helpless approach: name all attachments to mail topic .rar. In other words, if an attachment's mail topic is QLX.Part1, it is named QLX.Part1.rar. This way, when this attachment is downloaded to a local hard disk, it behaves as a compressed file (assuming WinRar on this machine), it is actually just a MP3 song. It is clear that it will bring confusion, bringing inconvenience to the user, but also need to modify the file suffix again, and it is not possible to simply infer the content according to the file name.
After a netizen who claimed to be a computer college student, he did not modify the suffix name of the file. I clearly tell myself that Bqyahoo's users will suffer. It is born like a description file. It records information about each file when it is uploaded, and then it is also uploaded to Yahoo Mail. When Bqyahoo came to the inbox page, the first thing to do is to download the description file related to the download code. With the help of the description file, give the attachment name to be a very easy thing.
Download code QLX correspondence the email topic of QLX.Describe. That is to say: Describe the filematic topic = download code .describe.
The description file itself is an XML file. Here is an example (describe.xml)
XML Version = "1.0" encoding = "GB2312"?>
One of the two Item represents two mail attachments, where Discribe indicates the instructions for the file, filename indicates the subject of the mail in the attachment, and Savename represents the file name when the attachment is finally saved on the hard disk.
The last Item is a description of the entire down-on-carrier, where Discribe means that the shared man wants to say to the downloader, MailboxName is the mailbox name, and Downloadcode is the download code. When the description file appears, I found that it can solve the problem of downloading the file name, it also provides a stronger functional expansion mechanism for Bqyahoo. It essentially provides a relatively convenient channel for document sharing and downloaders. Is this not very mysterious? Description Files are generated when shared files and then work when files are downloaded.
Below is a statement of classes related to the description file in the Bqyahoo source code:
Class CxmldescribDATA // Class CXMLDESCRIBData Save Description File Information
{
PUBLIC:
CXMLDESCRIBDATA (VOID);
~ CxmldescribData (void);
PUBLIC:
Vector
Vector
Vector
String descrbeforuse;
String MailboxName;
String Downloadcode;
PUBLIC:
Bool readdata (void);
Bool writedata (string);
PUBLIC:
Int xxfindFileName (Const string name);
PUBLIC:
void clear ()
{
Vdescribe.clear ();
VFileName.clear ();
Vsavename.clear ();
}
}
Mailbox information file: Mailbox Manager
Users may know that others share multiple mailboxes shared by Bqyahoo (even the same Yahoo Mail, if the download code is different, Bqyahoo also thinks is a different mailbox), then he may need to save this information. The mailbox information file is to do this, similar to the FTP site manager in the FTP software.
This part of the content is not much more, but it is actually saved, as long as it can be read correctly next time. Bqyahoo uses an XML file, in fact, for example: (XMLData.xml)
XML Version = "1.0" encoding = "GB2312"?>
7fd 9944644C 9E0431E3EF13EA 2C 48262850F 971652C 7471111FAAC1BE5BA 7C 3B209766EFF08E90EF 088871A 2F 15BEAF50DC9E6B0D6276D2E7FFA561982E 9200A 51732545d6e32889ae 2A 25 "Downloadcode =" hong "/> The meaning of the attributes of each project, I want to read it. Below is a statement of classes related to mailbox information files in bqyahoo source code: Class Cxmldata {// Class CXMLDATA Save Mail Information PUBLIC: Cxmldata (void); PUBLIC: Vector Vector Vector PUBLIC: Bool readdata (void); Bool WriteData (Void); PUBLIC: void clear () { VName.clear (); VDownloadcode.clear (); Vlogincode.clear (); } } summary This article explains a lot of new words I have written in Bqyahoo. This is also the best place to express your own will. I remember that there is a subway in the "Hacker Empire 2: Reissous", where there is a strong savior, when I was defeated by the subway manager, he pointed out that this subway program was written, so everything He said by him. Among BQYHAOO, various data mechanisms are made by me. When they have been developed at the time, they all move them. In fact, there is a lot of imperfect places from now on. Compared with the relevant function library, the analysis of Yahoo web information is the most sense of work, the most embarrassment of the programmer, but unfortunately I don't have good in this regard. I hope that time and opportunities will be redesigned against BQyahoo.