Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reminders for Events #123

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
f120e92
Tested out sending notifications from the app
harshit-sharma-gits Aug 3, 2022
ea80a06
Added ReminderEvent Class and now the proram loads the Events into a …
harshit-sharma-gits Aug 3, 2022
27192fb
Folder structure changes and now using Queris instead of reading thro…
harshit-sharma-gits Aug 5, 2022
3d7b13c
Added Node Monitoring and Seperate thread for Eventsloop
harshit-sharma-gits Aug 8, 2022
8e628d3
Fixed Live Queries
harshit-sharma-gits Aug 9, 2022
78d7b52
Added Node Monitor for all events to track changes in attributes
harshit-sharma-gits Aug 11, 2022
0cb5dce
Fixed empty list bug
harshit-sharma-gits Aug 11, 2022
95718da
Coding style changes
harshit-sharma-gits Aug 13, 2022
da67c45
Hardcoded defaultCat so that QueryDManager can be used without includ…
harshit-sharma-gits Aug 15, 2022
f3fee02
Removed class: ReminderEvent, instead used existing Event Class
harshit-sharma-gits Aug 15, 2022
448bba8
The Pulse() hook function not working
harshit-sharma-gits Aug 17, 2022
54f007d
GUI Changes done
harshit-sharma-gits Aug 18, 2022
4321e0b
EventWindow GUI Revised
harshit-sharma-gits Aug 19, 2022
7d88c39
Event Attriubtes Changes
harshit-sharma-gits Aug 21, 2022
5e0cb87
Dead code cleanup
harshit-sharma-gits Aug 26, 2022
dac6796
Event Saving/Loading Bug Resolved
harshit-sharma-gits Aug 26, 2022
e1d9bbb
Fetching events with Reminder Attribute
harshit-sharma-gits Aug 26, 2022
d611268
Query Bug Resolved
harshit-sharma-gits Aug 27, 2022
b57c108
Reminder Box layout changes
harshit-sharma-gits Aug 27, 2022
d4430de
Minor Code Style changes and Localization
harshit-sharma-gits Aug 27, 2022
4f59b6c
Proper plural handling using BStringView
harshit-sharma-gits Aug 28, 2022
8c268c9
Created en catkeys in locales and added en to Makefile
harshit-sharma-gits Aug 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
objects*/
main/objects*/
daemon/objects*/
Calendar.pld
146 changes: 146 additions & 0 deletions daemon/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
## Haiku Generic Makefile v2.6 ##

## Fill in this file to specify the project being created, and the referenced
## Makefile-Engine will do all of the hard work for you. This handles any
## architecture of Haiku.
##
## For more information, see:
## file:///system/develop/documentation/makefile-engine.html

# The name of the binary.
NAME = CalendarDaemon

# The type of binary, must be one of:
# APP: Application
# SHARED: Shared library or add-on
# STATIC: Static library archive
# DRIVER: Kernel driver
TYPE = APP

# If you plan to use localization, specify the application's MIME signature.
APP_MIME_SIG = application/x-vnd.CalendarDaemon

# The following lines tell Pe and Eddie where the SRCS, RDEFS, and RSRCS are
# so that Pe and Eddie can fill them in for you.
#%{
# @src->@

# Specify the source files to use. Full paths or paths relative to the
# Makefile can be included. All files, regardless of directory, will have
# their object files created in the common object directory. Note that this
# means this Makefile will not work correctly if two source files with the
# same name (source.c or source.cpp) are included from different directories.
# Also note that spaces in folder names do not work well with this Makefile.
SRCS = \
src/CalendarDaemon.cpp \
../main/src/model/Event.cpp \
../main/src/model/Category.cpp \
../main/src/utils/ColorConverter.cpp \
../main/src/utils/ResourceLoader.cpp \
../main/src/db/QueryDBManager.cpp


# Specify the resource definition files to use. Full or relative paths can be
# used.
RDEFS = src/CalendarDaemon.rdef


# Specify the resource files to use. Full or relative paths can be used.
# Both RDEFS and RSRCS can be utilized in the same Makefile.
RSRCS =


# End Pe/Eddie support.
# @<-src@
#%}

#%}

# Specify libraries to link against.
# There are two acceptable forms of library specifications:
# - if your library follows the naming pattern of libXXX.so or libXXX.a,
# you can simply specify XXX for the library. (e.g. the entry for
# "libtracker.so" would be "tracker")
#
# - for GCC-independent linking of standard C++ libraries, you can use
# $(STDCPPLIBS) instead of the raw "stdc++[.r4] [supc++]" library names.
#
# - if your library does not follow the standard library naming scheme,
# you need to specify the path to the library and it's name.
# (e.g. for mylib.a, specify "mylib.a" or "path/mylib.a")
LIBS = be tracker shared localestub sqlite3 bnetapi network netservices $(STDCPPLIBS)

# Specify additional paths to directories following the standard libXXX.so
# or libXXX.a naming scheme. You can specify full paths or paths relative
# to the Makefile. The paths included are not parsed recursively, so
# include all of the paths where libraries must be found. Directories where
# source files were specified are automatically included.
LIBPATHS =

# Additional paths to look for system headers. These use the form
# "#include <header>". Directories that contain the files in SRCS are
# NOT auto-included here.
SYSTEM_INCLUDE_PATHS = \
$(shell findpaths -e B_FIND_PATH_HEADERS_DIRECTORY private/interface) \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these includes necessary for the daemon? Please remove them one by one and keep the ones you need.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

$(shell findpaths -e B_FIND_PATH_HEADERS_DIRECTORY private/netservices) \
$(shell findpaths -e B_FIND_PATH_HEADERS_DIRECTORY private/shared) \
$(shell findpaths -e B_FIND_PATH_HEADERS_DIRECTORY private/support)

# Additional paths paths to look for local headers. These use the form
# #include "header". Directories that contain the files in SRCS are
# automatically included.
LOCAL_INCLUDE_PATHS =

# Specify the level of optimization that you want. Specify either NONE (O0),
# SOME (O1), FULL (O3), or leave blank (for the default optimization level).
OPTIMIZE := FULL

# Specify the codes for languages you are going to support in this
# application. The default "en" one must be provided too. "make catkeys"
# will recreate only the "locales/en.catkeys" file. Use it as a template
# for creating catkeys for other languages. All localization files must be
# placed in the "locales" subdirectory.
LOCALES = en

# Specify all the preprocessor symbols to be defined. The symbols will not
# have their values set automatically; you must supply the value (if any) to
# use. For example, setting DEFINES to "DEBUG=1" will cause the compiler
# option "-DDEBUG=1" to be used. Setting DEFINES to "DEBUG" would pass
# "-DDEBUG" on the compiler's command line.
DEFINES =

# Specify the warning level. Either NONE (suppress all warnings),
# ALL (enable all warnings), or leave blank (enable default warnings).
WARNINGS =

# With image symbols, stack crawls in the debugger are meaningful.
# If set to "TRUE", symbols will be created.
SYMBOLS :=

# Includes debug information, which allows the binary to be debugged easily.
# If set to "TRUE", debug info will be created.
DEBUGGER :=

# Specify any additional compiler flags to be used.
COMPILER_FLAGS =

# Specify any additional linker flags to be used.
LINKER_FLAGS =

# Specify the version of this binary. Example:
# -app 3 4 0 d 0 -short 340 -long "340 "`echo -n -e '\302\251'`"1999 GNU GPL"
# This may also be specified in a resource.
APP_VERSION :=

# (Only used when "TYPE" is "DRIVER"). Specify the desired driver install
# location in the /dev hierarchy. Example:
# DRIVER_PATH = video/usb
# will instruct the "driverinstall" rule to place a symlink to your driver's
# binary in ~/add-ons/kernel/drivers/dev/video/usb, so that your driver will
# appear at /dev/video/usb when loaded. The default is "misc".
DRIVER_PATH =

## Include the Makefile-Engine
DEVEL_DIRECTORY := \
$(shell findpaths -r "makefile_engine" B_FIND_PATH_DEVELOP_DIRECTORY)
include $(DEVEL_DIRECTORY)/etc/makefile-engine
2 changes: 2 additions & 0 deletions daemon/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# calendar_daemon
A daemon app which will be responsible for sending reminders for the Calendar Application on Haiku OS
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fine for now, but make a note to expand either the top level readme in the future, or this one, once you have figured out and implemented how this is going to be started/stopped and triggered.

22 changes: 22 additions & 0 deletions daemon/locales/en.catkeys
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
1 English application/x-vnd.CalendarDaemon 3971020027
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you should remove the locale changes in the daemon for now, as I think there is a better way. We will discuss this separately.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. Should I remove only the catkeys or the code changes as well?

Couldn't restore the deleted event― you might want to look in the Trash to find this event and manually restore it. QueryDBManager Couldn't restore the deleted event― you might want to look in the Trash to find this event and manually restore it.
Couldn't open event file because permission was denied. It usually means that you don't have read permissions to the event file or its parent directory, usually within the settings directory.Find out the file's location and try changing its permissions. QueryDBManager Couldn't open event file because permission was denied. It usually means that you don't have read permissions to the event file or its parent directory, usually within the settings directory.Find out the file's location and try changing its permissions.
Event file QueryDBManager Event file
{0, plural,=1{1 hour!}other{# hours!}} Daemon {0, plural,=1{1 hour!}other{# hours!}}
OK QueryDBManager OK
Birthday QueryDBManager Birthday
Couldn't restore the deleted event― it seems that it couldn't be found or doesn't exist. You might want to look in the Trash to find this event and manually restore it. QueryDBManager Couldn't restore the deleted event― it seems that it couldn't be found or doesn't exist. You might want to look in the Trash to find this event and manually restore it.
{0, plural,=1{1 second!}other{# seconds!}} Daemon {0, plural,=1{1 second!}other{# seconds!}}
Couldn't open event file because the path is not specified. It usually means that the programmer made a mistake. There is nothing you can do about it. Sorry. QueryDBManager Couldn't open event file because the path is not specified. It usually means that the programmer made a mistake. There is nothing you can do about it. Sorry.
{0, plural,=1{1 minute!}other{# minutes!}} Daemon {0, plural,=1{1 minute!}other{# minutes!}}
Couldn't open category file because permission was denied. It usually means that you don't have read permissions to the event file or its parent directory, usually within the settings directory.Find out the file's location and try changing its permissions. QueryDBManager Couldn't open category file because permission was denied. It usually means that you don't have read permissions to the event file or its parent directory, usually within the settings directory.Find out the file's location and try changing its permissions.
Restoring event QueryDBManager Restoring event
Couldn't move the event to Trash― you might want to use a Tracker query to find this event and manually delete it. QueryDBManager Couldn't move the event to Trash― you might want to use a Tracker query to find this event and manually delete it.
Category file QueryDBManager Category file
Couldn't open category file because the path is not specified. It usually means that the programmer made a mistake. There is nothing you can do about it. Sorry. QueryDBManager Couldn't open category file because the path is not specified. It usually means that the programmer made a mistake. There is nothing you can do about it. Sorry.
Couldn't move the event to trash― it seems that the event couldn't be found or doesn't exist. You might want to use a Tracker query to find this event and manually delete it. QueryDBManager Couldn't move the event to trash― it seems that the event couldn't be found or doesn't exist. You might want to use a Tracker query to find this event and manually delete it.
Default QueryDBManager Default
There is not enough memory available on your system to save the category file. If you want to have event updates saved, try closing a fewapplications and try again. QueryDBManager There is not enough memory available on your system to save the category file. If you want to have event updates saved, try closing a fewapplications and try again.
Calendar notification!\n\nEvent:\t%eventName%\nPlace:\t%eventPlace%\n\nThe event starts in Daemon Calendar notification!\n\nEvent:\t%eventName%\nPlace:\t%eventPlace%\n\nThe event starts in
There is not enough memory available on your system to save the event file. If you want to have event updates saved, try closing a few applications and try again. QueryDBManager There is not enough memory available on your system to save the event file. If you want to have event updates saved, try closing a few applications and try again.
Moving to Trash QueryDBManager Moving to Trash
Loading