|
From: CVS C. to T. <the...@li...> - 2010-11-21 15:23:22
|
Revision: 569
http://themis.svn.sourceforge.net/themis/?rev=569&view=rev
Author: mark_hellegers
Date: 2010-11-21 15:23:15 +0000 (Sun, 21 Nov 2010)
Log Message:
-----------
Cleaned up the UrlEntry class.
Modified Paths:
--------------
trunk/themis/framework/UrlEntry.cpp
trunk/themis/framework/UrlEntry.h
Modified: trunk/themis/framework/UrlEntry.cpp
===================================================================
--- trunk/themis/framework/UrlEntry.cpp 2010-11-21 15:11:47 UTC (rev 568)
+++ trunk/themis/framework/UrlEntry.cpp 2010-11-21 15:23:15 UTC (rev 569)
@@ -2,25 +2,25 @@
* UrlEntry.cpp
*/
+// Standard C headers
#include <stdio.h>
+// BeOS headers
+#include <String.h>
+
+// Themis headers
#include "UrlEntry.h"
UrlEntry::UrlEntry(
int32 id,
const char* url )
{
-// printf( "UrlEntry::UrlEntry()\n" );
fID = id;
fLoadingProgress = -1;
fUrl = new BString( url );
-// fStatusText = new BString( "Transfering data from " );
-// fStatusText->Append( url );
-// fStatusText->Append( " ..." );
-
/*
* The page title is set to "loading..." now.
* When loading is finished, its set to the sites url.
@@ -31,36 +31,19 @@
*/
fTitle = new BString( "loading..." );
-// fCookiesDisabled = false;
fSecureConnection = false;
-// fFavIcon = NULL;
}
UrlEntry::~UrlEntry()
{
-// printf( "UrlEntry::~UrlEntry()\n" );
if( fUrl != NULL )
delete fUrl;
-// if( fStatusText != NULL )
-// delete fStatusText;
if( fTitle != NULL )
delete fTitle;
}
-//bool
-//UrlEntry::GetCookiesDisabled()
-//{
-// return fCookiesDisabled;
-//}
-
-//BBitmap*
-//UrlEntry::GetFavIcon()
-//{
-// return fFavIcon;
-//}
-
int32
UrlEntry::GetID()
{
@@ -79,16 +62,9 @@
return fSecureConnection;
}
-//const char*
-//UrlEntry::GetStatusText()
-//{
-// return fStatusText ? fStatusText->String() : "";
-//}
-
const char*
UrlEntry::GetTitle()
{
-// printf( " GetTitle(): %s\n", fTitle->String() );
return fTitle ? fTitle->String() : "";
}
@@ -106,33 +82,8 @@
fLoadingProgress,
fSecureConnection ? "true" : "false" );
-// printf( " LoadingProgess[%d] CookiesDisabled[%s], SecureConnection[%s]\n",
-// fLoadingProgress,
-// fCookiesDisabled ? "true" : "false",
-// fSecureConnection ? "true" : "false" );
}
-//void
-//UrlEntry::SetCookiesDisabled(
-// bool value )
-//{
-// fCookiesDisabled = value;
-//}
-
-//void
-//UrlEntry::SetFavIcon(
-// BBitmap* bmp )
-//{
-// if( bmp )
-// {
-// if( !fFavIcon )
-// fFavIcon = new BBitmap(
-// BRect( 0, 0, 15, 15 ), B_RGB32 );
-//
-// memcpy( fFavIcon->Bits(), bmp->Bits(), 1024 );
-// }
-//}
-
void
UrlEntry::SetLoadingProgress(
int8 loadingprogress )
@@ -141,7 +92,6 @@
if( fLoadingProgress == 100 )
{
-// fStatusText->SetTo( "Done." );
fTitle->SetTo( fUrl->String() );
}
}
@@ -159,4 +109,3 @@
{
fTitle->SetTo( title );
}
-
Modified: trunk/themis/framework/UrlEntry.h
===================================================================
--- trunk/themis/framework/UrlEntry.h 2010-11-21 15:11:47 UTC (rev 568)
+++ trunk/themis/framework/UrlEntry.h 2010-11-21 15:23:15 UTC (rev 569)
@@ -5,67 +5,34 @@
#ifndef URLENTRY_H
#define URLENTRY_H
-#include <Bitmap.h>
-#include <String.h>
+// Declarations used
+class BString;
-class UrlEntry
-{
+class UrlEntry {
+
+ private:
+ int32 fID;
+ int8 fLoadingProgress;
+ BString * fUrl;
+ BString * fTitle;
+ bool fSecureConnection;
+
public:
- UrlEntry(
- int32 id,
- const char* url );
-
- ~UrlEntry();
-
-// bool GetCookiesDisabled();
-
-// BBitmap* GetFavIcon();
-
- int32 GetID();
+ UrlEntry(int32 id,
+ const char* url);
+ ~UrlEntry();
- int8 GetLoadingProgress();
+ int32 GetID();
+ int8 GetLoadingProgress();
+ bool GetSecureConnection();
+ const char * GetTitle();
- bool GetSecureConnection();
-
-// const char* GetStatusText();
-
- const char* GetTitle();
-
- const char* GetUrl();
-
- void Print();
-
-// void SetCookiesDisabled(
-// bool value );
-
-// void SetFavIcon(
-// BBitmap* bmp );
-
- void SetLoadingProgress(
- int8 loadingprogress );
-
- void SetSecureConnection(
- bool value );
-
-// void SetStatusText(
-// const char* text );
-
- void SetTitle(
- const char* title );
+ const char * GetUrl();
+ void Print();
+ void SetLoadingProgress(int8 loadingprogress);
+ void SetSecureConnection(bool value);
+ void SetTitle(const char * title);
- private:
- int32 fID;
-
- int8 fLoadingProgress;
-
- BString* fUrl;
- BString* fTitle;
-// BString* fStatusText;
-
-// bool fCookiesDisabled;
- bool fSecureConnection;
-
-// BBitmap* fFavIcon;
};
#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|