Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

RSS Reader Plug-in for Internet Explorer

, 17 Jul 2007 CPOL
This is a toolbar for the Internet Explorer which shows information from RSS taken from the Internet.
rssreader_exe.zip
Setup.exe
rssreader_src.zip
RssReader_src
RRPRssFetcher
RRPRssFetcher
res
RRPRssFetcher.ico
toolbar.bmp
RRPRssFetcher.vcproj.TEKAWADE.Prafulla V Tekawade.user
RSSReaderplugin
Debug
res
RssReaderPlugin.dll.manifest
RRPComInterfaceImplementor.rgs
RssReaderPlugin.aps
RssReaderPlugin.def
RssReaderPlugin.dsp
RssReaderPlugin.dsw
RssReaderPlugin.opt
RssReaderPlugin.plg
RssReaderPlugin.tlb
RssReaderPlugin.vcproj.TEKAWADE.Prafulla V Tekawade.user
RssReaderPluginps.def
RssReaderPluginps.mk
Setup.iss
/*
	Project		: RSS Reader plugin for Internet Explorer
	File name	: Request.h
	Date		: 
	Pupose		: This class is used to encapsulate the Internet APIs used to get the rss from
				  the internet
	Note		: Taken from the internet(codeproject.com)
	Send comments 
	or Bugs to	: prafulla.tekawade@gmail.com
*/

// Request.h: interface for the Request class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_REQUEST_H__9F2C9BB6_CBA7_40AF_80A4_09A1CE1CE220__INCLUDED_)
#define AFX_REQUEST_H__9F2C9BB6_CBA7_40AF_80A4_09A1CE1CE220__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000



#include <winsock.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <atlmisc.h>





#define MEM_BUFFER_SIZE 10

/* 
	HTTPRequest: Structure that returns the HTTP headers and message
					from the request
*/
typedef struct
{ 
    LPSTR headerSend;								// Pointer to HTTP header Send 
	LPSTR headerReceive;							// Pointer to HTTP headers Receive
    LPSTR message;									// Pointer to the HTTP message 
    long messageLength;								// Length of the message 
} HTTPRequest;

/* 
	MemBuffer:	Structure used to implement a memory buffer, which is a
				buffer of memory that will grow to hold variable sized
				parts of the HTTP message. 
*/
typedef struct
{
    unsigned	char *buffer;
    unsigned	char *position;
    size_t		size;
} MemBuffer;


class Request  
{
public:
	Request();
	virtual ~Request();

private:
	void		MemBufferCreate(MemBuffer *b);
	void		MemBufferGrow(MemBuffer *b);
	void		MemBufferAddByte(MemBuffer *b, unsigned char byt);
	void		MemBufferAddBuffer(MemBuffer *b, unsigned char *buffer, size_t size);
	DWORD		GetHostAddress(LPCSTR host);
	void		SendString(SOCKET sock,LPCSTR str);
	BOOL		ValidHostChar(char ch);
	void		ParseURL(LPCSTR url,LPSTR protocol,int lprotocol, LPSTR host,int lhost,LPSTR request,int lrequest,int *port);

	int			SendHTTP(LPCSTR url,LPCSTR headers,BYTE *post, DWORD postLength,HTTPRequest *req);

public:
	//void		SendRequest(bool IsPost, LPCSTR url, char *pszHeaderSend, char *pszHeaderReceive, char *pszMessage);
	void		SendRequest(bool IsPost, LPCSTR url, CString &psHeaderSend, CString &psHeaderReceive, CString &psMessage);
};

#endif // !defined(AFX_REQUEST_H__9F2C9BB6_CBA7_40AF_80A4_09A1CE1CE220__INCLUDED_)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

PrafullaT

India India
Quote : "Life is all about solving problems and enjoying their solutions !! "

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.141223.1 | Last Updated 17 Jul 2007
Article Copyright 2007 by PrafullaT
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid